1 Commits

Author SHA1 Message Date
zhouz
bf1ee590fb fix:包装关系变更校验 2026-04-17 13:51:38 +08:00
23 changed files with 33 additions and 567 deletions

View File

@@ -153,7 +153,7 @@ public class ZxDjwTask extends AbstractAcsTask {
PdmBiSubpackagerelation pdmBiSubpackagerelation = subpackageRelationService
.getOne(new LambdaUpdateWrapper<PdmBiSubpackagerelation>().eq(PdmBiSubpackagerelation::getContainer_name, schBaseTask.getVehicle_code()), false);
if (!pdmBiSubpackagerelation.getStatus().equals(IOSEnum.IS_NOTANDYES.code(""))){
throw new BadRequestException("该子卷对应状态为["+pdmBiSubpackagerelation.getStatus()+"],不为生成状态!)");
throw new BadRequestException("该子卷对应状态为["+pdmBiSubpackagerelation.getStatus()+"],不为生成状态,不允许进行状态变更)");
}
pdmBiSubpackagerelation.setStatus(IOSEnum.IS_NOTANDYES.code(""));
subpackageRelationService.updateById(pdmBiSubpackagerelation);

View File

@@ -49,7 +49,7 @@ public class TransportationbaseServiceImpl implements TransportationbaseService
if (ObjectUtil.isNotEmpty(cust_name)) {
map.put("cust_name", "%" + cust_name + "%");
}
JSONObject json = WQL.getWO("QMD_CS_TRANSPORAIONL").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "create_time DESC ,update_time ASC");
JSONObject json = WQL.getWO("QMD_CS_TRANSPORAIONL").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "update_time ASC");
return json;
}

View File

@@ -1,34 +0,0 @@
package org.nl.wms.ext.mdm.entity;
import lombok.Data;
import java.util.List;
/**
* @Author Eric.Yang
* @Version V1.1
* @Date 2025/5/29
* @Description 处理状态统一返回消息类
*/
@Data
public class CommonResponseDto {
//状态
private String status;
//描述
private String message;
//处理结果集合
private List<ResponseItemsData> responseData;
/**
统一返回消息类 构造
*/
public static CommonResponseDto adapter(String status,String message,List<ResponseItemsData> responseData) {
CommonResponseDto commonResponseDto = new CommonResponseDto();
commonResponseDto.setStatus(status);
commonResponseDto.setMessage(message);
commonResponseDto.setResponseData(responseData);
return commonResponseDto;
}
}

View File

@@ -1,31 +0,0 @@
package org.nl.wms.ext.mdm.entity;
import lombok.Data;
@Data
public class ResponseItemsData {
//主数据唯一主键
private Long mdId;
//主数据编码
private String mdCode;
//主数据描述
private String mdDescription;
//处理状态
private String status;
//处理状态描述
private String message;
/**
统一构造方法
*/
public static ResponseItemsData adapter(Long mdId,String mdCode,String mdDescription,String status,String message){
ResponseItemsData responseItemsData = new ResponseItemsData();
responseItemsData.setMdId(mdId);
responseItemsData.setMdCode(mdCode);
responseItemsData.setMdDescription(mdDescription);
responseItemsData.setStatus(status);
responseItemsData.setMessage(message);
return responseItemsData;
}
}

View File

@@ -1,26 +0,0 @@
package org.nl.wms.ext.mdm.entity;
/**
* @Author Eric.Yang
* @Version V1.1
* @Date 2025/6/10
* @Description 接口状态统一码
*/
public enum StatusEnum {
ACCEPT_SUCCESS("S", "分发成功"),
ACCEPT_FAIL("E", "分发失败");
private String code;
private String message;
StatusEnum(String code, String message) {
this.code = code;
this.message = message;
}
public String getCode() {
return code;
}
public String getMessage() {
return message;
}
}

View File

