Browse Source

Merge remote-tracking branch 'origin/master'

zhuang 6 months ago
parent
commit
bef8660512
14 changed files with 575 additions and 87 deletions
  1. 1 1
      business-common/src/main/java/com/rongwei/bscommon/sys/dao/ZhcxCommissionCheckBaseInfoDetailDao.java
  2. 1 1
      business-common/src/main/java/com/rongwei/bscommon/sys/dao/ZhcxCommissionCheckDetailDao.java
  3. 19 0
      business-common/src/main/java/com/rongwei/bscommon/sys/dao/ZhcxPmqManagementRecoredDao.java
  4. 13 1
      business-common/src/main/java/com/rongwei/bscommon/sys/service/ZhcxCommissionCheckService.java
  5. 14 0
      business-common/src/main/java/com/rongwei/bscommon/sys/service/ZhcxPmqManagementRecoredService.java
  6. 344 76
      business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxCommissionCheckServiceImpl.java
  7. 78 0
      business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxPmqManagementRecoredServiceImpl.java
  8. 2 3
      business-common/src/main/resources/mybatis/business/ZhcxCommissionCheckDao.xml
  9. 1 2
      business-common/src/main/resources/mybatis/business/ZhcxPmqManagementDistributionDao.xml
  10. 54 0
      business-common/src/main/resources/mybatis/business/ZhcxPmqManagementRecoredDao.xml
  11. 1 1
      business-entity/src/main/java/com/rongwei/bsentity/dto/sqlServer/DistributionDTO.java
  12. 20 0
      business-entity/src/main/java/com/rongwei/bsentity/dto/sqlServer/RecoredDistributionDTO.java
  13. 11 0
      business-server/src/main/java/com/rongwei/bsserver/controller/ZhcxCommissionCheckController.java
  14. 16 2
      business-server/src/main/java/com/rongwei/bsserver/controller/ZhcxPmqManagementRecoredController.java

+ 1 - 1
business-common/src/main/java/com/rongwei/bscommon/sys/dao/ZhcxCommissionCheckBaseInfoDetailDao.java

@@ -38,7 +38,7 @@ public interface ZhcxCommissionCheckBaseInfoDetailDao extends BaseMapper<ZhcxCom
             "WHERE\n" +
             "DELETED = 0\n" +
             "AND PID = #{standardId}\n" +
-            "ORDER BY SORT ASC")
+            "ORDER BY CREATEDATE,SORT ASC")
     List<ZhcxCommissionCheckBaseInfoDetailDo> listData(Map<String, Object> map);
 
     /**

+ 1 - 1
business-common/src/main/java/com/rongwei/bscommon/sys/dao/ZhcxCommissionCheckDetailDao.java

@@ -28,7 +28,7 @@ public interface ZhcxCommissionCheckDetailDao extends BaseMapper<ZhcxCommissionC
             "WHERE " +
             "DELETED = 0 " +
             "AND PID = #{checkId} " +
-            "ORDER BY SORT ASC")
+            "ORDER BY CREATEDATE,SORT ASC")
     List<ZhcxCommissionCheckDetailDo> listData(Map<String, Object> map);
 
     @Select("SELECT " +

+ 19 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/dao/ZhcxPmqManagementRecoredDao.java

@@ -3,6 +3,7 @@ package com.rongwei.bscommon.sys.dao;
 import com.rongwei.bsentity.domain.ZhcxPmqManagementDistributionDo;
 import com.rongwei.bsentity.domain.ZhcxPmqManagementRecoredDo;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.rongwei.bsentity.dto.ZhcxPmqManagementDistributionDTO;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 
@@ -33,4 +34,22 @@ public interface ZhcxPmqManagementRecoredDao extends BaseMapper<ZhcxPmqManagemen
     List<ZhcxPmqManagementDistributionDo> getDistributionsByPid(@Param("id") String id);
 
     void updateFilesById(@Param("files") String files,@Param("id") String id);
+
+    /**
+     * 根据pid删除2.5数据
+     * @param ids recored表的id集合
+     */
+    void deleteDistributionByPid(@Param("ids") List<String> ids);
+
+    /**
+     * 根据pid删除3数据
+     * @param ids recored表的id集合
+     */
+    void deleteDistributionDetailByPid(@Param("ids") List<String> ids);
+
+    /**
+     * 构建第2.5层数据(简化版)
+     * @param id PID
+     */
+    List<ZhcxPmqManagementDistributionDo> getDistributionsByPidSimple(@Param("id") String id);
 }

+ 13 - 1
business-common/src/main/java/com/rongwei/bscommon/sys/service/ZhcxCommissionCheckService.java

@@ -29,7 +29,11 @@ public interface ZhcxCommissionCheckService extends IService<ZhcxCommissionCheck
      */
     R commissionCheckAdd(CommissionCheckDTO checkDTO);
 
-
+    /**
+     * 试车报告子表同步更新其他机台
+     * @param detailDTO 参数
+     * @return 响应状态
+     */
     R updateSynchronizationDetail(CheckDetailDTO detailDTO);
 
     /**
@@ -86,4 +90,12 @@ public interface ZhcxCommissionCheckService extends IService<ZhcxCommissionCheck
      * @return
      */
     R importStandard(MultipartFile file,String mainId);
+
+    /**
+     * 项目导出试车模版
+     * @param map
+     * @param response
+     * @return
+     */
+    R wordExportPrj(Map<String, Object> map, HttpServletResponse response);
 }

+ 14 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/service/ZhcxPmqManagementRecoredService.java

@@ -4,6 +4,7 @@ import com.rongwei.bsentity.domain.ZhcxPmqManagementDistributionDo;
 import com.rongwei.bsentity.domain.ZhcxPmqManagementRecoredDo;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.rongwei.bsentity.dto.ZhcxPmqManagementDistributionDTO;
+import com.rongwei.bsentity.dto.sqlServer.RecoredDistributionDTO;
 import com.rongwei.rwcommon.base.R;
 
 import java.util.List;
@@ -58,5 +59,18 @@ public interface ZhcxPmqManagementRecoredService extends IService<ZhcxPmqManagem
      */
     R updateBatchList(List<ZhcxPmqManagementDistributionDTO> list);
 
+    /**
+     * 三单派单页面批量派单弹窗处理数据接口
+     * @param list  前端处理好的 第2.5层表数据
+     * @param status NA/已关闭
+     * @param dispatchstatus 派单状态
+     */
     R updateBatchList(List<ZhcxPmqManagementDistributionDTO> list,String status,String dispatchstatus);
+
+    /**
+     * 三单派单页面批量派单处理数据接口
+     * @param dto 参数
+     * @return
+     */
+    R closedBatchList(RecoredDistributionDTO dto);
 }

