From 9cc53e966e1f5921a5c1b9038dc6a514408fc6a3 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Fri, 9 Jan 2026 16:45:18 +0800 Subject: [PATCH] =?UTF-8?q?2026-01-09=20=E6=96=B0=E5=A2=9E=E6=94=B6?= =?UTF-8?q?=E8=B4=A7=E5=85=A5=E5=BA=93=E4=BB=BB=E5=8A=A1=E3=80=81=E6=8B=A3?= =?UTF-8?q?=E8=B4=A7=E5=87=BA=E5=BA=93=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InboundNotificationReportController.java | 46 +++++ .../OutboundNotificationReportController.java | 46 +++++ .../dao/InboundNotificationReportMapper.java | 47 +++++ .../dao/OutboundNotificationReportMapper.java | 47 +++++ .../entity/InboundNotificationReportData.java | 84 +++++++++ .../OutboundNotificationReportData.java | 87 +++++++++ .../InboundNotificationReportService.java | 29 +++ .../OutboundNotificationReportService.java | 29 +++ .../InboundNotificationReportServiceImpl.java | 45 +++++ ...OutboundNotificationReportServiceImpl.java | 45 +++++ .../InboundNotificationReportMapper.xml | 154 ++++++++++++++++ .../OutboundNotificationReportMapper.xml | 174 ++++++++++++++++++ 12 files changed, 833 insertions(+) create mode 100644 src/main/java/com/gaotao/modules/report/controller/InboundNotificationReportController.java create mode 100644 src/main/java/com/gaotao/modules/report/controller/OutboundNotificationReportController.java create mode 100644 src/main/java/com/gaotao/modules/report/dao/InboundNotificationReportMapper.java create mode 100644 src/main/java/com/gaotao/modules/report/dao/OutboundNotificationReportMapper.java create mode 100644 src/main/java/com/gaotao/modules/report/entity/InboundNotificationReportData.java create mode 100644 src/main/java/com/gaotao/modules/report/entity/OutboundNotificationReportData.java create mode 100644 src/main/java/com/gaotao/modules/report/service/InboundNotificationReportService.java create mode 100644 src/main/java/com/gaotao/modules/report/service/OutboundNotificationReportService.java create mode 100644 src/main/java/com/gaotao/modules/report/service/impl/InboundNotificationReportServiceImpl.java create mode 100644 src/main/java/com/gaotao/modules/report/service/impl/OutboundNotificationReportServiceImpl.java create mode 100644 src/main/resources/mapper/report/InboundNotificationReportMapper.xml create mode 100644 src/main/resources/mapper/report/OutboundNotificationReportMapper.xml diff --git a/src/main/java/com/gaotao/modules/report/controller/InboundNotificationReportController.java b/src/main/java/com/gaotao/modules/report/controller/InboundNotificationReportController.java new file mode 100644 index 0000000..a3afd47 --- /dev/null +++ b/src/main/java/com/gaotao/modules/report/controller/InboundNotificationReportController.java @@ -0,0 +1,46 @@ +package com.gaotao.modules.report.controller; + +import com.gaotao.common.utils.PageUtils; +import com.gaotao.common.utils.R; +import com.gaotao.modules.report.entity.InboundNotificationReportData; +import com.gaotao.modules.report.service.InboundNotificationReportService; +import com.gaotao.modules.sys.controller.AbstractController; +import com.gaotao.modules.sys.entity.SysUserEntity; +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 收货入库任务报表控制器 + * @author system + * @date 2026/01/09 + */ +@RestController +@RequestMapping("/report/inboundNotificationReport") +public class InboundNotificationReportController extends AbstractController { + + @Autowired + private InboundNotificationReportService inboundNotificationReportService; + + /** + * 查询收货入库任务报表数据(分页) + */ + @PostMapping("/list") + public R list(@RequestBody InboundNotificationReportData params) { + String userName = ((SysUserEntity) SecurityUtils.getSubject().getPrincipal()).getUsername(); + PageUtils page = inboundNotificationReportService.searchInboundNotificationReport(params, userName); + return R.ok().put("page", page); + } + + /** + * 获取用户可访问的site列表 + */ + @GetMapping("/getSiteList") + public R getSiteList() { + String userName = ((SysUserEntity) SecurityUtils.getSubject().getPrincipal()).getUsername(); + List siteList = inboundNotificationReportService.getAccessSiteList(userName); + return R.ok().put("siteList", siteList); + } +} diff --git a/src/main/java/com/gaotao/modules/report/controller/OutboundNotificationReportController.java b/src/main/java/com/gaotao/modules/report/controller/OutboundNotificationReportController.java new file mode 100644 index 0000000..d2381f5 --- /dev/null +++ b/src/main/java/com/gaotao/modules/report/controller/OutboundNotificationReportController.java @@ -0,0 +1,46 @@ +package com.gaotao.modules.report.controller; + +import com.gaotao.common.utils.PageUtils; +import com.gaotao.common.utils.R; +import com.gaotao.modules.report.entity.OutboundNotificationReportData; +import com.gaotao.modules.report.service.OutboundNotificationReportService; +import com.gaotao.modules.sys.controller.AbstractController; +import com.gaotao.modules.sys.entity.SysUserEntity; +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 拣货出库任务报表控制器 + * @author system + * @date 2026/01/09 + */ +@RestController +@RequestMapping("/report/outboundNotificationReport") +public class OutboundNotificationReportController extends AbstractController { + + @Autowired + private OutboundNotificationReportService outboundNotificationReportService; + + /** + * 查询拣货出库任务报表数据(分页) + */ + @PostMapping("/list") + public R list(@RequestBody OutboundNotificationReportData params) { + String userName = ((SysUserEntity) SecurityUtils.getSubject().getPrincipal()).getUsername(); + PageUtils page = outboundNotificationReportService.searchOutboundNotificationReport(params, userName); + return R.ok().put("page", page); + } + + /** + * 获取用户可访问的site列表 + */ + @GetMapping("/getSiteList") + public R getSiteList() { + String userName = ((SysUserEntity) SecurityUtils.getSubject().getPrincipal()).getUsername(); + List siteList = outboundNotificationReportService.getAccessSiteList(userName); + return R.ok().put("siteList", siteList); + } +} diff --git a/src/main/java/com/gaotao/modules/report/dao/InboundNotificationReportMapper.java b/src/main/java/com/gaotao/modules/report/dao/InboundNotificationReportMapper.java new file mode 100644 index 0000000..c3e268b --- /dev/null +++ b/src/main/java/com/gaotao/modules/report/dao/InboundNotificationReportMapper.java @@ -0,0 +1,47 @@ +package com.gaotao.modules.report.dao; + +import com.gaotao.modules.report.entity.InboundNotificationReportData; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 收货入库任务报表Mapper + * @author system + * @date 2026/01/09 + */ +@Mapper +public interface InboundNotificationReportMapper { + + /** + * 查询收货入库任务报表数据(分页) + * @param query 查询条件 + * @param userName 用户名 + * @param offset 偏移量 + * @param limit 每页数量 + * @return 报表数据列表 + */ + List searchInboundNotificationReport( + @Param("query") InboundNotificationReportData query, + @Param("userName") String userName, + @Param("offset") int offset, + @Param("limit") int limit); + + /** + * 查询收货入库任务报表数据总数 + * @param query 查询条件 + * @param userName 用户名 + * @return 总数 + */ + int countInboundNotificationReport( + @Param("query") InboundNotificationReportData query, + @Param("userName") String userName); + + /** + * 获取用户可访问的site列表 + * @param userName 用户名 + * @return site列表 + */ + List getAccessSiteList(@Param("userName") String userName); +} diff --git a/src/main/java/com/gaotao/modules/report/dao/OutboundNotificationReportMapper.java b/src/main/java/com/gaotao/modules/report/dao/OutboundNotificationReportMapper.java new file mode 100644 index 0000000..f4b1f2a --- /dev/null +++ b/src/main/java/com/gaotao/modules/report/dao/OutboundNotificationReportMapper.java @@ -0,0 +1,47 @@ +package com.gaotao.modules.report.dao; + +import com.gaotao.modules.report.entity.OutboundNotificationReportData; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 拣货出库任务报表Mapper + * @author system + * @date 2026/01/09 + */ +@Mapper +public interface OutboundNotificationReportMapper { + + /** + * 查询拣货出库任务报表数据(分页) + * @param query 查询条件 + * @param userName 用户名 + * @param offset 偏移量 + * @param limit 每页数量 + * @return 报表数据列表 + */ + List searchOutboundNotificationReport( + @Param("query") OutboundNotificationReportData query, + @Param("userName") String userName, + @Param("offset") int offset, + @Param("limit") int limit); + + /** + * 查询拣货出库任务报表数据总数 + * @param query 查询条件 + * @param userName 用户名 + * @return 总数 + */ + int countOutboundNotificationReport( + @Param("query") OutboundNotificationReportData query, + @Param("userName") String userName); + + /** + * 获取用户可访问的site列表 + * @param userName 用户名 + * @return site列表 + */ + List getAccessSiteList(@Param("userName") String userName); +} diff --git a/src/main/java/com/gaotao/modules/report/entity/InboundNotificationReportData.java b/src/main/java/com/gaotao/modules/report/entity/InboundNotificationReportData.java new file mode 100644 index 0000000..bee3ae4 --- /dev/null +++ b/src/main/java/com/gaotao/modules/report/entity/InboundNotificationReportData.java @@ -0,0 +1,84 @@ +package com.gaotao.modules.report.entity; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +/** + * 收货入库任务报表数据实体 + * @author system + * @date 2026/01/09 + */ +@Data +public class InboundNotificationReportData { + + // 分页参数 + private Integer page; + private Integer limit; + + // 查询条件 + private String site; + private String orderNo; + private String orderType; + private String orderStatus; + private String completionRate; // 完成率 + private String supplierId; + private String supplierName; + private String partNo; + private String partDesc; + private String queryRelatedOrderNo; // 查询条件:关联单号 + private String queryRelatedOrderLineNo; // 查询条件:关联单行号 + + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date startDate; + + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date endDate; + + // 主表字段 + private String buNo; + private String buDesc; + private String relatedOrderNo; + private String relatedOrderLineNo; + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date requiredInboundDate; + private String remarks; + private String erpOrderNo; + private String erpOrderLineNo; + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date erpOrderDate; + private String createdBy; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createdDate; + private String updatedBy; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date updatedDate; + private String assignedBy; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date assignedDate; + private String closedBy; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date closedDate; + private String closeFlag; + private String inWarehouse; + private String inWarehouseName; + + // 明细表字段 + private String detailPartNo; + private String detailPartDesc; + private String unit; + private String umName; + private Double requiredQty; + private Double orderQty; + private Double actualInQty; + private String detailInWarehouse; + private String detailInWarehouseName; + private String inBatchNo; + private String detailRelatedOrderNo; + private String detailRelatedOrderLineNo; + private String rollNo; +} diff --git a/src/main/java/com/gaotao/modules/report/entity/OutboundNotificationReportData.java b/src/main/java/com/gaotao/modules/report/entity/OutboundNotificationReportData.java new file mode 100644 index 0000000..4bf8299 --- /dev/null +++ b/src/main/java/com/gaotao/modules/report/entity/OutboundNotificationReportData.java @@ -0,0 +1,87 @@ +package com.gaotao.modules.report.entity; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +/** + * 拣货出库任务报表数据实体 + * @author system + * @date 2026/01/09 + */ +@Data +public class OutboundNotificationReportData { + + // 分页参数 + private Integer page; + private Integer limit; + + // 查询条件 + private String site; + private String orderNo; + private String orderType; + private String orderStatus; + private String completionRate; // 完成率 + private String customerId; + private String customerName; + private String partNo; + private String partDesc; + private String queryRelatedOrderNo; // 查询条件:关联单号 + private String queryRelatedOrderLineNo; // 查询条件:关联单行号 + private String queryOutBatchNo; // 查询条件:合约号码 + + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date startDate; + + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date endDate; + + // 主表字段 + private String buNo; + private String buDesc; + private String customerAbb; + private String relatedOrderNo; + private String relatedOrderLineNo; + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date requiredOutboundDate; + private String remarks; + private String erpOrderNo; + private String erpOrderLineNo; + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date erpOrderDate; + private String createdBy; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createdDate; + private String updatedBy; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date updatedDate; + private String assignedBy; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date assignedDate; + private String closedBy; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date closedDate; + private String closeFlag; + private String outWarehouse; + private String outWarehouseName; + private String customerOrderNo; + + // 明细表字段 + private String detailPartNo; + private String detailPartDesc; + private String unit; + private String umName; + private Double requiredQty; + private Double orderQty; + private Double actualOutQty; + private String detailOutWarehouse; + private String detailOutWarehouseName; + private String outBatchNo; + private String detailRelatedOrderNo; + private String detailRelatedOrderLineNo; + private String inspectionFlag; +} diff --git a/src/main/java/com/gaotao/modules/report/service/InboundNotificationReportService.java b/src/main/java/com/gaotao/modules/report/service/InboundNotificationReportService.java new file mode 100644 index 0000000..a864e9a --- /dev/null +++ b/src/main/java/com/gaotao/modules/report/service/InboundNotificationReportService.java @@ -0,0 +1,29 @@ +package com.gaotao.modules.report.service; + +import com.gaotao.common.utils.PageUtils; +import com.gaotao.modules.report.entity.InboundNotificationReportData; + +import java.util.List; + +/** + * 收货入库任务报表服务接口 + * @author system + * @date 2026/01/09 + */ +public interface InboundNotificationReportService { + + /** + * 查询收货入库任务报表数据(分页) + * @param query 查询条件 + * @param userName 用户名 + * @return 分页数据 + */ + PageUtils searchInboundNotificationReport(InboundNotificationReportData query, String userName); + + /** + * 获取用户可访问的site列表 + * @param userName 用户名 + * @return site列表 + */ + List getAccessSiteList(String userName); +} diff --git a/src/main/java/com/gaotao/modules/report/service/OutboundNotificationReportService.java b/src/main/java/com/gaotao/modules/report/service/OutboundNotificationReportService.java new file mode 100644 index 0000000..255014b --- /dev/null +++ b/src/main/java/com/gaotao/modules/report/service/OutboundNotificationReportService.java @@ -0,0 +1,29 @@ +package com.gaotao.modules.report.service; + +import com.gaotao.common.utils.PageUtils; +import com.gaotao.modules.report.entity.OutboundNotificationReportData; + +import java.util.List; + +/** + * 拣货出库任务报表服务接口 + * @author system + * @date 2026/01/09 + */ +public interface OutboundNotificationReportService { + + /** + * 查询拣货出库任务报表数据(分页) + * @param query 查询条件 + * @param userName 用户名 + * @return 分页数据 + */ + PageUtils searchOutboundNotificationReport(OutboundNotificationReportData query, String userName); + + /** + * 获取用户可访问的site列表 + * @param userName 用户名 + * @return site列表 + */ + List getAccessSiteList(String userName); +} diff --git a/src/main/java/com/gaotao/modules/report/service/impl/InboundNotificationReportServiceImpl.java b/src/main/java/com/gaotao/modules/report/service/impl/InboundNotificationReportServiceImpl.java new file mode 100644 index 0000000..6245648 --- /dev/null +++ b/src/main/java/com/gaotao/modules/report/service/impl/InboundNotificationReportServiceImpl.java @@ -0,0 +1,45 @@ +package com.gaotao.modules.report.service.impl; + +import com.gaotao.common.utils.PageUtils; +import com.gaotao.modules.report.dao.InboundNotificationReportMapper; +import com.gaotao.modules.report.entity.InboundNotificationReportData; +import com.gaotao.modules.report.service.InboundNotificationReportService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 收货入库任务报表服务实现 + * @author system + * @date 2026/01/09 + */ +@Service +public class InboundNotificationReportServiceImpl implements InboundNotificationReportService { + + @Autowired + private InboundNotificationReportMapper inboundNotificationReportMapper; + + @Override + public PageUtils searchInboundNotificationReport(InboundNotificationReportData query, String userName) { + // 默认分页参数 + int page = query.getPage() != null ? query.getPage() : 1; + int limit = query.getLimit() != null ? query.getLimit() : 50; + int offset = (page - 1) * limit; + + // 查询数据 + List list = inboundNotificationReportMapper.searchInboundNotificationReport( + query, userName, offset, limit); + + // 查询总数 + int total = inboundNotificationReportMapper.countInboundNotificationReport(query, userName); + + // 构建分页结果 + return new PageUtils(list, total, limit, page); + } + + @Override + public List getAccessSiteList(String userName) { + return inboundNotificationReportMapper.getAccessSiteList(userName); + } +} diff --git a/src/main/java/com/gaotao/modules/report/service/impl/OutboundNotificationReportServiceImpl.java b/src/main/java/com/gaotao/modules/report/service/impl/OutboundNotificationReportServiceImpl.java new file mode 100644 index 0000000..5272439 --- /dev/null +++ b/src/main/java/com/gaotao/modules/report/service/impl/OutboundNotificationReportServiceImpl.java @@ -0,0 +1,45 @@ +package com.gaotao.modules.report.service.impl; + +import com.gaotao.common.utils.PageUtils; +import com.gaotao.modules.report.dao.OutboundNotificationReportMapper; +import com.gaotao.modules.report.entity.OutboundNotificationReportData; +import com.gaotao.modules.report.service.OutboundNotificationReportService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 拣货出库任务报表服务实现 + * @author system + * @date 2026/01/09 + */ +@Service +public class OutboundNotificationReportServiceImpl implements OutboundNotificationReportService { + + @Autowired + private OutboundNotificationReportMapper outboundNotificationReportMapper; + + @Override + public PageUtils searchOutboundNotificationReport(OutboundNotificationReportData query, String userName) { + // 默认分页参数 + int page = query.getPage() != null ? query.getPage() : 1; + int limit = query.getLimit() != null ? query.getLimit() : 50; + int offset = (page - 1) * limit; + + // 查询数据 + List list = outboundNotificationReportMapper.searchOutboundNotificationReport( + query, userName, offset, limit); + + // 查询总数 + int total = outboundNotificationReportMapper.countOutboundNotificationReport(query, userName); + + // 构建分页结果 + return new PageUtils(list, total, limit, page); + } + + @Override + public List getAccessSiteList(String userName) { + return outboundNotificationReportMapper.getAccessSiteList(userName); + } +} diff --git a/src/main/resources/mapper/report/InboundNotificationReportMapper.xml b/src/main/resources/mapper/report/InboundNotificationReportMapper.xml new file mode 100644 index 0000000..5d4b7c2 --- /dev/null +++ b/src/main/resources/mapper/report/InboundNotificationReportMapper.xml @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + diff --git a/src/main/resources/mapper/report/OutboundNotificationReportMapper.xml b/src/main/resources/mapper/report/OutboundNotificationReportMapper.xml new file mode 100644 index 0000000..20d699e --- /dev/null +++ b/src/main/resources/mapper/report/OutboundNotificationReportMapper.xml @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + +