opt:库区表代码替换
This commit is contained in:
@@ -9,6 +9,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.nl.b_lms.pdm_manage.enums.SUBEnum;
|
||||
import org.nl.b_lms.sch.tasks.TwoOutExceptionalTask;
|
||||
@@ -38,6 +39,8 @@ import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.system.service.param.ISysParamService;
|
||||
import org.nl.wms.basedata.master.storagevehicleinfo.service.dao.Storagevehicleex;
|
||||
import org.nl.wms.basedata.master.storagevehicleinfo.service.dao.mapper.StoragevehicleexMapper;
|
||||
import org.nl.wms.basedata.st.sectattr.service.dao.Sectattr;
|
||||
import org.nl.wms.basedata.st.sectattr.service.dao.mapper.SectattrMapper;
|
||||
import org.nl.wms.basedata.st.storattr.service.StorattrService;
|
||||
import org.nl.wms.basedata.st.storattr.service.dao.Storattr;
|
||||
import org.nl.wms.basedata.st.storattr.service.dao.mapper.StorattrMapper;
|
||||
@@ -73,7 +76,8 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
||||
*/
|
||||
@Autowired
|
||||
private StorattrService storattrService;
|
||||
|
||||
@Autowired
|
||||
private SectattrMapper sectattrMapper;
|
||||
/**
|
||||
* 出入库明细服务
|
||||
*/
|
||||
@@ -704,8 +708,6 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
||||
WQLObject subRecordTab = WQLObject.getWQLObject("pdm_bi_subpackagerelationrecord");
|
||||
// 任务表
|
||||
WQLObject taskService = WQLObject.getWQLObject("sch_base_task");
|
||||
// 库区表
|
||||
WQLObject sectTab = WQLObject.getWQLObject("st_ivt_sectattr");
|
||||
|
||||
StIvtIostorinv mstDao = this.getById(whereJson.getLongValue("iostorinv_id"));
|
||||
|
||||
@@ -913,22 +915,22 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
||||
if (mstDao.getBill_type().equals(IOSEnum.OUT_TYPE.code("返检出库")) || mstDao.getBill_type().equals(IOSEnum.OUT_TYPE.code("改切出库"))) {
|
||||
|
||||
// 查询库区
|
||||
String sect_in = disDaoList.stream()
|
||||
List<String> sect_in = disDaoList.stream()
|
||||
.map(row -> row.getSect_id().toString())
|
||||
.collect(Collectors.joining("','"));
|
||||
|
||||
List<JSONObject> sectList = sectTab.query("sect_id IN ('" + sect_in + "')")
|
||||
.getResultJSONArray(0).toJavaList(JSONObject.class);
|
||||
.collect(Collectors.toList());
|
||||
|
||||
List<Sectattr> sectList = sectattrMapper.selectList(Wrappers.lambdaQuery(Sectattr.class)
|
||||
.in(Sectattr::getSect_id, sect_in)
|
||||
.eq(Sectattr::getIs_used, "1"));
|
||||
for (int i = 0; i < disDaoList.size(); i++) {
|
||||
StIvtIostorinvdis disDao = disDaoList.get(i);
|
||||
|
||||
JSONObject jsonSect = sectList.stream()
|
||||
.filter(row -> row.getString("sect_id").equals(disDao.getSect_id().toString()))
|
||||
Sectattr jsonSect = sectList.stream()
|
||||
.filter(row -> row.getSect_id().equals(disDao.getSect_id().toString()))
|
||||
.collect(Collectors.toList()).get(0);
|
||||
|
||||
//如果是虚拟区的出库,直接把包装关系删除;如果为立库的包装关系,将解绑删除标识置为1。当发货区解绑时,删除包装关系
|
||||
if (jsonSect.getString("sect_type_attr").equals(IOSEnum.SECT_TYPE.code("虚拟区"))) {
|
||||
if (jsonSect.getSect_type_attr().equals(IOSEnum.SECT_TYPE.code("虚拟区"))) {
|
||||
subTab.delete("container_name = '" + disDao.getPcsn() + "'");
|
||||
} else {
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
|
||||
@@ -41,6 +41,8 @@ import org.nl.system.service.param.ISysParamService;
|
||||
import org.nl.system.service.param.impl.SysParamServiceImpl;
|
||||
import org.nl.wms.basedata.master.storagevehicleinfo.service.dao.Storagevehicleex;
|
||||
import org.nl.wms.basedata.master.storagevehicleinfo.service.dao.mapper.StoragevehicleexMapper;
|
||||
import org.nl.wms.basedata.st.sectattr.service.dao.Sectattr;
|
||||
import org.nl.wms.basedata.st.sectattr.service.dao.mapper.SectattrMapper;
|
||||
import org.nl.wms.basedata.st.storattr.service.StorattrService;
|
||||
import org.nl.wms.basedata.st.storattr.service.dto.StorattrDto;
|
||||
import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl;
|
||||
@@ -76,7 +78,8 @@ import java.util.stream.Collectors;
|
||||
@Slf4j
|
||||
public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvMapper, StIvtIostorinv> implements IStIvtIostorinvService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private SectattrMapper sectattrMapper;
|
||||
/**
|
||||
* 木箱信息服务
|
||||
*/
|
||||
@@ -273,8 +276,6 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvMapper,
|
||||
if (tryLock) {
|
||||
// 仓位表
|
||||
WQLObject attrTab = WQLObject.getWQLObject("st_ivt_structattr");
|
||||
// 库区表
|
||||
WQLObject sectTab = WQLObject.getWQLObject("st_ivt_sectattr");
|
||||
// 参数类型转换 Map-> JSONObject
|
||||
JSONObject jsonObject = JSONObject.parseObject(JSON.toJSONString(whereJson));
|
||||
// 分配明细集合
|
||||
@@ -324,9 +325,9 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvMapper,
|
||||
height = "('3')";
|
||||
}
|
||||
attrParam.put("height", height);
|
||||
JSONObject jsonSect = sectTab.query("sect_id = '" + jsonObject.getString("sect_id") + "'").uniqueResult(0);
|
||||
Sectattr jsonSect = sectattrMapper.selectById(jsonObject.getString("sect_id"));
|
||||
// 判断是否是虚拟区
|
||||
if (jsonSect.getString("sect_type_attr").equals(IOSEnum.SECT_TYPE.code("虚拟区"))) {
|
||||
if (jsonSect.getSect_type_attr().equals(IOSEnum.SECT_TYPE.code("虚拟区"))) {
|
||||
jsonAttr = attrTab.query("sect_id = '" + jsonObject.getString("sect_id") + "' AND lock_type = '1' AND is_delete = '0' AND IFNULL( storagevehicle_code, '' ) = ''").uniqueResult(0);
|
||||
} else {
|
||||
jsonAttr = inBussManageService.getOneStruct(attrParam);
|
||||
@@ -349,8 +350,8 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvMapper,
|
||||
// 判断是否虚拟区
|
||||
String work_status;
|
||||
Long task_id = null;
|
||||
JSONObject jsonSect = sectTab.query("sect_id = '" + jsonAttr.getString("sect_id") + "'").uniqueResult(0);
|
||||
if (jsonSect.getString("sect_type_attr").equals(IOSEnum.SECT_TYPE.code("虚拟区"))) {
|
||||
Sectattr jsonSect = sectattrMapper.selectById(jsonAttr.getString("sect_id"));
|
||||
if (jsonSect.getSect_type_attr().equals(IOSEnum.SECT_TYPE.code("虚拟区"))) {
|
||||
// 虚拟区:执行状态为完成
|
||||
work_status = IOSEnum.WORK_STATUS.code("完成");
|
||||
task_id = IdUtil.getLongId();
|
||||
|
||||
@@ -28,6 +28,8 @@ import org.nl.wms.basedata.master.storagevehicleinfo.service.dao.Storagevehiclee
|
||||
import org.nl.wms.basedata.master.storagevehicleinfo.service.dao.mapper.StoragevehicleexMapper;
|
||||
import org.nl.wms.basedata.master.unit.service.dao.Unit;
|
||||
import org.nl.wms.basedata.master.unit.service.dao.mapper.UnitMapper;
|
||||
import org.nl.wms.basedata.st.sectattr.service.dao.Sectattr;
|
||||
import org.nl.wms.basedata.st.sectattr.service.dao.mapper.SectattrMapper;
|
||||
import org.nl.wms.pda.mps.eum.RegionTypeEnum;
|
||||
import org.nl.wms.st.inbill.service.StorPublicService;
|
||||
import org.nl.wms.st.instor.movestor.service.HandMoveStorService;
|
||||
@@ -59,7 +61,8 @@ public class OutBussManageServiceImpl implements OutBussManageService {
|
||||
*/
|
||||
@Autowired
|
||||
private IStIvtIostorinvOutService stIvtIostorinvOutService;
|
||||
|
||||
@Autowired
|
||||
private SectattrMapper sectattrMapper;
|
||||
/**
|
||||
* 出入库明细服务
|
||||
*/
|
||||
@@ -280,12 +283,10 @@ public class OutBussManageServiceImpl implements OutBussManageService {
|
||||
JSONObject jsonIvt = likeBoxList.get(i);
|
||||
|
||||
// 查询库区
|
||||
JSONObject jsonSect = WQLObject.getWQLObject("st_ivt_sectattr")
|
||||
.query("sect_id = '" + jsonIvt.getString("sect_id") + "'")
|
||||
.uniqueResult(0);
|
||||
Sectattr jsonSect = sectattrMapper.selectById(jsonIvt.getString("sect_id"));
|
||||
|
||||
String work_status;
|
||||
if (jsonSect.getString("sect_type_attr").equals(IOSEnum.SECT_TYPE.code("虚拟区"))) {
|
||||
if (jsonSect.getSect_type_attr().equals(IOSEnum.SECT_TYPE.code("虚拟区"))) {
|
||||
work_status = IOSEnum.WORK_STATUS.code("生成");
|
||||
} else {
|
||||
work_status = IOSEnum.WORK_STATUS.code("未生成");
|
||||
|
||||
@@ -18,7 +18,6 @@ import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.wql.WQL;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.wms.basedata.st.sectattr.service.dao.Sectattr;
|
||||
import org.nl.wms.basedata.st.sectattr.service.dao.mapper.SectattrMapper;
|
||||
import org.nl.wms.basedata.st.sectattr.service.SectattrService;
|
||||
@@ -31,7 +30,6 @@ import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.google.common.collect.Interner;
|
||||
import com.google.common.collect.Interners;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -50,6 +51,8 @@ import org.nl.wms.basedata.master.storagevehicleinfo.service.StoragevehicleinfoS
|
||||
import org.nl.wms.basedata.master.storagevehicleinfo.service.dao.Storagevehicleex;
|
||||
import org.nl.wms.basedata.master.storagevehicleinfo.service.dao.Storagevehicleinfo;
|
||||
import org.nl.wms.basedata.master.storagevehicleinfo.service.dao.mapper.StoragevehicleexMapper;
|
||||
import org.nl.wms.basedata.st.sectattr.service.dao.Sectattr;
|
||||
import org.nl.wms.basedata.st.sectattr.service.dao.mapper.SectattrMapper;
|
||||
import org.nl.wms.ext.acs.service.AcsToWmsService;
|
||||
import org.nl.wms.pda.mps.eum.RegionTypeEnum;
|
||||
import org.nl.wms.pda.mps.service.CasingService;
|
||||
@@ -84,7 +87,8 @@ import java.util.stream.Collectors;
|
||||
public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
|
||||
private static Interner<String> Heap_Lock = Interners.newWeakInterner();
|
||||
|
||||
@Autowired
|
||||
private SectattrMapper sectattrMapper;
|
||||
|
||||
private final RawAssistIStorService rawAssistIStorService;
|
||||
|
||||
@@ -388,10 +392,13 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
}
|
||||
Map map = new HashMap();
|
||||
//查询主存区的sect
|
||||
JSONObject sect_jo = WQLObject.getWQLObject("st_ivt_sectattr").query("sect_type_attr = '00' AND is_used = '1'").uniqueResult(0);
|
||||
List<Sectattr> sects = sectattrMapper.selectList(Wrappers.lambdaQuery(Sectattr.class)
|
||||
.eq(Sectattr::getSect_type_attr, "00")
|
||||
.eq(Sectattr::getIs_used, "1")
|
||||
);
|
||||
map.put("tableMater", dis_list);
|
||||
map.put("point_code", device_code);
|
||||
map.put("sect_id", sect_jo.getString("sect_id"));
|
||||
map.put("sect_id", sects.get(0).getSect_id());
|
||||
map.put("checked", checked);
|
||||
map.put("auto_div", auto_div);
|
||||
map.put("auto_issue", "1");
|
||||
|
||||
@@ -8,6 +8,7 @@ import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
@@ -16,10 +17,13 @@ import org.nl.modules.common.utils.FileUtil;
|
||||
import org.nl.modules.wql.WQL;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.WqlUtil;
|
||||
import org.nl.wms.basedata.st.sectattr.service.dao.Sectattr;
|
||||
import org.nl.wms.basedata.st.sectattr.service.dao.mapper.SectattrMapper;
|
||||
import org.nl.wms.sch.service.PointService;
|
||||
import org.nl.wms.sch.service.RegionService;
|
||||
import org.nl.wms.sch.service.dto.PointDto;
|
||||
import org.nl.wms.sch.service.dto.RegionDto;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -39,7 +43,8 @@ import java.util.*;
|
||||
public class PointServiceImpl implements PointService {
|
||||
|
||||
private final RegionService regionService;
|
||||
|
||||
@Autowired
|
||||
private SectattrMapper sectattrMapper;
|
||||
@Override
|
||||
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
||||
HashMap map = new HashMap();
|
||||
@@ -214,11 +219,11 @@ public class PointServiceImpl implements PointService {
|
||||
String struct_code = json.getString("point_code");
|
||||
String point_type = json.getString("point_type");
|
||||
if ("01".equals(point_type)) {
|
||||
JSONObject st_ivt_bsRealStorAttr = WQLObject.getWQLObject("ST_IVT_StructAttr").query(" struct_code = '" + struct_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(st_ivt_bsRealStorAttr)) {
|
||||
String sect_id = st_ivt_bsRealStorAttr.getString("sect_id");
|
||||
JSONObject st_ivt_sectAttr = WQLObject.getWQLObject("ST_IVT_SectAttr").query(" sect_id = '" + sect_id + "' and is_used = '1'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(st_ivt_sectAttr)) {
|
||||
JSONObject StructAttr = WQLObject.getWQLObject("ST_IVT_StructAttr").query(" struct_code = '" + struct_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(StructAttr)) {
|
||||
String sect_id = StructAttr.getString("sect_id");
|
||||
Sectattr sectAttr = sectattrMapper.selectById(sect_id);
|
||||
if (ObjectUtil.isEmpty(sectAttr)) {
|
||||
throw new BadRequestException("启用失败,请检查仓位点位所属库区是否启用!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,9 +16,12 @@ import org.nl.common.utils.CodeUtil;
|
||||
import org.nl.modules.wql.WQL;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.WqlUtil;
|
||||
import org.nl.wms.basedata.st.sectattr.service.dao.Sectattr;
|
||||
import org.nl.wms.basedata.st.sectattr.service.dao.mapper.SectattrMapper;
|
||||
import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl;
|
||||
import org.nl.wms.st.inbill.service.InchargeService;
|
||||
import org.nl.wms.st.inbill.service.StorPublicService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -36,7 +39,8 @@ import java.util.Map;
|
||||
public class InchargeServiceImpl implements InchargeService {
|
||||
|
||||
private final StorPublicService storPublicService;
|
||||
|
||||
@Autowired
|
||||
private SectattrMapper sectattrMapper;
|
||||
@Override
|
||||
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
||||
String bill_code = MapUtil.getStr(whereJson, "bill_code");
|
||||
@@ -80,7 +84,6 @@ public class InchargeServiceImpl implements InchargeService {
|
||||
WQLObject disTab = WQLObject.getWQLObject("ST_IVT_IOStorInvDis"); // 出入库分配表
|
||||
WQLObject stIvtCoolpointivtService = WQLObject.getWQLObject("ST_IVT_StructIvt"); // 仓位库存表
|
||||
WQLObject attrTab = WQLObject.getWQLObject("ST_IVT_StructAttr"); // 仓位表
|
||||
WQLObject wo_sect = WQLObject.getWQLObject("st_ivt_sectattr"); // 库区表
|
||||
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
@@ -166,8 +169,8 @@ public class InchargeServiceImpl implements InchargeService {
|
||||
jsonOutDis.put("task_id", "");
|
||||
jsonOutDis.put("quality_scode", "01");
|
||||
// 如果是虚拟库区则将执行状态改为生成:01
|
||||
JSONObject jsonSect = wo_sect.query("sect_id = '" + json2.getString("sect_id") + "'").uniqueResult(0);
|
||||
if (StrUtil.equals(jsonSect.getString("sect_type_attr"), "09")) {
|
||||
Sectattr jsonSect = sectattrMapper.selectById(json2.getString("sect_id"));
|
||||
if (StrUtil.equals(jsonSect.getSect_type_attr(), "09")) {
|
||||
jsonOutDis.put("work_status", "01");
|
||||
} else {
|
||||
jsonOutDis.put("work_status", "00");
|
||||
|
||||
@@ -22,6 +22,8 @@ import org.nl.modules.wql.util.WqlUtil;
|
||||
import org.nl.system.service.param.impl.SysParamServiceImpl;
|
||||
import org.nl.wms.basedata.master.unit.service.dao.Unit;
|
||||
import org.nl.wms.basedata.master.unit.service.dao.mapper.UnitMapper;
|
||||
import org.nl.wms.basedata.st.sectattr.service.dao.Sectattr;
|
||||
import org.nl.wms.basedata.st.sectattr.service.dao.mapper.SectattrMapper;
|
||||
import org.nl.wms.basedata.st.structattr.service.dto.StructattrDto;
|
||||
import org.nl.wms.basedata.st.storattr.service.StorattrService;
|
||||
import org.nl.wms.basedata.st.structattr.service.StructattrService;
|
||||
@@ -58,7 +60,8 @@ import java.util.stream.Collectors;
|
||||
public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
||||
|
||||
private final StorattrService storattrService;
|
||||
|
||||
@Autowired
|
||||
private SectattrMapper sectattrMapper;
|
||||
private final InbillServiceImpl inbillService;
|
||||
|
||||
private final StorPublicService storPublicService;
|
||||
@@ -555,9 +558,9 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
||||
JSONObject struct_jo = new JSONObject();
|
||||
if (whereJson.containsKey("sect_id")) {
|
||||
String need_sect = (String) whereJson.get("sect_id");
|
||||
JSONObject need_sect_jo = WQLObject.getWQLObject("st_ivt_sectattr").query("sect_id = '" + need_sect + "'").uniqueResult(0);
|
||||
Sectattr need_sect_jo = sectattrMapper.selectById(need_sect);
|
||||
//判断是否为主存区,主存区调用自动分配,虚拟区调用普通查询
|
||||
if (StrUtil.isNotEmpty(need_sect) && !"00".equals(need_sect_jo.getString("sect_type_attr"))) {
|
||||
if (StrUtil.isNotEmpty(need_sect) && !"00".equals(need_sect_jo.getSect_type_attr())) {
|
||||
struct_jo = WQLObject.getWQLObject("st_ivt_structattr").query("sect_id = '" + need_sect + "' AND lock_type = '1' AND is_delete = '0' AND IFNULL( storagevehicle_code, '' ) = ''").uniqueResult(0);
|
||||
// 如果为空则扩容
|
||||
if (ObjectUtil.isEmpty(struct_jo)) {
|
||||
@@ -647,9 +650,9 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
||||
//判断起点是否不为空
|
||||
JSONObject ios_dis = WQLObject.getWQLObject("ST_IVT_IOStorInvDis").query("iostorinv_id = '" + map.get("iostorinv_id") + "' AND box_no = '" + map.get("box_no") + "'").uniqueResult(0);
|
||||
|
||||
JSONObject sect_jo = WQLObject.getWQLObject("st_ivt_sectattr").query("sect_id ='" + sect_id + "'").uniqueResult(0);
|
||||
Sectattr sect_jo = sectattrMapper.selectById(sect_id);
|
||||
boolean is_virtual = false;
|
||||
if ("09".equals(sect_jo.getString("sect_type_attr"))) {
|
||||
if ("09".equals(sect_jo.getSect_type_attr())) {
|
||||
is_virtual = true;
|
||||
String task_id = IdUtil.getSnowflake(1, 1).nextId() + "";
|
||||
dis_map.put("task_id", task_id);
|
||||
@@ -745,8 +748,8 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
||||
String iostorinv_id = form.getString("iostorinv_id");
|
||||
String sect_id = form.getString("sect_id");
|
||||
|
||||
JSONObject sect_jo = WQLObject.getWQLObject("st_ivt_sectattr").query("sect_id = '" + sect_id + "'").uniqueResult(0);
|
||||
if (!"09".equals(sect_jo.getString("sect_type_attr"))) {
|
||||
Sectattr sect_jo =sectattrMapper.selectById(sect_id);
|
||||
if (!"09".equals(sect_jo.getSect_type_attr())) {
|
||||
throw new BadRequestException("只能对虚拟区的库区进行全部分配!");
|
||||
}
|
||||
//查询当前入库单状态为生成的入库单明细
|
||||
|
||||
@@ -32,6 +32,8 @@ import org.nl.wms.basedata.master.customer.service.dao.mapper.CustomerbaseMapper
|
||||
import org.nl.wms.basedata.master.transport.service.ITransportationBaseService;
|
||||
import org.nl.wms.basedata.master.transport.service.dao.TransportationBase;
|
||||
import org.nl.wms.basedata.master.transport.service.dao.mapper.TransportationBaseMapper;
|
||||
import org.nl.wms.basedata.st.sectattr.service.dao.Sectattr;
|
||||
import org.nl.wms.basedata.st.sectattr.service.dao.mapper.SectattrMapper;
|
||||
import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl;
|
||||
import org.nl.wms.basedata.st.storattr.service.dao.Storattr;
|
||||
import org.nl.wms.basedata.st.storattr.service.dao.mapper.StorattrMapper;
|
||||
@@ -78,6 +80,8 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
private final HandMoveStorAcsTask moveStorAcsTask;
|
||||
private final InAndOutReturnService inAndOutReturnService;
|
||||
@Autowired
|
||||
private SectattrMapper sectattrMapper;
|
||||
@Autowired
|
||||
private CustomerbaseMapper customerbaseMapper;
|
||||
@Autowired
|
||||
private StorattrMapper storattrMapper;
|
||||
@@ -1542,8 +1546,6 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
WQLObject wo_dtl = WQLObject.getWQLObject("ST_IVT_IOStorInvDtl");
|
||||
//出库主表
|
||||
WQLObject wo_mst = WQLObject.getWQLObject("ST_IVT_IOStorInv");
|
||||
//库区表
|
||||
WQLObject wo_sect = WQLObject.getWQLObject("st_ivt_sectattr");
|
||||
|
||||
//定义需要更新的仓位集合
|
||||
HashMap<String, JSONObject> Struct_map = new HashMap<String, JSONObject>();
|
||||
@@ -1666,8 +1668,8 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
dtl.put("instorage_time", ivt2.getString("instorage_time"));
|
||||
|
||||
// 如果所属仓位是虚拟区 则将分配明细状态变为生成
|
||||
JSONObject jsonSect = wo_sect.query("sect_id = '" + ivt2.getString("sect_id") + "'").uniqueResult(0);
|
||||
if (StrUtil.equals(jsonSect.getString("sect_type_attr"), "09")) {
|
||||
Sectattr jsonSect = sectattrMapper.selectById(ivt2.getString("sect_id"));
|
||||
if (StrUtil.equals(jsonSect.getSect_type_attr(), "09")) {
|
||||
dtl.put("work_status", "01");
|
||||
} else {
|
||||
dtl.put("work_status", "00");
|
||||
@@ -1740,8 +1742,8 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
dtl.put("is_overdue", jsonIvt.getString("is_overdue"));
|
||||
dtl.put("instorage_time", jsonIvt.getString("instorage_time"));
|
||||
// 如果所属仓位是虚拟区 则将分配明细状态变为生成
|
||||
JSONObject jsonSect = wo_sect.query("sect_id = '" + jsonIvt.getString("sect_id") + "'").uniqueResult(0);
|
||||
if (StrUtil.equals(jsonSect.getString("sect_type_attr"), "09")) {
|
||||
Sectattr jsonSect = sectattrMapper.selectById(jsonIvt.getString("sect_id"));
|
||||
if (StrUtil.equals(jsonSect.getSect_type_attr(), "09")) {
|
||||
dtl.put("work_status", "01");
|
||||
} else {
|
||||
dtl.put("work_status", "00");
|
||||
@@ -1808,8 +1810,6 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
WQLObject wo_dtl = WQLObject.getWQLObject("ST_IVT_IOStorInvDtl");
|
||||
//出库主表
|
||||
WQLObject wo_mst = WQLObject.getWQLObject("ST_IVT_IOStorInv");
|
||||
//库区表
|
||||
WQLObject wo_sect = WQLObject.getWQLObject("st_ivt_sectattr");
|
||||
|
||||
//定义需要更新的仓位集合
|
||||
HashMap<String, JSONObject> Struct_map = new HashMap<String, JSONObject>();
|
||||
@@ -1939,8 +1939,8 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
dtl.put("instorage_time", ivt2.getString("instorage_time"));
|
||||
|
||||
// 如果所属仓位是虚拟区 则将分配明细状态变为生成
|
||||
JSONObject jsonSect = wo_sect.query("sect_id = '" + ivt2.getString("sect_id") + "'").uniqueResult(0);
|
||||
if (StrUtil.equals(jsonSect.getString("sect_type_attr"), "09")) {
|
||||
Sectattr jsonSect = sectattrMapper.selectById(ivt2.getString("sect_id"));
|
||||
if (StrUtil.equals(jsonSect.getSect_type_attr(), "09")) {
|
||||
dtl.put("work_status", "01");
|
||||
} else {
|
||||
dtl.put("work_status", "00");
|
||||
@@ -2012,8 +2012,8 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
dtl.put("is_overdue", jsonIvt.getString("is_overdue"));
|
||||
dtl.put("instorage_time", jsonIvt.getString("instorage_time"));
|
||||
// 如果所属仓位是虚拟区 则将分配明细状态变为生成
|
||||
JSONObject jsonSect = wo_sect.query("sect_id = '" + jsonIvt.getString("sect_id") + "'").uniqueResult(0);
|
||||
if (StrUtil.equals(jsonSect.getString("sect_type_attr"), "09")) {
|
||||
Sectattr jsonSect = sectattrMapper.selectById(jsonIvt.getString("sect_id"));
|
||||
if (StrUtil.equals(jsonSect.getSect_type_attr(), "09")) {
|
||||
dtl.put("work_status", "01");
|
||||
} else {
|
||||
dtl.put("work_status", "00");
|
||||
@@ -2091,8 +2091,6 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
WQLObject wo_dtl = WQLObject.getWQLObject("ST_IVT_IOStorInvDtl");
|
||||
//出库主表
|
||||
WQLObject wo_mst = WQLObject.getWQLObject("ST_IVT_IOStorInv");
|
||||
//库区表
|
||||
WQLObject wo_sect = WQLObject.getWQLObject("st_ivt_sectattr");
|
||||
|
||||
//定义需要更新的仓位集合
|
||||
HashMap<String, JSONObject> Struct_map = new HashMap<String, JSONObject>();
|
||||
@@ -2213,8 +2211,8 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
dtl.put("is_overdue", ivt2.getString("is_overdue"));
|
||||
dtl.put("instorage_time", ivt2.getString("instorage_time"));
|
||||
// 如果所属仓位是虚拟区 则将分配明细状态变为生成
|
||||
JSONObject jsonSect = wo_sect.query("sect_id = '" + ivt2.getString("sect_id") + "'").uniqueResult(0);
|
||||
if (StrUtil.equals(jsonSect.getString("sect_type_attr"), "09")) {
|
||||
Sectattr jsonSect = sectattrMapper.selectById(ivt2.getString("sect_id"));
|
||||
if (StrUtil.equals(jsonSect.getSect_type_attr(), "09")) {
|
||||
dtl.put("work_status", "01");
|
||||
} else {
|
||||
dtl.put("work_status", "00");
|
||||
@@ -2282,8 +2280,8 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
dtl.put("is_overdue", jsonIvt.getString("is_overdue"));
|
||||
dtl.put("instorage_time", jsonIvt.getString("instorage_time"));
|
||||
// 如果所属仓位是虚拟区 则将分配明细状态变为生成
|
||||
JSONObject jsonSect = wo_sect.query("sect_id = '" + jsonIvt.getString("sect_id") + "'").uniqueResult(0);
|
||||
if (StrUtil.equals(jsonSect.getString("sect_type_attr"), "09")) {
|
||||
Sectattr jsonSect = sectattrMapper.selectById(jsonIvt.getString("sect_id"));
|
||||
if (StrUtil.equals(jsonSect.getSect_type_attr(), "09")) {
|
||||
dtl.put("work_status", "01");
|
||||
} else {
|
||||
dtl.put("work_status", "00");
|
||||
@@ -2355,8 +2353,8 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
json.put("is_overdue", ivt.getString("is_overdue"));
|
||||
json.put("instorage_time", ivt.getString("instorage_time"));
|
||||
// 如果所属仓位是虚拟区 则将分配明细状态变为生成
|
||||
JSONObject jsonSect = wo_sect.query("sect_id = '" + ivt.getString("sect_id") + "'").uniqueResult(0);
|
||||
if (StrUtil.equals(jsonSect.getString("sect_type_attr"), "09")) {
|
||||
Sectattr jsonSect = sectattrMapper.selectById(ivt.getString("sect_id"));
|
||||
if (StrUtil.equals(jsonSect.getSect_type_attr(), "09")) {
|
||||
json.put("work_status", "01");
|
||||
} else {
|
||||
json.put("work_status", "00");
|
||||
@@ -4346,8 +4344,6 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
WQLObject wo_dtl = WQLObject.getWQLObject("ST_IVT_IOStorInvDtl");
|
||||
//出库主表
|
||||
WQLObject wo_mst = WQLObject.getWQLObject("ST_IVT_IOStorInv");
|
||||
//库区表
|
||||
WQLObject wo_sect = WQLObject.getWQLObject("st_ivt_sectattr");
|
||||
|
||||
//定义需要更新的仓位集合
|
||||
HashMap<String, JSONObject> Struct_map = new HashMap<>();
|
||||
@@ -4413,7 +4409,6 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
|
||||
double assign_qty = dtl.getDoubleValue("assign_qty");
|
||||
double unassign_qty = dtl.getDoubleValue("unassign_qty");
|
||||
double plan_qty = dtl.getDoubleValue("plan_qty");
|
||||
|
||||
if (rows.size() != 0) {
|
||||
for (int j = 0; j < rows.size(); j++) {
|
||||
@@ -4455,8 +4450,8 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
dtl.put("is_overdue", ivt.getString("is_overdue"));
|
||||
dtl.put("instorage_time", ivt.getString("instorage_time"));
|
||||
// 如果所属仓位是虚拟区 则将分配明细状态变为生成
|
||||
JSONObject jsonSect = wo_sect.query("sect_id = '" + ivt.getString("sect_id") + "'").uniqueResult(0);
|
||||
if (StrUtil.equals(jsonSect.getString("sect_type_attr"), "09")) {
|
||||
Sectattr jsonSect = sectattrMapper.selectById(ivt.getString("sect_id"));
|
||||
if (StrUtil.equals(jsonSect.getSect_type_attr(), "09")) {
|
||||
dtl.put("work_status", "01");
|
||||
} else {
|
||||
dtl.put("work_status", "00");
|
||||
@@ -4534,8 +4529,8 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
json.put("is_overdue", ivt.getString("is_overdue"));
|
||||
json.put("instorage_time", ivt.getString("instorage_time"));
|
||||
// 如果所属仓位是虚拟区 则将分配明细状态变为生成
|
||||
JSONObject jsonSect = wo_sect.query("sect_id = '" + ivt.getString("sect_id") + "'").uniqueResult(0);
|
||||
if (StrUtil.equals(jsonSect.getString("sect_type_attr"), "09")) {
|
||||
Sectattr jsonSect = sectattrMapper.selectById(ivt.getString("sect_id"));
|
||||
if (StrUtil.equals(jsonSect.getSect_type_attr(), "09")) {
|
||||
json.put("work_status", "01");
|
||||
} else {
|
||||
json.put("work_status", "00");
|
||||
@@ -4586,12 +4581,8 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
WQLObject wo_dtl = WQLObject.getWQLObject("ST_IVT_IOStorInvDtl");
|
||||
//出库主表
|
||||
WQLObject wo_mst = WQLObject.getWQLObject("ST_IVT_IOStorInv");
|
||||
// 物料表
|
||||
WQLObject materTab = WQLObject.getWQLObject("md_me_materialbase");
|
||||
// 任务表
|
||||
WQLObject taskTab = WQLObject.getWQLObject("sch_base_task");
|
||||
// 库区表
|
||||
WQLObject sectTab = WQLObject.getWQLObject("st_ivt_sectattr");
|
||||
// 子卷包装关系表
|
||||
WQLObject subTab = WQLObject.getWQLObject("pdm_bi_subpackagerelation");
|
||||
//包装关系出入库记录表
|
||||
@@ -4913,13 +4904,13 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
for (int i = 0; i < dis_rows.size(); i++) {
|
||||
JSONObject dis_row = dis_rows.getJSONObject(i);
|
||||
String sect_code = dis_row.getString("sect_code");
|
||||
JSONObject sect_jo = WQLObject.getWQLObject("st_ivt_sectattr").query("sect_code = '" + sect_code + "'").uniqueResult(0);
|
||||
Sectattr sect_jo = sectattrMapper.selectById(dis_row.getString("sect_id"));
|
||||
if (ObjectUtil.isEmpty(sect_jo)) {
|
||||
throw new BadRequestException("未查询到对应的库区!");
|
||||
}
|
||||
//如果是虚拟区的出库,直接把包装关系删除;如果为立库的包装关系,将解绑删除标识置为1。当发货区解绑时,删除包装关系
|
||||
String pcsn = dis_row.getString("pcsn");
|
||||
if ("09".equals(sect_jo.getString("sect_type_attr"))) {
|
||||
if ("09".equals(sect_jo.getSect_type_attr())) {
|
||||
WQLObject.getWQLObject("pdm_bi_subpackagerelation").delete("container_name = '" + pcsn + "'");
|
||||
} else {
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
@@ -5528,13 +5519,13 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
for (int i = 0; i < dis_rows.size(); i++) {
|
||||
JSONObject dis_row = dis_rows.getJSONObject(i);
|
||||
String sect_code = dis_row.getString("sect_code");
|
||||
JSONObject sect_jo = WQLObject.getWQLObject("st_ivt_sectattr").query("sect_code = '" + sect_code + "'").uniqueResult(0);
|
||||
Sectattr sect_jo = sectattrMapper.selectById(dis_row.getString("sect_id"));
|
||||
if (ObjectUtil.isEmpty(sect_jo)) {
|
||||
throw new BadRequestException("未查询到对应的库区!");
|
||||
}
|
||||
//如果是虚拟区的出库,直接把包装关系删除;如果为立库的包装关系,将解绑删除标识置为1。当发货区解绑时,删除包装关系
|
||||
String pcsn = dis_row.getString("pcsn");
|
||||
if ("09".equals(sect_jo.getString("sect_type_attr"))) {
|
||||
if ("09".equals(sect_jo.getSect_type_attr())) {
|
||||
WQLObject.getWQLObject("pdm_bi_subpackagerelation").delete("container_name = '" + pcsn + "'");
|
||||
} else {
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
@@ -5687,13 +5678,13 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
for (int j = 0; j < dis_rows.size(); j++) {
|
||||
JSONObject dis_row = dis_rows.getJSONObject(j);
|
||||
String sect_code = dis_row.getString("sect_code");
|
||||
JSONObject sect_jo = WQLObject.getWQLObject("st_ivt_sectattr").query("sect_code = '" + sect_code + "'").uniqueResult(0);
|
||||
Sectattr sect_jo = sectattrMapper.selectById(dis_row.getString("sect_id"));
|
||||
if (ObjectUtil.isEmpty(sect_jo)) {
|
||||
throw new BadRequestException("未查询到对应的库区!");
|
||||
}
|
||||
//如果是虚拟区的出库,直接把包装关系删除;如果为立库的包装关系,将解绑删除标识置为1。当发货区解绑时,删除包装关系
|
||||
String pcsn = dis_row.getString("pcsn");
|
||||
if ("09".equals(sect_jo.getString("sect_type_attr"))) {
|
||||
if ("09".equals(sect_jo.getSect_type_attr())) {
|
||||
WQLObject.getWQLObject("pdm_bi_subpackagerelation").delete("container_name = '" + pcsn + "'");
|
||||
} else {
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
|
||||
@@ -19,6 +19,8 @@ import org.nl.modules.wql.util.WqlUtil;
|
||||
import org.nl.system.service.param.impl.SysParamServiceImpl;
|
||||
import org.nl.system.service.user.ISysUserService;
|
||||
import org.nl.system.service.user.dao.SysUser;
|
||||
import org.nl.wms.basedata.st.sectattr.service.dao.Sectattr;
|
||||
import org.nl.wms.basedata.st.sectattr.service.dao.mapper.SectattrMapper;
|
||||
import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl;
|
||||
import org.nl.wms.basedata.st.storattr.service.StorattrService;
|
||||
import org.nl.wms.basedata.st.storattr.service.dao.Storattr;
|
||||
@@ -45,7 +47,8 @@ import java.util.stream.Collectors;
|
||||
@Slf4j
|
||||
public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
private final ISysUserService iSysUserService;
|
||||
|
||||
@Autowired
|
||||
private SectattrMapper sectattrMapper;
|
||||
@Autowired
|
||||
private StorattrMapper storattrMapper;
|
||||
@Autowired
|
||||
@@ -166,8 +169,6 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
WQLObject wo_mst = WQLObject.getWQLObject("ST_IVT_IOStorInv");
|
||||
// 物料表
|
||||
WQLObject materTab = WQLObject.getWQLObject("md_me_materialbase");
|
||||
// 库区表
|
||||
WQLObject sectTab = WQLObject.getWQLObject("st_ivt_sectattr");
|
||||
|
||||
//根据出入单类型判断回传业务
|
||||
//1、生产入库:回传MES;手工入库:回传SAP
|
||||
@@ -476,8 +477,6 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
WQLObject wo_mst = WQLObject.getWQLObject("ST_IVT_IOStorInv");
|
||||
// 物料表
|
||||
WQLObject materTab = WQLObject.getWQLObject("md_me_materialbase");
|
||||
// 库区表
|
||||
WQLObject sectTab = WQLObject.getWQLObject("st_ivt_sectattr");
|
||||
// 子卷包装关系表
|
||||
WQLObject subTab = WQLObject.getWQLObject("pdm_bi_subpackagerelationrecord");
|
||||
// 子卷包装关系表
|
||||
@@ -522,9 +521,9 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
JSONObject json2 = disArr.getJSONObject(j);
|
||||
JSONObject jsonDis = new JSONObject();
|
||||
|
||||
JSONObject jsonSect = sectTab.query("sect_id = '" + json2.getString("sect_id") + "'").uniqueResult(0);
|
||||
Sectattr jsonSect = sectattrMapper.selectById(json2.getString("sect_id"));
|
||||
|
||||
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
||||
//jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
|
||||
jsonDtl.put("LGORT", lgort); // 明細储存地点
|
||||
}
|
||||
|
||||
@@ -595,9 +594,9 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
JSONObject json2 = disArr.getJSONObject(j);
|
||||
JSONObject jsonDis = new JSONObject();
|
||||
|
||||
JSONObject jsonSect = sectTab.query("sect_id = '" + json2.getString("sect_id") + "'").uniqueResult(0);
|
||||
Sectattr jsonSect = sectattrMapper.selectById(json2.getString("sect_id"));
|
||||
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
||||
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
|
||||
jsonDtl.put("LGORT", jsonSect.getExt_id()); // 明細储存地点
|
||||
}
|
||||
|
||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "' AND bill_id = '" + json2.getString("iostorinv_id") + "'").uniqueResult(0);
|
||||
@@ -668,7 +667,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
JSONObject json2 = disArr.getJSONObject(j);
|
||||
JSONObject jsonDis = new JSONObject();
|
||||
|
||||
JSONObject jsonSect = sectTab.query("sect_id = '" + json2.getString("sect_id") + "'").uniqueResult(0);
|
||||
Sectattr jsonSect = sectattrMapper.selectById(json2.getString("sect_id"));
|
||||
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
||||
jsonDtl.put("LGORT", lgort); // 明細储存地点
|
||||
}
|
||||
@@ -861,9 +860,9 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
JSONObject json2 = disArr.getJSONObject(j);
|
||||
JSONObject jsonDis = new JSONObject();
|
||||
|
||||
JSONObject jsonSect = sectTab.query("sect_id = '" + json2.getString("sect_id") + "'").uniqueResult(0);
|
||||
Sectattr jsonSect = sectattrMapper.selectById(json2.getString("sect_id"));
|
||||
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
||||
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
|
||||
jsonDtl.put("LGORT", jsonSect.getExt_id()); // 明細储存地点
|
||||
}
|
||||
|
||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "' AND bill_id = '" + json2.getString("iostorinv_id") + "'").uniqueResult(0);
|
||||
@@ -971,8 +970,6 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
WQLObject wo_mst = WQLObject.getWQLObject("ST_IVT_IOStorInv");
|
||||
// 物料表
|
||||
WQLObject materTab = WQLObject.getWQLObject("md_me_materialbase");
|
||||
// 库区表
|
||||
WQLObject sectTab = WQLObject.getWQLObject("st_ivt_sectattr");
|
||||
// 子卷包装关系表
|
||||
WQLObject subTab = WQLObject.getWQLObject("pdm_bi_subpackagerelationrecord");
|
||||
// 子卷包装关系表
|
||||
@@ -1042,7 +1039,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
JSONObject json2 = disArr.getJSONObject(j);
|
||||
JSONObject jsonDis = new JSONObject();
|
||||
|
||||
JSONObject jsonSect = sectTab.query("sect_id = '" + json2.getString("sect_id") + "'").uniqueResult(0);
|
||||
Sectattr jsonSect = sectattrMapper.selectById(json2.getString("sect_id"));
|
||||
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
||||
jsonDtl.put("LGORT", jo_mst.getString("remark")); // 明細储存地点
|
||||
}
|
||||
@@ -1195,9 +1192,9 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
JSONObject json2 = disArr.getJSONObject(j);
|
||||
JSONObject jsonDis = new JSONObject();
|
||||
|
||||
JSONObject jsonSect = sectTab.query("sect_id = '" + json2.getString("sect_id") + "'").uniqueResult(0);
|
||||
Sectattr jsonSect = sectattrMapper.selectById(json2.getString("sect_id"));
|
||||
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
||||
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
|
||||
jsonDtl.put("LGORT", jsonSect.getExt_id()); // 明細储存地点
|
||||
}
|
||||
|
||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "' AND bill_id = '" + json2.getString("iostorinv_id") + "'").uniqueResult(0);
|
||||
@@ -1296,7 +1293,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
JSONObject json2 = disArr.getJSONObject(j);
|
||||
JSONObject jsonDis = new JSONObject();
|
||||
|
||||
JSONObject jsonSect = sectTab.query("sect_id = '" + json2.getString("sect_id") + "'").uniqueResult(0);
|
||||
Sectattr jsonSect = sectattrMapper.selectById(json2.getString("sect_id"));
|
||||
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
||||
jsonDtl.put("LGORT", lgort); // 明細储存地点
|
||||
}
|
||||
@@ -1564,9 +1561,9 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
JSONObject json2 = disArr.getJSONObject(j);
|
||||
JSONObject jsonDis = new JSONObject();
|
||||
|
||||
JSONObject jsonSect = sectTab.query("sect_id = '" + json2.getString("sect_id") + "'").uniqueResult(0);
|
||||
Sectattr jsonSect = sectattrMapper.selectById(json2.getString("sect_id"));
|
||||
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
||||
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
|
||||
jsonDtl.put("LGORT", jsonSect.getExt_id()); // 明細储存地点
|
||||
}
|
||||
|
||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "' AND bill_id = '" + json2.getString("iostorinv_id") + "'").uniqueResult(0);
|
||||
|
||||
Reference in New Issue
Block a user