From b3fee56bb9725afcfbce8b4fe891db6c15cde55c Mon Sep 17 00:00:00 2001 From: zhangzq Date: Tue, 21 May 2024 13:54:55 +0800 Subject: [PATCH] =?UTF-8?q?rev:=E5=85=A5=E5=BA=93=E5=8D=95=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/flow_manage/event/FlowStartEvent.java | 25 ++++++--- .../execution/ExecutionController.java | 6 +-- .../behavior/FlowNodeActivityBehavior.java | 8 +-- .../behavior/impl/FormActivityBehavior.java | 36 +++++++------ .../impl/ServerTaskActivityBehavior.java | 13 ++--- .../flow/framework/entity/ExecutionDto.java | 41 ++++---------- .../framework/entity/ExecutionEntity.java | 53 ++++++++++++++----- .../nodeType/excess/impl/MappingHandler.java | 29 ++++++---- .../service/execution/dto/ExecutionQuery.java | 2 + .../impl/ActRuExecutionServiceImpl.java | 7 +-- .../impl/FlowOperationServiceImpl.java | 6 +-- .../service/impl/MdGruopDickServiceImpl.java | 12 +++-- .../service/impl/PmFormDataServiceImpl.java | 18 ++++--- .../wms/config_manage/formStruc/index.vue | 32 +++++------ .../wms/early_manage/deferral_early/index.vue | 20 +++---- .../wms/early_manage/early_data/index.vue | 20 +++---- .../wms/early_manage/early_inv/index.vue | 8 +-- .../act/execution/curdExecution.js | 9 +++- .../wms/flow_manage/act/execution/index.vue | 30 ++++++++--- .../wms/md_manage/group_dick/AddDialog.vue | 27 ++++++++-- .../group_dick/group_config/index.vue | 12 ++--- .../views/wms/md_manage/group_dick/index.vue | 13 +++-- .../wms/pm_manage/form_data/FormDialog.vue | 11 +++- 23 files changed, 267 insertions(+), 171 deletions(-) diff --git a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/event/FlowStartEvent.java b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/event/FlowStartEvent.java index fbc8fcc4..5cc57891 100644 --- a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/event/FlowStartEvent.java +++ b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/event/FlowStartEvent.java @@ -7,6 +7,7 @@ import org.nl.wms.flow_manage.flow.framework.entity.ExecutionDto; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.function.Consumer; /* @@ -29,24 +30,34 @@ public class FlowStartEvent extends PublishEvent { return model_key; } - public FlowStartEvent build(String form_type, String form_id, JSONObject data){ + public FlowStartEvent build(String form_type, String form_id,String source_form_type,String source_form_id, JSONObject data){ if (dto == null){ - dto = ExecutionDto.builder().form_id(form_id).form_type(form_type).t(data).build(); + dto = ExecutionDto.builder() + .form_id(form_id) + .form_type(form_type) + .source_form_type(source_form_type) + .source_form_id(source_form_id) + .t(data).build(); } return this; } - public FlowStartEvent build(String form_type,List ids, List datas){ + public FlowStartEvent build(String form_type, List datas){ if (dto == null){ throw new BadRequestException("主数据参数未构建"); } List item =new ArrayList(); - for (int i = 0; i < ids.size(); i++) { - String id = ids.get(i); - JSONObject data = datas.get(i); - ExecutionDto build = ExecutionDto.builder().form_id(id).form_type(form_type).t(data).build(); + for (Map data : datas) { + String form_id = (String)data.get("form_id"); + String source_form_id = (String)data.get("source_form_id"); + String source_form_type = (String)data.get("source_form_type"); + JSONObject data_json = (JSONObject)data.get("t"); + ExecutionDto build = ExecutionDto.builder() + .form_id(form_id) + .form_type(form_type).source_form_id(source_form_id).source_form_type(source_form_type).t(data_json).build(); item.add(build); } dto.setItem(item); + return this; } diff --git a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/controller/execution/ExecutionController.java b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/controller/execution/ExecutionController.java index 431907c7..ab8a47ff 100644 --- a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/controller/execution/ExecutionController.java +++ b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/controller/execution/ExecutionController.java @@ -74,9 +74,9 @@ public class ExecutionController { return new ResponseEntity<>(flowOperationService.startFormFlow(startProcessInstanceVo), HttpStatus.OK); } - @GetMapping(value = "/confirm") - public ResponseEntity flowConfirm(String inst_id) { - return new ResponseEntity<>(flowOperationService.flowConfirm(inst_id,null), HttpStatus.OK); + @GetMapping(value = "/confirm/{proc_inst_id}") + public ResponseEntity flowConfirm(@PathVariable String proc_inst_id) { + return new ResponseEntity<>(flowOperationService.flowConfirm(proc_inst_id,null), HttpStatus.OK); } @GetMapping(value = "/queryByParentId/{id}") diff --git a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/framework/engine/behavior/FlowNodeActivityBehavior.java b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/framework/engine/behavior/FlowNodeActivityBehavior.java index 23828664..0df72bca 100644 --- a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/framework/engine/behavior/FlowNodeActivityBehavior.java +++ b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/framework/engine/behavior/FlowNodeActivityBehavior.java @@ -38,6 +38,7 @@ public abstract class FlowNodeActivityBehavior { public final void activity(ExecutionEntity entity) { try { //当前节点 + log.info("流程:{},开始流程数据:{}", entity.getActivityName(),JSONObject.toJSONString(entity.getT())); if (StringUtils.isNotEmpty(entity.getProc_inst_id())){ iActRuExecutionService.update(new UpdateWrapper() .eq("proc_inst_id",entity.getProc_inst_id()) @@ -47,14 +48,15 @@ public abstract class FlowNodeActivityBehavior { .set("form_id", entity.getForm_id()) .set("remark", "") .set("status", StatusEnum.FLOW_STATUS.code("启动")) - .set("form_data", JSONObject.toJSON(entity.getT()).toString()) + .set("form_data", entity.getT().toString()) .set("update_time", DateUtil.now())); } this.execute(entity); + log.info("流程:{},结束流程数据:{}", entity.getActivityName(), JSONObject.toJSONString(entity.getT())); iActRuExecutionService.update(new UpdateWrapper() .eq("proc_inst_id",entity.getProc_inst_id()) .set("status", StatusEnum.FLOW_STATUS.code("节点完成")) - .set("form_data", JSONObject.toJSON(entity.getT()).toString()) + .set("form_data", entity.getT().toString()) .set("form_type",entity.getForm_type()) .set("update_time", DateUtil.now())); this.leaveActivity(entity); @@ -78,7 +80,7 @@ public abstract class FlowNodeActivityBehavior { historyEntity.setActivity_name(entity.getActivityName()); historyEntity.setForm_type(entity.getForm_type()); historyEntity.setForm_id(entity.getForm_id()); - historyEntity.setForm_data((JSONObject) JSONObject.toJSON(entity.getT())); + historyEntity.setForm_data((JSONObject) entity.getT()); historyEntity.setUpdate_time(DateUtil.now()); history.save(historyEntity); this.leave(entity); diff --git a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/framework/engine/behavior/impl/FormActivityBehavior.java b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/framework/engine/behavior/impl/FormActivityBehavior.java index c41be14d..3fb75c54 100644 --- a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/framework/engine/behavior/impl/FormActivityBehavior.java +++ b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/framework/engine/behavior/impl/FormActivityBehavior.java @@ -1,6 +1,7 @@ package org.nl.wms.flow_manage.flow.framework.engine.behavior.impl; import cn.hutool.core.date.DateUtil; +import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; @@ -75,33 +76,38 @@ public class FormActivityBehavior extends FlowNodeActivityBehavior { if (typeHandler==null){ throw new BadRequestException("【flow】当前节点处理类型未定义"); } - JSONObject handler = typeHandler.handler(currentNode.getSkipExpression(), entity.getT(), targetStruc); + JSONObject handler = typeHandler.handler(currentNode.getSkipExpression(), entity.getT() , targetStruc); //该参数里包含三部分:主数据基础字段,组数据自定义及明细, //明细:基础字段,组数据自定义及参数: //TODO:id,code等非映射字段后续可以通过SpringEL表达式生成 - handler.put("id",IdUtil.getStringId()); - handler.put("create_time",DateUtil.now()); - handler.put("create_id",SecurityUtils.getCurrentUserId()); - handler.put("status",StatusEnum.FORM_STATUS.code("生成")); - handler.put("code",CodeUtil.getNewCode("IO_CODE")); - StIvtIostorinvIn mst = handler.toJavaObject(StIvtIostorinvIn.class); + JSONObject mst_json = handler.getJSONObject("t"); + mst_json.put("id",IdUtil.getStringId()); + mst_json.put("create_time",DateUtil.now()); + mst_json.put("create_id",SecurityUtils.getCurrentUserId()); + mst_json.put("status",StatusEnum.FORM_STATUS.code("生成")); + mst_json.put("code",CodeUtil.getNewCode("IO_CODE")); + StIvtIostorinvIn mst = mst_json.toJavaObject(StIvtIostorinvIn.class); + handler.put("form_id",mst.getId()); - JSONArray itemArr = handler.getJSONArray("item"); - if(itemArr !=null){ + Object item = mst_json.remove("item"); + if(item !=null){ + JSONArray itemArr = (JSONArray) item; for (int i = 0; i < itemArr.size(); i++) { JSONObject dtl = itemArr.getJSONObject(i); - dtl.put("inv_id",mst.getId()); - dtl.put("status",StatusEnum.FORM_STATUS.code("生成")); - dtl.put("id",IdUtil.getStringId()); - StIvtIostorinvdtlIn iostorinvdtl= dtl.toJavaObject(StIvtIostorinvdtlIn.class); + JSONObject dtl_json = dtl.getJSONObject("t"); + dtl_json.put("inv_id",mst.getId()); + dtl_json.put("status",StatusEnum.FORM_STATUS.code("生成")); + dtl_json.put("id",IdUtil.getStringId()); + StIvtIostorinvdtlIn iostorinvdtl= dtl_json.toJavaObject(StIvtIostorinvdtlIn.class); iostorinvdtlService.save(iostorinvdtl); + dtl.put("form_id",iostorinvdtl.getId()); } } iostorinvService.save(mst); entity.setT(handler); - entity.setForm_id(mst.getId()); - entity.setForm_type(currentNode.getForm_type()); + entity.setForm_id(entity.getForm_id()); + entity.setForm_type(entity.getForm_type()); } } } diff --git a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/framework/engine/behavior/impl/ServerTaskActivityBehavior.java b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/framework/engine/behavior/impl/ServerTaskActivityBehavior.java index 8ac62ebd..c7acc7c1 100644 --- a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/framework/engine/behavior/impl/ServerTaskActivityBehavior.java +++ b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/framework/engine/behavior/impl/ServerTaskActivityBehavior.java @@ -21,18 +21,19 @@ import org.springframework.util.CollectionUtils; public class ServerTaskActivityBehavior extends FlowNodeActivityBehavior { @Override public void execute(ExecutionEntity entity) { - System.out.println(entity.getForm_id()); + String form_id = entity.getForm_id(); + String form_type = entity.getForm_type(); FlowElement element = entity.getCurrentFlowElement(); ServerTask currentNode = (ServerTask) element; if (!CollectionUtils.isEmpty(currentNode.getSkipExpression())) { - TypeHandler> typeHandler = TypeHandler.HANDLER_MAP.get(currentNode.getCategory()); + TypeHandler typeHandler = TypeHandler.HANDLER_MAP.get(currentNode.getCategory()); if (typeHandler == null) { throw new BadRequestException("【flow】当前节点处理类型未定义"); } - ExecutionDto result = typeHandler.handler(currentNode.getSkipExpression(), entity, null); - entity.setT(result.getT()); - entity.setForm_id(result.getForm_id()); - entity.setForm_type(currentNode.getForm_type()); + JSONObject handler = typeHandler.handler(currentNode.getSkipExpression(), entity.getT(), null); + entity.setT(handler); + entity.setForm_id(form_id); + entity.setForm_type(form_type); } } } diff --git a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/framework/entity/ExecutionDto.java b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/framework/entity/ExecutionDto.java index bd32873d..ee36a691 100644 --- a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/framework/entity/ExecutionDto.java +++ b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/framework/entity/ExecutionDto.java @@ -18,6 +18,7 @@ import java.util.List; */ @AllArgsConstructor @Builder +@Data public class ExecutionDto { /** * 表单id @@ -27,6 +28,14 @@ public class ExecutionDto { * 单据类型 */ private String form_type; + /** + * 源单id + */ + private String source_form_id; + /** + * 源单类型 + */ + private String source_form_type; /** * 主数据 */ @@ -36,36 +45,4 @@ public class ExecutionDto { */ private List item; - /** - * 获取数据时:合并主表明细表 - * @return - */ - public JSONObject getT() { - t.put("item",item); - return t; - } - - public void setT(JSONObject t) { - this.t = t; - } - - public void setItem(List item) { - this.item = item; - } - - public String getForm_id() { - return form_id; - } - - public void setForm_id(String form_id) { - this.form_id = form_id; - } - - public String getForm_type() { - return form_type; - } - - public void setForm_type(String form_type) { - this.form_type = form_type; - } } diff --git a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/framework/entity/ExecutionEntity.java b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/framework/entity/ExecutionEntity.java index 6caaecca..50eb137f 100644 --- a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/framework/entity/ExecutionEntity.java +++ b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/framework/entity/ExecutionEntity.java @@ -15,29 +15,45 @@ import java.util.function.Consumer; */ @Getter public class ExecutionEntity implements Cloneable{ - @Override - public Object clone() { - try { - return super.clone(); - }catch (Exception ex){ - throw new BadRequestException(ex.getMessage()); - } - - } + /** + * 当前流程节点 + */ protected FlowElement currentFlowElement; - //用于获取当前流程实例对象 + /** + * 对应流程实例id + */ protected String proc_inst_id; - //父流程实例id + /** + * 父流程id + */ protected String parent_id; - //当前流程id=currentFlowElement.getId() + /** + * 开始流程id + */ protected String startActivityId; + /** + * 当前流程id + */ protected String activityId; + /** + * 流程节点名称 + */ protected String activityName; + /** + * 流程部署id + */ protected String deploymentId; + /** + * 源单类型 + */ protected String form_type; - protected BmFormStruc form_struc; + /** + * 源单id + */ protected String form_id; + protected BmFormStruc form_struc; + //回调执行 protected Consumer callback = null; @@ -84,4 +100,15 @@ public class ExecutionEntity implements Cloneable{ public void setCallback(Consumer callback) { this.callback = callback; } + + @Override + public Object clone() { + try { + return super.clone(); + }catch (Exception ex){ + throw new BadRequestException(ex.getMessage()); + } + + } + } diff --git a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/framework/process/nodeType/excess/impl/MappingHandler.java b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/framework/process/nodeType/excess/impl/MappingHandler.java index ad5a9bbc..8c4718b7 100644 --- a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/framework/process/nodeType/excess/impl/MappingHandler.java +++ b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/framework/process/nodeType/excess/impl/MappingHandler.java @@ -31,9 +31,12 @@ public class MappingHandler extends TypeHandler { @Override public JSONObject handler(List param, JSONObject data, BmFormStruc form_struc) { //数据平铺 - JSONObject forms = data.getJSONObject("form_data"); + JSONObject sourceFormData = new JSONObject(data.getJSONObject("t")); + String souceFromId = data.getString("form_id"); + String souceFromType = data.getString("form_type"); + JSONObject forms = sourceFormData.getJSONObject("form_data"); if (forms!=null){ - data.putAll(forms); + sourceFormData.putAll(forms); } //数据字段列表 List fields = ListOf.of(form_struc.getBiz_code() @@ -45,13 +48,13 @@ public class MappingHandler extends TypeHandler { , form_struc.getVehicle_code() , form_struc.getQty()); //查询目标表字段 - JSONObject returnObj = new JSONObject(); + JSONObject t = new JSONObject(); //基础字段映射:如果只有一个就不迭代 JSONObject mapping = JSONObject.parseObject(param.size()==1?param.get(0):param.remove(0)); for (String field : fields) { if (field!=null){ - String value = data.getString(mapping.getString(field)); - returnObj.put(field,value); + String value = sourceFormData.getString(mapping.getString(field)); + t.put(field,value); } } //查询表单配置表,获取自定义json:自定义字段参数获取 @@ -61,14 +64,14 @@ public class MappingHandler extends TypeHandler { for (String item : form_param.keySet()) { String mappingConfig = mapping.getString(item); if (StringUtils.isNotEmpty(mappingConfig)){ - String value = data.getString(mappingConfig); + String value = sourceFormData.getString(mappingConfig); form_data.put(item,value); } } - returnObj.put("form_data",form_data); + t.put("form_data",form_data); } JSONArray item = data.getJSONArray("item"); - BmFormStruc item_struc = iBmFormStrucService.getOne(new QueryWrapper().eq("parent_id",form_struc.getForm_type())); + BmFormStruc item_struc = iBmFormStrucService.getOne(new QueryWrapper().eq("parent_id",form_struc.getId())); if (item!=null){ //暂定:强制校验 if (item_struc == null){ @@ -78,8 +81,14 @@ public class MappingHandler extends TypeHandler { for (int i = 0; i < item.size(); i++) { itemList.add(this.handler(param, item.getJSONObject(i), item_struc)); } - returnObj.put("item",itemList); + t.put("item",itemList); } - return returnObj; + JSONObject resultT = new JSONObject(); + resultT.put("form_type",form_struc.getForm_type()); + resultT.put("form_id",""); + resultT.put("source_form_type",souceFromType); + resultT.put("source_form_id",souceFromId); + resultT.put("t",t); + return resultT; } } diff --git a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/service/execution/dto/ExecutionQuery.java b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/service/execution/dto/ExecutionQuery.java index 9df601d8..02963a8c 100644 --- a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/service/execution/dto/ExecutionQuery.java +++ b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/service/execution/dto/ExecutionQuery.java @@ -17,6 +17,8 @@ public class ExecutionQuery extends BaseQuery { private String search; + private String proc_inst_id; + @Override public void paramMapping() { super.doP.put("name", QParam.builder().k(new String[]{"name"}).type(QueryTEnum.LK).build()); diff --git a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/service/execution/impl/ActRuExecutionServiceImpl.java b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/service/execution/impl/ActRuExecutionServiceImpl.java index 19755e26..d0f000c8 100644 --- a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/service/execution/impl/ActRuExecutionServiceImpl.java +++ b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/service/execution/impl/ActRuExecutionServiceImpl.java @@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.util.ObjectUtil; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.nl.common.TableDataInfo; import org.nl.common.domain.entity.PageQuery; @@ -37,9 +38,9 @@ public class ActRuExecutionServiceImpl extends ServiceImpl lqw = new LambdaQueryWrapper<>(); - lqw.isNull(ActRuExecution::getParent_id); - Page executionPage = this.page(page.build(), lqw); + QueryWrapper build = (QueryWrapper)query.build(); + build.isNull("parent_id"); + Page executionPage = this.page(page.build(), build); List records = executionPage.getRecords(); this.findChildren(records); return TableDataInfo.build(executionPage); diff --git a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/service/execution/impl/FlowOperationServiceImpl.java b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/service/execution/impl/FlowOperationServiceImpl.java index 6a34b1b1..f0724f8d 100644 --- a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/service/execution/impl/FlowOperationServiceImpl.java +++ b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/service/execution/impl/FlowOperationServiceImpl.java @@ -58,10 +58,10 @@ public class FlowOperationServiceImpl implements IFlowOperationService { //创建流程参数ExecutionEntity:执行流程 ExecutionEntity entity = new ExecutionEntity(); entity.setCurrentFlowElement(bpmnModel.getStartEvent()); - entity.setT(dto.getT()); + entity.setT(JSONObject.toJSON(dto)); entity.setCallback(callback); - entity.setForm_type(dto.getForm_type()); - entity.setForm_id(dto.getForm_id()); + entity.setForm_type(dto.getSource_form_type()); + entity.setForm_id(dto.getSource_form_id()); entity.setStartActivityId(entity.getActivityId()); entity.setDeploymentId(deployment.getDeployment_id()); commandExecutor.execute(new StartInstanceCmd(),entity); diff --git a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/md_manage/group_dick/service/impl/MdGruopDickServiceImpl.java b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/md_manage/group_dick/service/impl/MdGruopDickServiceImpl.java index f689c017..dc929ac8 100644 --- a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/md_manage/group_dick/service/impl/MdGruopDickServiceImpl.java +++ b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/md_manage/group_dick/service/impl/MdGruopDickServiceImpl.java @@ -11,6 +11,7 @@ import org.nl.common.domain.entity.PageQuery; import org.nl.common.publish.BussEventMulticaster; import org.nl.common.utils.CodeUtil; import org.nl.common.utils.IdUtil; +import org.nl.common.utils.MapOf; import org.nl.common.utils.SecurityUtils; import org.nl.wms.base_manage.vehicle.vehicleMater.service.IMdPbVehicleMaterService; import org.nl.wms.base_manage.vehicle.vehicleMater.service.dao.MdPbVehicleMater; @@ -84,7 +85,7 @@ public class MdGruopDickServiceImpl extends ServiceImpl items = new ArrayList<>(); List vehicleMaters = new ArrayList<>(); - List dtlJson = new ArrayList<>(); + List dtlJson = new ArrayList<>(); if (!CollectionUtils.isEmpty(forms)){ for (int i = 0; i < tableData.size(); i++) { Map item = tableData.get(i); @@ -97,7 +98,10 @@ public class MdGruopDickServiceImpl extends ServiceImpl) proc_inst_id -> { self.update(new UpdateWrapper() .set("proc_inst_id",proc_inst_id).eq("id",mdGroupMst.getId())); }) - .build("md_group_dick",mdGroupMst.getId(),forms) - .build("md_group_dtl",items.stream().map(MdGruopDtl::getId).collect(Collectors.toList()), dtlJson) + .build("md_group_dick",mdGroupMst.getId(),mdGroupMst.getSource_form_type(),mdGroupMst.getSource_form_id(),forms) + .build("md_group_dtl",dtlJson) ,true); } diff --git a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/pm_manage/form_data/service/impl/PmFormDataServiceImpl.java b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/pm_manage/form_data/service/impl/PmFormDataServiceImpl.java index 28bdfb90..a72d4d46 100644 --- a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/pm_manage/form_data/service/impl/PmFormDataServiceImpl.java +++ b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/pm_manage/form_data/service/impl/PmFormDataServiceImpl.java @@ -191,15 +191,17 @@ public class PmFormDataServiceImpl extends ServiceImpl - + @@ -98,13 +98,13 @@ - - + + - - + + @@ -115,8 +115,8 @@ - - + + @@ -171,10 +171,10 @@ - - - - + + + + @@ -223,10 +223,10 @@ const defaultForm = { form_desc: null, create_time: null, create_id: null, - bus_id: null, - bus_code: null, - bus_date: null, - bus_status: null, + biz_id: null, + biz_code: null, + biz_date: null, + biz_status: null, material_id: null, qty: null, pcsn: null, diff --git a/wms_pro/qd/src/views/wms/early_manage/deferral_early/index.vue b/wms_pro/qd/src/views/wms/early_manage/deferral_early/index.vue index 3ceeea89..f10545ad 100644 --- a/wms_pro/qd/src/views/wms/early_manage/deferral_early/index.vue +++ b/wms_pro/qd/src/views/wms/early_manage/deferral_early/index.vue @@ -89,12 +89,12 @@ - + - + @@ -106,7 +106,7 @@ - + @@ -153,9 +153,9 @@ - - - + + + @@ -204,10 +204,10 @@ const defaultForm = { form_desc: null, create_time: null, create_id: null, - bus_id: null, - bus_code: null, - bus_date: null, - bus_status: null, + biz_id: null, + biz_code: null, + biz_date: null, + biz_status: null, material_id: null, qty: null, pcsn: null, diff --git a/wms_pro/qd/src/views/wms/early_manage/early_data/index.vue b/wms_pro/qd/src/views/wms/early_manage/early_data/index.vue index 5f180c06..cc5a2d81 100644 --- a/wms_pro/qd/src/views/wms/early_manage/early_data/index.vue +++ b/wms_pro/qd/src/views/wms/early_manage/early_data/index.vue @@ -94,12 +94,12 @@ - + - + @@ -111,7 +111,7 @@ - + @@ -158,9 +158,9 @@ - - - + + + @@ -209,10 +209,10 @@ const defaultForm = { form_desc: null, create_time: null, create_id: null, - bus_id: null, - bus_code: null, - bus_date: null, - bus_status: null, + biz_id: null, + biz_code: null, + biz_date: null, + biz_status: null, material_id: null, qty: null, pcsn: null, diff --git a/wms_pro/qd/src/views/wms/early_manage/early_inv/index.vue b/wms_pro/qd/src/views/wms/early_manage/early_inv/index.vue index ae8531e3..83e70a00 100644 --- a/wms_pro/qd/src/views/wms/early_manage/early_inv/index.vue +++ b/wms_pro/qd/src/views/wms/early_manage/early_inv/index.vue @@ -178,10 +178,10 @@ const defaultForm = { form_desc: null, create_time: null, create_id: null, - bus_id: null, - bus_code: null, - bus_date: null, - bus_status: null, + biz_id: null, + biz_code: null, + biz_date: null, + biz_status: null, material_id: null, qty: null, pcsn: null, diff --git a/wms_pro/qd/src/views/wms/flow_manage/act/execution/curdExecution.js b/wms_pro/qd/src/views/wms/flow_manage/act/execution/curdExecution.js index 6b8b1a72..14671bd7 100644 --- a/wms_pro/qd/src/views/wms/flow_manage/act/execution/curdExecution.js +++ b/wms_pro/qd/src/views/wms/flow_manage/act/execution/curdExecution.js @@ -75,6 +75,12 @@ export function changeActive(data) { data }) } +export function flowConfirm(inst_id) { + return request({ + url: 'api/bpmnExecution/confirm/'+inst_id, + method: 'get', + }) +} export default { add, @@ -86,5 +92,6 @@ export default { publish, queryByParentId, getDeploymentById, - changeActive + changeActive, + flowConfirm } diff --git a/wms_pro/qd/src/views/wms/flow_manage/act/execution/index.vue b/wms_pro/qd/src/views/wms/flow_manage/act/execution/index.vue index b7415e9d..46d5a86f 100644 --- a/wms_pro/qd/src/views/wms/flow_manage/act/execution/index.vue +++ b/wms_pro/qd/src/views/wms/flow_manage/act/execution/index.vue @@ -11,6 +11,15 @@ prefix-icon="el-icon-search" class="filter-item" /> + @@ -35,10 +44,13 @@ - + - + + + + @@ -90,9 +102,9 @@ - - - + + + @@ -100,7 +112,7 @@ v-permission="['admin','actDeModel:edit','actDeModel:del']" fixed="right" label="操作" - width="160px" + width="210px" align="center" > @@ -207,6 +220,11 @@ export default { this.$refs.viewCurrentFlowDesigner.showLogicFlowDesigner(res.model_editor_json, row); }) }, + flowConfirm(proc_inst_id) { + curdExecution.flowConfirm(proc_inst_id).then(res => { + crud.notify("操作成功", CRUD.NOTIFICATION_TYPE.SUCCESS) + }) + }, load(tree, treeNode, resolve) { setTimeout(() => { resolve(tree.children) diff --git a/wms_pro/qd/src/views/wms/md_manage/group_dick/AddDialog.vue b/wms_pro/qd/src/views/wms/md_manage/group_dick/AddDialog.vue index ea69b979..6e7a352d 100644 --- a/wms_pro/qd/src/views/wms/md_manage/group_dick/AddDialog.vue +++ b/wms_pro/qd/src/views/wms/md_manage/group_dick/AddDialog.vue @@ -195,7 +195,6 @@ const defaultForm = { update_name: '', update_time: '', status: '', - tableData: [], form_data: {} } @@ -263,7 +262,6 @@ export default { this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO) return true } - debugger this.form.item = this.tableData }, deleteRow(index, rows) { @@ -284,7 +282,29 @@ export default { }) this.form.child_qty = this.tableData.length }, - tableDtlMaterial2(rows) { + tableDtlMaterial2(data) { + debugger + let mst = data['t']; + let rows = data['item']; + this.form.source_form_type = mst.form_type + this.form.source_form_id = mst.id + let mst_form_data = mst.form_data; + + this.cols.forEach(a=>{ + let item = null + if (a.value in mst_form_data) { + item = mst_form_data[a.value]; + } + // let keys = Object.keys(mst_form_data); + // for (let i = 0; i < keys.length; i++) { + // let key = keys[i]; + // if (a.value == key) { + // item = mst_form_data[a.value]; + // break + // } + // } + this.$set(this.form.form_data,a.value,item) + }) rows.forEach((row) => { const data = {} data.material_name = row.material_name @@ -327,7 +347,6 @@ export default { }, unitFormatter(row) { - debugger if (row.unit_id!=null){ for (let i = 0; i < this.unitDict.length; i++) { let item = this.unitDict[i]; diff --git a/wms_pro/qd/src/views/wms/md_manage/group_dick/group_config/index.vue b/wms_pro/qd/src/views/wms/md_manage/group_dick/group_config/index.vue index b10f7958..b9412855 100644 --- a/wms_pro/qd/src/views/wms/md_manage/group_dick/group_config/index.vue +++ b/wms_pro/qd/src/views/wms/md_manage/group_dick/group_config/index.vue @@ -25,9 +25,9 @@ - - - + + + @@ -52,9 +52,9 @@ const defaultForm = { create_time: null, has_child: null, parent_id: null, - bus_id: null, - bus_code: null, - bus_date: null, + biz_id: null, + biz_code: null, + biz_date: null, status: null, material_id: null, qty: null, diff --git a/wms_pro/qd/src/views/wms/md_manage/group_dick/index.vue b/wms_pro/qd/src/views/wms/md_manage/group_dick/index.vue index d9524055..bab26dd8 100644 --- a/wms_pro/qd/src/views/wms/md_manage/group_dick/index.vue +++ b/wms_pro/qd/src/views/wms/md_manage/group_dick/index.vue @@ -139,14 +139,17 @@ import ViewDialog from '@/views/wms/md_manage/group_dick/ViewDialog' const defaultForm = { id: '', + code: '', parent_vehicle_code: '', - child_qty: '0', - remark: '0', + status: '', + source_form_id: '', + source_form_type: '', + remark: '', update_name: '', update_time: '', - status: '', - tableData: [], - form_data: null + create_time: '', + proc_inst_id: '', + form_data: {} } export default { name: 'DeliveryOrder', diff --git a/wms_pro/qd/src/views/wms/pm_manage/form_data/FormDialog.vue b/wms_pro/qd/src/views/wms/pm_manage/form_data/FormDialog.vue index 838dfbcd..a072c0af 100644 --- a/wms_pro/qd/src/views/wms/pm_manage/form_data/FormDialog.vue +++ b/wms_pro/qd/src/views/wms/pm_manage/form_data/FormDialog.vue @@ -53,6 +53,7 @@ @select="crud.selectChange" @select-all="crud.selectAllChange" @selection-change="crud.selectionChangeHandler" + @current-change="clickChange" > @@ -237,8 +238,11 @@ export default { // 处理单选 if (this.isSingle && this.tableRadio) { this.dialogVisible = false + let subData = {} + this.$set(subData, 't', this.form) + this.$set(subData, 'item', this.tableRadio) this.$emit('update:dialogShow', false) - this.$emit('setMaterValue', this.tableRadio) + this.$emit('setMaterValue', subData) return } this.rows = this.$refs.table.selection @@ -248,7 +252,10 @@ export default { } this.crud.resetQuery(false) this.$emit('update:dialogShow', false) - this.$emit('setMaterValue', this.rows[0].children) + let subData = {} + this.$set(subData, 't', this.rows[0]) + this.$set(subData, 'item', this.rows[0].children) + this.$emit('setMaterValue', subData) }, } }