Jelajahi Sumber

Merge remote-tracking branch 'origin/master'

xiahan 1 tahun lalu
induk
melakukan
6533183b68
20 mengubah file dengan 943 tambahan dan 132 penghapusan
  1. 35 0
      cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/dao/ApsProductDetailDao.java
  2. 15 0
      cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/dao/ApsProductionMergeOrderDao.java
  3. 17 4
      cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/dao/SlaveOracleDao.java
  4. 7 0
      cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/ApsProductDetailService.java
  5. 11 0
      cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/ApsProductionMergeOrderService.java
  6. 2 2
      cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/SlaveSourceService.java
  7. 10 1
      cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ApsBlankOrderServiceImpl.java
  8. 1 0
      cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ApsProcessOperationServiceImpl.java
  9. 261 6
      cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ApsProductDetailServiceImpl.java
  10. 20 0
      cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ApsProductionMergeOrderServiceImpl.java
  11. 4 4
      cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/impl/SlaveSourceServiceImpl.java
  12. 5 6
      cx-aps/cx-aps-common/src/main/resources/mybatis/ApsProductionOrderDao.xml
  13. 115 0
      cx-aps/cx-aps-entity/src/main/java/com/rongwei/bsentity/domain/ApsCustomerManagementDo.java
  14. 10 0
      cx-aps/cx-aps-entity/src/main/java/com/rongwei/bsentity/domain/ApsProductDetailDo.java
  15. 213 0
      cx-aps/cx-aps-entity/src/main/java/com/rongwei/bsentity/domain/ApsProductionMergeOrderDo.java
  16. 9 1
      cx-aps/cx-aps-entity/src/main/java/com/rongwei/bsentity/domain/VNcOrderDetailVo.java
  17. 9 1
      cx-aps/cx-aps-entity/src/main/java/com/rongwei/bsentity/domain/VNcOrderVo.java
  18. 29 1
      cx-aps/cx-aps-server/src/main/java/com/rongwei/bsserver/controller/ApsProductDetailController.java
  19. 150 106
      cx-safe-check/cx-save-check-common/src/main/java/com/rongwei/sfcommon/sys/service/impl/AspSafetyPerformanceAppraisalServiceImpl.java
  20. 20 0
      cx-safe-check/cx-save-check-entity/src/main/java/com/rongwe/scentity/domian/AspSafetyPerformanceAppraisalDetail.java

+ 35 - 0
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/dao/ApsProductDetailDao.java

@@ -2,8 +2,43 @@ package com.rongwei.bscommon.sys.dao;
 
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.rongwei.bsentity.domain.ApsCustomerManagementDo;
 import com.rongwei.bsentity.domain.ApsProductDetailDo;
+import com.rongwei.bsentity.domain.ApsProductionMergeOrderDo;
+import com.rongwei.bsentity.domain.ApsProductionOrderDo;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
 
 public interface ApsProductDetailDao extends BaseMapper<ApsProductDetailDo> {
 
+
+    @Select({" <script>",
+            "select * from aps_production_order where DELETED='0' and CUSTOMORDERNO in",
+            " <foreach collection=\"orderNos\" item=\"orderno\" index=\"index\" open=\"(\" close=\")\" separator=\",\"> ",
+            "  #{orderno}",
+            "</foreach>",
+            "</script>"})
+    List<ApsProductionOrderDo> getProductionOrders(@Param("orderNos") List<String> orderNos);
+
+    @Select({" <script>",
+            "select * from aps_production_merge_order where DELETED='0' and CUSTOMORDERNO in",
+            " <foreach collection=\"orderNos\" item=\"orderno\" index=\"index\" open=\"(\" close=\")\" separator=\",\"> ",
+            "  #{orderno}",
+            "</foreach>",
+            "</script>"})
+    List<ApsProductionMergeOrderDo> getProductionMergeOrders(@Param("orderNos") List<String> orderNos);
+
+    @Select({" <script>",
+            "select * from aps_product_detail where DELETED='0' and CUSTOMORDERNO in\n" +
+            " <foreach collection=\"orderNos\" item=\"orderno\" index=\"index\" open=\"(\" close=\")\" separator=\",\"> ",
+            "  #{orderno}",
+            "</foreach>",
+            "</script>"})
+    List<ApsProductDetailDo> getProductDetails(@Param("orderNos") List<String> orderNos);
+
+    @Select("select ID,CUSTOMERNAME,DELIVERYTIME from aps_customer_management where DELETED='0'")
+    List<ApsCustomerManagementDo> getCustomerData();
+
 }

+ 15 - 0
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/dao/ApsProductionMergeOrderDao.java

@@ -0,0 +1,15 @@
+package com.rongwei.bscommon.sys.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.rongwei.bsentity.domain.ApsProductionMergeOrderDo;
+
+/**
+ * @Entity com.rongwei.training.domain.ApsProductionOrder
+ */
+public interface ApsProductionMergeOrderDao extends BaseMapper<ApsProductionMergeOrderDo> {
+
+}
+
+
+
+

+ 17 - 4
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/dao/SlaveOracleDao.java

@@ -13,15 +13,28 @@ public interface SlaveOracleDao {
 
     /**
      * 获取创新数据库的客户订单
+     *
      * @return
      */
-    @Select("select * from V_NC_ORDER where ORDERNO=#{ncOrderNo}")
-    VNcOrderVo getVNcOrderVo(@Param("ncOrderNo") String ncOrderNo);
+
+    @Select({" <script>",
+            "select * from V_NC_ORDER where ORDERNO in",
+            " <foreach collection=\"orderNos\" item=\"orderno\" index=\"index\" open=\"(\" close=\")\" separator=\",\"> ",
+            "  #{orderno}",
+            "</foreach>",
+            "</script>"})
+    List<VNcOrderVo> getVNcOrderVo(@Param("orderNos") List<String> orderNos);
 
     /**
      * 获取创新数据库的客户订单明细
+     *
      * @return
      */
-    @Select("select * from V_NC_ORDER_DETAIL where ORDERNO=#{ncOrderNo}")
-    List<VNcOrderDetailVo> getVNcOrderDetailVo(@Param("ncOrderNo") String ncOrderNo);
+    @Select({" <script>",
+            "select * from V_NC_ORDER_DETAIL where ORDERNO in",
+            " <foreach collection=\"orderNos\" item=\"orderno\" index=\"index\" open=\"(\" close=\")\" separator=\",\"> ",
+            "  #{orderno}",
+            "</foreach>",
+            "</script>"})
+    List<VNcOrderDetailVo> getVNcOrderDetailVo(@Param("orderNos") List<String> orderNos);
 }

+ 7 - 0
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/ApsProductDetailService.java

@@ -2,8 +2,11 @@ package com.rongwei.bscommon.sys.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.rongwei.bsentity.domain.ApsProductDetailDo;
+import com.rongwei.bsentity.domain.ApsProductionOrderDo;
+import com.rongwei.bsentity.domain.VNcOrderVo;
 import com.rongwei.rwcommon.base.R;
 
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -17,4 +20,8 @@ import java.util.Map;
 public interface ApsProductDetailService extends IService<ApsProductDetailDo> {
 
     R getCustomOrderData(Map<String, Object> params);
+
+    R updateCustomOrder(List<String> orderNos);
+
+    R updateMergeCustomOrder(List<String> orderNos);
 }

+ 11 - 0
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/ApsProductionMergeOrderService.java

@@ -0,0 +1,11 @@
+package com.rongwei.bscommon.sys.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.rongwei.bsentity.domain.ApsProductionMergeOrderDo;
+
+/**
+ *
+ */
+public interface ApsProductionMergeOrderService extends IService<ApsProductionMergeOrderDo> {
+
+}

+ 2 - 2
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/SlaveSourceService.java

@@ -10,8 +10,8 @@ import java.util.List;
 public interface SlaveSourceService {
 
     @DS("slave")
-    VNcOrderVo getVNcOrderVo(String ncOrderNo);
+    List<VNcOrderVo> getVNcOrderVo(List<String> orderNos);
 
     @DS("slave")
-    List<VNcOrderDetailVo> getVNcOrderDetailVo(String ncOrderNo);
+    List<VNcOrderDetailVo> getVNcOrderDetailVo(List<String> orderNos);
 }

+ 10 - 1
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ApsBlankOrderServiceImpl.java

@@ -598,6 +598,13 @@ public class ApsBlankOrderServiceImpl extends ServiceImpl<ApsBlankOrderDao, ApsB
                                             processes.getNextProcessesIds().addAll(new ArrayList<>(Arrays.asList(processOperationM.getNextprocessid().split(","))));
                                         }
                                     }
