This commit is contained in:
syngna_qiao 2024-12-20 19:46:10 +08:00
commit bfc7c96269
4 changed files with 11 additions and 5 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,15 +38,19 @@ 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);
sapExamineItemDTO.setBatchId(invokeRequest.getTransSid());
sapExamineItemDTO.setSite(invokeRequest.getSite());
// 检验项目接口表
ZQmsQcItemItf zQmsQcItemItf = new ZQmsQcItemItf();
// 属性copy
BeanUtils.copyProperties(sapExamineItemDTO, zQmsQcItemItf);
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 +58,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);

View File

@ -47,12 +47,10 @@ public class SapTextSub implements HandlerService {
Gson gson = new Gson();
SapQcItemTypeTextSubDTO sapQcItemTypeTextSubDTO = gson.fromJson(jsonObject.get(Msg.MESSAGE_CONTENT).toString(), SapQcItemTypeTextSubDTO.class);
sapQcItemTypeTextSubDTO.setBatchId(invokeRequest.getTransSid());
sapQcItemTypeTextSubDTO.setSite(invokeRequest.getSite());
// 选项集同步接口表
ZQmsQcItemTypeTextSubItf zQmsQcItemTypeTextSubItf = new ZQmsQcItemTypeTextSubItf();
// 属性copy
BeanUtils.copyProperties(sapQcItemTypeTextSubDTO, zQmsQcItemTypeTextSubItf);
zQmsQcItemTypeTextSubItf.setHandle(StrUtil.uuid());
zQmsQcItemTypeTextSubItf.setCreator(Msg.SAP);
zQmsQcItemTypeTextSubItf.setDateCreate(nowLocalDateTime);
zQmsQcItemTypeTextSubItf.setResponseStatus(Msg.S);