yangys
2025-06-12 80a641659a361c9f55c57936daca0a1790f777d5
机床组改为字典
已修改10个文件
已添加1个文件
285 ■■■■ 文件已修改
blade-service/blade-mdm/src/main/java/org/springblade/mdm/basesetting/machine/entity/Machine.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
blade-service/blade-mdm/src/main/java/org/springblade/mdm/basesetting/machine/mapper/MachineMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
blade-service/blade-mdm/src/main/java/org/springblade/mdm/basesetting/machine/vo/MachineQueryVO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
blade-service/blade-mdm/src/main/java/org/springblade/mdm/basesetting/machine/vo/MachineSaveVO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
blade-service/blade-mdm/src/main/java/org/springblade/mdm/basesetting/machinegroup/controller/MachineGroupController.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/controller/DispatchController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/controller/MyFlowController.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/service/FlowBusinessService.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
blade-service/blade-mdm/src/main/resources/processesbpmn/dispatch.bpmn20.xml 92 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
blade-service/blade-mdm/src/main/resources/processesbpmn/program-cure.bpmn20.xml 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
doc/sql/mdm/mdm.all.create.sql 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
blade-service/blade-mdm/src/main/java/org/springblade/mdm/basesetting/machine/entity/Machine.java
@@ -13,9 +13,9 @@
    private String name;
    private String code;
    /**
     * æ‰€å±žæœºåºŠç»„ID
     * æ‰€å±žæœºåºŠç»„code,字典machine_group
      */
    private Long machineGroupId;
    private String machineGroupCode;
    /**
     * æœºå™¨è§„æ ¼:01车床/02铣床,在业务字典配置(key=machine_spec)
     */
blade-service/blade-mdm/src/main/java/org/springblade/mdm/basesetting/machine/mapper/MachineMapper.xml
@@ -14,8 +14,8 @@
        <result column="is_deleted" property="isDeleted"/>
    </resultMap>
    <select id="pageQuery" resultType="org.springblade.mdm.basesetting.machine.vo.MachineVO">
        select m.id,m.name,m.code,g.name group_name,m.machine_spec,m.manufacturer,m.operator
        from mdm_machine m join mdm_machine_group g on m.machine_group_id=g.id
        select m.id,m.name,m.code,g.dict_value group_name,m.machine_spec,m.manufacturer,m.operator
        from mdm_machine m join blade_dict_biz g on m.machine_group_code=g.dict_key and g.code='machine_group' and g.is_deleted=0
            ${ew.customSqlSegment}
    </select>
blade-service/blade-mdm/src/main/java/org/springblade/mdm/basesetting/machine/vo/MachineQueryVO.java
@@ -15,7 +15,7 @@
public class MachineQueryVO extends Query {
    @Schema(description = "名称或编码")
    private String keyword;
    @Schema(description = "机床组id")
    private Long machineGroupId;
    @Schema(description = "机床组code")
    private Long machineGroupCode;
}
blade-service/blade-mdm/src/main/java/org/springblade/mdm/basesetting/machine/vo/MachineSaveVO.java
@@ -12,9 +12,9 @@
    private String code;
    private String name;
    /**
     * æ‰€å±žæœºåºŠç»„ID
     * æ‰€å±žæœºåºŠç»„code,字典machine_group
     */
    private Long machineGroupId;
    private String machineGroupCode;
    /**
     * æœºå™¨è§„æ ¼:01车床/02铣床,在业务字典配置(key=machine_spec)
     */
