单据bug修改

dev
郑明梁 2 years ago
parent 49f578d505
commit 3b0d22d0e0

@ -1039,7 +1039,7 @@ public class IoCodeTempController extends BaseController {
} else if (bussinessTypeEntity.getSpaceOut() == ConstantStatus.SPACE_OUT_CODE) {
//按指定货位出库
if (StrUtil.isEmpty(codeTempEntity.getWarehouseCode())) {
List<InvPlaceDetailResponse> invProductDetailEntities = invProductDetailService.findByGroupCode(codeTempEntity.getInvCode(), codeTempEntity.getCode());
List<InvPlaceDetailResponse> invProductDetailEntities = invProductDetailService.findByGroupCode(codeTempEntity.getInvCode(), codeTempEntity.getCode(),true);
if (CollUtil.isNotEmpty(invProductDetailEntities) && invProductDetailEntities.size() > 1) {
BaseResponse baseResponse = ResultVOUtils.error(511, "存在多个货位,请指定当前货位!");
baseResponse.setData(invProductDetailEntities);
@ -1061,9 +1061,16 @@ public class IoCodeTempController extends BaseController {
return ResultVOUtils.error(500, "当前库存不足");
} else {
//查询此单据已扫描的条码数量
int exitCount = IntUtil.value(codeTempService.selectExitCount(codeTempEntity.getOrderId(), codeTempEntity.getBatchNo(), codeTempEntity.getRelId(), codeTempEntity.getSupId()));
if ((codeTempEntity.getMyReCount() + exitCount) > count) {
return ResultVOUtils.error(500, "当前库存不足");
if (bussinessTypeEntity.getSpaceOut() == ConstantStatus.SPACE_OUT_CODE){
int exitCount = IntUtil.value(codeTempService.selectExitCount(codeTempEntity.getOrderId(), codeTempEntity.getCode()));
if ((codeTempEntity.getMyReCount() + exitCount) > count) {
return ResultVOUtils.error(500, "当前库存不足");
}
}else{
int exitCount = IntUtil.value(codeTempService.selectExitCount(codeTempEntity.getOrderId(), codeTempEntity.getBatchNo(), codeTempEntity.getRelId(), codeTempEntity.getSupId()));
if ((codeTempEntity.getMyReCount() + exitCount) > count) {
return ResultVOUtils.error(500, "当前库存不足");
}
}
}
}

@ -102,7 +102,7 @@ public interface InvProductDetailDao extends BaseMapperPlus<InvProductDetailDao,
//用货架查询
List<InvPlaceDetailResponse> filterSpaceList(FilterInvPlaceRequest filterInvPlaceOrderRequest);
List<InvPlaceDetailResponse> findByGroupCode(@Param("invCode") String invCode, @Param("code") String code);
List<InvPlaceDetailResponse> findByGroupCode(@Param("invCode") String invCode, @Param("code") String code,@Param("isCheckSpace") Boolean isCheckSpace);
}

@ -46,5 +46,7 @@ public interface IoCodeTempService {
Integer selectExitCount(String orderId, String bacthNo, Long relId, String supId);
Integer selectExitCount(String orderId, String code);
Boolean checkTempCode(IoCodeTempEntity ioCodeTempEntity);
}

@ -113,6 +113,14 @@ public class IoCodeTempServiceImpl implements IoCodeTempService {
return ioCodeTempDao.selectExitCount(filterCodeRequest);
}
@Override
public Integer selectExitCount(String orderId, String code) {
FilterCodeRequest filterCodeRequest = new FilterCodeRequest();
filterCodeRequest.setOrderId(orderId);
filterCodeRequest.setCode(code);
return ioCodeTempDao.selectExitCount(filterCodeRequest);
}
@Override
public Boolean checkTempCode(IoCodeTempEntity ioCodeTempEntity) {

@ -54,7 +54,7 @@ public interface InvProductDetailService {
int vailStockCountByCode(String deptCode, String invCode, String invSpaceCode, String code);
List<InvPlaceDetailResponse> findByGroupCode(String invCode, String code);
List<InvPlaceDetailResponse> findByGroupCode(String invCode, String code , Boolean isCheckSpace);
}

@ -221,10 +221,10 @@ public class InvProductDetailServiceImpl implements InvProductDetailService {
}
@Override
public List<InvPlaceDetailResponse> findByGroupCode(String invCode, String code) {
public List<InvPlaceDetailResponse> findByGroupCode(String invCode, String code,Boolean isCheckSpace) {
if (StrUtil.isNotEmpty(invCode) && StrUtil.isNotEmpty(code)) {
List<InvPlaceDetailResponse> datas =
invProductDetailDao.findByGroupCode(invCode, code);
invProductDetailDao.findByGroupCode(invCode, code,isCheckSpace);
return datas;
}

@ -28,7 +28,10 @@
from io_code_temp
<where>
<if test="relId != null and relId != ''">
relId = #{relId}
AND relId = #{relId}
</if>
<if test="code != null and code != ''">
AND code = #{code}
</if>
<if test="batchNo != null and batchNo != ''">
AND batchNo = #{batchNo}

@ -252,6 +252,9 @@
<if test="code != null and code != ''">
AND pd.code = #{code}
</if>
<if test="isCheckSpace != null and isCheckSpace == true ">
AND (pd.invSpaceCode is not null or pd.invSpaceCode !='')
</if>
</where>
group by pd.invSpaceCode
</select>

Loading…
Cancel
Save