2026.4.28 午 14:04
立库出库信息查询校验
This commit is contained in:
@@ -8,6 +8,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.in.stockindetail.domain.InStockinDetail;
|
||||
import com.ruoyi.in.stockindetail.service.IInStockinDetailService;
|
||||
import com.ruoyi.job.mydojobdetail.domain.MydoJobDetail;
|
||||
import com.ruoyi.pda.domain.TrayCodeMakeSure;
|
||||
import com.ruoyi.pda.domain.TrayCodeMsg;
|
||||
import com.ruoyi.pda.service.PdaService;
|
||||
@@ -201,6 +202,27 @@ public class PdaController extends BaseController {
|
||||
return AjaxResult.success(pdaService.selectBasStockHc(trayCodeMakeSure.getTrayCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 立库出库信息校验
|
||||
* @param trayCodeMakeSure
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/verifyMaterial")
|
||||
@ResponseBody
|
||||
public AjaxResult verifyMaterial(@RequestBody TrayCodeMakeSure trayCodeMakeSure) {
|
||||
String trayCode = trayCodeMakeSure.getTrayCode();
|
||||
List<MydoJobDetail> mydoJobDetailList = trayCodeMakeSure.getMydoJobDetailList();
|
||||
for (MydoJobDetail m : mydoJobDetailList ) {
|
||||
Integer count = pdaService.selectByTrayCodeAndProduct(trayCode, m.getProductId());
|
||||
if (count == 0) {
|
||||
return AjaxResult.error(m.getProductId() + ",物料不是出库wuliao");
|
||||
}
|
||||
}
|
||||
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.ruoyi.pda.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public interface PdaMapper {
|
||||
@@ -42,4 +44,6 @@ public interface PdaMapper {
|
||||
void hcoutMakesure(HashMap<String, Object> map);
|
||||
|
||||
void completeInPk(HashMap<String, Object> map);
|
||||
|
||||
Integer selectByTrayCodeAndProduct(@Param("trayCode") String trayCode, @Param("productId") String productId);
|
||||
}
|
||||
|
||||
@@ -61,4 +61,6 @@ public interface PdaService {
|
||||
AjaxResult completeInPk(TrayCodeMakeSure trayCodeMakeSure);
|
||||
|
||||
AjaxResult selectBasStockHc(String trayCode);
|
||||
|
||||
Integer selectByTrayCodeAndProduct(String trayCode, String productId);
|
||||
}
|
||||
|
||||
@@ -326,4 +326,9 @@ public class PdaServiceImp implements PdaService {
|
||||
List<BasStock> stocks=basStockMapper.selectBasStockListHc(basStock);
|
||||
return AjaxResult.success(stocks);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer selectByTrayCodeAndProduct(String trayCode, String productId) {
|
||||
return pdaMapper.selectByTrayCodeAndProduct(trayCode,productId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,6 +162,12 @@
|
||||
#{v_result,mode=OUT,jdbcType=INTEGER},
|
||||
#{v_result_msg,mode=OUT,jdbcType=VARCHAR})}
|
||||
</select>
|
||||
<select id="selectByTrayCodeAndProduct" parameterType="string" resultType="java.lang.Integer">
|
||||
select count(1)
|
||||
from mydo_job_detail
|
||||
where job_id in (select job_id from mydo_job where tray_code = #{trayCode} and in_or_out > 20)
|
||||
and product_id = #{productId}
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user