代码更新
This commit is contained in:
@@ -4,6 +4,7 @@ package org.nl.wms.pda.st.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.druid.sql.visitor.functions.If;
|
import com.alibaba.druid.sql.visitor.functions.If;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
@@ -57,6 +58,8 @@ public class PdaCheckServiceImpl implements PdaCheckService {
|
|||||||
@Override
|
@Override
|
||||||
public JSONObject checkQueryDtl(JSONObject whereJson) {
|
public JSONObject checkQueryDtl(JSONObject whereJson) {
|
||||||
|
|
||||||
|
WQLObject dtlTab = WQLObject.getWQLObject("ST_IVT_CheckDtl");
|
||||||
|
|
||||||
String box_no = whereJson.getString("box_no");
|
String box_no = whereJson.getString("box_no");
|
||||||
|
|
||||||
JSONObject map = new JSONObject();
|
JSONObject map = new JSONObject();
|
||||||
@@ -64,6 +67,15 @@ public class PdaCheckServiceImpl implements PdaCheckService {
|
|||||||
map.put("check_code", whereJson.getString("check_code"));
|
map.put("check_code", whereJson.getString("check_code"));
|
||||||
if (ObjectUtil.isNotEmpty(box_no)) map.put("storagevehicle_code","%"+box_no+"%");
|
if (ObjectUtil.isNotEmpty(box_no)) map.put("storagevehicle_code","%"+box_no+"%");
|
||||||
|
|
||||||
|
JSONObject jsonDtl = dtlTab.query("check_code = '" + whereJson.getString("check_code") + "' and storagevehicle_code = '" + box_no + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(jsonDtl)) {
|
||||||
|
throw new BadRequestException("此箱号不在此盘点单中:"+box_no);
|
||||||
|
} else {
|
||||||
|
if (!StrUtil.equals(jsonDtl.getString("status"), "1")) {
|
||||||
|
throw new BadRequestException("此箱号已盘点");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
JSONArray resultJSONArray = WQL.getWO("PDA_CHECK").addParamMap(map).process().getResultJSONArray(0);
|
JSONArray resultJSONArray = WQL.getWO("PDA_CHECK").addParamMap(map).process().getResultJSONArray(0);
|
||||||
|
|
||||||
// 已盘点数: 不等于生成状态
|
// 已盘点数: 不等于生成状态
|
||||||
|
|||||||
Reference in New Issue
Block a user