yaozhixue 1 year ago
parent
commit
2c59bcd3a8

+ 10 - 6
src/main/java/com/zfire/jiasm/syncdata/service/impl/RepairProduceDataUploadServiceImpl.java

@@ -180,7 +180,7 @@ public class RepairProduceDataUploadServiceImpl implements RepairProduceDataUplo
                 List<OutJiasmToGreeUploadTaskList> result = outJiasmToGreeUploadTaskListService.lambdaQuery()
                         .eq(OutJiasmToGreeUploadTaskList::getSynStatus,0)
                         .eq(OutJiasmToGreeUploadTaskList::getUploadTaskType,uploadTaskType)
-                        //.eq(OutJiasmToGreeUploadTaskList::getSynReqId,115L)// 测试用
+                        //.eq(OutJiasmToGreeUploadTaskList::getSynReqId,116L)// 测试用
                         .orderByAsc(OutJiasmToGreeUploadTaskList::getSynReqId).list();
                 // 相同任务类型的数据逐个处理
                 for (OutJiasmToGreeUploadTaskList row: result){
@@ -238,7 +238,12 @@ public class RepairProduceDataUploadServiceImpl implements RepairProduceDataUplo
                         }
                     } catch (Exception ex) {
                         ex.printStackTrace();
-                        log.info("开始预处理生成需要上传的维修工单数据出错: "+taskId);
+                        String msg ="开始预处理生成需要上传的维修工单数据出错: "+taskId;
+                        log.info(msg);
+                        if (ex.getMessage() !=null){
+                            msg = ex.getMessage();
+                        }
+                        publicService.updateUploadTaskLisError(row,msg);
                     }
                     // 修改 itf_fa_to_gree_upload_task_list
                 }
@@ -798,7 +803,7 @@ public class RepairProduceDataUploadServiceImpl implements RepairProduceDataUplo
         fjt.setId(fj.getFjguid());
         fjt.setLastModifiedBy(fj.getLastModifiedBy());
         fjt.setLastModifiedDate(fj.getLastModifiedDate());
-        itfTblwxjsfjjyktService.save(fjt);
+        itfTblwxjsfjjyktService.saveOrUpdate(fjt);
     }
 
     @NotNull
@@ -859,7 +864,7 @@ public class RepairProduceDataUploadServiceImpl implements RepairProduceDataUplo
     public void generateJyktDataTow(OrderBase orderBase, OrderRepairDetail item, Long synReqId, String j_syn_task_no) {
         OrderPar request = new OrderPar();
         request.setOrderNo(orderBase.getId());
-        request.setId(item.getId());
+        request.setId(String.valueOf(item.getOutId()));
         request.setSynReqId(synReqId);
         ItfTblwxjsjykt jsjy = wxjsJyktUploadMapper.getItfTblWxjsJykt(request);
         jsjy.setSynTaskNo(j_syn_task_no);
@@ -919,7 +924,6 @@ public class RepairProduceDataUploadServiceImpl implements RepairProduceDataUplo
     public Long generateJyktData(Brand brand, OrderBase orderBase, OrderRepairDetail item) {
         ItfTblWxjsJyktUpload jykt = generateJykt(brand, orderBase, item);
         jykt.setSynStatus(44);
-        log.info("生成维修结算数据 {}",JSONObject.toJSONString(jykt));
         itfTblWxjsJyktUploadService.save(jykt);
         return jykt.getSynReqId();
     }
@@ -1560,7 +1564,7 @@ public class RepairProduceDataUploadServiceImpl implements RepairProduceDataUplo
     public ItfTblWxjsXxyyJyktUpload generateJyktUT(OrderRepairDetail detail, OrderRepairDetailReason r) {
         ItfTblWxjsXxyyJyktUpload add = new ItfTblWxjsXxyyJyktUpload();
         add.setWorkerOrderNo(detail.getOrderBaseId());
-        add.setFaOrderRepairFaultInfoId(Integer.valueOf(String.valueOf(r.getCreateTime().getTime())));
+        add.setFaOrderRepairFaultInfoId(r.getOutId());
         add.setXxyyguid(r.getXxyyguid());
         add.setCreatedBy("guangfo");
         add.setCreatedDate(r.getCreateTime());

+ 1 - 1
src/main/resources/mapper/FileOrderDetailMapper.xml

@@ -80,7 +80,7 @@
                'guangfo' as last_modified_by,a.update_time as last_modified_date,
                b.brand_wxjsguid as wxjsguid,a.brand_file_path as wjlj,a.create_time as cjsj,
                a.file_type as tpms,a.file_path as wjnm,a.pgwcmxid as wxmxguid,
-               b.id as wxjsmxguid,c.repair_item_no as repairitemno,c.xxyyguid as repairtroubleno
+               b.out_id as wxjsmxguid,c.repair_item_no as repairitemno,c.xxyyguid as repairtroubleno
         from order_detail_file a
                  left join order_repair_detail b on a.order_base_id = b.order_base_id and b.id=a.order_detail_id
                  left join order_repair_detail_item c on c.order_repair_detail_id = a.order_detail_id

+ 0 - 2
src/main/resources/mapper/ItemOrderRepairDetailMapper.xml

@@ -23,8 +23,6 @@
                a.update_time as last_modified_date,1 as flag,a.amount as fee,
                a.remark as mshu,d.ref_dict_code as spid
         from order_repair_detail_item a
-                 left join order_repair_detail b on b.id=a.order_repair_detail_id
-                 left join order_repair_detail_reason c on c.order_repair_detail_id=a.order_repair_detail_id
                  left join sys_dict_ref d on d.dict_code = #{request.mainId} and d.brand_id = #{request.brandId} and dict_type='MAIN_TYPE'
         where a.id = #{request.id}
     </select>