|
@@ -83,8 +83,9 @@ public class TmstruckTotalResultServiceImpl implements ITmstruckTotalResultServi
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- public int copyAllResult(BigDecimal orderId,BigDecimal orderIdOld,BigDecimal resultTotalIdOld){
|
|
|
|
|
|
+ public synchronized int copyAllResult(BigDecimal orderId,BigDecimal orderIdOld,BigDecimal resultTotalIdOld){
|
|
//总实绩
|
|
//总实绩
|
|
|
|
+ //判断该订单有没有总实绩id
|
|
TmstruckTotalResult tmstruckTotalResult = new TmstruckTotalResult();
|
|
TmstruckTotalResult tmstruckTotalResult = new TmstruckTotalResult();
|
|
BigDecimal maxId = tmstruckTotalResultMapper.selectMaxId();
|
|
BigDecimal maxId = tmstruckTotalResultMapper.selectMaxId();
|
|
tmstruckTotalResult.setResultTotalId(maxId);
|
|
tmstruckTotalResult.setResultTotalId(maxId);
|
|
@@ -104,35 +105,42 @@ public class TmstruckTotalResultServiceImpl implements ITmstruckTotalResultServi
|
|
map.put("orderReceiveStatus",1);
|
|
map.put("orderReceiveStatus",1);
|
|
map.put("capacityNumber","capacityNumber");
|
|
map.put("capacityNumber","capacityNumber");
|
|
//根据旧的总实绩ID判断有没有
|
|
//根据旧的总实绩ID判断有没有
|
|
- omsFeign.driverReceiveOrRefuse(map);
|
|
|
|
|
|
+ Map<String,Object> responseMap = omsFeign.driverReceiveOrRefuse(map);
|
|
|
|
+ System.out.println(responseMap);
|
|
//进厂
|
|
//进厂
|
|
serachMap.put("resultTotalId",maxId);
|
|
serachMap.put("resultTotalId",maxId);
|
|
- TmstruckEnfactoryResult tmstruckEnfactoryResult=tmstruckEnfactoryResultMapper.selectByParameters(serachMap).get(0);
|
|
|
|
- TmstruckEnfactoryResult tmstruckEnfactoryResult1=enOlds.get(0);
|
|
|
|
- tmstruckEnfactoryResult1.setResultId(tmstruckEnfactoryResult.getResultId());
|
|
|
|
- tmstruckEnfactoryResult1.setResultTotalId(tmstruckEnfactoryResult.getResultTotalId());
|
|
|
|
- tmstruckEnfactoryResultMapper.updateByPrimaryKeySelective(tmstruckEnfactoryResult1);
|
|
|
|
|
|
+ List<TmstruckEnfactoryResult> tmstruckEnfactoryResultLb = tmstruckEnfactoryResultMapper.selectByParameters(serachMap);
|
|
|
|
+ if(tmstruckEnfactoryResultLb != null && tmstruckEnfactoryResultLb.size() > 0 && tmstruckEnfactoryResultLb.get(0) != null ) {
|
|
|
|
+ TmstruckEnfactoryResult tmstruckEnfactoryResult = tmstruckEnfactoryResultLb.get(0);
|
|
|
|
+ TmstruckEnfactoryResult tmstruckEnfactoryResult1=enOlds.get(0);
|
|
|
|
+ tmstruckEnfactoryResult1.setResultId(tmstruckEnfactoryResult.getResultId());
|
|
|
|
+ tmstruckEnfactoryResult1.setResultTotalId(tmstruckEnfactoryResult.getResultTotalId());
|
|
|
|
+ tmstruckEnfactoryResultMapper.updateByPrimaryKeySelective(tmstruckEnfactoryResult1);
|
|
|
|
+ }
|
|
//计皮
|
|
//计皮
|
|
serachMap.put("resultTotalId",maxId);
|
|
serachMap.put("resultTotalId",maxId);
|
|
- TmstruckWeightResult tmstruckWeightResult=tmstruckWeightResultMapper.selectByTotalId(serachMap).get(0);
|
|
|
|
- serachMap.put("switch","1");
|
|
|
|
- serachMap.put("resultTotalId",resultTotalIdOld);
|
|
|
|
- List<TmstruckWeightResult> olds = tmstruckWeightResultMapper.selectByTotalId(serachMap);
|
|
|
|
- if(olds!=null && olds.size()>0){
|
|
|
|
- TmstruckWeightResult tmstruckWeightResult1=olds.get(0);
|
|
|
|
- tmstruckWeightResult.setResultTareWeightTime(tmstruckWeightResult1.getResultTareWeightTime());
|
|
|
|
- tmstruckWeightResult.setResultTareWeight(tmstruckWeightResult1.getResultTareWeight());
|
|
|
|
- tmstruckWeightResult.setResultTarePlaceId(tmstruckWeightResult1.getResultTarePlaceId());
|
|
|
|
- tmstruckWeightResultMapper.updateByPrimaryKeySelective(tmstruckWeightResult);
|
|
|
|
- Map<String,Object> orderMap=new HashMap<>();
|
|
|
|
- orderMap.put("orderId",orderId);
|
|
|
|
- orderMap.put("seq",2);
|
|
|
|
- tmstruckWeightResultMapper.updateOmstruckStatus(orderMap);
|
|
|
|
- }else{
|
|
|
|
- Map<String,Object> orderMap=new HashMap<>();
|
|
|
|
- orderMap.put("orderId",orderId);
|
|
|
|
- orderMap.put("seq",0);
|
|
|
|
- tmstruckWeightResultMapper.updateOmstruckStatus(orderMap);
|
|
|
|
|
|
+ List<TmstruckWeightResult> tmstruckWeightResultLb = tmstruckWeightResultMapper.selectByTotalId(serachMap);
|
|
|
|
+ if(tmstruckWeightResultLb != null && tmstruckWeightResultLb.size() > 0 && tmstruckWeightResultLb.get(0) != null) {
|
|
|
|
+ TmstruckWeightResult tmstruckWeightResult = tmstruckWeightResultLb.get(0);
|
|
|
|
+ serachMap.put("switch","1");
|
|
|
|
+ serachMap.put("resultTotalId",resultTotalIdOld);
|
|
|
|
+ List<TmstruckWeightResult> olds = tmstruckWeightResultMapper.selectByTotalId(serachMap);
|
|
|
|
+ if(olds!=null && olds.size()>0){
|
|
|
|
+ TmstruckWeightResult tmstruckWeightResult1=olds.get(0);
|
|
|
|
+ tmstruckWeightResult.setResultTareWeightTime(tmstruckWeightResult1.getResultTareWeightTime());
|
|
|
|
+ tmstruckWeightResult.setResultTareWeight(tmstruckWeightResult1.getResultTareWeight());
|
|
|
|
+ tmstruckWeightResult.setResultTarePlaceId(tmstruckWeightResult1.getResultTarePlaceId());
|
|
|
|
+ tmstruckWeightResultMapper.updateByPrimaryKeySelective(tmstruckWeightResult);
|
|
|
|
+ Map<String,Object> orderMap=new HashMap<>();
|
|
|
|
+ orderMap.put("orderId",orderId);
|
|
|
|
+ orderMap.put("seq",2);
|
|
|
|
+ tmstruckWeightResultMapper.updateOmstruckStatus(orderMap);
|
|
|
|
+ }else{
|
|
|
|
+ Map<String,Object> orderMap=new HashMap<>();
|
|
|
|
+ orderMap.put("orderId",orderId);
|
|
|
|
+ orderMap.put("seq",0);
|
|
|
|
+ tmstruckWeightResultMapper.updateOmstruckStatus(orderMap);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
//迁移排队实绩
|
|
//迁移排队实绩
|
|
serachMap.put("resultTotalId",maxId);
|
|
serachMap.put("resultTotalId",maxId);
|