作者 朱兆平

将应过磅重量 与实际过磅重量 的误差比对 改为 应提(送)货物 与 实际 提(送)货物的 误差比对

@@ -87,4 +87,4 @@ custom.receptDirectory= bw/read/ @@ -87,4 +87,4 @@ custom.receptDirectory= bw/read/
87 # 卡口指令通知接口 87 # 卡口指令通知接口
88 interface.lock.url=http://127.0.0.1:8848 88 interface.lock.url=http://127.0.0.1:8848
89 devdebug=true 89 devdebug=true
90 -g2.onoff=false 90 +g2.onoff=true
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 5
6 <groupId>com.sy</groupId> 6 <groupId>com.sy</groupId>
7 <artifactId>analysis_imf</artifactId> 7 <artifactId>analysis_imf</artifactId>
8 - <version>4.4-LOCK-SNAPSHOT</version> 8 + <version>4.8-LOCK-SNAPSHOT</version>
9 <packaging>jar</packaging> 9 <packaging>jar</packaging>
10 <name>analysis_imf</name> 10 <name>analysis_imf</name>
11 <description>北货集成金二抬杆指令判定</description> 11 <description>北货集成金二抬杆指令判定</description>
@@ -58,7 +58,8 @@ public class WeightCheckHandleServiceImpl implements WeightCheckHandleService { @@ -58,7 +58,8 @@ public class WeightCheckHandleServiceImpl implements WeightCheckHandleService {
58 * @param wt 车辆自重 58 * @param wt 车辆自重
59 * @param goodsWt 货物总重 59 * @param goodsWt 货物总重
60 * @param inWt 进场过磅重量 60 * @param inWt 进场过磅重量
61 - * 误差计算方式 (应该出场重量 - 出场重量) / 出场重量 与 误差比对,超过误差则不放行 61 + * 误差计算方式 (应该出场重量 - 出场重量) / 出场重量 与 误差比对,超过误差则不放行(规则取消)
  62 + * 误差计算方式 (应该出场重量 - 出场重量) / 货物重量 与 误差比对,超过误差则不放行(新规)
62 * @return 返回校验结果 true 通过,false 不通过 63 * @return 返回校验结果 true 通过,false 不通过
63 */ 64 */
64 @Override 65 @Override
@@ -83,7 +84,7 @@ public class WeightCheckHandleServiceImpl implements WeightCheckHandleService { @@ -83,7 +84,7 @@ public class WeightCheckHandleServiceImpl implements WeightCheckHandleService {
83 if(Double.doubleToLongBits(grossWt)>Double.doubleToLongBits(0)){ 84 if(Double.doubleToLongBits(grossWt)>Double.doubleToLongBits(0)){
84 result = Double.parseDouble(df.format(Math.abs((inWt - goodsWt - grossWt)) / grossWt)); 85 result = Double.parseDouble(df.format(Math.abs((inWt - goodsWt - grossWt)) / grossWt));
85 86
86 - result2 = Double.parseDouble(df.format(Math.abs((grossWt-wt)) / grossWt)); 87 + result2 = Double.parseDouble(df.format(Math.abs((grossWt-wt)) / wt));
87 88
88 log.info("[WEIGHT-CHECK]-进出场比对差值:{},空车出场差值:{},进出场比对重量差:{},空车比对重量差:{}",result,result2,Math.abs(inWt - goodsWt - grossWt),Math.abs(grossWt-wt)); 89 log.info("[WEIGHT-CHECK]-进出场比对差值:{},空车出场差值:{},进出场比对重量差:{},空车比对重量差:{}",result,result2,Math.abs(inWt - goodsWt - grossWt),Math.abs(grossWt-wt));
89 } 90 }
@@ -107,7 +108,7 @@ public class WeightCheckHandleServiceImpl implements WeightCheckHandleService { @@ -107,7 +108,7 @@ public class WeightCheckHandleServiceImpl implements WeightCheckHandleService {
107 DecimalFormat df = new DecimalFormat("0.00"); 108 DecimalFormat df = new DecimalFormat("0.00");
108 if(Double.doubleToLongBits(grossWt)>Double.doubleToLongBits(0)){ 109 if(Double.doubleToLongBits(grossWt)>Double.doubleToLongBits(0)){
109 //空车入场判定,入场重量-车辆备案重量 110 //空车入场判定,入场重量-车辆备案重量
110 - emptyIN = Double.parseDouble(df.format(Math.abs((wt - grossWt)) / grossWt)); 111 + emptyIN = Double.parseDouble(df.format(Math.abs((wt - grossWt)) / wt));
111 112
112 double range = valueDob(); 113 double range = valueDob();
113 114
@@ -141,7 +142,8 @@ public class WeightCheckHandleServiceImpl implements WeightCheckHandleService { @@ -141,7 +142,8 @@ public class WeightCheckHandleServiceImpl implements WeightCheckHandleService {
141 double goodCheckResult= 0.00; 142 double goodCheckResult= 0.00;
142 if(Double.doubleToLongBits(grossWt)>Double.doubleToLongBits(0)){ 143 if(Double.doubleToLongBits(grossWt)>Double.doubleToLongBits(0)){
143 //进场过磅重量+带货重量 = 出场过磅重量 144 //进场过磅重量+带货重量 = 出场过磅重量
144 - result = Double.parseDouble(df.format(Math.abs((inWt + goodsWt - grossWt)) / grossWt)); 145 +// result = Double.parseDouble(df.format(Math.abs((inWt + goodsWt - grossWt)) / grossWt));
  146 + result = Double.parseDouble(df.format(Math.abs((grossWt-wt-goodsWt)) / goodsWt));
145 147
146 //带货提货,不提货判定,非空车离场 148 //带货提货,不提货判定,非空车离场
147 result2 = Double.parseDouble(df.format(Math.abs((inWt - grossWt)) / grossWt)); 149 result2 = Double.parseDouble(df.format(Math.abs((inWt - grossWt)) / grossWt));
@@ -207,9 +209,10 @@ public class WeightCheckHandleServiceImpl implements WeightCheckHandleService { @@ -207,9 +209,10 @@ public class WeightCheckHandleServiceImpl implements WeightCheckHandleService {
207 //带货出,入场重量+带货重量 = 离场重量 209 //带货出,入场重量+带货重量 = 离场重量
208 result = Double.parseDouble(df.format(Math.abs((inWt + goodsWt - grossWt)) / grossWt)); 210 result = Double.parseDouble(df.format(Math.abs((inWt + goodsWt - grossWt)) / grossWt));
209 //带货出,用车辆备案重量对碰,车辆备案重量+带货重量 = 离场重量 211 //带货出,用车辆备案重量对碰,车辆备案重量+带货重量 = 离场重量
210 - result4 = Double.parseDouble(df.format(Math.abs((wt + goodsWt - grossWt)) / grossWt)); 212 +// result4 = Double.parseDouble(df.format(Math.abs((wt + goodsWt - grossWt)) / grossWt));
  213 + result4 = Double.parseDouble(df.format(Math.abs((grossWt-wt-goodsWt)) / goodsWt));
211 //空车出,过磅重量 = 车辆备案重量 214 //空车出,过磅重量 = 车辆备案重量
212 - result2 = Double.parseDouble(df.format(Math.abs((grossWt-wt)) / grossWt)); 215 + result2 = Double.parseDouble(df.format(Math.abs((grossWt-wt)) / wt));
213 //卸货出,入场重量-卸货重量 = 离场重量 216 //卸货出,入场重量-卸货重量 = 离场重量
214 result3 = Double.parseDouble(df.format(Math.abs((inWt - goodsWt - grossWt)) / grossWt)); 217 result3 = Double.parseDouble(df.format(Math.abs((inWt - goodsWt - grossWt)) / grossWt));
215 System.out.println("进场提货离场差值:"+result); 218 System.out.println("进场提货离场差值:"+result);
@@ -218,7 +221,11 @@ public class WeightCheckHandleServiceImpl implements WeightCheckHandleService { @@ -218,7 +221,11 @@ public class WeightCheckHandleServiceImpl implements WeightCheckHandleService {
218 System.out.println("备案重量进场装载货物离场差值:"+result4); 221 System.out.println("备案重量进场装载货物离场差值:"+result4);
219 } 222 }
220 double range = valueDob(); 223 double range = valueDob();
221 - if (result <= range || result2 <= range || result3 <= range || result4 <= range) { 224 + if (result2 <= range
  225 +// || result <= range
  226 +// || result3 <= range
  227 + || result4 <= range
  228 + ) {
222 flag = true; 229 flag = true;
223 } 230 }
224 return flag; 231 return flag;
@@ -234,7 +241,7 @@ public class WeightCheckHandleServiceImpl implements WeightCheckHandleService { @@ -234,7 +241,7 @@ public class WeightCheckHandleServiceImpl implements WeightCheckHandleService {
234 public boolean checkEmpty(double grossWt, double wt) { 241 public boolean checkEmpty(double grossWt, double wt) {
235 DecimalFormat df = new DecimalFormat("0.00"); 242 DecimalFormat df = new DecimalFormat("0.00");
236 boolean flag=false; 243 boolean flag=false;
237 - double reult = Double.parseDouble(df.format(Math.abs((grossWt - wt)) / grossWt)); 244 + double reult = Double.parseDouble(df.format(Math.abs((grossWt - wt)) / wt));
238 if (reult <= valueDob()) { 245 if (reult <= valueDob()) {
239 flag = true; 246 flag = true;
240 } 247 }