Compare commits
3 Commits
merge&mdm0
...
master_mer
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6db702b5cf | ||
|
|
094d78ae45 | ||
|
|
bf1ee590fb |
@@ -153,7 +153,7 @@ public class ZxDjwTask extends AbstractAcsTask {
|
|||||||
PdmBiSubpackagerelation pdmBiSubpackagerelation = subpackageRelationService
|
PdmBiSubpackagerelation pdmBiSubpackagerelation = subpackageRelationService
|
||||||
.getOne(new LambdaUpdateWrapper<PdmBiSubpackagerelation>().eq(PdmBiSubpackagerelation::getContainer_name, schBaseTask.getVehicle_code()), false);
|
.getOne(new LambdaUpdateWrapper<PdmBiSubpackagerelation>().eq(PdmBiSubpackagerelation::getContainer_name, schBaseTask.getVehicle_code()), false);
|
||||||
if (!pdmBiSubpackagerelation.getStatus().equals(IOSEnum.IS_NOTANDYES.code("否"))){
|
if (!pdmBiSubpackagerelation.getStatus().equals(IOSEnum.IS_NOTANDYES.code("否"))){
|
||||||
throw new BadRequestException("该子卷对应状态为["+pdmBiSubpackagerelation.getStatus()+"],不为生成状态!)");
|
throw new BadRequestException("该子卷对应状态为["+pdmBiSubpackagerelation.getStatus()+"],不为生成状态,不允许进行状态变更!)");
|
||||||
}
|
}
|
||||||
pdmBiSubpackagerelation.setStatus(IOSEnum.IS_NOTANDYES.code("是"));
|
pdmBiSubpackagerelation.setStatus(IOSEnum.IS_NOTANDYES.code("是"));
|
||||||
subpackageRelationService.updateById(pdmBiSubpackagerelation);
|
subpackageRelationService.updateById(pdmBiSubpackagerelation);
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ import java.util.stream.Collectors;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class AutoSendVehicleToKzj extends Prun{
|
public class AutoSendVehicleToKzj extends Prun {
|
||||||
|
|
||||||
private final String THIS_CLASS = AutoSendVehicleToKzj.class.getName();
|
private final String THIS_CLASS = AutoSendVehicleToKzj.class.getName();
|
||||||
@Resource
|
@Resource
|
||||||
@@ -63,7 +63,7 @@ public class AutoSendVehicleToKzj extends Prun{
|
|||||||
try {
|
try {
|
||||||
this.toKzjHcw();
|
this.toKzjHcw();
|
||||||
this.sendVehicleToDjqOrGzq(IOSEnum.IS_NOTANDYES.code("否"), null);
|
this.sendVehicleToDjqOrGzq(IOSEnum.IS_NOTANDYES.code("否"), null);
|
||||||
}catch (Exception ex){
|
} catch (Exception ex) {
|
||||||
log.error(ex.getMessage());
|
log.error(ex.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -82,65 +82,63 @@ public class AutoSendVehicleToKzj extends Prun{
|
|||||||
log.info("待检区或管制区->空载具缓存位补空任务正在创建被锁住。");
|
log.info("待检区或管制区->空载具缓存位补空任务正在创建被锁住。");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
List<String> taskTypes = new ArrayList(Arrays.asList(PackageInfoIvtEnum.TASK_TYPE.code("补空(待检区->空载具缓存位)")));
|
List<String> taskTypes = new ArrayList(Arrays.asList(PackageInfoIvtEnum.TASK_TYPE.code("补空(待检区->空载具缓存位)")));
|
||||||
List<SchBaseTask> existTask = this.taskService.getExistTasks(taskTypes);
|
List<SchBaseTask> existTask = this.taskService.getExistTasks(taskTypes);
|
||||||
if (existTask.size() <= 1) {
|
if (existTask.size() <= 1) {
|
||||||
List<BstIvtPackageinfoivt> empPoints = this.packageinfoivtService.selectEmpPoints(PackageInfoIvtEnum.POINT_STATUS.code("空载具缓存位"), PackageInfoIvtEnum.IVT_STATUS.code("空"));
|
List<BstIvtPackageinfoivt> empPoints = this.packageinfoivtService.selectEmpPoints(PackageInfoIvtEnum.POINT_STATUS.code("空载具缓存位"), PackageInfoIvtEnum.IVT_STATUS.code("空"));
|
||||||
List<BstIvtPackageinfoivt> vehiclePoints = this.packageinfoivtService.selectEmpPoints(PackageInfoIvtEnum.POINT_STATUS.code("待检区"), PackageInfoIvtEnum.IVT_STATUS.code("空载具"));
|
List<BstIvtPackageinfoivt> vehiclePoints = this.packageinfoivtService.selectEmpPoints(PackageInfoIvtEnum.POINT_STATUS.code("装箱区"), PackageInfoIvtEnum.IVT_STATUS.code("空载具"));
|
||||||
//如果待检区没有可用的空载具
|
//如果待检区没有可用的空载具
|
||||||
if (CollectionUtils.isEmpty(vehiclePoints)){
|
if (CollectionUtils.isEmpty(vehiclePoints)) {
|
||||||
List<SchBaseTask> taskList = taskService.list(new LambdaQueryWrapper<SchBaseTask>()
|
/*List<SchBaseTask> taskList = taskService.list(new LambdaQueryWrapper<SchBaseTask>()
|
||||||
.lt(SchBaseTask::getTask_status, TaskStatusEnum.FINISHED.getCode())
|
.lt(SchBaseTask::getTask_status, TaskStatusEnum.FINISHED.getCode())
|
||||||
.eq(SchBaseTask::getIs_delete, IOSEnum.IS_NOTANDYES.code("否"))
|
.eq(SchBaseTask::getIs_delete, IOSEnum.IS_NOTANDYES.code("否"))
|
||||||
.eq(SchBaseTask::getTask_type, "010909"));
|
.eq(SchBaseTask::getTask_type, "010909"));*/
|
||||||
if (ObjectUtils.isEmpty(taskList)){
|
vehiclePoints = packageinfoivtService
|
||||||
vehiclePoints = packageinfoivtService
|
.selectEmpPoints(PackageInfoIvtEnum.POINT_STATUS.code("待检区"), PackageInfoIvtEnum.IVT_STATUS.code("空载具"));
|
||||||
.selectEmpPoints(PackageInfoIvtEnum.POINT_STATUS.code("装箱区"), PackageInfoIvtEnum.IVT_STATUS.code("空载具"));
|
}
|
||||||
}
|
if (!CollectionUtils.isEmpty(empPoints) && !CollectionUtils.isEmpty(vehiclePoints) && existTask.size() < empPoints.size()) {
|
||||||
}
|
//增加空洞判断
|
||||||
if (!CollectionUtils.isEmpty(empPoints) && !CollectionUtils.isEmpty(vehiclePoints) && existTask.size() < empPoints.size()) {
|
//车 04 05 06
|
||||||
//增加空洞判断
|
//☒☒口 ☒口☒ ☒口口:
|
||||||
//车 04 05 06
|
if (existTask.size() == 0 && empPoints.size() > 1 && vehiclePoints.size() > 1) {
|
||||||
//☒☒口 ☒口☒ ☒口口:
|
for (int i = 0; i < 2; i++) {
|
||||||
if (existTask.size()==0 && empPoints.size() > 1 && vehiclePoints.size() > 1) {
|
BstIvtPackageinfoivt disPoint = empPoints.get(i);
|
||||||
for (int i = 0; i < 2; i++) {
|
|
||||||
BstIvtPackageinfoivt disPoint = empPoints.get(i);
|
|
||||||
int count = packageinfoivtService.count(new QueryWrapper<BstIvtPackageinfoivt>()
|
|
||||||
.lt("sort_seq", disPoint.getSort_seq())
|
|
||||||
.eq("point_status", PackageInfoIvtEnum.POINT_STATUS.code("空载具缓存位"))
|
|
||||||
.eq("ivt_status", PackageInfoIvtEnum.IVT_STATUS.code("空载具")));
|
|
||||||
if (count>0){
|
|
||||||
log.warn("当前点位存在空洞的情况"+disPoint.getPoint_code());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
JSONObject task = new JSONObject();
|
|
||||||
task.put("task_type", PackageInfoIvtEnum.TASK_TYPE.code("补空(待检区->空载具缓存位)"));
|
|
||||||
task.put("vehicle_code2", PackageInfoIvtEnum.AGV_ACTION_TYPE.code("放货二次分配"));
|
|
||||||
task.put("point_code1", vehiclePoints.get(i).getPoint_code());
|
|
||||||
task.put("point_code2", this.packageinfoivtService.getWaitPoint(disPoint.getBlock(), disPoint.getWait_point_type()));
|
|
||||||
task.put("point_code3", disPoint.getPoint_code());
|
|
||||||
this.djqToKzjhcwTask.createTask(task);
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
BstIvtPackageinfoivt disPoint = empPoints.get(0);
|
|
||||||
int count = packageinfoivtService.count(new QueryWrapper<BstIvtPackageinfoivt>()
|
int count = packageinfoivtService.count(new QueryWrapper<BstIvtPackageinfoivt>()
|
||||||
.lt("sort_seq", disPoint.getSort_seq())
|
.lt("sort_seq", disPoint.getSort_seq())
|
||||||
.eq("point_status", PackageInfoIvtEnum.POINT_STATUS.code("空载具缓存位"))
|
.eq("point_status", PackageInfoIvtEnum.POINT_STATUS.code("空载具缓存位"))
|
||||||
.eq("ivt_status", PackageInfoIvtEnum.IVT_STATUS.code("空载具")));
|
.eq("ivt_status", PackageInfoIvtEnum.IVT_STATUS.code("空载具")));
|
||||||
if (count>0){
|
if (count > 0) {
|
||||||
log.warn("当前点位存在空洞的情况"+disPoint.getPoint_code());
|
log.warn("当前点位存在空洞的情况" + disPoint.getPoint_code());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
JSONObject task = new JSONObject();
|
JSONObject task = new JSONObject();
|
||||||
task.put("task_type", PackageInfoIvtEnum.TASK_TYPE.code("补空(待检区->空载具缓存位)"));
|
task.put("task_type", PackageInfoIvtEnum.TASK_TYPE.code("补空(待检区->空载具缓存位)"));
|
||||||
task.put("vehicle_code2", PackageInfoIvtEnum.AGV_ACTION_TYPE.code("放货二次分配"));
|
task.put("vehicle_code2", PackageInfoIvtEnum.AGV_ACTION_TYPE.code("放货二次分配"));
|
||||||
task.put("point_code1", vehiclePoints.get(0).getPoint_code());
|
task.put("point_code1", vehiclePoints.get(i).getPoint_code());
|
||||||
task.put("point_code2", this.packageinfoivtService.getWaitPoint(disPoint.getBlock(), disPoint.getWait_point_type()));
|
task.put("point_code2", this.packageinfoivtService.getWaitPoint(disPoint.getBlock(), disPoint.getWait_point_type()));
|
||||||
task.put("point_code3", disPoint.getPoint_code());
|
task.put("point_code3", disPoint.getPoint_code());
|
||||||
this.djqToKzjhcwTask.createTask(task);
|
this.djqToKzjhcwTask.createTask(task);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
BstIvtPackageinfoivt disPoint = empPoints.get(0);
|
||||||
|
int count = packageinfoivtService.count(new QueryWrapper<BstIvtPackageinfoivt>()
|
||||||
|
.lt("sort_seq", disPoint.getSort_seq())
|
||||||
|
.eq("point_status", PackageInfoIvtEnum.POINT_STATUS.code("空载具缓存位"))
|
||||||
|
.eq("ivt_status", PackageInfoIvtEnum.IVT_STATUS.code("空载具")));
|
||||||
|
if (count > 0) {
|
||||||
|
log.warn("当前点位存在空洞的情况" + disPoint.getPoint_code());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
JSONObject task = new JSONObject();
|
||||||
|
task.put("task_type", PackageInfoIvtEnum.TASK_TYPE.code("补空(待检区->空载具缓存位)"));
|
||||||
|
task.put("vehicle_code2", PackageInfoIvtEnum.AGV_ACTION_TYPE.code("放货二次分配"));
|
||||||
|
task.put("point_code1", vehiclePoints.get(0).getPoint_code());
|
||||||
|
task.put("point_code2", this.packageinfoivtService.getWaitPoint(disPoint.getBlock(), disPoint.getWait_point_type()));
|
||||||
|
task.put("point_code3", disPoint.getPoint_code());
|
||||||
|
this.djqToKzjhcwTask.createTask(task);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
if (lock.isLocked() && lock.isHeldByCurrentThread()) {
|
if (lock.isLocked() && lock.isHeldByCurrentThread()) {
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
@@ -196,8 +194,8 @@ public class AutoSendVehicleToKzj extends Prun{
|
|||||||
task.put("point_code2", djqEmpList.get(0).getPoint_code());
|
task.put("point_code2", djqEmpList.get(0).getPoint_code());
|
||||||
try {
|
try {
|
||||||
sendDjqKzjTask.createTask(task);
|
sendDjqKzjTask.createTask(task);
|
||||||
}catch (Exception ex){
|
} catch (Exception ex) {
|
||||||
log.error(THIS_CLASS+"任务创建失败"+ex.getMessage());
|
log.error(THIS_CLASS + "任务创建失败" + ex.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@@ -211,8 +209,6 @@ public class AutoSendVehicleToKzj extends Prun{
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void getPointCode(JSONObject task, String taskType) {
|
private void getPointCode(JSONObject task, String taskType) {
|
||||||
List<BstIvtPackageinfoivt> packageList;
|
List<BstIvtPackageinfoivt> packageList;
|
||||||
if (taskType.equals(PackageInfoIvtEnum.TASK_TYPE.code("补空(待检区->空载具缓存位)"))) {
|
if (taskType.equals(PackageInfoIvtEnum.TASK_TYPE.code("补空(待检区->空载具缓存位)"))) {
|
||||||
|
|||||||
@@ -1674,7 +1674,7 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
|||||||
jsonTaskParam.put("vehicle_code2", jsonVeExt.getString("storagevehicle_code"));
|
jsonTaskParam.put("vehicle_code2", jsonVeExt.getString("storagevehicle_code"));
|
||||||
jsonTaskParam.put("table_fk", iostorinv_id);
|
jsonTaskParam.put("table_fk", iostorinv_id);
|
||||||
|
|
||||||
TwoOutExceptionalTask taskBean = new TwoOutExceptionalTask();
|
TwoOutExceptionalTask taskBean = SpringContextHolder.getBean(TwoOutExceptionalTask.class);
|
||||||
String task_id = taskBean.createTask(jsonTaskParam);
|
String task_id = taskBean.createTask(jsonTaskParam);
|
||||||
taskBean.immediateNotifyAcs(task_id);
|
taskBean.immediateNotifyAcs(task_id);
|
||||||
|
|
||||||
|
|||||||
@@ -125,8 +125,8 @@ public class StIvtIostorinvdtlServiceImpl extends ServiceImpl<StIvtIostorinvdtlM
|
|||||||
.base_bill_code(row.getString("base_bill_code"))
|
.base_bill_code(row.getString("base_bill_code"))
|
||||||
.base_bill_table(row.getString("base_bill_table"))
|
.base_bill_table(row.getString("base_bill_table"))
|
||||||
.remark(row.getString("remark"))
|
.remark(row.getString("remark"))
|
||||||
.unassign_qty(BigDecimal.valueOf(0))
|
.assign_qty(BigDecimal.valueOf(0))
|
||||||
.assign_qty(row.getBigDecimal("plan_qty"))
|
.unassign_qty(row.getBigDecimal("plan_qty"))
|
||||||
.box_no(row.getString("package_box_sn"))
|
.box_no(row.getString("package_box_sn"))
|
||||||
.vbeln(row.getString("vbeln"))
|
.vbeln(row.getString("vbeln"))
|
||||||
.posnr(row.getString("posnr"))
|
.posnr(row.getString("posnr"))
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public class TransportationbaseServiceImpl implements TransportationbaseService
|
|||||||
if (ObjectUtil.isNotEmpty(cust_name)) {
|
if (ObjectUtil.isNotEmpty(cust_name)) {
|
||||||
map.put("cust_name", "%" + 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;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -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);
|
|
||||||
}
|
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -52,7 +52,7 @@ public class LmsToSapServiceImpl implements LmsToSapService {
|
|||||||
String token = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("SAP_TOKEN").getValue();
|
String token = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("SAP_TOKEN").getValue();
|
||||||
String sap_client = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("SAP_CLIENT").getValue();
|
String sap_client = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("SAP_CLIENT").getValue();
|
||||||
String api = "";
|
String api = "";
|
||||||
url = url + "/sap/center/lms/004";
|
url = url + "/sap/center/wms/004";
|
||||||
try {
|
try {
|
||||||
String resultMsg = HttpRequest.post(url).header("TOKEN", token)
|
String resultMsg = HttpRequest.post(url).header("TOKEN", token)
|
||||||
.header("sap-client", sap_client)
|
.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 url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("SAP_URL").getValue();
|
||||||
String token = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("SAP_TOKEN").getValue();
|
String token = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("SAP_TOKEN").getValue();
|
||||||
String sap_client = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("SAP_CLIENT").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;
|
url = url + api;
|
||||||
try {
|
try {
|
||||||
String resultMsg = HttpRequest.post(url).header("TOKEN", token)
|
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 url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("SAP_URL").getValue();
|
||||||
String token = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("SAP_TOKEN").getValue();
|
String token = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("SAP_TOKEN").getValue();
|
||||||
String sap_client = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("SAP_CLIENT").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;
|
url = url + api;
|
||||||
try {
|
try {
|
||||||
String resultMsg = HttpRequest.post(url).header("TOKEN", token)
|
String resultMsg = HttpRequest.post(url).header("TOKEN", token)
|
||||||
|
|||||||
@@ -383,12 +383,11 @@ public class SapToLmsServiceImpl implements SapToLmsService {
|
|||||||
JSONObject json = item.getJSONObject(i);
|
JSONObject json = item.getJSONObject(i);
|
||||||
lfart = json.getString("LFART");
|
lfart = json.getString("LFART");
|
||||||
JSONObject jsonDtl = new JSONObject();
|
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("io_type", "1");
|
||||||
jsonMst.put("buss_type", billType);
|
jsonMst.put("buss_type", "1001");
|
||||||
jsonMst.put("bill_type", billType);
|
jsonMst.put("bill_type", "1001");
|
||||||
jsonMst.put("source_id", json.getLongValue("VBELN"));
|
jsonMst.put("source_id", json.getLongValue("VBELN"));
|
||||||
jsonMst.put("source_name", "交货单");
|
jsonMst.put("source_name", "交货单");
|
||||||
jsonMst.put("receiver", json.getString("CONSIGNEE")); // 收货人
|
jsonMst.put("receiver", json.getString("CONSIGNEE")); // 收货人
|
||||||
@@ -417,7 +416,7 @@ public class SapToLmsServiceImpl implements SapToLmsService {
|
|||||||
jsonDtl.put("width", json.getString("HL02")); // 幅宽
|
jsonDtl.put("width", json.getString("HL02")); // 幅宽
|
||||||
tableData.add(jsonDtl);
|
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"));//库位*/
|
/*jsonMst.put("remark",json.getString("LGORT"));//库位*/
|
||||||
HashMap map = new HashMap();
|
HashMap map = new HashMap();
|
||||||
//更新包装关系
|
//更新包装关系
|
||||||
@@ -503,13 +502,8 @@ public class SapToLmsServiceImpl implements SapToLmsService {
|
|||||||
box_rows.add(map);
|
box_rows.add(map);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
// 发货出库
|
||||||
发货分配逻辑
|
if (StrUtil.equals(lfart, "ZLF")) {
|
||||||
* ZLF9 免费发货单-有价格
|
|
||||||
* ZLF3 免费发货单
|
|
||||||
* ZLF1 标准发货单
|
|
||||||
* */
|
|
||||||
if (StrUtil.equals(lfart, "ZLF1") || StrUtil.equals(lfart, "ZLF3") || StrUtil.equals(lfart, "ZLF9")) {
|
|
||||||
jsonMst.put("tableData", tableData);
|
jsonMst.put("tableData", tableData);
|
||||||
// 调用出库新增并分配
|
// 调用出库新增并分配
|
||||||
String iostorinv_id = checkOutBillService.insertDtl2(jsonMst);
|
String iostorinv_id = checkOutBillService.insertDtl2(jsonMst);
|
||||||
@@ -526,15 +520,11 @@ public class SapToLmsServiceImpl implements SapToLmsService {
|
|||||||
JSONObject jsonObject = new JSONObject();
|
JSONObject jsonObject = new JSONObject();
|
||||||
jsonObject.put("iostorinv_id", iostorinv_id);
|
jsonObject.put("iostorinv_id", iostorinv_id);
|
||||||
}
|
}
|
||||||
/*
|
// 退货入库
|
||||||
退货入库 - 1 销售退货单
|
if (StrUtil.equals(lfart, "ZLR")) {
|
||||||
退货入库 - 3 免费退货单
|
|
||||||
*/
|
|
||||||
if (StrUtil.equals(lfart, "ZLR1") || StrUtil.equals(lfart, "ZLR2")) {
|
|
||||||
jsonMst.put("tableData", box_rows);
|
jsonMst.put("tableData", box_rows);
|
||||||
//创建退货入库单
|
//创建退货入库单
|
||||||
String billType = getBillTypeByLfart(lfart);
|
jsonMst.put("bill_type", "0002");
|
||||||
jsonMst.put("bill_type", billType);
|
|
||||||
jsonMst.put("biz_date", DateUtil.now());
|
jsonMst.put("biz_date", DateUtil.now());
|
||||||
jsonMst.put("bill_status", "10");
|
jsonMst.put("bill_status", "10");
|
||||||
rawAssistIStorService.insertDtl(jsonMst);
|
rawAssistIStorService.insertDtl(jsonMst);
|
||||||
@@ -557,48 +547,6 @@ public class SapToLmsServiceImpl implements SapToLmsService {
|
|||||||
return result;
|
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
|
@Override
|
||||||
public JSONObject getReturnDeliveryInfo(JSONObject jo) {
|
public JSONObject getReturnDeliveryInfo(JSONObject jo) {
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ public class OutChargeServiceImpl implements OutChargeService {
|
|||||||
//将包装关系中对应的记录状态改为包装
|
//将包装关系中对应的记录状态改为包装
|
||||||
HashMap<String, String> map = new HashMap<>();
|
HashMap<String, String> map = new HashMap<>();
|
||||||
map.put("status", "1");
|
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'");
|
WQLObject.getWQLObject("PDM_BI_SubPackageRelation").update(map, "package_box_SN = '" + dis_row.getString("box_no") + "' AND status = '3'");
|
||||||
} else {
|
} else {
|
||||||
WQLObject.getWQLObject("PDM_BI_SubPackageRelation").update(map, "package_box_SN = '" + dis_row.getString("box_no") + "'");
|
WQLObject.getWQLObject("PDM_BI_SubPackageRelation").update(map, "package_box_SN = '" + dis_row.getString("box_no") + "'");
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
AND ios.io_type = '0'
|
AND ios.io_type = '0'
|
||||||
AND ios.bill_status = '99'
|
AND ios.bill_status = '99'
|
||||||
AND ios.is_writeoff = '0'
|
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
|
and ios.stor_id in 输入.in_stor_id
|
||||||
OPTION 输入.bill_code <> ""
|
OPTION 输入.bill_code <> ""
|
||||||
ios.bill_code like 输入.bill_code
|
ios.bill_code like 输入.bill_code
|
||||||
@@ -125,7 +125,7 @@
|
|||||||
AND ios.io_type = '0'
|
AND ios.io_type = '0'
|
||||||
AND ios.bill_status = '99'
|
AND ios.bill_status = '99'
|
||||||
AND ios.is_writeoff = '0'
|
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
|
and ios.stor_id in 输入.in_stor_id
|
||||||
OPTION 输入.bill_code <> ""
|
OPTION 输入.bill_code <> ""
|
||||||
ios.bill_code like 输入.bill_code
|
ios.bill_code like 输入.bill_code
|
||||||
|
|||||||
@@ -977,7 +977,7 @@
|
|||||||
AND
|
AND
|
||||||
ios.bill_status = '99'
|
ios.bill_status = '99'
|
||||||
AND
|
AND
|
||||||
ios.bill_type in ('1001','1009','1013','1014','1015')
|
ios.bill_type in ('1001','1009')
|
||||||
AND
|
AND
|
||||||
ios.stor_id in 输入.in_stor_id
|
ios.stor_id in 输入.in_stor_id
|
||||||
OPTION 输入.bill_code <> ""
|
OPTION 输入.bill_code <> ""
|
||||||
|
|||||||
@@ -1209,9 +1209,8 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
|||||||
|
|
||||||
// 更新主表
|
// 更新主表
|
||||||
JSONObject jsonMst = mstTab.query("iostorinv_id = '" + whereJson.getString("iostorinv_id") + "'").uniqueResult(0);
|
JSONObject jsonMst = mstTab.query("iostorinv_id = '" + whereJson.getString("iostorinv_id") + "'").uniqueResult(0);
|
||||||
HashMap<String, String> map = new HashMap<>();
|
jsonMst.put("is_overdue", whereJson.getString("is_overdue"));
|
||||||
map.put("is_overdue", whereJson.getString("is_overdue"));
|
mstTab.update(jsonMst);
|
||||||
mstTab.update(map, "iostorinv_id = '" + whereJson.getString("iostorinv_id") + "'");
|
|
||||||
|
|
||||||
// 计算超期数量
|
// 计算超期数量
|
||||||
List<JSONObject> disList = disTab.query("iostorinvdtl_id = '" + whereJson.getString("iostorinvdtl_id") + "' AND is_overdue = '1'")
|
List<JSONObject> disList = disTab.query("iostorinvdtl_id = '" + whereJson.getString("iostorinvdtl_id") + "' AND is_overdue = '1'")
|
||||||
@@ -1221,7 +1220,6 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
|||||||
.map(row -> row.getDoubleValue("plan_qty"))
|
.map(row -> row.getDoubleValue("plan_qty"))
|
||||||
.reduce(Double::sum).orElse(0.00);
|
.reduce(Double::sum).orElse(0.00);
|
||||||
|
|
||||||
jsonMst.put("is_overdue", whereJson.getString("is_overdue"));
|
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
result.put("overdue_qyt", overdue_qyt);
|
result.put("overdue_qyt", overdue_qyt);
|
||||||
result.put("mst", jsonMst);
|
result.put("mst", jsonMst);
|
||||||
@@ -1264,7 +1262,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 根据交货单找到主单据
|
// 根据交货单找到主单据
|
||||||
JSONObject jsonMst = WQL.getWO("QST_IVT_CHECKOUTBILL").addParam("flag", "22").addParam("vbeln", vbeln).process().uniqueResult(0);
|
JSONObject jsonMst = WQL.getWO("QST_IVT_CHECKOUTBILL").addParam("flag","22").addParam("vbeln",vbeln).process().uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(jsonMst)) {
|
if (ObjectUtil.isEmpty(jsonMst)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -3249,12 +3247,12 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
|||||||
JSONArray structArr = WQLObject.getWQLObject("ST_IVT_StructAttr").query("block_num = '" + jsonRow.getString("block_num")
|
JSONArray structArr = WQLObject.getWQLObject("ST_IVT_StructAttr").query("block_num = '" + jsonRow.getString("block_num")
|
||||||
+ "' and row_num = '" + jsonRow.getString("row_num") + "' and is_used = '1' and is_delete = '0' and lock_type not in ('1','6','3')").getResultJSONArray(0);
|
+ "' and row_num = '" + jsonRow.getString("row_num") + "' and is_used = '1' and is_delete = '0' and lock_type not in ('1','6','3')").getResultJSONArray(0);
|
||||||
if (ObjectUtil.isNotEmpty(structArr)) {
|
if (ObjectUtil.isNotEmpty(structArr)) {
|
||||||
throw new BadRequestException("有仓位被其他业务锁定,仓位编码为【" + structArr.getJSONObject(0).getString("struct_code") + "】,对应单据号为【" + structArr.getJSONObject(0).getString("inv_code") + "】,请稍后在试!");
|
throw new BadRequestException("有仓位被其他业务锁定,仓位编码为【"+structArr.getJSONObject(0).getString("struct_code")+"】,对应单据号为【" + structArr.getJSONObject(0).getString("inv_code") + "】,请稍后在试!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 1.判断此条分配明细的 ‘仓位’在此主表下的分配明细是否有相同的 ‘仓位’
|
// 1.判断此条分配明细的 ‘仓位’在此主表下的分配明细是否有相同的 ‘仓位’
|
||||||
List<StructAllsetDto> structSet = iStIvtIostorinvdisService.getDisStructSet(whereJson.getString("iostorinv_id"), whereJson.getString("iostorinvdtl_id"));
|
List<StructAllsetDto> structSet = iStIvtIostorinvdisService.getDisStructSet(whereJson.getString("iostorinv_id"),whereJson.getString("iostorinvdtl_id"));
|
||||||
//同区同排排序:10302-04-01
|
//同区同排排序:10302-04-01
|
||||||
//口口回口回口口口1
|
//口口回口回口口口1
|
||||||
//口口回回口口口口2
|
//口口回回口口口口2
|
||||||
|
|||||||
@@ -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
|
// 1.回传sap
|
||||||
JSONArray paramSapMstArr = new JSONArray();
|
JSONArray paramSapMstArr = new JSONArray();
|
||||||
|
|
||||||
@@ -783,7 +783,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
|||||||
paramDis.put("ZZWLHD", jsonSub.getString("thickness"));
|
paramDis.put("ZZWLHD", jsonSub.getString("thickness"));
|
||||||
paramDis.put("CHARG", jsonSub.getString("sap_pcsn"));
|
paramDis.put("CHARG", jsonSub.getString("sap_pcsn"));
|
||||||
paramDis.put("KALAB", NumberUtil.round(jsonDis.getDoubleValue("plan_qty"), 3));
|
paramDis.put("KALAB", NumberUtil.round(jsonDis.getDoubleValue("plan_qty"), 3));
|
||||||
paramDis.put("WERKS", "2461");
|
paramDis.put("WERKS", "2460");
|
||||||
paramSapMstArr.add(paramDis);
|
paramSapMstArr.add(paramDis);
|
||||||
}
|
}
|
||||||
param.put("ITEM", paramSapMstArr);
|
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
|
// 1.回传sap
|
||||||
JSONArray paramSapMstArr = new JSONArray();
|
JSONArray paramSapMstArr = new JSONArray();
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ https://juejin.cn/post/6844903775631572999
|
|||||||
<include resource="log/SapToLms.xml"/>
|
<include resource="log/SapToLms.xml"/>
|
||||||
<include resource="log/AcsToLMS.xml"/>
|
<include resource="log/AcsToLMS.xml"/>
|
||||||
<include resource="log/LmsToAcs.xml"/>
|
<include resource="log/LmsToAcs.xml"/>
|
||||||
<include resource="log/MdmToLms.xml"/>
|
|
||||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
<!-- 控制台高亮-->
|
<!-- 控制台高亮-->
|
||||||
<withJansi>true</withJansi>
|
<withJansi>true</withJansi>
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ export default {
|
|||||||
codeUrl: '',
|
codeUrl: '',
|
||||||
cookiePass: '',
|
cookiePass: '',
|
||||||
loginForm: {
|
loginForm: {
|
||||||
username: '',
|
username: 'admin',
|
||||||
password: '',
|
password: '',
|
||||||
rememberMe: false,
|
rememberMe: false,
|
||||||
code: '',
|
code: '',
|
||||||
|
|||||||
@@ -105,7 +105,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="送货单明细数">
|
<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-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -193,10 +193,10 @@
|
|||||||
<el-table-column prop="jurid_name" label="法人代表" show-overflow-tooltip />
|
<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_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="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="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="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_optname" label="修改者" width="150px"/>
|
||||||
<el-table-column prop="update_time" label="修改时间" width="150" />
|
<el-table-column prop="update_time" label="修改时间" width="150" />
|
||||||
<el-table-column label="启用" align="center" prop="is_used">
|
<el-table-column label="启用" align="center" prop="is_used">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -210,7 +210,6 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="mdm_status" label="MDM数据状态" :formatter="mdmStatusTrans" />
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-permission="['admin','customerbase:edit','customerbase:del']"
|
v-permission="['admin','customerbase:edit','customerbase:del']"
|
||||||
label="操作"
|
label="操作"
|
||||||
@@ -284,7 +283,7 @@ const defaultForm = {
|
|||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
name: 'Customerbase',
|
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 },
|
components: { pagination, crudOperation, rrOperation, udOperation, Treeselect },
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
@@ -416,9 +415,6 @@ export default {
|
|||||||
},
|
},
|
||||||
autoTable(row) {
|
autoTable(row) {
|
||||||
return this.dict.label.is_used[row.is_auto_table]
|
return this.dict.label.is_used[row.is_auto_table]
|
||||||
},
|
|
||||||
mdmStatusTrans(row) {
|
|
||||||
return this.dict.label.CUSTOMERBASE_MDM_STATUS[row.mdm_status]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
<crudOperation />
|
<crudOperation/>
|
||||||
<!--表单组件-->
|
<!--表单组件-->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
@@ -149,7 +149,6 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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_optname" label="修改人" />
|
||||||
<el-table-column prop="update_time" label="修改时间" width="135" />
|
<el-table-column prop="update_time" label="修改时间" width="135" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -222,7 +221,7 @@ const defaultForm = {
|
|||||||
export default {
|
export default {
|
||||||
name: 'Materialbase',
|
name: 'Materialbase',
|
||||||
// 数据字典
|
// 数据字典
|
||||||
dicts: ['is_used', 'MATERIALBASE_MDM_STATUS'],
|
dicts: ['is_used'],
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation, Treeselect },
|
components: { pagination, crudOperation, rrOperation, udOperation, Treeselect },
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
@@ -405,9 +404,6 @@ export default {
|
|||||||
}, 100)
|
}, 100)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
|
||||||
mdmStatusTrans(row) {
|
|
||||||
return this.dict.label.MATERIALBASE_MDM_STATUS[row.mdm_status]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -187,7 +187,6 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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="country" label="国家" :min-width="flexWidth('country',crud.data,'国家')" />
|
||||||
<el-table-column prop="state" label="省份" :min-width="flexWidth('state',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,'城市')" />
|
<el-table-column prop="city" label="城市" :min-width="flexWidth('city',crud.data,'城市')" />
|
||||||
@@ -262,7 +261,7 @@ const defaultForm = {
|
|||||||
remark: null
|
remark: null
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
dicts: ['is_used', 'TRANSPORTATIONBASE_MDM_STATUS'],
|
dicts: ['is_used'],
|
||||||
name: 'Transportationbase',
|
name: 'Transportationbase',
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
@@ -330,9 +329,6 @@ export default {
|
|||||||
data.is_used = '0'
|
data.is_used = '0'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
|
||||||
mdmStatusTrans(row) {
|
|
||||||
return this.dict.label.TRANSPORTATIONBASE_MDM_STATUS[row.mdm_status]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,7 +80,7 @@
|
|||||||
<el-option
|
<el-option
|
||||||
v-for="item in dict.ST_INV_IN_TYPE"
|
v-for="item in dict.ST_INV_IN_TYPE"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:disabled="item.value !== '0002' && item.value !== '0013' && item.value !== '0014'"
|
:disabled="item.value !== '0002'"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -79,11 +79,7 @@
|
|||||||
<el-option
|
<el-option
|
||||||
v-for="item in dict.ST_INV_OUT_TYPE"
|
v-for="item in dict.ST_INV_OUT_TYPE"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:disabled="item.value !== '1001'
|
:disabled="item.value !== '1001' && item.value !== '1009'"
|
||||||
&& item.value !== '1009'
|
|
||||||
&& item.value !== '1013'
|
|
||||||
&& item.value !== '1014'
|
|
||||||
&& item.value !== '1015'"
|
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user