fix(工序出站):增加熟化工序出站接口
This commit is contained in:
parent
509a507eb9
commit
38beae568c
@ -0,0 +1,201 @@
|
||||
package com.foreverwin.iep.integration.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工序出站列表DTO
|
||||
*
|
||||
* @author hechuan.liao
|
||||
* @date 2024-07-31 09:47:44
|
||||
*/
|
||||
@Data
|
||||
public class OperationOutListRequestDTO {
|
||||
|
||||
/**
|
||||
* 条码号
|
||||
*/
|
||||
private String lotNo;
|
||||
|
||||
/**
|
||||
* 生产批现况主键
|
||||
*/
|
||||
private String lotStateBo;
|
||||
|
||||
/**
|
||||
* 生产批序号
|
||||
*/
|
||||
private String lotSerial;
|
||||
|
||||
/**
|
||||
* 条码号状态
|
||||
*/
|
||||
private String barCodeStatus;
|
||||
|
||||
/**
|
||||
* 工序
|
||||
*/
|
||||
private String operation;
|
||||
|
||||
/**
|
||||
* 生产订单号
|
||||
*/
|
||||
private String shopOrder;
|
||||
|
||||
/**
|
||||
* 销售订单
|
||||
*/
|
||||
private String saleOrder;
|
||||
|
||||
/**
|
||||
* 销售订单行
|
||||
*/
|
||||
private String saleOrderLine;
|
||||
|
||||
/**
|
||||
* 物料主键
|
||||
*/
|
||||
private String itemBo;
|
||||
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
private String item;
|
||||
|
||||
/**
|
||||
* 物料描述
|
||||
*/
|
||||
private String itemDescription;
|
||||
|
||||
/**
|
||||
* 物料类型
|
||||
*/
|
||||
private String itemType;
|
||||
|
||||
/**
|
||||
* BOM物料主键
|
||||
*/
|
||||
private String bomComponentBo;
|
||||
|
||||
/**
|
||||
* BOM物料类型
|
||||
*/
|
||||
private String bomComponentType;
|
||||
|
||||
/**
|
||||
* 物料单位
|
||||
*/
|
||||
private String unitOfMeasure;
|
||||
|
||||
/**
|
||||
* 副单位
|
||||
*/
|
||||
private String unitAuxiliary;
|
||||
|
||||
/**
|
||||
* 101(主产品入库)、531(副产品入库)
|
||||
*/
|
||||
private String productType;
|
||||
|
||||
/**
|
||||
* 质检状态
|
||||
*/
|
||||
private String inspectionLevel;
|
||||
|
||||
/**
|
||||
* 切号
|
||||
*/
|
||||
private String cutNo;
|
||||
|
||||
/**
|
||||
* 工位号
|
||||
*/
|
||||
private String stationNo;
|
||||
|
||||
/**
|
||||
* 是否切完
|
||||
*/
|
||||
private String cutFinish;
|
||||
|
||||
/**
|
||||
* 证明是拆出来的条码
|
||||
*/
|
||||
private String isSplit;
|
||||
|
||||
/**
|
||||
* 证明是被拆的条码
|
||||
*/
|
||||
private String isBySplit;
|
||||
|
||||
/**
|
||||
* 宽度
|
||||
*/
|
||||
private String width;
|
||||
|
||||
/**
|
||||
* 长度
|
||||
*/
|
||||
private String length;
|
||||
|
||||
/**
|
||||
* 厚度
|
||||
*/
|
||||
private String thickness;
|
||||
|
||||
/**
|
||||
* 班组
|
||||
*/
|
||||
private String teamGroup;
|
||||
|
||||
/**
|
||||
* 处理面
|
||||
*/
|
||||
private String treadeSide;
|
||||
|
||||
/**
|
||||
* 处理面
|
||||
*/
|
||||
private List<String> treadeSideList;
|
||||
|
||||
/**
|
||||
* 检验项目VLT
|
||||
*/
|
||||
private BigDecimal vlt;
|
||||
|
||||
/**
|
||||
* 检验项目IRR
|
||||
*/
|
||||
private BigDecimal irr;
|
||||
|
||||
/**
|
||||
* 检验项目UVR
|
||||
*/
|
||||
private BigDecimal uvr;
|
||||
|
||||
/**
|
||||
* 膜卷类型
|
||||
*/
|
||||
private String rollType;
|
||||
|
||||
/**
|
||||
* 来源母批
|
||||
*/
|
||||
private String sourceMasterLot;
|
||||
|
||||
/**
|
||||
* 产出米数
|
||||
*/
|
||||
private BigDecimal outMeter;
|
||||
|
||||
/**
|
||||
* 产出重量
|
||||
*/
|
||||
private BigDecimal outWeight;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
}
|
||||
@ -0,0 +1,151 @@
|
||||
package com.foreverwin.iep.integration.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工序出站接口请求DTO
|
||||
*
|
||||
* @author hechuan.liao
|
||||
* @date 2024-07-31 09:47:44
|
||||
*/
|
||||
@Data
|
||||
public class OperationOutRequestDTO {
|
||||
|
||||
/**
|
||||
* 站点
|
||||
*/
|
||||
private String site;
|
||||
|
||||
/**
|
||||
* 自定义字段名
|
||||
*/
|
||||
private String fieldName;
|
||||
|
||||
/**
|
||||
* 资源
|
||||
*/
|
||||
private String resrce;
|
||||
|
||||
/**
|
||||
* 工序
|
||||
*/
|
||||
private String operation;
|
||||
|
||||
/**
|
||||
* 工序描述
|
||||
*/
|
||||
private String operationDescription;
|
||||
|
||||
/**
|
||||
* 工单
|
||||
*/
|
||||
private String shopOrder;
|
||||
|
||||
/**
|
||||
* 工单
|
||||
*/
|
||||
private List<String> shopOrderList;
|
||||
|
||||
/**
|
||||
* 工单数量
|
||||
*/
|
||||
private BigDecimal qty;
|
||||
|
||||
/**
|
||||
* 计划物料
|
||||
*/
|
||||
private String item;
|
||||
|
||||
/**
|
||||
* 计划物料描述
|
||||
*/
|
||||
private String itemDescription;
|
||||
|
||||
/**
|
||||
* 生产订单剩余数量
|
||||
*/
|
||||
private BigDecimal remainQty;
|
||||
|
||||
/**
|
||||
* 班制
|
||||
*/
|
||||
private String userWorkShift;
|
||||
|
||||
/**
|
||||
* 原膜条码
|
||||
*/
|
||||
private String membraneCode;
|
||||
|
||||
/**
|
||||
* 原膜米数
|
||||
*/
|
||||
private BigDecimal membraneMeter;
|
||||
|
||||
/**
|
||||
* 原膜剩余米数
|
||||
*/
|
||||
private BigDecimal membraneRemainMeter;
|
||||
|
||||
/**
|
||||
* 原膜等级
|
||||
*/
|
||||
private String membraneLevel;
|
||||
|
||||
/**
|
||||
* 原膜宽度
|
||||
*/
|
||||
private String membraneWidth;
|
||||
|
||||
/**
|
||||
* 原膜类型
|
||||
*/
|
||||
private String membraneType;
|
||||
|
||||
/**
|
||||
* 扫描条码号
|
||||
*/
|
||||
private String barCode;
|
||||
|
||||
/**
|
||||
* 条码数
|
||||
*/
|
||||
private int barCodeNum;
|
||||
|
||||
/**
|
||||
* 膜卷类型
|
||||
*/
|
||||
private String rollType;
|
||||
|
||||
/**
|
||||
* 作业规则工序列表
|
||||
*/
|
||||
private List<String> operationList;
|
||||
|
||||
/**
|
||||
* 作业规则自动出站工序列表
|
||||
*/
|
||||
private List<String> autoOperationList;
|
||||
|
||||
/**
|
||||
* 作业规则自动出站设备
|
||||
*/
|
||||
private String autoResource;
|
||||
|
||||
/**
|
||||
* 工序出站列表
|
||||
*/
|
||||
private List<OperationOutListRequestDTO> operationOutListRequestDTOList;
|
||||
|
||||
/**
|
||||
* 作业规则扣料判断是否附属设备
|
||||
*/
|
||||
private String eqpCombineFeeding;
|
||||
|
||||
/**
|
||||
* 创建人员(接口用)
|
||||
*/
|
||||
private String creator;
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.foreverwin.iep.integration.handler.def.sh;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.foreverwin.iep.integration.constant.Msg;
|
||||
import com.foreverwin.iep.integration.domain.InvokeRequest;
|
||||
import com.foreverwin.iep.integration.domain.InvokeResponse;
|
||||
import com.foreverwin.iep.integration.dto.SapExamineItemDTO;
|
||||
import com.foreverwin.iep.integration.service.HandlerService;
|
||||
import com.foreverwin.iep.integration.utils.JS;
|
||||
import com.foreverwin.iep.wip.domain.NlvStartRequest;
|
||||
import com.foreverwin.iep.wip.dto.OperationOutDTO;
|
||||
import com.foreverwin.iep.wip.feign.RemoteWipService;
|
||||
import com.foreverwin.mom.common.core.util.I18nUtil;
|
||||
import com.google.gson.Gson;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
/**
|
||||
* 出站接口
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Service("LOT_OUT_PROCESS")
|
||||
public class LotOut implements HandlerService {
|
||||
|
||||
private final RemoteWipService remoteWipService;
|
||||
|
||||
@Override
|
||||
public InvokeResponse call(InvokeRequest invokeRequest) {
|
||||
// String messageContent = invokeRequest.getMessageContent();
|
||||
// // 将json对象jsonObject转成EapExtrudeRecordRequest对象
|
||||
// NlvStartRequest startRequest = JSONObject.parseObject(messageContent, NlvStartRequest.class);
|
||||
// remoteWipService.lotStart(startRequest).getData();
|
||||
InvokeResponse response = new InvokeResponse(invokeRequest);
|
||||
response.setTransTime(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
||||
response.setResult("S");
|
||||
response.setMessageContent(Msg.SUCCESS);
|
||||
return response;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String validation(InvokeRequest invokeRequest) {
|
||||
JSONObject jsonObject = JS.parseObject(invokeRequest.getMessageContent());
|
||||
// 表映射到实体类
|
||||
Gson gson = new Gson();
|
||||
OperationOutDTO operationOutDTO = gson.fromJson(jsonObject.get(Msg.MESSAGE_CONTENT).toString(), OperationOutDTO.class);
|
||||
if (ObjectUtil.isNull(operationOutDTO)) {
|
||||
return I18nUtil.getI18nText("int.invoke.iMES.in.error1");
|
||||
}
|
||||
// 校验
|
||||
StringBuilder msg = new StringBuilder();
|
||||
if (StrUtil.isBlank(operationOutDTO.getResrce())) {
|
||||
msg.append("SITE不能为空!");
|
||||
}
|
||||
return msg.toString();
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user