Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
2724f5ff80
@ -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;
|
||||
}
|
||||
@ -20,6 +20,7 @@ import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -63,8 +64,8 @@ public class SapMaterialConsumptionJob {
|
||||
XxlJobHelper.log("*************************过账日期:" + postingDate + "************************");
|
||||
List<ZLotMaterialConsumptionTransaction> zLotMaterialConsumptionTransactionList = zLotMaterialConsumptionTransactionMapper.selectList(
|
||||
Wrappers.<ZLotMaterialConsumptionTransaction>lambdaQuery().eq(
|
||||
ZLotMaterialConsumptionTransaction::getSite, site).ne(
|
||||
ZLotMaterialConsumptionTransaction::getSyncStatus, "S")
|
||||
ZLotMaterialConsumptionTransaction::getSite, site).notIn(
|
||||
ZLotMaterialConsumptionTransaction::getSyncStatus, Arrays.asList("S","C"))
|
||||
.gt(ZLotMaterialConsumptionTransaction::getDateCreate, startDate)
|
||||
.lt(ZLotMaterialConsumptionTransaction::getDateCreate, endDate).orderByAsc(ZLotMaterialConsumptionTransaction::getDateCreate));
|
||||
if (CollectionUtils.isEmpty(zLotMaterialConsumptionTransactionList)) {
|
||||
|
||||
@ -21,6 +21,7 @@ import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -65,8 +66,8 @@ public class SapShopOrderCompleteJob {
|
||||
|
||||
List<ZLotMaterialCompleteTransaction> zLotMaterialCompleteTransactionList = zLotMaterialCompleteTransactionMapper.selectList(
|
||||
Wrappers.<ZLotMaterialCompleteTransaction>lambdaQuery().eq(
|
||||
ZLotMaterialCompleteTransaction::getSite, site).ne(
|
||||
ZLotMaterialCompleteTransaction::getSyncStatus, "S")
|
||||
ZLotMaterialCompleteTransaction::getSite, site).notIn(
|
||||
ZLotMaterialCompleteTransaction::getSyncStatus, Arrays.asList("S","C"))
|
||||
.gt(ZLotMaterialCompleteTransaction::getDateCreate, startDate)
|
||||
.lt(ZLotMaterialCompleteTransaction::getDateCreate, endDate).orderByAsc(ZLotMaterialCompleteTransaction::getDateCreate));
|
||||
if (CollectionUtils.isEmpty(zLotMaterialCompleteTransactionList)) {
|
||||
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
@ -179,8 +179,8 @@ public class LotMaterialDealSendSapServiceImpl implements LotMaterialDealSendSap
|
||||
targetObj.setSyncMsgNo(msgNo);
|
||||
targetObj.setSyncVoucherNo(mblnr);
|
||||
targetObj.setSyncSubmitter(SecurityUtils.getUserName());
|
||||
targetObj.setCreator(SecurityUtils.getUserName());
|
||||
targetObj.setDateCreate(LocalDateTime.now());
|
||||
targetObj.setUpdater(SecurityUtils.getUserName());
|
||||
targetObj.setDateUpdate(LocalDateTime.now());
|
||||
zLotMaterialCompleteTransactionMapper.updateById(targetObj);
|
||||
}
|
||||
invokeResponse.setResult(result);
|
||||
@ -286,8 +286,8 @@ public class LotMaterialDealSendSapServiceImpl implements LotMaterialDealSendSap
|
||||
targetObj.setSyncMsgNo(msgno);
|
||||
targetObj.setSyncSubmitter(SecurityUtils.getUserName());
|
||||
targetObj.setSyncVoucherNo(mblnr);
|
||||
targetObj.setCreator(SecurityUtils.getUserName());
|
||||
targetObj.setDateCreate(LocalDateTime.now());
|
||||
targetObj.setUpdater(SecurityUtils.getUserName());
|
||||
targetObj.setDateUpdate(LocalDateTime.now());
|
||||
zLotMaterialConsumptionTransactionMapper.updateById(targetObj);
|
||||
// 如果报工成功,就更新消耗表的erp标识为Y
|
||||
if ("S".equalsIgnoreCase(result)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user