ソースを参照

核心检验指标Word导出

DLC 5 ヶ月 前
コミット
1794632e9a

+ 15 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/dao/ZhcxPersistentManageDao.java

@@ -1,6 +1,9 @@
 package com.rongwei.bscommon.sys.dao;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.rongwei.bsentity.domain.ZhcxCheckBeforeQualifiedDo;
+import com.rongwei.bsentity.domain.ZhcxCoreInspectionDetailDo;
+import com.rongwei.bsentity.domain.ZhcxCoreInspectionIndicatorsTemplateDo;
 import com.rongwei.bsentity.domain.ZhcxPersistentManageDo;
 import com.rongwei.bsentity.vo.OrganizationVo;
 import com.rongwei.bsentity.vo.PersistentVo;
@@ -75,4 +78,16 @@ public interface ZhcxPersistentManageDao extends BaseMapper<ZhcxPersistentManage
     @Select("SELECT ORGID AS orgId,ORGNAME AS orgName,SORT AS sort,NUM AS userCount \n" +
             " FROM ZHCX_DEPT_PEOPLE_COUNT WHERE YEAR = #{year} AND MONTH = #{month} AND ORGCODE =#{orgCode}")
     List<OrganizationVo> getDeptUserCount(String year, String month, String orgCode);
+
+    @Select("SELECT * FROM ZHCX_CORE_INSPECTION_INDICATORS_TEMPLATE WHERE DELETED ='0' \n" +
+            "ORDER BY CAST(SUBSTRING_INDEX(REPLACE(TRIM(INSPECTION_CODE),'.','-'),'-',1) AS INT),\n" +
+            "\tCAST(SUBSTRING_INDEX(SUBSTRING_INDEX(REPLACE(TRIM(INSPECTION_CODE),'.','-'),'-',2),'-',-1) AS INT),\n" +
+            "\tCAST(REPLACE(REPLACE(REPLACE(REPLACE(TRIM(INSPECTION_CODE),'-',''),'.',''),'A',1),'B',2) AS INT)")
+    List<ZhcxCoreInspectionIndicatorsTemplateDo> getCoreInspectionIndicatorsTemplateDos();
+
+    @Select("SELECT * FROM ZHCX_CORE_INSPECTION_DETAIL WHERE DELETED ='0'")
+    List<ZhcxCoreInspectionDetailDo> getCoreInspectionDetailDos();
+
+    @Select("SELECT * FROM ZHCX_CHECK_BEFORE_QUALIFIED WHERE DELETED ='0'")
+    List<ZhcxCheckBeforeQualifiedDo> getCheckBeforeQualifiedDos();
 }

+ 2 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/service/ZhcxPersistentManageService.java

@@ -19,4 +19,6 @@ public interface ZhcxPersistentManageService extends IService<ZhcxPersistentMana
     void saveDeptUserCount();
 
     void downloadReportData(Map<String, Object> map, HttpServletResponse response);
+
+    void jyWordExport(Map<String, Object> map, HttpServletResponse response);
 }

+ 205 - 151
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxPersistentManageServiceImpl.java

@@ -3,23 +3,20 @@ package com.rongwei.bscommon.sys.service.impl;
 import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.io.FileUtil;
 import cn.hutool.core.util.ObjectUtil;
-import com.aspose.cells.*;
 import com.aspose.cells.BorderType;
 import com.aspose.cells.Style;
-import com.aspose.words.*;
+import com.aspose.cells.*;
 import com.aspose.words.Cell;
 import com.aspose.words.Range;
 import com.aspose.words.Row;
-import com.aspose.words.SaveFormat;
-import com.aspose.words.SaveOptions;
+import com.aspose.words.*;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.rongwei.bscommon.sys.dao.ZhcxPersistentManageDao;
 import com.rongwei.bscommon.sys.service.ZhcxDeptPeopleCountService;
 import com.rongwei.bscommon.sys.service.ZhcxPersistentManageService;
-import com.rongwei.bsentity.domain.ZhcxDeptPeopleCountDo;
-import com.rongwei.bsentity.domain.ZhcxPersistentManageDo;
+import com.rongwei.bsentity.domain.*;
 import com.rongwei.bsentity.dto.ZhcxPersistentManageDto;
 import com.rongwei.bsentity.dto.ZhcxPersistentReportDto;
 import com.rongwei.bsentity.vo.FormDataVO;
@@ -54,8 +51,8 @@ import java.time.DayOfWeek;
 import java.time.LocalDate;
 import java.time.ZoneId;
 import java.time.temporal.WeekFields;
-import java.util.*;
 import java.util.List;
+import java.util.*;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
@@ -84,43 +81,44 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
     private static final String DEPT_CODE = "0900";
     private static final Color[] COLORS = {Color.fromArgb(205, 223, 242),
             Color.fromArgb(249, 214, 194)};
