保存生产消息 4.24

zhc4dev
zhc077 2 years ago
parent cb03926e0f
commit ee33bd62af
  1. 14
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyProductPlanController.java

@ -13,6 +13,8 @@ import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.exception.JeecgBootException; import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.message.entity.ZySpeechMessage;
import org.jeecg.modules.message.service.IZySpeechMessageService;
import org.jeecg.modules.productplan.entity.ZyProductPlan; import org.jeecg.modules.productplan.entity.ZyProductPlan;
import org.jeecg.modules.productplan.entity.vo.PaiWeiTuVo; import org.jeecg.modules.productplan.entity.vo.PaiWeiTuVo;
import org.jeecg.modules.productplan.service.IZyProductPlanService; import org.jeecg.modules.productplan.service.IZyProductPlanService;
@ -50,6 +52,9 @@ public class ZyProductPlanController extends JeecgController<ZyProductPlan, IZyP
@Autowired @Autowired
private ISysUserService iSysUserService; private ISysUserService iSysUserService;
@Autowired
private IZySpeechMessageService iZySpeechMessageService;
/** /**
* 分页列表查询 * 分页列表查询
* *
@ -90,6 +95,15 @@ public class ZyProductPlanController extends JeecgController<ZyProductPlan, IZyP
@PostMapping(value = "/add") @PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyProductPlan zyProductPlan) { public Result<?> add(@RequestBody ZyProductPlan zyProductPlan) {
zyProductPlanService.create(zyProductPlan); zyProductPlanService.create(zyProductPlan);
//保存生产计划语音播报消息
ZySpeechMessage zySpeechMessage = new ZySpeechMessage();
String productCode = zyProductPlan.getProductCode();
String code = productCode.substring(productCode.length() - 10);
String mess = "工单尾号" + code + ",生产计划已完成制定,请跟进后续生产作业.";
zySpeechMessage.setMessage(mess);
zySpeechMessage.setWorkorderId(productCode);
iZySpeechMessageService.save(zySpeechMessage);
return Result.OK("添加成功!"); return Result.OK("添加成功!");
} }

Loading…
Cancel
Save