yangys
2025-08-29 4187bc6d6f6595958cac264eb49455bf4d716800
加入确认表导出
已添加3个文件
已修改5个文件
438 ■■■■■ 文件已修改
blade-service/blade-mdm/src/main/java/org/springblade/mdm/commons/contants/DictBizConstants.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
blade-service/blade-mdm/src/main/java/org/springblade/mdm/commons/service/ParamService.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/controller/FlowMgrController.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/service/ProgramConfirmTableService.java 379 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
blade-service/blade-mdm/src/test/java/org/springblade/mdm/flow/service/ProgramConfirmTableServiceTest.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
doc/mdm/confirtabletpl.pdf 补丁 | 查看 | 原始文档 | blame | 历史
doc/mdm/qrb.docx 补丁 | 查看 | 原始文档 | blame | 历史
doc/sql/mdm/mdm.mysql.all.create.sql 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
blade-service/blade-mdm/src/main/java/org/springblade/mdm/commons/contants/DictBizConstants.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
package org.springblade.mdm.commons.contants;
public class DictBizConstants {
    /**
     * æŽ§åˆ¶ç³»ç»Ÿå­—å…¸key
     */
    public static final String CONTROL_SYSTEM = "machine_control_system";
}
blade-service/blade-mdm/src/main/java/org/springblade/mdm/commons/service/ParamService.java
@@ -48,6 +48,8 @@
     * é»˜è®¤æ¶‰å¯†ç½‘
     */
    public static String NETWORK_TYPE_SHEMI= "0";
    public static String CONFIRM_TABLE_TEMPLATE= "confirmTableTemplate";
    private final ISysClient sysClient;
    public String getParamValue(String paramKey,String defaultValue){
@@ -92,4 +94,8 @@
            TASK_EXPIRE_DAYS,"30");
    }
    public String confirmTableTemplateOssFileName() {
        return getParamValue(
            CONFIRM_TABLE_TEMPLATE,"");
    }
}
blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/controller/FlowMgrController.java
@@ -195,11 +195,10 @@
        try {
            FlowProgramProperties props = flowCommonService.getProgramPropertiesFromHis(processInstanceId);
            String progName = props.getDrawingNo()+"-"+props.getProcessNo()+"-"+props.getProcessEdition();
            //String filename = URLEncoder.encode("数控程序编制审批单", StandardCharsets.UTF_8)+ DateUtil.format(DateUtil.now(), "yyyyMMddHHmm")+".pdf";
            String filename = UrlUtil.encode("数控程序确认表"+progName)+".pdf";
            response.setHeader("Content-Disposition", "attachment; filename="+filename);
            response.setContentType("application/octet-stream");
            programConfirmTableService.exportConfirmTable(processInstanceId,response.getOutputStream());
            programConfirmTableService.exportConfirmTable(props,response.getOutputStream());
        } catch (Exception e) {
            log.error("导出数控程序确认表pdf异常", e);
            throw new RuntimeException(e);
blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/service/ProgramConfirmTableService.java
@@ -7,25 +7,28 @@
import org.apache.commons.lang3.StringUtils;
import org.flowable.engine.HistoryService;
import org.flowable.task.api.history.HistoricTaskInstance;
import org.springblade.core.oss.OssTemplate;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.mdm.basesetting.machine.MachineService;
import org.springblade.mdm.basesetting.machine.entity.Machine;
import org.springblade.mdm.commons.contants.DictBizConstants;
import org.springblade.mdm.commons.service.ParamService;
import org.springblade.mdm.flow.constants.FlowContants;
import org.springblade.mdm.flow.vo.ApproveTableInfo;
import org.springblade.mdm.program.entity.NcNode;
import org.springblade.mdm.program.entity.NcProgramApproved;
import org.springblade.mdm.program.service.NcNodeService;
import org.springblade.mdm.program.service.NcProgramApprovedService;
import org.springblade.system.feign.IDictBizClient;
import org.springblade.system.feign.IUserClient;
import org.springblade.system.pojo.entity.DictBiz;
import org.springblade.system.pojo.entity.User;
import org.springblade.system.pojo.entity.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.io.ByteArrayOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.*;
import java.util.*;
import java.util.List;
@@ -40,315 +43,119 @@
    @Autowired
    private FlowCommonService flowCommonService;
    @Autowired
    private IDictBizClient dictBizClient;
    @Autowired
    private NcNodeService ncNodeService;
    @Autowired
    private MachineService machineService;
    @Autowired
    private HistoryService historyService;
    private OssTemplate ossTemplate;
    @Autowired
    private IUserClient useClient;
    private IUserClient userClient;
    @Autowired
    private NcProgramApprovedService programApprovedService;
    private static final String UNCHECK_BOX = "☐";
    private static final String CHECKED_BOX = "☑";
    static Chunk square = new Chunk("o", new Font(Font.FontFamily.ZAPFDINGBATS, 12)); // ç©ºæ–¹æ¡†
    static Chunk check = new Chunk("4", new Font(Font.FontFamily.ZAPFDINGBATS, 12)); // å¸¦å‹¾æ–¹æ¡†
    private ParamService paramService;
    BaseFont getBaseFont() throws DocumentException, IOException {
        return BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);
    public void exportConfirmTable(FlowProgramProperties props, OutputStream os) throws IOException, DocumentException {
        byte[] tplBytes = getTemplateBytes();
        generateTempPDF(tplBytes,props,os);
    }
    Font getChineseFont() throws DocumentException, IOException {
        BaseFont bfChinese = getBaseFont();
        return new Font(bfChinese, 12, Font.NORMAL);
    }
    public void generateTempPDF()throws Exception {
    void generateTempPDF(byte[] bytes,FlowProgramProperties props,OutputStream outputStream) throws DocumentException, IOException {
        PdfReader reader = null;
        PdfStamper ps = null;
        OutputStream fos = null;
        ByteArrayOutputStream bos = null;
        try {
            String fileName = "d:/qrb.pdf";//模板绝对路径
            reader = new PdfReader(fileName);
            bos = new ByteArrayOutputStream();
            ps = new PdfStamper(reader, bos);
            // ä½¿ç”¨ä¸­æ–‡å­—体
            //BaseFont bf = BaseFont.createFont("sTsong-Light", "uniGB-Ucs2-H", BaseFont.NOT_EMBEDDED);
            BaseFont bf = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);
            ArrayList<BaseFont> fontList = new ArrayList<BaseFont>();
            fontList.add(bf);
            AcroFields fields = ps.getAcroFields();
            fields.setSubstitutionFonts(fontList);
            fillData(fields, data());//染
            //必须要调用这个,否则文档不会生成的
            ps.setFormFlattening(true);
            if (ps != null) {
                ps.close();
            }
        PdfStamper pdfStamper = null;
            //生成pdf路径存放的路径
            fos = new FileOutputStream("d:/bb2.pdf");
            fos.write(bos.toByteArray());
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (fos != null) {
                fos.flush();
                fos.close();
                if (bos != null) {
                    bos.close();
                }
                if (reader != null) {
                    reader.close();
                }
            }
        reader = new PdfReader(bytes);
        pdfStamper =  new PdfStamper(reader, outputStream);
        // ä½¿ç”¨ä¸­æ–‡å­—体
        BaseFont bf = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);
        ArrayList<BaseFont> fontList = new ArrayList<>();
        fontList.add(bf);
        AcroFields fields = pdfStamper.getAcroFields();
        fields.setSubstitutionFonts(fontList);
        fillData(fields, getData(props));//染
        //必须要调用这个,否则文档不会生成的
        pdfStamper.setFormFlattening(true);
        pdfStamper.close();
    }
    void fillData(AcroFields fields, Map<String, String> data) throws DocumentException, IOException {
        for (String key : data.keySet()) {
            String value = data.get(key);
            // ä¸ºå­—段赋值,注意字段名称是区分大小写的fields.setField(key,value);
            fields.setField(key,value,true);
            //form.setFieldProperty("fieldName", "clrflags", PdfAnnotation.FLAGS_HIDDEN, null);
            //fields.setFieldRichValue()
        }
    }
    public void fillData(AcroFields fields, Map<String, String> data) {
        try {
            for (String key : data.keySet()) {
                String value = data.get(key);
                // ä¸ºå­—段赋值,注意字段名称是区分大小写的fields.setField(key,value);
                fields.setField(key,value);
            }
        }catch(Exception e){
            e.printStackTrace();
        }
    }
    Map<String,String> data(){
        Map<String,String> ret = new HashMap<>();
        ret.put("drawingName","中文图名");
        ret.put("craftEdition","TH0001");
        return ret;
    }
    public void exportConfirmTable(String processInstanceId, OutputStream os) throws DocumentException, IOException {
        BaseFont bfChinese = getBaseFont();
        Document document = new Document(PageSize.B5.rotate());
        PdfWriter.getInstance(document, os);
        document.open();
        FlowProgramProperties props = flowCommonService.getProgramPropertiesFromHis(processInstanceId);
        ApproveTableInfo appInfo = getApproveInfo(props);
        Machine machine;
        String machineCode = props.getMachineCode();
        machine = machineService.getByCode(machineCode);
        int flag = props.getProcessDefinitionKey().equals(FlowContants.TRY_PROCESS_KEY)?1:2;
        printPage(document, bfChinese, props, machine);
        //document.newPage();
        //printPage(document, bfChinese, props, machine, 2, appInfo);
        document.close();
    }
    void printPage(Document document, BaseFont bfChinese, FlowProgramProperties props, Machine machine) throws DocumentException, IOException {
        Font tableFont = new Font(bfChinese, 12, Font.NORMAL);
        PdfPTable titleTable = new PdfPTable(2);
        titleTable.setWidthPercentage(100);
        titleTable.setSpacingBefore(10f);
        titleTable.setSpacingAfter(10f);
        PdfPCell celBh = this.getCell("编号:",tableFont);
        titleTable.addCell(celBh);
        PdfPCell celYb = this.getCell("艺表8",tableFont);
        titleTable.addCell(celYb);
        document.add(titleTable);
        //document.add(title);
        // åˆ›å»ºè¡¨æ ¼ï¼ˆ4列)
        PdfPTable table = new PdfPTable(6);
        table.setWidths(new float[]{1, 1.3f, 1f, 1.3f,1, 1.5f});
        Font ft = this.getChineseFont();
        // æ·»åŠ è¡¨å¤´
        PdfPCell tempCell = getCell("一一四厂",tableFont);
        //
        table.addCell(tempCell);
        tempCell = getCell("数控程序确认表",tableFont);
        table.addCell(tempCell);
        table.addCell(getCell("工序号", ft));
        table.addCell(getCell("工艺版次", ft));
        table.addCell(getCell("机床型号", ft));
        table.addCell(getCell("工段负责人/单元负\n责人派出时间", ft));
        table.addCell(getCell(props.getDrawingNo(), ft));//零组件号
        table.addCell(getCell(props.getProcessNo(), ft));//工序号
        table.addCell(getCell(props.getCraftEdition(), ft));//工艺版次
        table.addCell(getCell(machine.getName(), ft));//机床型号
        table.addCell(getCell("", ft));//负责人,工段负责人派出时间
        //中间大格
        PdfPCell cell = new PdfPCell();
        cell.setColspan(5);
        cell.setCalculatedHeight(400);
        Paragraph mainPara1 = new Paragraph();
        mainPara1.setLeading(30f, 0f);
        mainPara1.setFont(ft);
        mainPara1.setAlignment(Element.ALIGN_LEFT); // å¯¹é½æ–¹å¼
        mainPara1.setIndentationLeft(20); // å·¦ç¼©è¿›(像素)
        mainPara1.setIndentationRight(20); // å³ç¼©è¿›
        mainPara1.setSpacingBefore(10); // æ®µå‰é—´è·
        mainPara1.setSpacingAfter(10); // æ®µåŽé—´è·
        mainPara1.add("数控程序编制任务安排:\n");
        cell.addElement(mainPara1);
        Paragraph line2Para = new Paragraph();
        line2Para.setLeading(30f, 0f);
        line2Para.setFont(ft);
        line2Para.setAlignment(Element.ALIGN_LEFT); // å¯¹é½æ–¹å¼
        line2Para.setIndentationLeft(40); // å·¦ç¼©è¿›(像素)
        line2Para.add("请");
        Font underLineFt = new Font(bfChinese, 12, Font.UNDERLINE);
        //String personName = record.getUserNickname();
        Chunk block1 = square;
        Chunk block2 = check;
        cell.addElement(line2Para);
        Paragraph fangzhen = new Paragraph();
        fangzhen.setAlignment(Element.ALIGN_LEFT); // å¯¹é½æ–¹å¼
        fangzhen.setIndentationLeft(20); // å·¦ç¼©è¿›(像素)
        fangzhen.setIndentationRight(20); // å³ç¼©è¿›
        fangzhen.setSpacingBefore(10); // æ®µå‰é—´è·
        fangzhen.setSpacingAfter(10); // æ®µåŽé—´è·
        fangzhen.setFont(ft);
        fangzhen.setLeading(30f, 0f);
        fangzhen.add("是否需要仿真(是");
        fangzhen.add(check);//固定是仿真
        fangzhen.add(" å¦");
        fangzhen.add(square);
        fangzhen.add(")\n\n");
        cell.addElement(fangzhen);
        table.addCell(cell);
        //下一行
        PdfPCell cell21 = getCell("数控程序编号", ft);// PdfPCell();
        cell21.setColspan(2);
        //cell21.setPhrase(new Phrase("数控程序编号",ft));
        table.addCell(cell21);
        table.addCell(getCell("编制/日期", ft));
        table.addCell(getCell("校对/日期", ft));
        table.addCell(getCell("批准/日期", ft));
        PdfPCell cell2 = getCell("00001", ft);
        cell2.setColspan(2);
        //cell2.addElement(new Phrase(programPackageNode.getProgramNo(),ft));//数控程序编号
        //cell2.addElement(new Phrase("00001",ft));
        table.addCell(cell2);
        // è®¾ç½®è¡¨æ ¼å®½åº¦å é¡µé¢å®½åº¦çš„100%
        table.setWidthPercentage(100);
        // æ·»åŠ è¡¨æ ¼åˆ°æ–‡æ¡£
        document.add(table);
        Phrase lastPhrase = new Phrase("注:工段派工应预先计划、合理安排数控程序编制。立加、数铣、数车等单道工序程序(两轴程序)需提前1个工作日,卧式加工中心单道工序(含多轴程序)需提前3个工作日。 ", ft);
        document.add(lastPhrase);
    /**
     * èŽ·å–æ¨¡æ¿å­—èŠ‚æ•°ç»„
     * @return
     */
    private byte[] getTemplateBytes() throws IOException {
        String tplOssName = paramService.confirmTableTemplateOssFileName();
        try (InputStream inputStream = this.ossTemplate.statFileStream(tplOssName)) {
            return inputStream.readAllBytes();
        }
    }
    PdfPCell getCell(String text, Font font) throws DocumentException, IOException {
        PdfPCell cell = new PdfPCell();
        cell.setPadding(10);
        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
        cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
        if (StringUtils.isNotBlank(text)) {
            Phrase p = new Phrase(text, font);
            p.setLeading(25);
            cell.setPhrase(p);
    /**
     * èŽ·å–æ‰“å°è¡¨æ ¼çš„æ•°æ®
     * @param props æµç¨‹å±žæ€§
     * @return æ•°æ®map
     */
    Map<String,String> getData(FlowProgramProperties props){
        Map<String,String> data = new HashMap<>();
        data.put("pageTotal","1");
        data.put("pageNo","1");
        data.put("processNo",props.getProcessNo());
        data.put("drawingNo",props.getDrawingNo());
        data.put("drawingNoEdition",props.getDrawingNoEdition());
        data.put("processName",props.getProcessName());
        data.put("processEdition",props.getProcessEdition());
        data.put("machineCode",props.getMachineCode());
        data.put("productModel",props.getProductModel());
        data.put("craftEdition",props.getCraftEdition());
        data.put("fuheY","Y");
        data.put("keyongY","Y");
        Machine machine = this.machineService.getByCode(props.getMachineCode());
        data.put("machineMode",machine.getName());
        R<String> dictSystemResult = dictBizClient.getValue(DictBizConstants.CONTROL_SYSTEM,machine.getControlSystem());
        if(dictSystemResult.isSuccess()){
            data.put("controlSystem",dictSystemResult.getData());
        }
        return cell;
        data.put("operator","不明确/2025-1-1");
        data.put("jjy","不明确/2025-1-1");
        data.put("programmerName",getNameByUserId(props.getProgrammerId()));
        data.put("checkerName",getNameByUserId(props.getCheckerId()));
        data.put("seniorName",getNameByUserId(props.getSeniorId()));
        return data;
    }
    ApproveTableInfo getApproveInfo(FlowProgramProperties props){
        //编制
        R<User> leaderR = useClient.userInfoById(props.getTeamLeaderId());
        String leaderName = "";
        if (leaderR.isSuccess()) {
            leaderName = leaderR.getData().getName();
        }
        //编制
        R<User> programmerR = useClient.userInfoById(props.getProgrammerId());
        String programmerName = "";
        if (programmerR.isSuccess()) {
            programmerName = programmerR.getData().getName();
        }
        Machine machine;
        String machineCode = props.getMachineCode();
        machine = machineService.getByCode(machineCode);
        //校对
        R<User> checkerR = useClient.userInfoById(props.getCheckerId());
        String checkerName = "";
        if (checkerR.isSuccess()) {
            checkerName = checkerR.getData().getName();
        }
        //审核
        R<User> seniorR = useClient.userInfoById(props.getCheckerId());
        String senioirName = "";
        if (seniorR.isSuccess()) {
            senioirName = seniorR.getData().getName();
        }
        ApproveTableInfo appInfo = new ApproveTableInfo();
        appInfo.setTeamLeaderName(leaderName);
        appInfo.setProgrammerName(programmerName);
        appInfo.setCheckerName(checkerName);
        appInfo.setSeniorName(senioirName);
        //获取时间信息
        List<HistoricTaskInstance> hisTasks = historyService.createHistoricTaskInstanceQuery()
            .processInstanceId(props.getProcessInstanceId()).orderByTaskCreateTime().desc().list();
        for(HistoricTaskInstance task : hisTasks){
            if(appInfo.getProgrammingDate()== null && task.getTaskDefinitionKey().contains("program")){
                appInfo.setProgrammingDate(task.getEndTime());
            }
            if(appInfo.getCheckDate()== null && task.getTaskDefinitionKey().contains("check")){
                appInfo.setCheckDate(task.getEndTime());
            }
            if(appInfo.getApproveDate()== null && task.getTaskDefinitionKey().contains("approve")){
                appInfo.setApproveDate(task.getEndTime());
            }
    String getNameByUserId(Long userId){
        if(userId == null){
            return StringUtils.EMPTY;
        }
        //查询数控程序编号
        Optional<NcProgramApproved> appOpt = programApprovedService.lambdaQuery().eq(NcProgramApproved::getProcessInstanceId, props.getProcessInstanceId()).oneOpt();
        if(appOpt.isEmpty()){
            appInfo.setProgramNo("(未生成)");
        }else{
            NcNode programPkgNameNode = this.ncNodeService.getById(appOpt.get().getNcNodeId());
            appInfo.setProgramNo(programPkgNameNode.getProgramNo());
        String name = StringUtils.EMPTY;
        R<User> useInfoResult =  userClient.userInfoById(userId);
        if(useInfoResult.isSuccess()){
            name = useInfoResult.getData().getName();
        }
        return appInfo;
        return name;
    }
}
blade-service/blade-mdm/src/test/java/org/springblade/mdm/flow/service/ProgramConfirmTableServiceTest.java
@@ -8,21 +8,27 @@
import org.springblade.mdm.basesetting.machine.entity.Machine;
import org.springblade.mdm.flow.vo.ApproveTableInfo;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.io.*;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Map;
public class ProgramConfirmTableServiceTest {
    @Test
    //@Test
    public void test(){
        ProgramConfirmTableService s = new ProgramConfirmTableService();
        try {
            s.generateTempPDF();
            String fileName = "d:/confirtabletpl.pdf";//模板绝对路径
            String outfile = "D:/q"+System.currentTimeMillis()+".pdf";
            try(InputStream ins = Files.newInputStream(Paths.get(fileName));OutputStream fos = Files.newOutputStream(Paths.get(outfile));) {
                //ByteArrayInputStream bais;
                //s.generateTempPDF(ins.readAllBytes(),fos);
            }
            Assertions.assertTrue(true);
        } catch (Exception e) {
            throw new RuntimeException(e);
doc/mdm/confirtabletpl.pdf
Binary files differ
doc/mdm/qrb.docx
Binary files differ
doc/sql/mdm/mdm.mysql.all.create.sql
@@ -23,7 +23,7 @@
  `name` varchar(100) NOT NULL COMMENT '机床描述/型号',
  `avatar` varchar(400) DEFAULT NULL COMMENT '图片地址',
  `machine_group_code` varchar(255) NOT NULL COMMENT '所属机床组代码,,在业务字典配置(key=machine_group)',
  `machine_spec` varchar(20) DEFAULT NULL COMMENT '机器规格:01车床/02铣床,在业务字典配置(key=machine_spec)',
  `machine_spec` varchar(40) DEFAULT NULL COMMENT '机器规格:01车床/02铣床,在业务字典配置(key=machine_spec)',
  `operator` varchar(100)  COMMENT '操作员,文本录入',
  `owner_dept` bigint DEFAULT NULL COMMENT '所属单位/组织',
  `manufacturer` varchar(100)  COMMENT '生产商',
@@ -169,7 +169,7 @@
   `product_model` varchar(100) NULL COMMENT '产品型号',
   `deviation` varchar(100) NULL COMMENT '偏离单号',
   `err_msg` varchar(100) NULL COMMENT '错误或者提示信息',
   `err_msg` varchar(200) NULL COMMENT '错误或者提示信息',
   `process_instance_id` varchar(64) NULL COMMENT '关联的流程实例id,流程发起后填充',
   `status` int DEFAULT NULL COMMENT '业务状态,1:初始化;2:流程已启动 3:重复派工;4,验证失败,5:启动异常',
   `create_dept` bigint DEFAULT NULL COMMENT '创建单位',
@@ -457,3 +457,21 @@
    PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='工控网机床文件';
DROP TABLE IF EXISTS `mdm_machine_file_change_his`;
CREATE TABLE `mdm_machine_file_change_his` (
    `id` bigint NOT NULL,
    `tenant_id` varchar(6) DEFAULT NULL COMMENT '所属租户',
    `oss_name` varchar(100) NOT NULL COMMENT '修改前oss文件名称(文件备份)',
    `oss_name_after` varchar(100) NOT NULL COMMENT '修改后的oss文件名称',
    `machine_file_id` bigint DEFAULT NULL COMMENT '修改文件的id(mdm_machine_file.id)',
    `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='工控网机床文件修改历史';