From cf2c3dcd2922d97edcff56c8c1c924ebb2f0d7c9 Mon Sep 17 00:00:00 2001 From: "kuang.yife" Date: Sun, 5 Mar 2023 18:25:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=BE=E5=8D=95=E6=90=9C=E7=B4=A2=20+=20?= =?UTF-8?q?=E8=B4=A6=E5=8D=95=E6=98=8E=E7=BB=86=20+=20=E8=AE=A2=E9=98=85?= =?UTF-8?q?=E5=8F=B7=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../payment/FinancialDetailController.java | 2 +- .../ghy/web/controller/tool/WxController.java | 20 +++++++ .../web/pojo/vo/FinancialCountRequest.java | 2 + .../ghy/payment/domain/FinancialDetail.java | 2 + .../response/FinancialCountResponse.java | 2 + .../service/FinancialDetailService.java | 2 +- .../impl/FinancialDetailServiceImpl.java | 3 +- .../financial/FinancialDetailMapper.xml | 60 ++++++++++++------- .../java/com/ghy/system/domain/NoticeMsg.java | 22 +++++++ .../system/service/impl/WxMsgServiceImpl.java | 23 +++++-- .../mapper/worker/WorkerTeamMapper.xml | 4 ++ 11 files changed, 112 insertions(+), 30 deletions(-) create mode 100644 ghy-system/src/main/java/com/ghy/system/domain/NoticeMsg.java diff --git a/ghy-admin/src/main/java/com/ghy/web/controller/payment/FinancialDetailController.java b/ghy-admin/src/main/java/com/ghy/web/controller/payment/FinancialDetailController.java index 8e9eb5cb..1e4dcb6b 100644 --- a/ghy-admin/src/main/java/com/ghy/web/controller/payment/FinancialDetailController.java +++ b/ghy-admin/src/main/java/com/ghy/web/controller/payment/FinancialDetailController.java @@ -44,7 +44,7 @@ public class FinancialDetailController extends BaseController { @ResponseBody public AjaxResult count(@RequestBody FinancialCountRequest request){ try { - return AjaxResult.success(financialDetailService.count(request.getCountTime(), request.getFinancialDetailTypes(), request.getWorkerId())); + return AjaxResult.success(financialDetailService.count(request.getCountTime(), request.getBillingState(), request.getFinancialDetailTypes(), request.getWorkerId())); }catch (Exception e){ e.printStackTrace(); return AjaxResult.error(ExceptionUtil.getExceptionMessage(e)); diff --git a/ghy-admin/src/main/java/com/ghy/web/controller/tool/WxController.java b/ghy-admin/src/main/java/com/ghy/web/controller/tool/WxController.java index ef5c4a67..724f32b8 100644 --- a/ghy-admin/src/main/java/com/ghy/web/controller/tool/WxController.java +++ b/ghy-admin/src/main/java/com/ghy/web/controller/tool/WxController.java @@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject; import com.ghy.common.config.WxConfig; import com.ghy.common.core.controller.BaseController; import com.ghy.common.core.domain.AjaxResult; +import com.ghy.common.enums.OrderStatus; import com.ghy.common.exception.ServiceException; import com.ghy.common.utils.ExceptionUtil; import com.ghy.common.utils.StringUtils; @@ -11,8 +12,10 @@ import com.ghy.common.utils.WxUtils; import com.ghy.common.utils.http.HttpUtils; import com.ghy.customer.domain.Customer; import com.ghy.customer.service.CustomerService; +import com.ghy.system.domain.NoticeMsg; import com.ghy.system.domain.SysDeptConfig; import com.ghy.system.service.ISysDeptConfigService; +import com.ghy.system.service.IWxMsgService; import com.ghy.worker.domain.Worker; import com.ghy.worker.service.WorkerService; import org.apache.commons.codec.binary.Base64; @@ -48,6 +51,23 @@ public class WxController extends BaseController { @Autowired private WorkerService workerService; + @Autowired + private IWxMsgService wxMsgService; + + @PostMapping("/noticeMsg") + @ResponseBody + public AjaxResult noticeMsg(@RequestBody NoticeMsg noticeMsg){ + try { + wxMsgService.sendMsg(noticeMsg.getOpenId(), noticeMsg.getRemind(), + noticeMsg.getOrderId(), noticeMsg.getName(), OrderStatus.valueOf(noticeMsg.getOrderStatus()), + System.currentTimeMillis()); + return AjaxResult.success(); + }catch (Exception e){ + logger.error(ExceptionUtil.getExceptionMessage(e)); + return AjaxResult.error(e.getMessage()); + } + } + @PostMapping("/addUser") @ResponseBody public AjaxResult addUser(@RequestBody Customer customer){ diff --git a/ghy-admin/src/main/java/com/ghy/web/pojo/vo/FinancialCountRequest.java b/ghy-admin/src/main/java/com/ghy/web/pojo/vo/FinancialCountRequest.java index ca146930..35f68176 100644 --- a/ghy-admin/src/main/java/com/ghy/web/pojo/vo/FinancialCountRequest.java +++ b/ghy-admin/src/main/java/com/ghy/web/pojo/vo/FinancialCountRequest.java @@ -12,4 +12,6 @@ public class FinancialCountRequest { private List financialDetailTypes; private Integer workerId; + + private String billingState; } diff --git a/ghy-payment/src/main/java/com/ghy/payment/domain/FinancialDetail.java b/ghy-payment/src/main/java/com/ghy/payment/domain/FinancialDetail.java index 6ee17140..847e461b 100644 --- a/ghy-payment/src/main/java/com/ghy/payment/domain/FinancialDetail.java +++ b/ghy-payment/src/main/java/com/ghy/payment/domain/FinancialDetail.java @@ -83,6 +83,8 @@ public class FinancialDetail extends BaseEntity { private List financialDetailTypes; + private String billingState; + public FinancialDetail() { } diff --git a/ghy-payment/src/main/java/com/ghy/payment/response/FinancialCountResponse.java b/ghy-payment/src/main/java/com/ghy/payment/response/FinancialCountResponse.java index 22dc1007..c699c9b7 100644 --- a/ghy-payment/src/main/java/com/ghy/payment/response/FinancialCountResponse.java +++ b/ghy-payment/src/main/java/com/ghy/payment/response/FinancialCountResponse.java @@ -18,4 +18,6 @@ public class FinancialCountResponse { private Integer payeeId; private List financialDetailTypes; + + private String billingState; } diff --git a/ghy-payment/src/main/java/com/ghy/payment/service/FinancialDetailService.java b/ghy-payment/src/main/java/com/ghy/payment/service/FinancialDetailService.java index eb4163d4..378ce6c1 100644 --- a/ghy-payment/src/main/java/com/ghy/payment/service/FinancialDetailService.java +++ b/ghy-payment/src/main/java/com/ghy/payment/service/FinancialDetailService.java @@ -20,7 +20,7 @@ public interface FinancialDetailService { * @param payeeId 收款人id * @return 月份集合 */ - List count(String countTime, List financialDetailTypes, Integer payeeId); + List count(String countTime, String billingState, List financialDetailTypes, Integer payeeId); /** * @param orderDetailId 细单id diff --git a/ghy-payment/src/main/java/com/ghy/payment/service/impl/FinancialDetailServiceImpl.java b/ghy-payment/src/main/java/com/ghy/payment/service/impl/FinancialDetailServiceImpl.java index a6cc7012..82c0104c 100644 --- a/ghy-payment/src/main/java/com/ghy/payment/service/impl/FinancialDetailServiceImpl.java +++ b/ghy-payment/src/main/java/com/ghy/payment/service/impl/FinancialDetailServiceImpl.java @@ -35,12 +35,13 @@ public class FinancialDetailServiceImpl implements FinancialDetailService { @Override - public List count(String countTime, List financialDetailTypes, Integer payeeId) { + public List count(String countTime, String billingState, List financialDetailTypes, Integer payeeId) { FinancialCountResponse request = new FinancialCountResponse(); request.setCreateTime(countTime); request.setFlag("true"); request.setFinancialDetailTypes(financialDetailTypes); request.setPayeeId(payeeId); + request.setBillingState(billingState); // 查询各月含有收入的费用 List list = financialDetailMapper.count(request); list.forEach(financialCountResponse -> { diff --git a/ghy-payment/src/main/resources/mapper/financial/FinancialDetailMapper.xml b/ghy-payment/src/main/resources/mapper/financial/FinancialDetailMapper.xml index 71245210..3352530c 100644 --- a/ghy-payment/src/main/resources/mapper/financial/FinancialDetailMapper.xml +++ b/ghy-payment/src/main/resources/mapper/financial/FinancialDetailMapper.xml @@ -43,49 +43,58 @@ AND w.phone IS NOT NULL + + AND ( wt.worker_name like concat('%',#{workerName},'%') + or w.name like concat('%',#{workerName},'%') ) +