修改平衡补单时,往来分库错误的问题 ,以及页面展示关联查询的问题

zhairh
anthonyywj2 3 years ago
parent dfbc69cfe6
commit b153ee048c

@ -230,6 +230,7 @@ public class OrderServiceImpl implements OrderService {
return orderDao.findAllByTime(orderFilterRequest);
}
//平衡补单
@Override
public BaseResponse supplementOrder(String billNo, String orderIdFk) {
//查询订单数据
@ -267,6 +268,7 @@ public class OrderServiceImpl implements OrderService {
supplementOrder.setCorpOrderId(CustomUtil.getId() + "x");
//修改往来单位及当前库存号
supplementOrder.setFromCorpId(order.getLocStorageCode());
supplementOrder.setFromSubInvCode(order.getInvWarehouseCode());
supplementOrder.setLocStorageCode(order.getFromCorpId());
supplementOrder.setInvWarehouseCode(null);
String name = invWarehouseDao.getNameByCode(supplementOrder.getFromCorpId());

@ -1,19 +1,25 @@
package com.glxp.sale.admin.thread;
import cn.hutool.core.collection.CollUtil;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.glxp.sale.admin.entity.basic.UdiCompanyEntity;
import com.glxp.sale.admin.entity.receipt.ProductInfoEntity;
import com.glxp.sale.admin.service.receipt.ProductInfoService;
import com.glxp.sale.admin.util.HttpClient;
import com.glxp.sale.common.res.BaseResponse;
import com.glxp.sale.common.util.ResultVOUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Slf4j
@Service
public class AsyncDiDlHelper {
@Value("${UDI_SERVER_URL}")
@ -115,4 +121,33 @@ public class AsyncDiDlHelper {
}
}
@Resource
ProductInfoService productInfoService;
@Async
public void dlByUuid(String uuid) {
Map<String, Object> paramMap = new HashMap<>(16);
paramMap.put("uuid", uuid);
String response = HttpClient.mipsGet(udiUrl + "/udidl/device/searchDlByUuid", paramMap);
try {
BaseResponse<List<ProductInfoEntity>> baseResponse =
JSONObject.parseObject(response, new TypeReference<BaseResponse<List<ProductInfoEntity>>>() {
});
if (baseResponse != null && baseResponse.getCode() == 20000) {
List<ProductInfoEntity> productInfoEntityList = baseResponse.getData();
if (CollUtil.isNotEmpty(productInfoEntityList)) {
productInfoService.insertProductInfos(productInfoEntityList);
}
} else {
log.error("下载出错");
}
} catch (Exception e) {
e.printStackTrace();
}
}
}

@ -310,7 +310,7 @@
inv_warehouse_sub.name as subInvName
FROM io_order
LEFT JOIN inv_warehouse ON io_order.locStorageCode = inv_warehouse.`code`
LEFT JOIN inv_warehouse_sub ON inv_warehouse_sub.parentId = inv_warehouse.`code`
LEFT JOIN inv_warehouse_sub ON inv_warehouse_sub.code = io_order.invWarehouseCode
LEFT JOIN inv_warehouse_user on inv_warehouse_sub.code = inv_warehouse_user.`code`
<where>
<if test="id != '' and id!=null">

Loading…
Cancel
Save