diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/controller/UcmCtBaseController.java b/ktg-mes/src/main/java/com/ktg/mes/wm/controller/UcmCtBaseController.java index 44efc76..c0d242c 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/controller/UcmCtBaseController.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/controller/UcmCtBaseController.java @@ -14,6 +14,7 @@ import com.ktg.mes.wm.domain.UcmCtBase; import com.ktg.mes.wm.domain.UcmCtMaterial; import com.ktg.mes.wm.domain.box.Box; import com.ktg.mes.wm.domain.box.BoxItem; +import com.ktg.mes.wm.domain.box.RfidCard; import com.ktg.mes.wm.mapper.UcmCtBaseMapper; import com.ktg.mes.wm.service.IUcmCtBaseService; import org.springframework.beans.factory.annotation.Autowired; @@ -72,6 +73,28 @@ public class UcmCtBaseController extends BaseController { } } + @PostMapping("/open/upload-temp-box-list-info") + public String uploadTempBoxListInfo( + @RequestBody List rfidCardList + ) { + try { + return ucmCtBaseService.uploadTempBoxListInfo(rfidCardList); + } catch (Exception e) { + return e.getMessage(); + } + } + + @PostMapping("/open/upload-temp-box-item-list-info") + public String uploadTempBoxItemListInfo( + @RequestBody List rfidCardList + ) { + try { + return ucmCtBaseService.uploadTempBoxItemListInfo(rfidCardList); + } catch (Exception e) { + return e.getMessage(); + } + } + /** * 查询料箱管理列表 */ diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/domain/box/RfidCard.java b/ktg-mes/src/main/java/com/ktg/mes/wm/domain/box/RfidCard.java new file mode 100644 index 0000000..b4182cd --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/domain/box/RfidCard.java @@ -0,0 +1,44 @@ +package com.ktg.mes.wm.domain.box; + +import java.util.List; + +/** + * 料箱实例 + */ +public class RfidCard { + private Long number = null; + private String rfid = null; + + public RfidCard() { + super(); + } + + public RfidCard(Long number, String rfid) { + this.number = number; + this.rfid = rfid; + } + + public Long getNumber() { + return number; + } + + public void setNumber(Long number) { + this.number = number; + } + + public String getRfid() { + return rfid; + } + + public void setRfid(String rfid) { + this.rfid = rfid; + } + + @Override + public String toString() { + return "RfidCard{" + + "number=" + number + + ", rfid='" + rfid + '\'' + + '}'; + } +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/service/IUcmCtBaseService.java b/ktg-mes/src/main/java/com/ktg/mes/wm/service/IUcmCtBaseService.java index 524d9a2..8eb6a19 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/service/IUcmCtBaseService.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/service/IUcmCtBaseService.java @@ -2,6 +2,7 @@ package com.ktg.mes.wm.service; import com.ktg.mes.wm.domain.UcmCtBase; import com.ktg.mes.wm.domain.box.Box; +import com.ktg.mes.wm.domain.box.RfidCard; import java.util.List; @@ -66,4 +67,8 @@ public interface IUcmCtBaseService int unbindUcmCtBase(String boxCode, String itemCode); String bindAndUnbindUcmCtBase(List boxList); + + String uploadTempBoxListInfo(List rfidCardList); + + String uploadTempBoxItemListInfo(List rfidCardList); } diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/UcmCtBaseServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/UcmCtBaseServiceImpl.java index 0e95464..e0c34a2 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/UcmCtBaseServiceImpl.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/UcmCtBaseServiceImpl.java @@ -1,5 +1,7 @@ package com.ktg.mes.wm.service.impl; +import com.alibaba.fastjson.JSON; +import com.ktg.common.core.redis.RedisCache; import com.ktg.common.utils.DateUtils; import com.ktg.mes.md.domain.BaseKnife; import com.ktg.mes.md.mapper.BaseKnifeMapper; @@ -8,13 +10,16 @@ import com.ktg.mes.wm.domain.UcmCtBase; import com.ktg.mes.wm.domain.UcmCtMaterial; import com.ktg.mes.wm.domain.box.Box; import com.ktg.mes.wm.domain.box.BoxItem; +import com.ktg.mes.wm.domain.box.RfidCard; import com.ktg.mes.wm.mapper.UcmCtBaseMapper; import com.ktg.mes.wm.service.IUcmCtBaseService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.Date; +import java.util.HashMap; import java.util.List; import static org.apache.commons.lang3.SystemUtils.getUserName; @@ -244,4 +249,20 @@ public class UcmCtBaseServiceImpl implements IUcmCtBaseService { } return "OK"; } + + @Override + public String uploadTempBoxListInfo(List rfidCardList) { + System.out.println("料箱工具========================================"); + System.out.println(JSON.toJSONString(rfidCardList)); + System.out.println("=============================================="); + return "OK"; + } + + @Override + public String uploadTempBoxItemListInfo(List rfidCardList) { + System.out.println("物料工具========================================"); + System.out.println(JSON.toJSONString(rfidCardList)); + System.out.println("=============================================="); + return "OK"; + } }