x_z 3 years ago
parent 2b3021f137
commit 4f6c0fe7e5

@ -6,6 +6,7 @@ import com.glxp.udi.admin.annotation.AuthRuleAnnotation;
import com.glxp.udi.admin.common.res.BaseResponse;
import com.glxp.udi.admin.constant.CacheKey;
import com.glxp.udi.admin.entity.auth.CustomerContactEntity;
import com.glxp.udi.admin.entity.auth.CustomerInfoEntity;
import com.glxp.udi.admin.entity.info.CompanyEntity;
import com.glxp.udi.admin.entity.info.CompanyUpdateLogEntity;
import com.glxp.udi.admin.req.info.CompanyRequest;
@ -13,6 +14,7 @@ import com.glxp.udi.admin.req.info.FilterCompanyRequest;
import com.glxp.udi.admin.res.PageSimpleResponse;
import com.glxp.udi.admin.service.auth.AuthAdminService;
import com.glxp.udi.admin.service.auth.CustomerContactService;
import com.glxp.udi.admin.service.auth.CustomerInfoService;
import com.glxp.udi.admin.service.info.CompanyService;
import com.glxp.udi.admin.service.info.CompanyUpdateLogService;
import com.glxp.udi.admin.util.RedisUtil;
@ -52,6 +54,8 @@ public class CompanyController {
private UdiDlHttpClient udiDlHttpClient;
@Resource
private RedisUtil redisUtil;
@Resource
private CustomerInfoService customerInfoService;
@AuthRuleAnnotation("")
@GetMapping("/warehouse/info/company")
@ -146,6 +150,15 @@ public class CompanyController {
customerContactEntity.setCustomerId(companyEntity.getCustomerId());
customerContactService.updateCustomerContact(customerContactEntity);
//同步更新客户表数据
CustomerInfoEntity customerInfoEntity = customerInfoService.selectById(companyEntity.getCustomerId());
customerInfoEntity.setCompanyName(companyEntity.getCompanyName());
customerInfoEntity.setCustomerName(companyEntity.getCompanyName());
customerInfoEntity.setArea(companyEntity.getArea());
customerInfoEntity.setDetailAddr(companyEntity.getDetailAddr());
customerInfoEntity.setCreditNum(companyEntity.getCreditNum());
customerInfoService.updateCustomerInfo(customerInfoEntity);
return ResultVOUtils.success("修改成功");
}

@ -85,6 +85,7 @@ public class InvProductsController {
for (InvProductEntity invProductEntity : invProductEntities) {
InvProductResponse invProductResponse = new InvProductResponse();
BeanUtil.copyProperties(invProductEntity, invProductResponse);
invProductResponse.setProductionDate(invProductEntity.getProductDate());
invProductResponse.setInvStorageCode(invProductEntity.getLocStorageCode());
invProductResponse.setInvStorageName(invWarehouseService.findNameByCode(invProductEntity.getLocStorageCode()));
result.add(invProductResponse);
@ -104,14 +105,14 @@ public class InvProductsController {
if (StringUtils.isNotBlank(filterInvProductRequest.getUdiCode())) {
filterUdiInfoRequest.setNameCode(FilterUdiUtils.getDiStr(filterInvProductRequest.getUdiCode()));
}
String customerId = String.valueOf(customerService.getCustomerId());
filterUdiInfoRequest.setCustomerId(customerId);
filterUdiInfoRequest.setCpmctymc(filterInvProductRequest.getProductsName());
IPage<UdiInfoEntity> page = udiInfoService.filterUdiInfo(filterUdiInfoRequest);
List<String> uuids = new ArrayList<>();
for (UdiInfoEntity udiInfoEntity : page.getRecords()) {
uuids.add(udiInfoEntity.getUuid());
}
filterInvProductRequest.setUuids(uuids);
if (uuids.size() <= 0) {
if (page.getTotal() > 0) {
filterInvProductRequest.setNameCode(page.getRecords().get(0).getNameCode());
filterInvProductRequest.setCustomerId(customerId);
} else {
return ResultVOUtils.success(new PageSimpleResponse<>());
}
}
@ -126,7 +127,7 @@ public class InvProductsController {
List<InvProductEntity> invProductEntities = page.getRecords();
List<InvProductResponse> invProductResponses = new ArrayList<>();
for (InvProductEntity invProductEntity : invProductEntities) {
UdiInfoEntity udiInfoEntity = udiInfoService.findByUuid(invProductEntity.getRelIdFk(), invProductEntity.getCustomerId());
UdiInfoEntity udiInfoEntity = udiInfoService.findById(invProductEntity.getRelIdFk());
invProductEntity.setNameCode(udiInfoEntity.getNameCode());
invProductEntity.setGgxh(udiInfoEntity.getGgxh());

@ -1,6 +1,7 @@
package com.glxp.udi.admin.entity.inout;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@ -112,4 +113,10 @@ public class WarehousetempEntity {
*/
private String supId;
/**
* 使nameCode
*/
@TableField(exist = false)
private String udi;
}

@ -27,4 +27,9 @@ public class FilterOrderDetailRequest extends ListPageRequest {
private String uuidFk;
List<String> orderIds;
/**
* ID
*/
private String relId;
}

@ -11,6 +11,10 @@ public class InvProductResponse {
private String relIdFk;
private String ggxh;
private String batchNo;
/**
*
*/
private String productionDate;
private String expireDate;
private String ylqxzcrbarmc;

@ -60,6 +60,7 @@ public class OrderDetailService {
.eq(StrUtil.isNotBlank(orderDetailRequest.getOrderIdFk()), "orderIdFk", orderDetailRequest.getOrderIdFk())
.eq(null != orderDetailRequest.getCustomerId(), "customerId", orderDetailRequest.getCustomerId())
.eq(StrUtil.isNotBlank(orderDetailRequest.getUuidFk()), "uuidFk", orderDetailRequest.getUuidFk())
.eq(StrUtil.isNotBlank(orderDetailRequest.getRelId()),"relId", orderDetailRequest.getRelId())
.eq(StrUtil.isNotBlank(orderDetailRequest.getLotno()), "batchNo", orderDetailRequest.getLotno());
return wrapper;
}

@ -2,6 +2,8 @@ package com.glxp.udi.admin.service.inout;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ReflectUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -92,8 +94,8 @@ public class OrderService {
QueryWrapper<OrderEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StrUtil.isNotBlank(orderFilterRequest.getId()), "orderId", orderFilterRequest.getId())
.in(CollUtil.isNotEmpty(orderFilterRequest.getInvCodes()), "locStorageCode", orderFilterRequest.getInvCodes())
.le(StrUtil.isNotBlank(orderFilterRequest.getStartTime()), "actDate", orderFilterRequest.getStartTime())
.ge(StrUtil.isNotBlank(orderFilterRequest.getEndTime()), "actDate", orderFilterRequest.getEndTime())
.ge(StrUtil.isNotBlank(orderFilterRequest.getStartTime()), "actDate", StrUtil.isBlank(orderFilterRequest.getStartTime()) ? null : DateUtil.parse(orderFilterRequest.getStartTime()).toString(DatePattern.NORM_DATETIME_PATTERN))
.le(StrUtil.isNotBlank(orderFilterRequest.getEndTime()), "actDate", StrUtil.isBlank(orderFilterRequest.getEndTime()) ? null : DateUtil.parse(orderFilterRequest.getEndTime()).toString(DatePattern.NORM_DATETIME_PATTERN))
.eq(StrUtil.isNotBlank(orderFilterRequest.getIsError()), "status", orderFilterRequest.getStatus())
.eq(StrUtil.isNotBlank(orderFilterRequest.getAction()), "action", orderFilterRequest.getAction())
.ne(StrUtil.isBlank(orderFilterRequest.getAction()), "action", "StockCheck")
@ -103,7 +105,8 @@ public class OrderService {
.eq(StrUtil.isNotBlank(orderFilterRequest.getExportStatus()), "exportStatus", orderFilterRequest.getExportStatus())
.eq(null != orderFilterRequest.getCustomerId(), "customerId", orderFilterRequest.getCustomerId())
.eq(StrUtil.isNotBlank(orderFilterRequest.getCorpOrderId()), "corpOrderId", orderFilterRequest.getCorpOrderId())
.eq(null != orderFilterRequest.getReceiveStatus(), "receiveStatus", orderFilterRequest.getReceiveStatus());
.eq(null != orderFilterRequest.getReceiveStatus(), "receiveStatus", orderFilterRequest.getReceiveStatus())
.ne(null == orderFilterRequest.getReceiveStatus() && ConstantStatus.ORDER_STATUS_SUCCESS.equals(orderFilterRequest.getStatus()), "receiveStatus", ConstantStatus.RECEIVE_UN);
return wrapper;
}

@ -167,7 +167,7 @@ public class WarehouseService {
//查询单据详情
FilterOrderDetailRequest filterOrderDetailRequest = new FilterOrderDetailRequest();
filterOrderDetailRequest.setOrderIdFk(order.getOrderId());
filterOrderDetailRequest.setUuidFk(invProductEntity.getRelIdFk());
filterOrderDetailRequest.setRelId(invProductEntity.getRelIdFk());
filterOrderDetailRequest.setLotno(warehouseMdEntity.getBatchNo());
List<OrderDetailEntity> erpOrderEntities = orderDetailService.filterOrderDetails(filterOrderDetailRequest);
if (CollUtil.isNotEmpty(erpOrderEntities)) {

@ -199,6 +199,7 @@ public class TransInoutService {
List<WarehousetempEntity> warehousetempList = postOrder.getCodes();
if (warehousetempList != null && warehousetempList.size() > 0) {
WarehousetempEntity warehousetempEntity = warehousetempList.get(0);
warehousetempEntity.setNameCode(warehousetempEntity.getUdi()); //拷贝nameCode参数值
BussinessTypeEntity bussinessTypeEntity = bussinessTypeService.findBTByAction(postOrder.getBillType(), String.valueOf(customerId));
String orderId = gennerOrderUtils.createScOrderNo(new OrderNoTypeBean(Constant.SCAN_ORDER + StrUtil.trimToEmpty(bussinessTypeEntity.getPrefix()), "yyyyMMdd"));
OrderEntity orderSaveRequest = new OrderEntity();

@ -246,21 +246,21 @@ public class InoutUtils {
}
List<OrderDetailEntity> erpOrderEntities = new ArrayList<>();
for (UdiInfoEntity erpDetailCodeEntity : returnOrderDetail) {
for (UdiInfoEntity udiInfoEntity : returnOrderDetail) {
OrderDetailEntity orderDetailEntity = new OrderDetailEntity();
orderDetailEntity.setNameCode(erpDetailCodeEntity.getNameCode());
orderDetailEntity.setPackRatio(erpDetailCodeEntity.getPackRatio());
orderDetailEntity.setProductName(erpDetailCodeEntity.getCpmctymc());
orderDetailEntity.setBatchNo(erpDetailCodeEntity.getBatchNo());
orderDetailEntity.setProduceDate(erpDetailCodeEntity.getProduceDate());
orderDetailEntity.setExpireDate(erpDetailCodeEntity.getExpireDate());
orderDetailEntity.setCount(erpDetailCodeEntity.getCount());
orderDetailEntity.setNameCode(udiInfoEntity.getNameCode());
orderDetailEntity.setPackRatio(udiInfoEntity.getPackRatio());
orderDetailEntity.setProductName(udiInfoEntity.getCpmctymc());
orderDetailEntity.setBatchNo(udiInfoEntity.getBatchNo());
orderDetailEntity.setProduceDate(udiInfoEntity.getProduceDate());
orderDetailEntity.setExpireDate(udiInfoEntity.getExpireDate());
orderDetailEntity.setCount(udiInfoEntity.getCount());
orderDetailEntity.setOrderIdFk(warehouseEntityList.get(0).getOrderId());
orderDetailEntity.setProductCompany(erpDetailCodeEntity.getYlqxzcrbarmc());
orderDetailEntity.setZczbhhzbapzbh(erpDetailCodeEntity.getZczbhhzbapzbh());
orderDetailEntity.setUuidFk(orderDetailEntity.getUuidFk());
orderDetailEntity.setRelId(String.valueOf(erpDetailCodeEntity.getId()));
orderDetailEntity.setGgxh(erpDetailCodeEntity.getGgxh());
orderDetailEntity.setProductCompany(udiInfoEntity.getYlqxzcrbarmc());
orderDetailEntity.setZczbhhzbapzbh(udiInfoEntity.getZczbhhzbapzbh());
orderDetailEntity.setUuidFk(udiInfoEntity.getUuid());
orderDetailEntity.setRelId(String.valueOf(udiInfoEntity.getId()));
orderDetailEntity.setGgxh(udiInfoEntity.getGgxh());
erpOrderEntities.add(orderDetailEntity);
}
if (CollUtil.isNotEmpty(erpOrderEntities)) {

Loading…
Cancel
Save