|
@@ -1929,14 +1929,22 @@ public class AmsSaleOrderServiceImpl implements IAmsSaleOrderService {
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public int updateCapacityNumberInFactory(Map<String, Object> mapValue) {
|
|
|
+ public Map<String, Object> updateCapacityNumberInFactory(Map<String, Object> mapValue) {
|
|
|
Object lineSequence = mapValue.get("lineSequence");
|
|
|
int result = 0;
|
|
|
try{
|
|
|
//查询输入进来的车牌号是否与原有车牌号一致,如果一致则退出
|
|
|
BigDecimal oldCapacityId = omstruckOrderMapper.getOldCapacityId(DataChange.dataToBigDecimal(mapValue.get("orderId")));
|
|
|
- if(oldCapacityId.compareTo(DataChange.dataToBigDecimal(mapValue.get("capacityId"))) == 0){
|
|
|
- return 1;
|
|
|
+ if(oldCapacityId.compareTo(DataChange.dataToBigDecimal(mapValue.get("capacityId"))) == 0) {
|
|
|
+ mapValue.put("result",1);
|
|
|
+ return mapValue;
|
|
|
+ }
|
|
|
+ String capacityNo = (String) mapValue.get("capacityNo");
|
|
|
+ BigDecimal capacityTel = omstruckOrderMapper.getCapacityTel(capacityNo);
|
|
|
+ if (capacityTel.compareTo(BigDecimal.ZERO)!=0){
|
|
|
+ mapValue.put("capacityTel",capacityTel);
|
|
|
+ }else {
|
|
|
+ mapValue.put("capacityTel",0);
|
|
|
}
|
|
|
if (lineSequence == null || "0".equals(lineSequence.toString()) || "1".equals(lineSequence.toString()) || "2".equals(lineSequence.toString())) {
|
|
|
String capacityids="";
|
|
@@ -1982,7 +1990,8 @@ public class AmsSaleOrderServiceImpl implements IAmsSaleOrderService {
|
|
|
}catch (Exception e){
|
|
|
System.out.println("e"+e.getMessage());
|
|
|
}
|
|
|
- return result;
|
|
|
+ mapValue.put("result",result);
|
|
|
+ return mapValue;
|
|
|
|
|
|
}
|
|
|
|