From 5635edd63063e0a2e633e0fb1f285cce28180e21 Mon Sep 17 00:00:00 2001 From: wangziyangyang <707231019@qq.com> Date: Tue, 17 Mar 2020 16:17:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=B5=81=E7=A8=8B=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SpFlowOperRelationController.java | 2 +- .../mapper/SpFlowOperRelationMapper.java | 8 +++++++- .../impl/SpFlowOperRelationServiceImpl.java | 15 ++++++++++++--- .../basedata/SpFlowOperRelationMapper.xml | 6 ++++++ mes/src/main/resources/static/css/public.css | 2 +- .../basedata/flowprocess/addOrUpdate.ftl | 19 ++++++++++--------- 6 files changed, 37 insertions(+), 15 deletions(-) diff --git a/mes/src/main/java/com/wangziyang/mes/basedata/controller/SpFlowOperRelationController.java b/mes/src/main/java/com/wangziyang/mes/basedata/controller/SpFlowOperRelationController.java index bfb099b..605761f 100644 --- a/mes/src/main/java/com/wangziyang/mes/basedata/controller/SpFlowOperRelationController.java +++ b/mes/src/main/java/com/wangziyang/mes/basedata/controller/SpFlowOperRelationController.java @@ -109,7 +109,7 @@ public class SpFlowOperRelationController extends BaseController { * @param spFlowDto 流程与工序DTO * @return 执行结果 */ - @ApiOperation("主数据表头修改") + @ApiOperation("流程与工序关系管理新增+修改") @PostMapping("/add-or-update") @ResponseBody public Result addOrUpdate(@RequestBody SpFlowDto spFlowDto) throws Exception { diff --git a/mes/src/main/java/com/wangziyang/mes/basedata/mapper/SpFlowOperRelationMapper.java b/mes/src/main/java/com/wangziyang/mes/basedata/mapper/SpFlowOperRelationMapper.java index 311d807..2898400 100644 --- a/mes/src/main/java/com/wangziyang/mes/basedata/mapper/SpFlowOperRelationMapper.java +++ b/mes/src/main/java/com/wangziyang/mes/basedata/mapper/SpFlowOperRelationMapper.java @@ -18,9 +18,15 @@ import java.util.List; public interface SpFlowOperRelationMapper extends BaseMapper { /** * 根据流程ID查询下挂的全部工序 - * + * @param flowId 流程关联ID * @return 工序关系集合 */ List queryOperRelationByFlowId(@Param("flowId") String flowId); + /** + * 删除流程下挂的全部工序 + * @param flowId 流程关联ID + */ + void deleteOperRelationByFlowId(@Param("flowId") String flowId); + } diff --git a/mes/src/main/java/com/wangziyang/mes/basedata/service/impl/SpFlowOperRelationServiceImpl.java b/mes/src/main/java/com/wangziyang/mes/basedata/service/impl/SpFlowOperRelationServiceImpl.java index 9006e53..2bf8f92 100644 --- a/mes/src/main/java/com/wangziyang/mes/basedata/service/impl/SpFlowOperRelationServiceImpl.java +++ b/mes/src/main/java/com/wangziyang/mes/basedata/service/impl/SpFlowOperRelationServiceImpl.java @@ -102,7 +102,11 @@ public class SpFlowOperRelationServiceImpl extends ServiceImpl"); + if (i == 0) { + processBuild.append(oper.getOperDesc()); + } else { + processBuild.append("->" + oper.getOperDesc()); + } spFlowOperRelationList.add(relation); } log.info("本次流程时序" + processBuild.toString()); spFlow.setProcess(processBuild.toString()); - //保存流程头表信息 + //更细流程头表信息 iSpFlowService.saveOrUpdate(spFlow); saveOrUpdateBatch(spFlowOperRelationList); return Result.success(); diff --git a/mes/src/main/resources/mapper/basedata/SpFlowOperRelationMapper.xml b/mes/src/main/resources/mapper/basedata/SpFlowOperRelationMapper.xml index 1ccd439..6d22ea7 100644 --- a/mes/src/main/resources/mapper/basedata/SpFlowOperRelationMapper.xml +++ b/mes/src/main/resources/mapper/basedata/SpFlowOperRelationMapper.xml @@ -20,5 +20,11 @@ ORDER BY sort_num + + delete from sp_flow_oper_relation + + flow_id = #{flowId} + + diff --git a/mes/src/main/resources/static/css/public.css b/mes/src/main/resources/static/css/public.css index 90ab2cc..e5b5941 100644 --- a/mes/src/main/resources/static/css/public.css +++ b/mes/src/main/resources/static/css/public.css @@ -30,7 +30,7 @@ body { } .splayui-form .layui-form-item > .layui-form-label { - width: 120px !important; + /*width: 120px !important;*/ } .splayui-form > .layui-form-item > .layui-input-block { diff --git a/mes/src/main/resources/templates/basedata/flowprocess/addOrUpdate.ftl b/mes/src/main/resources/templates/basedata/flowprocess/addOrUpdate.ftl index bb4d1aa..13fbcda 100644 --- a/mes/src/main/resources/templates/basedata/flowprocess/addOrUpdate.ftl +++ b/mes/src/main/resources/templates/basedata/flowprocess/addOrUpdate.ftl @@ -2,7 +2,7 @@ - 添加用户 + 工序与流程关系 -
- -
- -
+ +
+
+ +
+
-
+
流程与工序关系