委托验收创建多个会覆盖问题,增加可以设置多个委托验收,选择业务单据检验加当前仓库当前分库校验

fengcang
anthonyywj2 3 years ago
parent 00222bf6eb
commit c1bd7b21e4

@ -285,6 +285,8 @@ public class OrderController {
basicEntrustRecRequest.setAction(stockOrderEntity.getBillType());
basicEntrustRecRequest.setEntrustUser(userId + "");
basicEntrustRecRequest.setCurInv(stockOrderEntity.getLocStorageCode());
basicEntrustRecRequest.setInvWarehouseCode(stockOrderEntity.getInvWarehouseCode());
entrustReceEntities = entrustReceService.filterEntrustRec(basicEntrustRecRequest);
} else {
return ResultVOUtils.error(500, "单据已委托验收完成!");

@ -550,6 +550,8 @@ public class OrderDetailController {
erpOrderEntity.setBatchNo(subPurchase.getBatchNo());
erpOrderEntity.setErpCount(subPurchase.getCount());
erpOrderEntity.setReCount(subPurchase.getReCount());
erpOrderEntity.setInvWarehouseCode(purchaseinResponse.getInvWarehouseCode());
erpOrderEntity.setLocStorageCode(purchaseinResponse.getLocStorageCode());
erpOrderEntity.setGoodsunit(subPurchase.getSpec());
erpOrderEntity.setBindRlFk(subPurchase.getRelId());
erpOrderEntities.add(erpOrderEntity);
@ -562,7 +564,16 @@ public class OrderDetailController {
ErpOrderEntity temp = erpOrderEntities.get(0);
for (int i = 0; i < erpOrderEntities.size(); i++) {
if (!temp.getCompanyname().equals(erpOrderEntities.get(i).getCompanyname())) {
return ResultVOUtils.error(500, "选择Erp订单往来单位不一致");
return ResultVOUtils.error(500, "所选业务单据往来单位不一致!");
}
if (!temp.getLocStorageCode().equals(erpOrderEntities.get(i).getLocStorageCode())) {
return ResultVOUtils.error(500, "所选业务单据当前仓库不一致!");
}
if (!temp.getInvWarehouseCode().equals(erpOrderEntities.get(i).getInvWarehouseCode())) {
return ResultVOUtils.error(500, "所选业务单据当前分库不一致!");
}
}
@ -572,7 +583,7 @@ public class OrderDetailController {
orderEntity.setReviewUser(authAdmin.getId().intValue());
ErpOrderEntity exitErp = new ContrastErpUtil().vailErpExit(orderDetailService, erpOrderEntities, importErpOrderRequest.getOrderId());
if (exitErp != null) {
String errMsg = "所选ERP单" + exitErp.getErpOrderId() + "已被其他出入库单" + exitErp.getOrderIdFk() + "绑定";
String errMsg = "所选业务单据" + exitErp.getErpOrderId() + "已被其他出入库单" + exitErp.getOrderIdFk() + "绑定";
orderEntity.setRemark(errMsg);
orderEntity.setUpdateTime(new Date());
orderService.updateOrder(orderEntity);
@ -586,7 +597,7 @@ public class OrderDetailController {
transInoutService.genOrderDetail(warehouseEntityList);
checkOrderUtils.check(orderEntity.getId(), erpOrderEntities);
} else {
return ResultVOUtils.error(500, "ERP订单不能为空");
return ResultVOUtils.error(500, "业务单据不能为空");
}
return ResultVOUtils.success("导入成功");

@ -57,6 +57,9 @@ public class ErpOrderEntity {
private BigDecimal price;
private boolean checkSuccess;
private String locStorageCode;
private String invWarehouseCode;//当前分库
private String fromSubInvCode; //往来分库
public Integer getBindStatus() {

@ -16,5 +16,7 @@ public class BasicEntrustRecRequest extends ListPageRequest {
private Date updateTime;
private String curInv;
private Date lastUpdateTime;
private String entrustSubInv;
private String invWarehouseCode;
}

@ -12,6 +12,10 @@ public class ErpOrderResponse {
private String billType;
private String billFlag;
private String originType;
private String locStorageCode;
private String invWarehouseCode;//当前分库
private String fromSubInvCode; //往来分库
private String thirdSysFk;
private List<ErpOrderResponse.SubErpOrder> subErpOrders;
@ -198,6 +202,30 @@ public class ErpOrderResponse {
this.remark3 = remark3;
}
public String getLocStorageCode() {
return locStorageCode;
}
public void setLocStorageCode(String locStorageCode) {
this.locStorageCode = locStorageCode;
}
public String getInvWarehouseCode() {
return invWarehouseCode;
}
public void setInvWarehouseCode(String invWarehouseCode) {
this.invWarehouseCode = invWarehouseCode;
}
public String getFromSubInvCode() {
return fromSubInvCode;
}
public void setFromSubInvCode(String fromSubInvCode) {
this.fromSubInvCode = fromSubInvCode;
}
public static class SubErpOrder {
private Integer id;
private String productId;

@ -25,6 +25,12 @@
<if test="curInv!=null">
and curInv = #{curInv}
</if>
<if test="entrustSubInv!=null">
and entrustSubInv = #{entrustSubInv}
</if>
<if test="invWarehouseCode!=null">
and invWarehouseCode = #{invWarehouseCode}
</if>
<if test="lastUpdateTime!=null and lastUpdateTime!=''">
<![CDATA[ and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]>
</if>

Loading…
Cancel
Save