+                                    // 所属订单
+                                    List<ProduceOrder> produceOrders = processes.getProduceOrder().stream().filter(v ->
+                                            v.getId().equals(processOperationM.getApsBlankOrderVo().getId())).collect(Collectors.toList());
+                                    if(produceOrders == null || produceOrders.size() == 0){
+                                        ProduceOrder produceOrder = new ProduceOrder(processOperationM.getApsBlankOrderVo().getId(),processOperationM.getApsBlankOrderVo().getMaterialname(),processOperationM.getApsBlankOrderVo().getDeliverydate());
+                                        processes.getProduceOrder().add(produceOrder);
+                                    }
                                     // 单次加工时长
                                     if(processes.getUnitProduceTime() == null){
                                         processes.setUnitProduceTime(processOperationM.getOnceprocessmin().intValue());
@@ -653,7 +660,9 @@ public class ApsBlankOrderServiceImpl extends ServiceImpl<ApsBlankOrderDao, ApsB
                                         processes.setOptionalEquipments(Arrays.asList(new String[]{aspCheckItem.getId()}));
                                         // 坯料计划订单
                                         ProduceOrder produceOrder = new ProduceOrder(processOperationM.getApsBlankOrderVo().getId(),processOperationM.getApsBlankOrderVo().getMaterialname(),processOperationM.getApsBlankOrderVo().getDeliverydate());
-                                        processes.setProduceOrder(Arrays.asList(new ProduceOrder[]{produceOrder}));
+                                        List<ProduceOrder> produceOrders = new ArrayList<>();
+                                        produceOrders.add(produceOrder);
+                                        processes.setProduceOrder(produceOrders);
 
                                         processes.setAluminumCoils(new ArrayList<>());
                                         for (int j=1;j<=haslast;j++){

+ 1 - 0
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ApsProcessOperationServiceImpl.java

@@ -707,6 +707,7 @@ public class ApsProcessOperationServiceImpl extends ServiceImpl<ApsProcessOperat
                         }
                     }
                     apsProcessOperationDo.setPlanoutput(planoutsb.toString());
+                    apsProcessOperationDo.setInputunqualifiedroll(apsProcessOperationOutMaterDo.getFailrollnum());
 
                     apsProcessOperationDoList.add(apsProcessOperationDo);
                 }

+ 261 - 6
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ApsProductDetailServiceImpl.java

@@ -1,16 +1,23 @@
 package com.rongwei.bscommon.sys.service.impl;
 
+import cn.hutool.core.bean.BeanUtil;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.rongwei.bscommon.sys.dao.ApsProductDetailDao;
 import com.rongwei.bscommon.sys.service.ApsProductDetailService;
+import com.rongwei.bscommon.sys.service.ApsProductionMergeOrderService;
+import com.rongwei.bscommon.sys.service.ApsProductionOrderService;
 import com.rongwei.bscommon.sys.service.SlaveSourceService;
-import com.rongwei.bsentity.domain.ApsProductDetailDo;
-import com.rongwei.bsentity.domain.VNcOrderVo;
+import com.rongwei.bsentity.domain.*;
 import com.rongwei.rwcommon.base.R;
