|
@@ -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("车皮号异常");
|
|
|
+ }
|
|
|
//通过采购订单号获得批次ID
|
|
|
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()));//装车类型,国产矿应该为3
|
|
|
+ result.setResultType(new BigDecimal((String)map.get("resultType")));//装车类型,国产矿应该为3
|
|
|
result.setResultRemarks((String) map.get("resultRemarks"));
|
|
|
result.setResultWagonNo((String) map.get("wagonNo"));//车皮号
|
|
|
//取得发站名,查询是否存在该站台,如果存在则绑定,否则新增该站台再绑定
|