提交 560114b6 authored 作者: huyufan's avatar huyufan

增加皮重毛重字段

上级 b6f799fc
...@@ -26,13 +26,12 @@ public class OrderChildLoadAndUnloadAgainParam extends PositionParam { ...@@ -26,13 +26,12 @@ public class OrderChildLoadAndUnloadAgainParam extends PositionParam {
private String unloadPoundNo; private String unloadPoundNo;
@ApiModelProperty(value = "装货毛重(单位吨)", example = "2.46") @ApiModelProperty(value = "装货毛重(单位吨)", example = "2.46")
@NotNull
private BigDecimal loadRough; private BigDecimal loadRough;
@ApiModelProperty(value = "装货皮重(单位吨)", example = "1.23") @ApiModelProperty(value = "装货皮重(单位吨)", example = "1.23")
@NotNull
private BigDecimal loadTare; private BigDecimal loadTare;
@ApiModelProperty(value = "装货净重(单位吨)", example = "1.23")
@NotNull(message = "装货净重不能为空")
@Max(value = 999, message = "最大999吨")
private BigDecimal loadNet;
@ApiModelProperty(value = "磅单图片列表") @ApiModelProperty(value = "磅单图片列表")
@NotEmpty(message = "请上传磅单照片") @NotEmpty(message = "请上传磅单照片")
......
...@@ -22,13 +22,12 @@ public class OrderChildLoadParam extends PositionParam { ...@@ -22,13 +22,12 @@ public class OrderChildLoadParam extends PositionParam {
private String childNo; private String childNo;
@ApiModelProperty(value = "装货毛重(单位吨)", example = "2.46") @ApiModelProperty(value = "装货毛重(单位吨)", example = "2.46")
@NotNull
private BigDecimal loadRough; private BigDecimal loadRough;
@ApiModelProperty(value = "装货皮重(单位吨)", example = "1.23") @ApiModelProperty(value = "装货皮重(单位吨)", example = "1.23")
@NotNull
private BigDecimal loadTare; private BigDecimal loadTare;
@ApiModelProperty(value = "装货净重(单位吨)", example = "1.23")
@NotNull(message = "装货净重不能为空")
@Max(value = 999, message = "最大999吨")
private BigDecimal loadNet;
@ApiModelProperty(value = "磅单图片列表") @ApiModelProperty(value = "磅单图片列表")
@NotEmpty(message = "请上传磅单照片") @NotEmpty(message = "请上传磅单照片")
......
...@@ -27,12 +27,9 @@ public class OrderChildUnloadParam extends PositionParam { ...@@ -27,12 +27,9 @@ public class OrderChildUnloadParam extends PositionParam {
@ApiModelProperty(value = "卸货毛重(单位吨)", example = "2.46") @ApiModelProperty(value = "卸货毛重(单位吨)", example = "2.46")
private BigDecimal unloadRough; private BigDecimal unloadRough;
@ApiModelProperty(value = "卸货皮重(单位吨)", example = "1.23") @ApiModelProperty(value = "卸货皮重(单位吨)", example = "1.23")
private BigDecimal unloadTare; private BigDecimal unloadTare;
@ApiModelProperty(value = "卸货净重(单位吨)", example = "1.23")
@NotNull(message = "装货净重不能为空")
@Max(value = 999, message = "最大999吨")
private BigDecimal unloadNet;
@ApiModelProperty(value = "磅单图片列表") @ApiModelProperty(value = "磅单图片列表")
@NotEmpty(message = "请上传磅单照片") @NotEmpty(message = "请上传磅单照片")
......
...@@ -34,11 +34,19 @@ public class PoundAuditParam { ...@@ -34,11 +34,19 @@ public class PoundAuditParam {
@ApiModelProperty(value="审核状态 0 待审核 1 审核通过 2 审核驳回",example = "1") @ApiModelProperty(value="审核状态 0 待审核 1 审核通过 2 审核驳回",example = "1")
private Integer status; private Integer status;
@ApiModelProperty(value="装货净重",example = "11") @ApiModelProperty(value = "装货毛重", example = "10")
private BigDecimal loadNet; private BigDecimal loadRough;
@ApiModelProperty(value = "装货皮重", example = "10")
private BigDecimal loadTare;
@ApiModelProperty(value="卸货毛重",example = "41")
private BigDecimal unloadRough;
@ApiModelProperty(value="卸货皮重",example = "41")
private BigDecimal unloadTare;
@ApiModelProperty(value="卸货净重",example = "22")
private BigDecimal unloadNet;
} }
...@@ -46,7 +46,6 @@ public class CarrierOrderChildDetailVO { ...@@ -46,7 +46,6 @@ public class CarrierOrderChildDetailVO {
@MoneyOutConvert @MoneyOutConvert
private BigDecimal realFreight; private BigDecimal realFreight;
@ApiModelProperty(value = "损耗单价(元)", example = "1.23") @ApiModelProperty(value = "损耗单价(元)", example = "1.23")
@MoneyOutConvert @MoneyOutConvert
private BigDecimal lossPrice; private BigDecimal lossPrice;
...@@ -79,6 +78,18 @@ public class CarrierOrderChildDetailVO { ...@@ -79,6 +78,18 @@ public class CarrierOrderChildDetailVO {
@ApiModelProperty(value = "卸货净重(单位吨)", example = "1.23") @ApiModelProperty(value = "卸货净重(单位吨)", example = "1.23")
private BigDecimal unloadNet; private BigDecimal unloadNet;
@ApiModelProperty(value = "装货毛重", example = "10")
private BigDecimal loadRough;
@ApiModelProperty(value = "装货皮重", example = "10")
private BigDecimal loadTare;
@ApiModelProperty(value="卸货毛重",example = "41")
private BigDecimal unloadRough;
@ApiModelProperty(value="卸货皮重",example = "41")
private BigDecimal unloadTare;
@ApiModelProperty(value = "取消原因", example = "取消原因类型:1个人原因, 2价格不合适, 3无法装货, 4车辆原因, 5交通管制, 6交通事故, 7无法找到地址, 8排队时间较长, 9其他原因") @ApiModelProperty(value = "取消原因", example = "取消原因类型:1个人原因, 2价格不合适, 3无法装货, 4车辆原因, 5交通管制, 6交通事故, 7无法找到地址, 8排队时间较长, 9其他原因")
private Integer cancelType; private Integer cancelType;
@ApiModelProperty(value = "取消原因", example = "抢错了") @ApiModelProperty(value = "取消原因", example = "抢错了")
......
...@@ -23,6 +23,18 @@ public class OrderChildPoundAuditDetailVO { ...@@ -23,6 +23,18 @@ public class OrderChildPoundAuditDetailVO {
@ApiModelProperty(value="卸货净重",example = "41") @ApiModelProperty(value="卸货净重",example = "41")
private BigDecimal unloadNet; private BigDecimal unloadNet;
@ApiModelProperty(value = "装货毛重", example = "10")
private BigDecimal loadRough;
@ApiModelProperty(value = "装货皮重", example = "10")
private BigDecimal loadTare;
@ApiModelProperty(value="卸货毛重",example = "41")
private BigDecimal unloadRough;
@ApiModelProperty(value="卸货皮重",example = "41")
private BigDecimal unloadTare;
@ApiModelProperty(value = "卸货磅单编号", example = "url") @ApiModelProperty(value = "卸货磅单编号", example = "url")
private String unloadPoundNo; private String unloadPoundNo;
......
...@@ -43,6 +43,18 @@ public class PageCarrierOrderChildVO { ...@@ -43,6 +43,18 @@ public class PageCarrierOrderChildVO {
@ApiModelProperty(value="卸货净重",example = "41") @ApiModelProperty(value="卸货净重",example = "41")
private BigDecimal unloadNet; private BigDecimal unloadNet;
@ApiModelProperty(value = "装货毛重", example = "10")
private BigDecimal loadRough;
@ApiModelProperty(value = "装货皮重", example = "10")
private BigDecimal loadTare;
@ApiModelProperty(value="卸货毛重",example = "41")
private BigDecimal unloadRough;
@ApiModelProperty(value="卸货皮重",example = "41")
private BigDecimal unloadTare;
@ApiModelProperty(value="接单时间",example = "2020-01-01 10:10:10") @ApiModelProperty(value="接单时间",example = "2020-01-01 10:10:10")
private String payTime; private String payTime;
......
...@@ -43,6 +43,18 @@ public class PageOrderChildPoundAuditVO { ...@@ -43,6 +43,18 @@ public class PageOrderChildPoundAuditVO {
@ApiModelProperty(value="卸货净重",example = "41") @ApiModelProperty(value="卸货净重",example = "41")
private BigDecimal unloadNet; private BigDecimal unloadNet;
@ApiModelProperty(value = "装货毛重", example = "10")
private BigDecimal loadRough;
@ApiModelProperty(value = "装货皮重", example = "10")
private BigDecimal loadTare;
@ApiModelProperty(value="卸货毛重",example = "41")
private BigDecimal unloadRough;
@ApiModelProperty(value="卸货皮重",example = "41")
private BigDecimal unloadTare;
@ApiModelProperty(value="审核状态 0 待审核 1 审核通过 2 审核驳回",example = "1") @ApiModelProperty(value="审核状态 0 待审核 1 审核通过 2 审核驳回",example = "1")
private Integer status; private Integer status;
......
...@@ -48,7 +48,7 @@ public class OrderChildPoundAuditController { ...@@ -48,7 +48,7 @@ public class OrderChildPoundAuditController {
@ApiOperation(value = "磅单审核接口",notes = "<br>By:李瑞新") @ApiOperation(value = "磅单审核接口",notes = "<br>By:李瑞新")
@PostMapping("/updatePoundAudit") @PostMapping("/updatePoundAudit")
public Result updatePoundAudit(@RequestBody @Validated PoundAuditParam param) { public Result<Object> updatePoundAudit(@RequestBody @Validated PoundAuditParam param) {
orderChildPoundAuditService.updatePoundAudit(param); orderChildPoundAuditService.updatePoundAudit(param);
return Result.ok(); return Result.ok();
} }
......
...@@ -33,6 +33,10 @@ public class OrderChildPoundAudit implements HasKey<Integer> { ...@@ -33,6 +33,10 @@ public class OrderChildPoundAudit implements HasKey<Integer> {
private String childNo; //运单编号 private String childNo; //运单编号
private BigDecimal loadNet; //装货净重(单位吨) private BigDecimal loadNet; //装货净重(单位吨)
private BigDecimal unloadNet; //卸货净重(单位吨) private BigDecimal unloadNet; //卸货净重(单位吨)
private BigDecimal loadRough; //装货毛重(单位吨)
private BigDecimal loadTare; //装货皮重(单位吨)
private BigDecimal unloadRough; //卸货毛重(单位吨)
private BigDecimal unloadTare; //卸货皮重(单位吨)
private String unloadPoundNo; //卸货磅单编号 private String unloadPoundNo; //卸货磅单编号
private Integer status; //审核状态 0 待审核 1 审核通过 2 审核驳回 private Integer status; //审核状态 0 待审核 1 审核通过 2 审核驳回
private Integer rejectType; //审核驳回类型:1装车 2卸车 3装车+卸车 private Integer rejectType; //审核驳回类型:1装车 2卸车 3装车+卸车
......
...@@ -62,6 +62,10 @@ public class OrderChildPoundAuditServiceImpl implements OrderChildPoundAuditSer ...@@ -62,6 +62,10 @@ public class OrderChildPoundAuditServiceImpl implements OrderChildPoundAuditSer
vo.setLoadNet(poundAuditDetail.getLoadNet()); vo.setLoadNet(poundAuditDetail.getLoadNet());
vo.setUnloadNet(poundAuditDetail.getUnloadNet()); vo.setUnloadNet(poundAuditDetail.getUnloadNet());
vo.setUnloadPoundNo(poundAuditDetail.getUnloadPoundNo()); vo.setUnloadPoundNo(poundAuditDetail.getUnloadPoundNo());
vo.setUnloadTare(poundAuditDetail.getUnloadTare());
vo.setUnloadRough(poundAuditDetail.getUnloadRough());
vo.setLoadRough(poundAuditDetail.getLoadRough());
vo.setLoadTare(poundAuditDetail.getLoadTare());
vo.setStatus(poundAuditDetail.getStatus()); vo.setStatus(poundAuditDetail.getStatus());
vo.setRemark(poundAuditDetail.getRemark()); vo.setRemark(poundAuditDetail.getRemark());
vo.setRejectType(poundAuditDetail.getRejectType()); vo.setRejectType(poundAuditDetail.getRejectType());
...@@ -74,7 +78,8 @@ public class OrderChildPoundAuditServiceImpl implements OrderChildPoundAuditSer ...@@ -74,7 +78,8 @@ public class OrderChildPoundAuditServiceImpl implements OrderChildPoundAuditSer
public void updatePoundAudit(PoundAuditParam param) { public void updatePoundAudit(PoundAuditParam param) {
//运单详情 //运单详情
OrderChild orderChild = orderChildDao.getByChildNo(param.getChildNo()).orElseThrow(PerformanceResultEnum.DATA_NOT_FIND); OrderChild orderChild = orderChildDao.getByChildNo(param.getChildNo()).orElseThrow(PerformanceResultEnum.DATA_NOT_FIND);
BigDecimal loadNet = param.getLoadRough().subtract(param.getLoadTare());
BigDecimal unLoadNet = param.getUnloadRough().subtract(param.getUnloadRough());
if(OrderChildEnum.CANCEL_lIST.contains(orderChild.getStatus())){ if(OrderChildEnum.CANCEL_lIST.contains(orderChild.getStatus())){
throw new ServiceSystemException(PerformanceResultEnum.ORDER_CHILD_CANCELED); throw new ServiceSystemException(PerformanceResultEnum.ORDER_CHILD_CANCELED);
} }
...@@ -94,21 +99,20 @@ public class OrderChildPoundAuditServiceImpl implements OrderChildPoundAuditSer ...@@ -94,21 +99,20 @@ public class OrderChildPoundAuditServiceImpl implements OrderChildPoundAuditSer
poundAuditDetail.setCreateTime(null); poundAuditDetail.setCreateTime(null);
poundAuditDetail.setModifiedTime(null); poundAuditDetail.setModifiedTime(null);
BigDecimal dif = param.getLoadNet().subtract(orderChild.getLoadNet()); BigDecimal dif = loadNet.subtract(orderChild.getLoadNet());
int type = OrderChildLogEnum.Type.POUND_AUDIT.getCode(); int type = OrderChildLogEnum.Type.POUND_AUDIT.getCode();
if(Objects.equals(param.getStatus(), OrderChildPoundAuditEnum.Status.REJECT.getCode())){ if(Objects.equals(param.getStatus(), OrderChildPoundAuditEnum.Status.REJECT.getCode())){
type = OrderChildLogEnum.Type.POUND_AUDIT_REJECT.getCode(); type = OrderChildLogEnum.Type.POUND_AUDIT_REJECT.getCode();
}else{ }else{
if(Objects.nonNull(param.getLoadNet())){ poundAuditDetail.setLoadNet(loadNet);
poundAuditDetail.setLoadNet(param.getLoadNet()); poundAuditDetail.setUnloadNet(unLoadNet);
orderChild.setLoadNet(param.getLoadNet()); poundAuditDetail.setLoadRough(poundAuditDetail.getLoadRough());
} poundAuditDetail.setLoadTare(poundAuditDetail.getLoadTare());
poundAuditDetail.setUnloadRough(poundAuditDetail.getUnloadRough());
if(Objects.nonNull(param.getUnloadNet())){ poundAuditDetail.setUnloadTare(poundAuditDetail.getUnloadTare());
poundAuditDetail.setUnloadNet(param.getUnloadNet()); orderChild.setLoadNet(loadNet);
orderChild.setUnloadNet(param.getUnloadNet()); orderChild.setUnloadNet(unLoadNet);
}
} }
orderChild.setWeight(orderChildWeightCalc(orderChild)); orderChild.setWeight(orderChildWeightCalc(orderChild));
orderChild.setFreight(orderChildFreightCalc(orderChild)); orderChild.setFreight(orderChildFreightCalc(orderChild));
......
...@@ -655,7 +655,7 @@ public class OrderChildServiceImpl implements OrderChildService { ...@@ -655,7 +655,7 @@ public class OrderChildServiceImpl implements OrderChildService {
public void updateLoad(OrderChildLoadParam param) { public void updateLoad(OrderChildLoadParam param) {
UserSessionData loginUserInfo = TokenUtil.getLoginUserInfo(); UserSessionData loginUserInfo = TokenUtil.getLoginUserInfo();
Long userNo = loginUserInfo.getUserNo(); Long userNo = loginUserInfo.getUserNo();
BigDecimal loadNet = param.getLoadRough().subtract(param.getLoadTare());
String childNo = param.getChildNo(); String childNo = param.getChildNo();
OrderChild orderChild = orderChildDao.getByChildNo(childNo).orElseThrow( OrderChild orderChild = orderChildDao.getByChildNo(childNo).orElseThrow(
...@@ -672,7 +672,7 @@ public class OrderChildServiceImpl implements OrderChildService { ...@@ -672,7 +672,7 @@ public class OrderChildServiceImpl implements OrderChildService {
throw new ServiceSystemException(PerformanceResultEnum.ORDER_CHILD_CANCELED); throw new ServiceSystemException(PerformanceResultEnum.ORDER_CHILD_CANCELED);
} }
if (!loadCheck(param.getLoadNet(), orderChild.getTruckLoad())) { if (!loadCheck(loadNet, orderChild.getTruckLoad())) {
throw new ServiceSystemException(PerformanceResultEnum.ORDER_CHILD_LOAD_WEIGHT_ERROR); throw new ServiceSystemException(PerformanceResultEnum.ORDER_CHILD_LOAD_WEIGHT_ERROR);
} }
...@@ -695,7 +695,7 @@ public class OrderChildServiceImpl implements OrderChildService { ...@@ -695,7 +695,7 @@ public class OrderChildServiceImpl implements OrderChildService {
private void updateLoadFirst(OrderChildLoadParam param, OrderChild orderChild, OrderGoods orderGoods) { private void updateLoadFirst(OrderChildLoadParam param, OrderChild orderChild, OrderGoods orderGoods) {
String childNo = param.getChildNo(); String childNo = param.getChildNo();
BigDecimal loadNet = param.getLoadRough().subtract(param.getLoadTare());
// // 装车时间验证 // // 装车时间验证
// FeignOrderInfoVO orderInfo = orderService.getOrderInfo(orderChild.getOrderNo()).orElseThrow // FeignOrderInfoVO orderInfo = orderService.getOrderInfo(orderChild.getOrderNo()).orElseThrow
// (PerformanceResultEnum.DATA_NOT_FIND); // (PerformanceResultEnum.DATA_NOT_FIND);
...@@ -717,14 +717,14 @@ public class OrderChildServiceImpl implements OrderChildService { ...@@ -717,14 +717,14 @@ public class OrderChildServiceImpl implements OrderChildService {
imageList.add(image); imageList.add(image);
} }
BigDecimal dif = param.getLoadNet().subtract(orderChild.getWeight()); BigDecimal dif = loadNet.subtract(orderChild.getWeight());
//更新货单吨数 //更新货单吨数
updateOrderGoodsAmountLoad(orderGoods, childNo,dif,OrderGoodsStatusEnum.Status.GO_TO_SEND.getCode()); updateOrderGoodsAmountLoad(orderGoods, childNo,dif,OrderGoodsStatusEnum.Status.GO_TO_SEND.getCode());
orderChild.setLoadRough(param.getLoadRough()); orderChild.setLoadRough(param.getLoadRough());
orderChild.setLoadTare(param.getLoadTare()); orderChild.setLoadTare(param.getLoadTare());
orderChild.setLoadNet(param.getLoadNet()); orderChild.setLoadNet(loadNet);
orderChild.setLoadTime(LocalDateTime.now()); orderChild.setLoadTime(LocalDateTime.now());
orderChild.setWeight(orderChildWeightCalc(orderChild)); orderChild.setWeight(orderChildWeightCalc(orderChild));
orderChild.setFreight(orderChildFreightCalc(orderChild)); orderChild.setFreight(orderChildFreightCalc(orderChild));
...@@ -740,6 +740,7 @@ public class OrderChildServiceImpl implements OrderChildService { ...@@ -740,6 +740,7 @@ public class OrderChildServiceImpl implements OrderChildService {
private void updateReload(OrderChildLoadParam param, OrderChild orderChild, OrderGoods orderGoods) { private void updateReload(OrderChildLoadParam param, OrderChild orderChild, OrderGoods orderGoods) {
String childNo = param.getChildNo(); String childNo = param.getChildNo();
BigDecimal loadNet = param.getLoadRough().subtract(param.getLoadTare());
List<OrderChildImage> imageList = new ArrayList<>(); List<OrderChildImage> imageList = new ArrayList<>();
for (String item : param.getLoadImageList()) { for (String item : param.getLoadImageList()) {
...@@ -750,11 +751,11 @@ public class OrderChildServiceImpl implements OrderChildService { ...@@ -750,11 +751,11 @@ public class OrderChildServiceImpl implements OrderChildService {
imageList.add(image); imageList.add(image);
} }
BigDecimal dif = param.getLoadNet().subtract(orderChild.getWeight()); BigDecimal dif = loadNet.subtract(orderChild.getWeight());
orderChild.setLoadRough(param.getLoadRough()); orderChild.setLoadRough(param.getLoadRough());
orderChild.setLoadTare(param.getLoadTare()); orderChild.setLoadTare(param.getLoadTare());
orderChild.setLoadNet(param.getLoadNet()); orderChild.setLoadNet(loadNet);
orderChild.setLoadTime(LocalDateTime.now()); orderChild.setLoadTime(LocalDateTime.now());
orderChild.setWeight(orderChildWeightCalc(orderChild)); orderChild.setWeight(orderChildWeightCalc(orderChild));
orderChild.setFreight(orderChildFreightCalc(orderChild)); orderChild.setFreight(orderChildFreightCalc(orderChild));
...@@ -841,7 +842,7 @@ public class OrderChildServiceImpl implements OrderChildService { ...@@ -841,7 +842,7 @@ public class OrderChildServiceImpl implements OrderChildService {
orderChild.setUnloadPoundNo(param.getUnloadPoundNo()); orderChild.setUnloadPoundNo(param.getUnloadPoundNo());
orderChild.setUnloadRough(param.getUnloadRough()); orderChild.setUnloadRough(param.getUnloadRough());
orderChild.setUnloadTare(param.getUnloadTare()); orderChild.setUnloadTare(param.getUnloadTare());
orderChild.setUnloadNet(param.getUnloadNet()); orderChild.setUnloadNet(orderChild.getUnloadRough().subtract(orderChild.getUnloadTare()));
orderChild.setUnloadTime(LocalDateTime.now()); orderChild.setUnloadTime(LocalDateTime.now());
orderChild.setWeight(orderChildWeightCalc(orderChild)); orderChild.setWeight(orderChildWeightCalc(orderChild));
orderChild.setStatus(OrderChildEnum.Status.UNLOAD.getCode()); orderChild.setStatus(OrderChildEnum.Status.UNLOAD.getCode());
...@@ -853,6 +854,10 @@ public class OrderChildServiceImpl implements OrderChildService { ...@@ -853,6 +854,10 @@ public class OrderChildServiceImpl implements OrderChildService {
audit.setStatus(OrderChildPoundAuditEnum.Status.AUDIT.getCode()); audit.setStatus(OrderChildPoundAuditEnum.Status.AUDIT.getCode());
audit.setLoadNet(orderChild.getLoadNet()); audit.setLoadNet(orderChild.getLoadNet());
audit.setUnloadNet(orderChild.getUnloadNet()); audit.setUnloadNet(orderChild.getUnloadNet());
audit.setUnloadTare(orderChild.getUnloadTare());
audit.setUnloadRough(orderChild.getUnloadRough());
audit.setLoadTare(orderChild.getLoadTare());
audit.setLoadRough(orderChild.getLoadRough());
orderChildDao.updateUnload(orderChild); orderChildDao.updateUnload(orderChild);
...@@ -893,7 +898,7 @@ public class OrderChildServiceImpl implements OrderChildService { ...@@ -893,7 +898,7 @@ public class OrderChildServiceImpl implements OrderChildService {
orderChild.setUnloadPoundNo(param.getUnloadPoundNo()); orderChild.setUnloadPoundNo(param.getUnloadPoundNo());
orderChild.setUnloadRough(param.getUnloadRough()); orderChild.setUnloadRough(param.getUnloadRough());
orderChild.setUnloadTare(param.getUnloadTare()); orderChild.setUnloadTare(param.getUnloadTare());
orderChild.setUnloadNet(param.getUnloadNet()); orderChild.setUnloadNet(orderChild.getUnloadRough().subtract(orderChild.getUnloadTare()));
orderChild.setUnloadTime(LocalDateTime.now()); orderChild.setUnloadTime(LocalDateTime.now());
orderChild.setWeight(orderChildWeightCalc(orderChild)); orderChild.setWeight(orderChildWeightCalc(orderChild));
orderChild.setPoundStatus(OrderChildPoundAuditEnum.Status.AUDIT.getCode()); orderChild.setPoundStatus(OrderChildPoundAuditEnum.Status.AUDIT.getCode());
...@@ -920,8 +925,7 @@ public class OrderChildServiceImpl implements OrderChildService { ...@@ -920,8 +925,7 @@ public class OrderChildServiceImpl implements OrderChildService {
UserSessionData loginUserInfo = TokenUtil.getLoginUserInfo(); UserSessionData loginUserInfo = TokenUtil.getLoginUserInfo();
Long userNo = loginUserInfo.getUserNo(); Long userNo = loginUserInfo.getUserNo();
String childNo = param.getChildNo(); String childNo = param.getChildNo();
LocalDateTime now = LocalDateTime.now(); BigDecimal loadNet = param.getLoadRough().subtract(param.getLoadTare());
OrderChild orderChild = orderChildDao.getByChildNo(childNo).orElseThrow( OrderChild orderChild = orderChildDao.getByChildNo(childNo).orElseThrow(
PerformanceResultEnum.ORDER_CHILD_NO_FOUND); PerformanceResultEnum.ORDER_CHILD_NO_FOUND);
if (Objects.equals(orderChild.getDriverUserNo(), userNo)) { if (Objects.equals(orderChild.getDriverUserNo(), userNo)) {
...@@ -946,7 +950,7 @@ public class OrderChildServiceImpl implements OrderChildService { ...@@ -946,7 +950,7 @@ public class OrderChildServiceImpl implements OrderChildService {
throw new ServiceSystemException(PerformanceResultEnum.ORDER_CHILD_STATUS_CHANGED); throw new ServiceSystemException(PerformanceResultEnum.ORDER_CHILD_STATUS_CHANGED);
} }
if (!loadCheck(param.getLoadNet(), orderChild.getTruckLoad())) { if (!loadCheck(loadNet, orderChild.getTruckLoad())) {
throw new ServiceSystemException(PerformanceResultEnum.ORDER_CHILD_LOAD_WEIGHT_ERROR); throw new ServiceSystemException(PerformanceResultEnum.ORDER_CHILD_LOAD_WEIGHT_ERROR);
} }
// if (!loadCheck(param.getUnloadNet(), orderChild.getTruckLoad())){ // if (!loadCheck(param.getUnloadNet(), orderChild.getTruckLoad())){
...@@ -972,11 +976,11 @@ public class OrderChildServiceImpl implements OrderChildService { ...@@ -972,11 +976,11 @@ public class OrderChildServiceImpl implements OrderChildService {
imageList.add(image); imageList.add(image);
} }
BigDecimal dif = param.getLoadNet().subtract(orderChild.getWeight()); BigDecimal dif = loadNet.subtract(orderChild.getWeight());
orderChild.setLoadRough(param.getLoadRough()); orderChild.setLoadRough(param.getLoadRough());
orderChild.setLoadTare(param.getLoadTare()); orderChild.setLoadTare(param.getLoadTare());
orderChild.setLoadNet(param.getLoadNet()); orderChild.setLoadNet(loadNet);
orderChild.setUnloadRough(param.getUnloadRough()); orderChild.setUnloadRough(param.getUnloadRough());
orderChild.setUnloadTare(param.getUnloadTare()); orderChild.setUnloadTare(param.getUnloadTare());
orderChild.setUnloadNet(param.getUnloadNet()); orderChild.setUnloadNet(param.getUnloadNet());
......
...@@ -83,7 +83,8 @@ public class OrderChildSqlProvider { ...@@ -83,7 +83,8 @@ public class OrderChildSqlProvider {
public String pagePoundAuditList(@Param("page") Page<PageOrderChildPoundAuditVO> page, @Param("param") PagePoundAuditParam param) { public String pagePoundAuditList(@Param("page") Page<PageOrderChildPoundAuditVO> page, @Param("param") PagePoundAuditParam param) {
return new SQL(){{ return new SQL(){{
SELECT("child_no,pound_status as status,goods_name,send_address,receive_address,driver_name,driver_mobile,load_net,unload_net," + SELECT("child_no,pound_status as status,goods_name,send_address,receive_address,driver_name," +
"driver_mobile,load_net,unload_net,load_rough,load_tare,unload_rough,unload_tare," +
"date_format(pay_time, '%Y-%m-%d %H:%i:%s') as payTime," + "date_format(pay_time, '%Y-%m-%d %H:%i:%s') as payTime," +
"date_format(load_time, '%Y-%m-%d %H:%i:%s') as loadTime," + "date_format(load_time, '%Y-%m-%d %H:%i:%s') as loadTime," +
"date_format(unload_time, '%Y-%m-%d %H:%i:%s') as unloadTime "); "date_format(unload_time, '%Y-%m-%d %H:%i:%s') as unloadTime ");
...@@ -107,7 +108,9 @@ public class OrderChildSqlProvider { ...@@ -107,7 +108,9 @@ public class OrderChildSqlProvider {
public String pageCarrierOrderChildList(@Param("page") Page<PageCarrierOrderChildVO> page, @Param("param") PageCarrierOrderChildParam param) { public String pageCarrierOrderChildList(@Param("page") Page<PageCarrierOrderChildVO> page, @Param("param") PageCarrierOrderChildParam param) {
return new SQL(){{ return new SQL(){{
SELECT("child_no,order_goods_no,status,goods_name,freight_price,send_address,receive_address,driver_name,driver_mobile,load_net,unload_net," + SELECT("child_no,order_goods_no,status,goods_name," +
"freight_price,send_address,receive_address,load_rough,load_tare,unload_rough,unload_tare," +
"driver_name,driver_mobile,load_net,unload_net," +
"date_format(pay_time, '%Y-%m-%d %H:%i:%s') as payTime," + "date_format(pay_time, '%Y-%m-%d %H:%i:%s') as payTime," +
"date_format(finish_time, '%Y-%m-%d %H:%i:%s') as finishTime"); "date_format(finish_time, '%Y-%m-%d %H:%i:%s') as finishTime");
FROM("order_child "); FROM("order_child ");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论