From 16da0ad1fda1dffa3019425a6887d38ed4217f44 Mon Sep 17 00:00:00 2001 From: wzy <wzy19931122ai@163.com> Date: Sun, 10 Jan 2021 14:26:02 +0800 Subject: [PATCH] Merge branch 'api' into order_reform --- zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java | 20 ++++++++++++++++++-- 1 files changed, 18 insertions(+), 2 deletions(-) diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java index 9749835..cfb58f7 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java @@ -1,5 +1,7 @@ package com.matrix.system.hive.service.imp; +import com.alibaba.fastjson.JSONObject; +import com.matrix.component.rabbitmq.RabiitMqTemplate; import com.matrix.core.constance.MatrixConstance; import com.matrix.core.exception.GlobleException; import com.matrix.core.pojo.PaginationVO; @@ -16,9 +18,11 @@ import com.matrix.system.hive.plugin.util.MoneyUtil; import com.matrix.system.hive.pojo.MyBeauticianCount; import com.matrix.system.hive.service.*; +import com.matrix.system.shopXcx.mqTask.MQTaskRouting; import org.apache.commons.collections.CollectionUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -97,6 +101,13 @@ WarehouseDao warehouseDao; @Resource private ShoppingGoodsService shoppingGoodsService; + + @Autowired + private RabiitMqTemplate rabiitMqTemplate; + + @Value("${evn}") + private String evn; + /** * 新增服务单 jyy @@ -561,10 +572,15 @@ if (!projServices.getState().equals(Dictionary.SERVICE_STATU_FWWC)) { throw new GlobleException("该服务单状态为" + projServices.getState() + ",不可以进行当前操作!"); } else { - projServices.setState(Dictionary.SERVICE_STATU_FFJS); projServices.setConsumeTime(new Date()); - return sysProjServicesDao.update(projServices); + int result=sysProjServicesDao.update(projServices); + //发送微信公众号提醒 + JSONObject param=new JSONObject(); + param.put("companyId",projServices.getCompanyId()); + param.put("serviceId",projServices.getId()); + rabiitMqTemplate.sendMsg(MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG+evn,param.toJSONString()); + return result; } } -- Gitblit v1.9.1