|
|
@ -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<>(); |
|
|
|