diff --git a/src/main/java/com/gaotao/modules/boxManage/controller/BoxForNotificationController.java b/src/main/java/com/gaotao/modules/boxManage/controller/BoxForNotificationController.java new file mode 100644 index 0000000..75c0dbf --- /dev/null +++ b/src/main/java/com/gaotao/modules/boxManage/controller/BoxForNotificationController.java @@ -0,0 +1,46 @@ +package com.gaotao.modules.boxManage.controller; + +import com.gaotao.common.utils.R; +import com.gaotao.modules.boxManage.data.SoReceiveBoxesData; +import com.gaotao.modules.boxManage.service.BoxForNotificationService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +@RestController +@RequestMapping("/boxForNotification") +public class BoxForNotificationController { + + @Autowired + private BoxForNotificationService srmSupplierService; + + /** + * + * @description 通过订单号查询发货箱信息 + * @author 常熟吴彦祖 + * @date 2025/9/1 17:09 + * @return R + */ + @PostMapping(value="/searchSoReceiveBoxesData") + @ResponseBody + public R searchSoReceiveBoxesData(@RequestBody SoReceiveBoxesData data) { + List rows = srmSupplierService.searchSoReceiveBoxesData(data); + return R.ok().put("rows", rows); + } + + /** + * + * @description 新增发货箱信息 + * @author 常熟吴彦祖 + * @date 2025/9/1 17:09 + * @return R + */ + @PostMapping(value="/newSoReceiveBoxesData") + @ResponseBody + public R newSoReceiveBoxesData(@RequestBody SoReceiveBoxesData data) { + srmSupplierService.newSoReceiveBoxesData(data); + return R.ok(); + } + +} diff --git a/src/main/java/com/gaotao/modules/boxManage/dao/BoxForNotificationMapper.java b/src/main/java/com/gaotao/modules/boxManage/dao/BoxForNotificationMapper.java new file mode 100644 index 0000000..b358695 --- /dev/null +++ b/src/main/java/com/gaotao/modules/boxManage/dao/BoxForNotificationMapper.java @@ -0,0 +1,14 @@ +package com.gaotao.modules.boxManage.dao; + +import com.gaotao.modules.boxManage.data.SoReceiveBoxesData; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface BoxForNotificationMapper { + + List searchSoReceiveBoxesData(SoReceiveBoxesData data); + + void newSoReceiveBoxesData(SoReceiveBoxesData data); +} diff --git a/src/main/java/com/gaotao/modules/boxManage/data/SoReceiveBoxesData.java b/src/main/java/com/gaotao/modules/boxManage/data/SoReceiveBoxesData.java new file mode 100644 index 0000000..1c565c0 --- /dev/null +++ b/src/main/java/com/gaotao/modules/boxManage/data/SoReceiveBoxesData.java @@ -0,0 +1,12 @@ +package com.gaotao.modules.boxManage.data; + +import com.gaotao.modules.boxManage.entity.SoReceiveBoxesDto; +import lombok.Data; +import org.apache.ibatis.type.Alias; + +@Data +@Alias("SoReceiveBoxesData") +public class SoReceiveBoxesData extends SoReceiveBoxesDto { + private String wareHouseName; + +} diff --git a/src/main/java/com/gaotao/modules/boxManage/entity/SoReceiveBoxesDto.java b/src/main/java/com/gaotao/modules/boxManage/entity/SoReceiveBoxesDto.java new file mode 100644 index 0000000..c5797c2 --- /dev/null +++ b/src/main/java/com/gaotao/modules/boxManage/entity/SoReceiveBoxesDto.java @@ -0,0 +1,202 @@ +package com.gaotao.modules.boxManage.entity; + +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +public class SoReceiveBoxesDto { + /** + * + */ + private Integer id; + + /** + * + */ + private String site; + private String buNo; + /** + * + */ + private String boxNo; + + /** + * + */ + private String orderNo; + + /** + * + */ + private String status; + + /** + * + */ + private Integer rollsQty; + + /** + * + */ + private String boxType; + + /** + * + */ + private String cInStockFlag; + + /** + * + */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date createdDate; + + /** + * + */ + private String createdBy; + + /** + * + */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date updateDate; + + /** + * + */ + private String updateBy; + + /** + * + */ + private Integer version; + + /** + * + */ + private String wareHouseID; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getSite() { + return site; + } + + public void setSite(String site) { + this.site = site; + } + + public String getBoxNo() { + return boxNo; + } + + public void setBoxNo(String boxNo) { + this.boxNo = boxNo; + } + + public String getOrderNo() { + return orderNo; + } + + public void setOrderNo(String orderNo) { + this.orderNo = orderNo; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public Integer getRollsQty() { + return rollsQty; + } + + public void setRollsQty(Integer rollsQty) { + this.rollsQty = rollsQty; + } + + public String getBoxType() { + return boxType; + } + + public void setBoxType(String boxType) { + this.boxType = boxType; + } + + public String getcInStockFlag() { + return cInStockFlag; + } + + public void setcInStockFlag(String cInStockFlag) { + this.cInStockFlag = cInStockFlag; + } + + public Date getCreatedDate() { + return createdDate; + } + + public void setCreatedDate(Date createdDate) { + this.createdDate = createdDate; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getUpdateDate() { + return updateDate; + } + + public void setUpdateDate(Date updateDate) { + this.updateDate = updateDate; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Integer getVersion() { + return version; + } + + public void setVersion(Integer version) { + this.version = version; + } + + public String getWareHouseID() { + return wareHouseID; + } + + public void setWareHouseID(String wareHouseID) { + this.wareHouseID = wareHouseID; + } + + public String getBuNo() { + return buNo; + } + + public void setBuNo(String buNo) { + this.buNo = buNo; + } +} \ No newline at end of file diff --git a/src/main/java/com/gaotao/modules/boxManage/service/BoxForNotificationService.java b/src/main/java/com/gaotao/modules/boxManage/service/BoxForNotificationService.java new file mode 100644 index 0000000..dfcdc3d --- /dev/null +++ b/src/main/java/com/gaotao/modules/boxManage/service/BoxForNotificationService.java @@ -0,0 +1,10 @@ +package com.gaotao.modules.boxManage.service; + +import com.gaotao.modules.boxManage.data.SoReceiveBoxesData; + +import java.util.List; + +public interface BoxForNotificationService { + List searchSoReceiveBoxesData(SoReceiveBoxesData data); + void newSoReceiveBoxesData(SoReceiveBoxesData data); +} diff --git a/src/main/java/com/gaotao/modules/boxManage/service/impl/BoxForNotificationServiceImpl.java b/src/main/java/com/gaotao/modules/boxManage/service/impl/BoxForNotificationServiceImpl.java new file mode 100644 index 0000000..6e59d5b --- /dev/null +++ b/src/main/java/com/gaotao/modules/boxManage/service/impl/BoxForNotificationServiceImpl.java @@ -0,0 +1,34 @@ +package com.gaotao.modules.boxManage.service.impl; + +import com.gaotao.modules.boxManage.dao.BoxForNotificationMapper; +import com.gaotao.modules.boxManage.data.SoReceiveBoxesData; +import com.gaotao.modules.boxManage.service.BoxForNotificationService; +import com.gaotao.modules.trans.entity.TransNoControl; +import com.gaotao.modules.trans.service.TransNoControlService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class BoxForNotificationServiceImpl implements BoxForNotificationService { + @Autowired + private TransNoControlService transNoService; + @Autowired + private BoxForNotificationMapper boxForNotificationMapper; + @Override + public List searchSoReceiveBoxesData(SoReceiveBoxesData data) { + return boxForNotificationMapper.searchSoReceiveBoxesData(data); + } + + + @Override + public void newSoReceiveBoxesData(SoReceiveBoxesData inData){ + TransNoControl transNo = transNoService.getTransNo(inData.getSite(),"BOX",inData.getBuNo()); + if(transNo == null){ + throw new RuntimeException("箱号生成失败,请联系管理员!"); + } + inData.setBoxNo(transNo.getNewTransNo()); + boxForNotificationMapper.newSoReceiveBoxesData(inData); + } +} diff --git a/src/main/java/com/gaotao/modules/wms/controller/WmsPrintController.java b/src/main/java/com/gaotao/modules/wms/controller/WmsPrintController.java index 28644c2..19772ef 100644 --- a/src/main/java/com/gaotao/modules/wms/controller/WmsPrintController.java +++ b/src/main/java/com/gaotao/modules/wms/controller/WmsPrintController.java @@ -101,4 +101,6 @@ public class WmsPrintController { PageUtils page = wmsPrintService.getKuCunLabelData( inData); return R.ok().put("page", page); } + + } \ No newline at end of file diff --git a/src/main/resources/mapper/boxManage/BoxForNotificationMapper.xml b/src/main/resources/mapper/boxManage/BoxForNotificationMapper.xml new file mode 100644 index 0000000..0b31ed1 --- /dev/null +++ b/src/main/resources/mapper/boxManage/BoxForNotificationMapper.xml @@ -0,0 +1,51 @@ + + + + + + + + insert into so_receive_boxes + (site,box_no,order_no,[status],rolls_qty,box_type,c_in_stock_flag,created_date,created_by, + version,WareHouseID,bu_no) values + (#{site},#{boxNo},#{orderNo},#{status},#{rollsQty},#{boxType},'Y',GetDate(),#{createdBy}, + 0,#{wareHouseID},#{buNo}) + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/outboundNotification/OutboundNotificationHeadMapper.xml b/src/main/resources/mapper/outboundNotification/OutboundNotificationHeadMapper.xml index 70c931f..aaf2525 100644 --- a/src/main/resources/mapper/outboundNotification/OutboundNotificationHeadMapper.xml +++ b/src/main/resources/mapper/outboundNotification/OutboundNotificationHeadMapper.xml @@ -64,6 +64,12 @@ AND #{query.endDate} >= a.required_outbound_date + + AND a.customer_id like '%' + #{query.customerId} + '%' + + + AND b.customerName like '%' + #{query.customerName} + '%' +