|
@@ -107,8 +107,11 @@ public class TmstrainLoadingResultServiceImpl implements ITmstrainLoadingResultS
|
|
|
*/
|
|
|
@Override
|
|
|
@Transactional
|
|
|
- public int addTmstrainLoadingResult(TmstrainLoadingResult tmstrainLoadingResult) {
|
|
|
+ public int addTmstrainLoadingResult(TmstrainLoadingResult tmstrainLoadingResult) throws Exception{
|
|
|
List<String> wagonNoList = tmstrainLoadingResult.getWagonNoList();
|
|
|
+ if(wagonNoList.size()<=0){
|
|
|
+ throw new Exception("车皮号异常");
|
|
|
+ }
|
|
|
|
|
|
BigDecimal purchaseOrderId = tmstrainLoadingResult.getPurchaseOrderRailPlanId();
|
|
|
BigDecimal arrivalStationId = tmstrainLoadingResult.getArrivalStationId();
|
|
@@ -171,17 +174,17 @@ public class TmstrainLoadingResultServiceImpl implements ITmstrainLoadingResultS
|
|
|
temp.setResultId(maxId);
|
|
|
result.setResultId(maxId);
|
|
|
|
|
|
- temp.setSendStation(map.get("sendStation").toString());
|
|
|
- temp.setArrivalStation(map.get("arrivalStation").toString());
|
|
|
- temp.setMaterialName(map.get("materialName").toString());
|
|
|
- temp.setSupplierName(map.get("supplierName").toString());
|
|
|
- temp.setSendDate(map.get("sendDate").toString());
|
|
|
+ temp.setSendStation((String)map.get("sendStation"));
|
|
|
+ temp.setArrivalStation((String)map.get("arrivalStation"));
|
|
|
+ temp.setMaterialName((String)map.get("materialName"));
|
|
|
+ temp.setSupplierName((String)map.get("supplierName"));
|
|
|
+ temp.setSendDate((String)map.get("sendDate"));
|
|
|
temp.setResultWagonNo((String) map.get("wagonNo"));
|
|
|
- temp.setResultBillableTonnage(new BigDecimal(map.get("weight").toString()));
|
|
|
+ temp.setResultBillableTonnage(new BigDecimal((String)map.get("weight")));
|
|
|
|
|
|
- result.setArrivalStationId(new BigDecimal(map.get("arrivalStationId").toString()));
|
|
|
+ result.setArrivalStationId(new BigDecimal((String)map.get("arrivalStationId")));
|
|
|
result.setResultLoadingDate(new Date((Long)map.get("resultLoadingDate")));
|
|
|
- result.setResultType(new BigDecimal(map.get("resultType").toString()));
|
|
|
+ result.setResultType(new BigDecimal((String)map.get("resultType")));
|
|
|
result.setResultRemarks((String) map.get("resultRemarks"));
|
|
|
result.setResultWagonNo((String) map.get("wagonNo"));
|
|
|
|