+
     @Override
     public void wordExport(Map<String, Object> map, HttpServletResponse response) {
         Object periodObj = map.get("period");
         Object yearObj = map.get("year");
         Object paramsObj = map.get("params");
-        if(ObjectUtil.isEmpty(periodObj)){
+        if (ObjectUtil.isEmpty(periodObj)) {
             throw new CustomException("缺少周期参数");
         }
-        if(!ObjectUtil.isEmpty(paramsObj)){
+        if (!ObjectUtil.isEmpty(paramsObj)) {
             String params = (String) map.get("params");
-            map.put("params",params.replaceAll("=-=", "and"));
-        }else{
+            map.put("params", params.replaceAll("=-=", "and"));
+        } else {
             map.remove("params");
         }
         String period = (String) periodObj;
         String year = (String) yearObj;
-        map.put("period","第"+period+"期");
+        map.put("period", "第" + period + "期");
         List<ZhcxPersistentManageDo> list = zhcxPersistentManageDao.listData(map);
-        if(list.size() == 0){
+        if (list.size() == 0) {
             throw new CustomException("当前周期暂无数据");
         }
-        if(list.size() > 0){
-            list.forEach(ev ->{
+        if (list.size() > 0) {
+            list.forEach(ev -> {
                 String sitepic = ev.getSitepic();
                 BigDecimal punishconfirmamount = ev.getPunishconfirmamount();
                 String type = ev.getType();
-                if(type.contains("处罚") && punishconfirmamount != null){
+                if (type.contains("处罚") && punishconfirmamount != null) {
                     ev.setAmount(punishconfirmamount);
                 }
-                if(StringUtils.isNotBlank(sitepic)){
+                if (StringUtils.isNotBlank(sitepic)) {
                     String[] splits = sitepic.split("\\^_\\^");
                     Optional<String> firstId = Arrays.stream(splits)
                             .filter(s -> s.contains(".jpg")
                                     || s.contains(".jpeg")
                                     || s.contains(".png"))
                             .findFirst();
-                    if(firstId.isPresent()){
+                    if (firstId.isPresent()) {
                         ev.setSitepic(firstId.get());
                     }
                 }
@@ -138,12 +136,12 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
             AtomicInteger i = new AtomicInteger();
             groupList.forEach((k, v) -> {
                 FormData formData = new FormData();
-                List<Map<String,Object>> mainDataList = new ArrayList<>();
-                List<List<Map<String,Object>>> slaveTableDataList = new ArrayList<>();
-                Map<String,Object> mainMap = new HashMap<>(16);
-                mainMap.put("checkDate",reStartTime+"-"+reEndTime);
-                mainMap.put("type",k);
-                mainMap.put("period","第"+period+"期");
+                List<Map<String, Object>> mainDataList = new ArrayList<>();
+                List<List<Map<String, Object>>> slaveTableDataList = new ArrayList<>();
+                Map<String, Object> mainMap = new HashMap<>(16);
+                mainMap.put("checkDate", reStartTime + "-" + reEndTime);
+                mainMap.put("type", k);
+                mainMap.put("period", "第" + period + "期");
                 Map<String, BigDecimal> totalAmountByCategory = v.stream()
                         .collect(Collectors.groupingBy(
                                 ZhcxPersistentManageDo::getType,
@@ -154,20 +152,20 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
                 List<ZhcxPersistentManageDo> rewardList = new ArrayList<>();
                 List<ZhcxPersistentManageDo> punishList = new ArrayList<>();
                 subList.forEach((k1, v1) -> {
-                    if(k1.contains("奖励")){
-                        mainMap.put("rewardCount",v1.size());
+                    if (k1.contains("奖励")) {
+                        mainMap.put("rewardCount", v1.size());
                         rewardList.addAll(v1);
-                    }else{
-                        mainMap.put("punishCount",v1.size());
+                    } else {
+                        mainMap.put("punishCount", v1.size());
                         punishList.addAll(v1);
                     }
 
                 });
                 totalAmountByCategory.forEach((k1, v1) -> {
-                    if(k1.contains("奖励")){
-                        mainMap.put("rewardAmount",v1);
-                    }else{
-                        mainMap.put("punishAmount",v1);
+                    if (k1.contains("奖励")) {
+                        mainMap.put("rewardAmount", v1);
+                    } else {
+                        mainMap.put("punishAmount", v1);
                     }
                 });
                 List<Map<String, Object>> rewardMaps = convertList(rewardList, ZhcxPersistentManageDo.class);
@@ -180,24 +178,24 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
                 if (k.contains("焊缝一次成型不打磨奖励报告")) {
                     SysFileItemDo fileTemp = sysFileItemService.getById("b39c12eeb3464596b70f1ce4e96b922f");
                     try {
-                        if(ObjectUtil.isNull(doc[0])) {
+                        if (ObjectUtil.isNull(doc[0])) {
                             doc[0] = ExcelExportUtil.fillWordDataByMap(fileTemp.getFullpath(), formData);
                         } else {
                             Document docTemp = ExcelExportUtil.fillWordDataByMap(fileTemp.getFullpath(), formData);
                             doc[0].appendDocument(docTemp, ImportFormatMode.KEEP_DIFFERENT_STYLES);
                         }
                     } catch (Exception e) {
-                        log.info("顽症导出word失败:"+e);
+                        log.info("顽症导出word失败:" + e);
                     }
-                }else if (k.contains("油漆“零破坏”专项")){
+                } else if (k.contains("油漆“零破坏”专项")) {
                     FormDataVO formDataVo = new FormDataVO();
                     formDataVo.setMainDataList(mainDataList);
 
-                    map.put("type",k);
+                    map.put("type", k);
                     List<ZhcxPersistentWordVO> zhcxPersistentManageDos = zhcxPersistentManageDao.groupByList(map);
                     List<ZhcxPersistentWordVO> listData = new ArrayList<>();
-                    zhcxPersistentManageDos.forEach(ev->{
-                        if("处罚".equals(ev.getType())){
+                    zhcxPersistentManageDos.forEach(ev -> {
+                        if ("处罚".equals(ev.getType())) {
                             ev.setPunishAmount(ev.getAmount());
                             ev.setPunishCount(ev.getCount());
                             listData.add(ev);
@@ -209,14 +207,14 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
                     formDataVo.setSlaveTableDataList(slaveTableDataList);
                     try {
                         SysFileItemDo fileTemp = sysFileItemService.getById("9aebb0bd84d8471b8ed954f5557cb775");
-                        if(ObjectUtil.isNull(doc[0])) {
+                        if (ObjectUtil.isNull(doc[0])) {
                             doc[0] = fillWordDataByMap(fileTemp.getFullpath(), formDataVo);
                         } else {
                             Document docTemp = fillWordDataByMap(fileTemp.getFullpath(), formDataVo);
                             doc[0].appendDocument(docTemp, ImportFormatMode.KEEP_DIFFERENT_STYLES);
                         }
                     } catch (Exception e) {
-                        log.info("顽症导出word失败:"+e);
+                        log.info("顽症导出word失败:" + e);
                     }
                     Map<String, List<ZhcxPersistentManageDo>> typeList = v.stream()
                             .collect(Collectors.groupingBy(ZhcxPersistentManageDo::getType));
@@ -227,17 +225,17 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
                         }
                     });
                     if (punishListData.size() > 0) {
-                        initWeekWord(doc, punishListData,"692aacdfda804e989cc880bfe2d8b764");
+                        initWeekWord(doc, punishListData, "692aacdfda804e989cc880bfe2d8b764");
                     }
-                }else if (k.contains("面漆后动火")){
+                } else if (k.contains("面漆后动火")) {
                     FormDataVO formDataVo = new FormDataVO();
                     formDataVo.setMainDataList(mainDataList);
 
-                    map.put("type",k);
+                    map.put("type", k);
                     List<ZhcxPersistentWordVO> zhcxPersistentManageDos = zhcxPersistentManageDao.groupByList(map);
                     List<ZhcxPersistentWordVO> listData = new ArrayList<>();
-                    zhcxPersistentManageDos.forEach(ev->{
-                        if("处罚".equals(ev.getType())){
+                    zhcxPersistentManageDos.forEach(ev -> {
+                        if ("处罚".equals(ev.getType())) {
                             ev.setPunishAmount(ev.getAmount());
                             ev.setPunishCount(ev.getCount());
                             listData.add(ev);
@@ -249,14 +247,14 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
                     formDataVo.setSlaveTableDataList(slaveTableDataList);
                     try {
                         SysFileItemDo fileTemp = sysFileItemService.getById("70fc8489a6604473a5b745e3b9e8fffb");
-                        if(ObjectUtil.isNull(doc[0])) {
+                        if (ObjectUtil.isNull(doc[0])) {
                             doc[0] = fillWordDataByMap(fileTemp.getFullpath(), formDataVo);
                         } else {
                             Document docTemp = fillWordDataByMap(fileTemp.getFullpath(), formDataVo);
                             doc[0].appendDocument(docTemp, ImportFormatMode.KEEP_DIFFERENT_STYLES);
                         }
                     } catch (Exception e) {
-                        log.info("顽症导出word失败:"+e);
+                        log.info("顽症导出word失败:" + e);
                     }
                     Map<String, List<ZhcxPersistentManageDo>> typeList = v.stream()
                             .collect(Collectors.groupingBy(ZhcxPersistentManageDo::getType));
@@ -267,71 +265,71 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
                         }
                     });
                     if (punishListData.size() > 0) {
-                        initWeekWord(doc, punishListData,"bc5442ad2f924f7fa17f1949ec8ebc8c");
+                        initWeekWord(doc, punishListData, "bc5442ad2f924f7fa17f1949ec8ebc8c");
                     }
-                }else if (k.contains("构件油漆后损伤专项督查")){
+                } else if (k.contains("构件油漆后损伤专项督查")) {
                     SysFileItemDo fileTemp = sysFileItemService.getById("427ec6c843914718ad12359c8cf70da7");
                     try {
-                        if(ObjectUtil.isNull(doc[0])) {
+                        if (ObjectUtil.isNull(doc[0])) {
                             doc[0] = ExcelExportUtil.fillWordDataByMap(fileTemp.getFullpath(), formData);
                         } else {
                             Document docTemp = ExcelExportUtil.fillWordDataByMap(fileTemp.getFullpath(), formData);
                             doc[0].appendDocument(docTemp, ImportFormatMode.KEEP_DIFFERENT_STYLES);
                         }
                         if (rewardList.size() > 0) {
-                            initWeekWord(doc, rewardList,"a808c450f6484ae18baa5afc4a8fc112");
+                            initWeekWord(doc, rewardList, "a808c450f6484ae18baa5afc4a8fc112");
                         }
                     } catch (Exception e) {
-                        log.info("顽症导出word失败:"+e);
+                        log.info("顽症导出word失败:" + e);
                     }
-                }else if (k.contains("构件“不落地”专项督查")){
+                } else if (k.contains("构件“不落地”专项督查")) {
                     SysFileItemDo fileTemp = sysFileItemService.getById("fe6181ceba7b444299046dfcc5b20a48");
                     try {
-                        if(ObjectUtil.isNull(doc[0])) {
+                        if (ObjectUtil.isNull(doc[0])) {
                             doc[0] = ExcelExportUtil.fillWordDataByMap(fileTemp.getFullpath(), formData);
                         } else {
                             Document docTemp = ExcelExportUtil.fillWordDataByMap(fileTemp.getFullpath(), formData);
                             doc[0].appendDocument(docTemp, ImportFormatMode.KEEP_DIFFERENT_STYLES);
                         }
                         if (rewardList.size() > 0) {
-                            initWeekWord(doc, rewardList,"0291bfa0b2b04293a1e25d42b07b5e33");
+                            initWeekWord(doc, rewardList, "0291bfa0b2b04293a1e25d42b07b5e33");
                         }
                     } catch (Exception e) {
-                        log.info("顽症导出word失败:"+e);
+                        log.info("顽症导出word失败:" + e);
                     }
-                }else if (k.contains("“工完料净场地清”专项督查")){
+                } else if (k.contains("“工完料净场地清”专项督查")) {
                     SysFileItemDo fileTemp = sysFileItemService.getById("d0f806c658104eeda1f46a592ca824f2");
                     try {
-                        if(ObjectUtil.isNull(doc[0])) {
+                        if (ObjectUtil.isNull(doc[0])) {
                             doc[0] = ExcelExportUtil.fillWordDataByMap(fileTemp.getFullpath(), formData);
                         } else {
                             Document docTemp = ExcelExportUtil.fillWordDataByMap(fileTemp.getFullpath(), formData);
                             doc[0].appendDocument(docTemp, ImportFormatMode.KEEP_DIFFERENT_STYLES);
                         }
                         if (rewardList.size() > 0) {
-                            initWeekWord(doc, rewardList,"5b054a5cb2d84bd4b355eadd668fc6e6");
+                            initWeekWord(doc, rewardList, "5b054a5cb2d84bd4b355eadd668fc6e6");
                         }
                     } catch (Exception e) {
-                        log.info("顽症导出word失败:"+e);
+                        log.info("顽症导出word失败:" + e);
                     }
-                }else if (k.contains("每周质量顽症督查")){
+                } else if (k.contains("每周质量顽症督查")) {
                     FormDataVO formDataVo = new FormDataVO();
                     formDataVo.setMainDataList(mainDataList);
 
-                    map.put("type","每周质量顽症督查");
+                    map.put("type", "每周质量顽症督查");
                     List<ZhcxPersistentWordVO> zhcxPersistentManageDos = zhcxPersistentManageDao.groupByList(map);
                     List<ZhcxPersistentWordVO> listData = new ArrayList<>();
-                    zhcxPersistentManageDos.forEach(ev->{
-                        if("处罚".equals(ev.getType())){
+                    zhcxPersistentManageDos.forEach(ev -> {
+                        if ("处罚".equals(ev.getType())) {
                             ev.setPunishAmount(ev.getAmount());
                             ev.setPunishCount(ev.getCount());
                             listData.add(ev);
                         }
                     });
-                    zhcxPersistentManageDos.forEach(ev->{
-                        if("奖励".equals(ev.getType())){
-                            listData.forEach(item->{
-                                if(item.getFirstorgname().equals(ev.getFirstorgname())){
+                    zhcxPersistentManageDos.forEach(ev -> {
+                        if ("奖励".equals(ev.getType())) {
+                            listData.forEach(item -> {
+                                if (item.getFirstorgname().equals(ev.getFirstorgname())) {
                                     item.setRewardAmount(ev.getAmount());
                                 }
                             });
@@ -342,7 +340,7 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
                                     return false;
                                 }
                             });
-                            if(!b){
+                            if (!b) {
                                 ev.setRewardAmount(ev.getAmount());
                                 listData.add(ev);
                             }
@@ -354,14 +352,14 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
                     formDataVo.setSlaveTableDataList(slaveTableDataList);
                     try {
                         SysFileItemDo fileTemp = sysFileItemService.getById("dc0d69edf9e64f1abd151b1441411002");
-                        if(ObjectUtil.isNull(doc[0])) {
+                        if (ObjectUtil.isNull(doc[0])) {
                             doc[0] = fillWordDataByMap(fileTemp.getFullpath(), formDataVo);
                         } else {
                             Document docTemp = fillWordDataByMap(fileTemp.getFullpath(), formDataVo);
                             doc[0].appendDocument(docTemp, ImportFormatMode.KEEP_DIFFERENT_STYLES);
                         }
                     } catch (Exception e) {
-                        log.info("顽症导出word失败:"+e);
+                        log.info("顽症导出word失败:" + e);
                     }
                     Map<String, List<ZhcxPersistentManageDo>> typeList = v.stream()
                             .collect(Collectors.groupingBy(ZhcxPersistentManageDo::getType));
@@ -370,20 +368,20 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
                     typeList.forEach((k1, v1) -> {
                         if (k1.contains("处罚")) {
                             punishListData.addAll(v1);
-                        }else{
+                        } else {
                             rewardListData.addAll(v1);
                         }
                     });
                     if (punishListData.size() > 0) {
-                        initWeekWord(doc, punishListData,"fc9d0bd3d7354037afa6092d6a64ed5a");
+                        initWeekWord(doc, punishListData, "fc9d0bd3d7354037afa6092d6a64ed5a");
                     }
                     if (rewardListData.size() > 0) {
-                        initWeekWord(doc, rewardListData,"73ae110bb9e84aeab985c14d4678670b");
+                        initWeekWord(doc, rewardListData, "73ae110bb9e84aeab985c14d4678670b");
                     }
 
                 }
                 i.getAndIncrement();
-                if(i.get() < groupList.size() - 1) {
+                if (i.get() < groupList.size() - 1) {
                     if (!ObjectUtil.isNull(doc[0])) {
                         WordHelpUtils.addPageBreak(doc[0]);
                     }
@@ -395,7 +393,7 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
                 response.setHeader("Content-Disposition", "attachment;filename=" + "报告");
                 doc[0].save(response.getOutputStream(), com.aspose.words.SaveOptions.createSaveOptions(com.aspose.words.SaveFormat.DOCX));
             } catch (Exception e) {
-                log.error("顽症导出word失败:"+e);
+                log.error("顽症导出word失败:" + e);
                 throw new CustomException("导出失败");
             }
         }
@@ -405,16 +403,16 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
     public void syncWzPlatform(List<String> ids) {
         //zhcxPersistentManageDao.syncWzDataUrl
         LambdaQueryWrapper<ZhcxPersistentManageDo> queryWrapper = Wrappers.lambdaQuery();
-        queryWrapper.in(ZhcxPersistentManageDo::getId,ids);
+        queryWrapper.in(ZhcxPersistentManageDo::getId, ids);
         List<ZhcxPersistentManageDo> list = this.list(queryWrapper);
         List<ZhcxPersistentManageDto> dtoList = new ArrayList<>();
-        if(ObjectUtil.isEmpty(list)) {
-            return ;
+        if (ObjectUtil.isEmpty(list)) {
+            return;
         }
         List<ZhcxPersistentManageDo> updateList = new ArrayList<>();
         ZhcxPersistentManageDo manageDo;
         ZhcxPersistentManageDto manageDto;
-        for(ZhcxPersistentManageDo persistentManageDo : list){
+        for (ZhcxPersistentManageDo persistentManageDo : list) {
             manageDo = new ZhcxPersistentManageDo();
             manageDto = new ZhcxPersistentManageDto();
             manageDo.setId(persistentManageDo.getId());
@@ -427,10 +425,10 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
             Date checkdate = manageDto.getCheckdate();
             SysOrganizationDo curOrgTopParent = sysOrganizationService.getCurOrgTopParent(persistentManageDo.getFirstorgid());
             manageDto.setBaseorgname(curOrgTopParent.getFullname());
-            manageDto.setFineNo(fill + "("+(checkdate.getYear()+1900)+")" +period);
+            manageDto.setFineNo(fill + "(" + (checkdate.getYear() + 1900) + ")" + period);
             if (rectifystatus.equals("未整改")) {
                 manageDto.setRectifystatus("0");
-            }else if (rectifystatus.equals("已整改")) {
+            } else if (rectifystatus.equals("已整改")) {
                 manageDto.setRectifystatus("1");
             }
             dtoList.add(manageDto);
@@ -444,12 +442,12 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
                 syncWzDataUrl, HttpMethod.POST, requestEntity, String.class);
         int statusCodeValue = response.getStatusCodeValue();
         System.out.println("Response status code: " + statusCodeValue);
-        if(200 != statusCodeValue) {
+        if (200 != statusCodeValue) {
             log.error("请求结果:{}", statusCodeValue);
             throw new CustomException("同步失败,请联系管理员!");
         }
         //修改同步状态
-        if(updateList.size()>0){
+        if (updateList.size() > 0) {
             this.updateBatchById(updateList);
         }
 
@@ -460,7 +458,7 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
     public List<ZhcxPersistentReportDto> reportData(Map<String, Object> map) {
         Object yearObj = map.get("year");
         Object monthObj = map.get("month");
-        if(ObjectUtil.isEmpty(yearObj) || ObjectUtil.isEmpty(monthObj)){
+        if (ObjectUtil.isEmpty(yearObj) || ObjectUtil.isEmpty(monthObj)) {
             throw new CustomException("缺少查询参数");
         }
         String year = (String) yearObj;
@@ -482,11 +480,11 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
             //当前日期大于传入日期
             processDeptUserCount(year, month, reportDataMap, reportList);
         } else if (currentDate.isEqual(passedDate)) {
-            processOrgUserCount(organization.getId(),month, reportDataMap, reportList);
+            processOrgUserCount(organization.getId(), month, reportDataMap, reportList);
         }
-        reportList.sort(Comparator.comparing(ZhcxPersistentReportDto::getSort,Comparator.reverseOrder()));
+        reportList.sort(Comparator.comparing(ZhcxPersistentReportDto::getSort, Comparator.reverseOrder()));
         for (int i = 0; i < reportList.size(); i++) {
-            reportList.get(i).setNo(i+1);
+            reportList.get(i).setNo(i + 1);
         }
         return reportList;
     }
@@ -536,7 +534,7 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
         String year = (String) yearObj;
         String month = (String) monthObj;
         List<ZhcxPersistentReportDto> dtos = this.reportData(map);
-        if(!excelUtils.GetLicense()) {
+        if (!excelUtils.GetLicense()) {
             throw new CustomException("获取license异常");
         }
         Workbook workbook = new Workbook();
@@ -576,7 +574,7 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
             for (int i = 0; i <= worksheet.getCells().getMaxColumn(); i++) {
                 worksheet.getCells().setColumnWidth(i, worksheet.getCells().getColumnWidth(i) + 2);
             }
-            worksheet.setName(year+"-"+month+"-顽症统计");
+            worksheet.setName(year + "-" + month + "-顽症统计");
             response.addHeader("Pargam", "no-cache");
             response.addHeader("Cache-Control", "no-cache");
             response.setContentType("application/octet-stream;charset=ISO8859-1");
@@ -584,11 +582,60 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
             workbook.save(response.getOutputStream(), com.aspose.cells.SaveFormat.XLSX);
         } catch (Exception e) {
             log.error("导出错误", e);
-        }finally {
+        } finally {
             workbook.dispose();
         }
     }
 
+    @Override
+    public void jyWordExport(Map<String, Object> map, HttpServletResponse response) {
+        List<ZhcxCoreInspectionIndicatorsTemplateDo> zhcxCoreInspectionIndicatorsTemplateDos = zhcxPersistentManageDao.getCoreInspectionIndicatorsTemplateDos();
+        List<ZhcxCoreInspectionDetailDo> zhcxCoreInspectionDetailDos = zhcxPersistentManageDao.getCoreInspectionDetailDos();
+        List<ZhcxCheckBeforeQualifiedDo> zhcxCheckBeforeQualifiedDos = zhcxPersistentManageDao.getCheckBeforeQualifiedDos();
+        if (zhcxCoreInspectionIndicatorsTemplateDos.size() == 0) {
+            throw new CustomException("暂无导出数据");
+        } else {
+            SysFileItemDo fileItemDo = sysFileItemService.getById("b3051738445f4e7884115bca40b5db79");
+            final Document[] doc = {WordHelpUtils.getDoc(fileItemDo.getFullpath())};
+            for (ZhcxCoreInspectionIndicatorsTemplateDo zhcxCoreInspectionIndicatorsTemplateDo : zhcxCoreInspectionIndicatorsTemplateDos) {
+                FormData formData = new FormData();
+                List<ZhcxCoreInspectionIndicatorsTemplateDo> mainList = new ArrayList<>();
+                mainList.add(zhcxCoreInspectionIndicatorsTemplateDo);
+                List<Map<String, Object>> mainDataList = convertList(mainList, ZhcxCoreInspectionIndicatorsTemplateDo.class);
+                formData.setMainDataList(mainDataList);
+                List<List<Map<String, Object>>> slaveTableDataList = new ArrayList<>();
+                List<ZhcxCoreInspectionDetailDo> coreInspectionDetailDos = zhcxCoreInspectionDetailDos.stream().filter(d -> d.getPid().equals(zhcxCoreInspectionIndicatorsTemplateDo.getId())).collect(Collectors.toList());
+                List<ZhcxCheckBeforeQualifiedDo> checkBeforeQualifiedDos = zhcxCheckBeforeQualifiedDos.stream().filter(q -> q.getPid().equals(zhcxCoreInspectionIndicatorsTemplateDo.getId())).collect(Collectors.toList());
+                List<Map<String, Object>> detailMaps = convertList(coreInspectionDetailDos, ZhcxCoreInspectionDetailDo.class);
+                List<Map<String, Object>> qualifMaps = convertList(checkBeforeQualifiedDos, ZhcxCheckBeforeQualifiedDo.class);
+                slaveTableDataList.add(detailMaps);
+                slaveTableDataList.add(qualifMaps);
+                formData.setSlaveTableDataList(slaveTableDataList);
+
+                try {
+                    if (ObjectUtil.isNull(doc[0])) {
+                        doc[0] = ExcelExportUtil.fillWordDataByMap(fileItemDo.getFullpath(), formData);
+                    } else {
+                        Document docTemp = ExcelExportUtil.fillWordDataByMap(fileItemDo.getFullpath(), formData);
+                        doc[0].appendDocument(docTemp, ImportFormatMode.KEEP_DIFFERENT_STYLES);
+                    }
+                } catch (Exception e) {
+                    log.info("核心检验指标导出word失败:" + e);
+                }
+            }
+
+            try {
+                doc[0].updateFields();
+                response.setContentType("application/octet-stream;charset=ISO8859-1");
+                response.setHeader("Content-Disposition", "attachment;filename=" + "报告");
+                doc[0].save(response.getOutputStream(), com.aspose.words.SaveOptions.createSaveOptions(com.aspose.words.SaveFormat.DOCX));
+            } catch (Exception e) {
+                log.error("核心检验指标导出word失败:" + e);
+                throw new CustomException("导出失败");
+            }
+        }
+    }
+
     private void buildHeader(Cells cells) {
         cells.merge(0, 0, 2, 1);
         cells.get(0, 0).setValue("月份");
@@ -614,16 +661,16 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
 
         cells.merge(0, 8, 2, 1);
         cells.get(0, 8).setValue("人均处罚总额(元)");
-        for(int i = 3;i<7;i++){
-            for(int j = 0;j<2;j++){
-                if(j == 0 && !(i % 2 != 0)){
+        for (int i = 3; i < 7; i++) {
+            for (int j = 0; j < 2; j++) {
+                if (j == 0 && !(i % 2 != 0)) {
                     continue;
                 }
                 Style style = cells.get(j, i).getStyle();
                 style.setPattern(BackgroundType.SOLID);
-                if (i <5) {
+                if (i < 5) {
                     style.setForegroundColor(COLORS[0]);
-                }else{
+                } else {
                     style.setForegroundColor(COLORS[1]);
                 }
                 cells.get(j, i).setStyle(style);
@@ -641,12 +688,12 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
         cells.get(row, 6).setValue(dto.getPunishNumberPer() == null ? 0 : dto.getPunishNumberPer());
         cells.get(row, 7).setValue(dto.getPunishTotalAmount() == null ? 0 : dto.getPunishTotalAmount());
         cells.get(row, 8).setValue(dto.getPunishTotalAmountPer() == null ? 0 : dto.getPunishTotalAmountPer());
-        for(int i = 3;i<7;i++){
+        for (int i = 3; i < 7; i++) {
             Style style = cells.get(row, i).getStyle();
             style.setPattern(BackgroundType.SOLID);
-            if (i <5) {
+            if (i < 5) {
                 style.setForegroundColor(COLORS[0]);
-            }else{
+            } else {
                 style.setForegroundColor(COLORS[1]);
             }
             cells.get(row, i).setStyle(style);
@@ -662,15 +709,16 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
             ZhcxPersistentReportDto dto = buildReportDto(i + 1, month, org, report);
             reportList.add(dto);
         }
-        if(deptUserCount.size() == 0){
+        if (deptUserCount.size() == 0) {
             SysOrganizationDo organization = sysOrganizationService.getOne(
                     new LambdaQueryWrapper<SysOrganizationDo>().eq(SysOrganizationDo::getCode, DEPT_CODE));
 
-            processOrgUserCount(organization.getId(),month, reportDataMap, reportList);
+            processOrgUserCount(organization.getId(), month, reportDataMap, reportList);
         }
     }
+
     // 处理组织用户统计数据
-    private void processOrgUserCount(String orgId,String month, Map<String, PersistentVo> reportDataMap, List<ZhcxPersistentReportDto> reportList) {
+    private void processOrgUserCount(String orgId, String month, Map<String, PersistentVo> reportDataMap, List<ZhcxPersistentReportDto> reportList) {
         List<OrganizationVo> orgUserCount = zhcxPersistentManageDao.getOrgUserCount(orgId);
         Map<String, OrganizationVo> parentNodeMap = new HashMap<>();
 
@@ -694,6 +742,7 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
             reportList.add(dto);
         }
     }
+
     // 构造 DTO
     private ZhcxPersistentReportDto buildReportDto(int no, String month, OrganizationVo org, PersistentVo report) {
         ZhcxPersistentReportDto dto = new ZhcxPersistentReportDto();
@@ -707,12 +756,13 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
             dto.setCheckNumber(report.getCheckNumber());
             dto.setPunishNumber(report.getPunishNumber());
             dto.setPunishTotalAmount(report.getPunishTotalAmount());
-            dto.setCheckNumberPer(calculateRatio(report.getCheckNumber() == null?0:report.getCheckNumber(), org.getUserCount()));
-            dto.setPunishNumberPer(calculateRatio(report.getPunishNumber() ==null?0:report.getPunishNumber(), org.getUserCount()));
-            dto.setPunishTotalAmountPer(calculateRatio(report.getPunishTotalAmount() == null?0:report.getPunishTotalAmount(), org.getUserCount()));
+            dto.setCheckNumberPer(calculateRatio(report.getCheckNumber() == null ? 0 : report.getCheckNumber(), org.getUserCount()));
+            dto.setPunishNumberPer(calculateRatio(report.getPunishNumber() == null ? 0 : report.getPunishNumber(), org.getUserCount()));
+            dto.setPunishTotalAmountPer(calculateRatio(report.getPunishTotalAmount() == null ? 0 : report.getPunishTotalAmount(), org.getUserCount()));
         }
         return dto;
     }
+
     private double calculateRatio(Number numerator, int denominator) {
         if (denominator == 0) {
             return 0.0;
@@ -723,7 +773,7 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
     }
 
     private void initWeekWord(Document[] doc, List<ZhcxPersistentManageDo> rewardListData, String tempId) {
-        if(rewardListData.size()>0){
+        if (rewardListData.size() > 0) {
             Map<String, List<ZhcxPersistentManageDo>> collect = rewardListData.stream()
                     .collect(Collectors.groupingBy(ZhcxPersistentManageDo::getFirstorgname));
             try {
@@ -736,7 +786,7 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
                 builder.moveToDocumentEnd();
                 String fill = rewardListData.get(0).getFill();
                 //循环动态添加表格
-                createTable(builder,docDetail,collect,"table1",0,fill);
+                createTable(builder, docDetail, collect, "table1", 0, fill);
 
                 DocumentBuilder builder3 = new DocumentBuilder(doc[0]);
                 builder3.moveToDocumentEnd();
@@ -752,10 +802,11 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
 
     /**
      * 填充 word 模板(map数据格式)
-     * @param file word二进制
+     *
+     * @param file     word二进制
      * @param formData 填充表单数据
      */
-    private Document fillWordDataByMap(String file, FormDataVO formData){
+    private Document fillWordDataByMap(String file, FormDataVO formData) {
         //获取word文档
         Document doc = WordHelpUtils.getDoc(file);
         //初始化设置
@@ -769,33 +820,35 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
 
     private Document fillFormData(Document doc, FormDataVO formData) {
 
-        if(ObjectUtil.isNotEmpty(formData.getMainDataList())) {
-            for(Map<String,Object> map : formData.getMainDataList()) {
+        if (ObjectUtil.isNotEmpty(formData.getMainDataList())) {
+            for (Map<String, Object> map : formData.getMainDataList()) {
                 //填充主表数据
                 WordHelpUtils.fillData(doc, map);
             }
         }
 
         //填充多个从表格数据
-        if(ObjectUtil.isNotEmpty(formData.getSlaveTableDataList())) {
-            int i=0;
-            for(List<Map<String,Object>> list :formData.getSlaveTableDataList()) {
+        if (ObjectUtil.isNotEmpty(formData.getSlaveTableDataList())) {
+            int i = 0;
+            for (List<Map<String, Object>> list : formData.getSlaveTableDataList()) {
                 i++;
                 WordHelpUtils.fillData(doc, list, "List" + i);
             }
         }
         return doc;
     }
+
     public static int I = 0;
     public static int Q = 0;
+
     private void createTable(DocumentBuilder builder, Document doc, Map<String, List<ZhcxPersistentManageDo>> gxyItemDataMap, String bookmarkName, int index, String fill) throws Exception {
         //将list转为根据grade分组K的map,因为要按照K去动态复制多个表格。
-        I =gxyItemDataMap.size()+1;
-        Q =gxyItemDataMap.size()+1;
+        I = gxyItemDataMap.size() + 1;
+        Q = gxyItemDataMap.size() + 1;
 
         /*1: 动态复制表格模板  {根据Map的长度大小来复制每行单元格}*/
-        if (gxyItemDataMap.size()!=0){
-            for (int i =0;i<gxyItemDataMap.size()-1;i++){
+        if (gxyItemDataMap.size() != 0) {
+            for (int i = 0; i < gxyItemDataMap.size() - 1; i++) {
                 addtable(doc); //动态生成表格
             }
         }
@@ -806,15 +859,15 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
         for (Map.Entry<String, List<ZhcxPersistentManageDo>> entry : gxyItemDataMap.entrySet()) {
             Q = Q - 1;
             if (fill.contains("每周质量顽症督查") || fill.contains("油漆“零破坏”专项") || fill.contains("面漆后动火")) {
-                addexcel(doc,entry.getKey(), idx2,entry.getValue());
-            }else{
-                addexcel(doc,null, idx2,entry.getValue());
+                addexcel(doc, entry.getKey(), idx2, entry.getValue());
+            } else {
+                addexcel(doc, null, idx2, entry.getValue());
             }
             System.out.println("Index = " + index + ", Key = " + entry.getKey() + ", Value = " + entry.getValue());
             idx2++;
         }
         NodeCollection tables = doc.getChildNodes(NodeType.TABLE, true);
-        if(tables.getCount() > 0){
+        if (tables.getCount() > 0) {
             // 第一个表格
             Table mainTable = (Table) tables.get(0);
             // 遍历剩下的9个表格
@@ -832,17 +885,18 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
         }
         builder.moveToDocumentEnd();//光标结束
     }
+
     /**
      * @Description: 向已有表格模板插入数据
      * @Param: doc、index、List<GxyItemData>
      */
-    private void addexcel(Document doc, String k, int index, List<ZhcxPersistentManageDo> staff)throws  Exception{
+    private void addexcel(Document doc, String k, int index, List<ZhcxPersistentManageDo> staff) throws Exception {
         //根据索引获得表格
         Table table = (Table) doc.getChild(NodeType.TABLE, index, true);
         Row titleRow = table.getFirstRow();
         Range range1 = titleRow.getRange();
         if (StringUtils.isNotBlank(k)) {
-            range1.replace("title",k);
+            range1.replace("title", k);
         }
         int i = 0;
         for (ZhcxPersistentManageDo staf : staff) { // 替换变量
@@ -850,26 +904,26 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
             Row newRow = table.getLastRow();
             Node deepClone = table.getLastRow().deepClone(true); //得到最后一行
             Range range = table.getLastRow().getRange();//得到值
-            String sitepic = staf.getSitepic() == null ?"":staf.getSitepic();
-            String projectcode = staf.getProjectcode()== null ?"":staf.getProjectcode();
-            String projectename = staf.getProjectename()== null ?"":staf.getProjectename();
-            String content = staf.getContent()== null ?"":staf.getContent();
-            String baseinfonum = staf.getBaseinfonum()== null ?"":staf.getBaseinfonum();
+            String sitepic = staf.getSitepic() == null ? "" : staf.getSitepic();
+            String projectcode = staf.getProjectcode() == null ? "" : staf.getProjectcode();
+            String projectename = staf.getProjectename() == null ? "" : staf.getProjectename();
+            String content = staf.getContent() == null ? "" : staf.getContent();
+            String baseinfonum = staf.getBaseinfonum() == null ? "" : staf.getBaseinfonum();
             String subcontractename = staf.getSubcontractename() == null ? "" : staf.getSubcontractename();
             String remark = staf.getRemark() == null ? "" : staf.getRemark();
             BigDecimal amount = staf.getAmount();
             String rectifystatus = staf.getRectifystatus();
-            if(StringUtils.isNotBlank(sitepic)){
+            if (StringUtils.isNotBlank(sitepic)) {
                 String[] splits = StringUtils.toString(sitepic, "").split("\\^_\\^");
                 Optional<String> firstId = Arrays.stream(splits)
                         .filter(s -> s.contains(".jpg")
                                 || s.contains(".jpeg")
                                 || s.contains(".png"))
                         .findFirst();
-                if(firstId.isPresent()){
+                if (firstId.isPresent()) {
                     String[] imgIds = firstId.get().split("-;-");
                     SysFileItemDo fileItemDo = sysFileItemService.getById(imgIds[1]);
-                    if(fileItemDo != null){
+                    if (fileItemDo != null) {
                         BufferedInputStream inputStream = FileUtil.getInputStream(fileItemDo.getFullpath());
                         // 使用DocumentBuilder插入图片
                         DocumentBuilder builder = new DocumentBuilder(doc);
@@ -893,21 +947,21 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
                     }
                 }
             }
-            range.replace("index",String.valueOf(i));
+            range.replace("index", String.valueOf(i));
             range.replace("pic", "");
-            range.replace("content",projectcode+projectename+content);
+            range.replace("content", projectcode + projectename + content);
             range.replace("code", baseinfonum);
             range.replace("remark", remark);
             if (amount != null) {
                 range.replace("amount", String.valueOf(amount));
-            }else{
+            } else {
                 range.replace("amount", "");
             }
-            if("未整改".equals(rectifystatus)){
+            if ("未整改".equals(rectifystatus)) {
                 rectifystatus = "/";
             }
-            range.replace("status",rectifystatus );
-            range.replace("dept", staf.getFirstorgname()+staf.getSecondorgname()+subcontractename);
+            range.replace("status", rectifystatus);
+            range.replace("dept", staf.getFirstorgname() + staf.getSecondorgname() + subcontractename);
             table.getRows().add(deepClone);
         }
         table.getLastRow().remove();
@@ -915,18 +969,18 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
 
     /**
      * @Description: 动态复制表格
-     * @Param:  doc
+     * @Param: doc
      * @return:
      */
-    public static void addtable(Document doc) throws Exception{
+    public static void addtable(Document doc) throws Exception {
         //获取第一个表格
-        Table table = (Table)doc.getChild(NodeType.TABLE, 0, true);
+        Table table = (Table) doc.getChild(NodeType.TABLE, 0, true);
         //创建段落
         Paragraph lastParagraph = new Paragraph(doc);
         //第一个表格末尾加段落
         table.getParentNode().insertAfter(lastParagraph, table);
-        Table cloneTable = (Table)table.deepClone(true);
-        table.getParentNode().insertAfter(cloneTable,lastParagraph);
+        Table cloneTable = (Table) table.deepClone(true);
+        table.getParentNode().insertAfter(cloneTable, lastParagraph);
     }
 
 
@@ -956,20 +1010,20 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
                 try {
                     value = field.get(obj);
                     map.put(fieldName, value);
-                    if(fieldName == "sitepic"){
-                        if(value != null){
+                    if (fieldName == "sitepic") {
+                        if (value != null) {
                             String value1 = (String) value;
-                            if(StringUtils.isNotBlank(value1)){
+                            if (StringUtils.isNotBlank(value1)) {
                                 String[] split = value1.split("\\^_\\^");
                                 map.put(fieldName, split[0]);
                             }
                         }
-                    }else if(fieldName == "rectifystatus"){
-                        if(!"已整改".equals(value)){
+                    } else if (fieldName == "rectifystatus") {
+                        if (!"已整改".equals(value)) {
                             map.put(fieldName, "/");
                         }
-                    }else if(fieldName == "rectifystatus"){
-                        if(!"已整改".equals(value)){
+                    } else if (fieldName == "rectifystatus") {
+                        if (!"已整改".equals(value)) {
                             map.put(fieldName, "/");
                         }
                     }
@@ -978,7 +1032,7 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
                 }
             }
             index++;
-            map.put("index",index);
+            map.put("index", index);
             mapList.add(map);
         }
 

+ 43 - 0
business-entity/src/main/java/com/rongwei/bsentity/domain/ZhcxCheckBeforeQualifiedDo.java

@@ -0,0 +1,43 @@
+package com.rongwei.bsentity.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.rongwei.rwcommon.base.BaseDo;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@TableName("ZHCX_CHECK_BEFORE_QUALIFIED")
+public class ZhcxCheckBeforeQualifiedDo extends BaseDo {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 主键
+     */
+    @TableField("ID")
+    private String id;
+    /**
+     * 租户id
+     */
+    @TableField("TENANTID")
+    private String tenantid;
+    /**
+     * 扩展json格式配置
+     */
+    @TableField("ROPTION")
+    private String roption;
+    /**
+     * 父id
+     */
+    @TableField("PID")
+    private String pid;
+    /**
+     * 检验前所具备条件
+     */
+    @TableField("ALL_QUALIFIED")
+    private String all_qualified;
+}

+ 78 - 0
business-entity/src/main/java/com/rongwei/bsentity/domain/ZhcxCoreInspectionDetailDo.java

@@ -0,0 +1,78 @@
+package com.rongwei.bsentity.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.rongwei.rwcommon.base.BaseDo;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@TableName("ZHCX_CORE_INSPECTION_DETAIL")
+public class ZhcxCoreInspectionDetailDo extends BaseDo {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableField("ID")
+    private String id;
+    /**
+     * 租户id
+     */
+    @TableField("TENANTID")
+    private String tenantid;
+    /**
+     * 扩展json格式配置
+     */
+    @TableField("ROPTION")
+    private String roption;
+    /**
+     * 检查项
+     */
+    @TableField("INSPECTON_ITEMS")
+    private String inspecton_items;
+    /**
+     * 接收条件
+     */
+    @TableField("RECEIVING_CONDITIONS")
+    private String receiving_conditions;
+    /**
+     * 依据标准
+     */
+    @TableField("ACCORDING_TO_STANDARDS")
+    private String according_to_standards;
+    /**
+     * 实测记录
+     */
+    @TableField("ACTUAL_RECORDS")
+    private String actual_records;
+    /**
+     * 结果判定
+     */
+    @TableField("RESULT")
+    private String result;
+    /**
+     * 备注
+     */
+    @TableField("NOTES")
+    private String notes;
+    /**
+     * 父id
+     */
+    @TableField("PID")
+    private String pid;
+    /**
+     * 接收条件简述
+     */
+    @TableField("RECEIVING_CONDITIONS_SKETCH")
+    private String receiving_conditions_sketch;
+    /**
+     * 依据标准图片
+     */
+    @TableField("ACCORDING_TO_FILES")
+    private String according_to_files;
+}

+ 63 - 0
business-entity/src/main/java/com/rongwei/bsentity/domain/ZhcxCoreInspectionIndicatorsTemplateDo.java

@@ -0,0 +1,63 @@
+package com.rongwei.bsentity.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.rongwei.rwcommon.base.BaseDo;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@TableName("ZHCX_CORE_INSPECTION_INDICATORS_TEMPLATE")
+public class ZhcxCoreInspectionIndicatorsTemplateDo extends BaseDo {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 主键
+     */
+    @TableField("ID")
+    private String id;
+    /**
+     * 租户id
+     */
+    @TableField("TENANTID")
+    private String tenantid;
+    /**
+     * 扩展json格式配置
+     */
+    @TableField("ROPTION")
+    private String roption;
+    /**
+     * 检验点编号
+     */
+    @TableField("INSPECTION_CODE")
+    private String inspection_code;
+    /**
+     * 检验点名称
+     */
+    @TableField("INSPECTION_NAME")
+    private String inspection_name;
+    /**
+     * 产品类型
+     */
+    @TableField("PRODUCT_TYPE")
+    private String product_type;
+    /**
+     * 构件名称
+     */
+    @TableField("MEMBERNAME")
+    private String membername;
+    /**
+     * 构件id
+     */
+    @TableField("MEMBERID")
+    private String memberid;
+    /**
+     * 报验点id
+     */
+    @TableField("INSPECTIONID")
+    private String inspectionid;
+}

+ 6 - 0
business-server/src/main/java/com/rongwei/bsserver/controller/ZhcxPersistentController.java

@@ -41,6 +41,12 @@ public class ZhcxPersistentController {
         zhcxPersistentManageService.wordExport(map,response);
     }
 
+    @PostMapping("jyWordExport")
+    @ApiOperation("核心检验指标word导出")
+    public void jyWordExport(@RequestBody Map<String,Object> map, HttpServletResponse response){
+        zhcxPersistentManageService.jyWordExport(map,response);
+    }
+
     /**
      * 顽症数据推送到顽症平台
      *