fix(检验项目同步接口和检验计划同步接口):增加逻辑

This commit is contained in:
liaohechuan 2024-12-20 11:22:39 +08:00
parent 78684c2d9f
commit d950ddde17
3 changed files with 12 additions and 2 deletions

View File

@ -81,7 +81,6 @@ public class SapExamineItemDTO {
* 规格管控
*/
@SerializedName("CONTROL_MODE")
@NotBlank(message = "CONTROL_MODE不能为空!")
private String controlMode;
/**

View File

@ -75,6 +75,12 @@ public class SapQcPlanDetailDTO {
@SerializedName("MAX_VALUE")
private String maxValue;
/**
* 单位
*/
@SerializedName("UNITS")
private String units;
/**
* 文本选项集
*/

View File

@ -38,6 +38,7 @@ public class SapExamineItem implements HandlerService {
@Override
public InvokeResponse call(InvokeRequest invokeRequest) {
JSONObject jsonObject = JS.parseObject(invokeRequest.getMessageContent());
LocalDateTime nowLocalDateTime = LocalDateTime.now();
// 表映射到实体类
Gson gson = new Gson();
SapExamineItemDTO sapExamineItemDTO = gson.fromJson(jsonObject.getJSONObject(Msg.MESSAGE_CONTENT).toJSONString(), SapExamineItemDTO.class);
@ -47,6 +48,11 @@ public class SapExamineItem implements HandlerService {
ZQmsQcItemItf zQmsQcItemItf = new ZQmsQcItemItf();
// 属性copy
BeanUtils.copyProperties(sapExamineItemDTO, zQmsQcItemItf);
zQmsQcItemItf.setHandle(StrUtil.uuid());
zQmsQcItemItf.setCreator(Msg.SAP);
zQmsQcItemItf.setDateCreate(nowLocalDateTime);
zQmsQcItemItf.setResponseStatus(Msg.S);
zQmsQcItemItf.setResponseDescription(Msg.SUCCESS);
if (StrUtil.isBlank(sapExamineItemDTO.getSampleSize())) {
zQmsQcItemItf.setSampleSize(null);
}
@ -54,7 +60,6 @@ public class SapExamineItem implements HandlerService {
String message = remoteExamineItemService.remoteSaveOrUpdateSapExamineItem(zQmsQcItemItf, SecurityConstants.FROM_IN).getData();
InvokeResponse response = new InvokeResponse(invokeRequest);
LocalDateTime nowLocalDateTime = LocalDateTime.now();
response.setTransTime(nowLocalDateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
if (Msg.S.equals(message)) {
response.setResult(Msg.S);