@@ -1,55 +0,0 @@
package org.nl.wms.ext.mdm.rest;
import cn.dev33.satoken.annotation.SaIgnore;
import cn.dev33.satoken.stp.StpUtil;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.modules.logging.annotation.Log;
import org.nl.wms.ext.mdm.entity.CommonResponseDto;
import org.nl.wms.ext.mdm.service.MdmToLmsService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
* @author Eric.Yang
* @version V1.1
* @Date 2025/5/29
* @Description MDM主数据平台与LMS接口
*/
@RestController
@RequestMapping("/api/mdm")
@Slf4j
@SaIgnore
public class MdmToLmsController {
@Resource
private MdmToLmsService mdmToLmsService;
@PostMapping("/transCustomerInfo")
@Log("MDM给LMS推送客户信息")
public CommonResponseDto transCustomerInfo(@RequestBody JSONObject jsonData){
return mdmToLmsService.transCustomerInfo(jsonData);
}
@PostMapping("/transSupplierInfo")
@Log("MDM给LMS推送供应商信息")
public CommonResponseDto transSupplierInfo(@RequestBody JSONObject jsonData){
return mdmToLmsService.transSupplierInfo(jsonData);
}
@PostMapping("/transMaterialInfo")
@Log("MDM给LMS推送物料主数据信息")
public CommonResponseDto transMaterialInfo(@RequestBody JSONObject jsonData){
return mdmToLmsService.transMaterialInfo(jsonData);
}
}

View File

@@ -1,23 +0,0 @@
package org.nl.wms.ext.mdm.service;
import com.alibaba.fastjson.JSONObject;
import org.nl.wms.ext.mdm.entity.CommonResponseDto;
import java.util.List;
public interface MdmToLmsService {
/**
* MDM客户接口
*/
CommonResponseDto transCustomerInfo(JSONObject jsonData);
/**
* MDM供应商接口
*/
CommonResponseDto transSupplierInfo(JSONObject jsonData);
/**
* MDM物料主数据接口
*/
CommonResponseDto transMaterialInfo(JSONObject jsonData);
}

View File

