仓库逻辑改变仓库详情的逻辑都改成仓库表(第二次更新)

panjc_field_management
qyt 8 months ago
parent 4168a85ccb
commit 0fbeb2ae09

@ -9,7 +9,6 @@ import com.glxp.api.entity.basic.*;
import com.glxp.api.entity.collect.IoCollectCode;
import com.glxp.api.entity.collect.IoCollectOrder;
import com.glxp.api.entity.collect.IoCollectOrderOrigin;
import com.glxp.api.entity.inv.InvProductDetailEntity;
import com.glxp.api.exception.JsonException;
import com.glxp.api.req.collect.CollectOrderBizRequest;
import com.glxp.api.req.collect.CollectOrderRequest;
@ -19,7 +18,8 @@ import com.glxp.api.res.inout.IoOrderDetailCodeResponse;
import com.glxp.api.res.inout.VailCodeResultResponse;
import com.glxp.api.service.collect.*;
import com.glxp.api.service.inout.impl.IoCodeService;
import com.glxp.api.service.inv.impl.InvProductDetailService;
import com.glxp.api.service.inv.impl.InvProductServiceNew;
import com.glxp.api.vo.basic.InvProductNewVo;
import org.aspectj.weaver.ast.Var;
import org.springframework.beans.BeanUtils;
import cn.hutool.core.collection.CollUtil;
@ -93,7 +93,7 @@ public class IoCodeTempController extends BaseController {
@Resource
InvPreinProductDetailService invPreinProductDetailService;
@Resource
InvProductDetailService invProductDetailService;
InvProductServiceNew invProductServiceNew;
@Resource
IoCodeLostService codeLostService;
@Resource
@ -989,11 +989,11 @@ public class IoCodeTempController extends BaseController {
if (IntUtil.value(priceFifo) > 0) {
if (bussinessTypeEntity.getMainAction().equals(ConstantType.TYPE_OUT)) {
//1.获取当前批次已出库数量
Integer outCount = invProductDetailService.selectCountByInBatch(exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), bussinessTypeEntity, exitLocalEntity.getInBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_OUT);
Integer outCount = invProductServiceNew.selectCountByInBatch(exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), bussinessTypeEntity, exitLocalEntity.getInBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_OUT);
//2.获取当前批次入库数量
Integer inCount = invProductDetailService.selectCountByInBatch(exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), bussinessTypeEntity, exitLocalEntity.getInBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_PUT);
Integer inCount = invProductServiceNew.selectCountByInBatch(exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), bussinessTypeEntity, exitLocalEntity.getInBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_PUT);
if ((IntUtil.value(inCount) - IntUtil.value(outCount) - IntUtil.value(exitLocalEntity.getReCount())) < 0) {
InvProductDetailEntity nextInvProduct = invProductDetailService.selectNextInBatch(bussinessTypeEntity, exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_PUT, exitLocalEntity.getInBatchNo());
InvProductNewVo nextInvProduct = invProductServiceNew.selectNextInBatch(bussinessTypeEntity, exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_PUT, exitLocalEntity.getInBatchNo());
if (nextInvProduct != null) {
genDetaiEntity.setPrice(nextInvProduct.getPrice());
genDetaiEntity.setInBatchNo(nextInvProduct.getInBatchNo());
@ -1462,11 +1462,11 @@ public class IoCodeTempController extends BaseController {
if (IntUtil.value(priceFifo) > 0) {
if (bussinessTypeEntity.getMainAction().equals(ConstantType.TYPE_OUT)) {
//1.获取当前批次已出库数量
Integer outCount = invProductDetailService.selectCountByInBatch(exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), bussinessTypeEntity, exitLocalEntity.getInBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_OUT);
Integer outCount = invProductServiceNew.selectCountByInBatch(exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), bussinessTypeEntity, exitLocalEntity.getInBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_OUT);
//2.获取当前批次入库数量
Integer inCount = invProductDetailService.selectCountByInBatch(exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), bussinessTypeEntity, exitLocalEntity.getInBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_PUT);
Integer inCount = invProductServiceNew.selectCountByInBatch(exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), bussinessTypeEntity, exitLocalEntity.getInBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_PUT);
if ((IntUtil.value(inCount) - IntUtil.value(outCount) - IntUtil.value(exitLocalEntity.getReCount())) < 0) {
InvProductDetailEntity nextInvProduct = invProductDetailService.selectNextInBatch(bussinessTypeEntity, exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_PUT, exitLocalEntity.getInBatchNo());
InvProductNewVo nextInvProduct = invProductServiceNew.selectNextInBatch(bussinessTypeEntity, exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_PUT, exitLocalEntity.getInBatchNo());
if (nextInvProduct != null) {
genDetaiEntity.setPrice(nextInvProduct.getPrice());
genDetaiEntity.setInBatchNo(nextInvProduct.getInBatchNo());

@ -50,6 +50,7 @@ public class UdiTraceController {
InvProductServiceNew invProductServiceNew;
@Resource
IoCodeDao ioCodeDao;
//TODO 20241017 先把这个接口注释了
@AuthRuleAnnotation("")
@GetMapping("udiwarehouse/trace/filter")
@ -201,7 +202,9 @@ public class UdiTraceController {
filterCodeRequest.setCode(filterCodeTraceRequest.getCode());
filterCodeRequest.setSupId(filterCodeTraceRequest.getSupId());
List<IoCodeEntity> invProductDetailEntities = ioCodeDao.selectList(new QueryWrapper<IoCodeEntity>().likeRight("code", filterCodeTraceRequest.getCode()).eq("supId",filterCodeRequest.getSupId()));
List<IoCodeEntity> invProductDetailEntities = ioCodeDao.selectList(new QueryWrapper<IoCodeEntity>()
.likeRight("code", filterCodeTraceRequest.getCode())
.eq(StrUtil.isNotEmpty(filterCodeRequest.getSupId()), "supId", filterCodeRequest.getSupId()));
// List<IoCodeEntity> invProductDetailEntities = invProductServiceNew.filterInvProductDetailList(filterCodeRequest);
if (CollUtil.isNotEmpty(invProductDetailEntities)) {
mInvProductDetailEntities.addAll(invProductDetailEntities);

Loading…
Cancel
Save