|
@@ -72,6 +72,7 @@ public class TmstrainLoadingResultServiceImpl implements ITmstrainLoadingResultS
|
|
|
BigDecimal purchaseOrderId = tmstrainLoadingResultMapper.getPurchaseOrderId(batchId);
|
|
|
tmstrainLoadingResult.setPurchaseOrderRailPlanId(purchaseOrderId);
|
|
|
}
|
|
|
+
|
|
|
|
|
|
addRegularField(tmstrainLoadingResult);
|
|
|
int count = 0;
|
|
@@ -81,9 +82,34 @@ public class TmstrainLoadingResultServiceImpl implements ITmstrainLoadingResultS
|
|
|
BigDecimal maxId = tmstrainLoadingResultMapper.selectMaxId();
|
|
|
|
|
|
tmstrainLoadingResult.setResultId(maxId);
|
|
|
- count += tmstrainLoadingResultMapper.insertSelective(tmstrainLoadingResult);
|
|
|
- totalWeight += tmstrainLoadingResult.getResultBillableTonnage().doubleValue();
|
|
|
+
|
|
|
+
|
|
|
+ String LoadwagonNo=tmstrainLoadingResult.getResultWagonNo();
|
|
|
+ String number=LoadwagonNo.substring(0,2);
|
|
|
+ if (number.equals("14"))
|
|
|
+ {
|
|
|
+ String No=LoadwagonNo.substring(0,3);
|
|
|
+ if (No.equals("143")||No.equals("140")||No.equals("141")||No.equals("142")){
|
|
|
+ tmstrainLoadingResult.setResultBillableTonnage(new BigDecimal(60));
|
|
|
+ }
|
|
|
+ else if (No.equals("145")){
|
|
|
+ tmstrainLoadingResult.setResultBillableTonnage(new BigDecimal(61));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if(number.equals("45")||number.equals("46")){
|
|
|
+ tmstrainLoadingResult.setResultBillableTonnage(new BigDecimal(60));
|
|
|
+ }
|
|
|
+ else if(number.equals("42")||number.equals("47")||number.equals("48")||number.equals("49")){
|
|
|
+ tmstrainLoadingResult.setResultBillableTonnage(new BigDecimal(61));
|
|
|
+ }
|
|
|
+ else if(number.equals("15")||number.equals("16")||number.equals("17")||number.equals("18")){
|
|
|
+ tmstrainLoadingResult.setResultBillableTonnage(new BigDecimal(70));
|
|
|
+ }
|
|
|
+ count += tmstrainLoadingResultMapper.insertSelective(tmstrainLoadingResult);
|
|
|
+ totalWeight += tmstrainLoadingResult.getResultBillableTonnage().doubleValue();
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
|
|
|
if(tmstrainLoadingResult.getResultType().intValue() == 1){
|
|
|
tmstrainLoadingResult.setResultBillableTonnage(new BigDecimal(totalWeight.toString()));
|