诏安接口修改(生产企业、供应商编码上传),东山接口修改

dev
anthonywj 1 year ago
parent 5c78d40d19
commit 939f8f2c04

@ -39,6 +39,7 @@ import com.glxp.mipsdl.entity.ctqyy.PriceClassEntity;
import com.glxp.mipsdl.entity.ctqyy.ThrHslbEntity;
import com.glxp.mipsdl.entity.inout.*;
import com.glxp.mipsdl.entity.system.SysParamConfigEntity;
import com.glxp.mipsdl.entity.thrsys.ThrCorpEntity;
import com.glxp.mipsdl.entity.thrsys.ThrInvWarehouseEntity;
import com.glxp.mipsdl.entity.thrsys.ThrProductsEntity;
import com.glxp.mipsdl.entity.thrsys.ThrSystemBusApiEntity;
@ -553,7 +554,7 @@ public class CtqyyClient extends CommonHttpClient {
//查询业务单据详情
List<IoOrderDetailBizEntity> detailBizEntities = orderDetailBizDao.selectList(new QueryWrapper<IoOrderDetailBizEntity>().eq("orderIdFk", orderEntity.getBillNo()));
setOrderDetailList(ioCodeEntities, items, detailBizEntities);
zaxzyyOrderRequest.setItems(items);
zaxzyyOrderRequest.setItem(items);
if (CollUtil.isEmpty(items)) {
log.error("\"产品信息对照异常,无法上传\"");
return ResultVOUtils.error(500, "产品信息对照异常,无法上传");
@ -601,7 +602,7 @@ public class CtqyyClient extends CommonHttpClient {
int index = 1;
if (splitMap.size() > 1) {
for (List<UdiwmsOrderDetailRequest> splitItems : splitMap.values()) {
zaxzyyOrderRequest.setItems(splitItems);
zaxzyyOrderRequest.setItem(splitItems);
zaZyRequest.setMsgHeader(getMsgHeader("saveMasterialInput"));
zaZyRequest.setMsgBody(JSONUtil.toJsonStr(zaxzyyOrderRequest));
orderEntity.setBillNo(orderEntity.getBillNo() + "-" + index);
@ -809,7 +810,11 @@ public class CtqyyClient extends CommonHttpClient {
item.setManufactory(basicProducts.getManufactory()); //生产厂家
item.setMeasname(basicProducts.getMeasname()); //计量单位
item.setAllowNoBatch(IntUtil.value(basicProducts.getAllowNoBatch())); //是否允许无批次号
// item.setManufactoryCode(thrProductsEntity.getManufactoryCode());
if (StrUtil.isNotEmpty(item.getManufactory())) {
ThrCorpEntity thrCorpEntity = thrCorpService.getThrCorpByName(item.getManufactory());
if (thrCorpEntity != null)
item.setManufactoryCode(thrCorpEntity.getUnitId());
}
item.setSupCode(thrProductsEntity.getSupCode());
item.setCplb(thrProductsEntity.getFlbm());
item.setHslb(thrProductsEntity.getCplb());
@ -925,13 +930,17 @@ public class CtqyyClient extends CommonHttpClient {
udiwmsPreInOrderRequest.setActor(authUser.getEmployeeName());
}
List<UdiwmsPreInOrderRequest.ItemDTO> itemDTOS = new ArrayList<>();
if (CollUtil.isNotEmpty(udiwmsOrderRequest.getItems())) {
for (UdiwmsOrderDetailRequest udiwmsOrderDetail : udiwmsOrderRequest.getItems()) {
if (CollUtil.isNotEmpty(udiwmsOrderRequest.getItem())) {
for (UdiwmsOrderDetailRequest udiwmsOrderDetail : udiwmsOrderRequest.getItem()) {
if (CollUtil.isNotEmpty(udiwmsOrderDetail.getCodeList())) {
for (UdiwmsOrderDetailRequest.CodeDetailEntity codeDetaiEntity : udiwmsOrderDetail.getCodeList()) {
UdiwmsPreInOrderRequest.ItemDTO itemDTO = new UdiwmsPreInOrderRequest.ItemDTO();
BeanUtils.copyProperties(udiwmsOrderDetail, itemDTO);
if (StrUtil.isNotEmpty(itemDTO.getManufactory())) {
ThrCorpEntity thrCorpEntity = thrCorpService.getThrCorpByName(itemDTO.getManufactory());
if (thrCorpEntity != null)
itemDTO.setManufactoryCode(thrCorpEntity.getUnitId());
}
String code = codeDetaiEntity.getCode();
if (code.contains("\u001D")) {
code = code.replace("\u001D", "zysoft");

@ -296,8 +296,8 @@ public class DsxyyClient extends CommonHttpClient {
UdiwmsOrderDetailRequest item = new UdiwmsOrderDetailRequest();
BeanUtil.copyProperties(detailBizEntity, item);
item.setProductDate(DateUtil.formatExpireTime(StrUtil.isBlank(detailBizEntity.getProductDate()) ? "19990101" : "20" + detailBizEntity.getProductDate()));
item.setExpireDate(DateUtil.formatExpireTime(StrUtil.isBlank(detailBizEntity.getExpireDate()) ? "20991231" : "20" + detailBizEntity.getExpireDate()));
item.setProductDate(StrUtil.isBlank(detailBizEntity.getProductDate()) ? "19990101" : "20" + detailBizEntity.getProductDate());
item.setExpireDate(StrUtil.isBlank(detailBizEntity.getExpireDate()) ? "20991231" : "20" + detailBizEntity.getExpireDate());
String thirdProductId = (String) ReflectUtil.getFieldValue(basicUdirel, thirdSysConfig.getThirdId());
item.setProductId(thirdProductId); //产品ID

@ -403,26 +403,25 @@ public class ZaxyyClient extends CommonHttpClient {
}
public String getUserName(IoOrderEntity orderEntity) {
AuthUserEntity authUserEntity = null;
//创建人非供应商
if (StrUtil.isNotEmpty(orderEntity.getCheckUser())) {
AuthUserEntity authUserEntity = authUserDao.selectById(orderEntity.getCheckUser());
return authUserEntity.getUserName();
authUserEntity = authUserDao.selectById(orderEntity.getCheckUser());
} else if (StrUtil.isNotEmpty(orderEntity.getReviewUser())) {
AuthUserEntity authUserEntity = authUserDao.selectById(orderEntity.getReviewUser());
return authUserEntity.getUserName();
authUserEntity = authUserDao.selectById(orderEntity.getReviewUser());
} else if (StrUtil.isNotEmpty(orderEntity.getCreateUser()) && orderEntity.getCreateUser().length() != 14) {
AuthUserEntity authUserEntity = authUserDao.selectById(orderEntity.getCreateUser());
return authUserEntity.getUserName();
authUserEntity = authUserDao.selectById(orderEntity.getCreateUser());
} else if (StrUtil.isNotEmpty(orderEntity.getUpdateUser()) && orderEntity.getUpdateUser().length() != 14) {
AuthUserEntity authUserEntity = authUserDao.selectById(orderEntity.getUpdateUser());
return authUserEntity.getUserName();
authUserEntity = authUserDao.selectById(orderEntity.getUpdateUser());
} else {
List<AuthWarehouseUser> authWarehouseUsers = authWarehouseUserMapper.selectList(new QueryWrapper<AuthWarehouseUser>().eq("code", orderEntity.getInvCode()));
if (CollUtil.isNotEmpty(authWarehouseUsers)) {
return authWarehouseUsers.get(0).getUserName();
}
}
if (authUserEntity != null)
return authUserEntity.getUserName();
return null;
}
@ -672,5 +671,4 @@ public class ZaxyyClient extends CommonHttpClient {
}
}

@ -40,5 +40,7 @@ public class UdiwmsPreInOrderRequest {
private String firstSalesInvNo;
private String remark;
private String nameCode;
private String manufactory;
private String manufactoryCode;
}
}

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.glxp.mipsdl.config.ThirdSysConfig;
import com.glxp.mipsdl.dao.basic.BasicCorpDao;
import com.glxp.mipsdl.dao.thrsys.ThrCorpDao;
import com.glxp.mipsdl.entity.basic.BasicCorpEntity;
import com.glxp.mipsdl.entity.thrsys.ThrCorpEntity;
import lombok.extern.slf4j.Slf4j;
@ -24,6 +25,8 @@ public class ThrCorpService {
private ThirdSysConfig thirdSysConfig;
@Resource
private BasicCorpDao basicCorpDao;
@Resource
ThrCorpDao thrCorpDao;
/**
*
@ -53,4 +56,12 @@ public class ThrCorpService {
}
public ThrCorpEntity getThrCorpByName(String corpName) {
if (StrUtil.isEmpty(corpName))
return null;
ThrCorpEntity thrCorpEntity = thrCorpDao.selectOne(new QueryWrapper<ThrCorpEntity>().like("name", corpName).last("limit 1"));
return thrCorpEntity;
}
}

Loading…
Cancel
Save