|
@@ -4,15 +4,25 @@ import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
|
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
|
|
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
|
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
import com.ssj.bean.sys.homework.domain.HomeworkPicture;
|
|
|
import com.ssj.bean.sys.picturepredeal.domain.PicturePreDeal;
|
|
|
+import com.ssj.bean.sys.role.domain.Admin;
|
|
|
+import com.ssj.bean.weixin.libmy.domain.LibBookApply;
|
|
|
import com.ssj.framework.basic.common.bean.SplitPage;
|
|
|
import com.ssj.framework.core.common.controller.BaseController;
|
|
|
import com.ssj.framework.core.util.PropertiesUtil;
|
|
|
import com.ssj.framework.core.util.ResponseEntity;
|
|
|
+import com.ssj.refund.bean.RefundAuditInfo;
|
|
|
+import com.ssj.refund.bean.RefundInfo;
|
|
|
+import com.ssj.refund.service.IAuditInfoService;
|
|
|
+import com.ssj.refund.service.IMerchantRefundService;
|
|
|
+import com.ssj.service.reading.request.RandomBookReq;
|
|
|
+import com.ssj.service.sys.fx.service.SysCuratorService;
|
|
|
import com.ssj.service.sys.homework.service.HomeworkPictureService;
|
|
|
import com.ssj.service.sys.jxy.service.JxyService;
|
|
|
import com.ssj.service.sys.picturepredeal.service.PicturePreDealService;
|
|
|
+import com.ssj.service.sys.role.service.RoleService;
|
|
|
import com.ssj.service.sys.sort.service.SortService;
|
|
|
import com.ssj.sys.model.ErrorModel;
|
|
|
import org.apache.poi.ss.usermodel.Workbook;
|
|
@@ -53,6 +63,18 @@ public class ErrorController extends BaseController {
|
|
|
@Autowired
|
|
|
private HomeworkPictureService homeworkPictureService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private RoleService roleService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IMerchantRefundService merchantRefundService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IAuditInfoService auditInfoService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private SysCuratorService sysCuratorService;
|
|
|
+
|
|
|
@RequestMapping("/errorList")
|
|
|
public String errorList(Model model,
|
|
|
@RequestParam(required = false, defaultValue = "10") int pageSize,
|
|
@@ -233,4 +255,124 @@ public class ErrorController extends BaseController {
|
|
|
}
|
|
|
return "sys/error/answerInfo";
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 退款审核列表
|
|
|
+ * @param model
|
|
|
+ * @param pageSize
|
|
|
+ * @param pageNo
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping("/refundList")
|
|
|
+ public String refundList(Model model,
|
|
|
+ @RequestParam(required = false, defaultValue = "10") int pageSize,
|
|
|
+ @RequestParam(required = false, defaultValue = "1") int pageNo){
|
|
|
+
|
|
|
+ Map<String, Object> params = new HashMap<String, Object>();
|
|
|
+ SplitPage sp = new SplitPage();
|
|
|
+ sp.setAction(request.getRequestURI());
|
|
|
+ sp.setPageNo(pageNo);
|
|
|
+ sp.setPageSize(pageSize);
|
|
|
+ sp.setParams(params);
|
|
|
+ Page<Map<String,Object>> page= jxyService.refundList(params, initPage(pageNo,pageSize));
|
|
|
+ sp.setRowCnt((int) page.getTotalElements());
|
|
|
+ model.addAttribute("list", page.getContent());
|
|
|
+ model.addAttribute("listNavigatHtml", sp.getSysPaginHtml());
|
|
|
+ model.addAttribute("page", sp);
|
|
|
+ model.addAttribute("search", params);
|
|
|
+ model.addAttribute("roleList", roleService.getAdminRoleName(adminId()));
|
|
|
+ return "sys/refund/refundList";
|
|
|
+ }
|
|
|
+ @RequestMapping("/libRefundEdit")
|
|
|
+ public String libRefundEdit(Model model, @RequestParam(required = false, defaultValue = "1") String id) throws Exception{
|
|
|
+
|
|
|
+ model.addAttribute("id", id);
|
|
|
+
|
|
|
+ return "sys/refund/refundMsgEdit";
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @RequestMapping(value="/saveRefundAudit",method = RequestMethod.POST)
|
|
|
+ @ResponseBody
|
|
|
+ public ResponseEntity saveRefundAudit(@RequestParam String id, @RequestParam int state,String msg){
|
|
|
+ ResponseEntity responseEntity = new ResponseEntity();
|
|
|
+ try {
|
|
|
+ RefundInfo apply = merchantRefundService.getById(id);
|
|
|
+ if(apply == null){
|
|
|
+ responseEntity.failure("000","审核数据不存在");
|
|
|
+ return responseEntity;
|
|
|
+ }
|
|
|
+ RefundAuditInfo info = new RefundAuditInfo();
|
|
|
+ info.setAuditPoint(apply.getAuditPoint());
|
|
|
+ info.setCreateTime(new Date());
|
|
|
+ info.setAuditState(state);
|
|
|
+ info.setMsg(msg);
|
|
|
+ info.setRefundId(apply.getId());
|
|
|
+ auditInfoService.save(info);
|
|
|
+ if(state==2){
|
|
|
+ //拒绝才设置
|
|
|
+ apply.setAuditState(state);
|
|
|
+ }else{
|
|
|
+ if("业务审核".equals(apply.getAuditPoint())){
|
|
|
+ apply.setAuditPoint("财务审核");
|
|
|
+ }else{
|
|
|
+ apply.setAuditState(state);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ merchantRefundService.save(apply);
|
|
|
+ responseEntity.success("审核成功");
|
|
|
+ }catch (Exception e){
|
|
|
+ responseEntity.failure("系统出现异常,保存失败");
|
|
|
+ logger.error("异常", e);
|
|
|
+ }
|
|
|
+
|
|
|
+ return responseEntity;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 退款审核列表
|
|
|
+ * @param model
|
|
|
+ * @param pageSize
|
|
|
+ * @param pageNo
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping("/vipList")
|
|
|
+ public String vipList(Model model,
|
|
|
+ @RequestParam(required = false, defaultValue = "10") int pageSize,
|
|
|
+ @RequestParam(required = false, defaultValue = "1") int pageNo){
|
|
|
+
|
|
|
+ Map<String, Object> params = new HashMap<String, Object>();
|
|
|
+ //是否显示编辑服务时间 1不显示 2显示
|
|
|
+ params.put("showEdit",1);
|
|
|
+ params.put("stat",request.getParameter("stat")==null?"":request.getParameter("stat"));
|
|
|
+ params.put("startDate",request.getParameter("startDate")==null?"":request.getParameter("startDate"));
|
|
|
+ params.put("endDate",request.getParameter("endDate")==null?"":request.getParameter("endDate"));
|
|
|
+ params.put("serviceType",request.getParameter("serviceType")==null?"":request.getParameter("serviceType"));
|
|
|
+ params.put("pageSize",pageSize);
|
|
|
+ params.put("pageNo",pageNo);
|
|
|
+ String vipIds = request.getParameter("vipIds")==null?"":request.getParameter("vipIds");
|
|
|
+ if(!"".equals(vipIds)){
|
|
|
+ params.put("vipIds",vipIds.replace("[","").replace("]","").split(","));
|
|
|
+ }
|
|
|
+
|
|
|
+ String classId = request.getParameter("classId")==null?"":request.getParameter("classId");
|
|
|
+ params.put("classId",classId);
|
|
|
+ Map<String,Object> data = sysCuratorService.studentIndex("",params);
|
|
|
+ getModel(model,data,params,pageSize,pageNo);
|
|
|
+ return "sys/refund/studentIndex";
|
|
|
+ }
|
|
|
+
|
|
|
+ public Model getModel(Model model,Map<String,Object> data,Map<String, Object> params,int pageSize,int pageNo){
|
|
|
+ SplitPage sp = new SplitPage();
|
|
|
+ sp.setAction(request.getRequestURI());
|
|
|
+ sp.setPageNo(pageNo);
|
|
|
+ sp.setPageSize(pageSize);
|
|
|
+ sp.setParams(params);
|
|
|
+ sp.setRowCnt(Integer.parseInt(data.get("total").toString()));
|
|
|
+ model.addAttribute("page", sp);
|
|
|
+ model.addAllAttributes(data);
|
|
|
+ model.addAttribute("search", params);
|
|
|
+ model.addAttribute("listNavigatHtml", sp.getSysPaginHtml());
|
|
|
+ return model;
|
|
|
+ }
|
|
|
}
|