1.补充盘点转单代码

master
x_z 2 years ago
parent 04cd602d73
commit c2c18bb715

@ -66,7 +66,7 @@ public class InvCountOrderDetailController {
*/
@PostMapping("/inv/count/order/detail/addCountOrderDetail")
public BaseResponse addCountOrderDetail(@RequestBody InvCountOrderDetailEntity invCountOrderDetail) {
if (null == invCountOrderDetail || StrUtil.isBlank(invCountOrderDetail.getOrderIdFk()) || StrUtil.isBlank(invCountOrderDetail.getRelId())) {
if (null == invCountOrderDetail || StrUtil.isBlank(invCountOrderDetail.getOrderIdFk()) || null == invCountOrderDetail.getRelId()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
return invCountOrderDetailService.addCountOrderDetail(invCountOrderDetail);

@ -45,4 +45,12 @@ public interface BasicCorpDao {
* @return
*/
List<BasicCorpEntity> selectByNameAndCreditNo(@Param("name") String name, @Param("creditNo") String creditNo);
/**
* erpId
*
* @param erpId
* @return
*/
BasicCorpEntity selectByErpId(@Param("erpId") String erpId);
}

@ -35,4 +35,12 @@ public interface UdiRlSupDao extends BaseMapperPlus<UdiRlSupDao, UdiRlSupEntity,
boolean deleteById(String id);
boolean deleteByRlId(String id);
/**
* IDID
*
* @param relId
* @return
*/
List<String> selectUnitFkByRelId(@Param("relId") Long relId);
}

@ -50,7 +50,7 @@ public interface InvCountOrderDetailDao extends BaseMapper<InvCountOrderDetailEn
* @param orderIdFk
* @param productId
*/
void deleteByOrderIdAndProductId(@Param("orderIdFk") String orderIdFk, @Param("productId") String productId);
void deleteByOrderIdAndProductId(@Param("orderIdFk") String orderIdFk, @Param("productId") Long productId);
/**
* DI

@ -46,5 +46,5 @@ public interface InvProductDao extends BaseMapperPlus<InvProductDao, InvProductE
* @param invSpaceCode
* @return
*/
InvProductEntity selectProductInfo(@Param("relId") String relId, @Param("batchNo") String batchNo, @Param("deptCode") String deptCode, @Param("invCode") String invCode, @Param("invSpaceCode") String invSpaceCode);
InvProductEntity selectProductInfo(@Param("relId") Long relId, @Param("batchNo") String batchNo, @Param("deptCode") String deptCode, @Param("invCode") String invCode, @Param("invSpaceCode") String invSpaceCode);
}

@ -53,4 +53,13 @@ public interface InvProductDetailDao extends BaseMapperPlus<InvProductDetailDao,
* @return
*/
InvProductDetailEntity selectByInvAndCode(BindInvSpaceRequest bindInvSpaceRequest);
/**
* ID
*
* @param code
* @return
*/
List<String> selectSupIdByCode(@Param("code") String code);
}

@ -40,7 +40,7 @@ public class BasicBusTypeChangeEntity {
private String targetAction;
/**
* 1:2.3.
* 1:2.3. 4.
*/
@TableField(value = "`type`")
private Integer type;

@ -29,7 +29,7 @@ public class InvCountCodesEntity {
* ID
*/
@TableField(value = "relId")
private String relId;
private Long relId;
/**
*

@ -29,7 +29,7 @@ public class InvCountOrderDetailEntity {
* ID
*/
@TableField(value = "relId")
private String relId;
private Long relId;
/**
* DI

@ -21,7 +21,7 @@ public class InvCountOrderDetailResponse {
/**
* ID
*/
private String relId;
private Long relId;
/**
* DI

@ -1,16 +1,21 @@
package com.glxp.api.service.inv.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.thread.ThreadUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.constant.Constant;
import com.glxp.api.constant.ConstantStatus;
import com.glxp.api.constant.ConstantType;
import com.glxp.api.dao.basic.BasicBusTypeChangeDao;
import com.glxp.api.dao.basic.BasicBussinessTypeDao;
import com.glxp.api.dao.basic.BasicCorpDao;
import com.glxp.api.dao.basic.UdiRlSupDao;
import com.glxp.api.dao.inout.IoCodeDao;
import com.glxp.api.dao.inout.IoCodeTempDao;
import com.glxp.api.dao.inout.IoOrderDao;
@ -19,26 +24,36 @@ import com.glxp.api.dao.inv.InvCountOrderDao;
import com.glxp.api.dao.inv.InvCountOrderDetailDao;
import com.glxp.api.dao.inv.InvProductDetailDao;
import com.glxp.api.entity.auth.AuthAdmin;
import com.glxp.api.entity.basic.BasicBusTypeChangeEntity;
import com.glxp.api.entity.basic.BasicBussinessTypeEntity;
import com.glxp.api.entity.basic.UdiEntity;
import com.glxp.api.entity.inout.IoCodeTempEntity;
import com.glxp.api.entity.inout.IoOrderEntity;
import com.glxp.api.entity.inv.InvCountCodesEntity;
import com.glxp.api.entity.inv.InvCountOrderDetailEntity;
import com.glxp.api.entity.inv.InvCountOrderEntity;
import com.glxp.api.req.inv.AddInvCountOrderSaveRequest;
import com.glxp.api.req.inv.FilterInvCountOrderRequest;
import com.glxp.api.entity.inv.InvProductDetailEntity;
import com.glxp.api.req.inv.*;
import com.glxp.api.res.inv.InvCountOrderResponse;
import com.glxp.api.service.auth.CustomerService;
import com.glxp.api.service.basic.CompanyProductsRelService;
import com.glxp.api.service.inv.InvCountCodesService;
import com.glxp.api.service.inv.InvCountOrderService;
import com.glxp.api.util.CustomUtil;
import com.glxp.api.util.DateUtil;
import com.glxp.api.util.GennerOrderUtils;
import com.glxp.api.util.OrderNoTypeBean;
import com.glxp.api.util.udi.FilterUdiUtils;
import com.glxp.api.util.udi.UdiCalCountUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
@Slf4j
@Service
@ -72,7 +87,9 @@ public class InvCountOrderServiceImpl implements InvCountOrderService {
@Resource
private IoCodeDao codesDao;
@Resource
private CompanyProductsRelService companyProductsRelService;
private UdiRlSupDao udiRlSupDao;
@Resource
private UdiCalCountUtil udiCalCountUtil;
@Override
public List<InvCountOrderResponse> filterList(FilterInvCountOrderRequest filterInvCountOrderRequest) {
@ -101,15 +118,14 @@ public class InvCountOrderServiceImpl implements InvCountOrderService {
@Override
public BaseResponse saveCountOrder(InvCountOrderEntity invCountOrder) {
//TODO 确认一下盘点单据的部门是由前端选入还是后端获取
if (invCountOrder.getCountType() == 0 || invCountOrder.getCountType() == 2) {
//整库盘点
if (StrUtil.isBlank(invCountOrder.getInvCode())) {
if (StrUtil.isNotBlank(invCountOrder.getDeptCode()) || StrUtil.isBlank(invCountOrder.getInvCode())) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, "请选择仓库信息!");
}
} else if (invCountOrder.getCountType() == 1) {
//货位盘点
if (StrUtil.isBlank(invCountOrder.getInvCode()) || StrUtil.isBlank(invCountOrder.getInvCode()) || StrUtil.isBlank(invCountOrder.getInvSpaceCode())) {
if (StrUtil.isBlank(invCountOrder.getDeptCode()) || StrUtil.isBlank(invCountOrder.getInvCode()) || StrUtil.isBlank(invCountOrder.getInvSpaceCode())) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, "请选择仓库和货位信息!");
}
}
@ -183,6 +199,26 @@ public class InvCountOrderServiceImpl implements InvCountOrderService {
return ResultVOUtils.success();
}
@Override
public BaseResponse saveCountOrderForPDA(AddInvCountOrderSaveRequest addInvCountOrderSaveRequest) {
InvCountOrderEntity invCountOrder = invCountOrderDao.selectByOrderId(addInvCountOrderSaveRequest.getOrderId());
if (null == invCountOrder) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, "此单据不存在");
}
if (invCountOrder.getStatus() != 0) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, "此单据不可编辑");
}
//解析条码,修改单据详情,修改单据状态为待审核
invCountOrder.setStatus(1);
invCountOrder.setUpdateTime(new Date());
List<InvCountCodesEntity> countCodeList = addInvCountOrderSaveRequest.getCountCodeList();
for (InvCountCodesEntity invCountCodes : countCodeList) {
invCountCodesService.addCode(invCountCodes);
}
submitAudit(invCountOrder.getId().toString());
return ResultVOUtils.success();
}
@Override
public BaseResponse updateCountOrderStatus(String id, Integer status) {
InvCountOrderEntity invCountOrder = invCountOrderDao.selectById(Integer.valueOf(id));
@ -206,28 +242,318 @@ public class InvCountOrderServiceImpl implements InvCountOrderService {
return ResultVOUtils.success();
}
//TODO 盘点单据转单逻辑,待完善
/**
*
*
* @param invCountOrder
*/
private void countOrderTransfer(InvCountOrderEntity invCountOrder) {
//查询单据生成设置,是否已经配置对应单据类型,若未配置则结束转单流程
List<BasicBussinessTypeEntity> transferOrderSettings = getOrderSettings();
if (CollUtil.isEmpty(transferOrderSettings)) {
log.error("未配置盘点转单设置,无法转单!");
return;
}
/**
*
* 1
* 2 / =
* 3
*
* 1
* 2 / =
* 3
*/
//获取出入库码明细
List<IoCodeTempEntity> inCodes = getOrderCodes(invCountOrder, "in");
List<IoCodeTempEntity> outCodes = getOrderCodes(invCountOrder, "out");
//生成盘盈/盘亏单据
createNewOrder(invCountOrder, inCodes, outCodes, transferOrderSettings);
log.info("盘点转单完成");
}
@Override
public BaseResponse saveCountOrderForPDA(AddInvCountOrderSaveRequest addInvCountOrderSaveRequest) {
InvCountOrderEntity invCountOrder = invCountOrderDao.selectByOrderId(addInvCountOrderSaveRequest.getOrderId());
if (null == invCountOrder) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, "此单据不存在");
/**
* /
*
* @param invCountOrder
* @param inCodes
* @param outCodes
* @param transferOrderSettings
*/
private void createNewOrder(InvCountOrderEntity invCountOrder, List<IoCodeTempEntity> inCodes, List<IoCodeTempEntity> outCodes, List<BasicBussinessTypeEntity> transferOrderSettings) {
BasicBussinessTypeEntity inBusType = new BasicBussinessTypeEntity();
BasicBussinessTypeEntity outBusType = new BasicBussinessTypeEntity();
for (BasicBussinessTypeEntity basicBussinessTypeEntity : transferOrderSettings) {
if (basicBussinessTypeEntity.getMainAction().equals(ConstantType.TYPE_PUT)) {
inBusType = basicBussinessTypeEntity;
} else if (basicBussinessTypeEntity.getMainAction().equals(ConstantType.TYPE_OUT)) {
outBusType = basicBussinessTypeEntity;
}
}
if (invCountOrder.getStatus() != 0) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, "此单据不可编辑");
log.info("开始生成盘盈单据");
//开始生成盘盈单据
String inOrderId = buildOrder(invCountOrder, inCodes, inBusType);
invCountOrder.setInOrderIds(inOrderId);
log.info("盘盈单据生成成功");
//开始生成盘亏单据
log.info("开始生成盘亏单据");
String outOrderId = buildOrder(invCountOrder, outCodes, outBusType);
invCountOrder.setOrderId(outOrderId);
log.info("盘亏单据生成成功");
//更新盘点单据的出入库单据信息
invCountOrderDao.updateById(invCountOrder);
}
/**
*
*
* @param invCountOrder
* @param codeTempList
* @param inBusType
*/
private String buildOrder(InvCountOrderEntity invCountOrder, List<IoCodeTempEntity> codeTempList, BasicBussinessTypeEntity inBusType) {
if (CollUtil.isNotEmpty(codeTempList)) {
//构造单据数据
IoOrderEntity order = new IoOrderEntity();
order.setMainAction(inBusType.getMainAction());
order.setAction(inBusType.getAction());
Date date = new Date();
order.setCreateTime(date);
order.setUpdateTime(date);
order.setDeptCode(invCountOrder.getDeptCode());
order.setInvCode(invCountOrder.getInvCode());
//查询单据往来单位信息
order.setFromCorp(inBusType.getDefaultUnit());
order.setFromType(ConstantStatus.FROM_COUNT);
order.setCorpOrderId(CustomUtil.getId() + "x");
//设置为草稿状态
order.setStatus(1);
order.setDealStatus(1);
//生成单据号
String orderNo = gennerOrderUtils.createScOrderNo(new OrderNoTypeBean(Constant.SCAN_ORDER + StrUtil.trim(inBusType.getPrefix()), "yyyyMMdd"));
order.setBillNo(orderNo);
//对条码统一设置创建时间,单号等信息
codeTempList.forEach(codeTemp -> {
codeTemp.setCreateTime(date);
codeTemp.setOrderId(orderNo);
codeTemp.setAction(order.getAction());
codeTemp.setCorpOrderId(order.getCorpOrderId());
});
orderDao.insert(order);
codesTempDao.insertBatch(codeTempList);
return orderNo;
}
//解析条码,修改单据详情,修改单据状态为待审核
invCountOrder.setStatus(1);
invCountOrder.setUpdateTime(new Date());
List<InvCountCodesEntity> countCodeList = addInvCountOrderSaveRequest.getCountCodeList();
for (InvCountCodesEntity invCountCodes : countCodeList) {
invCountCodesService.addCode(invCountCodes);
return null;
}
/**
*
*
* @param invCountOrder
* @param type in/out
* @return
*/
private List<IoCodeTempEntity> getOrderCodes(InvCountOrderEntity invCountOrder, String type) {
//构造库存详情查询参数
FilterInvProductDetailRequest invProductDetailRequest = new FilterInvProductDetailRequest();
invProductDetailRequest.setDeptCode(invCountOrder.getDeptCode());
invProductDetailRequest.setInvCode(invCountOrder.getInvCode());
//锁库存,查询库存更新时间早于或等于盘点单创建时间的数据
invProductDetailRequest.setUpdateTime(DateUtil.toDateStr(invCountOrder.getCreateTime(), "yyyy-MM-dd HH:mm:ss"));
//判断是否是按货位盘点的单据,如果是,则查询库存详情的参数需要添加货位
invProductDetailRequest.setInvSpaceCode(invCountOrder.getInvSpaceCode());
//查询盘点单据详情
FilterInvCountOrderDetailRequest countOrderDetailRequest = new FilterInvCountOrderDetailRequest();
countOrderDetailRequest.setOrderIdFk(invCountOrder.getOrderId());
countOrderDetailRequest.setStatus(type.equals("in") ? 1 : 0);
List<InvCountOrderDetailEntity> detailList = invCountOrderDetailDao.filterList(countOrderDetailRequest);
List<IoCodeTempEntity> codeList = new ArrayList<>();
//查找条码列表
if (type.equals("in")) {
log.info("开始生成盘盈单据码明细");
//查找盘盈条码列表
detailList.forEach(invCountOrderDetailEntity -> {
invProductDetailRequest.setRelId(String.valueOf(invCountOrderDetailEntity.getRelId()));
invProductDetailRequest.setBatchNo(invProductDetailRequest.getBatchNo());
List<InvProductDetailEntity> invProductDetailEntities = invProductDetailDao.filterInvProductDetailList(invProductDetailRequest);
//查询盘点码明细
FilterInvCountCodesRequest countCodesRequest = new FilterInvCountCodesRequest();
countCodesRequest.setOrderIdFk(invCountOrder.getOrderId());
countCodesRequest.setRelId(String.valueOf(invCountOrderDetailEntity.getRelId()));
countCodesRequest.setBatchNo(invCountOrderDetailEntity.getBatchNo());
List<String> countCodeList = invCountCodesDao.selectCodes(countCodesRequest);
List<String> invProductDetailCodes = invProductDetailEntities.stream().map(InvProductDetailEntity::getCode).collect(Collectors.toList());
List<String> profitCodes = CollUtil.subtractToList(countCodeList, invProductDetailCodes);
if (CollUtil.isNotEmpty(invProductDetailCodes) && CollUtil.isEmpty(profitCodes)) {
/**
*
*
*/
IoCodeTempEntity codeTempEntity = buildCodeTempEntity(invCountOrder, countCodeList.get(0), invCountOrderDetailEntity);
codeList.add(codeTempEntity);
} else {
for (String code : profitCodes) {
if (!verifyCodeExist(codeList, code)) {
//生成码明细
IoCodeTempEntity codeTempEntity = buildCodeTempEntity(invCountOrder, code, invCountOrderDetailEntity);
codeList.add(codeTempEntity);
}
}
}
});
log.info("盘盈单据码明细生成成功");
} else {
log.info("开始生成盘亏单据码明细");
detailList.forEach(invCountOrderDetailEntity -> {
invProductDetailRequest.setRelId(String.valueOf(invCountOrderDetailEntity.getRelId()));
invProductDetailRequest.setBatchNo(invCountOrderDetailEntity.getBatchNo());
//查询库存详情
List<InvProductDetailEntity> invProductDetailEntities = invProductDetailDao.filterInvProductDetailList(invProductDetailRequest);
//查询盘点码明细
FilterInvCountCodesRequest countCodesRequest = new FilterInvCountCodesRequest();
countCodesRequest.setOrderIdFk(invCountOrder.getOrderId());
countCodesRequest.setRelId(String.valueOf(invCountOrderDetailEntity.getRelId()));
countCodesRequest.setBatchNo(invCountOrderDetailEntity.getBatchNo());
List<String> countCodeList = invCountCodesDao.selectCodes(countCodesRequest);
List<String> invProductDetailCodes = invProductDetailEntities.stream().map(InvProductDetailEntity::getCode).collect(Collectors.toList());
List<String> lossCodes = CollUtil.subtractToList(invProductDetailCodes, countCodeList);
if (CollUtil.isNotEmpty(countCodeList) && CollUtil.isEmpty(lossCodes)) {
//盘点的码不为空,但是盘点数量和库存数量不一样,比对差集结果为空,说明是同一个条码,数量不同,直接根据盘亏数量计算生成一个扫码单据的码明细
//生成码详情
IoCodeTempEntity codeTempEntity = buildCodeTempEntity(invCountOrder, countCodeList.get(0), invCountOrderDetailEntity);
codeList.add(codeTempEntity);
} else {
for (InvProductDetailEntity invProductDetailEntity : invProductDetailEntities) {
if (!countCodeList.contains(invProductDetailEntity.getCode()) && !verifyCodeExist(codeList, invProductDetailEntity.getCode())) {
InvCountOrderDetailEntity orderDetailEntity = new InvCountOrderDetailEntity();
orderDetailEntity.setRelId(invCountOrderDetailEntity.getRelId());
orderDetailEntity.setStatus(0);
IoCodeTempEntity codeTempEntity = buildCodeTempEntity(invCountOrder, invProductDetailEntity.getCode(), orderDetailEntity);
codeList.add(codeTempEntity);
}
}
}
});
log.info("盘亏单据码名称生成成功");
}
submitAudit(invCountOrder.getId().toString());
return ResultVOUtils.success();
return codeList;
}
/**
*
*
* @param codeList
* @param code
* @return
*/
private boolean verifyCodeExist(List<IoCodeTempEntity> codeList, String code) {
for (IoCodeTempEntity codeTempEntity : codeList) {
if (codeTempEntity.getCode().equals(code)) {
return true;
}
}
return false;
}
/**
*
*
* @param invCountOrder
* @param code
* @param invCountOrderDetailEntity
* @return
*/
private IoCodeTempEntity buildCodeTempEntity(InvCountOrderEntity invCountOrder, String code, InvCountOrderDetailEntity invCountOrderDetailEntity) {
IoCodeTempEntity codeTemp = new IoCodeTempEntity();
codeTemp.setCode(code);
codeTemp.setRelId(invCountOrderDetailEntity.getRelId());
codeTemp.setMainAction(invCountOrderDetailEntity.getStatus() == 0 ? ConstantType.TYPE_OUT : ConstantType.TYPE_PUT);
codeTemp.setDeptCode(invCountOrder.getDeptCode());
codeTemp.setInvCode(invCountOrder.getInvCode());
UdiEntity udi = FilterUdiUtils.getUdi(code);
codeTemp.setBatchNo(udi.getBatchNo());
codeTemp.setNameCode(udi.getUdi());
codeTemp.setProduceDate(udi.getProduceDate());
codeTemp.setExpireDate(udi.getExpireDate());
codeTemp.setSerialNo(udi.getSerialNo());
//计算码数量
int actCount = udiCalCountUtil.getActCount(codeTemp.getNameCode());
//判断此码有无批次号和序列号
if ((StrUtil.isBlank(codeTemp.getBatchNo()) && StrUtil.isBlank(codeTemp.getSerialNo())) || (StrUtil.isBlank(codeTemp.getSerialNo()) && StrUtil.isNotBlank(codeTemp.getBatchNo()))) {
//根据盘点盈亏状态取盘点数量值
int countNum = invCountOrderDetailEntity.getStatus() == 0 ? invCountOrderDetailEntity.getLossNum() : invCountOrderDetailEntity.getProfitNum();
int codeNum = countNum / actCount;
codeTemp.setCount(codeNum);
codeTemp.setReCount(codeNum);
} else {
codeTemp.setCount(actCount);
codeTemp.setReCount(actCount);
}
//获取盘点盈亏状态值
String countStatus = invCountOrderDetailEntity.getStatus() == 0 ? "loss" : "profit";
//设置供应商信息
setSupInfo(codeTemp, countStatus);
return codeTemp;
}
/**
*
*
* @param codeTemp
* @param countStatus
*/
private void setSupInfo(IoCodeTempEntity codeTemp, String countStatus) {
/**
* 使
*
* ID
*
* 1
*/
if (countStatus.equals("loss")) {
log.info("生成盘亏单据条码供应商信息,条码信息:{}", codeTemp.getCode());
List<String> supIds = invProductDetailDao.selectSupIdByCode(codeTemp.getCode());
if (CollUtil.isNotEmpty(supIds) && supIds.size() == 1) {
//此产品在库存中存在且只绑定了一个供应商若绑定了多个供应商则不填供应商ID字段生成单据之后会进入异常单据页面由操作人员手动指定供应商
codeTemp.setSupId(supIds.get(0));
}
} else {
log.info("生成盘盈单据条码供应商详情,条码信息:{}", codeTemp.getCode());
List<String> unitFkList = udiRlSupDao.selectUnitFkByRelId(codeTemp.getRelId());
if (CollUtil.isNotEmpty(unitFkList) && unitFkList.size() == 1) {
//此产品只绑定了一个供应商若绑定了多个供应商则不填供应商ID字段生成单据之后会进入异常单据页面手动指定供应商
codeTemp.setSupId(unitFkList.get(0));
}
}
}
/**
*
*
* @return
*/
private List<BasicBussinessTypeEntity> getOrderSettings() {
//查询类型为盘点转单的配置
List<BasicBusTypeChangeEntity> list = busTypeChangeDao.selectList(new QueryWrapper<BasicBusTypeChangeEntity>().eq("type", 4));
if (CollUtil.isNotEmpty(list)) {
List<BasicBussinessTypeEntity> busTypes = new ArrayList<>(2);
for (BasicBusTypeChangeEntity basicBusTypeChangeEntity : list) {
if ("PDRK".equals(basicBusTypeChangeEntity.getOriginAction()) || "PDCK".equals(basicBusTypeChangeEntity.getOriginAction())) {
busTypes.add(bussinessTypeDao.selectOne(new QueryWrapper<BasicBussinessTypeEntity>().eq("action", basicBusTypeChangeEntity.getTargetAction())));
}
}
}
return null;
}
}

@ -304,4 +304,8 @@
</if>
</where>
</select>
<select id="selectByErpId" resultType="com.glxp.api.entity.basic.BasicCorpEntity">
select * from basic_corp where erpId = #{erpId}
</select>
</mapper>

@ -335,4 +335,8 @@
from company_product_relevance
where udiRlIdFk = #{udiRlIdFk}
</select>
<select id="selectUnitFkByRelId" resultType="java.lang.String">
select unitFk from company_product_relevance where udiRlIdFk = #{relId}
</select>
</mapper>

@ -136,4 +136,10 @@
and code = #{code}
limit 1
</select>
<select id="selectSupIdByCode" resultType="java.lang.String">
select supId
from inv_product_detail
where code = #{code}
</select>
</mapper>

Loading…
Cancel
Save