1.修复上传单据到自助平台失败问题

wms_pzh
x_z 3 years ago
parent 98709c9b91
commit 2e3e10bdd4

@ -824,21 +824,21 @@ public class OrderController {
PostUdimsOrderRequest postUdimsOrderRequest = new PostUdimsOrderRequest();
List<PostUdimsOrderRequest.OrderBean> orderBeans = new ArrayList<>();
String orderId = orderUploadRequest.getOrderIds().get(0);
OrderEntity orderEntity = orderService.findById(orderId);
UnitMaintainPlatformEntity unitMaintainPlatform = platformService.findLinkData(customerService.getUserBean().getCustomerId(), orderEntity.getAction(), orderEntity.getFromCorpId());
StockOrderEntity stockOrder = stockOrderService.findByBillNo(orderId);
UnitMaintainPlatformEntity unitMaintainPlatform = platformService.findLinkData(customerService.getUserBean().getCustomerId(), stockOrder.getBillType(), stockOrder.getCorpId());
if (unitMaintainPlatform == null || unitMaintainPlatform.getAppid() == null) {
return ResultVOUtils.error(500, "该往来单位未绑定UDI自助平台");
}
if (!orderEntity.getAction().equals(unitMaintainPlatform.getSourceAction())) {
if (!stockOrder.getBillType().equals(unitMaintainPlatform.getSourceAction())) {
return ResultVOUtils.error(500, "该单据类型不支持提交!");
}
PostUdimsOrderRequest.OrderBean orderBean = new PostUdimsOrderRequest.OrderBean();
BeanUtils.copyProperties(orderEntity, orderBean);
BeanUtils.copyProperties(stockOrder, orderBean);
orderBean.setAction(unitMaintainPlatform.getTargetAction());
orderBean.setInvStorageCode(unitMaintainPlatform.getInvCode());
orderBean.setInvWarehouseCode(unitMaintainPlatform.getInvSubCode());
WarehouseQueryRequest warehouseQueryRequest = new WarehouseQueryRequest();
warehouseQueryRequest.setOrderId(orderEntity.getId());
warehouseQueryRequest.setOrderId(stockOrder.getBillNo());
List<WarehouseEntity> warehouseEntities = codesService.findByOrderId(warehouseQueryRequest);
List<PostUdimsOrderRequest.OrderBean.CodeBean> codeBeans = new ArrayList<>();
warehouseEntities.forEach(data -> {
@ -884,8 +884,8 @@ public class OrderController {
JSONObject.parseObject(response, new TypeReference<BaseResponse>() {
});
if (baseResponse.getCode() == 20000) {
orderEntity.setUploadStatus("1");
orderService.updateOrder(orderEntity);
stockOrder.setUploadStatus("1");
stockOrderService.updateById(stockOrder);
return baseResponse;
} else {
return ResultVOUtils.error(500, baseResponse.getMessage());

@ -55,4 +55,9 @@ public class StockOrderEntity {
private String reviewUserName;
/**
* 01
*/
private String uploadStatus;
}

@ -30,7 +30,7 @@
thirdSysFk, status, statusInfo, `type`, sourceType,
printStatus, unitIdFk, customerId, thirdOrderFk, orderIdFk,
totalPrice, locStorageCode, supplementNo, createUser, reviewUser, entrustEnd, auditTime,
updateTime, invWarehouseCode, fromSubInvCode, dept)
updateTime, invWarehouseCode, fromSubInvCode, dept, uploadStatus)
values (#{id},
#{billNo},
#{billdate},
@ -45,7 +45,7 @@
#{sourceType},
#{printStatus}, #{unitIdFk}, #{customerId}, #{thirdOrderFk}, #{orderIdFk}, #{totalPrice},
#{locStorageCode}, #{supplementNo}, #{createUser}, #{reviewUser}, #{entrustEnd}, #{auditTime},
#{updateTime}, #{invWarehouseCode}, #{fromSubInvCode}, #{dept})
#{updateTime}, #{invWarehouseCode}, #{fromSubInvCode}, #{dept}, #{uploadStatus})
</insert>
<update id="updateById" parameterType="com.glxp.api.admin.entity.business.StockOrderEntity">
UPDATE stock_order
@ -77,6 +77,7 @@
<if test="invWarehouseCode != null">invWarehouseCode=#{invWarehouseCode},</if>
<if test="fromSubInvCode != null">fromSubInvCode=#{fromSubInvCode},</if>
<if test="dept != null">dept=#{dept},</if>
<if test="uploadStatus != null">uploadStatus=#{uploadStatus},</if>
</trim>
WHERE id = #{id}
</update>

Loading…
Cancel
Save