blade-service/blade-mdm/src/main/java/org/springblade/mdm/basesetting/machinegroup/controller/MachineGroupController.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.v3.oas.annotations.Hidden;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
@@ -20,6 +21,7 @@
@RestController
@RequestMapping("/machinegroup")
@Tag(name = "机床组", description = "机床组")
@Hidden
public class MachineGroupController {
    @Autowired
blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/controller/DispatchController.java
@@ -1,6 +1,7 @@
package org.springblade.mdm.flow.controller;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.flowable.engine.TaskService;
@@ -38,9 +39,9 @@
        dispatcher.start(startVO);
        return R.<Boolean>status(true);
    }
    @Operation(summary = "完成任务", description = "流向下一个节点")
    @PostMapping("completeTask")
    public R<Void> completeTask(String taskId, String processInstanceId, String comment, @RequestBody Map<String, Object> variables) {
    public R<Void> completeTask(String taskId, String processInstanceId, String comment,@Parameter(name="variables",description = "任务变量")@RequestBody Map<String, Object> variables) {
        // å¢žåŠ è¯„è®º
        if (StringUtil.isNoneBlank(processInstanceId, comment)) {
            taskService.addComment(taskId, processInstanceId, comment);
blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/controller/MyFlowController.java
@@ -27,18 +27,47 @@
@RequestMapping("/flow/")
@Tag(name = "派工流程", description = "派工流程")
public class MyFlowController {
    @Autowired
    private TaskService taskService;
    @Autowired
    private FlowBusinessService businessService;
    /**
     * å¾…办事务列表页
     * å¾…办任务列表页
     */
    @GetMapping("todo-list")
    @ApiOperationSupport(order = 3)
    @Operation(summary = "我的流程", description = "传入流程信息")
    @Operation(summary = "待办任务", description = "传入流程信息")
    public R<IPage<BladeFlow>> todoList(@Parameter(description = "关键字") String keyword, Query query) {
        IPage<BladeFlow> pages = businessService.selectTodoPage(Condition.getPage(query), keyword);
        return R.data(pages);
    }
    /**
     * å¾…办任务列表页
     */
    @GetMapping("alltask-list")
    @ApiOperationSupport(order = 3)
    @Operation(summary = "所有任务(fortest)", description = "传入流程信息")
    public R<IPage<BladeFlow>> alltaskList(@Parameter(description = "关键字") String keyword, Query query) {
        IPage<BladeFlow> pages = businessService.selectAllTaskPage(Condition.getPage(query), keyword);
        return R.data(pages);
    }
    @Operation(summary = "转派任务", description = "")
    @PostMapping("transferTask")
    public R<Void> transferTask(String taskId,String newAssigneeId, String processInstanceId, String comment, @RequestBody Map<String, Object> variables) {
        // å¢žåŠ è¯„è®º
        if (StringUtil.isNoneBlank(processInstanceId, comment)) {
            taskService.addComment(taskId, processInstanceId, comment);
        }
        // éžç©ºåˆ¤æ–­
        if (Func.isEmpty(variables)) {
            variables = Kv.create();
        }
        // å®Œæˆä»»åŠ¡
        taskService.setAssignee(taskId, newAssigneeId);
        return R.success("流程转派成功");
    }
}
blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/service/FlowBusinessService.java
@@ -70,7 +70,7 @@
        String userId = ""+AuthUtil.getUserId();
        List<BladeFlow> flowList = new LinkedList<>();
        TaskQuery todoQuery = taskService.createTaskQuery().taskAssignee("1930600500876619777").active().includeProcessVariables();
        TaskQuery todoQuery = taskService.createTaskQuery().taskAssignee(userId).active().includeProcessVariables();
        if(Func.isNotEmpty(keyword)){
            todoQuery.or();
@@ -344,4 +344,42 @@
        return historyService.createHistoricProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
    }
    public IPage<BladeFlow> selectAllTaskPage(IPage<BladeFlow> page, String keyword) {
        List<BladeFlow> flowList = new LinkedList<>();
        TaskQuery todoQuery = taskService.createTaskQuery().active().includeProcessVariables();
        if(Func.isNotEmpty(keyword)){
            todoQuery.or();
            todoQuery.processVariableValueLike("processNo",keyword);
            todoQuery.processVariableValueLike("machineCode",keyword);
            todoQuery.processVariableValueLike("machineMode",keyword);
            todoQuery.processVariableValueLike("processName",keyword);
            todoQuery.processVariableValueLike("processEdition",keyword);
            todoQuery.processVariableValueLike("craftEdition",keyword);
            //TODO å¤šä¸ªå­—段都要匹配
            todoQuery.endOr();
        }
        todoQuery.orderByTaskCreateTime().desc();
        // æž„建列表数据
        BladeFlow bladeFlow = new BladeFlow();
        buildFlowTaskList(bladeFlow, flowList, todoQuery, "todo");//FlowEngineConstant.STATUS_TODO
        // è®¡ç®—总数
        long count = todoQuery.count();
        // è®¾ç½®é¡µæ•°
        page.setSize(count);
        // è®¾ç½®æ€»æ•°
        page.setTotal(count);
        // è®¾ç½®æ•°æ®
        page.setRecords(flowList);
        return page;
    }
}
blade-service/blade-mdm/src/main/resources/processesbpmn/dispatch.bpmn20.xml
@@ -7,11 +7,32 @@
    <userTask id="programmingTask" name="编制" flowable:assignee="${programmer}"/>
    <sequenceFlow id="sid-ac678e85-9f7b-4e8d-903f-2591ea7721ab" sourceRef="teamLeaderTask" targetRef="programmingTask"/>
    <userTask id="check" name="校对" flowable:assignee="${checker}"/>
    <sequenceFlow id="sid-6c33a84d-d03e-47f6-87c1-8e676b25e572" sourceRef="programmingTask" targetRef="check"/>
    <userTask id="approveTask" name="高师审批"/>
    <sequenceFlow id="sid-2e73fc3f-6802-4a94-984c-e1b9a50f8489" sourceRef="check" targetRef="approveTask"/>
    <sequenceFlow id="sid-6c33a84d-d03e-47f6-87c1-8e676b25e572" sourceRef="programmingTask" targetRef="programGateway"/>
    <userTask id="approveTask" name="高师审批" flowable:assignee="${senior}"/>
    <sequenceFlow id="toCheckApproveGateway" sourceRef="check" targetRef="checkApproveGateway" name="校对审批判断网关"/>
    <endEvent id="approveEnd" name="审批完成"/>
    <sequenceFlow id="sid-1a414739-a80f-4436-8d7a-e7b65fae8233" sourceRef="approveTask" targetRef="approveEnd"/>
    <sequenceFlow id="sid-1a414739-a80f-4436-8d7a-e7b65fae8233" sourceRef="approveTask" targetRef="seriorApproveGateway"/>
    <exclusiveGateway id="programGateway" name="编制完成判断网关"/>
    <sequenceFlow id="programingToCheck" sourceRef="programGateway" targetRef="check" name="编制完成给校对">
      <conditionExpression xsi:type="tFormalExpression">${approve=='Y'}</conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="programingBackToLeader" sourceRef="programGateway" targetRef="teamLeaderTask" name="编制驳回">
      <conditionExpression xsi:type="tFormalExpression">${approve=='N'}</conditionExpression>
    </sequenceFlow>
    <exclusiveGateway id="checkApproveGateway" name="校对审批判断网关"/>
    <sequenceFlow id="flowCheckToPrograming" sourceRef="checkApproveGateway" targetRef="programmingTask" name="flow校对驳回到编制">
      <conditionExpression xsi:type="tFormalExpression">${approve=='N'}</conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flowToSeriorTask" sourceRef="checkApproveGateway" targetRef="approveTask" name="到高师审批">
      <conditionExpression xsi:type="tFormalExpression">${approve=='Y'}</conditionExpression>
    </sequenceFlow>
    <exclusiveGateway id="seriorApproveGateway" name="高师判断网关"/>
    <sequenceFlow id="sid-c0b195e7-17e5-44bf-8115-8b7126cb3ab3" sourceRef="seriorApproveGateway" targetRef="approveEnd">
      <conditionExpression xsi:type="tFormalExpression">${approve=='Y'}</conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="sid-03430665-d042-46b3-ab65-5ecde104ce8e" sourceRef="seriorApproveGateway" targetRef="check">
      <conditionExpression xsi:type="tFormalExpression"/>
    </sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_dispatch">
    <bpmndi:BPMNPlane bpmnElement="dispatch" id="BPMNPlane_dispatch">
@@ -20,38 +41,71 @@
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="edge-5783eb04-78a8-4bde-b8bb-c12d28f07609" bpmnElement="sid-c1619263-d1ff-4106-9315-f9ab9a3bee71">
        <omgdi:waypoint x="-290.0" y="-92.5"/>
        <omgdi:waypoint x="-185.0" y="-75.0"/>
        <omgdi:waypoint x="-240.0" y="-92.5"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="shape-720b1ec1-043e-4a8a-bc4d-c50cf01678d7" bpmnElement="teamLeaderTask">
        <omgdc:Bounds x="-185.0" y="-115.0" width="100.0" height="80.0"/>
        <omgdc:Bounds x="-240.0" y="-125.0" width="70.0" height="65.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape-b1baea86-1882-4c5c-886f-44e3d9be3746" bpmnElement="programmingTask">
        <omgdc:Bounds x="-20.0" y="-115.0" width="100.0" height="80.0"/>
        <omgdc:Bounds x="-115.0" y="-122.5" width="85.0" height="60.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="edge-0079d499-1c0d-4745-9886-40df39794833" bpmnElement="sid-ac678e85-9f7b-4e8d-903f-2591ea7721ab">
        <omgdi:waypoint x="-85.0" y="-75.0"/>
        <omgdi:waypoint x="-20.0" y="-75.0"/>
        <omgdi:waypoint x="-170.0" y="-92.5"/>
        <omgdi:waypoint x="-115.0" y="-92.5"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="shape-9237838e-5de2-4db7-8d46-3f4a69de7e6e" bpmnElement="check">
        <omgdc:Bounds x="105.0" y="-115.0" width="100.0" height="80.0"/>
        <omgdc:Bounds x="85.0" y="-120.0" width="60.0" height="55.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="edge-72007fd8-6ed8-402f-8bbc-81bd6c856fa7" bpmnElement="sid-6c33a84d-d03e-47f6-87c1-8e676b25e572">
        <omgdi:waypoint x="80.0" y="-55.0"/>
        <omgdi:waypoint x="105.0" y="-95.0"/>
        <omgdi:waypoint x="-30.0" y="-77.5"/>
        <omgdi:waypoint x="-30.0" y="-15.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="shape-a42e90ff-9c82-4d5b-8f5b-0804754e89a6" bpmnElement="approveTask">
        <omgdc:Bounds x="15.0" y="16.0" width="100.0" height="80.0"/>
        <omgdc:Bounds x="130.0" y="1.0" width="50.0" height="45.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="edge-7fe1281a-3bbf-4308-90a5-cbf70aa019dd" bpmnElement="sid-2e73fc3f-6802-4a94-984c-e1b9a50f8489">
        <omgdi:waypoint x="130.0" y="-35.0"/>
        <omgdi:waypoint x="90.0" y="16.0"/>
      <bpmndi:BPMNEdge id="edge-7fe1281a-3bbf-4308-90a5-cbf70aa019dd" bpmnElement="toCheckApproveGateway">
        <omgdi:waypoint x="145.0" y="-92.5"/>
        <omgdi:waypoint x="240.0" y="-30.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="shape-f14acaf6-9747-4d52-87a1-d4c5b8f3d166" bpmnElement="approveEnd">
        <omgdc:Bounds x="205.0" y="41.0" width="30.0" height="30.0"/>
        <omgdc:Bounds x="245.0" y="51.0" width="30.0" height="30.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="edge-9cb8c108-2b94-4e39-b7ed-93ff0d86fe73" bpmnElement="sid-1a414739-a80f-4436-8d7a-e7b65fae8233">
        <omgdi:waypoint x="115.0" y="56.0"/>
        <omgdi:waypoint x="205.0" y="56.0"/>
        <omgdi:waypoint x="130.0" y="34.75"/>
        <omgdi:waypoint x="55.0" y="70.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="shape-b505d942-4475-416a-aec6-c02164e6ee05" bpmnElement="programGateway">
        <omgdc:Bounds x="-50.0" y="-15.0" width="40.0" height="40.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="edge-6f05f47f-7804-4dd0-b6d2-e435b9efaa3c" bpmnElement="programingToCheck">
        <omgdi:waypoint x="-10.0" y="5.0"/>
        <omgdi:waypoint x="85.0" y="-78.75"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge-b38a8021-a54d-4671-aaf2-408bdbbbd374" bpmnElement="programingBackToLeader">
        <omgdi:waypoint x="-50.0" y="5.0"/>
        <omgdi:waypoint x="-170.0" y="-76.25"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="shape-b113f604-a178-455b-9518-9f4953322948" bpmnElement="checkApproveGateway">
        <omgdc:Bounds x="220.0" y="-30.0" width="40.0" height="40.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="edge-c2232174-4a73-4c39-ac85-fc3854f0f18c" bpmnElement="flowCheckToPrograming">
        <omgdi:waypoint x="220.0" y="-10.0"/>
        <omgdi:waypoint x="-30.0" y="-92.5"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge-d05b5f9f-9108-4a41-9e48-4db1e1b1e325" bpmnElement="flowToSeriorTask">
        <omgdi:waypoint x="240.0" y="10.0"/>
        <omgdi:waypoint x="180.0" y="12.25"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="shape-6be62567-0538-4a4f-b3ce-e819d7182666" bpmnElement="seriorApproveGateway">
        <omgdc:Bounds x="35.0" y="70.0" width="40.0" height="40.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="edge-715efa53-6c03-407b-87ec-640f99c481a0" bpmnElement="sid-c0b195e7-17e5-44bf-8115-8b7126cb3ab3">
        <omgdi:waypoint x="75.0" y="90.0"/>
        <omgdi:waypoint x="245.0" y="73.5"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge-782277fd-866f-44d5-9046-af7c34c4b85c" bpmnElement="sid-03430665-d042-46b3-ab65-5ecde104ce8e">
        <omgdi:waypoint x="35.0" y="90.0"/>
        <omgdi:waypoint x="100.0" y="-65.0"/>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
blade-service/blade-mdm/src/main/resources/processesbpmn/program-cure.bpmn20.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:flowable="http://flowable.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.flowable.org/processdef">
  <process id="program-cure" name="固化流程" isExecutable="true">
    <startEvent id="sid-abe970b9-1bee-49a1-91b4-1184c47c10b7"/>
    <userTask id="sid-e9be5408-2827-4ee7-bee5-fda38a8f23e6"/>
    <sequenceFlow id="sid-910649a5-8dac-48a2-b42d-9f1132d61b26" sourceRef="sid-e9be5408-2827-4ee7-bee5-fda38a8f23e6" targetRef="sid-e9be5408-2827-4ee7-bee5-fda38a8f23e6"/>
    <sequenceFlow id="sid-09c7cf44-bb1a-40f4-b231-919afae5c02f" sourceRef="sid-abe970b9-1bee-49a1-91b4-1184c47c10b7" targetRef="sid-e9be5408-2827-4ee7-bee5-fda38a8f23e6"/>
    <endEvent id="end" name="固化结束"/>
    <userTask id="seniorApproveTask" name="高师审核"/>
    <sequenceFlow id="sid-8dd21f02-ac10-4318-b897-19b4cdc558c7" sourceRef="sid-e9be5408-2827-4ee7-bee5-fda38a8f23e6" targetRef="seniorApproveTask"/>
    <sequenceFlow id="sid-504610fe-2b87-4df4-8f42-f10c8bf3ce01" sourceRef="seniorApproveTask" targetRef="end"/>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_program-cure">
    <bpmndi:BPMNPlane bpmnElement="program-cure" id="BPMNPlane_program-cure">
      <bpmndi:BPMNShape id="shape-7fe43876-cd89-402e-aada-b7fe7d89e64a" bpmnElement="sid-abe970b9-1bee-49a1-91b4-1184c47c10b7">
        <omgdc:Bounds x="-215.0" y="-85.0" width="30.0" height="30.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape-702fceb1-2073-4a25-a94d-86c2392dfc6f" bpmnElement="sid-e9be5408-2827-4ee7-bee5-fda38a8f23e6">
        <omgdc:Bounds x="-110.0" y="-95.0" width="75.0" height="55.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="edge-fbb946ca-a477-4237-b78f-72cf4e0b8479" bpmnElement="sid-910649a5-8dac-48a2-b42d-9f1132d61b26">
        <omgdi:waypoint x="-110.0" y="-67.5"/>
        <omgdi:waypoint x="-110.0" y="-67.5"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge-53030742-9070-4825-949f-edc502019050" bpmnElement="sid-09c7cf44-bb1a-40f4-b231-919afae5c02f">
        <omgdi:waypoint x="-185.0" y="-77.5"/>
        <omgdi:waypoint x="-110.0" y="-81.25"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="shape-99ebb425-cb2f-45f3-93e2-4ca390bc8099" bpmnElement="end">
        <omgdc:Bounds x="190.0" y="-82.5" width="30.0" height="30.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape-b464ad8c-9ec6-4e35-bfa5-c062c91b646a" bpmnElement="seniorApproveTask">
        <omgdc:Bounds x="25.0" y="-95.0" width="65.0" height="35.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="edge-94601323-c6bd-48f8-94fd-f61c6b550126" bpmnElement="sid-8dd21f02-ac10-4318-b897-19b4cdc558c7">
        <omgdi:waypoint x="-35.0" y="-67.5"/>
        <omgdi:waypoint x="25.0" y="-68.75"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge-b93559c6-90f6-46e1-a6e6-4b0a2a5bc33b" bpmnElement="sid-504610fe-2b87-4df4-8f42-f10c8bf3ce01">
        <omgdi:waypoint x="90.0" y="-68.75"/>
        <omgdi:waypoint x="190.0" y="-67.5"/>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>
doc/sql/mdm/mdm.all.create.sql
@@ -20,7 +20,7 @@
  `code` varchar(100) NOT NULL COMMENT '机床编号',
  `name` varchar(100) NOT NULL COMMENT '机床描述/型号',
  `avatar` varchar(400) DEFAULT NULL COMMENT '图片地址',
  `machine_group_id` bigint NOT NULL COMMENT '所属机床组ID',
  `machine_group_code` varchar(255) NOT NULL COMMENT '所属机床组代码,,在业务字典配置(key=machine_group)',
  `machine_spec` varchar(20) DEFAULT NULL COMMENT '机器规格:01车床/02铣床,在业务字典配置(key=machine_spec)',
  `operator` varchar(100)  COMMENT '操作员,文本录入',
  `owner_dept` bigint DEFAULT NULL COMMENT '所属单位/组织',
@@ -60,25 +60,63 @@
    UNIQUE KEY `uniqueCheckIndex` (`team_leader_id`,`programmer_id`,`checker_id`,`senior_id`,`is_deleted`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_general_ci  ROW_FORMAT=DYNAMIC COMMENT='主制计划表';
CREATE TABLE `mdm_nc_node` (
          `id` bigint NOT NULL,
          `tenant_id` varchar(6) DEFAULT NULL COMMENT '所属租户',
          `name` varchar(100) NOT NULL COMMENT '节点名称',
          `parent_id` bigint DEFAULT NULL COMMENT '所属机床组ID',
          `node_type` varchar(20) DEFAULT NULL COMMENT '节点类型:PRODUCT_MODEL(产品型号)/PARTS_NO(零组件号)/CRAFT_EDITION(工艺版次)/PROCESS_NO(工序号)/MACHINE(机床)/PACKAGE(程序包名)/PROGRAME(程序文件)',
          `status` int DEFAULT NULL COMMENT '业务状态',
          `create_dept` bigint DEFAULT NULL COMMENT '创建单位',
          `is_deleted` int DEFAULT NULL,
          `create_time` datetime DEFAULT NULL COMMENT '创建时间',
          `create_user` bigint DEFAULT NULL COMMENT '创建人',
          `update_time` datetime DEFAULT NULL COMMENT '更新时间',
          `update_user` bigint DEFAULT NULL COMMENT '更新人'
  PRIMARY KEY (`id`) USING BTREE,
                                  UNIQUE KEY `uniqueCodeIndex` (`code`,`is_deleted`) USING BTREE,
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='程序节点目录';
CREATE TABLE `mdm_nc_program` (
  `id` bigint NOT NULL,
  `tenant_id` varchar(6) DEFAULT NULL COMMENT '所属租户',
  `nc_node_id` bigint DEFAULT NULL COMMENT '所属节点id',
  `code` varchar(100) NOT NULL COMMENT '程序编号',
  `name` varchar(100) NOT NULL COMMENT '程序名称',
  `machine_group_id` bigint DEFAULT NULL COMMENT '所属机床组ID',
  `flow_task_id` bigint DEFAULT NULL COMMENT '任务ID,接收下发任务时确定的任务id,非流程示例id',
  `package_name` varchar(100) NOT NULL COMMENT '程序包名',
  `machine_code` bigint DEFAULT NULL COMMENT '设备编号/机床编号',
  `is_cured` int DEFAULT NULL COMMENT '是否固化,1是;0否',
  `expire_date` date DEFAULT NULL COMMENT '到期时间,根据有效期时长计算而来',
  `process_edition` varchar(40) DEFAULT NULL COMMENT '工序版次,升版就是变更改该字段,需要保留历史记录',
  `is_last_edition` int NOT NULL COMMENT '是否最新版次,1:最新版次;0:历史版次,主要取该字段=1的数据,0是历史版次',
  `is_locked` int DEFAULT NULL COMMENT '锁定状态,1:锁定;0:正常',
  `status` int DEFAULT NULL COMMENT '业务状态',
  `create_dept` bigint DEFAULT NULL COMMENT '创建单位',
  `is_deleted` int DEFAULT NULL,
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `update_user` bigint DEFAULT NULL COMMENT '更新人'
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uniqueCodeIndex` (`code`,`is_deleted`) USING BTREE,
  `update_user` bigint DEFAULT NULL COMMENT '更新人',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='数控程序';
CREATE TABLE `mdm_nc_program_file` (
  `id` bigint NOT NULL,
  `tenant_id` varchar(6) DEFAULT NULL COMMENT '所属租户',
  `program_id` varchar(100) NOT NULL COMMENT '所属程序id',
  `name` varchar(100) NOT NULL COMMENT '文件名称',
  `url` varchar(100) NOT NULL COMMENT '文件地址',
  `status` int DEFAULT NULL COMMENT '业务状态',
  `create_dept` bigint DEFAULT NULL COMMENT '创建单位',
  `is_deleted` int DEFAULT NULL,
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `update_user` bigint DEFAULT NULL COMMENT '更新人',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='数控程序文件';
CREATE TABLE `mdm_task_receive` (
  `id` bigint NOT NULL,