|
@@ -627,9 +627,9 @@ public class BizRecordServiceImpl extends ServiceImpl<BizRecordMapper, BizRecord
|
|
|
//净重和卸货重量进行对比
|
|
|
BigDecimal weight = new BigDecimal(0);
|
|
|
if(bizRecord.getNetWeight().compareTo(bizRecordEditParam.getUnloadWeight()) > 0){
|
|
|
- weight = bizRecord.getNetWeight().subtract(bizRecordEditParam.getUnloadWeight());
|
|
|
+ weight = bizRecord.getNetWeight().subtract(bizRecordEditParam.getUnloadWeight().multiply(new BigDecimal(1000)));
|
|
|
}else{
|
|
|
- weight = bizRecordEditParam.getUnloadWeight().subtract(bizRecord.getNetWeight());
|
|
|
+ weight = bizRecordEditParam.getUnloadWeight().multiply(new BigDecimal(1000)).subtract(bizRecord.getNetWeight());
|
|
|
}
|
|
|
//如果差值等于0说明没有误差,预约状态修改为11,已签收
|
|
|
//查询预约记录
|
|
@@ -651,6 +651,16 @@ public class BizRecordServiceImpl extends ServiceImpl<BizRecordMapper, BizRecord
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public static void main(String[] args) {
|
|
|
+ BigDecimal subtract = new BigDecimal(15300).subtract(new BigDecimal(15000));
|
|
|
+ BigDecimal decimal = subtract.divide(new BigDecimal(15000), 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100));
|
|
|
+ if(decimal.compareTo(new BigDecimal(2)) > 0){
|
|
|
+ System.out.printf("大于2");
|
|
|
+ }else{
|
|
|
+ System.out.printf("小于等于2");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public void auditRecord(BizRecordEditParam bizRecordEditParam) {
|
|
|
BizRecord bizRecord = this.queryEntity(bizRecordEditParam.getId());
|