|
@@ -5,6 +5,7 @@ import com.steerinfo.dil.model.TmsshipLoadShipResult;
|
|
|
import com.steerinfo.dil.model.TmsshipWaterQualityResult;
|
|
|
import com.steerinfo.dil.mapper.TmsshipWaterQualityResultMapper;
|
|
|
import com.steerinfo.dil.service.ITmsshipWaterQualityResultService;
|
|
|
+import com.steerinfo.dil.util.DataChange;
|
|
|
import io.swagger.models.auth.In;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -83,6 +84,9 @@ public class TmsshipWaterQualityResultServiceImpl implements ITmsshipWaterQualit
|
|
|
//计划日期
|
|
|
Date resultPlannedDate = new Date((Long) mapVal.get("resultPlannedDate"));
|
|
|
tmsshipWaterQualityResult.setResultPlannedDate(resultPlannedDate);
|
|
|
+ //预计放货日期
|
|
|
+ Date expectNoticeDate=new Date((Long)mapVal.get("expectNoticeDate"));
|
|
|
+ tmsshipWaterQualityResult.setResultEsDeliveryDate(expectNoticeDate);
|
|
|
//含水率
|
|
|
BigDecimal resultMoistureContent = new BigDecimal((String)mapVal.get("resultMoistureContent"));
|
|
|
tmsshipWaterQualityResult.setResultMoistureContent(resultMoistureContent);
|
|
@@ -90,11 +94,11 @@ public class TmsshipWaterQualityResultServiceImpl implements ITmsshipWaterQualit
|
|
|
String purchaseContractMoisture=(String)mapVal.get("contractMoistureValue");
|
|
|
amsshipDeliveryNotice.setPurchaseContractMoisture(purchaseContractMoisture);
|
|
|
//实装吨位
|
|
|
- BigDecimal resultActualInstallations=(BigDecimal)mapVal.get("realWeight");
|
|
|
+ BigDecimal resultActualInstallations = DataChange.dataToBigDecimal(mapVal.get("realWeight"));
|
|
|
tmsshipLoadShipResult.setResultActualInstallations( resultActualInstallations);
|
|
|
//水分吨位
|
|
|
- BigDecimal resultWaterTonnage = new BigDecimal((Integer)mapVal.get("resultWaterTonnage")) ;
|
|
|
- tmsshipWaterQualityResult.setResultWaterTonnage(resultWaterTonnage);
|
|
|
+ BigDecimal moistureTonnage = new BigDecimal((String) mapVal.get("moistureTonnage"));
|
|
|
+ tmsshipWaterQualityResult.setResultWaterTonnage(moistureTonnage);
|
|
|
//装船比例
|
|
|
BigDecimal instructionsId = selectInstructionsId(orderId);
|
|
|
BigDecimal weights = tmsshipLoadShipResultService.selectAllWeight(instructionsId);
|
|
@@ -167,6 +171,7 @@ public class TmsshipWaterQualityResultServiceImpl implements ITmsshipWaterQualit
|
|
|
public List<Map<String, Object>> selectWaterQualityList(Map<String, Object> mapVal) {
|
|
|
List<Map<String, Object>> mapList = tmsshipWaterQualityResultMapper.selectWaterQualityList(mapVal);
|
|
|
String result;
|
|
|
+ DecimalFormat df = new DecimalFormat("0.0000");
|
|
|
for (Map<String, Object> map : mapList) {
|
|
|
if(((BigDecimal)map.get("resultEmptyHeavyWaterMeter")).intValue() == 0){
|
|
|
result="电子磅交接";
|
|
@@ -174,8 +179,13 @@ public class TmsshipWaterQualityResultServiceImpl implements ITmsshipWaterQualit
|
|
|
else {
|
|
|
result="地磅交接";
|
|
|
}
|
|
|
- map.remove("resultEmptyHeavyWaterMeter");
|
|
|
map.put("resultEmptyHeavyWaterMeter",result);
|
|
|
+ Object waterWeight = map.get("waterWeight");
|
|
|
+ if(waterWeight != null){
|
|
|
+ BigDecimal data = DataChange.dataToBigDecimal(waterWeight);
|
|
|
+ String weightFormat = df.format(data);
|
|
|
+ map.put("waterWeight", weightFormat);
|
|
|
+ }
|
|
|
}
|
|
|
return mapList;
|
|
|
}
|
|
@@ -235,10 +245,9 @@ public class TmsshipWaterQualityResultServiceImpl implements ITmsshipWaterQualit
|
|
|
amsshipDeliveryNotice.setPurchaseContractMoisture(purchaseContractMoisture);
|
|
|
//根据获得的含水率和实装吨位,计算水分吨位
|
|
|
DecimalFormat df=new DecimalFormat("#.0000");
|
|
|
- Double WaterTonnage=(resultActualInstallations.doubleValue() * (1-resultMoistureContent.doubleValue()));
|
|
|
- BigDecimal resultWaterTonnage=(new BigDecimal(df.format(WaterTonnage)));
|
|
|
- tmsshipWaterQualityResult.setResultWaterTonnage(resultWaterTonnage);
|
|
|
+ String resultWaterTonnage=df.format(resultActualInstallations.doubleValue() * resultMoistureContent.doubleValue());
|
|
|
|
|
|
+ tmsshipWaterQualityResult.setResultWaterTonnage(new BigDecimal(resultWaterTonnage));
|
|
|
Map<String,Object> map1=new HashMap<>();
|
|
|
// map1.put("batchId",batchId );
|
|
|
map1.put("purchaseContractMoisture",purchaseContractMoisture);
|