@@ -1,297 +0,0 @@
package org.nl.wms.ext.mdm.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.compress.utils.Lists;
import org.nl.common.utils.SecurityUtils;
import org.nl.modules.common.exception.BadRequestException;
import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.wms.ext.mdm.entity.CommonResponseDto;
import org.nl.wms.ext.mdm.entity.ResponseItemsData;
import org.nl.wms.ext.mdm.entity.StatusEnum;
import org.nl.wms.ext.mdm.service.MdmToLmsService;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @Author Eric.Yang
* @Version V1.1
* @Date 2025/5/29
* @Description MDM数据对接接口业务实现类
*/
@Service
@Slf4j
public class MdmToLmsServiceImpl implements MdmToLmsService {
/**
* @Description: MDM客户主数据接口
* @Author Eric.Yang
* @Date: 2025/6/3 9:12
**/
@Override
public CommonResponseDto transCustomerInfo(JSONObject jsonData) {
log.info("MDM客户主数据业务请求参数为{}", jsonData);
CommonResponseDto commonResponseDto = new CommonResponseDto();
if(CollectionUtil.isEmpty(jsonData)){
commonResponseDto.setStatus("E");
commonResponseDto.setMessage("MDM传输数据为空");
return commonResponseDto;
}
List<ResponseItemsData> responseItemsData = Lists.newArrayList();
JSONArray customers = jsonData.getJSONArray("customer");
if(CollectionUtil.isNotEmpty(customers)){
for (int i = 0; i < customers.size(); i++) {
JSONObject json = customers.getJSONObject(i);
//主编码主键
long mdId = json.getLongValue("mdId");
//客户编号
String mdCode = json.getString("mdCode");
//主数据描述
String mdDescription = json.getString("mdDescription");
try {
//客户名称
String customerName = json.getString("customerName");
//核心字段判断
if (StrUtil.isEmpty(mdCode) || StrUtil.isEmpty(customerName)) {
throw new BadRequestException("MDM->客户编码或名称不能为空!");
}
//客户简称
String abbreviation = json.getString("abbreviation");
//客户状态 01合格 02冻结 03禁用 04黑名单
String customerStatus = json.getString("customerStatus");
JSONArray salesOrgs = json.getJSONArray("salesOrg");
if (CollectionUtil.isEmpty(salesOrgs)) {
throw new BadRequestException("MDM->客户数据核心字段数据为空,缺失字段:[salesOrgs]");
}
JSONObject salesOrg = salesOrgs.getJSONObject(0);
JSONArray salesList = salesOrg.getJSONArray("sales");
if (CollectionUtil.isEmpty(salesList)) {
throw new BadRequestException("MDM->客户数据核心字段数据为空,缺失字段:[sales]");
}
JSONObject sales = salesList.getJSONObject(0);
JSONArray parList = sales.getJSONArray("par");
if (CollectionUtil.isEmpty(parList)) {
throw new BadRequestException("MDM->客户数据核心字段数据为空,缺失字段:[par]");
}
JSONObject par = parList.getJSONObject(0);
//业务员工号
String empSupplier = par.getString("empSupplier");
//业务员名称
String empSupplierDesc = par.getString("empSupplierDesc");
String sales_owner = StrUtil.join("|",empSupplier,empSupplierDesc);
//插入客户表
String currentUserId = SecurityUtils.getCurrentUserId();
String now = DateUtil.now();
JSONObject customer_jo = WQLObject.getWQLObject("md_cs_customerbase").query("cust_code = '" + mdCode + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(customer_jo)) {
customer_jo = new JSONObject();
customer_jo.put("cust_id", mdId);
customer_jo.put("cust_code", mdCode);
customer_jo.put("cust_name", customerName);
customer_jo.put("cust_simple_name", abbreviation);
customer_jo.put("mdm_status", customerStatus);
customer_jo.put("sales_owner", sales_owner);
customer_jo.put("create_id", currentUserId);
customer_jo.put("create_name", "mdm_user");
customer_jo.put("create_time", now);
WQLObject.getWQLObject("md_cs_customerbase").insert(customer_jo);
ResponseItemsData itemsData = ResponseItemsData.adapter(mdId, mdCode, mdDescription, StatusEnum.ACCEPT_SUCCESS.getCode(), StatusEnum.ACCEPT_SUCCESS.getMessage());
responseItemsData.add(itemsData);
} else {
customer_jo.put("cust_name", customerName);
customer_jo.put("cust_simple_name", abbreviation);
customer_jo.put("sales_owner", sales_owner);
customer_jo.put("update_optid", currentUserId);
customer_jo.put("update_optname", "mdm_user");
customer_jo.put("mdm_status", customerStatus);
customer_jo.put("update_time", now);
WQLObject.getWQLObject("md_cs_customerbase").update(customer_jo);
ResponseItemsData itemsData = ResponseItemsData.adapter(mdId, mdCode, mdDescription, StatusEnum.ACCEPT_SUCCESS.getCode(), StatusEnum.ACCEPT_SUCCESS.getMessage());
responseItemsData.add(itemsData);
}
}catch (Exception e) {
String message = e.getMessage();
ResponseItemsData itemsData = ResponseItemsData.adapter(mdId, mdCode, mdDescription, StatusEnum.ACCEPT_FAIL.getCode(),message.contains("MDM")?message:StatusEnum.ACCEPT_FAIL.getMessage());
responseItemsData.add(itemsData);
log.error("MDM客户数据接口业务实现类处理数据异常", e);
}
}
}
commonResponseDto.setStatus(StatusEnum.ACCEPT_SUCCESS.getCode());
commonResponseDto.setMessage(StatusEnum.ACCEPT_SUCCESS.getMessage());
commonResponseDto.setResponseData(responseItemsData);
return commonResponseDto;
}
/**
* @Description: MDM供应商主数据接口
* @Author Eric.Yang
* @Date: 2025/6/5 9:12
**/
@Override
public CommonResponseDto transSupplierInfo(JSONObject jsonData) {
log.info("MDM供应商主数据请求参数为{}", jsonData);
CommonResponseDto commonResponseDto = new CommonResponseDto();
if(CollectionUtil.isEmpty(jsonData)){
commonResponseDto.setStatus("E");
commonResponseDto.setMessage("MDM传输数据为空");
return commonResponseDto;
}
List<ResponseItemsData> responseItemsData = Lists.newArrayList();
JSONArray supplier = jsonData.getJSONArray("supplier");
if(CollectionUtil.isNotEmpty(supplier)){
for (int i = 0; i < supplier.size(); i++) {
JSONObject json = supplier.getJSONObject(i);
//主编码主键
long mdId = json.getLongValue("mdId");
//客户编号
String mdCode = json.getString("mdCode");
//主数据描述
String mdDescription = json.getString("mdDescription");
try {
//供应商名称
String supplierName = json.getString("supplierName");
//供应商简称
String abbreviation = json.getString("abbreviation");
//股份供应商状态 01合格 02潜在 03不合作 04黑名单
String gfSupplierStatus = json.getString("gfSupplierStatus");
//插入客户表
String currentUserId = SecurityUtils.getCurrentUserId();
String now = DateUtil.now();
//核心字段判断
if (StrUtil.isEmpty(mdCode) || StrUtil.isEmpty(supplierName)) {
throw new BadRequestException("MDM->供应商编码或名称不能为空!");
}
JSONObject supplier_jo = WQLObject.getWQLObject("md_cs_transportationbase").query("cust_code = '" + mdCode + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(supplier_jo)) {
supplier_jo = new JSONObject();
supplier_jo.put("cust_id", mdId);
supplier_jo.put("cust_code", mdCode);
supplier_jo.put("cust_name", supplierName);
supplier_jo.put("cust_simple_name", abbreviation);
supplier_jo.put("mdm_status", gfSupplierStatus);
supplier_jo.put("create_id", currentUserId);
supplier_jo.put("create_name", "mdm_user");
supplier_jo.put("create_time", now);
WQLObject.getWQLObject("md_cs_transportationbase").insert(supplier_jo);
ResponseItemsData itemsData = ResponseItemsData.adapter(mdId, mdCode, mdDescription, StatusEnum.ACCEPT_SUCCESS.getCode(), StatusEnum.ACCEPT_SUCCESS.getMessage());
responseItemsData.add(itemsData);
} else {
supplier_jo.put("cust_name", supplierName);
supplier_jo.put("cust_simple_name", abbreviation);
supplier_jo.put("update_optid", currentUserId);
supplier_jo.put("update_optname", "mdm_user");
supplier_jo.put("mdm_status", gfSupplierStatus);
supplier_jo.put("update_time", now);
WQLObject.getWQLObject("md_cs_transportationbase").update(supplier_jo);
ResponseItemsData itemsData = ResponseItemsData.adapter(mdId, mdCode, mdDescription, StatusEnum.ACCEPT_SUCCESS.getCode(), StatusEnum.ACCEPT_SUCCESS.getMessage());
responseItemsData.add(itemsData);
}
}catch (Exception e) {
//获取抛出异常的信息
String message = e.getMessage();
ResponseItemsData itemsData = ResponseItemsData.adapter(mdId, mdCode, mdDescription, StatusEnum.ACCEPT_FAIL.getCode(),message.contains("MDM")?message:StatusEnum.ACCEPT_FAIL.getMessage());
responseItemsData.add(itemsData);
log.error("MDM供应商数据接口数据异常", e);
}
}
}
commonResponseDto.setStatus(StatusEnum.ACCEPT_SUCCESS.getCode());
commonResponseDto.setMessage(StatusEnum.ACCEPT_SUCCESS.getMessage());
commonResponseDto.setResponseData(responseItemsData);
return commonResponseDto;
}
/**
* @Description: MDM物料主数据接口
* @Author Eric.Yang
* @Date: 2025/6/3 9:12
**/
@Override
public CommonResponseDto transMaterialInfo(JSONObject jsonData) {
log.info("MDM物料主数据请求参数为{}", jsonData);
CommonResponseDto commonResponseDto = new CommonResponseDto();
if(CollectionUtil.isEmpty(jsonData)){
commonResponseDto.setStatus("E");
commonResponseDto.setMessage("MDM传输数据为空");
return commonResponseDto;
}
List<ResponseItemsData> responseItemsData = Lists.newArrayList();
JSONArray materiels = jsonData.getJSONArray("materiels");
if(CollectionUtil.isNotEmpty(materiels)){
for (int i = 0; i < materiels.size(); i++) {
JSONObject json = materiels.getJSONObject(i);
//主编码主键
long mdId = json.getLongValue("mdId");
//物料编码
String mdCode = json.getString("mdCode");
//物料名称
String mdDescription = json.getString("mdDescription");
try {
//计量单位
String meins = json.getString("meins");
//跨工厂的物料状态 Y有效 D冻结 N无效
String mstae = json.getString("mstae");
//插入客户表
String currentUserId = SecurityUtils.getCurrentUserId();
String now = DateUtil.now();
if (StrUtil.isEmpty(mdCode) || StrUtil.isEmpty(mdDescription)) {
throw new BadRequestException("MDM->物料编码或名称不能为空!");
}
JSONObject material_jo = WQLObject.getWQLObject("md_me_materialbase").query("material_code = '" + mdCode + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(material_jo)) {
JSONObject unit = WQLObject.getWQLObject("md_pb_measureunit").query("unit_code = '" + meins + "' and is_delete ='0'").uniqueResult(0);
if (ObjectUtil.isEmpty(unit)) {
throw new BadRequestException("MDM->未查询到相关计量单位,请进行维护!");
}
material_jo = new JSONObject();
material_jo.put("material_id", mdId);
material_jo.put("material_code", mdCode);
material_jo.put("material_name", mdDescription);
material_jo.put("base_unit_id", unit.getString("measure_unit_id"));
material_jo.put("mdm_status", mstae);
material_jo.put("is_used", "1");
material_jo.put("create_id", currentUserId);
material_jo.put("create_name", "mdm_user");
material_jo.put("create_time", now);
WQLObject.getWQLObject("md_me_materialbase").insert(material_jo);
ResponseItemsData itemsData = ResponseItemsData.adapter(mdId, mdCode, mdDescription, StatusEnum.ACCEPT_SUCCESS.getCode(), StatusEnum.ACCEPT_SUCCESS.getMessage());
responseItemsData.add(itemsData);
} else {
JSONObject unit = WQLObject.getWQLObject("md_pb_measureunit").query("unit_code = '" + meins + "' and is_delete ='0'").uniqueResult(0);
if (ObjectUtil.isEmpty(unit)) {
throw new BadRequestException("MDM->未查询到相关计量单位,请进行维护!");
}
material_jo.put("material_name", mdDescription);
material_jo.put("base_unit_id", unit.getString("measure_unit_id"));
material_jo.put("mdm_status", mstae);
material_jo.put("update_optid", currentUserId);
material_jo.put("update_optname", "mdm_user");
material_jo.put("update_time", now);
WQLObject.getWQLObject("md_me_materialbase").update(material_jo);
ResponseItemsData itemsData = ResponseItemsData.adapter(mdId, mdCode, mdDescription, StatusEnum.ACCEPT_SUCCESS.getCode(), StatusEnum.ACCEPT_SUCCESS.getMessage());
responseItemsData.add(itemsData);
}
}catch (Exception e) {
//获取抛出异常的信息
String message = e.getMessage();
ResponseItemsData itemsData = ResponseItemsData.adapter(mdId, mdCode, mdDescription, StatusEnum.ACCEPT_FAIL.getCode(),message.contains("MDM")?message:StatusEnum.ACCEPT_FAIL.getMessage());
responseItemsData.add(itemsData);
log.error("MDM物料主数据接口数据异常", e);
}
}
}
commonResponseDto.setStatus(StatusEnum.ACCEPT_SUCCESS.getCode());
commonResponseDto.setMessage(StatusEnum.ACCEPT_SUCCESS.getMessage());
commonResponseDto.setResponseData(responseItemsData);
return commonResponseDto;
}
}

