正在显示
3 个修改的文件
包含
35 行增加
和
0 行删除
@@ -215,6 +215,15 @@ public class LiftBar { | @@ -215,6 +215,15 @@ public class LiftBar { | ||
215 | // 出场校验根据业务类型 | 215 | // 出场校验根据业务类型 |
216 | logger.info("[进出场申请]-业务类型为:"+list.getCocode()+list.getBusinesstype()); | 216 | logger.info("[进出场申请]-业务类型为:"+list.getCocode()+list.getBusinesstype()); |
217 | switch (list.getBusinesstype()){ | 217 | switch (list.getBusinesstype()){ |
218 | + case "空车业务": | ||
219 | + if(logic.weightCheckHandleService.checkEmpty(growssWt,selfWt)){ | ||
220 | + checkResult=true; | ||
221 | + }else{ | ||
222 | + logger.error("[空车业务]-出场重量未通过校验:"+GROWSSEXCETION); | ||
223 | + logic.sendBw(info,false,GROWSSEXCETION,list,listinfos); | ||
224 | + return false; | ||
225 | + } | ||
226 | + break; | ||
218 | case "出口转关": | 227 | case "出口转关": |
219 | case "出口送货": | 228 | case "出口送货": |
220 | if (logic.weightCheckHandleService.checkExportDownLoading(growssWt, Double.parseDouble(ve.getSelfWt()), goodsWt,inWt)){ | 229 | if (logic.weightCheckHandleService.checkExportDownLoading(growssWt, Double.parseDouble(ve.getSelfWt()), goodsWt,inWt)){ |
@@ -47,4 +47,13 @@ public interface WeightCheckHandleService { | @@ -47,4 +47,13 @@ public interface WeightCheckHandleService { | ||
47 | * @return 返回校验结果 true 通过,false 不通过 | 47 | * @return 返回校验结果 true 通过,false 不通过 |
48 | */ | 48 | */ |
49 | boolean checkAllocateOrDispatch(double grossWt, double wt, double goodsWt,double inWt); | 49 | boolean checkAllocateOrDispatch(double grossWt, double wt, double goodsWt,double inWt); |
50 | + /** | ||
51 | + * 空车业务重量校验 | ||
52 | + * 过磅重量 = 车备案自重 | ||
53 | + * @param grossWt 地磅称重,也称出场过磅重量 | ||
54 | + * @param wt 车辆自重 | ||
55 | + * 误差计算方式 (过磅重量 - 车备案重量) / 过磅重量 与 误差比对,超过误差则不放行 | ||
56 | + * @return 返回校验结果 true 通过,false 不通过 | ||
57 | + */ | ||
58 | + boolean checkEmpty(double grossWt,double wt); | ||
50 | } | 59 | } |
@@ -179,6 +179,23 @@ public class WeightCheckHandleServiceImpl implements WeightCheckHandleService { | @@ -179,6 +179,23 @@ public class WeightCheckHandleServiceImpl implements WeightCheckHandleService { | ||
179 | } | 179 | } |
180 | return flag; | 180 | return flag; |
181 | } | 181 | } |
182 | + /** | ||
183 | + * 判断备案车重与地磅称重是否在合理范围 | ||
184 | + * | ||
185 | + * @param grossWt | ||
186 | + * @param wt | ||
187 | + * @return | ||
188 | + */ | ||
189 | + @Override | ||
190 | + public boolean checkEmpty(double grossWt, double wt) { | ||
191 | + DecimalFormat df = new DecimalFormat("0.00"); | ||
192 | + boolean flag=false; | ||
193 | + double reult = Double.parseDouble(df.format(Math.abs((grossWt - wt)) / grossWt)); | ||
194 | + if (reult <= valueDob()) { | ||
195 | + flag = true; | ||
196 | + } | ||
197 | + return flag; | ||
198 | + } | ||
182 | 199 | ||
183 | /** | 200 | /** |
184 | * 判断备案车重与运单重量和地磅称重是否在合理范围 | 201 | * 判断备案车重与运单重量和地磅称重是否在合理范围 |
-
请 注册 或 登录 后发表评论