|
@@ -43,10 +43,13 @@ public class TmstruckMeasureCommissionServiceImpl implements ITmstruckMeasureCom
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private RulesMapper rulesMapper;
|
|
private RulesMapper rulesMapper;
|
|
|
|
+
|
|
@Autowired
|
|
@Autowired
|
|
- UtilsMapper utilsMapper;
|
|
|
|
|
|
+ private UtilsMapper utilsMapper;
|
|
|
|
+
|
|
@Autowired
|
|
@Autowired
|
|
private RulesServiceImpl rulesService;
|
|
private RulesServiceImpl rulesService;
|
|
|
|
+
|
|
@Autowired
|
|
@Autowired
|
|
private TmstruckTareReturnResultMapper tmstruckTareReturnResultMapper;
|
|
private TmstruckTareReturnResultMapper tmstruckTareReturnResultMapper;
|
|
|
|
|
|
@@ -362,6 +365,14 @@ public class TmstruckMeasureCommissionServiceImpl implements ITmstruckMeasureCom
|
|
}else if(orderType == 13){
|
|
}else if(orderType == 13){
|
|
measureCommission.put("flowTo","出厂");
|
|
measureCommission.put("flowTo","出厂");
|
|
}else if(orderType == 14){
|
|
}else if(orderType == 14){
|
|
|
|
+ //查询还有几次未计量实绩
|
|
|
|
+ BigDecimal resultTotalId = DataChange.dataToBigDecimal(map.get("resultTotalId"));
|
|
|
|
+ Integer count = tmstruckMeasureCommissionMapper.selectNoNetWeightResult(resultTotalId);
|
|
|
|
+ if(count > 1){ //第一次进厂
|
|
|
|
+ measureCommission.put("materiaName", measureCommission.get("materiaName") + "(出)");
|
|
|
|
+ }else { //第二次进厂
|
|
|
|
+ measureCommission.put("materiaName", measureCommission.get("materiaName") + "(入)");
|
|
|
|
+ }
|
|
measureCommission.put("flowTo","中转");
|
|
measureCommission.put("flowTo","中转");
|
|
}else{
|
|
}else{
|
|
measureCommission.put("flowTo","退货");
|
|
measureCommission.put("flowTo","退货");
|
|
@@ -401,8 +412,8 @@ public class TmstruckMeasureCommissionServiceImpl implements ITmstruckMeasureCom
|
|
public int sendDXMeasureCommissionMes(Map<String, Object> map){
|
|
public int sendDXMeasureCommissionMes(Map<String, Object> map){
|
|
Map<String, Object> measureCommission = null;
|
|
Map<String, Object> measureCommission = null;
|
|
//查询计量委托
|
|
//查询计量委托
|
|
- BigDecimal orderType = DataChange.dataToBigDecimal(map.get("orderTypee"));
|
|
|
|
- switch (orderType.intValue()){
|
|
|
|
|
|
+ Integer orderType = DataChange.dataToBigDecimal(map.get("orderTypee")).intValue();
|
|
|
|
+ switch (orderType){
|
|
case 1:
|
|
case 1:
|
|
case 2:
|
|
case 2:
|
|
case 3:
|
|
case 3:
|
|
@@ -452,10 +463,13 @@ public class TmstruckMeasureCommissionServiceImpl implements ITmstruckMeasureCom
|
|
measureCommission = tmstruckMeasureCommissionMapper.sporadicDXMeasure(map);
|
|
measureCommission = tmstruckMeasureCommissionMapper.sporadicDXMeasure(map);
|
|
if(measureCommission == null)
|
|
if(measureCommission == null)
|
|
return 0;
|
|
return 0;
|
|
- if(orderType.intValue() == 14){
|
|
|
|
- Integer weightResultCount14 = tmstruckMeasureCommissionMapper.selectNoNetWeightResult(DataChange.dataToBigDecimal(map.get("resultTotalId")));
|
|
|
|
- if(weightResultCount14 == 1){
|
|
|
|
|
|
+ if(orderType == 14){
|
|
|
|
+ Integer count = tmstruckMeasureCommissionMapper.selectNoNetWeightResult(DataChange.dataToBigDecimal(map.get("resultTotalId")));
|
|
|
|
+ if(count > 1){ //第一次进厂
|
|
|
|
+ measureCommission.put("goodsName", measureCommission.get("goodsName") + "(出)");
|
|
|
|
+ }else {//第二次进厂
|
|
measureCommission.put("item", measureCommission.get("item") + ",1");
|
|
measureCommission.put("item", measureCommission.get("item") + ",1");
|
|
|
|
+ measureCommission.put("goodsName", measureCommission.get("goodsName") + "(入)");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
measureCommission.put("regionName", "无法确定汽车衡"); //无法确定汽车衡
|
|
measureCommission.put("regionName", "无法确定汽车衡"); //无法确定汽车衡
|