From b1a54910c108f00b6c695bf18743fd3a099d964d Mon Sep 17 00:00:00 2001 From: "USER-20220102CG\\noblelift" <546428999@qq.com> Date: Mon, 21 Aug 2023 14:58:34 +0800 Subject: [PATCH 1/4] =?UTF-8?q?rev=20=E7=9B=91=E6=8E=A7=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- acs/nladmin-ui/src/store/modules/api.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/acs/nladmin-ui/src/store/modules/api.js b/acs/nladmin-ui/src/store/modules/api.js index 212f1ebfd..eecbb94b0 100644 --- a/acs/nladmin-ui/src/store/modules/api.js +++ b/acs/nladmin-ui/src/store/modules/api.js @@ -1,5 +1,7 @@ // 适配 Nginx 反向代理 -const baseUrl = process.env.VUE_APP_BASE_API === '/' ? '' : process.env.VUE_APP_BASE_API +const baseUrl = window.g.prod.VUE_APP_BASE_API === '/' ? '' : window.g.prod.VUE_APP_BASE_API +// window.g.prod.VUE_APP_BASE_API +const baseImageUrl = window.g.prod.VUE_APP_BASE_API const api = { state: { From 7c9209b5aad179f29c5aab3e182875cafdb7126b Mon Sep 17 00:00:00 2001 From: liuxy Date: Mon, 21 Aug 2023 15:09:49 +0800 Subject: [PATCH 2/4] =?UTF-8?q?rev=EF=BC=9A1.=E5=AD=90=E5=8D=B7=E5=8C=85?= =?UTF-8?q?=E8=A3=85=E5=85=B3=E7=B3=BB=E5=AD=97=E6=AE=B5=E7=BB=B4=E6=8A=A4?= =?UTF-8?q?2.=E5=85=A5=E5=BA=93=E6=9F=A5=E8=AF=A2=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E7=BB=B4=E6=8A=A43.=E5=A4=84=E7=90=86?= =?UTF-8?q?=E6=88=90=E5=93=81=E6=8A=A5=E8=A1=A8=E9=83=A8=E5=88=86=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E6=B2=A1=E6=9C=89=E5=80=BC4.=E7=A9=BA=E6=89=98?= =?UTF-8?q?=E7=9B=98=E5=87=BA=E5=BA=93=E4=BB=BB=E5=8A=A1=E5=8F=AA=E7=94=9F?= =?UTF-8?q?=E6=88=90=E4=B8=80=E4=B8=AA=EF=BC=8C=E4=BB=BB=E5=8A=A1=E7=BB=93?= =?UTF-8?q?=E6=9D=9F=E5=90=8E=E5=9C=A8=E7=94=9F=E6=88=90=E4=B8=8B=E4=B8=80?= =?UTF-8?q?=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../acs/service/impl/AcsToWmsServiceImpl.java | 12 + .../impl/ProductInstorServiceImpl.java | 331 +++++++++--------- .../service/impl/InBillQueryServiceImpl.java | 2 +- lms/nladmin-ui/src/views/wms/pdm/bi/index.vue | 8 +- 4 files changed, 192 insertions(+), 161 deletions(-) diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java index ffb33fdda..e3c256272 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java @@ -340,6 +340,18 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { b、没有,则优先找空的巷道;按空位置顺序分配; 3、任务下发,判断巷道的任务类型,只能为空盘入库或者无任务类型; * */ + + // 查询此点位是否有正在进行的任务,如果有则不生成任务 + JSONObject jsonTask = WQLObject.getWQLObject("sch_base_task") + .query("point_code2 = '" + device_code + "' and is_delete = '0' and task_status <> '07'").uniqueResult(0); + + if (ObjectUtil.isNotEmpty(jsonTask)) { + result.put("status", HttpStatus.OK.value()); + result.put("message", "此点位已生成任务,请等待任务结束!"); + log.info("apply返回参数:---------------------------------------------" + result.toString()); + return result; + } + JSONArray empArr = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParam("flag", "22").process().getResultJSONArray(0); JSONObject struct_jo = new JSONObject(); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/ProductInstorServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/ProductInstorServiceImpl.java index bc495abfa..76717d73c 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/ProductInstorServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/ProductInstorServiceImpl.java @@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import lombok.RequiredArgsConstructor; +import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import org.nl.modules.common.exception.BadRequestException; import org.nl.common.utils.SecurityUtils; @@ -29,11 +30,14 @@ import org.nl.wms.sch.tasks.InTask; import org.nl.wms.st.inbill.service.RawAssistIStorService; import org.nl.wms.st.inbill.service.StorPublicService; import org.nl.wms.st.inbill.service.impl.InbillServiceImpl; +import org.redisson.api.RLock; +import org.redisson.api.RedissonClient; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; import java.util.HashMap; +import java.util.concurrent.TimeUnit; /** * @author zhouz @@ -53,6 +57,8 @@ public class ProductInstorServiceImpl implements ProductInstorService { private final CutConveyorTask cutConveyorTask; + private final RedissonClient redissonClient; + @Override public JSONObject boxQuery(JSONObject whereJson) { String box_no = whereJson.getString("box_no"); @@ -91,6 +97,7 @@ public class ProductInstorServiceImpl implements ProductInstorService { @Override @Transactional(rollbackFor = Exception.class) + @SneakyThrows public JSONObject confirm(JSONObject whereJson) { String box_no = whereJson.getString("box_no"); //1-报废入库;2-生产入库;3-退货入库;4-拆分入库 @@ -117,170 +124,182 @@ public class ProductInstorServiceImpl implements ProductInstorService { JSONObject mst_jo = new JSONObject(); mst_jo.put("tableData", box_rows); mst_jo.put("biz_date", DateUtil.now()); - if (option.equals("1")) { - mst_jo.put("bill_type", "0003"); - } - if (option.equals("2")) { - mst_jo.put("bill_type", "0001"); - } - if (option.equals("3")) { - mst_jo.put("bill_type", "0002"); - } - if (option.equals("4")) { - mst_jo.put("bill_type", "0005"); - } - HashMap box_map = box_rows.get(0); - Object sub_type = box_map.get("sub_type"); - if (ObjectUtil.isNotEmpty(sub_type)){ - if (sub_type.equals("1")){ - //如果为返检的包装关系则变为返检入库 - mst_jo.put("bill_type", "0006"); - } - } - //查询成品库仓库 - JSONObject stor = WQLObject.getWQLObject("st_ivt_bsrealstorattr").query("is_delete = '0' AND is_used = '1' AND is_productstore = '1'").uniqueResult(0); - mst_jo.put("stor_id", stor.getString("stor_id")); - mst_jo.put("stor_code", stor.getString("stor_code")); - mst_jo.put("stor_name", stor.getString("stor_name")); - mst_jo.put("detail_count", box_rows.size()); - mst_jo.put("total_qty", "0"); - mst_jo.put("bill_status", "10"); // 生成 - String iostorinv_id = ""; - //查询该木箱是否存在未完成的入库单 - JSONObject box_mst_jo = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParam("flag", "26").addParam("box_no", box_no).process().uniqueResult(0); - if (ObjectUtil.isNotEmpty(box_mst_jo)) { - iostorinv_id = box_mst_jo.getString("iostorinv_id"); - } else { - iostorinv_id = rawAssistIStorService.insertDtl(mst_jo); - } - - //判断是否虚拟 - if (!is_virtual.equals("1")) { - //判断是该包装计划是否存在长宽高 - JSONObject sub_jo = WQLObject.getWQLObject("pdm_bi_subpackagerelation").query("package_box_SN = '" + box_no + "'").uniqueResult(0); - Double box_length = sub_jo.getDoubleValue("box_length"); - Double box_width = sub_jo.getDoubleValue("box_width"); - Double box_high = sub_jo.getDoubleValue("box_high"); - - // 木箱长、宽、高不能为0 - if (box_length <= 0 || box_width <= 0 || box_high <= 0) { - throw new BadRequestException("该木箱没有长宽高信息,无法入库,请到子卷包装关系中维护!"); - } - // 木箱尺寸长度低于950的不入立体库,长度大于1385的立体库无法入库 - String length_up = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("box_length_up").getValue(); - String length_down = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("box_length_down").getValue(); - String with_up = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("box_with_up").getValue(); - String high_up = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("box_high_up").getValue(); - - Double box_length_up = Double.valueOf(length_up); // 木箱长度上限 - Double box_length_down = Double.valueOf(length_down); // 木箱长度下限 - Double box_with_up = Double.valueOf(with_up); // 木箱宽度上限 - Double box_high_up = Double.valueOf(high_up); // 木箱高度上限 - - if (!(box_length_down <= box_length && box_length <= box_length_up)) { - throw new BadRequestException("无法入立体库,木箱超长;当前木箱长度为:"+box_length); - } - - if (!(box_width <= box_with_up)) { - throw new BadRequestException("无法入立体库,木箱超宽;当前木箱宽度为:"+box_width); - } - - if (!(box_high <= box_high_up)) { - throw new BadRequestException("无法入立体库,木箱超高;当前木箱高度为:"+box_high); - } - - JSONObject point_jo = WQLObject.getWQLObject("sch_base_point").query("point_code = '" + point_code + "'").uniqueResult(0); - if (ObjectUtil.isEmpty(point_jo)) { - throw new BadRequestException("未查询到对应的点位!"); - } else { - if (point_jo.getString("is_used").equals("0")) { - throw new BadRequestException("该点位已经被禁用!"); + RLock lock = redissonClient.getLock("pda_ioIn:" + option); + boolean tryLock = lock.tryLock(5, TimeUnit.SECONDS); + try { + if (tryLock) { + if (option.equals("1")) { + mst_jo.put("bill_type", "0003"); } - if (point_jo.getString("is_delete").equals("1")) { - throw new BadRequestException("该点位已经被删除!"); + if (option.equals("2")) { + mst_jo.put("bill_type", "0001"); } - if (!point_jo.getString("region_code").equals("NBJ01")) { - throw new BadRequestException("请扫描内包间入库点位!"); + if (option.equals("3")) { + mst_jo.put("bill_type", "0002"); } - } - //创建二楼去一楼的任务 - JSONObject form = new JSONObject(); - form.put("point_code1", point_code); - form.put("point_code2", "NTB01"); - form.put("vehicle_code", box_no); - form.put("task_type", "010507"); - cutConveyorTask.createTask(form); - } else { - JSONArray now_dis_rows = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParam("flag", "18").addParam("box_no", map.get("box_no")).process().getResultJSONArray(0); - if (now_dis_rows.size() > 0) { - throw new BadRequestException("该木箱已经分配过货位,无法继续分配!"); - } - - String task_id = IdUtil.getSnowflake(1, 1).nextId() + ""; - //直接分配虚拟区货位,并确认 - JSONObject struct = WQL.getWO("PDA_ST_01").addParam("flag", "3").addParam("stor_id", stor.getString("stor_id")).process().uniqueResult(0); - - HashMap dis_map = new HashMap(); - dis_map.put("sect_id", struct.getString("sect_id")); - dis_map.put("sect_code", struct.getString("sect_code")); - dis_map.put("sect_name", struct.getString("sect_name")); - dis_map.put("struct_id", struct.getString("struct_id")); - dis_map.put("struct_code", struct.getString("struct_code")); - dis_map.put("struct_name", struct.getString("struct_name")); - dis_map.put("work_status", "01"); - dis_map.put("task_id", task_id); - - //更新该木箱明细对应的分配 - WQLObject.getWQLObject("ST_IVT_IOStorInvDis").update(dis_map, "iostorinv_id = '" + iostorinv_id + "' AND box_no = '" + box_no + "'"); - - //修改库存 - //直接取出入库分配表的库存 - mst_jo = WQLObject.getWQLObject("ST_IVT_IOStorInv").query("iostorinv_id = '" + iostorinv_id + "'").uniqueResult(0); - JSONArray dis_rows = WQLObject.getWQLObject("ST_IVT_IOStorInvDis").query("iostorinv_id = '" + iostorinv_id + "' AND box_no = '" + map.get("box_no") + "'").getResultJSONArray(0); - for (int i = 0; i < dis_rows.size(); i++) { - JSONObject dis_jo = dis_rows.getJSONObject(i); - JSONObject i_form = new JSONObject(); - i_form.put("struct_id", dis_jo.getString("struct_id")); - i_form.put("material_id", dis_jo.getString("material_id")); - i_form.put("pcsn", dis_jo.getString("pcsn")); - i_form.put("change_qty", dis_jo.getString("plan_qty")); - i_form.put("bill_type_scode", mst_jo.getString("bill_type")); - i_form.put("quality_scode", "01"); - i_form.put("inv_id", mst_jo.getString("iostorinv_id")); - i_form.put("bill_code", mst_jo.getString("bill_code")); - i_form.put("bill_table", "ST_IVT_IOStorInv"); - i_form.put("qty_unit_id", dis_jo.getString("qty_unit_id")); - i_form.put("qty_unit_name", dis_jo.getString("qty_unit_name")); - storPublicService.IOStor(i_form, "31"); - - //更新明细表状态 - JSONObject dtl_jo = WQLObject.getWQLObject("ST_IVT_IOStorInvDtl").query("iostorinvdtl_id = '" + dis_jo.getString("iostorinvdtl_id") + "'").uniqueResult(0); - if (dtl_jo.getDoubleValue("unassign_qty") == 0) { - //判断该明细下是否还存在未分配货位的分配明细 - JSONArray disdiv_rows = WQLObject.getWQLObject("ST_IVT_IOStorInvDis").query("iostorinvdtl_id = '" + dis_jo.getString("iostorinvdtl_id") + "' AND (struct_id = '' OR struct_id is null) AND (point_id = '' OR point_id is null)").getResultJSONArray(0); - if (disdiv_rows.size() == 0) { - dtl_jo.put("bill_status", "40"); - WQLObject.getWQLObject("ST_IVT_IOStorInvDtl").update(dtl_jo); - //判断主表下的明细是否都为40 - JSONArray dtl_rows = WQLObject.getWQLObject("ST_IVT_IOStorInvDtl").query("iostorinv_id = '" + dis_jo.getString("iostorinv_id") + "' AND bill_status < '40'").getResultJSONArray(0); - if (dtl_rows.size() == 0) { - mst_jo.put("bill_status", "40"); - mst_jo.put("dis_optid", currentUserId); - mst_jo.put("dis_optname", nickName); - mst_jo.put("dis_time", DateUtil.now()); - WQLObject.getWQLObject("ST_IVT_IOStorInv").update(mst_jo); - } + if (option.equals("4")) { + mst_jo.put("bill_type", "0005"); + } + HashMap box_map = box_rows.get(0); + Object sub_type = box_map.get("sub_type"); + if (ObjectUtil.isNotEmpty(sub_type)){ + if (sub_type.equals("1")){ + //如果为返检的包装关系则变为返检入库 + mst_jo.put("bill_type", "0006"); } } + //查询成品库仓库 + JSONObject stor = WQLObject.getWQLObject("st_ivt_bsrealstorattr").query("is_delete = '0' AND is_used = '1' AND is_productstore = '1'").uniqueResult(0); + mst_jo.put("stor_id", stor.getString("stor_id")); + mst_jo.put("stor_code", stor.getString("stor_code")); + mst_jo.put("stor_name", stor.getString("stor_name")); + mst_jo.put("detail_count", box_rows.size()); + mst_jo.put("total_qty", "0"); + mst_jo.put("bill_status", "10"); // 生成 + String iostorinv_id = ""; + + //查询该木箱是否存在未完成的入库单 + JSONObject box_mst_jo = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParam("flag", "26").addParam("box_no", box_no).process().uniqueResult(0); + if (ObjectUtil.isNotEmpty(box_mst_jo)) { + iostorinv_id = box_mst_jo.getString("iostorinv_id"); + } else { + iostorinv_id = rawAssistIStorService.insertDtl(mst_jo); + } + + //判断是否虚拟 + if (!is_virtual.equals("1")) { + //判断是该包装计划是否存在长宽高 + JSONObject sub_jo = WQLObject.getWQLObject("pdm_bi_subpackagerelation").query("package_box_SN = '" + box_no + "'").uniqueResult(0); + Double box_length = sub_jo.getDoubleValue("box_length"); + Double box_width = sub_jo.getDoubleValue("box_width"); + Double box_high = sub_jo.getDoubleValue("box_high"); + + // 木箱长、宽、高不能为0 + if (box_length <= 0 || box_width <= 0 || box_high <= 0) { + throw new BadRequestException("该木箱没有长宽高信息,无法入库,请到子卷包装关系中维护!"); + } + // 木箱尺寸长度低于950的不入立体库,长度大于1385的立体库无法入库 + String length_up = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("box_length_up").getValue(); + String length_down = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("box_length_down").getValue(); + String with_up = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("box_with_up").getValue(); + String high_up = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("box_high_up").getValue(); + + Double box_length_up = Double.valueOf(length_up); // 木箱长度上限 + Double box_length_down = Double.valueOf(length_down); // 木箱长度下限 + Double box_with_up = Double.valueOf(with_up); // 木箱宽度上限 + Double box_high_up = Double.valueOf(high_up); // 木箱高度上限 + + if (!(box_length_down <= box_length && box_length <= box_length_up)) { + throw new BadRequestException("无法入立体库,木箱超长;当前木箱长度为:"+box_length); + } + + if (!(box_width <= box_with_up)) { + throw new BadRequestException("无法入立体库,木箱超宽;当前木箱宽度为:"+box_width); + } + + if (!(box_high <= box_high_up)) { + throw new BadRequestException("无法入立体库,木箱超高;当前木箱高度为:"+box_high); + } + + JSONObject point_jo = WQLObject.getWQLObject("sch_base_point").query("point_code = '" + point_code + "'").uniqueResult(0); + if (ObjectUtil.isEmpty(point_jo)) { + throw new BadRequestException("未查询到对应的点位!"); + } else { + if (point_jo.getString("is_used").equals("0")) { + throw new BadRequestException("该点位已经被禁用!"); + } + if (point_jo.getString("is_delete").equals("1")) { + throw new BadRequestException("该点位已经被删除!"); + } + if (!point_jo.getString("region_code").equals("NBJ01")) { + throw new BadRequestException("请扫描内包间入库点位!"); + } + } + //创建二楼去一楼的任务 + JSONObject form = new JSONObject(); + form.put("point_code1", point_code); + form.put("point_code2", "NTB01"); + form.put("vehicle_code", box_no); + form.put("task_type", "010507"); + cutConveyorTask.createTask(form); + } else { + JSONArray now_dis_rows = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParam("flag", "18").addParam("box_no", map.get("box_no")).process().getResultJSONArray(0); + if (now_dis_rows.size() > 0) { + throw new BadRequestException("该木箱已经分配过货位,无法继续分配!"); + } + + String task_id = IdUtil.getSnowflake(1, 1).nextId() + ""; + //直接分配虚拟区货位,并确认 + JSONObject struct = WQL.getWO("PDA_ST_01").addParam("flag", "3").addParam("stor_id", stor.getString("stor_id")).process().uniqueResult(0); + + HashMap dis_map = new HashMap(); + dis_map.put("sect_id", struct.getString("sect_id")); + dis_map.put("sect_code", struct.getString("sect_code")); + dis_map.put("sect_name", struct.getString("sect_name")); + dis_map.put("struct_id", struct.getString("struct_id")); + dis_map.put("struct_code", struct.getString("struct_code")); + dis_map.put("struct_name", struct.getString("struct_name")); + dis_map.put("work_status", "01"); + dis_map.put("task_id", task_id); + + //更新该木箱明细对应的分配 + WQLObject.getWQLObject("ST_IVT_IOStorInvDis").update(dis_map, "iostorinv_id = '" + iostorinv_id + "' AND box_no = '" + box_no + "'"); + + //修改库存 + //直接取出入库分配表的库存 + mst_jo = WQLObject.getWQLObject("ST_IVT_IOStorInv").query("iostorinv_id = '" + iostorinv_id + "'").uniqueResult(0); + JSONArray dis_rows = WQLObject.getWQLObject("ST_IVT_IOStorInvDis").query("iostorinv_id = '" + iostorinv_id + "' AND box_no = '" + map.get("box_no") + "'").getResultJSONArray(0); + for (int i = 0; i < dis_rows.size(); i++) { + JSONObject dis_jo = dis_rows.getJSONObject(i); + JSONObject i_form = new JSONObject(); + i_form.put("struct_id", dis_jo.getString("struct_id")); + i_form.put("material_id", dis_jo.getString("material_id")); + i_form.put("pcsn", dis_jo.getString("pcsn")); + i_form.put("change_qty", dis_jo.getString("plan_qty")); + i_form.put("bill_type_scode", mst_jo.getString("bill_type")); + i_form.put("quality_scode", "01"); + i_form.put("inv_id", mst_jo.getString("iostorinv_id")); + i_form.put("bill_code", mst_jo.getString("bill_code")); + i_form.put("bill_table", "ST_IVT_IOStorInv"); + i_form.put("qty_unit_id", dis_jo.getString("qty_unit_id")); + i_form.put("qty_unit_name", dis_jo.getString("qty_unit_name")); + storPublicService.IOStor(i_form, "31"); + + //更新明细表状态 + JSONObject dtl_jo = WQLObject.getWQLObject("ST_IVT_IOStorInvDtl").query("iostorinvdtl_id = '" + dis_jo.getString("iostorinvdtl_id") + "'").uniqueResult(0); + if (dtl_jo.getDoubleValue("unassign_qty") == 0) { + //判断该明细下是否还存在未分配货位的分配明细 + JSONArray disdiv_rows = WQLObject.getWQLObject("ST_IVT_IOStorInvDis").query("iostorinvdtl_id = '" + dis_jo.getString("iostorinvdtl_id") + "' AND (struct_id = '' OR struct_id is null) AND (point_id = '' OR point_id is null)").getResultJSONArray(0); + if (disdiv_rows.size() == 0) { + dtl_jo.put("bill_status", "40"); + WQLObject.getWQLObject("ST_IVT_IOStorInvDtl").update(dtl_jo); + //判断主表下的明细是否都为40 + JSONArray dtl_rows = WQLObject.getWQLObject("ST_IVT_IOStorInvDtl").query("iostorinv_id = '" + dis_jo.getString("iostorinv_id") + "' AND bill_status < '40'").getResultJSONArray(0); + if (dtl_rows.size() == 0) { + mst_jo.put("bill_status", "40"); + mst_jo.put("dis_optid", currentUserId); + mst_jo.put("dis_optname", nickName); + mst_jo.put("dis_time", DateUtil.now()); + WQLObject.getWQLObject("ST_IVT_IOStorInv").update(mst_jo); + } + } + } + } + + //调用入库分配确认方法 + InbillServiceImpl inbillService = SpringContextHolder.getBean(InbillServiceImpl.class); + JSONObject dis_form = new JSONObject(); + dis_form.put("task_id", task_id); + inbillService.confirmDis(dis_form); + + } } - //调用入库分配确认方法 - InbillServiceImpl inbillService = SpringContextHolder.getBean(InbillServiceImpl.class); - JSONObject dis_form = new JSONObject(); - dis_form.put("task_id", task_id); - inbillService.confirmDis(dis_form); - + } finally { + if (tryLock) { + lock.unlock(); + } } JSONObject jo = new JSONObject(); jo.put("message", "确认成功!"); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/stat/service/impl/InBillQueryServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/stat/service/impl/InBillQueryServiceImpl.java index fe4b1c664..4a9ba09f7 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/stat/service/impl/InBillQueryServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/stat/service/impl/InBillQueryServiceImpl.java @@ -243,7 +243,7 @@ public class InBillQueryServiceImpl implements InBillQueryService { mp.put("班次", json.getString("classes")); mp.put("库区", json.getString("sect_name")); mp.put("客户编码", json.getString("customer_name")); - mp.put("客户订单号", json.getString("sale_order_name")); + mp.put("销售订单及行号", json.getString("sale_order_name")); mp.put("生产日期", json.getString("date_of_production").replace("-","/")); mp.put("箱号", json.getString("box_no")); mp.put("生产批号", (json.getString("confirm_time").substring(0,10)).replace("-","").trim()); diff --git a/lms/nladmin-ui/src/views/wms/pdm/bi/index.vue b/lms/nladmin-ui/src/views/wms/pdm/bi/index.vue index 024860e9c..4ea5a574d 100644 --- a/lms/nladmin-ui/src/views/wms/pdm/bi/index.vue +++ b/lms/nladmin-ui/src/views/wms/pdm/bi/index.vue @@ -87,7 +87,7 @@ @change="hand" /> - + - + @@ -473,8 +473,8 @@ />