diff --git a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/controller/WorkDeptController.java b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/controller/WorkDeptController.java index 1a9cc79d..fea1c9c2 100644 --- a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/controller/WorkDeptController.java +++ b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/controller/WorkDeptController.java @@ -29,14 +29,12 @@ public class WorkDeptController extends BaseController { @GetMapping("/getPage") - public TableDataInfo getPage(HttpServletRequest request, - String status) { + public TableDataInfo getPage(HttpServletRequest request) { LoginUser loginUser = logUserUtils.getLogUser(request); startPage(); Map params = new HashMap<>(); params.put("tenantId", loginUser.getTenantId()); - params.put("status", status); return getDataTable(workDeptService.getPage(params)); } diff --git a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/controller/WorkUserController.java b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/controller/WorkUserController.java index 0557f825..6a50dc2c 100644 --- a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/controller/WorkUserController.java +++ b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/controller/WorkUserController.java @@ -29,14 +29,12 @@ public class WorkUserController extends BaseController { LogUserUtils logUserUtils; @GetMapping("/getPage") - public TableDataInfo getPage(HttpServletRequest request, - String status) { + public TableDataInfo getPage(HttpServletRequest request) { LoginUser loginUser = logUserUtils.getLogUser(request); startPage(); Map params = new HashMap<>(); params.put("tenantId", loginUser.getTenantId()); - params.put("status", status); return getDataTable(workUserService.getPage(params)); } diff --git a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/controller/XhpcClearingCheckoutController.java b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/controller/XhpcClearingCheckoutController.java index d988f314..4e0fea40 100644 --- a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/controller/XhpcClearingCheckoutController.java +++ b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/controller/XhpcClearingCheckoutController.java @@ -5,6 +5,7 @@ import com.xhpc.activity.domain.XhpcClearingCheckoutDomain; import com.xhpc.activity.service.XhpcClearingCheckoutService; import com.xhpc.activity.vo.ClearingReceiptVo; import com.xhpc.common.core.domain.R; +import com.xhpc.common.core.exception.CustomException; import com.xhpc.common.core.utils.StringUtils; import com.xhpc.common.core.web.controller.BaseController; import com.xhpc.common.core.web.page.TableDataInfo; @@ -134,6 +135,10 @@ public class XhpcClearingCheckoutController extends BaseController { @PostMapping("/importReceipt") public R importReceipt(HttpServletRequest request, @RequestBody ClearingReceiptVo receiptVo) throws Exception { + if(StringUtils.isEmpty(receiptVo.getFile()) || receiptVo.getReceiptList().size() < 1){ + throw new CustomException("Excel文件和回执图片必传"); + } + LoginUser loginUser = logUserUtils.getLogUser(request); receiptVo.setCreateBy(loginUser.getUserid().toString()); return R.ok(checkoutService.insertReceipt(receiptVo)); diff --git a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/controller/XhpcClearingHistoryOrderController.java b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/controller/XhpcClearingHistoryOrderController.java index 9952d481..d7500c1a 100644 --- a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/controller/XhpcClearingHistoryOrderController.java +++ b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/controller/XhpcClearingHistoryOrderController.java @@ -101,7 +101,13 @@ public class XhpcClearingHistoryOrderController extends BaseController { // ============================== 清分 ============================ @GetMapping("/getOrderPage") - public TableDataInfo getOrderPage(HttpServletRequest request, String operatorId){ + public TableDataInfo getOrderPage(HttpServletRequest request, String operatorId, + @RequestParam(value = "orderNo", required = false, defaultValue = "") String orderNo, + @RequestParam(value = "stationId", required = false, defaultValue = "") String stationId, + @RequestParam(value = "source", required = false, defaultValue = "") String source, + @RequestParam(value = "startTime", required = false, defaultValue = "") String startTime, + @RequestParam(value = "endTime", required = false, defaultValue = "") String endTime, + @RequestParam(value = "status", required = false, defaultValue = "") String status){ LoginUser loginUser = logUserUtils.getLogUser(request); Map params = new HashMap<>(); @@ -109,6 +115,12 @@ public class XhpcClearingHistoryOrderController extends BaseController { operatorId = loginUser.getSysUser().getOperatorId() + ""; } params.put("operatorId", operatorId); + params.put("orderNo", orderNo); + params.put("stationId", stationId); + params.put("source", source); + params.put("startTime", startTime); + params.put("endTime", endTime); + params.put("status", status); if(params.get("operatorId") == null || StringUtils.isEmpty(params.get("operatorId").toString()) || "null".equals(params.get("operatorId").toString())){ throw new CustomException("运营商ID错误,请登陆运营商账户再试"); } diff --git a/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcClearingCheckoutMapper.xml b/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcClearingCheckoutMapper.xml index d7812417..b819d6e2 100644 --- a/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcClearingCheckoutMapper.xml +++ b/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcClearingCheckoutMapper.xml @@ -80,8 +80,8 @@ IFNULL(cc1.applyAmount,0) as 'applyAmount', IFNULL(cc2.cashedAmount,0) as 'cashedAmount' from xhpc_operator xo - left join (SELECT operator_id, sum(apply_amount) as 'applyAmount' from xhpc_clearing_checkout WHERE `status`=1 and del_flag=0 GROUP BY operator_id) cc1 on xo.operator_id = cc1.operator_id - left join (SELECT operator_id, sum(apply_amount) as 'cashedAmount' from xhpc_clearing_checkout WHERE `status`=6 and del_flag=0 GROUP BY operator_id) cc2 on xo.operator_id = cc2.operator_id + left join (SELECT operator_id, sum(received_amount) as 'applyAmount' from xhpc_clearing_checkout WHERE `status`=1 and del_flag=0 GROUP BY operator_id) cc1 on xo.operator_id = cc1.operator_id + left join (SELECT operator_id, sum(received_amount) as 'cashedAmount' from xhpc_clearing_checkout WHERE `status`=6 and del_flag=0 GROUP BY operator_id) cc2 on xo.operator_id = cc2.operator_id left join xhpc_tenant xt on xo.tenant_id=xt.tenant_id LEFT JOIN ( select diff --git a/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcClearingHistoryOrderMapper.xml b/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcClearingHistoryOrderMapper.xml index cc6096b3..8d23b5fd 100644 --- a/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcClearingHistoryOrderMapper.xml +++ b/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcClearingHistoryOrderMapper.xml @@ -160,6 +160,54 @@ and ct.operator_id=#{params.operatorId} + + and ho.serial_number like concat('%',#{params.orderNo},'%') + + + + and ho.charging_mode is null + + + and ho.charging_mode =#{params.source} + + + + + + + + and ct.name =concat('%', #{params.stationName}, '%') + + + and ct.charging_station_id =#{params.stationId} + + + and ho.end_time = ]]> #{params.startTime} + + + and ho.end_time #{params.endTime} + + + + and ho.check_status=0 and ho.clearing_checkout_id is null + + + and ho.check_status=1 and ho.clearing_checkout_id is null + + + and ho.check_status=2 and ho.clearing_checkout_id is null + + + and ho.check_status=2 and ho.clearing_checkout_id is null + + + and ho.check_status=2 and cc.STATUS = 1 + + + and ho.check_status=2 and cc.STATUS = 6 + + + GROUP BY ho.`clearing_order_id` ORDER BY FIELD(cc.STATUS, NULL,1,2) ASC, FIELD(ho.check_status,NULL,0,2, 1) asc @@ -189,10 +237,10 @@ left join xhpc_terminal xt on xt.terminal_id=ho.terminal_id where ho.status =0 and ho.del_flag=0 and ho.check_status=0 and ho.state ]]> 3 - and ho.start_time = ]]> #{params.startTime} + and ho.end_time = ]]> #{params.startTime} - and ho.start_time #{params.endTime} + and ho.end_time #{params.endTime} and ct.tenant_id=#{params.tenantId}