+import com.rongwei.rwcommon.utils.SecurityUtil;
+import com.rongwei.rwcommon.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 
 /**
  * <p>
@@ -26,21 +33,269 @@ public class ApsProductDetailServiceImpl extends ServiceImpl<ApsProductDetailDao
     @Autowired
     private SlaveSourceService slaveSourceService;
 
+    @Autowired
+    private ApsProductionOrderService apsProductionOrderService;
+
+    @Autowired
+    private ApsProductionMergeOrderService apsProductionMergeOrderService;
+
+    @Autowired
+    private ApsProductDetailService apsProductDetailService;
+
+    @Autowired
+    private ApsProductDetailDao apsProductDetailDao;
+
     /*
     获取客户订单
      */
     @Override
     public R getCustomOrderData(Map<String, Object> params) {
         R r = new R();
-        String ncOrderNo = params.get("CUSTOMORDERNO").toString();
-        VNcOrderVo vNcOrderVo = slaveSourceService.getVNcOrderVo(ncOrderNo);
-        if (vNcOrderVo == null) {
+        List<String> orderNos = new ArrayList<>();
+        orderNos.add(params.get("CUSTOMORDERNO").toString());
+        List<VNcOrderVo> vNcOrderVos = slaveSourceService.getVNcOrderVo(orderNos);
+        if (vNcOrderVos.size() == 0) {
             return R.error("客户订单系统没有找到该订单");
         } else {
-            vNcOrderVo.setVNcOrderDetailVoList(slaveSourceService.getVNcOrderDetailVo(ncOrderNo));
+            VNcOrderVo vNcOrderVo = vNcOrderVos.get(0);
+            List<ApsCustomerManagementDo> customDatas = apsProductDetailDao.getCustomerData();
+            ApsCustomerManagementDo apsCustomerManagementDo = customDatas.stream().filter(cus -> cus.getCustomername().equals(vNcOrderVo.getCustomname())).findAny().orElse(null);
+            if (apsCustomerManagementDo != null) {
+                vNcOrderVo.setCustomid(apsCustomerManagementDo.getId());
+                vNcOrderVo.setDeliverytime(apsCustomerManagementDo.getDeliverytime());
+            }
+            vNcOrderVo.setVNcOrderDetailVoList(slaveSourceService.getVNcOrderDetailVo(orderNos));
             r.setCode("200");
             r.setData(vNcOrderVo);
             return r;
         }
     }
+
+    /*
+    更新客户订单
+     */
+    @Override
+    public R updateCustomOrder(List<String> orderNos) {
+        StringBuffer noOrderNos = new StringBuffer();//不存在客户订单系统里的客户订单号
+        List<String> hasOrderNos = new ArrayList<>();//存在客户订单系统里的客户订单号
+
+        //客户订单系统的数据
+        List<VNcOrderVo> vNcOrderVoList = slaveSourceService.getVNcOrderVo(orderNos);
+        List<VNcOrderDetailVo> vNcOrderDetailVos = slaveSourceService.getVNcOrderDetailVo(orderNos);
+        for (String orderno : orderNos) {
+            if (vNcOrderVoList.stream().filter(nco -> nco.getOrderno().equals(orderno)).collect(Collectors.toList()).size() == 0) {
+                noOrderNos.append(orderno + ",");
+            } else {
+                hasOrderNos.add(orderno);
+            }
+        }
+
+        //本系统的订单信息
+        List<ApsProductionOrderDo> apsProductionOrderDos = apsProductDetailDao.getProductionOrders(hasOrderNos);
+        List<ApsProductDetailDo> apsProductDetailDos = apsProductDetailDao.getProductDetails(hasOrderNos);
+        List<ApsProductionOrderDo> apsProductionOrderDoList = new ArrayList<>();
+        List<ApsProductDetailDo> apsProductDetailDoList = new ArrayList<>();
+        List<String> delProductDetailIdList = new ArrayList<>();
+        List<ApsCustomerManagementDo> customDatas = apsProductDetailDao.getCustomerData();
+        for (ApsProductionOrderDo apsProductionOrderDo : apsProductionOrderDos) {
+            //主表
+            VNcOrderVo vNcOrderVo = vNcOrderVoList.stream().filter(nco -> nco.getOrderno().equals(apsProductionOrderDo.getCustomorderno())).findAny().orElse(null);
+            ApsCustomerManagementDo apsCustomerManagementDo = customDatas.stream().filter(cus -> cus.getCustomername().equals(vNcOrderVo.getCustomname())).findAny().orElse(null);
+            if (apsCustomerManagementDo != null) {
+                apsProductionOrderDo.setCustomid(apsCustomerManagementDo.getId());
+                apsProductionOrderDo.setCustomname(apsCustomerManagementDo.getCustomername());
+                apsProductionOrderDo.setDeliverytime(apsCustomerManagementDo.getDeliverytime());
+            } else {
+                apsProductionOrderDo.setCustomid("");
+                apsProductionOrderDo.setCustomname("");
+                apsProductionOrderDo.setDeliverytime(null);
+            }
+
+            apsProductionOrderDo.setOrderdate(vNcOrderVo.getOrderdate());
+            apsProductionOrderDo.setRemark(vNcOrderVo.getRemark());
+            apsProductionOrderDo.setDeliverydate(vNcOrderVo.getDeliverydate());
+            apsProductionOrderDo.setBelongfactory(vNcOrderVo.getBelongfactory());
+
+            //明细
+            //客户订单系统的明细数据
+            List<VNcOrderDetailVo> vNcOrderDetailVoList = vNcOrderDetailVos.stream().filter(vod -> vod.getOrderno().equals(apsProductionOrderDo.getCustomorderno())).collect(Collectors.toList());
+            for (ApsProductDetailDo apsProductDetailDo : apsProductDetailDos) {
+                VNcOrderDetailVo vNcOrderDetailVo = vNcOrderDetailVoList.stream().filter(vodl -> vodl.getId().equals(apsProductDetailDo.getCustomorderdetailid())).findAny().orElse(null);
+                if (vNcOrderDetailVo != null) {
+                    //存在则更新
+                    apsProductDetailDo.setMaterialcode(vNcOrderDetailVo.getMaterialcode());
+                    apsProductDetailDo.setMaterialname(vNcOrderDetailVo.getMaterialname());
+                    apsProductDetailDo.setSpecialfication(vNcOrderDetailVo.getSpecialfication());
+                    apsProductDetailDo.setAlloy(vNcOrderDetailVo.getAlloy());
+                    apsProductDetailDo.setAlloystatus(vNcOrderDetailVo.getAlloystatus());
+                    apsProductDetailDo.setThickness(vNcOrderDetailVo.getThickness());
+                    apsProductDetailDo.setProwidth(vNcOrderDetailVo.getProwidth());
+                    apsProductDetailDo.setProlength(vNcOrderDetailVo.getProlength());
+                    apsProductDetailDo.setTotalordercount(vNcOrderDetailVo.getTotalordercount());
+                    apsProductDetailDo.setRollnum(vNcOrderDetailVo.getRollnum());
+                    apsProductDetailDo.setNumberunit(vNcOrderDetailVo.getNumberunit());
+                    apsProductDetailDo.setRemark(vNcOrderDetailVo.getRemark());
+
+                    apsProductDetailDoList.add(apsProductDetailDo);
+                } else {
+                    //不存在则删除
+                    delProductDetailIdList.add(apsProductDetailDo.getId());
+                }
+
+                vNcOrderDetailVoList.remove(vNcOrderDetailVo);
+            }
+
+            //客户系统新增的明细
+            for (VNcOrderDetailVo vNcOrderDetailVo : vNcOrderDetailVoList) {
+                ApsProductDetailDo apsProductDetailDo = BeanUtil.toBean(vNcOrderDetailVo, ApsProductDetailDo.class);
+                apsProductDetailDo.setId(SecurityUtil.getUUID());
+                apsProductDetailDo.setProductstatus("10");
+                apsProductDetailDo.setMainid(apsProductionOrderDo.getId());
+                apsProductDetailDo.setCustomorderdetailid(vNcOrderDetailVo.getId());
+                apsProductDetailDo.setTenantid(apsProductionOrderDo.getTenantid());
+                apsProductDetailDo.setCustomorderno(apsProductionOrderDo.getCustomorderno());
+
+                apsProductDetailDoList.add(apsProductDetailDo);
+            }
+
+            apsProductionOrderDoList.add(apsProductionOrderDo);
+        }
+
+        boolean bool1 = true;
+        boolean bool2 = true;
+        boolean bool3 = true;
+        if (apsProductionOrderDoList.size() > 0) {
+            bool1 = apsProductionOrderService.saveOrUpdateBatch(apsProductionOrderDoList);
+        }
+        if (apsProductDetailDoList.size() > 0) {
+            bool2 = apsProductDetailService.saveOrUpdateBatch(apsProductDetailDoList);
+        }
+        if (delProductDetailIdList.size() > 0) {
+            bool3 = apsProductDetailService.removeByIds(delProductDetailIdList);
+        }
+
+        if (bool1 && bool2 && bool3) {
+            if (StringUtils.isBlank(noOrderNos.toString())) {
+                return R.ok("更新成功");
+            } else {
+                return R.ok("客户订单:" + noOrderNos + "系统没有找到该订单,其他订单更新成功");
+            }
+        } else {
+            return R.error("获取客户订单系统订单失败,请联系管理员");
+        }
+    }
+
+    /*
+    更新合并客户订单
+     */
+    @Override
+    public R updateMergeCustomOrder(List<String> orderNos) {
+        StringBuffer noOrderNos = new StringBuffer();//不存在客户订单系统里的客户订单号
+        List<String> hasOrderNos = new ArrayList<>();//存在客户订单系统里的客户订单号
+
+        //客户订单系统的数据
+        List<VNcOrderVo> vNcOrderVoList = slaveSourceService.getVNcOrderVo(orderNos);
+        List<VNcOrderDetailVo> vNcOrderDetailVos = slaveSourceService.getVNcOrderDetailVo(orderNos);
+        for (String orderno : orderNos) {
+            if (vNcOrderVoList.stream().filter(nco -> nco.getOrderno().equals(orderno)).collect(Collectors.toList()).size() == 0) {
+                noOrderNos.append(orderno + ",");
+            } else {
+                hasOrderNos.add(orderno);
+            }
+        }
+
+        //本系统的订单信息
+        List<ApsProductionMergeOrderDo> apsProductionMergeOrderDos = apsProductDetailDao.getProductionMergeOrders(hasOrderNos);
+        List<ApsProductDetailDo> apsProductDetailDos = apsProductDetailDao.getProductDetails(hasOrderNos);
+        List<ApsProductionMergeOrderDo> apsProductionMergeOrderDoList = new ArrayList<>();
+        List<ApsProductDetailDo> apsProductDetailDoList = new ArrayList<>();
+        List<String> delProductDetailIdList = new ArrayList<>();
+        List<ApsCustomerManagementDo> customDatas = apsProductDetailDao.getCustomerData();
+        for (ApsProductionMergeOrderDo apsProductionMergeOrderDo : apsProductionMergeOrderDos) {
+            //主表
+            VNcOrderVo vNcOrderVo = vNcOrderVoList.stream().filter(nco -> nco.getOrderno().equals(apsProductionMergeOrderDo.getCustomorderno())).findAny().orElse(null);
+            ApsCustomerManagementDo apsCustomerManagementDo = customDatas.stream().filter(cus -> cus.getCustomername().equals(vNcOrderVo.getCustomname())).findAny().orElse(null);
+            if (apsCustomerManagementDo != null) {
+                apsProductionMergeOrderDo.setCustomid(apsCustomerManagementDo.getId());
+                apsProductionMergeOrderDo.setCustomname(apsCustomerManagementDo.getCustomername());
+                apsProductionMergeOrderDo.setDeliverytime(apsCustomerManagementDo.getDeliverytime());
+            } else {
+                apsProductionMergeOrderDo.setCustomid("");
+                apsProductionMergeOrderDo.setCustomname("");
+                apsProductionMergeOrderDo.setDeliverytime(null);
+            }
+
+            apsProductionMergeOrderDo.setOrderdate(vNcOrderVo.getOrderdate());
+            apsProductionMergeOrderDo.setRemark(vNcOrderVo.getRemark());
+            apsProductionMergeOrderDo.setDeliverydate(vNcOrderVo.getDeliverydate());
+            apsProductionMergeOrderDo.setBelongfactory(vNcOrderVo.getBelongfactory());
+
+            //明细
+            //客户订单系统的明细数据
+            List<VNcOrderDetailVo> vNcOrderDetailVoList = vNcOrderDetailVos.stream().filter(vod -> vod.getOrderno().equals(apsProductionMergeOrderDo.getCustomorderno())).collect(Collectors.toList());
+            for (ApsProductDetailDo apsProductDetailDo : apsProductDetailDos) {
+                VNcOrderDetailVo vNcOrderDetailVo = vNcOrderDetailVoList.stream().filter(vodl -> vodl.getId().equals(apsProductDetailDo.getCustomorderdetailid())).findAny().orElse(null);
+                if (vNcOrderDetailVo != null) {
+                    //存在则更新
+                    apsProductDetailDo.setMaterialcode(vNcOrderDetailVo.getMaterialcode());
+                    apsProductDetailDo.setMaterialname(vNcOrderDetailVo.getMaterialname());
+                    apsProductDetailDo.setSpecialfication(vNcOrderDetailVo.getSpecialfication());
+                    apsProductDetailDo.setAlloy(vNcOrderDetailVo.getAlloy());
+                    apsProductDetailDo.setAlloystatus(vNcOrderDetailVo.getAlloystatus());
+                    apsProductDetailDo.setThickness(vNcOrderDetailVo.getThickness());
+                    apsProductDetailDo.setProwidth(vNcOrderDetailVo.getProwidth());
+                    apsProductDetailDo.setProlength(vNcOrderDetailVo.getProlength());
+                    apsProductDetailDo.setTotalordercount(vNcOrderDetailVo.getTotalordercount());
+                    apsProductDetailDo.setRollnum(vNcOrderDetailVo.getRollnum());
+                    apsProductDetailDo.setNumberunit(vNcOrderDetailVo.getNumberunit());
+                    apsProductDetailDo.setRemark(vNcOrderDetailVo.getRemark());
+
+                    apsProductDetailDoList.add(apsProductDetailDo);
+                } else {
+                    //不存在则删除
+                    delProductDetailIdList.add(apsProductDetailDo.getId());
+                }
+
+                vNcOrderDetailVoList.remove(vNcOrderDetailVo);
+            }
+
+            //客户系统新增的明细
+            for (VNcOrderDetailVo vNcOrderDetailVo : vNcOrderDetailVoList) {
+                ApsProductDetailDo apsProductDetailDo = BeanUtil.toBean(vNcOrderDetailVo, ApsProductDetailDo.class);
+                apsProductDetailDo.setId(SecurityUtil.getUUID());
+                apsProductDetailDo.setProductstatus("10");
+                apsProductDetailDo.setMainid(apsProductionMergeOrderDo.getId());
+                apsProductDetailDo.setCustomorderdetailid(vNcOrderDetailVo.getId());
+                apsProductDetailDo.setTenantid(apsProductionMergeOrderDo.getTenantid());
+                apsProductDetailDo.setCustomorderno(apsProductionMergeOrderDo.getCustomorderno());
+
+                apsProductDetailDoList.add(apsProductDetailDo);
+            }
+
+            apsProductionMergeOrderDoList.add(apsProductionMergeOrderDo);
+        }
+
+        boolean bool1 = true;
+        boolean bool2 = true;
+        boolean bool3 = true;
+        if (apsProductionMergeOrderDoList.size() > 0) {
+            bool1 = apsProductionMergeOrderService.saveOrUpdateBatch(apsProductionMergeOrderDoList);
+        }
+        if (apsProductDetailDoList.size() > 0) {
+            bool2 = apsProductDetailService.saveOrUpdateBatch(apsProductDetailDoList);
+        }
+        if (delProductDetailIdList.size() > 0) {
+            bool3 = apsProductDetailService.removeByIds(delProductDetailIdList);
+        }
+
+        if (bool1 && bool2 && bool3) {
+            if (StringUtils.isBlank(noOrderNos.toString())) {
+                return R.ok("更新成功");
+            } else {
+                return R.ok("客户订单:" + noOrderNos + "系统没有找到该订单,其他订单更新成功");
+            }
+        } else {
+            return R.error("获取客户订单系统订单失败,请联系管理员");
+        }
+    }
 }

