fix(pda): ignore empty identifiers when checking half-tray jobs
This commit is contained in:
@@ -85,10 +85,20 @@ public class PdaServiceImp implements PdaService {
|
||||
|
||||
@Override
|
||||
public AjaxResult halfTrayOut(TrayCodeMsg trayCodeMsg) {
|
||||
if (!"1".equals(trayCodeMsg.getExitId()) && !"2".equals(trayCodeMsg.getExitId())) {
|
||||
return AjaxResult.error("请选择有效的出库出口(出口1或出口2)。");
|
||||
}
|
||||
InStockinDetail inStockinDetail = inStockinDetailService.selectInStockinDetailByStockinDetailId(trayCodeMsg.getStockinDetailId());
|
||||
// InStockin inStockin = inStockinService.selectInStockinByStockinId(inStockinDetail.getStockinId());
|
||||
// inStockinDetail.setSpare4(inStockin.getDepartmentNo());
|
||||
if (inStockinDetail == null) {
|
||||
return AjaxResult.error("未查询到入库明细,请核对条码后重试。");
|
||||
}
|
||||
if (mapper.selectBySpare4OrCargo(inStockinDetail) > 0) {
|
||||
return AjaxResult.error("该项目或匹配编码已有半盘出库作业,请完成后再操作。");
|
||||
}
|
||||
List<BasStock> hasHalfTray = basStockMapper.selectHasHalfTray(inStockinDetail);
|
||||
if (CollUtil.isEmpty(hasHalfTray)) {
|
||||
return AjaxResult.error("未找到可出库的未满托盘,请刷新后重试。");
|
||||
}
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("v_tray_code", hasHalfTray.get(0).getTrayCode());
|
||||
map.put("v_exit_id", trayCodeMsg.getExitId());
|
||||
|
||||
@@ -298,7 +298,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
|
||||
<select id="selectBySpare4OrCargo" parameterType="InStockinDetail" resultType="java.lang.Integer">
|
||||
select count(1) from mydo_job where job_id in (select job_id from mydo_job_detail where spare4=#{spare4} or exit_id =#{cargoNo}) and in_or_out='26'
|
||||
select count(1) from mydo_job
|
||||
where in_or_out='26' and job_id in (
|
||||
select job_id from mydo_job_detail
|
||||
where 1=0
|
||||
<if test="spare4 != null and spare4.trim() != ''">
|
||||
or spare4=#{spare4}
|
||||
</if>
|
||||
<if test="cargoNo != null and cargoNo.trim() != ''">
|
||||
or exit_id=#{cargoNo}
|
||||
</if>
|
||||
)
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user