+ 344 - 76
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxCommissionCheckServiceImpl.java

@@ -287,8 +287,8 @@ public class ZhcxCommissionCheckServiceImpl extends ServiceImpl<ZhcxCommissionCh
             return R.error("主表id为空");
         }
         // 判断该机台是否已发运 如果已发运 就直接返回
-        if(baseMapper.checkedShippedByMasterId2(masterId) == 0){
-            return R.ok("该机台已发运,无需同步");
+        if(baseMapper.checkedShippedByMasterId2(masterId) > 0){
+            return R.ok("该机台已发运或已交机,无需同步");
         }
         // 找到该项目下面其他 还没有发运的 机台主表数据
         List<ZhcxCommissionCheckDo> list = baseMapper.getOtherShippeCheckList2(masterId);
@@ -885,6 +885,10 @@ public class ZhcxCommissionCheckServiceImpl extends ServiceImpl<ZhcxCommissionCh
             for (ZhcxCommissionCheckDetailDo item : list) {
                 String key = "";
                 String treeFullId = item.getTreefullid();
+                if (StringUtils.isBlank(treeFullId)){
+                    log.error("该内容节点treeFullId值为空:{}", item.getChtestcontent());
+                    return R.error(item.getChtestcontent()+"该内容节点数据有误");
+                }
                 int fillIdLength = treeFullId.split(",").length;
                 int i = treeFullId.indexOf(",");
                 if (fillIdLength<=3){
@@ -892,8 +896,8 @@ public class ZhcxCommissionCheckServiceImpl extends ServiceImpl<ZhcxCommissionCh
                     if(!resMap.containsKey(key)){
                         log.error("不能导出树表的id:{}的报告", treeFullId);
                         log.error("不能导出树表的key:{}的报告", key);
-                        log.error("章节号有无误:{}的报告", item.getChapterno());
-                        return R.error(item.getChapterno()+"章节号有无误");
+                        log.error("该内容节点有错误:{}的报告", item.getChtestcontent());
+                        return R.error(item.getChtestcontent()+"该内容节点数据有误");
                     }
                 }else {
                     // 从第一个逗号之后开始找第二个逗号
@@ -903,7 +907,7 @@ public class ZhcxCommissionCheckServiceImpl extends ServiceImpl<ZhcxCommissionCh
                         log.error("不能导出树表的id:{}的报告", treeFullId);
                         log.error("不能导出树表的key:{}的报告", key);
                         log.error("章节号有无误:{}的报告", item.getChapterno());
-                        return R.error(item.getChapterno()+"章节号有无误");
+                        return R.error(item.getChtestcontent()+"该内容节点数据有误");
                     }
                 }
                 ZhcxCommissionCheckDetailWordVO checkDetailWordVO = resMap.get(key);
@@ -933,40 +937,20 @@ public class ZhcxCommissionCheckServiceImpl extends ServiceImpl<ZhcxCommissionCh
                 if(ObjectUtil.isNotEmpty(res.getDetailList())){
                     // 插入表头
                     builder.insertCell();
-                    builder.getCellFormat().setWidth(40);
-                    builder.getRowFormat().setHeight(20);
-                    builder.getRowFormat().setHeightRule(HeightRule.EXACTLY);//设置HeightRule
-                    builder.getCellFormat().setOrientation(TextOrientation.HORIZONTAL);
-                    buildTextContentTitle(builder, DEFAULT_FONT_NAME, StyleIdentifier.NORMAL, 12, true,
-                            "NO.", null);
+                    buildTextContentTitle(builder,40,20,HeightRule.EXACTLY,TextOrientation.HORIZONTAL,DEFAULT_FONT_NAME,StyleIdentifier.NORMAL,
+                            12,true,"NO.", null);
                     builder.insertCell();
-                    builder.getCellFormat().setWidth(170);
-                    builder.getRowFormat().setHeight(20);
-                    builder.getRowFormat().setHeightRule(HeightRule.EXACTLY);//设置HeightRule
-                    builder.getCellFormat().setOrientation(TextOrientation.HORIZONTAL);
-                    buildTextContentTitle(builder, DEFAULT_FONT_NAME, StyleIdentifier.NORMAL, 12, true,
-                            "检查项目", null);
+                    buildTextContentTitle(builder,170,20,HeightRule.EXACTLY,TextOrientation.HORIZONTAL,DEFAULT_FONT_NAME,StyleIdentifier.NORMAL,
+                            12,true,"检查项目", null);
                     builder.insertCell();
-                    builder.getCellFormat().setWidth(120);
-                    builder.getRowFormat().setHeight(20);
-                    builder.getRowFormat().setHeightRule(HeightRule.EXACTLY);//设置HeightRule
-                    builder.getCellFormat().setOrientation(TextOrientation.HORIZONTAL);
-                    buildTextContentTitle(builder, DEFAULT_FONT_NAME, StyleIdentifier.NORMAL, 12, true,
-                            "测试地点", null);
+                    buildTextContentTitle(builder,120,20,HeightRule.EXACTLY,TextOrientation.HORIZONTAL,DEFAULT_FONT_NAME,StyleIdentifier.NORMAL,
+                            12,true,"测试地点", null);
                     builder.insertCell();
-                    builder.getCellFormat().setWidth(40);
-                    builder.getRowFormat().setHeight(20);
-                    builder.getRowFormat().setHeightRule(HeightRule.EXACTLY);//设置HeightRule
-                    builder.getCellFormat().setOrientation(TextOrientation.HORIZONTAL);
-                    buildTextContentTitle(builder, DEFAULT_FONT_NAME, StyleIdentifier.NORMAL, 12, true,
-                            "结果", null);
+                    buildTextContentTitle(builder,40,20,HeightRule.EXACTLY,TextOrientation.HORIZONTAL,DEFAULT_FONT_NAME,StyleIdentifier.NORMAL,
+                            12, true,"结果", null);
                     builder.insertCell();
-                    builder.getCellFormat().setWidth(100);
-                    builder.getRowFormat().setHeight(20);
-                    builder.getRowFormat().setHeightRule(HeightRule.EXACTLY);//设置HeightRule
-                    builder.getCellFormat().setOrientation(TextOrientation.HORIZONTAL);
-                    buildTextContentTitle(builder, DEFAULT_FONT_NAME, StyleIdentifier.NORMAL, 12, true,
-                            "备注", null);
+                    buildTextContentTitle(builder,100,20,HeightRule.EXACTLY,TextOrientation.HORIZONTAL,DEFAULT_FONT_NAME,StyleIdentifier.NORMAL,
+                            12, true,"备注", null);
                     builder.endRow();
                     int count =0;
                     for (ZhcxCommissionCheckDetailDo detailWordVO:res.getDetailList()){
@@ -1121,6 +1105,10 @@ public class ZhcxCommissionCheckServiceImpl extends ServiceImpl<ZhcxCommissionCh
      * 内容添加
      *
      * @param builder         文档对象
+     * @param width           宽度
+     * @param height          高度
+     * @param heightRule      高度规则
+     * @param orientation     样式
      * @param fontName        字体名称
      * @param styleIdentifier 设置样式  正文 标题1 标题2 StyleIdentifier.HEADING_1
      * @param fontSize        字体大小
@@ -1129,8 +1117,16 @@ public class ZhcxCommissionCheckServiceImpl extends ServiceImpl<ZhcxCommissionCh
      * @param prefixContent   内容前缀 此处用来做首行缩进
      * @throws Exception
      */
-    private void buildTextContentTitle(DocumentBuilder builder, String fontName, int styleIdentifier, int fontSize,
+    private void buildTextContentTitle(DocumentBuilder builder, double width,double height, int heightRule, int orientation,String fontName, int styleIdentifier, int fontSize,
                            boolean isBold, String content, String prefixContent) throws Exception {
+        //设置宽度
+        builder.getCellFormat().setWidth(width);
+        //设置高度
+        builder.getRowFormat().setHeight(height);
+        //设置HeightRule
+        builder.getRowFormat().setHeightRule(heightRule);
+        //设置样式
+        builder.getCellFormat().setOrientation(orientation);
         // 设置字体
         builder.getFont().setName(fontName);
         // 是否倾斜
@@ -1218,6 +1214,10 @@ public class ZhcxCommissionCheckServiceImpl extends ServiceImpl<ZhcxCommissionCh
      * 内容添加
      *
      * @param builder         文档对象
+     * @param width           宽度
+     * @param height          高度
+     * @param heightRule      高度规则
+     * @param orientation     样式
      * @param fontName        字体名称
      * @param styleIdentifier 设置样式  正文 标题1 标题2 StyleIdentifier.HEADING_1
      * @param fontSize        字体大小
@@ -1226,8 +1226,16 @@ public class ZhcxCommissionCheckServiceImpl extends ServiceImpl<ZhcxCommissionCh
      * @param prefixContent   内容前缀 此处用来做首行缩进
      * @throws Exception
      */
-    private void buildTableTitleContent(DocumentBuilder builder, String fontName, int styleIdentifier, int fontSize,
+    private void buildTableTitleContent(DocumentBuilder builder, double width,double height, int heightRule, int orientation, String fontName, int styleIdentifier, int fontSize,
                                    boolean isBold, String content, String prefixContent) throws Exception {
+        //设置宽度
+        builder.getCellFormat().setWidth(width);
+        //设置高度
+        builder.getRowFormat().setHeight(height);
+        //设置HeightRule
+        builder.getRowFormat().setHeightRule(heightRule);
+        //设置样式
+        builder.getCellFormat().setOrientation(orientation);
         // 设置字体
         builder.getFont().setName(fontName);
         // 是否倾斜
@@ -1450,6 +1458,10 @@ public class ZhcxCommissionCheckServiceImpl extends ServiceImpl<ZhcxCommissionCh
             for (ZhcxCommissionCheckBaseInfoDetailDo item : list) {
                 String key = "";
                 String treeFullId = item.getTreefullid();
+                if (StringUtils.isBlank(treeFullId)){
+                    log.error("该内容节点treeFullId值为空:{}", item.getChtestcontent());
+                    return R.error(item.getChtestcontent()+"该内容节点数据有误");
+                }
                 int fillIdLength = treeFullId.split(",").length;
                 int i = treeFullId.indexOf(",");
                 if (fillIdLength<=3){
@@ -1457,8 +1469,9 @@ public class ZhcxCommissionCheckServiceImpl extends ServiceImpl<ZhcxCommissionCh
                     if(!resMap.containsKey(key)){
                         log.error("不能导出树表的id:{}的报告", treeFullId);
                         log.error("不能导出树表的key:{}的报告", key);
-                        log.error("章节号有无误:{}的报告", item.getChapterno());
-                        return R.error(item.getChapterno()+"章节号有无误");
+                        log.error("章节号有误:{}的报告", item.getChapterno());
+                        log.error("该内容节点数据有误:{}的报告", item.getChtestcontent());
+                        return R.error(item.getChtestcontent()+"该内容节点数据有误");
                     }
                 }else {
                     // 从第一个逗号之后开始找第二个逗号
@@ -1467,8 +1480,9 @@ public class ZhcxCommissionCheckServiceImpl extends ServiceImpl<ZhcxCommissionCh
                     if(!resMap.containsKey(key)){
                         log.error("不能导出树表的id:{}的报告", treeFullId);
                         log.error("不能导出树表的key:{}的报告", key);
-                        log.error("章节号有无误:{}的报告", item.getChapterno());
-                        return R.error(item.getChapterno()+"章节号有无误");
+                        log.error("章节号有误:{}的报告", item.getChapterno());
+                        log.error("该内容节点数据有误:{}的报告", item.getChtestcontent());
+                        return R.error(item.getChtestcontent()+"该内容节点数据有误");
                     }
                 }
                 ZhcxCommissionCheckDetailStandardWordVO checkDetailWordVO = resMap.get(key);
@@ -1498,47 +1512,26 @@ public class ZhcxCommissionCheckServiceImpl extends ServiceImpl<ZhcxCommissionCh
                 if(ObjectUtil.isNotEmpty(res.getDetailList())){
                     // 插入表头
                     builder.insertCell();
-                    builder.getCellFormat().setWidth(30);
-                    builder.getRowFormat().setHeight(20);
-                    builder.getRowFormat().setHeightRule(HeightRule.EXACTLY);//设置HeightRule
-                    builder.getCellFormat().setOrientation(TextOrientation.HORIZONTAL);
-                    buildTableTitleContent(builder, DEFAULT_FONT_NAME, StyleIdentifier.NORMAL, 9, true,"NO.", null);
+                    buildTableTitleContent(builder,30,20,HeightRule.EXACTLY,TextOrientation.HORIZONTAL,DEFAULT_FONT_NAME,StyleIdentifier.NORMAL,
+                            9, true,"NO.",null);
                     builder.insertCell();
-                    builder.getCellFormat().setWidth(40);
-                    builder.getRowFormat().setHeight(20);
-                    builder.getRowFormat().setHeightRule(HeightRule.EXACTLY);//设置HeightRule
-                    builder.getCellFormat().setOrientation(TextOrientation.HORIZONTAL);
-                    buildTableTitleContent(builder, DEFAULT_FONT_NAME, StyleIdentifier.NORMAL, 9, true,"模式1", null);
+                    buildTableTitleContent(builder,40,20,HeightRule.EXACTLY,TextOrientation.HORIZONTAL,DEFAULT_FONT_NAME,StyleIdentifier.NORMAL,
+                            9, true,"模式1",null);
                     builder.insertCell();
-                    builder.getCellFormat().setWidth(40);
-                    builder.getRowFormat().setHeight(20);
-                    builder.getRowFormat().setHeightRule(HeightRule.EXACTLY);//设置HeightRule
-                    builder.getCellFormat().setOrientation(TextOrientation.HORIZONTAL);
-                    buildTableTitleContent(builder, DEFAULT_FONT_NAME, StyleIdentifier.NORMAL, 9, true,"模式2", null);
+                    buildTableTitleContent(builder,40,20,HeightRule.EXACTLY,TextOrientation.HORIZONTAL,DEFAULT_FONT_NAME,StyleIdentifier.NORMAL,
+                            9, true,"模式2",null);
                     builder.insertCell();
-                    builder.getCellFormat().setWidth(60);
-                    builder.getRowFormat().setHeight(20);
-                    builder.getRowFormat().setHeightRule(HeightRule.EXACTLY);//设置HeightRule
-                    builder.getCellFormat().setOrientation(TextOrientation.HORIZONTAL);
-                    buildTableTitleContent(builder, DEFAULT_FONT_NAME, StyleIdentifier.NORMAL, 9, true,"测试内容中文", null);
+                    buildTableTitleContent(builder,60,20,HeightRule.EXACTLY,TextOrientation.HORIZONTAL,DEFAULT_FONT_NAME,StyleIdentifier.NORMAL,
+                            9, true,"测试内容中文",null);
                     builder.insertCell();
-                    builder.getCellFormat().setWidth(60);
-                    builder.getRowFormat().setHeight(20);
-                    builder.getRowFormat().setHeightRule(HeightRule.EXACTLY);//设置HeightRule
-                    builder.getCellFormat().setOrientation(TextOrientation.HORIZONTAL);
-                    buildTableTitleContent(builder, DEFAULT_FONT_NAME, StyleIdentifier.NORMAL, 9, true,"测试内容英文", null);
+                    buildTableTitleContent(builder,60,20,HeightRule.EXACTLY,TextOrientation.HORIZONTAL,DEFAULT_FONT_NAME,StyleIdentifier.NORMAL,
+                            9, true,"测试内容英文",null);
                     builder.insertCell();
-                    builder.getCellFormat().setWidth(60);
-                    builder.getRowFormat().setHeight(20);
-                    builder.getRowFormat().setHeightRule(HeightRule.EXACTLY);//设置HeightRule
-                    builder.getCellFormat().setOrientation(TextOrientation.HORIZONTAL);
-                    buildTableTitleContent(builder, DEFAULT_FONT_NAME, StyleIdentifier.NORMAL, 9, true,"标准测试方法", null);
+                    buildTableTitleContent(builder,60,20,HeightRule.EXACTLY,TextOrientation.HORIZONTAL,DEFAULT_FONT_NAME,StyleIdentifier.NORMAL,
+                            9, true,"标准测试方法",null);
                     builder.insertCell();
-                    builder.getCellFormat().setWidth(60);
-                    builder.getRowFormat().setHeight(20);
-                    builder.getRowFormat().setHeightRule(HeightRule.EXACTLY);//设置HeightRule
-                    builder.getCellFormat().setOrientation(TextOrientation.HORIZONTAL);
-                    buildTableTitleContent(builder, DEFAULT_FONT_NAME, StyleIdentifier.NORMAL, 9, true,"测试地点", null);
+                    buildTableTitleContent(builder,60,20,HeightRule.EXACTLY,TextOrientation.HORIZONTAL,DEFAULT_FONT_NAME,StyleIdentifier.NORMAL,
+                            9, true,"测试地点",null);
                     builder.endRow();
                     for (ZhcxCommissionCheckBaseInfoDetailDo detailWordVO:res.getDetailList()){
                         // 插入表格的第一行
@@ -1926,6 +1919,281 @@ public class ZhcxCommissionCheckServiceImpl extends ServiceImpl<ZhcxCommissionCh
         return R.ok("导入成功");
     }
 
+    @Override
+    public R wordExportPrj(Map<String, Object> map, HttpServletResponse response) {
+        Object projectObj = map.get("projectId");
+        Object exportObj = map.get("exportType");
+        String day = DateUtils.format(new Date());
+        String projectId = (String) projectObj;
+        String exportType = (String) exportObj;
+        ZhcxProjectManageDo projectManageDo = zhcxProjectManageService.getById(projectId);
+        SysFileItemDo fileItemDo = sysFileItemService.getById("52f8f612f1ab43e58d9e3b46ceef6c2c");
+        final Document[] indexDoc = {WordHelpUtils.getDoc(fileItemDo.getFullpath())};
+        FormData formData = new FormData();
+        List<Map<String,Object>> mainDataList = new ArrayList<>();
+        Map<String,Object> mainMap = new HashMap<>(16);
+        String projectEnName = "";
+        if (StringUtils.isNotBlank(projectManageDo.getProjectEnName())){
+            projectEnName = projectManageDo.getProjectEnName();
+        }
+        mainMap.put("projectNames",projectManageDo.getProjectName()+projectEnName);
+        mainMap.put("projectCode",projectManageDo.getProjectCode());
+        mainMap.put("projectName",projectManageDo.getProjectName());
+        mainMap.put("currentDate",day);
+        mainDataList.add(mainMap);
+        formData.setMainDataList(mainDataList);
+        indexDoc[0] = ExcelExportUtil.fillWordDataByMap(fileItemDo.getFullpath(), formData);
+        List<ZhcxCommissionCheckDetailDo> list = zhcxCommissionCheckDetailDao.listData(map);
+        List<ZhcxCommissionCheckDetailTreeDo> checkTreeList = zhcxCommissionCheckDetailTreeService.listCheckDetailTreeData(map);
+        Document doc = null;
+        DocumentBuilder builder = null;
+        ClassPathResource classPathResource = new ClassPathResource("template/检查内容明细模版.doc");
+        try {
+            doc = new Document(classPathResource.getInputStream());
+            builder = new DocumentBuilder(doc);
+        } catch (Exception e) {
+            ExceptionUtils.printExceptionDetail(e,"空模板获取出现异常");
+            return R.error("空模板获取出现异常");
+        }
+        //移动到页眉
+        try {
+            builder.moveToHeaderFooter(HeaderFooterType.HEADER_PRIMARY); // 主页眉
+            // 如果有多个页眉,可以选择HeaderFooterType.HEADER_FIRST, HeaderFooterType.HEADER_EVEN等
+            for (com.aspose.words.Field field : doc.getRange().getFields()) {
+                if ("«projectName»".equals(field.getResult())) { // 替换FieldName为你的字段名称
+                    // 在这里操作field对象
+                    builder.moveToField(field, true);
+                    builder.write(projectManageDo.getProjectName());
+                    field.setResult("");
+                }
+            }
+        } catch (Exception e) {
+            ExceptionUtils.printExceptionDetail(e,"页面参数赋值异常");
+            return R.error("页面参数赋值异常");
+        }
+        if(list.isEmpty()||checkTreeList.isEmpty()){
+            return R.error("该检查内容没有数据");
+        }else {
+            //设置word导出目录
+            Map<String, ZhcxCommissionCheckDetailWordVO> resMap = new HashMap<>();
+            for (ZhcxCommissionCheckDetailTreeDo item : checkTreeList) {
+                ZhcxCommissionCheckDetailWordVO checkDetailWordVO = new ZhcxCommissionCheckDetailWordVO();
+                checkDetailWordVO.setTitleContent(item.getName());
+                checkDetailWordVO.setLevel(item.getLevel());
+                checkDetailWordVO.setDetailList(new LinkedList<>());
+                if (!"-1".equals(item.getPid())){
+                    //目前标题最多到三级
+                    if (item.getLevel()==2){
+                        String oldPid = item.getPid();
+                        //树等级为二级处理章节号
+                        List<ZhcxCommissionCheckDetailTreeDo> parentList =  checkTreeList.stream().filter(info->info.getId().split("_")[0].equals(oldPid.split("_")[0])).collect(Collectors.toList());
+                        if (!parentList.isEmpty()){
+                            String parentTreeCode = parentList.get(0).getTreecode();
+                            if (StringUtils.isBlank(parentTreeCode)){
+                                return R.error(item.getName()+"该树的父节点的编码不能为空");
+                            }else {
+                                //设置二级树节点的章节号规则:取出一级树编码.号后面的放在二级编码的第一位
+                                int i = parentTreeCode.indexOf(".");
+                                if (i!= -1){
+                                    String key = parentTreeCode.substring(i+1);
+                                    String result = item.getTreecode().replaceAll(".*\\.", key+".");
+                                    checkDetailWordVO.setChapterno(result);
+                                }
+                            }
+                        }
+                    }else {
+                        String[] fullIds = item.getFullpid().split(",");
+                        if (fullIds.length>2){
+                            //树等级为三级处理章节号
+                            String oneLevelKey = "";
+                            //根据当前节点过滤出一级树的列表
+                            List<ZhcxCommissionCheckDetailTreeDo> oneLevelList =  checkTreeList.stream().filter(info->info.getId().split("_")[0].equals(fullIds[1])).collect(Collectors.toList());
+                            if (!oneLevelList.isEmpty()){
+                                //取出一级树节点编码
+                                String oneLevelTreeCode = oneLevelList.get(0).getTreecode();
+                                if (StringUtils.isBlank(oneLevelTreeCode)){
+                                    return R.error(item.getName()+"该树的一级节点的编码不能为空");
+                                }else {
+                                    String oldPid = item.getPid();
+                                    //设置三级树节点的章节号规则:取出一级树编码.号后面的加上二级树编码.号后面的再加上自身.号后面的数据
+                                    int i = oneLevelTreeCode.indexOf(".");
+                                    if (i!= -1){
+                                        oneLevelKey = oneLevelTreeCode.substring(i+1);
+                                        String twoLevelKey = "";
+                                        List<ZhcxCommissionCheckDetailTreeDo> parentList =  checkTreeList.stream().filter(info->info.getId().split("_")[0].equals(oldPid.split("_")[0])).collect(Collectors.toList());
+                                        if (!parentList.isEmpty()){
+                                            //取出父树节点编码
+                                            String parentTreeCode = parentList.get(0).getTreecode();
+                                            if (StringUtils.isBlank(parentTreeCode)){
+                                                return R.error(item.getName()+"该树的父节点的编码不能为空");
+                                            }
+                                            int j = parentTreeCode.indexOf(".");
+                                            if (j!= -1){
+                                                twoLevelKey = parentTreeCode.substring(j+1);
+                                            }
+                                        }
+                                        String result = item.getTreecode().replaceAll(".*\\.", oneLevelKey+"."+twoLevelKey+".");
+                                        checkDetailWordVO.setChapterno(result);
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    String oldPid = item.getPid();
+                    String oldId = item.getId();
+                    resMap.put(oldPid.split("_")[0]+","+oldId.split("_")[0],checkDetailWordVO);
+                }else {
+                    String oldId = item.getId();
+                    //树等级为一级处理章节号
+                    if (StringUtils.isBlank(item.getTreecode())){
+                        return R.error(item.getName()+"树编码不能为空");
+                    }else {
+                        //设置一级树节点的章节号规则:去除.号前面的就行
+                        int i = item.getTreecode().indexOf(".");
+                        if (i!= -1){
+                            String key = item.getTreecode().substring(i+1);
+                            checkDetailWordVO.setChapterno(key);
+                        }
+                    }
+                    resMap.put(oldId.split("_")[0],checkDetailWordVO);
+                }
+            }
+            //子表数据
+            for (ZhcxCommissionCheckDetailDo item : list) {
+                String key = "";
+                String treeFullId = item.getTreefullid();
+                if (StringUtils.isBlank(treeFullId)){
+                    log.error("该内容节点treeFullId值为空:{}", item.getChtestcontent());
+                    return R.error(item.getChtestcontent()+"该内容节点数据有误");
+                }
+                int fillIdLength = treeFullId.split(",").length;
+                int i = treeFullId.indexOf(",");
+                if (fillIdLength<=3){
+                    key = treeFullId.substring(i+1);
+                    if(!resMap.containsKey(key)){
+                        log.error("不能导出树表的id:{}的报告", treeFullId);
+                        log.error("不能导出树表的key:{}的报告", key);
+                        log.error("该内容节点有错误:{}的报告", item.getChtestcontent());
+                        return R.error(item.getChtestcontent()+"该内容节点数据有误");
+                    }
+                }else {
+                    // 从第一个逗号之后开始找第二个逗号
+                    int j = treeFullId.indexOf(',', i + 1);
+                    key = treeFullId.substring(j+1);
+                    if(!resMap.containsKey(key)){
+                        log.error("不能导出树表的id:{}的报告", treeFullId);
+                        log.error("不能导出树表的key:{}的报告", key);
+                        log.error("章节号有无误:{}的报告", item.getChapterno());
+                        return R.error(item.getChtestcontent()+"该内容节点数据有误");
+                    }
+                }
+                ZhcxCommissionCheckDetailWordVO checkDetailWordVO = resMap.get(key);
+                List<ZhcxCommissionCheckDetailDo> detailList = checkDetailWordVO.getDetailList();
+                detailList.add(item);
+            }
+            List<ZhcxCommissionCheckDetailWordVO> resList = new LinkedList<>();
+            for (String s : resMap.keySet()) {
+                resList.add(resMap.get(s));
+            }
+            resList.sort((a,b)->{
+                LinkedList<String> a1 = new LinkedList<>(Arrays.asList(a.getChapterno().split("\\.")));
+                LinkedList<String> b1 = new LinkedList<>(Arrays.asList(b.getChapterno().split("\\.")));
+                return sort1(a1,b1);
+            });
+            try {
+                builder.moveToDocumentStart();
+                for (ZhcxCommissionCheckDetailWordVO res : resList) {
+                    if (res.getLevel()==1){
+                        buildTitleContent(builder, DEFAULT_FONT_NAME, StyleIdentifier.HEADING_1, 15, true, res.getChapterno()+"."+res.getTitleContent(), null);
+                    }else {
+                        if (res.getLevel()==2){
+                            buildTitleContent(builder, DEFAULT_FONT_NAME, StyleIdentifier.HEADING_2, 15, true,res.getChapterno()+"."+res.getTitleContent(), null);
+                        }else {
+                            buildTitleContent(builder, DEFAULT_FONT_NAME, StyleIdentifier.HEADING_3, 15, true, res.getChapterno()+"."+res.getTitleContent(), null);
+                        }
+                    }
+                    if(ObjectUtil.isNotEmpty(res.getDetailList())){
+                        // 插入表头
+                        builder.insertCell();
+                        buildTableTitleContent(builder,30,20,HeightRule.EXACTLY,TextOrientation.HORIZONTAL,DEFAULT_FONT_NAME,StyleIdentifier.NORMAL,
+                                9, true,"NO.",null);
+                        builder.insertCell();
+                        buildTableTitleContent(builder,40,20,HeightRule.EXACTLY,TextOrientation.HORIZONTAL,DEFAULT_FONT_NAME,StyleIdentifier.NORMAL,
+                                9, true,"模式1",null);
+                        builder.insertCell();
+                        buildTableTitleContent(builder,40,20,HeightRule.EXACTLY,TextOrientation.HORIZONTAL,DEFAULT_FONT_NAME,StyleIdentifier.NORMAL,
+                                9, true,"模式2",null);
+                        builder.insertCell();
+                        buildTableTitleContent(builder,60,20,HeightRule.EXACTLY,TextOrientation.HORIZONTAL,DEFAULT_FONT_NAME,StyleIdentifier.NORMAL,
+                                9, true,"测试内容中文",null);
+                        builder.insertCell();
+                        buildTableTitleContent(builder,60,20,HeightRule.EXACTLY,TextOrientation.HORIZONTAL,DEFAULT_FONT_NAME,StyleIdentifier.NORMAL,
+                                9, true,"测试内容英文",null);
+                        builder.insertCell();
+                        buildTableTitleContent(builder,60,20,HeightRule.EXACTLY,TextOrientation.HORIZONTAL,DEFAULT_FONT_NAME,StyleIdentifier.NORMAL,
+                                9, true,"标准测试方法",null);
+                        builder.insertCell();
+                        buildTableTitleContent(builder,60,20,HeightRule.EXACTLY,TextOrientation.HORIZONTAL,DEFAULT_FONT_NAME,StyleIdentifier.NORMAL,
+                                9, true,"测试地点",null);
+                        builder.endRow();
+                        int count =0;
+                        for (ZhcxCommissionCheckDetailDo detailWordVO:res.getDetailList()){
+                            count++;
+                            // 插入表格的第一行
+                            builder.insertCell();
+                            buildTableTextContent(builder,30,9,DEFAULT_FONT_NAME,false,String.valueOf(count));
+                            builder.insertCell();
+                            buildTableTextContent(builder,40,9,DEFAULT_FONT_NAME,false,detailWordVO.getClassification());
+                            builder.insertCell();
+                            buildTableTextContent(builder,40,9,DEFAULT_FONT_NAME,false,detailWordVO.getClassificationtwo());
+                            builder.insertCell();
+                            buildTableTextContent(builder,60,9,DEFAULT_FONT_NAME,false,detailWordVO.getChtestcontent());
+                            builder.insertCell();
+                            buildTableTextContent(builder,60,9,DEFAULT_FONT_NAME,false,detailWordVO.getEntestcontent());
+                            builder.insertCell();
+                            buildTableTextContent(builder,60,9,DEFAULT_FONT_NAME,false,detailWordVO.getTestmethod());
+                            builder.insertCell();
+                            String testAddress = "";
+                            if (StringUtils.isNotBlank(detailWordVO.getTestaddress())){
+                                // 10-> CX BASE长兴基地  20-> USER SITE码头现场
+                                if("20".equals(detailWordVO.getTestaddress())){
+                                    testAddress = "USER SITE码头现场";
+                                }
+                                if ("10".equals(detailWordVO.getTestaddress())){
+                                    testAddress = "CX BASE长兴基地";
+                                }
+                            }
+                            buildTableTextContent(builder,60,9,DEFAULT_FONT_NAME,false,testAddress);
+                            builder.endRow();
+                            // 设置行高为自适应
+                            builder.getRowFormat().setHeightRule(HeightRule.AUTO);
+                        }
+                        // 结束表格
+                        builder.endTable();
+                    }
+                }
+            } catch (Exception e) {
+                ExceptionUtils.printExceptionDetail(e,"移动至表头异常");
+                return R.error("移动至表头异常");
+            }
+            // 创建模板A的副本
+            Document cloneDocA = indexDoc[0].deepClone();
+            // 在副本上合并文档B
+            try {
+                cloneDocA.appendDocument(doc, ImportFormatMode.KEEP_SOURCE_FORMATTING);
+                if("export".equals(exportType)){
+                    exportWord(cloneDocA, response);
+                }else {
+                    previewWord(cloneDocA, response);
+                }
+            } catch (Exception e) {
+                ExceptionUtils.printExceptionDetail(e,"合并模版异常");
+                return R.error("合并模版异常");
+            }
+        }
+        return R.ok();
+    }
+
     private void insertDetailData(List<ZhcxCommissionCheckBaseInfoTreeDo> treeList, List<ZhcxCommissionCheckBaseInfoDetailDo> detailList) {
         //设置标准库子表的三级分类的id和树的全路径treefullid字段
         if (!treeList.isEmpty()&&!detailList.isEmpty()){

+ 78 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxPmqManagementRecoredServiceImpl.java

@@ -14,6 +14,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.rongwei.bsentity.dto.ZhcxPmqManagementDistributionDTO;
 import com.rongwei.bsentity.dto.sqlServer.JuFileInfoDto;
 import com.rongwei.bsentity.dto.sqlServer.JutInfo;
+import com.rongwei.bsentity.dto.sqlServer.RecoredDistributionDTO;
 import com.rongwei.rwadmincommon.system.vo.SysUserVo;
 import com.rongwei.rwcommon.base.R;
 import com.rongwei.rwcommon.utils.SecurityUtil;
@@ -574,4 +575,81 @@ public class ZhcxPmqManagementRecoredServiceImpl extends ServiceImpl<ZhcxPmqMana
         }
         return R.ok("批量派单成功");
     }
+
+    @Override
+    public R closedBatchList(RecoredDistributionDTO dto) {
+        // 关闭状态
+        String status = dto.getStatus();
+        // 派单状态
+        String dispatchstatus = dto.getDispatchstatus();
+        // recored表的id集合
+        List<String> ids = dto.getIds();
+        // 获取当前用户
+        SysUserVo user = CommonUtils.getCurrentUser();
+        /*SysUserVo user = new SysUserVo();
+        user.setId("222");
+        user.setName("xuan");*/
+        if(Objects.isNull(user) && !StringUtils.isEmpty(user.getId())){
+            return R.error("无法获取当前用户信息");
+        }
+        // 删除数据
+        baseMapper.deleteDistributionByPid(ids);
+        baseMapper.deleteDistributionDetailByPid(ids);
+        // 第2.5层集合
+        List<ZhcxPmqManagementDistributionDo> resultList1 = new ArrayList<>();
+        // 第三层集合
+        List<ZhcxPmqManagementDistributionDetailDo> resultList2 = new ArrayList<>();
+        // 第一层主表ID
+        List<String> managementIds = new ArrayList<>();
+        for (String id : ids) {
+            // 第二层数据
+            ZhcxPmqManagementRecoredDo recoredDo = this.getById(id);
+            // 去构建2.5层数据
+            List<ZhcxPmqManagementDistributionDo> list = baseMapper.getDistributionsByPidSimple(id);
+            for (ZhcxPmqManagementDistributionDo zhcxPmqManagementDistributionDo : list) {
+                if(!StringUtils.isEmpty(zhcxPmqManagementDistributionDo.getMachineid())) {
+                    ZhcxPmqManagementDistributionDo result = new ZhcxPmqManagementDistributionDo();
+                    String distributionId = SecurityUtil.getUUID();
+                    result.setId(distributionId);
+                    result.setPid(id);
+                    result.setProjectid(zhcxPmqManagementDistributionDo.getProjectid());
+                    result.setProjectname(zhcxPmqManagementDistributionDo.getProjectname());
+                    result.setProjectno(zhcxPmqManagementDistributionDo.getProjectno());
+                    result.setMachineid(zhcxPmqManagementDistributionDo.getMachineid());
+                    result.setMachineno(zhcxPmqManagementDistributionDo.getMachineno());
+                    result.setSerialnumber(zhcxPmqManagementDistributionDo.getSerialnumber());
+                    result.setRemark("批量派单");
+                    result.setConfirmerid(user.getId());
+                    result.setConfirmer(user.getName());
+                    result.setStatus(status); // 关闭状态
+                    resultList1.add(result);
+                    // 第三层数据
+                    ZhcxPmqManagementDistributionDetailDo bean = new ZhcxPmqManagementDistributionDetailDo();
+                    BeanUtil.copyProperties(result, bean);
+                    bean.setDistributid(distributionId);
+                    bean.setId(SecurityUtil.getUUID());
+                    resultList2.add(bean);
+                }
+            }
+            // 更新第二层表数据
+            recoredDo.setClosestatus(status);
+            recoredDo.setDispatchstatus(dispatchstatus);
+            this.updateById(recoredDo);
+            // 第一层主表id
+            managementIds.add(recoredDo.getPmqmid());
+        }
+        // 保存2.5层 3层数据
+        if(!resultList1.isEmpty()){
+            zhcxPmqManagementDistributionService.saveBatch(resultList1);
+            zhcxPmqManagementDistributionDetailService.saveBatch(resultList2);
+        }
+        if(!managementIds.isEmpty()){
+            List<String> managementids = managementIds.stream().distinct().collect(Collectors.toList());
+            if(!managementids.isEmpty()){
+                // 异步去更新第一层状态
+                managementMapService.updateClosedStateInFirstFloor(managementids);
+            }
+        }
+        return R.ok("批量操作成功");
+    }
 }

+ 2 - 3
business-common/src/main/resources/mybatis/business/ZhcxCommissionCheckDao.xml

@@ -35,7 +35,7 @@
             FROM
             INCONTROL.ZHCX_COMMISSION_CHECK t2
             WHERE
-            t2.ID = #{masterId} AND DELETED ='0' ) AND (STATUS !='发运' OR  STATUS IS NULL)
+            t2.ID = #{masterId} AND DELETED ='0' ) AND (STATUS ='发运' OR  STATUS = '已交机')
     </select>
 
     <select id="getOtherShippeCheckList" resultType="com.rongwei.bsentity.domain.ZhcxCommissionCheckDo">
@@ -73,8 +73,7 @@
                 JOIN INCONTROL.ZHCX_PROJECT_DEVICE_NUMBER nu ON
                 c.MACHINEID = nu.ID
                     AND nu.DELETED = '0'
-                    AND (nu.STATUS != '发运'
-		OR nu.STATUS IS NULL)
+                    AND ((nu.STATUS != '发运' and nu.STATUS != '已交机') OR nu.STATUS IS NULL)
         WHERE
             c.PROJECTCODE = (
                 SELECT

+ 1 - 2
business-common/src/main/resources/mybatis/business/ZhcxPmqManagementDistributionDao.xml

@@ -48,8 +48,7 @@
         FROM INCONTROL.ZHCX_PMQ_MANAGEMENT_DISTRIBUTION a
         WHERE a.DELETED = '0'
           AND a.PID = #{pid}
-          AND a.CONFIRMERID IS NOT NULL
-          AND a.CONFIRMERID != ''
+          AND a.CONFIRMERID > '';
     </select>
 
     <select id="selectListByPid"

+ 54 - 0
business-common/src/main/resources/mybatis/business/ZhcxPmqManagementRecoredDao.xml

@@ -40,6 +40,38 @@
             TO_NUMBER(REPLACE(p.MACHINENO, '#', ''))
     </select>
 
+    <select id="getDistributionsByPidSimple"
+            resultType="com.rongwei.bsentity.domain.ZhcxPmqManagementDistributionDo">
+        SELECT
+            recored.ID AS PID,
+            manage.PROJECTID AS PROJECTID,
+            p.MACHINEID AS MACHINEID,
+            p.MACHINENO AS MACHINENO,
+            manage.PROJECTNO AS PROJECTNO,
+            manage.PROJECTNAME AS PROJECTNAME,
+            recored.SEQNO AS SERIALNUMBER
+        FROM
+            INCONTROL.ZHCX_PMQ_MANAGEMENT_RECORED recored
+                LEFT JOIN INCONTROL.ZHCX_PMQ_MANAGEMENT manage ON manage.ID = recored.PMQMID AND manage.DELETED = '0'
+                LEFT JOIN (
+                SELECT
+                    n.ID AS MACHINEID,
+                    n.DEVICE_NUMBER AS MACHINENO,
+                    p.ID AS PROJECTID
+                FROM
+                    INCONTROL.ZHCX_PROJECT_DEVICE_NUMBER n
+                        JOIN INCONTROL.ZHCX_PROJECT_MANAGE p ON
+                        p.ID = n.PID
+                            AND p.DELETED = '0'
+                WHERE
+                    n.DELETED = '0'
+            )p ON p.PROJECTID = manage.PROJECTID
+        WHERE
+            recored.DELETED = '0' AND recored.ID = #{id}
+        ORDER BY
+            TO_NUMBER(REPLACE(p.MACHINENO, '#', ''))
+    </select>
+
     <update id="updateFilesById">
         UPDATE
             INCONTROL.ZHCX_PMQ_MANAGEMENT_RECORED
@@ -48,4 +80,26 @@
         WHERE
             ID = #{id}
     </update>
+
+    <update id="deleteDistributionByPid">
+        UPDATE
+            INCONTROL.ZHCX_PMQ_MANAGEMENT_DISTRIBUTION
+        SET
+            DELETED ='1',REMARK='批量派单删除'
+        WHERE PID in
+        <foreach collection="ids" item="id" separator="," open="(" close=")">
+            #{id}
+        </foreach>
+    </update>
+
+    <update id="deleteDistributionDetailByPid">
+        UPDATE
+            INCONTROL.ZHCX_PMQ_MANAGEMENT_DISTRIBUTION_DETAIL
+        SET
+            DELETED ='1',REMARK='批量派单删除'
+        WHERE PID in
+        <foreach collection="ids" item="id" separator="," open="(" close=")">
+            #{id}
+        </foreach>
+    </update>
 </mapper>

+ 1 - 1
business-entity/src/main/java/com/rongwei/bsentity/dto/sqlServer/DistributionDTO.java

@@ -11,7 +11,7 @@ import java.util.List;
 @Data
 public class DistributionDTO {
 
-    //第层表数据
+    //第2.5层表数据
     List<ZhcxPmqManagementDistributionDTO> list;
 
     // 关闭状态

+ 20 - 0
business-entity/src/main/java/com/rongwei/bsentity/dto/sqlServer/RecoredDistributionDTO.java

@@ -0,0 +1,20 @@
+package com.rongwei.bsentity.dto.sqlServer;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 三单批量派单接收实体类
+ */
+@Data
+public class RecoredDistributionDTO {
+    // zhcxPmqManagementRecored_ids
+    List<String> ids;
+
+    // 关闭状态
+    String status;
+
+    // 派单状态
+    String dispatchstatus;
+}

+ 11 - 0
business-server/src/main/java/com/rongwei/bsserver/controller/ZhcxCommissionCheckController.java

@@ -74,6 +74,17 @@ public class ZhcxCommissionCheckController {
     public R wordExport(@RequestBody Map<String,Object> map, HttpServletResponse response) throws Exception {
         try {
             return commissionCheckService.exportFile(map,response);
+        } catch (Exception e) {
+            ExceptionUtils.printExceptionDetail(e,"试车报告导出/预览异常");
+            return R.error("试车报告导出/预览异常");
+        }
+    }
+
+    @PostMapping("wordExportPrj")
+    @ApiOperation("试车检查报告word导出")
+    public R wordExportPrj(@RequestBody Map<String,Object> map, HttpServletResponse response) throws Exception {
+        try {
+            return commissionCheckService.wordExportPrj(map,response);
         } catch (Exception e) {
             ExceptionUtils.printExceptionDetail(e,"试车报告导出异常");
             return R.error("试车报告导出异常");

+ 16 - 2
business-server/src/main/java/com/rongwei/bsserver/controller/ZhcxPmqManagementRecoredController.java

@@ -5,6 +5,7 @@ import com.rongwei.bscommon.sys.service.ZhcxPmqManagementRecoredService;
 import com.rongwei.bsentity.domain.ZhcxPmqManagementDistributionDo;
 import com.rongwei.bsentity.dto.ZhcxPmqManagementDistributionDTO;
 import com.rongwei.bsentity.dto.sqlServer.DistributionDTO;
+import com.rongwei.bsentity.dto.sqlServer.RecoredDistributionDTO;
 import com.rongwei.rwcommon.base.R;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
@@ -55,7 +56,7 @@ public class ZhcxPmqManagementRecoredController {
      * @return
      */
     @PostMapping("/getListData")
-    @ApiOperation("三单派单页面右边列表数据源")
+    @ApiOperation("三单派单页面右边列表数据源(废弃接口)")
     public R getListData(@RequestBody Map<String,Object> map){
         try {
             if(Objects.isNull(map.get("queryId"))){
@@ -87,7 +88,7 @@ public class ZhcxPmqManagementRecoredController {
     }
 
     @PostMapping("/updateBatchList")
-    @ApiOperation("三单派单页面批量派单处理数据接口")
+    @ApiOperation("三单派单页面批量派单弹窗处理数据接口")
     public R updateBatchList(@RequestBody DistributionDTO dto){
         try {
             if(dto.getList().isEmpty()){return R.error("空数组");}
@@ -100,5 +101,18 @@ public class ZhcxPmqManagementRecoredController {
             return R.error("三单派单批量派单失败");
         }
     }
+
+    @PostMapping("/closedBatchList")
+    @ApiOperation("三单派单页面批量NA/批量关闭处理数据接口")
+    public R closedBatchList(@RequestBody RecoredDistributionDTO dto){
+        try {
+            if(dto.getIds().isEmpty()){return R.error("空数组");}
+            if(dto.getStatus().isEmpty()){return R.error("关闭状态为空");}
+            return managementRecoredService.closedBatchList(dto);
+        } catch (Exception e) {
+            log.info(String.valueOf(e));
+            return R.error("三单派单批量派单失败");
+        }
+    }
 }