+ 20 - 0
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ApsProductionMergeOrderServiceImpl.java

@@ -0,0 +1,20 @@
+package com.rongwei.bscommon.sys.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.rongwei.bscommon.sys.dao.ApsProductionMergeOrderDao;
+import com.rongwei.bscommon.sys.service.ApsProductionMergeOrderService;
+import com.rongwei.bsentity.domain.ApsProductionMergeOrderDo;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ */
+@Service
+public class ApsProductionMergeOrderServiceImpl extends ServiceImpl<ApsProductionMergeOrderDao, ApsProductionMergeOrderDo>
+        implements ApsProductionMergeOrderService {
+
+}
+
+
+
+

+ 4 - 4
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/impl/SlaveSourceServiceImpl.java

@@ -18,14 +18,14 @@ public class SlaveSourceServiceImpl implements SlaveSourceService {
 
     @Override
     @DS("slave")
-    public VNcOrderVo getVNcOrderVo(String ncOrderNo) {
-        return slaveOracleDao.getVNcOrderVo(ncOrderNo);
+    public List<VNcOrderVo> getVNcOrderVo(List<String> orderNos) {
+        return slaveOracleDao.getVNcOrderVo(orderNos);
     }
 
     @Override
     @DS("slave")
-    public List<VNcOrderDetailVo> getVNcOrderDetailVo(String ncOrderNo) {
-        return slaveOracleDao.getVNcOrderDetailVo(ncOrderNo);
+    public List<VNcOrderDetailVo> getVNcOrderDetailVo(List<String> orderNos) {
+        return slaveOracleDao.getVNcOrderDetailVo(orderNos);
     }
 
 }

+ 5 - 6
cx-aps/cx-aps-common/src/main/resources/mybatis/ApsProductionOrderDao.xml

@@ -25,10 +25,9 @@
         <result property="salesman" column="SALESMAN" jdbcType="VARCHAR"/>
         <result property="businessunit" column="BUSINESSUNIT" jdbcType="VARCHAR"/>
         <result property="customorderno" column="CUSTOMORDERNO" jdbcType="VARCHAR"/>
-        <result property="isfromnc" column="ISFROMNC" jdbcType="VARCHAR"/>
-        <result property="ncorderno" column="NCORDERNO" jdbcType="VARCHAR"/>
-        <result property="ncordertype" column="NCORDERTYPE" jdbcType="VARCHAR"/>
-        <result property="ncorderstatus" column="NCORDERSTATUS" jdbcType="VARCHAR"/>
+        <result property="isfromcustom" column="ISFROMCUSTOM" jdbcType="VARCHAR"/>
+        <result property="customordertype" column="CUSTOMORDERTYPE" jdbcType="VARCHAR"/>
+        <result property="customorderstatus" column="CUSTOMORDERSTATUS" jdbcType="VARCHAR"/>
         <result property="tenantid" column="TENANTID" jdbcType="VARCHAR"/>
         <result property="roption" column="ROPTION" jdbcType="VARCHAR"/>
         <result property="deleted" column="DELETED" jdbcType="CHAR"/>
@@ -97,8 +96,8 @@
         AUDITORID,AUDITDATE,PRODUCTIONSTATUS,
         PROMISEDELIVERYDATE,CUSTOMWAREHOUSE,DELIVERYTIME,
         BELONGFACTORY,ORDERTYPE,SALESMAN,
-        BUSINESSUNIT,CUSTOMORDERNO,ISFROMNC,
-        NCORDERNO,NCORDERTYPE,NCORDERSTATUS,
+        BUSINESSUNIT,CUSTOMORDERNO,ISFROMCUSTOM,
+        CUSTOMORDERTYPE,CUSTOMORDERSTATUS,
         TENANTID,ROPTION,DELETED,
         REMARK,CREATEDATE,CREATEUSERID,
         MODIFYDATE,MODIFYUSERID,CREATEUSERNAME,

+ 115 - 0
cx-aps/cx-aps-entity/src/main/java/com/rongwei/bsentity/domain/ApsCustomerManagementDo.java

@@ -0,0 +1,115 @@
+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 java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 客户管理
+ * @TableName aps_customer_management
+ */
+@TableName(value ="aps_customer_management")
+@Data
+public class ApsCustomerManagementDo extends BaseDo implements Serializable {
+    /**
+     * 主键ID
+     */
+    private String id;
+
+    /**
+     *
+     */
+    private String tenantid;
+
+    /**
+     * 扩展json格式配置
+     */
+    private String roption;
+
+    /**
+     * 是否删除Y/N
+     */
+    private String deleted;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 创建时间
+     */
+    private Date createdate;
+
+    /**
+     * 创建用户ID
+     */
+    private String createuserid;
+
+    /**
+     * 修改日期
+     */
+    private Date modifydate;
+
+    /**
+     * 修改用户ID
+     */
+    private String modifyuserid;
+
+    /**
+     * 创建人
+     */
+    private String createusername;
+
+    /**
+     * 修改人
+     */
+    private String modifyusername;
+
+    /**
+     * 客户编号
+     */
+    private String customerunit;
+
+    /**
+     * 客户名称
+     */
+    private String customername;
+
+    /**
+     * 客户简称
+     */
+    private String customerabbreviation;
+
+    /**
+     * 送货地址
+     */
+    private String deliveryaddress;
+
+    /**
+     * 送货时长
+     */
+    private Integer deliverytime;
+
+    /**
+     * 联系人
+     */
+    private String contacts;
+
+    /**
+     * 联系电话
+     */
+    private String contactsmobile;
+
+    /**
+     * 仓库ID
+     */
+    private String storeid;
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+}

+ 10 - 0
cx-aps/cx-aps-entity/src/main/java/com/rongwei/bsentity/domain/ApsProductDetailDo.java

@@ -142,5 +142,15 @@ public class ApsProductDetailDo extends BaseDo {
      */
     private String materialid;
 
+    /**
+     * 客户订单明细ID
+     */
+    private String customorderdetailid;
+
+    /**
+     * 客户订单号
+     */
+    private String customorderno;
+
     private static final long serialVersionUID = 1L;
 }

+ 213 - 0
cx-aps/cx-aps-entity/src/main/java/com/rongwei/bsentity/domain/ApsProductionMergeOrderDo.java

@@ -0,0 +1,213 @@
+package com.rongwei.bsentity.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.rongwei.rwcommon.base.BaseDo;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 生产订单_合并
+ *
+ * @TableName aps_production_merge_order
+ */
+@TableName(value = "aps_production_merge_order")
+@Data
+public class ApsProductionMergeOrderDo extends BaseDo implements Serializable {
+    /**
+     * 主键
+     */
+    private String id;
+
+    /**
+     * 订单单据号
+     */
+    private String orderno;
+
+    /**
+     * 客户名称
+     */
+    private String customname;
+
+    /**
+     * 下单日期
+     */
+    private Date orderdate;
+
+    /**
+     * 期望交货日期
+     */
+    private Date deliverydate;
+
+    /**
+     * 交期允许浮动(天)
+     */
+    private Integer allowday;
+
+    /**
+     * 订单状态
+     */
+    private String orderstatus;
+
+    /**
+     * 评审状态
+     */
+    private String auditstatus;
+
+    /**
+     * 评审人
+     */
+    private String auditor;
+
+    /**
+     * 评审人ID
+     */
+    private String auditorid;
+
+    /**
+     * 评审时间
+     */
+    private Date auditdate;
+
+    /**
+     * 生产状态
+     */
+    private String productionstatus;
+
+    /**
+     * 承诺交货日期
+     */
+    private Date promisedeliverydate;
+
+    /**
+     * 客户仓库
+     */
+    private String customwarehouse;
+
+    /**
+     * 送货时长(小时)
+     */
+    private Integer deliverytime;
+
+    /**
+     * 所属分厂
+     */
+    private String belongfactory;
+
+    /**
+     * 订单类型
+     */
+    private String ordertype;
+
+    /**
+     * 业务员
+     */
+    private String salesman;
+
+    /**
+     * 业务部门
+     */
+    private String businessunit;
+
+    /**
+     * 客户订单号
+     */
+    private String customorderno;
+
+    /**
+     * 是否来自客户订单系统
+     */
+    private String isfromcustom;
+
+    /**
+     * 客户订单类型
+     */
+    private String customordertype;
+
+    /**
+     * 客户订单状态
+     */
+    private String customorderstatus;
+
+    /**
+     * 所属租户ID
+     */
+    private String tenantid;
+
+    /**
+     * 扩展json格式配置
+     */
+    private String roption;
+
+    /**
+     * 是否删除
+     */
+    private String deleted;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 创建时间
+     */
+    private Date createdate;
+
+    /**
+     * 创建用户ID
+     */
+    private String createuserid;
+
+    /**
+     * 修改日期
+     */
+    private Date modifydate;
+
+    /**
+     * 修改用户ID
+     */
+    private String modifyuserid;
+
+    /**
+     * 创建人名称
+     */
+    private String createusername;
+
+    /**
+     * 修改人名称
+     */
+    private String modifyusername;
+
+    /**
+     * 排程交货日期
+     */
+    private Date scheduledeliverydate;
+
+    /**
+     * 实际交货日期
+     */
+    private Date actualdeliverydate;
+
+    /**
+     * 订单ID
+     */
+    private String mainid;
+
+    /**
+     * 客户仓库
+     */
+    private String customwarehouseid;
+
+    /**
+     * 客户ID
+     */
+    private String customid;
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+}

+ 9 - 1
cx-aps/cx-aps-entity/src/main/java/com/rongwei/bsentity/domain/VNcOrderDetailVo.java

@@ -6,6 +6,14 @@ import java.math.BigDecimal;
 
 @Data
 public class VNcOrderDetailVo {
+    /**
+     * 客户订单明细ID
+     */
+    private String id;
+    /**
+     * 客户订单号
+     */
+    private String orderno;
     /**
      * 物料编码
      */
@@ -41,7 +49,7 @@ public class VNcOrderDetailVo {
     /**
      * 订单总数量
      */
-    private Integer totalordercount;
+    private BigDecimal totalordercount;
     /**
      * 卷数
      */

+ 9 - 1
cx-aps/cx-aps-entity/src/main/java/com/rongwei/bsentity/domain/VNcOrderVo.java

@@ -10,11 +10,19 @@ public class VNcOrderVo {
     /**
      * 客户订单号
      */
-    private String customorderno;
+    private String orderno;
+    /**
+     * 客户ID
+     */
+    private String customid;
     /**
      * 客户名称
      */
     private String customname;
+    /**
+     * 送货时长
+     */
+    private Integer deliverytime;
     /**
      * 下单日期
      */

+ 29 - 1
cx-aps/cx-aps-server/src/main/java/com/rongwei/bsserver/controller/ApsProductDetailController.java

@@ -2,7 +2,6 @@ package com.rongwei.bsserver.controller;
 
 
 import com.rongwei.bscommon.sys.service.ApsProductDetailService;
-import com.rongwei.bsentity.vo.CommonUpdateProductionStatusReq;
 import com.rongwei.rwcommon.base.R;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -11,6 +10,7 @@ import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -41,5 +41,33 @@ public class ApsProductDetailController {
             return R.error("获取客户订单系统订单失败,请联系管理员");
         }
     }
+
+    /*
+    更新客户订单
+     */
+    @PostMapping("/updateCustomOrder")
+    public R updateCustomOrder(@RequestBody List<String> orderNos){
+        try {
+            log.info("更新客户订单;参数为:{}", orderNos);
+            return apsProductDetailService.updateCustomOrder(orderNos);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return R.error("获取客户订单系统订单失败,请联系管理员");
+        }
+    }
+
+    /*
+    更新合并客户订单
+     */
+    @PostMapping("/updateMergeCustomOrder")
+    public R updateMergeCustomOrder(@RequestBody List<String> orderNos){
+        try {
+            log.info("更新客户订单;参数为:{}", orderNos);
+            return apsProductDetailService.updateMergeCustomOrder(orderNos);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return R.error("获取客户订单系统订单失败,请联系管理员");
+        }
+    }
 }
 

+ 150 - 106
cx-safe-check/cx-save-check-common/src/main/java/com/rongwei/sfcommon/sys/service/impl/AspSafetyPerformanceAppraisalServiceImpl.java

@@ -54,45 +54,45 @@ public class AspSafetyPerformanceAppraisalServiceImpl extends ServiceImpl<AspSaf
             if (!name3.equals("集团公司安全监管(20分)")) {
                 return R.error("第2行,第3列,表头模板有误!");
             }
-            String name4 = row1.getCell(8) == null ? "" : row1.getCell(8).toString().trim();
+            String name4 = row1.getCell(10) == null ? "" : row1.getCell(10).toString().trim();
             if (!name4.equals("公司内部安全监管(10分)")) {
-                return R.error("第2行,第9列,表头模板有误!");
+                return R.error("第2行,第11列,表头模板有误!");
             }
-            String name5 = row1.getCell(14) == null ? "" : row1.getCell(14).toString().trim();
+            String name5 = row1.getCell(18) == null ? "" : row1.getCell(18).toString().trim();
             if (!name5.equals("车间自我安全管理(10分)")) {
-                return R.error("第2行,第15列,表头模板有误!");
+                return R.error("第2行,第19列,表头模板有误!");
             }
-            String name6 = row1.getCell(17) == null ? "" : row1.getCell(17).toString().trim();
+            String name6 = row1.getCell(21) == null ? "" : row1.getCell(21).toString().trim();
             if (!name6.equals("工伤管理(50分)")) {
-                return R.error("第2行,第18列,表头模板有误!");
+                return R.error("第2行,第22列,表头模板有误!");
             }
-            String name7 = row1.getCell(22) == null ? "" : row1.getCell(22).toString().trim();
+            String name7 = row1.getCell(26) == null ? "" : row1.getCell(26).toString().trim();
             if (!name7.equals("车间、部门安全工作配合情况")) {
-                return R.error("第2行,第23列,表头模板有误!");
+                return R.error("第2行,第27列,表头模板有误!");
             }
-            String name8 = row1.getCell(26) == null ? "" : row1.getCell(26).toString().trim();
+            String name8 = row1.getCell(30) == null ? "" : row1.getCell(30).toString().trim();
             if (!name8.equals("扣分合计")) {
-                return R.error("第2行,第27列,表头模板有误!");
+                return R.error("第2行,第31列,表头模板有误!");
             }
-            String name9 = row1.getCell(27) == null ? "" : row1.getCell(27).toString().trim();
+            String name9 = row1.getCell(31) == null ? "" : row1.getCell(31).toString().trim();
             if (!name9.equals("车间名称")) {
-                return R.error("第2行,第28列,表头模板有误!");
+                return R.error("第2行,第32列,表头模板有误!");
             }
-            String name10 = row1.getCell(28) == null ? "" : row1.getCell(28).toString().trim();
+            String name10 = row1.getCell(32) == null ? "" : row1.getCell(32).toString().trim();
             if (!name10.equals("车间人数")) {
-                return R.error("第2行,第29列,表头模板有误!");
+                return R.error("第2行,第33列,表头模板有误!");
             }
-            String name11 = row1.getCell(29) == null ? "" : row1.getCell(29).toString().trim();
+            String name11 = row1.getCell(33) == null ? "" : row1.getCell(33).toString().trim();
             if (!name11.equals("加分项")) {
-                return R.error("第2行,第29列,表头模板有误!");
+                return R.error("第2行,第34列,表头模板有误!");
             }
-            String name12 = row1.getCell(35) == null ? "" : row1.getCell(35).toString().trim();
+            String name12 = row1.getCell(39) == null ? "" : row1.getCell(39).toString().trim();
             if (!name12.equals("加分合计")) {
-                return R.error("第2行,第36列,表头模板有误!");
+                return R.error("第2行,第40列,表头模板有误!");
             }
-            String name13 = row1.getCell(36) == null ? "" : row1.getCell(36).toString().trim();
+            String name13 = row1.getCell(40) == null ? "" : row1.getCell(40).toString().trim();
             if (!name13.equals("综合得分情况")) {
-                return R.error("第2行,第37列,表头模板有误!");
+                return R.error("第2行,第41列,表头模板有误!");
             }
             //分析第2行
             Row row2 = sheet.getRow(2);
@@ -112,95 +112,111 @@ public class AspSafetyPerformanceAppraisalServiceImpl extends ServiceImpl<AspSaf
             if (!name17.equals("监控/集团安环部现场检查隐患条数")) {
                 return R.error("第3行,第6列,表头模板有误!");
             }
-            String name18 = row2.getCell(6) == null ? "" : row2.getCell(6).toString().trim();
-            if (!name18.equals("考试或提问不合格人数")) {
+            String name17_1 = row2.getCell(6) == null ? "" : row2.getCell(6).toString().trim();
+            if (!name17_1.equals("集团燃气专项检查隐患条数")) {
                 return R.error("第3行,第7列,表头模板有误!");
             }
-            String name19 = row2.getCell(7) == null ? "" : row2.getCell(7).toString().trim();
-            if (!name19.equals("集团考核通报(50元/扣0.5分)")) {
+            String name17_2 = row2.getCell(7) == null ? "" : row2.getCell(7).toString().trim();
+            if (!name17_2.equals("集团日常巡查隐患条数")) {
                 return R.error("第3行,第8列,表头模板有误!");
             }
-            String name20 = row2.getCell(8) == null ? "" : row2.getCell(8).toString().trim();
-            if (!name20.equals("月度安全检查")) {
+            String name18 = row2.getCell(8) == null ? "" : row2.getCell(8).toString().trim();
+            if (!name18.equals("考试或提问不合格人数")) {
                 return R.error("第3行,第9列,表头模板有误!");
             }
-            String name21 = row2.getCell(9) == null ? "" : row2.getCell(9).toString().trim();
-            if (!name21.equals("安全部日常巡查条数")) {
+            String name19 = row2.getCell(9) == null ? "" : row2.getCell(9).toString().trim();
+            if (!name19.equals("集团考核通报(50元/扣0.5分)")) {
                 return R.error("第3行,第10列,表头模板有误!");
             }
-            String name22 = row2.getCell(10) == null ? "" : row2.getCell(10).toString().trim();
-            if (!name22.equals("复查整改率")) {
+            String name20 = row2.getCell(10) == null ? "" : row2.getCell(10).toString().trim();
+            if (!name20.equals("月度安全检查")) {
                 return R.error("第3行,第11列,表头模板有误!");
             }
-            String name23 = row2.getCell(11) == null ? "" : row2.getCell(11).toString().trim();
-            if (!name23.equals("车间员工违章率(违章次数/车间总人数)")) {
+            String name20_1 = row2.getCell(11) == null ? "" : row2.getCell(11).toString().trim();
+            if (!name20_1.equals("危险化学品检查")) {
                 return R.error("第3行,第12列,表头模板有误!");
             }
-            String name24 = row2.getCell(13) == null ? "" : row2.getCell(13).toString().trim();
-            if (!name24.equals("公司考核通报(50元/扣0.5分)")) {
+            String name20_2 = row2.getCell(12) == null ? "" : row2.getCell(12).toString().trim();
+            if (!name20_2.equals("高低压二氧化碳灭火系统检查")) {
+                return R.error("第3行,第13列,表头模板有误!");
+            }
+            String name21 = row2.getCell(13) == null ? "" : row2.getCell(13).toString().trim();
+            if (!name21.equals("安全部日常巡查条数")) {
                 return R.error("第3行,第14列,表头模板有误!");
             }
-            String name25 = row2.getCell(14) == null ? "" : row2.getCell(14).toString().trim();
-            if (!name25.equals("公司对车间提问合格率")) {
+            String name22 = row2.getCell(14) == null ? "" : row2.getCell(14).toString().trim();
+            if (!name22.equals("复查整改率")) {
                 return R.error("第3行,第15列,表头模板有误!");
             }
-            String name26 = row2.getCell(15) == null ? "" : row2.getCell(15).toString().trim();
-            if (!name26.equals("车间自查违章率")) {
+            String name23 = row2.getCell(15) == null ? "" : row2.getCell(15).toString().trim();
+            if (!name23.equals("车间员工违章率(违章次数/车间总人数)")) {
                 return R.error("第3行,第16列,表头模板有误!");
             }
-            String name27 = row2.getCell(16) == null ? "" : row2.getCell(16).toString().trim();
+            String name24 = row2.getCell(17) == null ? "" : row2.getCell(17).toString().trim();
+            if (!name24.equals("公司考核通报(50元/扣0.5分)")) {
+                return R.error("第3行,第18列,表头模板有误!");
+            }
+            String name25 = row2.getCell(18) == null ? "" : row2.getCell(18).toString().trim();
+            if (!name25.equals("公司对车间提问合格率")) {
+                return R.error("第3行,第19列,表头模板有误!");
+            }
+            String name26 = row2.getCell(19) == null ? "" : row2.getCell(19).toString().trim();
+            if (!name26.equals("车间自查违章率")) {
+                return R.error("第3行,第20列,表头模板有误!");
+            }
+            String name27 = row2.getCell(20) == null ? "" : row2.getCell(20).toString().trim();
             if (!name27.equals("车间级隐患排查条数")) {
-                return R.error("第3行,第17列,表头模板有误!");
+                return R.error("第3行,第21列,表头模板有误!");
             }
-            String name28 = row2.getCell(17) == null ? "" : row2.getCell(17).toString().trim();
+            String name28 = row2.getCell(21) == null ? "" : row2.getCell(21).toString().trim();
             if (!name28.equals("安全事件或未遂事件起数")) {
-                return R.error("第3行,第18列,表头模板有误!");
+                return R.error("第3行,第22列,表头模板有误!");
             }
-            String name29 = row2.getCell(18) == null ? "" : row2.getCell(18).toString().trim();
+            String name29 = row2.getCell(22) == null ? "" : row2.getCell(22).toString().trim();
             if (!name29.equals("费用(元)")) {
-                return R.error("第3行,第19列,表头模板有误!");
+                return R.error("第3行,第23列,表头模板有误!");
             }
-            String name30 = row2.getCell(19) == null ? "" : row2.getCell(19).toString().trim();
+            String name30 = row2.getCell(23) == null ? "" : row2.getCell(23).toString().trim();
             if (!name30.equals("工伤事故起数")) {
-                return R.error("第3行,第20列,表头模板有误!");
+                return R.error("第3行,第24列,表头模板有误!");
             }
-            String name31 = row2.getCell(20) == null ? "" : row2.getCell(20).toString().trim();
+            String name31 = row2.getCell(24) == null ? "" : row2.getCell(24).toString().trim();
             if (!name31.equals("费用(元)")) {
-                return R.error("第3行,第21列,表头模板有误!");
+                return R.error("第3行,第25列,表头模板有误!");
             }
-            String name32 = row2.getCell(21) == null ? "" : row2.getCell(21).toString().trim();
+            String name32 = row2.getCell(25) == null ? "" : row2.getCell(25).toString().trim();
             if (!name32.equals("千人工伤率(‰)")) {
-                return R.error("第3行,第22列,表头模板有误!");
+                return R.error("第3行,第26列,表头模板有误!");
             }
-            String name33 = row2.getCell(22) == null ? "" : row2.getCell(22).toString().trim();
+            String name33 = row2.getCell(26) == null ? "" : row2.getCell(26).toString().trim();
             if (!name33.equals("专项开展不到位、不及时、效果不佳情况")) {
-                return R.error("第3行,第23列,表头模板有误!");
+                return R.error("第3行,第27列,表头模板有误!");
             }
-            String name34 = row2.getCell(24) == null ? "" : row2.getCell(24).toString().trim();
+            String name34 = row2.getCell(28) == null ? "" : row2.getCell(28).toString().trim();
             if (!name34.equals("车间、部门上交的资料质量差、标准低情况")) {
-                return R.error("第3行,第25列,表头模板有误!");
+                return R.error("第3行,第29列,表头模板有误!");
             }
-            String name35 = row2.getCell(29) == null ? "" : row2.getCell(29).toString().trim();
+            String name35 = row2.getCell(33) == null ? "" : row2.getCell(33).toString().trim();
             if (!name35.equals("车间自行组织预防安全培训、活动等/次数")) {
-                return R.error("第3行,第30列,表头模板有误!");
+                return R.error("第3行,第34列,表头模板有误!");
             }
-            String name36 = row2.getCell(31) == null ? "" : row2.getCell(31).toString().trim();
+            String name36 = row2.getCell(35) == null ? "" : row2.getCell(35).toString().trim();
             if (!name36.equals("迎接外部检查无隐患问题/次数")) {
-                return R.error("第3行,第32列,表头模板有误!");
+                return R.error("第3行,第36列,表头模板有误!");
             }
-            String name37 = row2.getCell(33) == null ? "" : row2.getCell(33).toString().trim();
+            String name37 = row2.getCell(37) == null ? "" : row2.getCell(37).toString().trim();
             if (!name37.equals("车间、部门承接公司安全活动次数")) {
-                return R.error("第3行,第34列,表头模板有误!");
+                return R.error("第3行,第38列,表头模板有误!");
             }
             //分析第3行
             Row row3 = sheet.getRow(3);
-            String name38 = row3.getCell(11) == null ? "" : row3.getCell(11).toString().trim();
+            String name38 = row3.getCell(15) == null ? "" : row3.getCell(15).toString().trim();
             if (!name38.equals("违章考核起数")) {
-                return R.error("第4行,第12列,表头模板有误!");
+                return R.error("第4行,第16列,表头模板有误!");
             }
-            String name39 = row3.getCell(12) == null ? "" : row3.getCell(12).toString().trim();
+            String name39 = row3.getCell(16) == null ? "" : row3.getCell(16).toString().trim();
             if (!name39.equals("人员违章率")) {
-                return R.error("第4行,第13列,表头模板有误!");
+                return R.error("第4行,第17列,表头模板有误!");
             }
             //================表头分析结束================
 
@@ -240,30 +256,34 @@ public class AspSafetyPerformanceAppraisalServiceImpl extends ServiceImpl<AspSaf
                     String monthlyinspection = row.getCell(3) == null ? "" : row.getCell(3).toString().trim();
                     String quarterlyinspection = row.getCell(4) == null ? "" : row.getCell(4).toString().trim();
                     String onstieinspection = row.getCell(5) == null ? "" : row.getCell(5).toString().trim();
-                    String faildpeople = row.getCell(6) == null ? "" : row.getCell(6).toString().trim();
-                    String assessmentreport = row.getCell(7) == null ? "" : row.getCell(7).toString().trim();
-                    String monthlysafetyinspection = row.getCell(8) == null ? "" : row.getCell(8).toString().trim();
-                    String dailyinspection = row.getCell(9) == null ? "" : row.getCell(9).toString().trim();
-                    String reviewrate = row.getCell(10) == null ? "" : row.getCell(10).toString().trim();
-                    String violationassessment = row.getCell(11) == null ? "" : row.getCell(11).toString().trim();
-                    String personnelviolationrate = row.getCell(12) == null ? "" : row.getCell(12).toString().trim();
-                    String commpanyassessmentreport = row.getCell(13) == null ? "" : row.getCell(13).toString().trim();
-                    String rateforworkshopquestion = row.getCell(14) == null ? "" : row.getCell(14).toString().trim();
-                    String workshopselfrate = row.getCell(15) == null ? "" : row.getCell(15).toString().trim();
-                    String numberofworkshoplevel = row.getCell(16) == null ? "" : row.getCell(16).toString().trim();
-                    String numberofsafetyincident = row.getCell(17) == null ? "" : row.getCell(17).toString().trim();
-                    String cost1 = row.getCell(18) == null ? "" : row.getCell(18).toString().trim();
-                    String numberofaccident = row.getCell(19) == null ? "" : row.getCell(19).toString().trim();
-                    String cost2 = row.getCell(20) == null ? "" : row.getCell(20).toString().trim();
-                    String thousandartificialinjuryrate = row.getCell(21) == null ? "" : row.getCell(21).toString().trim();
-                    String numberofspecialproject = row.getCell(22) == null ? "" : row.getCell(22).toString().trim();
-                    String numberofbadmatterials = row.getCell(24) == null ? "" : row.getCell(24).toString().trim();
-                    String totaldeductionpoints = row.getCell(26) == null ? "" : row.getCell(26).toString().trim();
-                    String trainingbyself = row.getCell(29) == null ? "" : row.getCell(29).toString().trim();
-                    String trainingbyout = row.getCell(31) == null ? "" : row.getCell(31).toString().trim();
-                    String trainingbycompany = row.getCell(33) == null ? "" : row.getCell(33).toString().trim();
-                    String totalbonuspoints = row.getCell(35) == null ? "" : row.getCell(35).toString().trim();
-                    String totalscore = row.getCell(36) == null ? "" : row.getCell(36).toString().trim();
+                    String numberofcheckdanger = row.getCell(6) == null ? "" : row.getCell(6).toString().trim();
+                    String numberofdaycheckdanger = row.getCell(7) == null ? "" : row.getCell(7).toString().trim();
+                    String faildpeople = row.getCell(8) == null ? "" : row.getCell(8).toString().trim();
+                    String assessmentreport = row.getCell(9) == null ? "" : row.getCell(9).toString().trim();
+                    String monthlysafetyinspection = row.getCell(10) == null ? "" : row.getCell(10).toString().trim();
+                    String dangerouschemicalcheck = row.getCell(11) == null ? "" : row.getCell(11).toString().trim();
+                    String lowpressurecheck = row.getCell(12) == null ? "" : row.getCell(12).toString().trim();
+                    String dailyinspection = row.getCell(13) == null ? "" : row.getCell(13).toString().trim();
+                    String reviewrate = row.getCell(14) == null ? "" : row.getCell(14).toString().trim();
+                    String violationassessment = row.getCell(15) == null ? "" : row.getCell(15).toString().trim();
+                    String personnelviolationrate = row.getCell(16) == null ? "" : row.getCell(16).toString().trim();
+                    String commpanyassessmentreport = row.getCell(17) == null ? "" : row.getCell(17).toString().trim();
+                    String rateforworkshopquestion = row.getCell(18) == null ? "" : row.getCell(18).toString().trim();
+                    String workshopselfrate = row.getCell(19) == null ? "" : row.getCell(19).toString().trim();
+                    String numberofworkshoplevel = row.getCell(20) == null ? "" : row.getCell(20).toString().trim();
+                    String numberofsafetyincident = row.getCell(21) == null ? "" : row.getCell(21).toString().trim();
+                    String cost1 = row.getCell(22) == null ? "" : row.getCell(22).toString().trim();
+                    String numberofaccident = row.getCell(23) == null ? "" : row.getCell(23).toString().trim();
+                    String cost2 = row.getCell(24) == null ? "" : row.getCell(24).toString().trim();
+                    String thousandartificialinjuryrate = row.getCell(25) == null ? "" : row.getCell(25).toString().trim();
+                    String numberofspecialproject = row.getCell(26) == null ? "" : row.getCell(26).toString().trim();
+                    String numberofbadmatterials = row.getCell(28) == null ? "" : row.getCell(28).toString().trim();
+                    String totaldeductionpoints = row.getCell(30) == null ? "" : row.getCell(30).toString().trim();
+                    String trainingbyself = row.getCell(33) == null ? "" : row.getCell(33).toString().trim();
+                    String trainingbyout = row.getCell(35) == null ? "" : row.getCell(35).toString().trim();
+                    String trainingbycompany = row.getCell(37) == null ? "" : row.getCell(37).toString().trim();
+                    String totalbonuspoints = row.getCell(39) == null ? "" : row.getCell(39).toString().trim();
+                    String totalscore = row.getCell(40) == null ? "" : row.getCell(40).toString().trim();
 
                     if (ObjectUtil.isEmpty(departname)) {
                         return R.error("第" + (i + 1) + "行数据存在空值,请检查表格!");
@@ -283,6 +303,12 @@ public class AspSafetyPerformanceAppraisalServiceImpl extends ServiceImpl<AspSaf
                     if (ObjectUtil.isEmpty(onstieinspection)) {
                         return R.error("第" + (i + 1) + "行数据存在空值,请检查表格!");
                     }
+                    if (ObjectUtil.isEmpty(numberofcheckdanger)) {
+                        return R.error("第" + (i + 1) + "行数据存在空值,请检查表格!");
+                    }
+                    if (ObjectUtil.isEmpty(numberofdaycheckdanger)) {
+                        return R.error("第" + (i + 1) + "行数据存在空值,请检查表格!");
+                    }
                     if (ObjectUtil.isEmpty(faildpeople)) {
                         return R.error("第" + (i + 1) + "行数据存在空值,请检查表格!");
                     }
@@ -292,6 +318,12 @@ public class AspSafetyPerformanceAppraisalServiceImpl extends ServiceImpl<AspSaf
                     if (ObjectUtil.isEmpty(monthlysafetyinspection)) {
                         return R.error("第" + (i + 1) + "行数据存在空值,请检查表格!");
                     }
+                    if (ObjectUtil.isEmpty(dangerouschemicalcheck)) {
+                        return R.error("第" + (i + 1) + "行数据存在空值,请检查表格!");
+                    }
+                    if (ObjectUtil.isEmpty(lowpressurecheck)) {
+                        return R.error("第" + (i + 1) + "行数据存在空值,请检查表格!");
+                    }
                     if (ObjectUtil.isEmpty(dailyinspection)) {
                         return R.error("第" + (i + 1) + "行数据存在空值,请检查表格!");
                     }
@@ -362,9 +394,13 @@ public class AspSafetyPerformanceAppraisalServiceImpl extends ServiceImpl<AspSaf
                     detail.setMonthlyinspection(monthlyinspection);
                     detail.setQuarterlyinspection(quarterlyinspection);
                     detail.setOnstieinspection(onstieinspection);
+                    detail.setNumberofcheckdanger(numberofcheckdanger);
+                    detail.setNumberofdaycheckdanger(numberofdaycheckdanger);
                     detail.setFaildpeople(faildpeople);
                     detail.setAssessmentreport(assessmentreport);
                     detail.setMonthlysafetyinspection(monthlysafetyinspection);
+                    detail.setDangerouschemicalcheck(dangerouschemicalcheck);
+                    detail.setLowpressurecheck(lowpressurecheck);
                     detail.setDailyinspection(dailyinspection);
                     detail.setReviewrate(reviewrate);
                     detail.setViolationassessment(violationassessment);
@@ -409,25 +445,29 @@ public class AspSafetyPerformanceAppraisalServiceImpl extends ServiceImpl<AspSaf
                     String monthlyinspection = row.getCell(3) == null ? "" : row.getCell(3).toString().trim();
                     String quarterlyinspection = row.getCell(4) == null ? "" : row.getCell(4).toString().trim();
                     String onstieinspection = row.getCell(5) == null ? "" : row.getCell(5).toString().trim();
-                    String faildpeople = row.getCell(6) == null ? "" : row.getCell(6).toString().trim();
-                    String assessmentreport = row.getCell(7) == null ? "" : row.getCell(7).toString().trim();
-                    String monthlysafetyinspection = row.getCell(8) == null ? "" : row.getCell(8).toString().trim();
-                    String dailyinspection = row.getCell(9) == null ? "" : row.getCell(9).toString().trim();
-                    String reviewrate = row.getCell(10) == null ? "" : row.getCell(10).toString().trim();
-                    String violationscore = row.getCell(11) == null ? "" : row.getCell(11).toString().trim();
-                    String commpanyassessmentreport = row.getCell(13) == null ? "" : row.getCell(13).toString().trim();
-                    String rateforworkshopquestion = row.getCell(14) == null ? "" : row.getCell(14).toString().trim();
-                    String workshopselfrate = row.getCell(15) == null ? "" : row.getCell(15).toString().trim();
-                    String numberofworkshoplevel = row.getCell(16) == null ? "" : row.getCell(16).toString().trim();
-                    String score1 = row.getCell(17) == null ? "" : row.getCell(17).toString().trim();
-                    String score2 = row.getCell(19) == null ? "" : row.getCell(19).toString().trim();
-                    String thousandartificialinjuryrate = row.getCell(21) == null ? "" : row.getCell(21).toString().trim();
-                    String numberofspecialproject = row.getCell(22) == null ? "" : row.getCell(22).toString().trim();
-                    String numberofbadmatterials = row.getCell(24) == null ? "" : row.getCell(24).toString().trim();
+                    String numberofcheckdanger = row.getCell(6) == null ? "" : row.getCell(6).toString().trim();
+                    String numberofdaycheckdanger = row.getCell(7) == null ? "" : row.getCell(7).toString().trim();
+                    String faildpeople = row.getCell(8) == null ? "" : row.getCell(8).toString().trim();
+                    String assessmentreport = row.getCell(9) == null ? "" : row.getCell(9).toString().trim();
+                    String monthlysafetyinspection = row.getCell(10) == null ? "" : row.getCell(10).toString().trim();
+                    String dangerouschemicalcheck = row.getCell(11) == null ? "" : row.getCell(11).toString().trim();
+                    String lowpressurecheck = row.getCell(12) == null ? "" : row.getCell(12).toString().trim();
+                    String dailyinspection = row.getCell(13) == null ? "" : row.getCell(13).toString().trim();
+                    String reviewrate = row.getCell(14) == null ? "" : row.getCell(14).toString().trim();
+                    String violationscore = row.getCell(15) == null ? "" : row.getCell(15).toString().trim();
+                    String commpanyassessmentreport = row.getCell(17) == null ? "" : row.getCell(17).toString().trim();
+                    String rateforworkshopquestion = row.getCell(18) == null ? "" : row.getCell(18).toString().trim();
+                    String workshopselfrate = row.getCell(19) == null ? "" : row.getCell(19).toString().trim();
+                    String numberofworkshoplevel = row.getCell(20) == null ? "" : row.getCell(20).toString().trim();
+                    String score1 = row.getCell(21) == null ? "" : row.getCell(21).toString().trim();
+                    String score2 = row.getCell(23) == null ? "" : row.getCell(23).toString().trim();
+                    String thousandartificialinjuryrate = row.getCell(25) == null ? "" : row.getCell(25).toString().trim();
+                    String numberofspecialproject = row.getCell(26) == null ? "" : row.getCell(26).toString().trim();
+                    String numberofbadmatterials = row.getCell(28) == null ? "" : row.getCell(28).toString().trim();
 //                    String totaldeductionpoints = row.getCell(26) == null ? "" : row.getCell(26).toString().trim();
-                    String trainingbyself = row.getCell(29) == null ? "" : row.getCell(29).toString().trim();
-                    String trainingbyout = row.getCell(31) == null ? "" : row.getCell(31).toString().trim();
-                    String trainingbycompany = row.getCell(33) == null ? "" : row.getCell(33).toString().trim();
+                    String trainingbyself = row.getCell(33) == null ? "" : row.getCell(33).toString().trim();
+                    String trainingbyout = row.getCell(35) == null ? "" : row.getCell(35).toString().trim();
+                    String trainingbycompany = row.getCell(37) == null ? "" : row.getCell(37).toString().trim();
 //                    String totalbonuspoints = row.getCell(35) == null ? "" : row.getCell(35).toString().trim();
 //                    String totalscore = row.getCell(36) == null ? "" : row.getCell(36).toString().trim();
 
@@ -505,9 +545,13 @@ public class AspSafetyPerformanceAppraisalServiceImpl extends ServiceImpl<AspSaf
                     detail.setMonthlyinspection(monthlyinspection);
                     detail.setQuarterlyinspection(quarterlyinspection);
                     detail.setOnstieinspection(onstieinspection);
+                    detail.setNumberofcheckdanger(numberofcheckdanger);
+                    detail.setNumberofdaycheckdanger(numberofdaycheckdanger);
                     detail.setFaildpeople(faildpeople);
                     detail.setAssessmentreport(assessmentreport);
                     detail.setMonthlysafetyinspection(monthlysafetyinspection);
+                    detail.setDangerouschemicalcheck(dangerouschemicalcheck);
+                    detail.setLowpressurecheck(lowpressurecheck);
                     detail.setDailyinspection(dailyinspection);
                     detail.setReviewrate(reviewrate);
 //                    detail.setViolationassessment(violationassessment);

+ 20 - 0
cx-safe-check/cx-save-check-entity/src/main/java/com/rongwe/scentity/domian/AspSafetyPerformanceAppraisalDetail.java

@@ -100,6 +100,16 @@ public class AspSafetyPerformanceAppraisalDetail implements Serializable {
      */
     private String onstieinspection;
 
+    /**
+     * 集团燃气专项检查隐患条数
+     */
+    private String numberofcheckdanger;
+
+    /**
+     * 集团日常巡查隐患条数
+     */
+    private String numberofdaycheckdanger;
+
     /**
      * 考试或提问不合格人数
      */
@@ -115,6 +125,16 @@ public class AspSafetyPerformanceAppraisalDetail implements Serializable {
      */
     private String monthlysafetyinspection;
 
+    /**
+     * 危险化学品检查
+     */
+    private String dangerouschemicalcheck;
+
+    /**
+     * 高低压二氧化碳灭火系统检查
+     */
+    private String lowpressurecheck;
+
     /**
      * 安全部日常巡查条数
      */