| 
					
				 | 
			
			
				@@ -23,10 +23,8 @@ import com.zfire.jiasm.syncdata.service.orderBaseInstallCjService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.zfire.jiasm.syncdata.utils.MyBeanUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.zfire.jiasm.syncdata.utils.oss.OSSUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import lombok.extern.slf4j.Slf4j; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import org.apache.commons.collections4.CollectionUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.jetbrains.annotations.NotNull; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.jetbrains.annotations.Nullable; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import org.springframework.beans.factory.annotation.Value; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.scheduling.annotation.Scheduled; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.stereotype.Component; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.transaction.annotation.Transactional; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -171,8 +169,6 @@ public class InstallProduceDataUploadList { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Resource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     GreeLogic greeLogic; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Resource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    OrderInstallOperatingLogService orderInstallOperatingLogService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @Resource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     ItfTblazwgmxjyktfjService itfTblazwgmxjyktfjService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Resource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     ItfTblazwgmxjyktfjCJMapper itfTblazwgmxjyktfjCJMapper; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -183,16 +179,6 @@ public class InstallProduceDataUploadList { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Resource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     ItfTblazwgmxqitafjCJMapper itfTblazwgmxqitafjCJMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Resource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    ItfTblazwgmxsykttmmxlsService itfTblazwgmxsykttmmxlsService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @Resource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    ItfTblazwgmxjyktService itfTblazwgmxjyktService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @Resource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    ItfTblazwgmxsyktService itfTblazwgmxsyktService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @Resource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    ItfTblazwgmxqitaService itfTblazwgmxqitaService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @Resource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    ItfInstallitemService itfInstallitemService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @Resource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     orderBaseInstallCjService orderBaseInstallCjService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -254,6 +240,10 @@ public class InstallProduceDataUploadList { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             if (!orderBaseInstallCjService.orderBaseInstallCj(brand, ojtutl, CategoryRefmap)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                 continue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } else if (uploadTaskType==222){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            if (!orderBaseInstallCjService.orderBaseInstallWg(brand, ojtutl, CategoryRefmap)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                continue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     // 安装工单操作明细 TL_PrePareSynDataby_fa_order_install_operating_log 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -466,338 +456,6 @@ public class InstallProduceDataUploadList { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return Boolean.TRUE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @Transactional(rollbackFor = Exception.class) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public boolean orderBaseInstallCjBack(Brand brand, OutJiasmToGreeUploadTaskList ojtutl, Map<String, List<SysDictRef>> CategoryRefmap) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<OrderProduct> upOps = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<OrderInstallOperatingLog> uplog = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<OrderInstallDetail> updetail = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        OrderBase orderBase = orderBaseService.lambdaQuery() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                .eq(OrderBase::getId, ojtutl.getId()).one(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (orderBase !=null ){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 安装工单产品信息,操作日志,完工明细,完工明细附件 以主表的pgguid统一修改 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            upPgguid(orderBase.getId(), upOps, uplog, updetail, orderBase); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 生成待同步的安装工单主表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            ItfTblAzAssignLcLsUpload lcls = getItfTblAzAssignLcLsUpload(brand, orderBase); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 1: 插入工单主表数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (!itfTblAzAssignLcLsUploadService.save(lcls)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return Boolean.FALSE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 同步采集明细数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            List<OrderInstallDetail> details = orderInstallDetailService.lambdaQuery() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    .eq(OrderInstallDetail::getOrderBaseId, orderBase.getId()).list(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            for (OrderInstallDetail detail:details){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                // 状态:3=临时保存;2=作废,1=已采集,0=未采集 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if ((detail.getStatus().equals(1) || detail.getStatus().equals(2)) && 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        detail.getIsCjSend().equals("NO")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    // 生成taskno,pgwcmxid 共用 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    String taskno = IdWorker.getIdStr(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    String pgwcmxid = IdWorker.getIdStr(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    // 根据产品类别名称 生成不同的完工明细数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    String mainName = CategoryRefmap.get(orderBase.getMainId()).get(0).getRefDictName(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    // 数据生成 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    if (installDtailJS(brand, orderBase, lcls, detail, taskno, pgwcmxid, mainName)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        // 数据明细检查(如果明细不存在则不写主表以免数据不完整) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        if (!checkInstallitem(taskno,detail,lcls,ojtutl)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            return Boolean.FALSE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // 修改数据上传任务表中的状态   这里固定值 221 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        publicService.updateUploadTaskListStatus(ojtutl.getOrderNo(),ojtutl.getSynReqId(),1,221); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return Boolean.TRUE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    Boolean checkInstallitem(String taskno,OrderInstallDetail detail,ItfTblAzAssignLcLsUpload lcls,OutJiasmToGreeUploadTaskList ojtutl){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        int itemStatus = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        int itemStat   = 1100; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        int itemSyjd   = 1301; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        int itemdqjd   = 1304; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<ItfTblazwgmxjykt> jys =  itfTblazwgmxjyktService.lambdaQuery() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                .eq(ItfTblazwgmxjykt::getSynTaskNo,taskno).list(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<ItfTblazwgmxsykt> sys =  itfTblazwgmxsyktService.lambdaQuery() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                .eq(ItfTblazwgmxsykt::getSynTaskNo,taskno).list(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<ItfTblazwgmxqita> qts =  itfTblazwgmxqitaService.lambdaQuery() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                .eq(ItfTblazwgmxqita::getSynTaskNo,taskno).list(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (CollectionUtils.isNotEmpty(jys) || CollectionUtils.isNotEmpty(sys) || CollectionUtils.isNotEmpty(qts)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (detail.getStatus().equals(1)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                itemStat   = 1100; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                itemSyjd   = 1301; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                itemdqjd   = 1304; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } else if (detail.getStatus().equals(2)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                itemStat   = 1110; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                itemSyjd   = 1301; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                itemdqjd   = 1304; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // itf_installitem 安装主表上传同步记录表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            ItfInstallitem m = new ItfInstallitem(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            MyBeanUtils.copyProperties(lcls,m); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            m.setSynTaskNo(taskno); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            m.setStatus(detail.getStatus()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            m.setId(lcls.getPgguid()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            m.setStat(itemStat); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            m.setSyjd(itemSyjd * 1L); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            m.setDqjd(itemdqjd * 1L); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (!itfInstallitemService.save(m)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return Boolean.FALSE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 检查是否已产生了1120完工请求 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (itemStat == 1100){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                List<ItfInstallitem> old = itfInstallitemService.lambdaQuery() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        .eq(ItfInstallitem::getWorkerOrderNo,ojtutl.getId()) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        .eq(ItfInstallitem::getStat,1120) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        .lt(ItfInstallitem::getSynReqTime,new Date()).list(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (CollectionUtils.isNotEmpty(jys)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    taskno = IdWorker.getIdStr(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    itemStatus = 2; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    if (detail.getStatus().equals(1)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        itemStat   = 1120; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        itemSyjd   = 1304; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        itemdqjd   = 1309; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    } else if (detail.getStatus().equals(2)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        itemStat   = 1110; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        itemSyjd   = 1304; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        itemdqjd   = 1309; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    ItfInstallitem mt = new ItfInstallitem(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    MyBeanUtils.copyProperties(lcls,mt); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    mt.setSynTaskNo(taskno); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    mt.setStatus(itemStatus); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    mt.setId(lcls.getPgguid()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    mt.setStat(itemStat); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    mt.setSyjd(itemSyjd * 1L); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    mt.setDqjd(itemdqjd * 1L); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    if (!itfInstallitemService.save(mt)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        return Boolean.FALSE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 修改 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (detail.getIsCjSend().equals("NO")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                detail.setIsCjSend("YES"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                detail.updateById(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return Boolean.TRUE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    private Boolean installDtailJS(Brand brand, OrderBase orderBase, ItfTblAzAssignLcLsUpload lcls, OrderInstallDetail detail, String taskno, String pgwcmxid, String mainName) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // 获取完工采集明细数据 (家用空调、商用空调、其他) TL_fa_order_install_detail_js 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (!getCJMXDataCj(brand, orderBase, lcls, detail, pgwcmxid, mainName, taskno)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            return Boolean.FALSE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // 获取采集附件数据 (家用、商用、其他) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (!getcjfjdataCj(orderBase, detail, mainName, taskno)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            return Boolean.FALSE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // 处理条码明细 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (!getDetailCodeCj(orderBase, detail, mainName, taskno)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            return Boolean.FALSE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return Boolean.TRUE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    private Boolean getcjfjdataCj(OrderBase orderBase, OrderInstallDetail detail, String mainName, String taskno) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        String oldFile =""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        String newFile =""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // 安装工单采集附件表提取数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        InstallCJDetailFile installCJDetailFile = new InstallCJDetailFile(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        installCJDetailFile.setOrderNo(detail.getOrderBaseId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        installCJDetailFile.setId(detail.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<OrderDetailFile> detailFiles = fileOrderDetailMapper.getIdCj(installCJDetailFile); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        for (OrderDetailFile file:detailFiles){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 工单号, file的id即附件表的id,uuid统一值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // path未准备上传被忽略 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (StringUtils.isEmpty(file.getFilePath())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return Boolean.FALSE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 品牌方fileindex未获取上传被忽略 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (StringUtils.isEmpty(file.getBrandFileIndex())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                // 上传图片 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                oldFile = IdWorker.getIdStr() + ".jpeg"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                baseService.saveToFile(ossUtil.getUrlWw(file.getFilePath()),oldFile); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                // 获取文件 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                newFile = oldFile; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                WebsitPP websitToPP = publicService.WebsitToPP(orderBase.getWebsitId(),"1"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                Boolean flag = uploadFileexc(newFile, oldFile,websitToPP.getWdno(), file); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                new File(newFile).delete(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (flag) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    return Boolean.FALSE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 提取获取采集明细表数据中获取pgwcmxid(生成格力总部-采集明细序号) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            OrderInstallDetail detailone = orderInstallDetailService.lambdaQuery() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    .eq(OrderInstallDetail::getOrderBaseId,file.getOrderBaseId()) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    .eq(OrderInstallDetail::getId,file.getOrderDetailId()).one(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 获取完工明细数据(采集附件表) 家用、商用、其他 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            return getwgmxDataCj(mainName, file, detailone, taskno); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return Boolean.TRUE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @NotNull 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    private ItfTblAzAssignLcLsUpload getItfTblAzAssignLcLsUpload(Brand brand, OrderBase orderBase) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        OrderPar orderPar = new OrderPar(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        orderPar.setBrandId(brand.getBrandId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        orderPar.setOrderNo(orderBase.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ItfTblAzAssignLcLsUpload lcls = gdOrderBaseMapper.getAzOrderBaseCj(orderPar); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // 省市等信息单独处理 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        setssxz(lcls); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return lcls; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    private Boolean getCJMXDataCj(Brand brand, OrderBase orderBase, ItfTblAzAssignLcLsUpload lcls, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                             OrderInstallDetail item, String pgwcmxid, String mainName, String taskno) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (org.apache.commons.lang3.StringUtils.isEmpty(item.getPgwcmxid())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            item.setPgwcmxid(pgwcmxid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            item.updateById(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // 采集表与采集条码表ID超范围 - 采集表及采集明细表中的outid统一修改 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        upOutId(item); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // 采集标志 1100:保存,1110:作废,1120:转结算 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        Integer cjstat = 1100; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // 作废 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (item.getStatus().equals(2)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            cjstat = 1110; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // 修改首次提交时间 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        item.setFirstTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        item.updateById(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        InstallDetail request = new InstallDetail(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        request.setOrderNo(item.getOrderBaseId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        request.setId(item.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        request.setBrandId(brand.getBrandId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // 为空时为 家用空调 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (org.apache.commons.lang3.StringUtils.isEmpty(mainName) || 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                mainName.equals("家用空调") || mainName.equals("家用空气能热水器") || mainName.equals("驻车空调")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 家用空调 完工明细 数据生成(完工采集数据) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            ItfTblAzWgmxJyktUpload mxup = detailOrderInstallMapper.getOrderInstallUploadCj(request); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (mxup != null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                // 部分参数单独处理 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                setParm(brand, orderBase, lcls, cjstat, mxup, item); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (!itfTblAzWgmxJyktUploadService.save(mxup)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    return Boolean.FALSE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                // 生成完工明细(家用空调)上传记录表数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return getItfTblazwgmxjykt(taskno, mxup); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } else if (mainName.equals("商用空调")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 商用空调 完工明细数据生成(完工采集数据) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            ItfTblAzWgmxSyktUpload mxup = detailOrderInstallMapper.getSyOrderInstallUploadCj(request); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (mxup != null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                // 部分参数单独处理 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                setSyParm(brand, orderBase, lcls, cjstat, mxup, item); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (!itfTblAzWgmxSyktUploadService.save(mxup)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    return Boolean.FALSE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                // 生成完工明细(商用空调)上传记录表数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return getItfTblazwgmxsykt(taskno, mxup); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 其他 完工明细数据生成 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 获取家用空调完工明细(完工采集数据) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            ItfTblAzWgmxQitaUpload mxup = detailOrderInstallMapper.getOtherOrderInstallUploadCj(request); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (mxup != null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                // 部分参数单独处理 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                setOtherParm(brand, orderBase, lcls, cjstat, mxup, item); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (!itfTblAzWgmxQitaUploadService.save(mxup)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    return Boolean.FALSE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                // 完工明细(其他)上传记录表 itf_tblazwgmxqita 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return getItfTblazwgmxqita(taskno, mxup); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return Boolean.TRUE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    private Boolean getItfTblazwgmxqita(String taskno, ItfTblAzWgmxQitaUpload mxup) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ItfTblazwgmxqita ta = new ItfTblazwgmxqita(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        MyBeanUtils.copyProperties(mxup,ta); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ta.setSynTaskNo(taskno); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ta.setId(mxup.getPgwcmxid()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ta.setKjfs(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return itfTblazwgmxqitaService.save(ta); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    private Boolean getItfTblazwgmxsykt(String taskno, ItfTblAzWgmxSyktUpload mxup) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ItfTblazwgmxsykt kt = new ItfTblazwgmxsykt(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        MyBeanUtils.copyProperties(mxup,kt); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        kt.setSynTaskNo(taskno); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        kt.setId(mxup.getPgwcmxid()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        kt.setKjmm2(""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        kt.setKjfs(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return itfTblazwgmxsyktService.save(kt); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    private Boolean getItfTblazwgmxjykt(String taskno, ItfTblAzWgmxJyktUpload mxup) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ItfTblazwgmxjykt kt = new ItfTblazwgmxjykt(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        MyBeanUtils.copyProperties(mxup,kt); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        kt.setSynTaskNo(taskno); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        kt.setId(mxup.getPgwcmxid()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return itfTblazwgmxjyktService.save(kt); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    private void upPgguid(String orderNo, List<OrderProduct> upOps, List<OrderInstallOperatingLog> uplog, List<OrderInstallDetail> updetail, OrderBase orderBase) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<OrderProduct> ops = orderProductService.lambdaQuery() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                .eq(OrderProduct::getOrderBaseId, orderNo).list(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        for (OrderProduct o:ops){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (org.apache.commons.lang3.StringUtils.isEmpty(o.getPgguid())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                o.setPgguid(orderBase.getPgguid()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                upOps.add(o); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // 操作日志 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<OrderInstallOperatingLog> olog = orderInstallOperatingLogService.lambdaQuery() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                .eq(OrderInstallOperatingLog::getOrderBaseId, orderNo).list(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        for (OrderInstallOperatingLog o:olog){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (org.apache.commons.lang3.StringUtils.isEmpty(o.getPgguid())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                o.setPgguid(orderBase.getPgguid()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                uplog.add(o); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // 采集明细 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<OrderInstallDetail> od = orderInstallDetailService.lambdaQuery() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                .eq(OrderInstallDetail::getOrderBaseId, orderNo).list(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        for (OrderInstallDetail o:od){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (org.apache.commons.lang3.StringUtils.isEmpty(o.getPgguid())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                o.setPgguid(orderBase.getPgguid()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                updetail.add(o); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (upOps.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            orderProductService.updateBatchById(upOps); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            upOps.clear(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (uplog.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            orderInstallOperatingLogService.updateBatchById(uplog); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            uplog.clear(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (updetail.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            orderInstallDetailService.updateBatchById(updetail); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            updetail.clear(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private Boolean getFeeUpload(OrderBase orderBase) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // 根据辅材订单支付表存在支付时生成安装费用数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<OrderPayOutlayItem> pitems = orderPayOutlayItemService.lambdaQuery() 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1007,51 +665,6 @@ public class InstallProduceDataUploadList { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return Boolean.TRUE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    private Boolean getDetailCodeCj(OrderBase orderBase, OrderInstallDetail detail, String mainName, String taskno) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // 获取条码采集明细id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        InstalDetailCode instalDetailCode = new InstalDetailCode(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        instalDetailCode.setOrderNo(detail.getOrderBaseId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        instalDetailCode.setId(detail.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<OrderInstallDetailCode> codes = codeOrderInstallDetailMapper.getIdCj(instalDetailCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // 处理条码明细 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        for (OrderInstallDetailCode code :codes){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (StringUtils.isEmpty(code.getPath())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return Boolean.FALSE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 条码上传 todo 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (StringUtils.isEmpty(code.getGreeImageId())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                // 上传图片 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (!uploadImage(orderBase, code)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    return Boolean.FALSE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (StringUtils.isEmpty(code.getTmguid())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                OrderInstallDetailCode upCode = new OrderInstallDetailCode(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                upCode.setId(code.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                upCode.setTmguid(UUID.randomUUID().toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                orderInstallDetailCodeService.updateById(upCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 采集明细表中取pgwcmxid 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            OrderInstallDetail orderInstallDetail = orderInstallDetailService.lambdaQuery() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    .eq(OrderInstallDetail::getOrderBaseId,code.getOrderBaseId()) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    .eq(OrderInstallDetail::getId,code.getOrderDetailId()).one(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (orderInstallDetail == null || StringUtils.isEmpty(orderInstallDetail.getPgwcmxid())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                continue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                OrderInstallDetailCode upCode = new OrderInstallDetailCode(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                upCode.setId(code.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                upCode.setPgwcmxid(orderInstallDetail.getPgwcmxid()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                orderInstallDetailCodeService.updateById(upCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 生成采集条码表数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            return generateDetailCodeCj(orderBase, code, mainName, taskno); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return Boolean.TRUE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private void generateDetailCode(OrderBase orderBase, OrderInstallDetailCode code, String mainName) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // 采集条码表中的pgguid 统一改成工单基础表的pgguid 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         InstalDetailCode upcode = new InstalDetailCode(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1085,40 +698,6 @@ public class InstallProduceDataUploadList { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    private Boolean generateDetailCodeCj(OrderBase orderBase, OrderInstallDetailCode code, String mainName, String taskno) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // 采集条码表中的pgguid 统一改成工单基础表的pgguid 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        InstalDetailCode upcode = new InstalDetailCode(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        upcode.setOrderNo(code.getOrderBaseId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        upcode.setPgguId(orderBase.getPgguid()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        codeOrderInstallDetailMapper.updateCodePgguid(upcode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        InstalDetailCode codep = new InstalDetailCode(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        codep.setOrderNo(code.getOrderBaseId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        codep.setId(code.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (mainName.equals("商用空调")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 商用用空调 完工明细 数据生成(完工采集条码数据) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            ItfTblAzWgmxSyktTmmxLsUpload sy = codeOrderInstallDetailMapper.getSyCodeCj(codep); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (sy != null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (!itfTblAzWgmxSyktTmmxLsUploadService.save(sy)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    return Boolean.FALSE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                // 生成商用完工明细数据采集条码明细表数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return getItfTblazwgmxsykttmmxls(taskno, sy); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return Boolean.TRUE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    private Boolean getItfTblazwgmxsykttmmxls(String taskno, ItfTblAzWgmxSyktTmmxLsUpload sy) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ItfTblazwgmxsykttmmxls ls = new ItfTblazwgmxsykttmmxls(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        MyBeanUtils.copyProperties(sy,ls); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ls.setSynTaskNo(taskno); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ls.setRelationid(sy.getPgwcmxid()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ls.setId(sy.getTmguid()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return itfTblazwgmxsykttmmxlsService.save(ls); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Nullable 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private void getCJMXData(Brand brand, Map<String, List<SysDictRef>> CategoryRefmap, OrderBase orderBase, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                ItfTblAzAssignLcLsUpload lcls, OrderInstallDetail detail,String mainName) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1398,71 +977,6 @@ public class InstallProduceDataUploadList { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public Boolean getwgmxDataCj(String mainName, OrderDetailFile file, OrderInstallDetail detailone, String taskno) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // 修改附件的pgwcmxid 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (detailone != null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            OrderDetailFile upf = new OrderDetailFile(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            upf.setId(file.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            upf.setPgwcmxid(detailone.getPgwcmxid()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            orderDetailFileService.updateById(upf); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // 修改附件的fjguid 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (detailone != null && StringUtils.isEmpty(file.getFjguid())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            OrderDetailFile upf = new OrderDetailFile(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            upf.setId(file.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            upf.setFjguid(UUID.randomUUID().toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            orderDetailFileService.updateById(upf); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        InstallCJDetailFile request = new InstallCJDetailFile(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        request.setOrderNo(file.getOrderBaseId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        request.setId(file.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // 生成家用空调 数据采集附件上传记录 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (mainName.equals("家用空调") || 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                mainName.equals("家用空气能热水器") || 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                mainName.equals("驻车空调")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 家用空调 完工明细 数据生成 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            ItfTblAzWgmxJyktFjUpload jyktfj = fileOrderDetailMapper.getFileUpload(request); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (jyktfj !=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (itfTblAzWgmxJyktFjUploadService.save(jyktfj)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    return Boolean.FALSE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                // 生成家用空调数据采集附件上传记录表数据 itf_tblazwgmxjyktfj 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (!processItfTblazwgmxjyktfj(mainName, file, taskno, jyktfj)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    return Boolean.FALSE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } else if (mainName.equals("商用空调")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 商用空调 完工明细 数据生成 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            ItfTblAzWgmxSyktFjUpload syktfj = fileOrderDetailMapper.getSyFileUploadCj(request); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (syktfj !=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (!itfTblAzWgmxSyktFjUploadService.save(syktfj)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    return Boolean.FALSE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                // 生成商用空调数据采集附件表上传记录表数据 itf_tblazwgmxsyktfj 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (!getItfTblazwgmxsyktfj(taskno, syktfj)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    return Boolean.FALSE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 其他 完工明细 数据生成 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            ItfTblAzWgmxQitaFjUpload otherfj = fileOrderDetailMapper.getOtherFileUploadCj(request); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (otherfj != null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (!itfTblAzWgmxQitaFjUploadService.save(otherfj)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    return Boolean.FALSE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                // 生成其他数据采集附件表上传附件表数据itf_tblazwgmxqitafj 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (!saveItfTblazwgmxqitafj(taskno, otherfj)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    return Boolean.FALSE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                upItfTblazwgmxqitafj(file, taskno); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return Boolean.TRUE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private void upItfTblazwgmxqitafj(OrderDetailFile file, String taskno) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         InstallDetail req = new InstallDetail(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         req.setOrderNo(file.getOrderBaseId()); 
			 |