diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/constant/MaterOptTypeEnum.java b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/constant/MaterOptTypeEnum.java deleted file mode 100644 index 3c81f3c..0000000 --- a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/constant/MaterOptTypeEnum.java +++ /dev/null @@ -1,91 +0,0 @@ -package org.nl.wms.basedata.master.constant; - -import com.alibaba.fastjson.JSONObject; - -/** - * 获取物料操作类型 - */ -public enum MaterOptTypeEnum { - QBWL(1, "00", "全部物料", "('1')", ""), - BCP(2, "01", "管件半成品", "('1528555443906023424')", ""), - YCL(3, "02", "管件原材料", "('1503644349995552768')", ""), - CP(4, "03", "关键成品", "('1528555444031852544')", ""); - - - //顺序号 - private int index; - //编码 - private String code; - //名字 - private String name; - //分类标识串 - private String class_idStr; - //描述 - private String desc; - - public static JSONObject getObj(String code) { - for (MaterOptTypeEnum item : values()) { - if (item.getCode().equals(code)) { - JSONObject json = new JSONObject(); - json.put("index", item.getIndex()); - json.put("code", item.getCode()); - json.put("name", item.getName()); - json.put("class_idStr", item.getClass_idStr()); - json.put("desc", item.getDesc()); - return json; - } - } - - return null; - - } - - - private MaterOptTypeEnum(int index, String code, String name, String class_idStr, String desc) { - this.index = index; - this.code = code; - this.name = name; - this.class_idStr = class_idStr; - this.desc = desc; - } - - public String getClass_idStr() { - return class_idStr; - } - - public void setClass_idStr(String class_idStr) { - this.class_idStr = class_idStr; - } - - public String getDesc() { - return desc; - } - - public void setDesc(String desc) { - this.desc = desc; - } - - public int getIndex() { - return index; - } - - public void setIndex(int index) { - this.index = index; - } - - public String getCode() { - return code; - } - - public void setCode(String code) { - this.code = code; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } -} diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/transport/service/impl/TransportationBaseServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/transport/service/impl/TransportationBaseServiceImpl.java index 3dd7472..7cb611e 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/transport/service/impl/TransportationBaseServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/transport/service/impl/TransportationBaseServiceImpl.java @@ -49,6 +49,7 @@ public class TransportationBaseServiceImpl extends ServiceImpl lam = new QueryWrapper().lambda(); lam.eq(TransportationBase::getCust_code, code); + lam.eq(TransportationBase::getIs_delete,"0"); return getOne(lam); } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/ext/mes/service/impl/MesToLmsServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/ext/mes/service/impl/MesToLmsServiceImpl.java index f6b63d1..fe154d3 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/ext/mes/service/impl/MesToLmsServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/ext/mes/service/impl/MesToLmsServiceImpl.java @@ -42,6 +42,8 @@ import org.nl.modules.wql.util.SpringContextHolder; import org.nl.system.service.param.impl.SysParamServiceImpl; import org.nl.wms.basedata.master.customer.service.dao.Customerbase; import org.nl.wms.basedata.master.customer.service.dao.mapper.CustomerbaseMapper; +import org.nl.wms.basedata.master.interfaceback.service.dao.InterfaceBack; +import org.nl.wms.basedata.master.interfaceback.service.dao.mapper.InterfaceBackMapper; import org.nl.wms.basedata.master.materialbase.service.dao.Materialbase; import org.nl.wms.basedata.master.materialbase.service.dao.mapper.MaterialbaseMapper; import org.nl.wms.basedata.master.unit.service.dao.Unit; @@ -75,6 +77,8 @@ public class MesToLmsServiceImpl implements MesToLmsService { private final InService inService; @Autowired + private InterfaceBackMapper interfaceBackMapper; + @Autowired private UnitMapper unitMapper; @Autowired private IPdmBiSlittingproductionplanService slittingproductionplanService; @@ -515,8 +519,11 @@ public class MesToLmsServiceImpl implements MesToLmsService { mes_jo.put("PassWord", passWord); //判断该接口是否需要回传 - JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'momRollSemiFGInboundComplete'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) { + LambdaQueryWrapper lam = new LambdaQueryWrapper<>(); + lam.eq(InterfaceBack::getInterface_name, "momRollSemiFGInboundComplete"); + lam.eq(InterfaceBack::getIs_back, "1"); + InterfaceBack back_jo = interfaceBackMapper.selectOne(lam); + if (ObjectUtil.isNotEmpty(back_jo)) { new LmsToMesServiceImpl().momRollSemiFGInboundComplete(param); } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/ext/szls/service/impl/LmsToBigScreenServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/ext/szls/service/impl/LmsToBigScreenServiceImpl.java index dd2fa72..efaca2b 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/ext/szls/service/impl/LmsToBigScreenServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/ext/szls/service/impl/LmsToBigScreenServiceImpl.java @@ -4,12 +4,15 @@ import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.nl.common.utils.MapOf; import org.nl.modules.wql.WQL; import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.util.SpringContextHolder; +import org.nl.wms.basedata.master.faultdevice.service.dao.MonitorDevice; +import org.nl.wms.basedata.master.faultdevice.service.dao.mapper.MonitorDeviceMapper; import org.nl.wms.ext.acs.service.WmsToAcsService; import org.nl.wms.ext.szls.service.LmsToBigScreenService; import org.nl.wms.sch.manage.AutoQueryProudDayData; @@ -18,6 +21,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.math.BigDecimal; +import java.util.Collections; +import java.util.List; @Service @RequiredArgsConstructor @@ -26,7 +31,8 @@ public class LmsToBigScreenServiceImpl implements LmsToBigScreenService { @Autowired private final WmsToAcsService wmsToAcsService; - + @Autowired + private final MonitorDeviceMapper monitorDeviceMapper; @Override public JSONObject getDeviceInfo(JSONObject jo) { JSONObject json = new JSONObject(); @@ -35,8 +41,12 @@ public class LmsToBigScreenServiceImpl implements LmsToBigScreenService { if (product_area.startsWith("B")) { continue; } - JSONArray rows = WQLObject.getWQLObject("em_bi_monitordevice").query("send_szls = '1' AND product_area = '" + product_area + "'").getResultJSONArray(0); - JSONObject device_info = wmsToAcsService.getHotPointStatus(rows); + LambdaQueryWrapper lam = new LambdaQueryWrapper(); + lam.eq(MonitorDevice::getSend_szls,"1"); + lam.eq(MonitorDevice::getProduct_area,product_area); + List monitorDeviceList = monitorDeviceMapper.selectList(lam); + JSONArray ja = new JSONArray(Collections.singletonList(monitorDeviceList)); + JSONObject device_info = wmsToAcsService.getHotPointStatus(ja); json.put(product_area, device_info.getJSONArray("data")); } return json; diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/CasingServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/CasingServiceImpl.java index 2bf18fe..7fbbb02 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/CasingServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/CasingServiceImpl.java @@ -5,6 +5,7 @@ import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.nl.common.utils.SecurityUtils; @@ -12,6 +13,8 @@ import org.nl.modules.common.exception.BadRequestException; import org.nl.modules.wql.WQL; import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.core.content.HttpContext; +import org.nl.wms.basedata.master.interfaceback.service.dao.InterfaceBack; +import org.nl.wms.basedata.master.interfaceback.service.dao.mapper.InterfaceBackMapper; import org.nl.wms.basedata.master.storagevehicleinfo.service.StoragevehicleinfoService; import org.nl.wms.basedata.master.storagevehicleinfo.service.dao.Storagevehicleinfo; import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl; @@ -31,6 +34,8 @@ public class CasingServiceImpl implements CasingService { private final LmsToMesService lmsToMesService; @Autowired StoragevehicleinfoService storagevehicleinfoService; + @Autowired + private InterfaceBackMapper interfaceBackMapper; @Override public JSONObject queryMaterialInfo(JSONObject whereJson, HttpContext ctx) { String product_area = whereJson.getString("product_area"); @@ -171,8 +176,11 @@ public class CasingServiceImpl implements CasingService { JSONObject jo = new JSONObject(); jo.put("container_name", row.getString("container_name")); //判断该接口是否需要回传 - JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'airSwellWithPaperTubeAssComplete'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) { + LambdaQueryWrapper lam = new LambdaQueryWrapper<>(); + lam.eq(InterfaceBack::getInterface_name, "airSwellWithPaperTubeAssComplete"); + lam.eq(InterfaceBack::getIs_back, "1"); + InterfaceBack back_jo = interfaceBackMapper.selectOne(lam); + if (ObjectUtil.isNotEmpty(back_jo)) { lmsToMesService.airSwellWithPaperTubeAssComplete(jo); } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/HandleBakingServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/HandleBakingServiceImpl.java index f699842..a2fb07d 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/HandleBakingServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/HandleBakingServiceImpl.java @@ -5,6 +5,7 @@ import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.nl.common.utils.SecurityUtils; @@ -13,9 +14,12 @@ import org.nl.common.utils.CodeUtil; import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.util.SpringContextHolder; import org.nl.system.service.param.impl.SysParamServiceImpl; +import org.nl.wms.basedata.master.interfaceback.service.dao.InterfaceBack; +import org.nl.wms.basedata.master.interfaceback.service.dao.mapper.InterfaceBackMapper; import org.nl.wms.ext.mes.service.LmsToMesService; import org.nl.wms.ext.mes.service.impl.LmsToMesServiceImpl; import org.nl.wms.pda.mps.service.HandleBakingService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -23,7 +27,8 @@ import org.springframework.transaction.annotation.Transactional; @RequiredArgsConstructor @Slf4j public class HandleBakingServiceImpl implements HandleBakingService { - + @Autowired + private InterfaceBackMapper interfaceBackMapper; /* * 业务流程: * 入烤箱: @@ -174,8 +179,11 @@ public class HandleBakingServiceImpl implements HandleBakingService { param.put("PassWord", passWord); //判断该接口是否需要回传 - JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'momRollBakeInBound'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) { + LambdaQueryWrapper lam = new LambdaQueryWrapper<>(); + lam.eq(InterfaceBack::getInterface_name, "momRollBakeInBound"); + lam.eq(InterfaceBack::getIs_back, "1"); + InterfaceBack back_jo = interfaceBackMapper.selectOne(lam); + if (ObjectUtil.isNotEmpty(back_jo)) { SpringContextHolder.getBean(LmsToMesService.class).momRollBakeInBound(param); } @@ -274,8 +282,11 @@ public class HandleBakingServiceImpl implements HandleBakingService { param.put("iabxActualBakingTimer", last_hot_mst.getDoubleValue("oven_time")); //判断该接口是否需要回传 - JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'momRollBakeOutBound'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) { + LambdaQueryWrapper lam = new LambdaQueryWrapper<>(); + lam.eq(InterfaceBack::getInterface_name, "momRollBakeOutBound"); + lam.eq(InterfaceBack::getIs_back, "1"); + InterfaceBack back_jo = interfaceBackMapper.selectOne(lam); + if (ObjectUtil.isNotEmpty(back_jo)) { SpringContextHolder.getBean(LmsToMesService.class).momRollBakeOutBound(param); } } @@ -321,8 +332,11 @@ public class HandleBakingServiceImpl implements HandleBakingService { param.put("PassWord", passWord); //判断该接口是否需要回传 - JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'momRollSemiFGInboundComplete'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) { + LambdaQueryWrapper lam = new LambdaQueryWrapper<>(); + lam.eq(InterfaceBack::getInterface_name, "momRollSemiFGInboundComplete"); + lam.eq(InterfaceBack::getIs_back, "1"); + InterfaceBack back_jo = interfaceBackMapper.selectOne(lam); + if (ObjectUtil.isNotEmpty(back_jo)) { SpringContextHolder.getBean(LmsToMesService.class).momRollSemiFGInboundComplete(param); } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/PointStatusServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/PointStatusServiceImpl.java index 6d2a028..4072d3a 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/PointStatusServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/PointStatusServiceImpl.java @@ -3,12 +3,16 @@ package org.nl.wms.pda.mps.service.impl; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.nl.modules.common.exception.BadRequestException; import org.nl.modules.wql.core.bean.WQLObject; +import org.nl.wms.basedata.master.interfaceback.service.dao.InterfaceBack; +import org.nl.wms.basedata.master.interfaceback.service.dao.mapper.InterfaceBackMapper; import org.nl.wms.ext.mes.service.LmsToMesService; import org.nl.wms.pda.mps.service.PointStatusService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.HashMap; @@ -20,6 +24,8 @@ import java.util.HashMap; public class PointStatusServiceImpl implements PointStatusService { private final LmsToMesService lmsToMesService; + @Autowired + private InterfaceBackMapper interfaceBackMapper; @Override public JSONObject pointOperate(JSONObject whereJson) { @@ -99,8 +105,11 @@ public class PointStatusServiceImpl implements PointStatusService { mom_jo.put("contain_name", container_name); mom_jo.put("warehouse", "1"); //判断该接口是否需要回传 - JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'momRollSemiFGInboundComplete'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) { + LambdaQueryWrapper lam = new LambdaQueryWrapper<>(); + lam.eq(InterfaceBack::getInterface_name, "momRollSemiFGInboundComplete"); + lam.eq(InterfaceBack::getIs_back, "1"); + InterfaceBack back_jo = interfaceBackMapper.selectOne(lam); + if (ObjectUtil.isNotEmpty(back_jo)) { lmsToMesService.cutPlanMomRollDeliveryComplete(mom_jo); } } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/ShippingServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/ShippingServiceImpl.java index b6755f3..e414839 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/ShippingServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/ShippingServiceImpl.java @@ -4,14 +4,18 @@ import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; 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.master.interfaceback.service.dao.InterfaceBack; +import org.nl.wms.basedata.master.interfaceback.service.dao.mapper.InterfaceBackMapper; import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl; import org.nl.wms.pda.mps.service.ShippingService; import org.nl.wms.sch.tasks.CutConveyorTask; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -23,7 +27,8 @@ import java.util.HashMap; public class ShippingServiceImpl implements ShippingService { private final CutConveyorTask cutConveyorTask; - + @Autowired + private InterfaceBackMapper interfaceBackMapper; @Override public JSONObject queryMaterialInfo(JSONObject whereJson) { String product_area = whereJson.getString("product_area"); @@ -171,9 +176,13 @@ public class ShippingServiceImpl implements ShippingService { //判断该气涨轴对应的分切计划是否呼叫,如果没有呼叫不允许配送 //判断该接口是否需要卡MES是否呼叫 - JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'callNextAssAndMomRoll'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) { - String product_areas = back_jo.getString("product_area"); + LambdaQueryWrapper lam = new LambdaQueryWrapper<>(); + lam.eq(InterfaceBack::getInterface_name, "callNextAssAndMomRoll"); + lam.eq(InterfaceBack::getIs_back, "1"); + InterfaceBack back_jo = interfaceBackMapper.selectOne(lam); + + if (ObjectUtil.isNotEmpty(back_jo)) { + String product_areas = back_jo.getProduct_area(); if (StrUtil.isNotEmpty(product_areas) && product_areas.contains(product_area)) { for (int i = 0; i < plan.size(); i++) { JSONObject plan_jos = plan.getJSONObject(i); @@ -453,9 +462,13 @@ public class ShippingServiceImpl implements ShippingService { //判断该气涨轴对应的分切计划是否呼叫,如果没有呼叫不允许配送 //判断该接口是否需要卡MES是否呼叫 - JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'callNextAssAndMomRoll'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) { - String product_areas = back_jo.getString("product_area"); + LambdaQueryWrapper lam = new LambdaQueryWrapper<>(); + lam.eq(InterfaceBack::getInterface_name, "callNextAssAndMomRoll"); + lam.eq(InterfaceBack::getIs_back, "1"); + InterfaceBack back_jo = interfaceBackMapper.selectOne(lam); + + if (ObjectUtil.isNotEmpty(back_jo)) { + String product_areas = back_jo.getProduct_area(); if (StrUtil.isNotEmpty(product_areas) && product_areas.contains(product_area)) { for (int i = 0; i < plan.size(); i++) { JSONObject plan_jos = plan.getJSONObject(i); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/CoolPointIvtServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/CoolPointIvtServiceImpl.java index 914870d..38251e9 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/CoolPointIvtServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/CoolPointIvtServiceImpl.java @@ -9,6 +9,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.conditions.query.LambdaQueryWrapper; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.nl.common.utils.SecurityUtils; @@ -18,11 +19,14 @@ import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.util.SpringContextHolder; import org.nl.modules.wql.util.WqlUtil; import org.nl.system.service.param.impl.SysParamServiceImpl; +import org.nl.wms.basedata.master.interfaceback.service.dao.InterfaceBack; +import org.nl.wms.basedata.master.interfaceback.service.dao.mapper.InterfaceBackMapper; import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl; import org.nl.wms.ext.mes.service.LmsToMesService; import org.nl.wms.ext.mes.service.impl.LmsToMesServiceImpl; import org.nl.wms.pdm.ivt.service.CoolPointIvtService; import org.nl.wms.pdm.ivt.service.dto.CoolPointIvtDto; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -40,7 +44,8 @@ import java.util.Map; @RequiredArgsConstructor @Slf4j public class CoolPointIvtServiceImpl implements CoolPointIvtService { - + @Autowired + private InterfaceBackMapper interfaceBackMapper; @Override public Map queryAll(Map whereJson, Pageable page) { @@ -213,8 +218,12 @@ public class CoolPointIvtServiceImpl implements CoolPointIvtService { param.put("PassWord", passWord); //判断该接口是否需要回传 - JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'momRollSemiFGInboundComplete'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) { + LambdaQueryWrapper lam = new LambdaQueryWrapper<>(); + lam.eq(InterfaceBack::getInterface_name, "momRollSemiFGInboundComplete"); + lam.eq(InterfaceBack::getIs_back, "1"); + InterfaceBack back_jo = interfaceBackMapper.selectOne(lam); + + if (ObjectUtil.isNotEmpty(back_jo)) { SpringContextHolder.getBean(LmsToMesService.class).momRollSemiFGInboundComplete(param); } } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/HotPointIvtServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/HotPointIvtServiceImpl.java index f035cae..30e912b 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/HotPointIvtServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/HotPointIvtServiceImpl.java @@ -8,6 +8,7 @@ import cn.hutool.core.util.ObjectUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.nl.common.utils.SecurityUtils; @@ -18,6 +19,8 @@ import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.util.SpringContextHolder; import org.nl.modules.wql.util.WqlUtil; import org.nl.system.service.param.impl.SysParamServiceImpl; +import org.nl.wms.basedata.master.interfaceback.service.dao.InterfaceBack; +import org.nl.wms.basedata.master.interfaceback.service.dao.mapper.InterfaceBackMapper; import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl; import org.nl.wms.ext.mes.service.LmsToMesService; import org.nl.wms.ext.mes.service.impl.LmsToMesServiceImpl; @@ -41,7 +44,8 @@ import java.util.Map; @RequiredArgsConstructor @Slf4j public class HotPointIvtServiceImpl implements HotPointIvtService { - + @Autowired + private InterfaceBackMapper interfaceBackMapper; @Autowired private RedisUtils redisUtils; @@ -193,8 +197,12 @@ public class HotPointIvtServiceImpl implements HotPointIvtService { param.put("iMoveInDate", DateUtil.now()); param.put("iPlanBakingTemperature", form.getDoubleValue("temperature")); param.put("iPlanBakingTimer", form.getDoubleValue("oven_time")); - JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'momRollBakeInBound'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) { + + LambdaQueryWrapper lam = new LambdaQueryWrapper<>(); + lam.eq(InterfaceBack::getInterface_name, "momRollBakeInBound"); + lam.eq(InterfaceBack::getIs_back, "1"); + InterfaceBack back_jo = interfaceBackMapper.selectOne(lam); + if (ObjectUtil.isNotEmpty(back_jo)) { lmsToMesService.momRollBakeInBound(param); } @@ -210,8 +218,11 @@ public class HotPointIvtServiceImpl implements HotPointIvtService { param.put("ActualBakingTemperature", form.getDoubleValue("temperature")); param.put("ActualBakingTimer", form.getDoubleValue("oven_time")); //判断该接口是否需要回传 - JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'momRollBakeOutBound'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) { + LambdaQueryWrapper lam = new LambdaQueryWrapper<>(); + lam.eq(InterfaceBack::getInterface_name, "momRollBakeOutBound"); + lam.eq(InterfaceBack::getIs_back, "1"); + InterfaceBack back_jo = interfaceBackMapper.selectOne(lam); + if (ObjectUtil.isNotEmpty(back_jo)) { lmsToMesService.momRollBakeOutBound(param); } } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/SlittingproductionplanServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/SlittingproductionplanServiceImpl.java index ded9e2f..e39fc17 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/SlittingproductionplanServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/SlittingproductionplanServiceImpl.java @@ -9,6 +9,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.conditions.query.LambdaQueryWrapper; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.nl.common.utils.SecurityUtils; @@ -16,10 +17,13 @@ import org.nl.modules.common.exception.BadRequestException; 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.master.interfaceback.service.dao.InterfaceBack; +import org.nl.wms.basedata.master.interfaceback.service.dao.mapper.InterfaceBackMapper; import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl; import org.nl.wms.ext.mes.service.LmsToMesService; import org.nl.wms.pdm.service.SlittingproductionplanService; import org.nl.wms.pdm.service.dto.SlittingproductionplanDto; +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.Map; public class SlittingproductionplanServiceImpl implements SlittingproductionplanService { private final LmsToMesService lmsToMesService; - + @Autowired + private InterfaceBackMapper interfaceBackMapper; @Override public Map queryAll(Map whereJson, Pageable page) { String order_type = MapUtil.getStr(whereJson, "order_type"); @@ -213,8 +218,11 @@ public class SlittingproductionplanServiceImpl implements Slittingproductionplan } //判断该接口是否需要回传 - JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'airSwellWithPaperTubeAssArrival'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) { + LambdaQueryWrapper lam = new LambdaQueryWrapper<>(); + lam.eq(InterfaceBack::getInterface_name, "airSwellWithPaperTubeAssArrival"); + lam.eq(InterfaceBack::getIs_back, "1"); + InterfaceBack back_jo = interfaceBackMapper.selectOne(lam); + if (ObjectUtil.isNotEmpty(back_jo)) { lmsToMesService.cutPlanMomRollDeliveryComplete(mom_jo); } } @@ -242,8 +250,11 @@ public class SlittingproductionplanServiceImpl implements Slittingproductionplan JSONObject jo = new JSONObject(); jo.put("container_name", jsonObject.getString("container_name")); //判断该接口是否需要回传 - JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'airSwellWithPaperTubeAssComplete'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) { + LambdaQueryWrapper lam = new LambdaQueryWrapper<>(); + lam.eq(InterfaceBack::getInterface_name, "airSwellWithPaperTubeAssComplete"); + lam.eq(InterfaceBack::getIs_back, "1"); + InterfaceBack back_jo = interfaceBackMapper.selectOne(lam); + if (ObjectUtil.isNotEmpty(back_jo)) { lmsToMesService.airSwellWithPaperTubeAssComplete(jo); } @@ -277,8 +288,11 @@ public class SlittingproductionplanServiceImpl implements Slittingproductionplan JSONObject jo = new JSONObject(); jo.put("container_name", jsonObject.getString("container_name")); //判断该接口是否需要回传 - JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'airSwellWithPaperTubeAssComplete'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) { + LambdaQueryWrapper lam = new LambdaQueryWrapper<>(); + lam.eq(InterfaceBack::getInterface_name, "airSwellWithPaperTubeAssComplete"); + lam.eq(InterfaceBack::getIs_back, "1"); + InterfaceBack back_jo = interfaceBackMapper.selectOne(lam); + if (ObjectUtil.isNotEmpty(back_jo)) { lmsToMesService.airSwellWithPaperTubeAssArrival(jo); } } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/CoolCutTask.java b/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/CoolCutTask.java index e6ab266..4a7aff1 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/CoolCutTask.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/CoolCutTask.java @@ -6,16 +6,20 @@ import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; 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.master.interfaceback.service.dao.InterfaceBack; +import org.nl.wms.basedata.master.interfaceback.service.dao.mapper.InterfaceBackMapper; import org.nl.wms.ext.mes.service.impl.LmsToMesServiceImpl; import org.nl.wms.sch.AcsTaskDto; import org.nl.wms.sch.manage.AbstractAcsTask; import org.nl.wms.sch.manage.TaskStatusEnum; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -35,7 +39,8 @@ public class CoolCutTask extends AbstractAcsTask { private final String THIS_CLASS = CoolCutTask.class.getName(); - + @Autowired + private InterfaceBackMapper interfaceBackMapper; @Override public List addTask() { /* @@ -228,8 +233,11 @@ public class CoolCutTask extends AbstractAcsTask { mom_jo.put("contain_name", container_name); mom_jo.put("warehouse", "1"); //判断该接口是否需要回传 - JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'cutPlanMomRollDeliveryComplete'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) { + LambdaQueryWrapper lam = new LambdaQueryWrapper<>(); + lam.eq(InterfaceBack::getInterface_name, "cutPlanMomRollDeliveryComplete"); + lam.eq(InterfaceBack::getIs_back, "1"); + InterfaceBack back_jo = interfaceBackMapper.selectOne(lam); + if (ObjectUtil.isNotEmpty(back_jo)) { new LmsToMesServiceImpl().cutPlanMomRollDeliveryComplete(mom_jo); } } @@ -311,8 +319,11 @@ public class CoolCutTask extends AbstractAcsTask { mom_jo.put("contain_name", container_name); mom_jo.put("warehouse", "1"); //判断该接口是否需要回传 - JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'cutPlanMomRollDeliveryComplete'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) { + LambdaQueryWrapper lam = new LambdaQueryWrapper<>(); + lam.eq(InterfaceBack::getInterface_name, "cutPlanMomRollDeliveryComplete"); + lam.eq(InterfaceBack::getIs_back, "1"); + InterfaceBack back_jo = interfaceBackMapper.selectOne(lam); + if (ObjectUtil.isNotEmpty(back_jo)) { new LmsToMesServiceImpl().cutPlanMomRollDeliveryComplete(mom_jo); } } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/CutConveyorTask.java b/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/CutConveyorTask.java index 31b2c16..46bb038 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/CutConveyorTask.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/CutConveyorTask.java @@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.nl.common.utils.SecurityUtils; @@ -13,11 +14,14 @@ import org.nl.modules.common.exception.BadRequestException; import org.nl.modules.wql.WQL; import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.util.SpringContextHolder; +import org.nl.wms.basedata.master.interfaceback.service.dao.InterfaceBack; +import org.nl.wms.basedata.master.interfaceback.service.dao.mapper.InterfaceBackMapper; import org.nl.wms.ext.acs.service.WmsToAcsService; import org.nl.wms.ext.mes.service.LmsToMesService; import org.nl.wms.sch.AcsTaskDto; import org.nl.wms.sch.manage.AbstractAcsTask; import org.nl.wms.sch.manage.TaskStatusEnum; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -36,7 +40,8 @@ import java.util.List; public class CutConveyorTask extends AbstractAcsTask { private final String THIS_CLASS = CutConveyorTask.class.getName(); - + @Autowired + private InterfaceBackMapper interfaceBackMapper; @Override public List addTask() { /* @@ -133,8 +138,11 @@ public class CutConveyorTask extends AbstractAcsTask { jo.put("container_name", row.getString("container_name")); jo.put("is_send", "1"); //判断该接口是否需要回传 - JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'airSwellWithPaperTubeAssComplete'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) { + LambdaQueryWrapper lam = new LambdaQueryWrapper<>(); + lam.eq(InterfaceBack::getInterface_name, "airSwellWithPaperTubeAssComplete"); + lam.eq(InterfaceBack::getIs_back, "1"); + InterfaceBack back_jo = interfaceBackMapper.selectOne(lam); + if (ObjectUtil.isNotEmpty(back_jo)) { lmsToMesService.airSwellWithPaperTubeAssComplete(jo); } } @@ -270,8 +278,11 @@ public class CutConveyorTask extends AbstractAcsTask { JSONObject jo = new JSONObject(); jo.put("ContainerName", ContainerName); //判断该接口是否需要回传 - JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'airSwellWithPaperTubeAssArrival'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) { + LambdaQueryWrapper lam = new LambdaQueryWrapper<>(); + lam.eq(InterfaceBack::getInterface_name, "airSwellWithPaperTubeAssArrival"); + lam.eq(InterfaceBack::getIs_back, "1"); + InterfaceBack back_jo = interfaceBackMapper.selectOne(lam); + if (ObjectUtil.isNotEmpty(back_jo)) { lmsToMesService.airSwellWithPaperTubeAssArrival(row); } } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/InCoolIvtTask.java b/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/InCoolIvtTask.java index 5566f45..a33d4a1 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/InCoolIvtTask.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/InCoolIvtTask.java @@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.nl.common.utils.SecurityUtils; @@ -14,6 +15,8 @@ import org.nl.modules.wql.WQL; import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.util.SpringContextHolder; import org.nl.system.service.param.impl.SysParamServiceImpl; +import org.nl.wms.basedata.master.interfaceback.service.dao.InterfaceBack; +import org.nl.wms.basedata.master.interfaceback.service.dao.mapper.InterfaceBackMapper; import org.nl.wms.ext.mes.service.LmsToMesService; import org.nl.wms.ext.mes.service.impl.LmsToMesServiceImpl; import org.nl.wms.sch.AcsTaskDto; @@ -21,6 +24,7 @@ import org.nl.wms.sch.manage.AbstractAcsTask; import org.nl.wms.sch.manage.TaskStatusEnum; import org.nl.wms.sch.service.PointService; import org.nl.wms.sch.service.dto.PointDto; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -33,7 +37,8 @@ import java.util.List; @Slf4j public class InCoolIvtTask extends AbstractAcsTask { private final String THIS_CLASS = InCoolIvtTask.class.getName(); - + @Autowired + private InterfaceBackMapper interfaceBackMapper; @Override public List addTask() { /* @@ -146,9 +151,12 @@ public class InCoolIvtTask extends AbstractAcsTask { param.put("PassWord", passWord); //判断该接口是否需要回传 - JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'momRollSemiFGInboundComplete'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) { - String product_area = back_jo.getString("product_area"); + LambdaQueryWrapper lam = new LambdaQueryWrapper<>(); + lam.eq(InterfaceBack::getInterface_name, "momRollSemiFGInboundComplete"); + lam.eq(InterfaceBack::getIs_back, "1"); + InterfaceBack back_jo = interfaceBackMapper.selectOne(lam); + if (ObjectUtil.isNotEmpty(back_jo)) { + String product_area = back_jo.getProduct_area(); if (StrUtil.isNotEmpty(product_area) && product_area.contains(jsonTask.getString("product_area"))) { SpringContextHolder.getBean(LmsToMesService.class).momRollSemiFGInboundComplete(param); } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/InHotTask.java b/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/InHotTask.java index f634f86..ce5ef61 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/InHotTask.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/InHotTask.java @@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.nl.common.utils.SecurityUtils; @@ -14,12 +15,15 @@ import org.nl.modules.wql.WQL; import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.util.SpringContextHolder; import org.nl.system.service.param.impl.SysParamServiceImpl; +import org.nl.wms.basedata.master.interfaceback.service.dao.InterfaceBack; +import org.nl.wms.basedata.master.interfaceback.service.dao.mapper.InterfaceBackMapper; import org.nl.wms.ext.mes.service.LmsToMesService; import org.nl.wms.ext.mes.service.impl.LmsToMesServiceImpl; import org.nl.wms.pda.mps.service.mapper.HotMapper; import org.nl.wms.sch.AcsTaskDto; import org.nl.wms.sch.manage.AbstractAcsTask; import org.nl.wms.sch.manage.TaskStatusEnum; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -32,7 +36,8 @@ import java.util.List; @Slf4j public class InHotTask extends AbstractAcsTask { private final String THIS_CLASS = InHotTask.class.getName(); - + @Autowired + private InterfaceBackMapper interfaceBackMapper; @Override public List addTask() { /* @@ -228,9 +233,12 @@ public class InHotTask extends AbstractAcsTask { param.put("PassWord", passWord); //判断该接口是否需要回传 - JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'momRollBakeInBound'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) { - String product_area = back_jo.getString("product_area"); + LambdaQueryWrapper lam = new LambdaQueryWrapper<>(); + lam.eq(InterfaceBack::getInterface_name, "momRollBakeInBound"); + lam.eq(InterfaceBack::getIs_back, "1"); + InterfaceBack back_jo = interfaceBackMapper.selectOne(lam); + if (ObjectUtil.isNotEmpty(back_jo)) { + String product_area = back_jo.getProduct_area(); if (StrUtil.isNotEmpty(product_area) && product_area.contains(jsonTask.getString("product_area"))) { SpringContextHolder.getBean(LmsToMesService.class).momRollBakeInBound(param); } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/OutHotTask.java b/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/OutHotTask.java index 6110822..f6177ae 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/OutHotTask.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/OutHotTask.java @@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.nl.common.utils.SecurityUtils; @@ -13,12 +14,15 @@ import org.nl.modules.common.exception.BadRequestException; import org.nl.modules.wql.WQL; import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.util.SpringContextHolder; +import org.nl.wms.basedata.master.interfaceback.service.dao.InterfaceBack; +import org.nl.wms.basedata.master.interfaceback.service.dao.mapper.InterfaceBackMapper; import org.nl.wms.ext.mes.service.LmsToMesService; import org.nl.wms.ext.mes.service.impl.LmsToMesServiceImpl; import org.nl.wms.pda.mps.service.mapper.HotMapper; import org.nl.wms.sch.AcsTaskDto; import org.nl.wms.sch.manage.AbstractAcsTask; import org.nl.wms.sch.manage.TaskStatusEnum; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -30,7 +34,8 @@ import java.util.List; @Slf4j public class OutHotTask extends AbstractAcsTask { private final String THIS_CLASS = OutHotTask.class.getName(); - + @Autowired + private InterfaceBackMapper interfaceBackMapper; @Override public List addTask() { /* @@ -210,9 +215,12 @@ public class OutHotTask extends AbstractAcsTask { param.put("iabxActualBakingTimer", jsonHotMst.getDoubleValue("oven_time")); //判断该接口是否需要回传 - JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'momRollBakeOutBound'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) { - String product_area = back_jo.getString("product_area"); + LambdaQueryWrapper lam = new LambdaQueryWrapper<>(); + lam.eq(InterfaceBack::getInterface_name, "momRollBakeOutBound"); + lam.eq(InterfaceBack::getIs_back, "1"); + InterfaceBack back_jo = interfaceBackMapper.selectOne(lam); + if (ObjectUtil.isNotEmpty(back_jo)) { + String product_area = back_jo.getProduct_area(); if (StrUtil.isNotEmpty(product_area) && product_area.contains(jsonTask.getString("product_area"))) { SpringContextHolder.getBean(LmsToMesService.class).momRollBakeOutBound(param); } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/service/impl/CheckOutBillServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/service/impl/CheckOutBillServiceImpl.java index e0ded8d..80146e3 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/service/impl/CheckOutBillServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/service/impl/CheckOutBillServiceImpl.java @@ -15,6 +15,7 @@ import com.alibaba.excel.write.metadata.fill.FillWrapper; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.nl.common.utils.CodeUtil; @@ -28,6 +29,9 @@ import org.nl.modules.wql.util.WqlUtil; import org.nl.system.service.param.impl.SysParamServiceImpl; import org.nl.wms.basedata.master.customer.service.dao.Customerbase; 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.service.impl.UserStorServiceImpl; import org.nl.wms.pda.mps.eum.RegionTypeEnum; import org.nl.wms.sch.manage.TaskStatusEnum; @@ -73,7 +77,10 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { private final InAndOutReturnService inAndOutReturnService; @Autowired private CustomerbaseMapper customerbaseMapper; - + @Autowired + private TransportationBaseMapper transportationBaseMapper; + @Autowired + private ITransportationBaseService transportationBaseService; @Override public Map pageQuery(Map whereJson, Pageable page, String[] stor_id, String[] bill_status, String[] bill_type) { HashMap map = new HashMap<>(whereJson); @@ -1182,8 +1189,6 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { WQLObject dtl = WQLObject.getWQLObject("st_ivt_iostorinvdtl"); // 主表 WQLObject mst = WQLObject.getWQLObject("st_ivt_iostorinv"); - // 物流公司 - WQLObject tran = WQLObject.getWQLObject("MD_CS_TransportationBase"); // 1.获取上传文件输入流 InputStream inputStream = null; @@ -1195,8 +1200,10 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { } // 查询所有物流公司 - List tranList = tran.query("is_used = '1' and is_delete = '0'") - .getResultJSONArray(0).toJavaList(JSONObject.class); + LambdaQueryWrapper lam = new QueryWrapper().lambda(); + lam.eq(TransportationBase::getIs_used, "1"); + lam.eq(TransportationBase::getIs_delete,"0"); + List tranList = transportationBaseMapper.selectList(lam); ExcelReader excelReader = ExcelUtil.getReader(inputStream); List> read = excelReader.read(1, excelReader.getRowCount()); @@ -1221,8 +1228,8 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { // 物流公司名称 String cust_name = list.get(1).toString(); // 匹配对应的物流公司 - JSONObject jsonTran = tranList.stream() - .filter(row -> row.getString("cust_name").equals(cust_name)) + TransportationBase jsonTran = tranList.stream() + .filter(row -> row.getCust_name().equals(cust_name)) .findFirst().orElse(null); // 运单号 @@ -1238,7 +1245,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { String estimated_freight = list.get(5).toString(); // 更新主表 - jsonMst.put("trans_code", ObjectUtil.isNotEmpty(jsonTran) ? jsonTran.getString("cust_code") : "" ); + jsonMst.put("trans_code", ObjectUtil.isNotEmpty(jsonTran) ? jsonTran.getCust_code() : "" ); jsonMst.put("order_number", order_number); jsonMst.put("car_type", car_type); jsonMst.put("other_freight", other_freight); @@ -5965,9 +5972,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { WQLObject mstTab = WQLObject.getWQLObject("ST_IVT_IOStorInv"); // 出入库主表 WQLObject dtlTab = WQLObject.getWQLObject("st_ivt_iostorinvdtl"); // 出入库明细表 - WQLObject disTab = WQLObject.getWQLObject("st_ivt_iostorinvdis"); // 出入库分配明细 WQLObject subTab = WQLObject.getWQLObject("pdm_bi_subpackagerelation"); // 子卷包装关系表 - WQLObject tranTab = WQLObject.getWQLObject("MD_CS_TransportationBase"); // 物流公司表 WQLObject storTab = WQLObject.getWQLObject("st_ivt_bsrealstorattr"); // 实物仓库表 @@ -6015,9 +6020,9 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { oneMap.put("receiptaddress", receiptaddress); // 收货地址 oneMap.put("receiptphone", jsonMst.getString("receiptphone")); // 收货人联系电话 // 物流公司 - JSONObject jsonTran = tranTab.query("cust_code = '" + jsonMst.getString("trans_code") + "'").uniqueResult(0); + TransportationBase jsonTran = transportationBaseService.findByCode(jsonMst.getString("trans_code")); if (ObjectUtil.isNotEmpty(jsonTran)) { - oneMap.put("logisticscompany", jsonTran.getString("cust_name")); + oneMap.put("logisticscompany", jsonTran.getCust_name()); } oneMap.put("drivername", jsonMst.getString("drivername")); // 司机 oneMap.put("carno", jsonMst.getString("carno")); // 车牌号 @@ -6076,9 +6081,9 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { oneMap.put("receiptaddress", receiptaddress); // 收货地址 oneMap.put("receiptphone", jsonMst.getString("receiptphone")); // 收货人联系电话 // 物流公司 - JSONObject jsonTran = tranTab.query("cust_code = '" + jsonMst.getString("trans_code") + "'").uniqueResult(0); + TransportationBase jsonTran = transportationBaseService.findByCode(jsonMst.getString("trans_code")); if (ObjectUtil.isNotEmpty(jsonTran)) { - oneMap.put("logisticscompany", jsonTran.getString("cust_name")); + oneMap.put("logisticscompany", jsonTran.getCust_name()); } oneMap.put("drivername", jsonMst.getString("drivername")); // 司机 oneMap.put("carno", jsonMst.getString("carno")); // 车牌号