|
@@ -154,6 +154,98 @@ public class WxController extends ApiBaseController {
|
|
|
return AjaxResult.success();
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "加急审批通过",
|
|
|
+ notes = "" )
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "params" , paramType = "body")
|
|
|
+ })
|
|
|
+ @PostMapping("sendUrgentApproveMessage")
|
|
|
+ public Object sendApproveMessage() {
|
|
|
+
|
|
|
+ ParameterObject obj = getParameterObject();
|
|
|
+ obj.checkParameterNotNull("users,chain,order,time");
|
|
|
+ String users = obj.getString("users");
|
|
|
+ String chain = obj.getString("chain");
|
|
|
+ String order = obj.getString("order");
|
|
|
+ String time = obj.getString("time");
|
|
|
+ String temple = configService.selectConfigByKey("wx.notification.approve.one");
|
|
|
+ String message = String.format(temple, chain, order, time);
|
|
|
+ qyWxSendMessageUtil.sendApproveProcessMessage(users, message);
|
|
|
+ return AjaxResult.success();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "小吨位审批通过",
|
|
|
+ notes = "")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "params", paramType = "body")
|
|
|
+ })
|
|
|
+ @PostMapping("sendSmallTonApproveMessage")
|
|
|
+ public Object sendSmallTonApproveMessage() {
|
|
|
+
|
|
|
+ ParameterObject obj = getParameterObject();
|
|
|
+ obj.checkParameterNotNull("users,chain,order,time");
|
|
|
+ String users = obj.getString("users");
|
|
|
+ String chain = obj.getString("chain");
|
|
|
+ String order = obj.getString("order");
|
|
|
+ String time = obj.getString("time");
|
|
|
+ String temple = configService.selectConfigByKey("wx.notification.approve.two");
|
|
|
+ String message = String.format(temple, chain, order, time);
|
|
|
+ qyWxSendMessageUtil.sendApproveProcessMessage(users, message);
|
|
|
+ return AjaxResult.success();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "订单交货通知",
|
|
|
+ notes = "" )
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "params" , paramType = "body")
|
|
|
+ })
|
|
|
+ @PostMapping("sendOrderDeliverMessage")
|
|
|
+ public Object sendOrderDeliverMessage() {
|
|
|
+
|
|
|
+ ParameterObject obj = getParameterObject();
|
|
|
+ obj.checkParameterNotNull("chain,order");
|
|
|
+ String chain = obj.getString("chain");
|
|
|
+ String order = obj.getString("order");
|
|
|
+ String temple = configService.selectConfigByKey("wx.notification.order.complete");
|
|
|
+ String message = String.format(temple, order);
|
|
|
+
|
|
|
+ Set<String> customerCodes = new HashSet<>();
|
|
|
+ customerCodes.add(chain);
|
|
|
+ logger.info("收到需要通知的经销商组织代码:"+chain);
|
|
|
+ Map<String,Map<String,Object>> maps = sysUserService.selectLoginNamesByCostumerCode(customerCodes);
|
|
|
+ //消息
|
|
|
+ if(customerCodes.size()>0){
|
|
|
+ qyWxSendMessageUtil.sendDeliveryMessage(customerCodes,maps,message);
|
|
|
+ }
|
|
|
+ return AjaxResult.success();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "TMS运单出厂通知",
|
|
|
+ notes = "" )
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "params" , paramType = "body")
|
|
|
+ })
|
|
|
+ @PostMapping("sendApproveTMSMessage")
|
|
|
+ public Object sendApproveTMSMessage() {
|
|
|
+
|
|
|
+ ParameterObject obj = getParameterObject();
|
|
|
+ obj.checkParameterNotNull("chain,order");
|
|
|
+ String chain = obj.getString("chain");
|
|
|
+ String order = obj.getString("order");
|
|
|
+ String temple = configService.selectConfigByKey("wx.notification.tms.leave.factory");
|
|
|
+ String message = String.format(temple, order);
|
|
|
+
|
|
|
+ Set<String> customerCodes = new HashSet<>();
|
|
|
+ customerCodes.add(chain);
|
|
|
+ logger.info("收到需要通知的经销商组织代码:"+chain);
|
|
|
+ Map<String,Map<String,Object>> maps = sysUserService.selectLoginNamesByCostumerCode(customerCodes);
|
|
|
+ //消息
|
|
|
+ if(customerCodes.size()>0){
|
|
|
+ qyWxSendMessageUtil.sendDeliveryMessage(customerCodes,maps,message);
|
|
|
+ }
|
|
|
+ return AjaxResult.success();
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
// @ApiOperation(value = "根据用户经销商组织代码 customer_code发送文本",
|
|
|
// notes = "参数:{\"XXX\":\"123,456\"}(说明:key是经销商code 值是订单编号列表)" )
|