作者 朱兆平

离场货物重量取离场申请数据

... ... @@ -198,6 +198,11 @@ public class LiftBar {
logger.info("车辆装载货物为:"+list.getCocode());
checkResult=true;
}else {
/**
* 因为货代老是进场后修改提货运单信息,造成申请单的进场货重与离场货重不匹配
* 进口提货,货物重量取进场提货的货物重量
*/
goodsWt = Double.parseDouble(list.getRemark());
// 出场校验根据业务类型
logger.info("[进出场申请]-业务类型为:"+list.getCocode()+list.getBusinesstype());
switch (list.getBusinesstype()){
... ...
... ... @@ -104,6 +104,7 @@ public class WeightCheckHandleServiceImpl implements WeightCheckHandleService {
double result1= 0.00;
double result2= 0.00;
double emptyOut= 0.00;
double goodCheckResult= 0.00;
if(Double.doubleToLongBits(grossWt)>Double.doubleToLongBits(0)){
//进场过磅重量+带货重量 = 出场过磅重量
result = Double.parseDouble(df.format(Math.abs((inWt + goodsWt - grossWt)) / grossWt));
... ... @@ -116,8 +117,12 @@ public class WeightCheckHandleServiceImpl implements WeightCheckHandleService {
//车辆备案重量+货物重量 = 出场过磅重量,测试用,生产关闭
result1 = Double.parseDouble(df.format(Math.abs((wt + goodsWt - grossWt)) / grossWt));
//货重误差
goodCheckResult = Double.parseDouble(df.format(Math.abs((grossWt-inWt-goodsWt)) / goodsWt));
}
double range = valueDob();
logger.info("[WEIGHT-CHECK]-实际离场拉货重量:{},申请离场拉货重量:{},货重差值:{},货重误差:{}",grossWt-inWt,goodsWt,grossWt-inWt-goodsWt,goodCheckResult);
logger.info("[WEIGHT-CHECK]-进出场比对差值:{},提货离场差值:{},进出场比对重量差:{}",result,result1,Math.abs(inWt - grossWt));
... ...
package com.sy.service.impl;
import com.sy.service.WeightCheckHandleService;
import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import static org.junit.jupiter.api.Assertions.*;
@SpringBootTest
class WeightCheckHandleServiceImplTest {
@Autowired
WeightCheckHandleService weightCheckHandleService;
@Test
void checkExportDownLoading() {
}
@Test
void checkImportDlv() {
weightCheckHandleService.checkImportDlv(27870,19000,6245,19620);
}
@Test
void checkAllocateOrDispatch() {
}
}
... ...