桌面端新增密炼计划获取

This commit is contained in:
2026-06-17 17:52:31 +08:00
parent 816af5df6e
commit 372dc10be2
23 changed files with 1335 additions and 92 deletions

View File

@@ -13,6 +13,7 @@ import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.xslmes.entity.MesXslMixingProductionPlan;
import org.jeecg.modules.xslmes.service.IMesXslMixingProductionPlanService;
import org.jeecg.modules.xslmes.service.MesXslStompNotifyService;
import org.jeecg.modules.xslmes.vo.MesXslMixingProductionPlanOrderOptionVO;
import org.jeecg.modules.xslmes.vo.MesXslMixingProductionPlanSaveAllVO;
import org.springframework.web.bind.annotation.GetMapping;
@@ -29,10 +30,13 @@ public class MesXslMixingProductionPlanController
extends JeecgController<MesXslMixingProductionPlan, IMesXslMixingProductionPlanService> {
private final IMesXslMixingProductionPlanService mixingProductionPlanService;
private final MesXslStompNotifyService stompNotify;
public MesXslMixingProductionPlanController(
IMesXslMixingProductionPlanService mixingProductionPlanService) {
IMesXslMixingProductionPlanService mixingProductionPlanService,
MesXslStompNotifyService stompNotify) {
this.mixingProductionPlanService = mixingProductionPlanService;
this.stompNotify = stompNotify;
}
@Operation(summary = "密炼生产计划维护-分页列表查询")
@@ -56,6 +60,9 @@ public class MesXslMixingProductionPlanController
@PostMapping("/saveAll")
public Result<String> saveAll(@RequestBody MesXslMixingProductionPlanSaveAllVO req) {
mixingProductionPlanService.saveAllRows(req == null ? null : req.getRows());
//update-begin---author:jiangxh ---date:20260617 for【密炼计划】整表保存后广播桌面端同步-----------
stompNotify.publishMixingProductionPlanChanged("saveAll", null);
//update-end---author:jiangxh ---date:20260617 for【密炼计划】整表保存后广播桌面端同步-----------
return Result.OK("保存成功");
}

View File

@@ -99,6 +99,14 @@ public class MesXslStompNotifyService {
}
//update-end---author:jiangxh ---date:20260617 for【快检实验标准】桌面端只读同步 STOMP-----------
//update-begin---author:jiangxh ---date:20260617 for【密炼计划】桌面端只读同步 STOMP-----------
/** 广播密炼生产计划变更事件到 /topic/sync/mes-mixing-production-plans */
public void publishMixingProductionPlanChanged(String action, String mixingProductionPlanId) {
publish("/topic/sync/mes-mixing-production-plans", "MIXING_PRODUCTION_PLAN_CHANGED",
"mixingProductionPlanId", mixingProductionPlanId, action);
}
//update-end---author:jiangxh ---date:20260617 for【密炼计划】桌面端只读同步 STOMP-----------
// ─────────────────────────── 私有辅助 ────────────────────────────
private void publish(String topic, String cmd, String idKey, String idValue, String action) {