|
@@ -7,6 +7,7 @@ import com.steerinfo.dil.feign.ColumnDataFeign;
|
|
import com.steerinfo.dil.feign.ESFeign;
|
|
import com.steerinfo.dil.feign.ESFeign;
|
|
import com.steerinfo.dil.feign.JoinFeign;
|
|
import com.steerinfo.dil.feign.JoinFeign;
|
|
import com.steerinfo.dil.mapper.AmsDispatchSaleOrderMapper;
|
|
import com.steerinfo.dil.mapper.AmsDispatchSaleOrderMapper;
|
|
|
|
+import com.steerinfo.dil.mapper.AmsSaleOrderMapper;
|
|
import com.steerinfo.dil.model.AmsDispatchSaleOrder;
|
|
import com.steerinfo.dil.model.AmsDispatchSaleOrder;
|
|
import com.steerinfo.dil.service.IAmsSaleOrderService;
|
|
import com.steerinfo.dil.service.IAmsSaleOrderService;
|
|
import com.steerinfo.dil.service.impl.AmsDispatchSaleOrderServiceImpl;
|
|
import com.steerinfo.dil.service.impl.AmsDispatchSaleOrderServiceImpl;
|
|
@@ -79,7 +80,8 @@ public class AmsSaleOrderController<RedisTemplate> extends BaseRESTfulController
|
|
BmstruckFeign bmstruckFeign;
|
|
BmstruckFeign bmstruckFeign;
|
|
@Autowired
|
|
@Autowired
|
|
SaleLogUtil saleLogUtil;
|
|
SaleLogUtil saleLogUtil;
|
|
-
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ AmsSaleOrderMapper amsSaleOrderMapper;
|
|
|
|
|
|
private final SimpleDateFormat sdfDateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
private final SimpleDateFormat sdfDateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
|
@@ -1039,6 +1041,12 @@ public class AmsSaleOrderController<RedisTemplate> extends BaseRESTfulController
|
|
mapList.add(mapValue);
|
|
mapList.add(mapValue);
|
|
Map<String, Object> input = joinFeign.findCarNumberByOrderList(mapList);
|
|
Map<String, Object> input = joinFeign.findCarNumberByOrderList(mapList);
|
|
Map<String, Object> totalMap = easCapacityTestUtil.getTotalMap();
|
|
Map<String, Object> totalMap = easCapacityTestUtil.getTotalMap();
|
|
|
|
+ if(mapValue.get("cancel")!=null){
|
|
|
|
+ input.put("cancel",mapValue.get("cancel"));
|
|
|
|
+ }
|
|
|
|
+ if(mapValue.get("unCancel")!=null){
|
|
|
|
+ input.put("unCancel",mapValue.get("unCancel"));
|
|
|
|
+ }
|
|
totalMap.put("input", input);
|
|
totalMap.put("input", input);
|
|
System.out.println(totalMap);
|
|
System.out.println(totalMap);
|
|
String json = JSONUtils.toJSONString(totalMap);
|
|
String json = JSONUtils.toJSONString(totalMap);
|
|
@@ -1836,4 +1844,34 @@ public class AmsSaleOrderController<RedisTemplate> extends BaseRESTfulController
|
|
return success(i);
|
|
return success(i);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ @PostMapping("/test")
|
|
|
|
+ public RESTfulResult test(@RequestBody(required = false) Map<String,Object> map) {
|
|
|
|
+ try{
|
|
|
|
+ //存在capacityId则判断是否取消或撤销取消
|
|
|
|
+ if(map.get("capacityId")!=null){
|
|
|
|
+ //新车号、当前车号、旧车号
|
|
|
|
+ String capacityId ="" + map.get("capacityId");
|
|
|
|
+ Map<String,Object> capacityDetails= amsSaleOrderMapper.getCapacityDetailByAsom(map);
|
|
|
|
+ if(capacityDetails!=null && capacityDetails.get("nowCapcaityId")!=null){
|
|
|
|
+ //存在当前车号,判断是否存在取消或撤销取消
|
|
|
|
+ String nowCapcaityId ="" + capacityDetails.get("nowCapcaityId");
|
|
|
|
+ if(capacityId.equals("35128") && !capacityId.equals(nowCapcaityId)){
|
|
|
|
+ //判断是否正常转取消:新车号为取消且不等于旧车号
|
|
|
|
+ System.out.println("cancel");
|
|
|
|
+ }else if(capacityDetails.get("oldCapacityIds")!=null){
|
|
|
|
+ //存在旧车号,判断是否撤销取消:当前车号为取消,且最近的旧车号等于新车号
|
|
|
|
+ String[] oldCapacityIds =("" + capacityDetails.get("oldCapacityIds")).split(",");
|
|
|
|
+ String lastOldCapacity = oldCapacityIds[0];
|
|
|
|
+ if(nowCapcaityId.equals("35128") && lastOldCapacity.equals(capacityId)){
|
|
|
|
+ System.out.println("unCancel");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }catch (Exception e){
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
}
|
|
}
|