From 2694949a212a65fc7c6d0d943de7cf7adb04ee0c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B5=B5=E5=98=89=E4=BC=9F?= <1724121454@qq.com>
Date: Sat, 7 Aug 2021 10:55:59 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=BC=82=E5=B8=B8?=
=?UTF-8?q?=E5=BE=85=E5=8A=9E=E4=BA=8B=E9=A1=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/AbnormalPlanController.java | 130 +++++
.../anomaly/mapper/AbnormalPlanMapper.java | 18 +
.../mesnac/anomaly/model/AbnormalPlan.java | 329 +++++++++++
.../anomaly/service/AbnormalPlanService.java | 32 ++
.../service/impl/AbnormalBillServiceImpl.java | 27 +-
.../service/impl/AbnormalPlanServiceImpl.java | 77 +++
.../service/impl/AnomalyJobServiceImpl.java | 2 +-
.../resources/mapper/AbnormalPlanMapper.xml | 530 ++++++++++++++++++
.../mesnac/common/constant/Constants.java | 6 +
.../mesnac/common/enums/HandleEnum.java | 8 +-
.../handler/UserResourceHandler.java | 54 +-
11 files changed, 1171 insertions(+), 42 deletions(-)
create mode 100644 anomaly/src/main/java/com/foreverwin/mesnac/anomaly/controller/AbnormalPlanController.java
create mode 100644 anomaly/src/main/java/com/foreverwin/mesnac/anomaly/mapper/AbnormalPlanMapper.java
create mode 100644 anomaly/src/main/java/com/foreverwin/mesnac/anomaly/model/AbnormalPlan.java
create mode 100644 anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/AbnormalPlanService.java
create mode 100644 anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/AbnormalPlanServiceImpl.java
create mode 100644 anomaly/src/main/resources/mapper/AbnormalPlanMapper.xml
diff --git a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/controller/AbnormalPlanController.java b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/controller/AbnormalPlanController.java
new file mode 100644
index 00000000..b9a683ba
--- /dev/null
+++ b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/controller/AbnormalPlanController.java
@@ -0,0 +1,130 @@
+package com.foreverwin.mesnac.anomaly.controller;
+
+import com.foreverwin.modular.core.util.R;
+import com.foreverwin.modular.core.util.FrontPage;
+import com.foreverwin.modular.core.util.CommonMethods;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import com.foreverwin.mesnac.anomaly.service.AbnormalPlanService;
+import com.foreverwin.mesnac.anomaly.model.AbnormalPlan;
+import java.util.List;
+
+/**
+ *
+ * @author zjw
+ * @since 2021-08-07
+ */
+@RestController
+@RequestMapping("/Z-ABNORMAL-PLAN")
+public class AbnormalPlanController {
+
+ @Autowired
+ public AbnormalPlanService abnormalPlanService;
+
+ /**
+ * 根据id查询
+ *
+ * @param id 主键
+ * @return
+ */
+ @ResponseBody
+ @GetMapping("/{id:.+}")
+ public R getAbnormalPlanById(@PathVariable String id) {
+ return R.ok( abnormalPlanService.getById(id));
+ }
+
+ /**
+ * 查询所有数据
+ *
+ * @return
+ */
+ @ResponseBody
+ @GetMapping("")
+ public R getAbnormalPlanList(AbnormalPlan abnormalPlan){
+ List result;
+ QueryWrapper queryWrapper = new QueryWrapper<>();
+ queryWrapper.setEntity(abnormalPlan);
+ result = abnormalPlanService.list(queryWrapper);
+ return R.ok(result);
+ }
+
+ /**
+ * 分页查询数据
+ *
+ * @param frontPage 分页信息
+ * @return
+ */
+ @ResponseBody
+ @GetMapping("/page")
+ public R page(FrontPage frontPage, AbnormalPlan abnormalPlan){
+ IPage result;
+ QueryWrapper queryWrapper = new QueryWrapper<>();
+ queryWrapper.setEntity(abnormalPlan);
+ if (frontPage.getGlobalQuery() != null && !"".equals(frontPage.getGlobalQuery().trim())) {
+ //TODO modify global query
+ queryWrapper.lambda().and(wrapper -> wrapper
+ .like(AbnormalPlan::getHandle, frontPage.getGlobalQuery())
+ .or().like(AbnormalPlan::getSite, frontPage.getGlobalQuery())
+ .or().like(AbnormalPlan::getAbnormalBillBo, frontPage.getGlobalQuery())
+ .or().like(AbnormalPlan::getStatus, frontPage.getGlobalQuery())
+ .or().like(AbnormalPlan::getWorkCenter, frontPage.getGlobalQuery())
+ .or().like(AbnormalPlan::getAbnormalMethod, frontPage.getGlobalQuery())
+ .or().like(AbnormalPlan::getShopOrder, frontPage.getGlobalQuery())
+ .or().like(AbnormalPlan::getResrce, frontPage.getGlobalQuery())
+ .or().like(AbnormalPlan::getItemBo, frontPage.getGlobalQuery())
+ .or().like(AbnormalPlan::getProcessor, frontPage.getGlobalQuery())
+ .or().like(AbnormalPlan::getClosedUser, frontPage.getGlobalQuery())
+ .or().like(AbnormalPlan::getCreatedUser, frontPage.getGlobalQuery())
+ .or().like(AbnormalPlan::getModifiedUser, frontPage.getGlobalQuery())
+ );
+ }
+ result = abnormalPlanService.page(frontPage.getPagePlus(), queryWrapper);
+ return R.ok(result);
+ }
+
+ /**
+ * 新增
+ * @param abnormalPlan 传递的实体
+ * @return null 失败 实体成功
+ */
+ @PostMapping
+ public R save(@RequestBody AbnormalPlan abnormalPlan) {
+ return R.ok(abnormalPlanService.save(abnormalPlan));
+ }
+
+ /**
+ * 修改
+ * @param abnormalPlan 传递的实体
+ * @return null 失败 实体成功
+ */
+ @PutMapping
+ public R updateById(@RequestBody AbnormalPlan abnormalPlan) {
+ return R.ok(abnormalPlanService.updateById(abnormalPlan));
+ }
+
+ /**
+ * 根据id删除对象
+ * @param id 实体ID
+ * @return 0 失败 1 成功
+ */
+ @ResponseBody
+ @RequestMapping(method = RequestMethod.DELETE, value = "/{id:.+}")
+ public R removeById(@PathVariable("id") String id){
+ return R.ok(abnormalPlanService.removeById(id));
+ }
+
+ /**
+ * 批量删除对象
+ * @param ids 实体集合ID
+ * @return 0 失败 1 成功
+ */
+ @ResponseBody
+ @RequestMapping(method = RequestMethod.POST, value = "/delete-batch")
+ public R removeByIds(List ids){
+ return R.ok(abnormalPlanService.removeByIds(ids));
+ }
+}
\ No newline at end of file
diff --git a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/mapper/AbnormalPlanMapper.java b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/mapper/AbnormalPlanMapper.java
new file mode 100644
index 00000000..503ae4d3
--- /dev/null
+++ b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/mapper/AbnormalPlanMapper.java
@@ -0,0 +1,18 @@
+package com.foreverwin.mesnac.anomaly.mapper;
+
+import com.foreverwin.mesnac.anomaly.model.AbnormalPlan;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springframework.stereotype.Repository;
+
+/**
+ *
+ * Mapper 接口
+ *
+ *
+ * @author zjw
+ * @since 2021-08-07
+ */
+@Repository
+public interface AbnormalPlanMapper extends BaseMapper {
+
+}
\ No newline at end of file
diff --git a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/model/AbnormalPlan.java b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/model/AbnormalPlan.java
new file mode 100644
index 00000000..d718d623
--- /dev/null
+++ b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/model/AbnormalPlan.java
@@ -0,0 +1,329 @@
+package com.foreverwin.mesnac.anomaly.model;
+
+import java.io.Serializable;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+import com.baomidou.mybatisplus.annotation.IdType;
+
+/**
+ *
+ *
+ *
+ *
+ * @author zjw
+ * @since 2021-08-07
+ */
+
+@TableName("Z_ABNORMAL_PLAN")
+
+public class AbnormalPlan extends Model {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ @TableId(value = "HANDLE", type = IdType.INPUT)
+ private String handle;
+ /**
+ * 站点
+ */
+ @TableField("SITE")
+ private String site;
+ /**
+ * 异常单号
+ */
+ @TableField("ABNORMAL_BILL_BO")
+ private String abnormalBillBo;
+ /**
+ * 状态
+ */
+ @TableField("STATUS")
+ private String status;
+ /**
+ * 车间
+ */
+ @TableField("WORK_CENTER")
+ private String workCenter;
+ /**
+ * 异常方案
+ */
+ @TableField("ABNORMAL_METHOD")
+ private String abnormalMethod;
+ /**
+ * 工单
+ */
+ @TableField("SHOP_ORDER")
+ private String shopOrder;
+ /**
+ * 设备
+ */
+ @TableField("RESRCE")
+ private String resrce;
+ /**
+ * 物料编号
+ */
+ @TableField("ITEM_BO")
+ private String itemBo;
+ /**
+ * 异常数量
+ */
+ @TableField("QTY")
+ private Long qty;
+ /**
+ * 处理人
+ */
+ @TableField("PROCESSOR")
+ private String processor;
+ /**
+ * 处理时间
+ */
+ @TableField("PROCESS_DATE_TIME")
+ private LocalDateTime processDateTime;
+ /**
+ * 闭环人员
+ */
+ @TableField("CLOSED_USER")
+ private String closedUser;
+ /**
+ * 闭环时间
+ */
+ @TableField("CLOSED_DATE_TIME")
+ private LocalDateTime closedDateTime;
+ /**
+ * 创建人
+ */
+ @TableField("CREATED_USER")
+ private String createdUser;
+ /**
+ * 创建时间
+ */
+ @TableField("CREATED_DATE_TIME")
+ private LocalDateTime createdDateTime;
+ /**
+ * 修改人
+ */
+ @TableField("MODIFIED_USER")
+ private String modifiedUser;
+ /**
+ * 修改日期
+ */
+ @TableField("MODIFIED_DATE_TIME")
+ private LocalDateTime modifiedDateTime;
+
+
+ public String getHandle() {
+ return handle;
+ }
+
+ public void setHandle(String handle) {
+ this.handle = handle;
+ }
+
+ public String getSite() {
+ return site;
+ }
+
+ public void setSite(String site) {
+ this.site = site;
+ }
+
+ public String getAbnormalBillBo() {
+ return abnormalBillBo;
+ }
+
+ public void setAbnormalBillBo(String abnormalBillBo) {
+ this.abnormalBillBo = abnormalBillBo;
+ }
+
+ public String getStatus() {
+ return status;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ public String getWorkCenter() {
+ return workCenter;
+ }
+
+ public void setWorkCenter(String workCenter) {
+ this.workCenter = workCenter;
+ }
+
+ public String getAbnormalMethod() {
+ return abnormalMethod;
+ }
+
+ public void setAbnormalMethod(String abnormalMethod) {
+ this.abnormalMethod = abnormalMethod;
+ }
+
+ public String getShopOrder() {
+ return shopOrder;
+ }
+
+ public void setShopOrder(String shopOrder) {
+ this.shopOrder = shopOrder;
+ }
+
+ public String getResrce() {
+ return resrce;
+ }
+
+ public void setResrce(String resrce) {
+ this.resrce = resrce;
+ }
+
+ public String getItemBo() {
+ return itemBo;
+ }
+
+ public void setItemBo(String itemBo) {
+ this.itemBo = itemBo;
+ }
+
+ public Long getQty() {
+ return qty;
+ }
+
+ public void setQty(Long qty) {
+ this.qty = qty;
+ }
+
+ public String getProcessor() {
+ return processor;
+ }
+
+ public void setProcessor(String processor) {
+ this.processor = processor;
+ }
+
+ public LocalDateTime getProcessDateTime() {
+ return processDateTime;
+ }
+
+ public void setProcessDateTime(LocalDateTime processDateTime) {
+ this.processDateTime = processDateTime;
+ }
+
+ public String getClosedUser() {
+ return closedUser;
+ }
+
+ public void setClosedUser(String closedUser) {
+ this.closedUser = closedUser;
+ }
+
+ public LocalDateTime getClosedDateTime() {
+ return closedDateTime;
+ }
+
+ public void setClosedDateTime(LocalDateTime closedDateTime) {
+ this.closedDateTime = closedDateTime;
+ }
+
+ public String getCreatedUser() {
+ return createdUser;
+ }
+
+ public void setCreatedUser(String createdUser) {
+ this.createdUser = createdUser;
+ }
+
+ public LocalDateTime getCreatedDateTime() {
+ return createdDateTime;
+ }
+
+ public void setCreatedDateTime(LocalDateTime createdDateTime) {
+ this.createdDateTime = createdDateTime;
+ }
+
+ public String getModifiedUser() {
+ return modifiedUser;
+ }
+
+ public void setModifiedUser(String modifiedUser) {
+ this.modifiedUser = modifiedUser;
+ }
+
+ public LocalDateTime getModifiedDateTime() {
+ return modifiedDateTime;
+ }
+
+ public void setModifiedDateTime(LocalDateTime modifiedDateTime) {
+ this.modifiedDateTime = modifiedDateTime;
+ }
+
+public static final String HANDLE = "HANDLE";
+
+public static final String SITE = "SITE";
+
+public static final String ABNORMAL_BILL_BO = "ABNORMAL_BILL_BO";
+
+public static final String STATUS = "STATUS";
+
+public static final String WORK_CENTER = "WORK_CENTER";
+
+public static final String ABNORMAL_METHOD = "ABNORMAL_METHOD";
+
+public static final String SHOP_ORDER = "SHOP_ORDER";
+
+public static final String RESRCE = "RESRCE";
+
+public static final String ITEM_BO = "ITEM_BO";
+
+public static final String QTY = "QTY";
+
+public static final String PROCESSOR = "PROCESSOR";
+
+public static final String PROCESS_DATE_TIME = "PROCESS_DATE_TIME";
+
+public static final String CLOSED_USER = "CLOSED_USER";
+
+public static final String CLOSED_DATE_TIME = "CLOSED_DATE_TIME";
+
+public static final String CREATED_USER = "CREATED_USER";
+
+public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME";
+
+public static final String MODIFIED_USER = "MODIFIED_USER";
+
+public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";
+
+
+ @Override
+ protected Serializable pkVal() {
+ return this.handle;
+ }
+
+ @Override
+ public String toString() {
+ return "AbnormalPlan{" +
+ "handle = " + handle +
+ ", site = " + site +
+ ", abnormalBillBo = " + abnormalBillBo +
+ ", status = " + status +
+ ", workCenter = " + workCenter +
+ ", abnormalMethod = " + abnormalMethod +
+ ", shopOrder = " + shopOrder +
+ ", resrce = " + resrce +
+ ", itemBo = " + itemBo +
+ ", qty = " + qty +
+ ", processor = " + processor +
+ ", processDateTime = " + processDateTime +
+ ", closedUser = " + closedUser +
+ ", closedDateTime = " + closedDateTime +
+ ", createdUser = " + createdUser +
+ ", createdDateTime = " + createdDateTime +
+ ", modifiedUser = " + modifiedUser +
+ ", modifiedDateTime = " + modifiedDateTime +
+ "}";
+ }
+}
\ No newline at end of file
diff --git a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/AbnormalPlanService.java b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/AbnormalPlanService.java
new file mode 100644
index 00000000..401eff8b
--- /dev/null
+++ b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/AbnormalPlanService.java
@@ -0,0 +1,32 @@
+package com.foreverwin.mesnac.anomaly.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.foreverwin.mesnac.anomaly.dto.AbnormalBillDisposeDto;
+import com.foreverwin.mesnac.anomaly.model.AbnormalPlan;
+import com.foreverwin.modular.core.util.FrontPage;
+
+import java.time.LocalDateTime;
+import java.util.List;
+
+/**
+ *
+ * 服务类
+ *
+ *
+ * @author zjw
+ * @since 2021-08-07
+ */
+public interface AbnormalPlanService extends IService {
+
+ /**
+ * 分页查询
+ * @param frontPage
+ * @return
+ */
+ IPage selectPage(FrontPage frontPage, AbnormalPlan abnormalPlan);
+
+ List selectList(AbnormalPlan abnormalPlan);
+
+ void saveAbnormalPlan(AbnormalBillDisposeDto abnormalBillDisposeDto, LocalDateTime now);
+}
\ No newline at end of file
diff --git a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/AbnormalBillServiceImpl.java b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/AbnormalBillServiceImpl.java
index 8978e5da..f06e58e2 100644
--- a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/AbnormalBillServiceImpl.java
+++ b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/AbnormalBillServiceImpl.java
@@ -142,6 +142,9 @@ public class AbnormalBillServiceImpl extends ServiceImpl selectPage(FrontPage frontPage, AbnormalBill abnormalBill) {
@@ -359,7 +362,7 @@ public class AbnormalBillServiceImpl extends ServiceImpl hashMap = new HashMap<>();
@@ -776,7 +785,7 @@ public class AbnormalBillServiceImpl extends ServiceImpl
+ * 服务实现类
+ *
+ *
+ * @author zjw
+ * @since 2021-08-07
+ */
+@Service
+@Transactional(rollbackFor = Exception.class)
+public class AbnormalPlanServiceImpl extends ServiceImpl implements AbnormalPlanService {
+
+
+ @Autowired
+ private AbnormalPlanMapper abnormalPlanMapper;
+
+ @Override
+ public IPage selectPage(FrontPage frontPage, AbnormalPlan abnormalPlan) {
+ QueryWrapper queryWrapper = new QueryWrapper<>();
+ queryWrapper.setEntity(abnormalPlan);
+ return super.page(frontPage.getPagePlus(), queryWrapper);
+ }
+
+ @Override
+ public List selectList(AbnormalPlan abnormalPlan) {
+ QueryWrapper queryWrapper = new QueryWrapper<>();
+ queryWrapper.setEntity(abnormalPlan);
+ return super.list(queryWrapper);
+ }
+
+ @Override
+ public void saveAbnormalPlan(AbnormalBillDisposeDto abnormalBillDisposeDto,LocalDateTime now) {
+ String site = CommonMethods.getSite();
+ AbnormalPlan abnormalPlan = new AbnormalPlan();
+ String user = CommonMethods.getUser();
+ //设置主键
+ abnormalPlan.setHandle(HandleEnum.ABNORMAL_PLAN.getHandle(site,abnormalBillDisposeDto.getAbnormalNo()));
+ abnormalPlan.setSite(site);
+ abnormalPlan.setAbnormalBillBo(HandleEnum.ABNORMAL_BILL.getHandle(site,abnormalBillDisposeDto.getAbnormalNo()));
+ abnormalPlan.setStatus(Constants.UNTREATED);//未处理
+ abnormalPlan.setWorkCenter(abnormalBillDisposeDto.getWorkCenter());
+ abnormalPlan.setAbnormalMethod(abnormalBillDisposeDto.getAbnormalMethod());
+ abnormalPlan.setShopOrder(abnormalBillDisposeDto.getShopOrder());
+ abnormalPlan.setResrce(abnormalBillDisposeDto.getResrce());
+ abnormalPlan.setItemBo(abnormalBillDisposeDto.getItemBo());
+ abnormalPlan.setQty(Long.parseLong(abnormalBillDisposeDto.getNcQty()));
+ //没有处理人和处理时间
+// abnormalPlan.setProcessor();
+ abnormalPlan.setClosedUser(user);
+ abnormalPlan.setClosedDateTime(now);
+ abnormalPlan.setCreatedUser(user);
+ abnormalPlan.setCreatedDateTime(now);
+ abnormalPlan.setModifiedUser(user);
+ abnormalPlan.setModifiedDateTime(now);
+ this.saveOrUpdate(abnormalPlan);
+ }
+
+}
\ No newline at end of file
diff --git a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/AnomalyJobServiceImpl.java b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/AnomalyJobServiceImpl.java
index 38e29b7d..72df1bc8 100644
--- a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/AnomalyJobServiceImpl.java
+++ b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/AnomalyJobServiceImpl.java
@@ -129,7 +129,7 @@ public class AnomalyJobServiceImpl implements AnomalyJobService {
activeMQUtil.wechatSendMessage(sendUsers.toString(),abnormalMessage.getContent());
// }
messageService.saveOrUpdate(abnormalMessage);
- messageService.saveOrUpdate(_abnormalMessage);
+ // messageService.saveOrUpdate(_abnormalMessage);
}
}
}
diff --git a/anomaly/src/main/resources/mapper/AbnormalPlanMapper.xml b/anomaly/src/main/resources/mapper/AbnormalPlanMapper.xml
new file mode 100644
index 00000000..40c3bd1b
--- /dev/null
+++ b/anomaly/src/main/resources/mapper/AbnormalPlanMapper.xml
@@ -0,0 +1,530 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ HANDLE, SITE, ABNORMAL_BILL_BO, STATUS, WORK_CENTER, ABNORMAL_METHOD, SHOP_ORDER, RESRCE, ITEM_BO, QTY, PROCESSOR, PROCESS_DATE_TIME, CLOSED_USER, CLOSED_DATE_TIME, CREATED_USER, CREATED_DATE_TIME, MODIFIED_USER, MODIFIED_DATE_TIME
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ INSERT INTO Z_ABNORMAL_PLAN
+
+ HANDLE,
+ SITE,
+ ABNORMAL_BILL_BO,
+ STATUS,
+ WORK_CENTER,
+ ABNORMAL_METHOD,
+ SHOP_ORDER,
+ RESRCE,
+ ITEM_BO,
+ QTY,
+ PROCESSOR,
+ PROCESS_DATE_TIME,
+ CLOSED_USER,
+ CLOSED_DATE_TIME,
+ CREATED_USER,
+ CREATED_DATE_TIME,
+ MODIFIED_USER,
+ MODIFIED_DATE_TIME,
+ VALUES
+
+ #{handle},
+ #{site},
+ #{abnormalBillBo},
+ #{status},
+ #{workCenter},
+ #{abnormalMethod},
+ #{shopOrder},
+ #{resrce},
+ #{itemBo},
+ #{qty},
+ #{processor},
+ #{processDateTime},
+ #{closedUser},
+ #{closedDateTime},
+ #{createdUser},
+ #{createdDateTime},
+ #{modifiedUser},
+ #{modifiedDateTime},
+
+
+
+
+ INSERT INTO Z_ABNORMAL_PLAN
+
+
+ VALUES
+
+ #{handle},
+ #{site},
+ #{abnormalBillBo},
+ #{status},
+ #{workCenter},
+ #{abnormalMethod},
+ #{shopOrder},
+ #{resrce},
+ #{itemBo},
+ #{qty},
+ #{processor},
+ #{processDateTime},
+ #{closedUser},
+ #{closedDateTime},
+ #{createdUser},
+ #{createdDateTime},
+ #{modifiedUser},
+ #{modifiedDateTime},
+
+
+
+
+
+ UPDATE Z_ABNORMAL_PLAN
+ SITE=#{et.site},
+ ABNORMAL_BILL_BO=#{et.abnormalBillBo},
+ STATUS=#{et.status},
+ WORK_CENTER=#{et.workCenter},
+ ABNORMAL_METHOD=#{et.abnormalMethod},
+ SHOP_ORDER=#{et.shopOrder},
+ RESRCE=#{et.resrce},
+ ITEM_BO=#{et.itemBo},
+ QTY=#{et.qty},
+ PROCESSOR=#{et.processor},
+ PROCESS_DATE_TIME=#{et.processDateTime},
+ CLOSED_USER=#{et.closedUser},
+ CLOSED_DATE_TIME=#{et.closedDateTime},
+ CREATED_USER=#{et.createdUser},
+ CREATED_DATE_TIME=#{et.createdDateTime},
+ MODIFIED_USER=#{et.modifiedUser},
+ MODIFIED_DATE_TIME=#{et.modifiedDateTime},
+ WHERE HANDLE=#{et.handle} and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}
+
+
+
+
+ UPDATE Z_ABNORMAL_PLAN
+ SITE=#{et.site},
+ ABNORMAL_BILL_BO=#{et.abnormalBillBo},
+ STATUS=#{et.status},
+ WORK_CENTER=#{et.workCenter},
+ ABNORMAL_METHOD=#{et.abnormalMethod},
+ SHOP_ORDER=#{et.shopOrder},
+ RESRCE=#{et.resrce},
+ ITEM_BO=#{et.itemBo},
+ QTY=#{et.qty},
+ PROCESSOR=#{et.processor},
+ PROCESS_DATE_TIME=#{et.processDateTime},
+ CLOSED_USER=#{et.closedUser},
+ CLOSED_DATE_TIME=#{et.closedDateTime},
+ CREATED_USER=#{et.createdUser},
+ CREATED_DATE_TIME=#{et.createdDateTime},
+ MODIFIED_USER=#{et.modifiedUser},
+ MODIFIED_DATE_TIME=#{et.modifiedDateTime},
+ WHERE HANDLE=#{et.handle} and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}
+
+
+
+
+ UPDATE Z_ABNORMAL_PLAN
+ SITE=#{et.site},
+ ABNORMAL_BILL_BO=#{et.abnormalBillBo},
+ STATUS=#{et.status},
+ WORK_CENTER=#{et.workCenter},
+ ABNORMAL_METHOD=#{et.abnormalMethod},
+ SHOP_ORDER=#{et.shopOrder},
+ RESRCE=#{et.resrce},
+ ITEM_BO=#{et.itemBo},
+ QTY=#{et.qty},
+ PROCESSOR=#{et.processor},
+ PROCESS_DATE_TIME=#{et.processDateTime},
+ CLOSED_USER=#{et.closedUser},
+ CLOSED_DATE_TIME=#{et.closedDateTime},
+ CREATED_USER=#{et.createdUser},
+ CREATED_DATE_TIME=#{et.createdDateTime},
+ MODIFIED_USER=#{et.modifiedUser},
+ MODIFIED_DATE_TIME=#{et.modifiedDateTime},
+
+
+
+
+ HANDLE=#{ew.entity.handle}
+ AND SITE=#{ew.entity.site}
+ AND ABNORMAL_BILL_BO=#{ew.entity.abnormalBillBo}
+ AND STATUS=#{ew.entity.status}
+ AND WORK_CENTER=#{ew.entity.workCenter}
+ AND ABNORMAL_METHOD=#{ew.entity.abnormalMethod}
+ AND SHOP_ORDER=#{ew.entity.shopOrder}
+ AND RESRCE=#{ew.entity.resrce}
+ AND ITEM_BO=#{ew.entity.itemBo}
+ AND QTY=#{ew.entity.qty}
+ AND PROCESSOR=#{ew.entity.processor}
+ AND PROCESS_DATE_TIME=#{ew.entity.processDateTime}
+ AND CLOSED_USER=#{ew.entity.closedUser}
+ AND CLOSED_DATE_TIME=#{ew.entity.closedDateTime}
+ AND CREATED_USER=#{ew.entity.createdUser}
+ AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}
+ AND MODIFIED_USER=#{ew.entity.modifiedUser}
+ AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}
+
+
+ ${ew.sqlSegment}
+
+
+
+
+ ${ew.sqlSegment}
+
+
+
+
+ DELETE FROM Z_ABNORMAL_PLAN WHERE HANDLE=#{handle}
+
+
+
+ DELETE FROM Z_ABNORMAL_PLAN
+
+
+
+
+ ${k} = #{cm[${k}]}
+
+
+
+
+
+
+
+ DELETE FROM Z_ABNORMAL_PLAN
+
+
+
+
+ HANDLE=#{ew.entity.handle}
+
+ AND SITE=#{ew.entity.site}
+ AND ABNORMAL_BILL_BO=#{ew.entity.abnormalBillBo}
+ AND STATUS=#{ew.entity.status}
+ AND WORK_CENTER=#{ew.entity.workCenter}
+ AND ABNORMAL_METHOD=#{ew.entity.abnormalMethod}
+ AND SHOP_ORDER=#{ew.entity.shopOrder}
+ AND RESRCE=#{ew.entity.resrce}
+ AND ITEM_BO=#{ew.entity.itemBo}
+ AND QTY=#{ew.entity.qty}
+ AND PROCESSOR=#{ew.entity.processor}
+ AND PROCESS_DATE_TIME=#{ew.entity.processDateTime}
+ AND CLOSED_USER=#{ew.entity.closedUser}
+ AND CLOSED_DATE_TIME=#{ew.entity.closedDateTime}
+ AND CREATED_USER=#{ew.entity.createdUser}
+ AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}
+ AND MODIFIED_USER=#{ew.entity.modifiedUser}
+ AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}
+
+
+ ${ew.sqlSegment}
+
+
+
+
+ ${ew.sqlSegment}
+
+
+
+
+ DELETE FROM Z_ABNORMAL_PLAN WHERE HANDLE IN (
+ #{item}
+ )
+
+
+
+
diff --git a/common/src/main/java/com/foreverwin/mesnac/common/constant/Constants.java b/common/src/main/java/com/foreverwin/mesnac/common/constant/Constants.java
index 31e2ec81..a31535a0 100644
--- a/common/src/main/java/com/foreverwin/mesnac/common/constant/Constants.java
+++ b/common/src/main/java/com/foreverwin/mesnac/common/constant/Constants.java
@@ -167,5 +167,11 @@ public interface Constants {
String TOOL_STATUS_Y = "Y";
String TOOL_STATUS_N = "N";
+ /**
+ * 异常计划表的状态
+ */
+ String UNTREATED = "UNTREATED"; //未处理
+ String PROCESSED = "PROCESSED"; //已处理
+
}
diff --git a/common/src/main/java/com/foreverwin/mesnac/common/enums/HandleEnum.java b/common/src/main/java/com/foreverwin/mesnac/common/enums/HandleEnum.java
index 43d119fc..7a72e34a 100644
--- a/common/src/main/java/com/foreverwin/mesnac/common/enums/HandleEnum.java
+++ b/common/src/main/java/com/foreverwin/mesnac/common/enums/HandleEnum.java
@@ -106,10 +106,10 @@ public enum HandleEnum {
RESOURCE_INSPECT_TASK_PARAM("ResourceInspectTaskParamBo","ResourceInspectTaskParamBo:{0},{1}"),
/**异常单**/
- Z_ABNORMAL_BILL("AbnormalBillBo","AbnormalBillBo:{0},{1}"),
+ ABNORMAL_BILL("AbnormalBillBo","AbnormalBillBo:{0},{1}"),
/**异常单详细表**/
- Z_ABNORMAL_BILL_DISPOSE("AbnormalBillDisposeBo","AbnormalBillDisposeBo:{0},{1}"),
+ ABNORMAL_BILL_DISPOSE("AbnormalBillDisposeBo","AbnormalBillDisposeBo:{0},{1}"),
/**不良代码**/
NC_CODE("NCCodeBO","NCCodeBO:{0},{1}"),
@@ -140,7 +140,9 @@ public enum HandleEnum {
USER_RESOURCE("UserResourceBo","UserResourceBo:{0},{1},{2}"),
- SFC_SCRAP("SfcScrapBo","SfcScrapBo:{0},{1}");
+ SFC_SCRAP("SfcScrapBo","SfcScrapBo:{0},{1}"),
+
+ ABNORMAL_PLAN("AbnormalPlanBo","AbnormalPlanBo:{0},{1}");
private String prefix;
private String pattern;
diff --git a/dataimport/src/main/java/com/foreverwin/mesnac/dataimport/handler/UserResourceHandler.java b/dataimport/src/main/java/com/foreverwin/mesnac/dataimport/handler/UserResourceHandler.java
index 7e52648c..65043a50 100644
--- a/dataimport/src/main/java/com/foreverwin/mesnac/dataimport/handler/UserResourceHandler.java
+++ b/dataimport/src/main/java/com/foreverwin/mesnac/dataimport/handler/UserResourceHandler.java
@@ -15,7 +15,6 @@ import com.foreverwin.mesnac.meapi.mapper.NwaUserMapper;
import com.foreverwin.mesnac.meapi.mapper.ResrceMapper;
import com.foreverwin.mesnac.meapi.model.NwaUser;
import com.foreverwin.mesnac.meapi.model.Resrce;
-import com.foreverwin.modular.core.exception.BusinessException;
import com.foreverwin.modular.core.util.CommonMethods;
import com.foreverwin.modular.core.util.I18nUtil;
import org.springframework.beans.factory.annotation.Autowired;
@@ -58,10 +57,10 @@ public class UserResourceHandler extends BaseHandler {
buffer.append(e.getMessage() + "\n");
}
- if (buffer.length() > 0) {
- buffer.insert(0, I18nUtil.getI18nText("MaterData.import.Summary", new Object[]{row + failedNumber[0], row, failedNumber[0]}) + "\n");
- throw BusinessException.build(buffer.toString());
- }
+// if (buffer.length() > 0) {
+// buffer.insert(0, I18nUtil.getI18nText("MaterData.import.Summary", new Object[]{row + failedNumber[0], row, failedNumber[0]}) + "\n");
+// throw BusinessException.build(buffer.toString());
+// }
buffer.insert(0, I18nUtil.getI18nText("MaterData.import.Summary", new Object[]{row + failedNumber[0], row, failedNumber[0]}) + "\n");
return buffer.toString();
@@ -126,15 +125,13 @@ public class UserResourceHandler extends BaseHandler {
//站点
jsonObject.put("site", site);
//不管用户选啥模式,都是更新和插入
- resultMessage = this.updateAndInsert(userResource,index);
-
+ resultMessage = updateAndInsert(userResource,index);
if (resultMessage != null) {
params[2] = resultMessage;
failedNumber[0]++;
buffer.append("第" + index + "行:" + I18nUtil.getI18nText("MaterData.import.update.fail", params) + "\n");
return 0;
}
- userResourceService.saveOrUpdate(userResource);
return 1;
}
return 0;
@@ -144,30 +141,29 @@ public class UserResourceHandler extends BaseHandler {
public String[] getHeader() {
return null;
}
-
- String updateAndInsert(UserResource userResource,Long index){
- //判断资源是否存在
- Resrce resrce = resrceMapper.selectById(userResource.getResourceBo());
-
- if(resrce == null){
- return "第"+index+"行的资源不存在";
- }
- //设置资源描述
- userResource.setResrceDescription(resrce.getDescription());
- //设置员工描述
- NwaUser nwaUser = nwaUserMapper.selectById(HandleEnum.USER.getHandle(userResource.getSite(), userResource.getUserId()));
- if(nwaUser != null){
- userResource.setUserDescription(nwaUser.getFullName());
- }else if("true".equals(userResource.getTemporaryUser())){
- //不做任何操作
- }else{
- return "第"+index+"行的用户不存在,必须为临时员工";
- }
- return null;
- }
};
+ }
+ String updateAndInsert(UserResource userResource,Long index){
+ //判断资源是否存在
+ Resrce resrce = resrceMapper.selectById(userResource.getResourceBo());
+ if(resrce == null){
+ return "第"+index+"行的资源不存在";
+ }
+ //设置资源描述
+ userResource.setResrceDescription(resrce.getDescription());
+ //设置员工描述
+ NwaUser nwaUser = nwaUserMapper.selectById(HandleEnum.USER.getHandle(userResource.getSite(), userResource.getUserId()));
+ if(nwaUser != null){
+ userResource.setUserDescription(nwaUser.getFullName());
+ }else if("true".equals(userResource.getTemporaryUser())){
+ //不做任何操作
+ }else{
+ return "第"+index+"行的用户不存在,必须为临时员工";
+ }
+ userResourceService.saveOrUpdate(userResource);
+ return null;
}
}
From a35da8e733a2bc04d80d6a6fe85ec10bb498715e Mon Sep 17 00:00:00 2001
From: philip <244793088@qq.com>
Date: Sat, 7 Aug 2021 14:00:37 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E4=BA=A7=E5=89=8D=E5=87=86=E5=A4=87?=
=?UTF-8?q?=E5=8F=91=E6=B6=88=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../impl/ProdReadyTaskServiceImpl.java | 130 ++++++++++++------
.../service/PodTemplateService.java | 4 +-
.../service/impl/PodTemplateServiceImpl.java | 84 ++++++-----
3 files changed, 141 insertions(+), 77 deletions(-)
diff --git a/common/src/main/java/com/foreverwin/mesnac/common/service/impl/ProdReadyTaskServiceImpl.java b/common/src/main/java/com/foreverwin/mesnac/common/service/impl/ProdReadyTaskServiceImpl.java
index 363d8385..a5602c51 100644
--- a/common/src/main/java/com/foreverwin/mesnac/common/service/impl/ProdReadyTaskServiceImpl.java
+++ b/common/src/main/java/com/foreverwin/mesnac/common/service/impl/ProdReadyTaskServiceImpl.java
@@ -19,11 +19,14 @@ import com.foreverwin.mesnac.common.model.PrintLog;
import com.foreverwin.mesnac.common.model.ProdReadyTask;
import com.foreverwin.mesnac.common.model.ProdReadyTaskDetail;
import com.foreverwin.mesnac.common.service.*;
+import com.foreverwin.mesnac.common.util.ActiveMQUtil;
import com.foreverwin.mesnac.common.util.DateUtil;
import com.foreverwin.mesnac.common.util.StringUtil;
import com.foreverwin.mesnac.meapi.dto.BomComponentDto;
+import com.foreverwin.mesnac.meapi.mapper.WorkCenterMapper;
import com.foreverwin.mesnac.meapi.model.*;
import com.foreverwin.mesnac.meapi.service.*;
+import com.foreverwin.mesnac.meapi.util.StringUtils;
import com.foreverwin.modular.core.exception.BaseException;
import com.foreverwin.modular.core.exception.BusinessException;
import com.foreverwin.modular.core.util.CommonMethods;
@@ -75,21 +78,32 @@ public class ProdReadyTaskServiceImpl extends ServiceImpl list = list(lambdaQueryWrapper);
- if (list.size() >0) {
+ if (list.size() > 0) {
ProdReadyTask prodReadyTask = list.get(0);
if (prodReadyTask.getStatus().equals(STATUS_CANCEL)) {
throw new BaseException("产前准备任务任务已取消");
@@ -285,17 +299,17 @@ public class ProdReadyTaskServiceImpl extends ServiceImpl map=new HashMap<>();
- map.put("RESOURCE",sfcdispatch.getResrce());
- map.put("RESOURCE_TYPE",sfcdispatch.getResourceType());
- map.put("RESULT",jsonObject.get("RESULT"));
- map.put("MESSAGE",jsonObject.get("MESSAGE"));
+ Map map = new HashMap<>();
+ map.put("RESOURCE", sfcdispatch.getResrce());
+ map.put("RESOURCE_TYPE", sfcdispatch.getResourceType());
+ map.put("RESULT", jsonObject.get("RESULT"));
+ map.put("MESSAGE", jsonObject.get("MESSAGE"));
returnMap.add(map);
}
return returnMap;
@@ -429,21 +443,20 @@ public class ProdReadyTaskServiceImpl extends ServiceImpl prodReadyTasks=prodReadyTaskMapper.getUnreadyTasks(site,now,endTime);
- for(ProdReadyTask prodReadyTask : prodReadyTasks){
+ List prodReadyTasks = prodReadyTaskMapper.getUnreadyTasks(site, now, endTime);
+ for (ProdReadyTask prodReadyTask : prodReadyTasks) {
QueryWrapper messageQueryWrapper = new QueryWrapper<>();
- messageQueryWrapper.eq(Message.OBJECT_BO,prodReadyTask.getHandle());
+ messageQueryWrapper.eq(Message.OBJECT_BO, prodReadyTask.getHandle());
List list = messageService.list(messageQueryWrapper);
- if (!list.isEmpty()){
+ if (!list.isEmpty()) {
continue;
}
LambdaQueryWrapper lambdaQuery = new LambdaQueryWrapper<>();
lambdaQuery.eq(ProdReadyTaskDetail::getProdReadyTaskBo, prodReadyTask.getHandle());
List readyTaskDetails = prodReadyTaskDetailService.list(lambdaQuery);
- for (ProdReadyTaskDetail prodReadyTaskDetail:readyTaskDetails){
- if (prodReadyTaskDetail.getInspectionItem().equals(P01)){
+ for (ProdReadyTaskDetail prodReadyTaskDetail : readyTaskDetails) {
+ if (prodReadyTaskDetail.getInspectionItem().equals(P01)) {
Message message = new Message();
String uuid = UUID.randomUUID().toString();
message.setHandle(uuid);
@@ -453,56 +466,85 @@ public class ProdReadyTaskServiceImpl extends ServiceImpl queryWrapper=new QueryWrapper<>();
- queryWrapper.eq(MessageTypeUserGroup.MESSAGE_TYPE_BO, new MessageTypeBOHandle(site,MESSAGE_TYPE_WLZB).getValue());
- queryWrapper.eq(MessageTypeUserGroup.USER_GROUP_BO,new UserGroupBOHandle(site,userGroup).getValue());
+ QueryWrapper queryWrapper = new QueryWrapper<>();
+ queryWrapper.eq(MessageTypeUserGroup.MESSAGE_TYPE_BO, new MessageTypeBOHandle(site, MESSAGE_TYPE_WLZB).getValue());
+ queryWrapper.eq(MessageTypeUserGroup.USER_GROUP_BO, new UserGroupBOHandle(site, userGroup).getValue());
List messageTypeUserGroupList = messageTypeUserGroupService.list(queryWrapper);
- if (messageTypeUserGroupList.isEmpty()){
+ if (messageTypeUserGroupList.isEmpty()) {
continue;
}
message.setSendUserGroup(userGroup);
- message.setSendUser("");
- message.setContent("");
- message.setUpUserGroup("");
- message.setUpUser("");
- message.setUpMessageType("");
- message.setUpDateTime(LocalDateTime.now());
- message.setGrade(0.0D);
- message.setResponseDateTime(LocalDateTime.now());
- message.setNode("");
- message.setStatus("");
- message.setCreatedUser("");
+ message.setSendUser("JOB");
+ String sendMessage = this.formatMessage(prodReadyTask, MESSAGE_TYPE_WLZB, site);
+ message.setContent(sendMessage);
+ message.setUpUserGroup(null);
+ message.setUpUser(null);
+ message.setUpMessageType(null);
+ message.setUpDateTime(null);
+ message.setGrade(null);
+ message.setResponseDateTime(null);
+ message.setNode(null);
+ message.setStatus(Constants.STATUS_Y);
+ message.setCreatedUser("JOB");
message.setCreatedDateTime(LocalDateTime.now());
- message.setModifiedUser("");
+ message.setModifiedUser("JOB");
message.setModifiedDateTime(LocalDateTime.now());
-
-
-/*
- List nwaUsers = nwaUserService.checkUserGroup(site,abnormalMessage.getSendUserGroup());
+ List nwaUsers = nwaUserService.checkUserGroup(site, userGroup);
StringBuilder sendUsers = new StringBuilder();
for (int i = 0; i < nwaUsers.size(); i++) {
- if(i == (nwaUsers.size() - 1)){
+ if (i == (nwaUsers.size() - 1)) {
sendUsers.append(nwaUsers.get(i));
- }else{
+ } else {
sendUsers.append(nwaUsers.get(i)).append("|");
}
}
- activeMQUtil.wechatSendMessage(sendUsers.toString(),abnormalMessage.getContent());
-// }
- messageService.saveOrUpdate(abnormalMessage);*/
-
+ messageService.save(message);
+ activeMQUtil.wechatSendMessage(sendUsers.toString(),sendMessage);
}
}
}
}
+ public String formatMessage(ProdReadyTask prodReadyTask, String messageType, String site) {
+ //找到消息内容
+ String locale = LocaleContextHolder.getLocale().getLanguage();
+ MessageType messageTypeEntity = new MessageType();
+ messageTypeEntity.setSite(site);
+ messageTypeEntity.setMessageType(messageType);
+ QueryWrapper messageTypeQueryWrapper = new QueryWrapper();
+ messageTypeQueryWrapper.setEntity(messageTypeEntity);
+ MessageType sendMessageType = messageTypeService.getOne(messageTypeQueryWrapper);
+ if (sendMessageType == null) {
+ throw new BaseException("异常提报时找不到要发送的消息类型");
+ }
+ //格式化消息
+ String body = sendMessageType.getBody();
+ //替换消息类型中的参数
+ Map messageMap = new HashMap<>();
+ //根据车间找到对应车间的描述
+ WorkCenter workCenter = workCenterMapper.findWorkCenterDescriptionByWorkCenter(site, prodReadyTask.getWorkCenter(), locale);
+ //根据资源找到对应的产线的描述
+ Resrce byResrce = resrceService.findByResrce(prodReadyTask.getResrce());
+ Item selectCurrent = itemService.selectCurrent(site, prodReadyTask.getItem());
+ //项目号
+ String item = selectCurrent.getItem() + "/" + selectCurrent.getDescription();
+ messageMap.put("WORKCENTER", workCenter.getDescription());
+ messageMap.put("RESOURCE", byResrce + "/" + byResrce.getDescription());
+ messageMap.put("ITEM", item);
+ messageMap.put("SHOPORDER", prodReadyTask.getShopOrder());
+ messageMap.put("SFC", prodReadyTask.getSfc());
+
+ //格式化之后的消息
+ return StringUtils.format(body, messageMap);
+ }
+
public JSONObject sendToDnc(String item, String resource, String resourceType) {
String site = CommonMethods.getSite();
- String queue="resource.check.process";
- JSONObject messageObject=new JSONObject();
+ String queue = "resource.check.process";
+ JSONObject messageObject = new JSONObject();
String tranid = UUID.randomUUID().toString();
messageObject.put("TRANID", tranid);
String dateTime = DateUtil.formatDate(new Date());
diff --git a/production/src/main/java/com/foreverwin/mesnac/production/service/PodTemplateService.java b/production/src/main/java/com/foreverwin/mesnac/production/service/PodTemplateService.java
index 29c591cd..1a41a4a6 100644
--- a/production/src/main/java/com/foreverwin/mesnac/production/service/PodTemplateService.java
+++ b/production/src/main/java/com/foreverwin/mesnac/production/service/PodTemplateService.java
@@ -4,7 +4,7 @@ import com.foreverwin.mesnac.meapi.dto.SfcDto;
import com.foreverwin.mesnac.meapi.dto.WorkCenterDto;
import com.foreverwin.mesnac.meapi.model.Sfc;
-import java.math.BigDecimal;
+import java.util.List;
import java.util.Map;
public interface PodTemplateService {
@@ -18,7 +18,7 @@ public interface PodTemplateService {
void sfcComplete(Map map);
- void sendErp(String sfc, String stepId, BigDecimal qty, BigDecimal scrapQty);
+ void sendErp(List