View File

@@ -52,7 +52,7 @@ public class LmsToSapServiceImpl implements LmsToSapService {
String token = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("SAP_TOKEN").getValue();
String sap_client = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("SAP_CLIENT").getValue();
String api = "";
url = url + "/sap/center/lms/004";
url = url + "/sap/center/wms/004";
try {
String resultMsg = HttpRequest.post(url).header("TOKEN", token)
.header("sap-client", sap_client)
@@ -113,7 +113,7 @@ public class LmsToSapServiceImpl implements LmsToSapService {
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("SAP_URL").getValue();
String token = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("SAP_TOKEN").getValue();
String sap_client = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("SAP_CLIENT").getValue();
String api = "/sap/center/lms/005";
String api = "/sap/center/wms/005";
url = url + api;
try {
String resultMsg = HttpRequest.post(url).header("TOKEN", token)
@@ -154,7 +154,7 @@ public class LmsToSapServiceImpl implements LmsToSapService {
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("SAP_URL").getValue();
String token = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("SAP_TOKEN").getValue();
String sap_client = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("SAP_CLIENT").getValue();
String api = "/sap/center/lms/007";
String api = "/sap/center/wms/007";
url = url + api;
try {
String resultMsg = HttpRequest.post(url).header("TOKEN", token)

View File

@@ -383,12 +383,11 @@ public class SapToLmsServiceImpl implements SapToLmsService {
JSONObject json = item.getJSONObject(i);
lfart = json.getString("LFART");
JSONObject jsonDtl = new JSONObject();
if (StrUtil.equals(lfart, "ZLF1") || StrUtil.equals(lfart, "ZLF3") || StrUtil.equals(lfart, "ZLF9") || StrUtil.equals(lfart, "ZJS")) {
if (StrUtil.equals(lfart, "ZLF") || StrUtil.equals(lfart, "ZJS")) {
// 生成出库单
String billType = getBillTypeByLfart(lfart);
jsonMst.put("io_type", "1");
jsonMst.put("buss_type", billType);
jsonMst.put("bill_type", billType);
jsonMst.put("buss_type", "1001");
jsonMst.put("bill_type", "1001");
jsonMst.put("source_id", json.getLongValue("VBELN"));
jsonMst.put("source_name", "交货单");
jsonMst.put("receiver", json.getString("CONSIGNEE")); // 收货人
@@ -417,7 +416,7 @@ public class SapToLmsServiceImpl implements SapToLmsService {
jsonDtl.put("width", json.getString("HL02")); // 幅宽
tableData.add(jsonDtl);
}
if (StrUtil.equals(lfart, "ZLR") || StrUtil.equals(lfart, "ZLR1") || StrUtil.equals(lfart, "ZLR2")) {
if (StrUtil.equals(lfart, "ZLR")) {
/*jsonMst.put("remark",json.getString("LGORT"));//库位*/
HashMap map = new HashMap();
//更新包装关系
@@ -503,13 +502,8 @@ public class SapToLmsServiceImpl implements SapToLmsService {
box_rows.add(map);
}
}
/*
发货分配逻辑
* ZLF9 免费发货单-有价格
* ZLF3 免费发货单
* ZLF1 标准发货单
* */
if (StrUtil.equals(lfart, "ZLF1") || StrUtil.equals(lfart, "ZLF3") || StrUtil.equals(lfart, "ZLF9")) {
// 发货出库
if (StrUtil.equals(lfart, "ZLF")) {
jsonMst.put("tableData", tableData);
// 调用出库新增并分配
String iostorinv_id = checkOutBillService.insertDtl2(jsonMst);
@@ -526,15 +520,11 @@ public class SapToLmsServiceImpl implements SapToLmsService {
JSONObject jsonObject = new JSONObject();
jsonObject.put("iostorinv_id", iostorinv_id);
}
/*
退货入库 - 1 销售退货单
退货入库 - 3 免费退货单
*/
if (StrUtil.equals(lfart, "ZLR1") || StrUtil.equals(lfart, "ZLR2")) {
// 退货入库
if (StrUtil.equals(lfart, "ZLR")) {
jsonMst.put("tableData", box_rows);
//创建退货入库单
String billType = getBillTypeByLfart(lfart);
jsonMst.put("bill_type", billType);
jsonMst.put("bill_type", "0002");
jsonMst.put("biz_date", DateUtil.now());
jsonMst.put("bill_status", "10");
rawAssistIStorService.insertDtl(jsonMst);
@@ -557,48 +547,6 @@ public class SapToLmsServiceImpl implements SapToLmsService {
return result;
}
/**
* @description: 根据Sap LFART获取单据类型
* @author ManMan
* @date: 2026/4/9 14:08
* 发货(字典值ST_INV_OUT_TYPE)
* ZLF 1001 发货出库 (旧)
* ZLF1 1013 标准发货 (新)
* ZLF3 1014 无票发货 (新)
* ZLF9 1015 有票发货 (新)
* 退货入库字典值ST_INV_IN_TYPE
* ZLR 0002 退货入库 (旧)
* ZLR1 0013 标准退货 (新)
* ZLR3 0014 免费退货 (新)
**/
public String getBillTypeByLfart(String code){
String billType = "";
switch (code){
case "ZLF1":
billType = "1013";
break;
case "ZLF3":
billType = "1014";
break;
case "ZLF9":
billType = "1015";
break;
case "ZLR1":
billType = "0013";
break;
case "ZLR2":
billType = "0014";
break;
default:
if(code.contains("ZLR")){
billType = "0002";
}
if (code.contains("ZLF")){
billType = "1001";
}
}
return billType;
}
@Override
public JSONObject getReturnDeliveryInfo(JSONObject jo) {

View File

@@ -211,7 +211,7 @@ public class OutChargeServiceImpl implements OutChargeService {
//将包装关系中对应的记录状态改为包装
HashMap<String, String> map = new HashMap<>();
map.put("status", "1");
if (StrUtil.equals(mst_jo.getString("bill_type"), "1001") || StrUtil.equals(mst_jo.getString("bill_type"), "1013") || StrUtil.equals(mst_jo.getString("bill_type"), "1014") || StrUtil.equals(mst_jo.getString("bill_type"), "1015")) {
if (StrUtil.equals(mst_jo.getString("bill_type"), "1001")) {
WQLObject.getWQLObject("PDM_BI_SubPackageRelation").update(map, "package_box_SN = '" + dis_row.getString("box_no") + "' AND status = '3'");
} else {
WQLObject.getWQLObject("PDM_BI_SubPackageRelation").update(map, "package_box_SN = '" + dis_row.getString("box_no") + "'");

View File

@@ -71,7 +71,7 @@
AND ios.io_type = '0'
AND ios.bill_status = '99'
AND ios.is_writeoff = '0'
AND ios.bill_type in ('0002','0013','0014')
AND ios.bill_type = '0002'
and ios.stor_id in 输入.in_stor_id
OPTION 输入.bill_code <> ""
ios.bill_code like 输入.bill_code
@@ -125,7 +125,7 @@
AND ios.io_type = '0'
AND ios.bill_status = '99'
AND ios.is_writeoff = '0'
AND ios.bill_type in ('0002','0013','0014')
AND ios.bill_type = '0002'
and ios.stor_id in 输入.in_stor_id
OPTION 输入.bill_code <> ""
ios.bill_code like 输入.bill_code

View File

@@ -977,7 +977,7 @@
AND
ios.bill_status = '99'
AND
ios.bill_type in ('1001','1009','1013','1014','1015')
ios.bill_type in ('1001','1009')
AND
ios.stor_id in 输入.in_stor_id
OPTION 输入.bill_code <> ""

View File

@@ -678,7 +678,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
}
// 销售出库
if (StrUtil.equals(bill_type, "1001") || StrUtil.equals(bill_type, "1011") || StrUtil.equals(bill_type, "1013") || StrUtil.equals(bill_type, "1014") || StrUtil.equals(bill_type, "1015")) {
if (StrUtil.equals(bill_type, "1001") || StrUtil.equals(bill_type, "1011")) {
// 1.回传sap
JSONArray paramSapMstArr = new JSONArray();
@@ -783,7 +783,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
paramDis.put("ZZWLHD", jsonSub.getString("thickness"));
paramDis.put("CHARG", jsonSub.getString("sap_pcsn"));
paramDis.put("KALAB", NumberUtil.round(jsonDis.getDoubleValue("plan_qty"), 3));
paramDis.put("WERKS", "2461");
paramDis.put("WERKS", "2460");
paramSapMstArr.add(paramDis);
}
param.put("ITEM", paramSapMstArr);
@@ -1308,7 +1308,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
}
// 销售出库
if (StrUtil.equals(bill_type, "1001") || StrUtil.equals(bill_type, "1011") || StrUtil.equals(bill_type, "1013") || StrUtil.equals(bill_type, "1014") || StrUtil.equals(bill_type, "1015")) {
if (StrUtil.equals(bill_type, "1001") || StrUtil.equals(bill_type, "1011") ) {
// 1.回传sap
JSONArray paramSapMstArr = new JSONArray();

View File

@@ -25,7 +25,7 @@ https://juejin.cn/post/6844903775631572999
<include resource="log/SapToLms.xml"/>
<include resource="log/AcsToLMS.xml"/>
<include resource="log/LmsToAcs.xml"/>
<include resource="log/MdmToLms.xml"/>
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<!-- 控制台高亮-->
<withJansi>true</withJansi>

View File

@@ -58,7 +58,7 @@ export default {
codeUrl: '',
cookiePass: '',
loginForm: {
username: '',
username: 'admin',
password: '',
rememberMe: false,
code: '',

View File

@@ -105,7 +105,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="送货单明细数">
<el-input-number v-model="form.shd_dtl_num" :min="1" :max="100" :precision="0" :controls="false" style="width: 200px;" />
<el-input-number v-model="form.shd_dtl_num" :min="1" :max="100" :precision="0" :controls="false" style="width: 200px;"/>
</el-form-item>
</el-col>
</el-row>
@@ -193,10 +193,10 @@
<el-table-column prop="jurid_name" label="法人代表" show-overflow-tooltip />
<el-table-column prop="bz_print_no" label="包装打印模板" width="150px" :formatter="printTemple" show-overflow-tooltip />
<el-table-column prop="bz_print_within" label="内标打印模板" width="150px" :formatter="printTemple2" show-overflow-tooltip />
<el-table-column prop="shd_print_no" label="送货单打印模板路径" width="180px" show-overflow-tooltip />
<el-table-column prop="shd_print_no" label="送货单打印模板路径" width="180px" show-overflow-tooltip/>
<el-table-column prop="shd_dtl_num" label="送货单明细数" width="150px" show-overflow-tooltip />
<el-table-column prop="is_auto_table" label="是否自动贴标" width="150px" show-overflow-tooltip :formatter="autoTable" />
<el-table-column prop="update_optname" label="修改者" width="150px" />
<el-table-column prop="is_auto_table" label="是否自动贴标" width="150px" show-overflow-tooltip :formatter="autoTable"/>
<el-table-column prop="update_optname" label="修改者" width="150px"/>
<el-table-column prop="update_time" label="修改时间" width="150" />
<el-table-column label="启用" align="center" prop="is_used">
<template slot-scope="scope">
@@ -210,7 +210,6 @@
/>
</template>
</el-table-column>
<el-table-column prop="mdm_status" label="MDM数据状态" :formatter="mdmStatusTrans" />
<el-table-column
v-permission="['admin','customerbase:edit','customerbase:del']"
label="操作"
@@ -284,7 +283,7 @@ const defaultForm = {
}
export default {
name: 'Customerbase',
dicts: ['is_used', 'print_temple', 'two_print_temple', 'CUSTOMERBASE_MDM_STATUS'],
dicts: ['is_used', 'print_temple', 'two_print_temple'],
components: { pagination, crudOperation, rrOperation, udOperation, Treeselect },
mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() {
@@ -416,9 +415,6 @@ export default {
},
autoTable(row) {
return this.dict.label.is_used[row.is_auto_table]
},
mdmStatusTrans(row) {
return this.dict.label.CUSTOMERBASE_MDM_STATUS[row.mdm_status]
}
}
}

View File

@@ -36,7 +36,7 @@
</el-col>
</el-row>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation />
<crudOperation/>
<!--表单组件-->
<el-dialog
:close-on-click-modal="false"
@@ -149,7 +149,6 @@
/>
</template>
</el-table-column>
<el-table-column prop="mdm_status" label="MDM数据状态" :formatter="mdmStatusTrans" />
<el-table-column prop="update_optname" label="修改人" />
<el-table-column prop="update_time" label="修改时间" width="135" />
<el-table-column
@@ -222,7 +221,7 @@ const defaultForm = {
export default {
name: 'Materialbase',
// 数据字典
dicts: ['is_used', 'MATERIALBASE_MDM_STATUS'],
dicts: ['is_used'],
components: { pagination, crudOperation, rrOperation, udOperation, Treeselect },
mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() {
@@ -405,9 +404,6 @@ export default {
}, 100)
})
}
},
mdmStatusTrans(row) {
return this.dict.label.MATERIALBASE_MDM_STATUS[row.mdm_status]
}
}
}

View File

@@ -187,7 +187,6 @@
/>
</template>
</el-table-column>
<el-table-column prop="mdm_status" label="MDM数据状态" width="120px" :formatter="mdmStatusTrans" />
<el-table-column prop="country" label="国家" :min-width="flexWidth('country',crud.data,'国家')" />
<el-table-column prop="state" label="省份" :min-width="flexWidth('state',crud.data,'省份')" />
<el-table-column prop="city" label="城市" :min-width="flexWidth('city',crud.data,'城市')" />
@@ -262,7 +261,7 @@ const defaultForm = {
remark: null
}
export default {
dicts: ['is_used', 'TRANSPORTATIONBASE_MDM_STATUS'],
dicts: ['is_used'],
name: 'Transportationbase',
components: { pagination, crudOperation, rrOperation, udOperation },
mixins: [presenter(), header(), form(defaultForm), crud()],
@@ -330,9 +329,6 @@ export default {
data.is_used = '0'
}
})
},
mdmStatusTrans(row) {
return this.dict.label.TRANSPORTATIONBASE_MDM_STATUS[row.mdm_status]
}
}
}

View File

@@ -80,7 +80,7 @@
<el-option
v-for="item in dict.ST_INV_IN_TYPE"
:key="item.value"
:disabled="item.value !== '0002' && item.value !== '0013' && item.value !== '0014'"
:disabled="item.value !== '0002'"
:label="item.label"
:value="item.value"
/>

View File

@@ -79,11 +79,7 @@
<el-option
v-for="item in dict.ST_INV_OUT_TYPE"
:key="item.value"
:disabled="item.value !== '1001'
&& item.value !== '1009'
&& item.value !== '1013'
&& item.value !== '1014'
&& item.value !== '1015'"
:disabled="item.value !== '1001' && item.value !== '1009'"
:label="item.label"
:value="item.value"
/>