Browse Source

opt:接口回传表相关代码修改替换

master
zds 1 month ago
parent
commit
acabce8c4a
  1. 91
      lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/constant/MaterOptTypeEnum.java
  2. 1
      lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/transport/service/impl/TransportationBaseServiceImpl.java
  3. 11
      lms/nladmin-system/src/main/java/org/nl/wms/ext/mes/service/impl/MesToLmsServiceImpl.java
  4. 16
      lms/nladmin-system/src/main/java/org/nl/wms/ext/szls/service/impl/LmsToBigScreenServiceImpl.java
  5. 12
      lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/CasingServiceImpl.java
  6. 28
      lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/HandleBakingServiceImpl.java
  7. 13
      lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/PointStatusServiceImpl.java
  8. 27
      lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/ShippingServiceImpl.java
  9. 15
      lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/CoolPointIvtServiceImpl.java
  10. 21
      lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/HotPointIvtServiceImpl.java
  11. 28
      lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/SlittingproductionplanServiceImpl.java
  12. 21
      lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/CoolCutTask.java
  13. 21
      lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/CutConveyorTask.java
  14. 16
      lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/InCoolIvtTask.java
  15. 16
      lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/InHotTask.java
  16. 16
      lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/OutHotTask.java
  17. 33
      lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/service/impl/CheckOutBillServiceImpl.java

91
lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/constant/MaterOptTypeEnum.java

@ -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;
}
}

1
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<TransportationBas
public TransportationBase findByCode(String code) {
LambdaQueryWrapper<TransportationBase> lam = new QueryWrapper<TransportationBase>().lambda();
lam.eq(TransportationBase::getCust_code, code);
lam.eq(TransportationBase::getIs_delete,"0");
return getOne(lam);
}

11
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<InterfaceBack> 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);
}

16
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<MonitorDevice> lam = new LambdaQueryWrapper<MonitorDevice>();
lam.eq(MonitorDevice::getSend_szls,"1");
lam.eq(MonitorDevice::getProduct_area,product_area);
List<MonitorDevice> 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;

12
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<InterfaceBack> 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);
}

28
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<InterfaceBack> 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<InterfaceBack> 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<InterfaceBack> 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);
}

13
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<InterfaceBack> 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);
}
}

27
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<InterfaceBack> 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<InterfaceBack> 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);

15
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<String, Object> 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<InterfaceBack> 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);
}
}

21
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<InterfaceBack> 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<InterfaceBack> 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);
}
}

28
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<String, Object> 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<InterfaceBack> 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<InterfaceBack> 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<InterfaceBack> 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);
}
}

21
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<AcsTaskDto> 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<InterfaceBack> 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<InterfaceBack> 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);
}
}

21
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<AcsTaskDto> 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<InterfaceBack> 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<InterfaceBack> 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);
}
}

16
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<AcsTaskDto> 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<InterfaceBack> 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);
}

16
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<AcsTaskDto> 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<InterfaceBack> 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);
}

16
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<AcsTaskDto> 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<InterfaceBack> 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);
}

33
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<String, Object> pageQuery(Map whereJson, Pageable page, String[] stor_id, String[] bill_status, String[] bill_type) {
HashMap<String, String> 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<JSONObject> tranList = tran.query("is_used = '1' and is_delete = '0'")
.getResultJSONArray(0).toJavaList(JSONObject.class);
LambdaQueryWrapper<TransportationBase> lam = new QueryWrapper<TransportationBase>().lambda();
lam.eq(TransportationBase::getIs_used, "1");
lam.eq(TransportationBase::getIs_delete,"0");
List<TransportationBase> tranList = transportationBaseMapper.selectList(lam);
ExcelReader excelReader = ExcelUtil.getReader(inputStream);
List<List<Object>> 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")); // 车牌号

Loading…
Cancel
Save