From 8b0fd88bf89c2a207d356d1e1a5bfc3a18f8f82f Mon Sep 17 00:00:00 2001 From: gongbaoxiong <751575283@qq.com> Date: Sat, 25 May 2024 23:04:50 +0800 Subject: [PATCH] =?UTF-8?q?add:=20=E5=A2=9E=E5=8A=A0=E6=94=B6=E8=B4=A7?= =?UTF-8?q?=E5=8D=95=E7=AD=89=E6=96=B0=E5=8A=9F=E8=83=BD=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/永裕家居LMS系统.postman_collection.json | 489 ------------------ .../common/annotation/dao/Allocationbill.java | 188 +++++++ .../annotation/dto/AllocationbillVO.java | 118 +++++ .../java/org/nl/common/base/CommonPage.java | 13 + .../controller/AllocationBillController.java | 122 +++++ .../controller/EasOutInBillController.java | 50 +- .../EasOutInBillDetailController.java | 11 +- .../eas/controller/ReceiptBillController.java | 122 +++++ .../wms/database/eas/dao/AllocationBill.java | 274 ++++++++++ .../nl/wms/database/eas/dao/ReceiptBill.java | 226 ++++++++ .../wms/database/eas/dao/WarehouseInfo.java | 52 ++ .../eas/dao/mapper/AllocationBillMapper.java | 24 + .../dao/mapper/EasOutInBillDetailMapper.java | 9 + .../eas/dao/mapper/EasOutInBillMapper.java | 44 +- .../eas/dao/mapper/ReceiptBillMapper.java | 19 + .../eas/dao/xml/AllocationBillMapper.xml | 29 ++ .../eas/dao/xml/EasOutInBillDetailMapper.xml | 73 +-- .../eas/dao/xml/EasOutInBillMapper.xml | 180 +++++-- .../eas/dao/xml/ReceiptBillMapper.xml | 29 ++ .../database/eas/dto/AllocationBillDto.java | 185 +++++++ .../database/eas/dto/AllocationBillQuery.java | 179 +++++++ .../database/eas/dto/AllocationBillVO.java | 179 +++++++ .../wms/database/eas/dto/ReceiptBillDto.java | 153 ++++++ .../database/eas/dto/ReceiptBillQuery.java | 182 +++++++ .../wms/database/eas/dto/ReceiptBillVO.java | 147 ++++++ .../eas/service/IallocationBillService.java | 70 +++ .../service/IeasOutInBillDetailService.java | 11 +- .../eas/service/IeasOutInBillService.java | 37 +- .../eas/service/IreceiptBillService.java | 69 +++ .../impl/AllocationBillServiceImpl.java | 147 ++++++ .../impl/EasOutInBillDetailServiceImpl.java | 18 +- .../service/impl/EasOutInBillServiceImpl.java | 42 ++ .../service/impl/ReceiptBillServiceImpl.java | 145 ++++++ 33 files changed, 3021 insertions(+), 615 deletions(-) delete mode 100644 doc/永裕家居LMS系统.postman_collection.json create mode 100644 nlsso-server/src/main/java/org/nl/common/annotation/dao/Allocationbill.java create mode 100644 nlsso-server/src/main/java/org/nl/common/annotation/dto/AllocationbillVO.java create mode 100644 nlsso-server/src/main/java/org/nl/wms/database/eas/controller/AllocationBillController.java create mode 100644 nlsso-server/src/main/java/org/nl/wms/database/eas/controller/ReceiptBillController.java create mode 100644 nlsso-server/src/main/java/org/nl/wms/database/eas/dao/AllocationBill.java create mode 100644 nlsso-server/src/main/java/org/nl/wms/database/eas/dao/ReceiptBill.java create mode 100644 nlsso-server/src/main/java/org/nl/wms/database/eas/dao/WarehouseInfo.java create mode 100644 nlsso-server/src/main/java/org/nl/wms/database/eas/dao/mapper/AllocationBillMapper.java create mode 100644 nlsso-server/src/main/java/org/nl/wms/database/eas/dao/mapper/ReceiptBillMapper.java create mode 100644 nlsso-server/src/main/java/org/nl/wms/database/eas/dao/xml/AllocationBillMapper.xml create mode 100644 nlsso-server/src/main/java/org/nl/wms/database/eas/dao/xml/ReceiptBillMapper.xml create mode 100644 nlsso-server/src/main/java/org/nl/wms/database/eas/dto/AllocationBillDto.java create mode 100644 nlsso-server/src/main/java/org/nl/wms/database/eas/dto/AllocationBillQuery.java create mode 100644 nlsso-server/src/main/java/org/nl/wms/database/eas/dto/AllocationBillVO.java create mode 100644 nlsso-server/src/main/java/org/nl/wms/database/eas/dto/ReceiptBillDto.java create mode 100644 nlsso-server/src/main/java/org/nl/wms/database/eas/dto/ReceiptBillQuery.java create mode 100644 nlsso-server/src/main/java/org/nl/wms/database/eas/dto/ReceiptBillVO.java create mode 100644 nlsso-server/src/main/java/org/nl/wms/database/eas/service/IallocationBillService.java create mode 100644 nlsso-server/src/main/java/org/nl/wms/database/eas/service/IreceiptBillService.java create mode 100644 nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/AllocationBillServiceImpl.java create mode 100644 nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/ReceiptBillServiceImpl.java diff --git a/doc/永裕家居LMS系统.postman_collection.json b/doc/永裕家居LMS系统.postman_collection.json deleted file mode 100644 index 99857f1..0000000 --- a/doc/永裕家居LMS系统.postman_collection.json +++ /dev/null @@ -1,489 +0,0 @@ -{ - "info": { - "_postman_id": "584232a7-9ae4-4ca2-b4e5-d9e66870957e", - "name": "永裕家居LMS系统", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" - }, - "item": [ - { - "name": "示例", - "description": "", - "item": [ - { - "name": "LMS登录", - "event": [ - { - "listen": "prerequest", - "script": { - "id": "56672d9d-9bac-4f23-b77e-809647ef5df4", - "type": "text/javascript", - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "id": "48d9e766-7014-4243-80de-81d63be07da5", - "type": "text/javascript", - "exec": [ - "//postman使用:https://blog.csdn.net/wangyiyan315/article/details/122441791", - "", - "var JsonData = JSON.parse(responseBody); //定义一个变量,并且将请求返回的内容赋给该变量", - "pm.globals.set(\"lms_token\", JsonData.token.slice(7)); //7代表去掉token前面的Bearer加空格", - "" - ] - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n\t\n\t\"username\":\"admin\",\n\t\"password\":\"uefvHbyUCADkudW1MV+/yw9XBWR2Z+KDyq+dqQ+ozr1loClUgqm4XQPsUl87IsXetYBWRDLo7HC++20VHlW80g==\"\n}" - }, - "url": { - "raw": "{{lms_url}}/mobile/auth/login", - "host": [ - "{{lms_url}}" - ], - "path": [ - "mobile", - "auth", - "login" - ] - }, - "description": "LMS登录并设置返回的token" - }, - "response": [] - }, - { - "name": "系统参数分页查询-示例", - "event": [ - { - "listen": "prerequest", - "script": { - "id": "4f07b550-ab9c-41a4-8dbf-f889ae50b246", - "type": "text/javascript", - "exec": [ - "" - ] - } - } - ], - "request": { - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{lms_token}}", - "type": "string" - } - ] - }, - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "/api/param" - }, - "url": { - "raw": "{{lms_url}}/api/param?sort=id,desc&size=10&page=0", - "host": [ - "{{lms_url}}" - ], - "path": [ - "api", - "param" - ], - "query": [ - { - "key": "sort", - "value": "id,desc" - }, - { - "key": "size", - "value": "10" - }, - { - "key": "page", - "value": "0" - }, - { - "key": null, - "value": null - }, - { - "key": null, - "value": null - } - ] - }, - "description": "求方法参数:{\"whereJson\":{\"sort\":\"id,desc\",\"size\":\"10\",\"page\":\"0\"}}" - }, - "response": [] - }, - { - "name": "根据编码获取值-示例", - "event": [ - { - "listen": "prerequest", - "script": { - "id": "4f07b550-ab9c-41a4-8dbf-f889ae50b246", - "type": "text/javascript", - "exec": [ - "" - ] - } - } - ], - "request": { - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{lms_token}}", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "IS_CONNECT_ACS" - }, - "url": { - "raw": "{{lms_url}}/api/param/getValueByCode", - "host": [ - "{{lms_url}}" - ], - "path": [ - "api", - "param", - "getValueByCode" - ] - }, - "description": "求方法参数:{\"whereJson\":{\"sort\":\"id,desc\",\"size\":\"10\",\"page\":\"0\"}}" - }, - "response": [] - }, - { - "name": "删除参数-示例", - "event": [ - { - "listen": "prerequest", - "script": { - "id": "4f07b550-ab9c-41a4-8dbf-f889ae50b246", - "type": "text/javascript", - "exec": [ - "" - ] - } - } - ], - "request": { - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{lms_token}}", - "type": "string" - } - ] - }, - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "[\"0c1d96d335cd4dd6aa0a4bee4b1c45fe\"]" - }, - "url": { - "raw": "{{lms_url}}/api/param", - "host": [ - "{{lms_url}}" - ], - "path": [ - "api", - "param" - ] - }, - "description": "求方法参数:{\"whereJson\":{\"sort\":\"id,desc\",\"size\":\"10\",\"page\":\"0\"}}" - }, - "response": [] - }, - { - "name": "新增参数-示例", - "event": [ - { - "listen": "prerequest", - "script": { - "id": "4f07b550-ab9c-41a4-8dbf-f889ae50b246", - "type": "text/javascript", - "exec": [ - "" - ] - } - } - ], - "request": { - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{lms_token}}", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\"code\":\"test22\",\"is_active\":\"1\",\"remark\":\"test11\",\"name\":\"test11\",\"value\":\"test11\"}" - }, - "url": { - "raw": "{{lms_url}}/api/param", - "host": [ - "{{lms_url}}" - ], - "path": [ - "api", - "param" - ] - }, - "description": "求方法参数:{\"whereJson\":{\"sort\":\"id,desc\",\"size\":\"10\",\"page\":\"0\"}}" - }, - "response": [] - }, - { - "name": "修改参数-示例", - "event": [ - { - "listen": "prerequest", - "script": { - "id": "4f07b550-ab9c-41a4-8dbf-f889ae50b246", - "type": "text/javascript", - "exec": [ - "" - ] - } - } - ], - "request": { - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{lms_token}}", - "type": "string" - } - ] - }, - "method": "PUT", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\"code\":\"test22\",\"is_active\":\"8\",\"create_time\":\"2022-10-14 13:33:52\",\"remark\":\"888\",\"update_time\":\"2022-10-14 13:33:52\",\"update_optname\":\"管理员\",\"create_id\":1,\"name\":\"888\",\"id\":\"3f1901b5814d40908bad602854b22aa6\",\"value\":\"8888\",\"update_id\":1,\"create_name\":\"管理员\"}" - }, - "url": { - "raw": "{{lms_url}}/api/param", - "host": [ - "{{lms_url}}" - ], - "path": [ - "api", - "param" - ] - }, - "description": "求方法参数:{\"whereJson\":{\"sort\":\"id,desc\",\"size\":\"10\",\"page\":\"0\"}}" - }, - "response": [] - } - ] - }, - { - "name": "ACS请求LMS", - "description": "", - "item": [ - { - "name": "共挤线申请空盘", - "event": [ - { - "listen": "prerequest", - "script": { - "id": "4f07b550-ab9c-41a4-8dbf-f889ae50b246", - "type": "text/javascript", - "exec": [ - "" - ] - } - } - ], - "request": { - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{lms_token}}", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\"type\":\"1\",\"point_code\":\"GJX01_K\",\"vehicle_code\":\"001\",\"qty\":\"100\",\"vehicle_type\":\"01\",\"vehicle_num\":\"1\"}" - }, - "url": { - "raw": "{{lms_url}}/api/wms/task/apply", - "host": [ - "{{lms_url}}" - ], - "path": [ - "api", - "wms", - "task", - "apply" - ] - }, - "description": "求方法参数:{\"whereJson\":{\"sort\":\"id,desc\",\"size\":\"10\",\"page\":\"0\"}}" - }, - "response": [] - }, - { - "name": "油漆线空盘入库", - "event": [ - { - "listen": "prerequest", - "script": { - "id": "4f07b550-ab9c-41a4-8dbf-f889ae50b246", - "type": "text/javascript", - "exec": [ - "" - ] - } - } - ], - "request": { - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{lms_token}}", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\"code\":\"test22\",\"is_active\":\"1\",\"remark\":\"test11\",\"name\":\"test11\",\"value\":\"test11\"}" - }, - "url": { - "raw": "{{lms_url}}/api/param", - "host": [ - "{{lms_url}}" - ], - "path": [ - "api", - "param" - ] - }, - "description": "求方法参数:{\"whereJson\":{\"sort\":\"id,desc\",\"size\":\"10\",\"page\":\"0\"}}" - }, - "response": [] - } - ] - } - ], - "event": [ - { - "listen": "prerequest", - "script": { - "id": "32f60779-6a66-4d77-80e3-1bc0040e7650", - "type": "text/javascript", - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "id": "fb339152-4984-49bb-8955-3e24baac67ae", - "type": "text/javascript", - "exec": [ - "" - ] - } - } - ], - "variable": [ - { - "id": "9b318f5e-373b-4f36-93a5-d131f4f76446", - "key": "lms_url", - "value": "http://localhost:8010", - "type": "string", - "description": "" - }, - { - "id": "5557e8ff-f6ac-45b0-a950-4a8c139d1ae0", - "key": "acs_url", - "value": "http://localhost:8010", - "type": "string", - "description": "" - } - ] -} \ No newline at end of file diff --git a/nlsso-server/src/main/java/org/nl/common/annotation/dao/Allocationbill.java b/nlsso-server/src/main/java/org/nl/common/annotation/dao/Allocationbill.java new file mode 100644 index 0000000..1b9c7b5 --- /dev/null +++ b/nlsso-server/src/main/java/org/nl/common/annotation/dao/Allocationbill.java @@ -0,0 +1,188 @@ +package org.nl.common.annotation.dao; +import java.io.Serializable; +import lombok.Data; +import lombok.EqualsAndHashCode; +import com.baomidou.mybatisplus.annotation.*; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.activerecord.Model; + + + + /** + * {@code @Description:} 库存调拨单表(Allocationbill)实体类 + * {@code @Author:} gbx + * @since 2024-05-23 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("allocationbill") +public class Allocationbill extends Model +{ + + private static final long serialVersionUID = -7739291296662381393L; + //@TableId(value = "id", type = IdType.NONE) + + + + + /** + * 单据编号 + */ + private String djbh; + + + /** + * 调出库存组织编码 + */ + private String dckcbm; + + + /** + * 调出库存组织名称 + */ + private String dckcmc; + + + /** + * 调入库存组织编码 + */ + private String drkcbm; + + + /** + * 调入库存组织名称 + */ + private String drkcmc; + + + /** + * 物料编码 + */ + private String wlbm; + + + /** + * 物料名称 + */ + private String wlmc; + + + /** + * 规格型号 + */ + private String ggxh; + + + /** + * 辅助属性 + */ + private String fzsx; + + + /** + * 计量单位 + */ + private String jldw; + + + /** + * 数量 + */ + private String sl; + + + /** + * 库存类型 + */ + private String kclx; + + + /** + * 库存状态 + */ + private String kczt; + + + /** + * 调出仓库编码 + */ + private String dcckbm; + + + /** + * 调出仓库名称 + */ + private String dcckmc; + + + /** + * 调出库位编码 + */ + private String dckwbm; + + + /** + * 调出库位名称 + */ + private String dckwmc; + + + /** + * 调入仓库编码 + */ + private String drckbm; + + + /** + * 调入仓库名称 + */ + private String drckmc; + + + /** + * 调入库位编码 + */ + private String drkwbm; + + + /** + * 调入库位名称 + */ + private String drkwmc; + + + /** + * 跟踪号 + */ + private String gzh; + + + /** + * 计划调入日期 + */ + private String jhdrrq; + + + /** + * 备注 + */ + private String bz; + + + + + /** + * 获取主键值 + * + * @return 主键值 + */ + @Override + protected Serializable pkVal() + { + return this.djbh; + } + +} + + + diff --git a/nlsso-server/src/main/java/org/nl/common/annotation/dto/AllocationbillVO.java b/nlsso-server/src/main/java/org/nl/common/annotation/dto/AllocationbillVO.java new file mode 100644 index 0000000..a1307aa --- /dev/null +++ b/nlsso-server/src/main/java/org/nl/common/annotation/dto/AllocationbillVO.java @@ -0,0 +1,118 @@ +package org.nl.common.annotation.dto; + + + +import lombok.Data; +import lombok.*; +import lombok.EqualsAndHashCode; +import org.nl.common.domain.query.BaseQuery; +import org.nl.common.annotation.dao.Allocationbill; + /** + * {@code @Description:} 库存调拨单表(Allocationbill)查询参数类 + * {@code @Author:} gbx + * @since 2024-05-23 + */ +@Data +@Builder +@ToString +@NoArgsConstructor +@AllArgsConstructor +@EqualsAndHashCode(callSuper = false) +public class AllocationbillVO extends BaseQuery { + /** + * 单据编号 + */ + private String djbh; + /** + * 调出库存组织编码 + */ + private String dckcbm; + /** + * 调出库存组织名称 + */ + private String dckcmc; + /** + * 调入库存组织编码 + */ + private String drkcbm; + /** + * 调入库存组织名称 + */ + private String drkcmc; + /** + * 物料编码 + */ + private String wlbm; + /** + * 物料名称 + */ + private String wlmc; + /** + * 规格型号 + */ + private String ggxh; + /** + * 辅助属性 + */ + private String fzsx; + /** + * 计量单位 + */ + private String jldw; + /** + * 数量 + */ + private String sl; + /** + * 库存类型 + */ + private String kclx; + /** + * 库存状态 + */ + private String kczt; + /** + * 调出仓库编码 + */ + private String dcckbm; + /** + * 调出仓库名称 + */ + private String dcckmc; + /** + * 调出库位编码 + */ + private String dckwbm; + /** + * 调出库位名称 + */ + private String dckwmc; + /** + * 调入仓库编码 + */ + private String drckbm; + /** + * 调入仓库名称 + */ + private String drckmc; + /** + * 调入库位编码 + */ + private String drkwbm; + /** + * 调入库位名称 + */ + private String drkwmc; + /** + * 跟踪号 + */ + private String gzh; + /** + * 计划调入日期 + */ + private String jhdrrq; + /** + * 备注 + */ + private String bz; + } diff --git a/nlsso-server/src/main/java/org/nl/common/base/CommonPage.java b/nlsso-server/src/main/java/org/nl/common/base/CommonPage.java index 9e0d969..167a6d6 100644 --- a/nlsso-server/src/main/java/org/nl/common/base/CommonPage.java +++ b/nlsso-server/src/main/java/org/nl/common/base/CommonPage.java @@ -69,4 +69,17 @@ public class CommonPage { return commonPage; } + public static CommonPage getPage(Page page,Long total) { + List list = page.getRecords(); + CommonPage commonPage = new CommonPage<>(); + commonPage.setPageNum(Convert.toInt(page.getCurrent())); + commonPage.setPageSize(Convert.toInt(page.getSize())); + commonPage.setTotalElements(total); + commonPage.setTotalPage(Convert.toInt(total/ page.getSize()+1)); + commonPage.setResult(list); + commonPage.setCode(1); + commonPage.setDesc("查询成功"); + return commonPage; + } + } diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/controller/AllocationBillController.java b/nlsso-server/src/main/java/org/nl/wms/database/eas/controller/AllocationBillController.java new file mode 100644 index 0000000..3a8cfa9 --- /dev/null +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/controller/AllocationBillController.java @@ -0,0 +1,122 @@ +package org.nl.wms.database.eas.controller; + +import java.util.List; +import java.util.Set; + +import cn.dev33.satoken.annotation.SaIgnore; +import org.nl.common.base.CommonPage; +import org.nl.common.base.CommonResult; +import org.nl.common.base.RestBusinessTemplate; +import org.nl.common.base.ResultCode; +import org.nl.wms.database.eas.dao.AllocationBill; +import org.springframework.web.bind.annotation.*; +import lombok.RequiredArgsConstructor; + +import javax.annotation.Resource; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.nl.common.logging.annotation.Log; +import org.nl.wms.database.eas.dto.AllocationBillVO; +import org.nl.wms.database.eas.service.IallocationBillService; + + +/** + * (AllocationBill)控制层 + */ +@RestController +@RequiredArgsConstructor +@RequestMapping("/api/allocationBill") +@Slf4j +public class AllocationBillController { + + + @Resource + private IallocationBillService allocationBillService; + + + /** + * 分页查询 + * + * @param params 传入分页条件或查询条件,例:{"page":"0","size":"10", "fuzzy":"熊一" } + */ + @PostMapping("/page") + @Log("分页查询") + public ResponseEntity> page(@RequestBody AllocationBillVO params) { + return new ResponseEntity<>(allocationBillService.page(params), HttpStatus.OK); + } + + + /** + * 条件查询 + * + * @param params 传入查询条件,例:{"fuzzy":"熊一" } + */ + @PostMapping("/query") + @Log("条件查询") + public CommonResult> query(@RequestBody AllocationBillVO params) { + return RestBusinessTemplate.execute(() -> allocationBillService.query(params)); + } + + /** + * 单据直接调拨 + * + * @param ids 传入审核对象主键,例:{"id":"1"} + * @return 单据直接调拨 + */ + @PostMapping("/allocationConfirm") + @Log("单据直接调拨") + @SaIgnore + //@SaCheckPermission("@el.check(allocationConfirm:edit')") + public CommonResult allocationConfirm(@RequestBody List ids) { + if (ids == null || ids.isEmpty()) { + return CommonResult.failed(ResultCode.FAILED); + } + return RestBusinessTemplate.execute(() -> allocationBillService.allocationConfirm(ids)); + } + + + /** + * 新增数据 + * + * @param entity 传入新增对象,例:{"name":"熊大", "age":"16" } + * @return 新增结果 + */ + @PostMapping("/create") + @Log("新增") + public CommonResult create(@RequestBody AllocationBillVO entity) { + return RestBusinessTemplate.execute(() -> allocationBillService.create(entity)); + } + + + /** + * 修改数据 + * + * @param entity 传入修改对象包含主键,例:{"id":"1", "name":"熊二" } + * @return 修改结果 + */ + @PostMapping("/update") + @Log("修改") + //@SaCheckPermission("@el.check(AllocationBill:edit')") + public CommonResult update(@RequestBody AllocationBillVO entity) { + return RestBusinessTemplate.execute(() -> allocationBillService.update(entity)); + } + + + /** + * 删除数据 + * + * @param ids 传入单个或多个主键Id,例:["1","2"] + * @return 删除结果 + */ + @Log("删除") + //@SaCheckPermission("@el.check(AllocationBill:del')") + @PostMapping("/delete") + public CommonResult delete(@RequestBody Set ids) { + return RestBusinessTemplate.execute(() -> allocationBillService.delete(ids)); + } + + +} + diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/controller/EasOutInBillController.java b/nlsso-server/src/main/java/org/nl/wms/database/eas/controller/EasOutInBillController.java index 2dd4272..f98ad5a 100644 --- a/nlsso-server/src/main/java/org/nl/wms/database/eas/controller/EasOutInBillController.java +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/controller/EasOutInBillController.java @@ -12,10 +12,10 @@ import org.nl.common.base.CommonResult; import org.nl.common.base.RestBusinessTemplate; import org.nl.common.base.ResultCode; import org.nl.common.websocket.SendHomeWebSocketServer; -import org.nl.wms.database.eas.dao.EasOutInBill; -import org.nl.wms.database.eas.dao.EasOutInBillDetail; -import org.nl.wms.database.eas.dao.HomeBillCounts; +import org.nl.wms.database.eas.dao.*; +import org.nl.wms.database.eas.dto.AllocationBillQuery; import org.nl.wms.database.eas.dto.EasOutInBillQuery; +import org.nl.wms.database.eas.dto.ReceiptBillQuery; import org.springframework.web.bind.annotation.*; import lombok.RequiredArgsConstructor; @@ -29,7 +29,7 @@ import org.nl.wms.database.eas.service.IeasOutInBillService; /** - * 诺力三期WMS出入库单据 + * 诺力三期WMS出入库新增功能 */ @RestController @RequiredArgsConstructor @@ -43,13 +43,13 @@ public class EasOutInBillController { private IeasOutInBillService easOutInBillService; /** - * 审核单据 + * 出入库单据审核 * * @param ids 传入审核对象主键,例:{"id":"1"} - * @return 审核单据 + * @return 出入库单据审核 */ @PostMapping("/audit") - @Log("审核") + @Log("出入库单据审核") @SaIgnore //@SaCheckPermission("@el.check(EasOutInBill:edit')") public CommonResult audit(@RequestBody List ids) { @@ -59,6 +59,8 @@ public class EasOutInBillController { return RestBusinessTemplate.execute(() -> easOutInBillService.audit(ids, true)); } + + /** * APP升级 * @@ -82,6 +84,30 @@ public class EasOutInBillController { } + /** + * 查询调拨单据 + * + * @param params 传入分页条件或查询条件,例:{"page":"0","size":"10", "fuzzy":"熊一" } + */ + @PostMapping("/allocationPage") + @Log("分页查询") + public ResponseEntity> allocationPage(@RequestBody AllocationBillQuery params) { + return new ResponseEntity<>(easOutInBillService.allocationPage(params), HttpStatus.OK); + } + + + /** + * 查询收货单据 + * + * @param params 传入分页条件或查询条件,例:{"page":"0","size":"10", "fuzzy":"熊一" } + */ + @PostMapping("/receiptPage") + @Log("分页查询") + public ResponseEntity> receiptPage(@RequestBody ReceiptBillQuery params) { + return new ResponseEntity<>(easOutInBillService.receiptPage(params), HttpStatus.OK); + } + + /** * 查询出入库单据 * @@ -104,6 +130,16 @@ public class EasOutInBillController { } + /** + * 获取仓库信息 + */ + @PostMapping("/getWarehouseInfo") + @Log("获取仓库信息") + public CommonResult> getWarehouseInfo() { + return RestBusinessTemplate.execute(() -> easOutInBillService.getWarehouseInfo()); + } + + /** * 条件查询 * diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/controller/EasOutInBillDetailController.java b/nlsso-server/src/main/java/org/nl/wms/database/eas/controller/EasOutInBillDetailController.java index b20c949..22ce711 100644 --- a/nlsso-server/src/main/java/org/nl/wms/database/eas/controller/EasOutInBillDetailController.java +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/controller/EasOutInBillDetailController.java @@ -6,8 +6,12 @@ import java.util.Set; import org.nl.common.base.CommonPage; import org.nl.common.base.CommonResult; import org.nl.common.base.RestBusinessTemplate; +import org.nl.wms.database.eas.dao.AllocationBill; import org.nl.wms.database.eas.dao.EasOutInBillDetail; -import org.nl.wms.database.eas.dao.InventoryInfo; + +import org.nl.wms.database.eas.dao.ReceiptBill; +import org.nl.wms.database.eas.dto.AllocationBillVO; +import org.nl.wms.database.eas.dto.ReceiptBillVO; import org.springframework.web.bind.annotation.*; import lombok.RequiredArgsConstructor; @@ -22,7 +26,7 @@ import org.nl.wms.database.eas.service.IeasOutInBillDetailService; /** - * (EasOutInBillDetail)控制层 + * 诺力三期WMS出入库新增功能 */ @RestController @RequiredArgsConstructor @@ -60,7 +64,7 @@ public class EasOutInBillDetailController { /** - * 分页查询 + * 出入库明细分页查询 * * @param params 传入分页条件或查询条件,例:{"page":"0","size":"10", "fuzzy":"熊一" } */ @@ -71,6 +75,7 @@ public class EasOutInBillDetailController { } + /** * 条件查询 * diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/controller/ReceiptBillController.java b/nlsso-server/src/main/java/org/nl/wms/database/eas/controller/ReceiptBillController.java new file mode 100644 index 0000000..5bd42f3 --- /dev/null +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/controller/ReceiptBillController.java @@ -0,0 +1,122 @@ +package org.nl.wms.database.eas.controller; + +import java.util.List; +import java.util.Set; + +import cn.dev33.satoken.annotation.SaIgnore; +import org.nl.common.base.CommonPage; +import org.nl.common.base.CommonResult; +import org.nl.common.base.RestBusinessTemplate; +import org.nl.common.base.ResultCode; +import org.nl.wms.database.eas.dao.ReceiptBill; +import org.springframework.web.bind.annotation.*; +import lombok.RequiredArgsConstructor; + +import javax.annotation.Resource; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.nl.common.logging.annotation.Log; +import org.nl.wms.database.eas.dto.ReceiptBillVO; +import org.nl.wms.database.eas.service.IreceiptBillService; + + +/** + * (ReceiptBill)控制层 + */ +@RestController +@RequiredArgsConstructor +@RequestMapping("/api/receiptBill") +@Slf4j +public class ReceiptBillController { + + + @Resource + private IreceiptBillService receiptBillService; + + + /** + * 分页查询 + * + * @param params 传入分页条件或查询条件,例:{"page":"0","size":"10", "fuzzy":"熊一" } + */ + @PostMapping("/page") + @Log("分页查询") + public ResponseEntity> page(@RequestBody ReceiptBillVO params) { + return new ResponseEntity<>(receiptBillService.page(params), HttpStatus.OK); + } + + + /** + * 条件查询 + * + * @param params 传入查询条件,例:{"fuzzy":"熊一" } + */ + @PostMapping("/query") + @Log("条件查询") + public CommonResult> query(@RequestBody ReceiptBillVO params) { + return RestBusinessTemplate.execute(() -> receiptBillService.query(params)); + } + + + /** + * 收货单确认 + * + * @param ids 传入审核对象主键,例:{"id":"1"} + * @return 收货单确认 + */ + @PostMapping("/receiptConfirm") + @Log("收货单确认") + @SaIgnore + //@SaCheckPermission("@el.check(receiptConfirm:edit')") + public CommonResult receiptConfirm(@RequestBody List ids) { + if (ids == null || ids.isEmpty()) { + return CommonResult.failed(ResultCode.FAILED); + } + return RestBusinessTemplate.execute(() -> receiptBillService.receiptConfirm(ids)); + } + + /** + * 新增数据 + * + * @param entity 传入新增对象,例:{"name":"熊大", "age":"16" } + * @return 新增结果 + */ + @PostMapping("/create") + @Log("新增") + public CommonResult create(@RequestBody ReceiptBillVO entity) { + return RestBusinessTemplate.execute(() -> receiptBillService.create(entity)); + } + + + /** + * 修改数据 + * + * @param entity 传入修改对象包含主键,例:{"id":"1", "name":"熊二" } + * @return 修改结果 + */ + @PostMapping("/update") + @Log("修改") + //@SaCheckPermission("@el.check(ReceiptBill:edit')") + public CommonResult update(@RequestBody ReceiptBillVO entity) { + return RestBusinessTemplate.execute(() -> receiptBillService.update(entity)); + } + + + /** + * 删除数据 + * + * @param ids 传入单个或多个主键Id,例:["1","2"] + * @return 删除结果 + */ + @Log("删除") + //@SaCheckPermission("@el.check(ReceiptBill:del')") + @PostMapping("/delete") + public CommonResult delete(@RequestBody Set ids) { + return RestBusinessTemplate.execute(() -> receiptBillService.delete(ids)); + } + + +} + diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/AllocationBill.java b/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/AllocationBill.java new file mode 100644 index 0000000..4ea0949 --- /dev/null +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/AllocationBill.java @@ -0,0 +1,274 @@ +package org.nl.wms.database.eas.dao; + +import java.io.Serializable; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import com.baomidou.mybatisplus.annotation.*; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.activerecord.Model; + + +/** + * {@code @Description:} (AllocationBill)实体类 + * {@code @Author:} gbx + * + * @since 2024-05-25 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("allocation_bill") +public class AllocationBill extends Model { + + private static final long serialVersionUID = -7739291296662381393L; + //@TableId(value = "id", type = IdType.NONE) + + + /** + * 单据ID + */ + private String djid; + + + /** + * 单据编号 + */ + private String djbh; + + + /** + * 业务类型 + */ + private String ywlx; + + + /** + * 业务日期 + */ + private String ywrq; + + + /** + * 调出库存组织编码 + */ + private String dckcbm; + + + /** + * 调出库存组织名称 + */ + private String dckcmc; + + + /** + * 调入库存组织编码 + */ + private String drkcbm; + + + /** + * 调入库存组织名称 + */ + private String drkcmc; + + + /** + * 调出部门 + */ + private String dcbm; + + + /** + * 调入部门 + */ + private String drbm; + + + /** + * 表头备注 + */ + private String btbz; + + + /** + * 制单时间 + */ + private String cjsj; + + + /** + * 创建人 + */ + private String cjr; + + + /** + * 单据状态 + */ + private String djzt; + + + /** + * 分录ID + */ + private String flid; + + + /** + * 分录序号 + */ + private String flxh; + + + /** + * 物料编码 + */ + private String wlbm; + + + /** + * 物料名称 + */ + private String wlmc; + + + /** + * 规格型号 + */ + private String ggxh; + + + /** + * 批次 + */ + private String pc; + + + /** + * 辅助属性 + */ + private String fzsx; + + + /** + * 计量单位 + */ + private String jldw; + + + /** + * 基本计量单位 + */ + private String jbjldw; + + + /** + * 数量 + */ + private String sl; + + + /** + * 基本数量 + */ + private String jbsl; + + + /** + * 库存类型 + */ + private String kclx; + + + /** + * 库存状态 + */ + private String kczt; + + + /** + * 调出仓库编码 + */ + private String dcckbm; + + + /** + * 调出仓库名称 + */ + private String dcckmc; + + + /** + * 调出库位编码 + */ + private String dckwbm; + + + /** + * 调出库位名称 + */ + private String dckwmc; + + + /** + * 调入仓库编码 + */ + private String drckbm; + + + /** + * 调入仓库名称 + */ + private String drckmc; + + + /** + * 调入库位编码 + */ + private String drkwbm; + + + /** + * 调入库位名称 + */ + private String drkwmc; + + + /** + * 跟踪号 + */ + private String gzh; + + + /** + * 计划调入日期 + */ + private String jhdrrq; + + + /** + * 计划调出日期 + */ + private String jhdcrq; + + + /** + * 分录备注 + */ + private String flbz; + + + /** + * 获取主键值 + * + * @return 主键值 + */ + @Override + protected Serializable pkVal() { + return this.djid; + } + +} + + + diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/ReceiptBill.java b/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/ReceiptBill.java new file mode 100644 index 0000000..5dc26c6 --- /dev/null +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/ReceiptBill.java @@ -0,0 +1,226 @@ +package org.nl.wms.database.eas.dao; + +import java.io.Serializable; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import com.baomidou.mybatisplus.annotation.*; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.activerecord.Model; + + +/** + * {@code @Description:} (ReceiptBill)实体类 + * {@code @Author:} gbx + * + * @since 2024-05-25 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("receipt_bill") +public class ReceiptBill extends Model { + + private static final long serialVersionUID = -7739291296662381393L; + //@TableId(value = "id", type = IdType.NONE) + + + /** + * 送货单号 + */ + private String djbh; + + + /** + * 送贷日期 + */ + private String ywrq; + + + /** + * 提交时间 + */ + private String tjsj; + + + /** + * 采购订单号 + */ + private String cgbh; + + + /** + * 采购公司 + */ + private String cggs; + + + /** + * 物料编码 + */ + private String wlbm; + + + /** + * 物科名称 + */ + private String wlmc; + + + /** + * 规格型号 + */ + private String ggxh; + + + /** + * 单位 + */ + private String jldw; + + + /** + * 订单量 + */ + private String ddsl; + + + /** + * 本次送货数量 + */ + private String bcshsl; + + + /** + * 收货数量 + */ + private String shsl; + + + /** + * 件数 + */ + private String num; + + + /** + * 收货组织 + */ + private String zzbm; + + + /** + * 收货仓库 + */ + private String zzmc; + + + /** + * 收货库位 + */ + private String shcw; + + + /** + * 是否质检 + */ + private String sfzj; + + + /** + * 批次管理 + */ + private String pcgl; + + + /** + * 批次 + */ + private String pc; + + + /** + * 所属厂区 + */ + private String sscq; + + + /** + * 供应商编码 + */ + private String gysbm; + + + /** + * 供应商 + */ + private String gys; + + + /** + * 到货日期 + */ + private String dhrq; + + + /** + * 创建入编码 + */ + private String cjr; + + + /** + * 创建日期 + */ + private String cjrq; + + + /** + * 采购员 + */ + private String cgy; + + + /** + * 送货人 + */ + private String shy; + + + /** + * 收货人 + */ + private String shr; + + + /** + * 预计到货日期 + */ + private String yjdhrq; + + + /** + * 收货地址 + */ + private String shdz; + + + /** + * 包装类别 + */ + private String bzlb; + + + /** + * 获取主键值 + * + * @return 主键值 + */ + @Override + protected Serializable pkVal() { + return this.djbh; + } + +} + + + diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/WarehouseInfo.java b/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/WarehouseInfo.java new file mode 100644 index 0000000..9b19109 --- /dev/null +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/WarehouseInfo.java @@ -0,0 +1,52 @@ +package org.nl.wms.database.eas.dao; + +import lombok.Data; +import lombok.ToString; + +import java.io.Serializable; + +/** + * 仓库信息 + * + * @author gbx + * @since 2024-05-22 + */ +@Data +@ToString +public class WarehouseInfo implements Serializable { + + /** + * 仓库编码 + */ + private String ckbm; + + /** + * 仓库名称 + */ + private String ckmc; + + /** + * 组织编码 + */ + private String kcbm; + + + /** + * 组织名称 + */ + private String kcmc; + + /** + * 状态 + */ + private String zt; + + + /** + * 是否对接WMS + */ + private String iswms; + + + +} diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/mapper/AllocationBillMapper.java b/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/mapper/AllocationBillMapper.java new file mode 100644 index 0000000..ef24282 --- /dev/null +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/mapper/AllocationBillMapper.java @@ -0,0 +1,24 @@ +package org.nl.wms.database.eas.dao.mapper; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.lettuce.core.dynamic.annotation.Param; +import org.apache.ibatis.annotations.Select; +import org.nl.wms.database.eas.dao.AllocationBill; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * {@code @Description:} (AllocationBill)数据持久层 + * {@code @Author:} gbx + * + * @since 2024-05-25 + */ +public interface AllocationBillMapper extends BaseMapper { + + @Select("SELECT COUNT(*) FROM EAS_NOBLE.receiptBill WHERE DJBH = #{djbh}") + @DS("oracle_eas") + Long getTotalCount(@Param("djbh") String djbh); + + Page allocationDetailPage(Page page, @Param("djbh") String djbh, @Param("fuzzy") String fuzzy); + +} diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/mapper/EasOutInBillDetailMapper.java b/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/mapper/EasOutInBillDetailMapper.java index 09ac44b..8704eea 100644 --- a/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/mapper/EasOutInBillDetailMapper.java +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/mapper/EasOutInBillDetailMapper.java @@ -1,8 +1,13 @@ package org.nl.wms.database.eas.dao.mapper; + import com.baomidou.dynamic.datasource.annotation.DS; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import io.lettuce.core.dynamic.annotation.Param; +import org.apache.ibatis.annotations.Select; +import org.nl.wms.database.eas.dao.AllocationBill; import org.nl.wms.database.eas.dao.EasOutInBillDetail; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.nl.wms.database.eas.dao.ReceiptBill; import org.nl.wms.database.eas.dto.EasBillDetailDto; import org.nl.wms.database.eas.dto.EasOutInBillDetailDto; import org.nl.wms.database.eas.dao.InventoryInfo; @@ -38,14 +43,18 @@ public interface EasOutInBillDetailMapper extends BaseMapper @DS("oracle_eas") List selectPageWithInventory(); + @DS("oracle_eas") List selectEasIds(); + @DS("mysql_srm") List selectSrmIds(); @DS("mysql_srm") List selectSrmPageWithInventory(); + + void deleteInfo(@Param("days") String days); void deleteDetail(@Param("ids") Set ids); diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/mapper/EasOutInBillMapper.java b/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/mapper/EasOutInBillMapper.java index e20ed23..cf32cb3 100644 --- a/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/mapper/EasOutInBillMapper.java +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/mapper/EasOutInBillMapper.java @@ -1,11 +1,14 @@ package org.nl.wms.database.eas.dao.mapper; + import com.baomidou.dynamic.datasource.annotation.DS; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import io.lettuce.core.dynamic.annotation.Param; -import org.nl.wms.database.eas.dao.EasOutInBill; +import org.apache.ibatis.annotations.Select; +import org.nl.wms.database.eas.dao.*; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.nl.wms.database.eas.dao.EasOutInBillDetail; -import org.nl.wms.database.eas.dao.HomeBillCounts; +import org.nl.wms.database.eas.dto.AllocationBillQuery; import org.nl.wms.database.eas.dto.EasOutInBillDto; +import org.nl.wms.database.eas.dto.ReceiptBillQuery; import java.util.List; import java.util.Set; @@ -18,23 +21,38 @@ import java.util.Set; */ public interface EasOutInBillMapper extends BaseMapper { - @DS("oracle_eas") - List getEasBills(); + @DS("oracle_eas") + List getEasBills(); + + + @DS("mysql_srm") + List getSrmBills(); + + //AND STR_TO_DATE( cjsj, '%Y-%m-%d' ) >= CURDATE() - INTERVAL 1 MONTH; + List queryExistBills(); + + List queryLocalBills(); + - @DS("mysql_srm") - List getSrmBills(); + List queryBillList(@Param("ids") List ids); - //AND STR_TO_DATE( cjsj, '%Y-%m-%d' ) >= CURDATE() - INTERVAL 1 MONTH; - List queryExistBills(); - List queryLocalBills(); + List getBillsCount(); + void insertBatch(List entities); - List queryBillList(@Param("ids") List ids); + @Select("SELECT * FROM EAS_NOBLE.V_UC_WAREHOUSEINFO WHERE ZT ='1'") + @DS("oracle_eas") + List getWarehouseInfo(); - List getBillsCount(); + @Select("SELECT COUNT(*) FROM receiptBill") + @DS("oracle_eas") + Long getTotalCount(); - void insertBatch(List entities); + @DS("oracle_eas") + Page allocationPage(Page page, @Param("fuzzy") String fuzzy); + @DS("mysql_srm") + Page receiptPage(Page page, @Param("fuzzy") String fuzzy); } diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/mapper/ReceiptBillMapper.java b/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/mapper/ReceiptBillMapper.java new file mode 100644 index 0000000..2ed6057 --- /dev/null +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/mapper/ReceiptBillMapper.java @@ -0,0 +1,19 @@ +package org.nl.wms.database.eas.dao.mapper; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.lettuce.core.dynamic.annotation.Param; +import org.nl.wms.database.eas.dao.ReceiptBill; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * {@code @Description:} (ReceiptBill)数据持久层 + * {@code @Author:} gbx + * + * @since 2024-05-25 + */ +public interface ReceiptBillMapper extends BaseMapper { + + @DS("mysql_srm") + Page receiptDetailPage(Page page, @Param("djbh") String djbh, @Param("fuzzy") String fuzzy); +} diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/xml/AllocationBillMapper.xml b/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/xml/AllocationBillMapper.xml new file mode 100644 index 0000000..8d944ae --- /dev/null +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/xml/AllocationBillMapper.xml @@ -0,0 +1,29 @@ + + + + + diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/xml/EasOutInBillDetailMapper.xml b/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/xml/EasOutInBillDetailMapper.xml index 802cf89..edfa6bf 100644 --- a/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/xml/EasOutInBillDetailMapper.xml +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/xml/EasOutInBillDetailMapper.xml @@ -2,38 +2,33 @@ - DELETE FROM eas_out_in_bill WHERE cjsj < #{days} + DELETE + FROM eas_out_in_bill + WHERE cjsj < #{days} - DELETE FROM eas_out_in_bill_detail @@ -102,23 +98,23 @@ - insert into eas_out_in_bill_detail(id,djid, djlx, ywlx, djbh, zzbm, zzmc, btbz, djzt, cjsj, ywrq, cjr, flid, flxh, - wlbm, wlmc, ggxh, pc, jldw, jbjldw, fzjldw, sl, jbsl, fzsl, ckbm, ckmc, kwbm, kwmc, flbz, sysl, code, cksj, llr,tjkwbm,tjkwmc,kcsl,djly,trackno,update_id,update_name,update_time,czsl,bmbm,bmmc) + insert into eas_out_in_bill_detail(id,djid, djlx, ywlx, djbh, zzbm, zzmc, btbz, djzt, cjsj, ywrq, cjr, flid, + flxh, + wlbm, wlmc, ggxh, pc, jldw, jbjldw, fzjldw, sl, jbsl, fzsl, ckbm, ckmc, kwbm, kwmc, flbz, sysl, code, cksj, + llr,tjkwbm,tjkwmc,kcsl,djly,trackno,update_id,update_name,update_time,czsl,bmbm,bmmc) values - (#{entity.id},#{entity.djid}, #{entity.djlx}, #{entity.ywlx}, #{entity.djbh}, #{entity.zzbm}, #{entity.zzmc}, + (#{entity.id},#{entity.djid}, #{entity.djlx}, #{entity.ywlx}, #{entity.djbh}, #{entity.zzbm}, + #{entity.zzmc}, #{entity.btbz}, #{entity.djzt}, #{entity.cjsj}, #{entity.ywrq}, #{entity.cjr}, #{entity.flid}, #{entity.flxh}, #{entity.wlbm}, #{entity.wlmc}, #{entity.ggxh}, #{entity.pc}, #{entity.jldw}, #{entity.jbjldw}, #{entity.fzjldw}, #{entity.sl}, #{entity.jbsl}, #{entity.fzsl}, #{entity.ckbm}, #{entity.ckmc}, #{entity.kwbm}, #{entity.kwmc}, #{entity.flbz}, #{entity.sysl}, #{entity.code}, - #{entity.cksj}, #{entity.llr}, #{entity.tjkwbm}, #{entity.tjkwmc}, #{entity.kcsl}, #{entity.djly}, #{entity.trackno}, #{entity.update_id}, #{entity.update_name}, #{entity.update_time}, #{entity.czsl}, #{entity.bmbm}, #{entity.bmmc}) + #{entity.cksj}, #{entity.llr}, #{entity.tjkwbm}, #{entity.tjkwmc}, #{entity.kcsl}, #{entity.djly}, + #{entity.trackno}, #{entity.update_id}, #{entity.update_name}, #{entity.update_time}, #{entity.czsl}, + #{entity.bmbm}, #{entity.bmmc}) diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/xml/EasOutInBillMapper.xml b/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/xml/EasOutInBillMapper.xml index 96476cb..36638a8 100644 --- a/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/xml/EasOutInBillMapper.xml +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/xml/EasOutInBillMapper.xml @@ -6,17 +6,85 @@ + + + + + + + SELECT * FROM EAS_NOBLE.V_UC_OUTINBILL - WHERE - djzt = '提交' + WHERE djzt = '提交' - - + + + insert into eas_out_in_bill(id,djid, djbh,djlx, ywlx, zzbm, zzmc, ckmc, ckbm, djzt, cjsj, ywrq, cjr, btbz, cksj, llr,djly,update_id,update_name,update_time,bmbm,bmmc) @@ -91,7 +164,8 @@ ( #{entity.id},#{entity.djid}, #{entity.djbh},#{entity.djlx}, #{entity.ywlx}, #{entity.zzbm}, #{entity.zzmc}, #{entity.ckmc}, #{entity.ckbm}, #{entity.djzt}, #{entity.cjsj}, #{entity.ywrq}, - #{entity.cjr}, #{entity.btbz}, #{entity.cksj}, #{entity.llr}, #{entity.djly}, #{entity.update_id}, #{entity.update_name}, #{entity.update_time}, #{entity.bmbm}, #{entity.bmmc}) + #{entity.cjr}, #{entity.btbz}, #{entity.cksj}, #{entity.llr}, #{entity.djly}, #{entity.update_id}, + #{entity.update_name}, #{entity.update_time}, #{entity.bmbm}, #{entity.bmmc}) diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/xml/ReceiptBillMapper.xml b/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/xml/ReceiptBillMapper.xml new file mode 100644 index 0000000..cf53ac3 --- /dev/null +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/xml/ReceiptBillMapper.xml @@ -0,0 +1,29 @@ + + + + + diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/dto/AllocationBillDto.java b/nlsso-server/src/main/java/org/nl/wms/database/eas/dto/AllocationBillDto.java new file mode 100644 index 0000000..92deabe --- /dev/null +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/dto/AllocationBillDto.java @@ -0,0 +1,185 @@ +package org.nl.wms.database.eas.dto; + +import java.io.Serializable; + +import lombok.*; +import lombok.Data; +import lombok.Builder; + + +/** + * {@code @Description:} (AllocationBill)数据传输类 + * {@code @Author:} gbx + * + * @since 2024-05-25 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class AllocationBillDto implements Serializable { + + private static final long serialVersionUID = -7739291296662381396L; + + + /** + * 单据ID + */ + private String djid; + /** + * 单据编号 + */ + private String djbh; + /** + * 业务类型 + */ + private String ywlx; + /** + * 业务日期 + */ + private String ywrq; + /** + * 调出库存组织编码 + */ + private String dckcbm; + /** + * 调出库存组织名称 + */ + private String dckcmc; + /** + * 调入库存组织编码 + */ + private String drkcbm; + /** + * 调入库存组织名称 + */ + private String drkcmc; + /** + * 调出部门 + */ + private String dcbm; + /** + * 调入部门 + */ + private String drbm; + /** + * 表头备注 + */ + private String btbz; + /** + * 制单时间 + */ + private String cjsj; + /** + * 创建人 + */ + private String cjr; + /** + * 单据状态 + */ + private String djzt; + /** + * 分录ID + */ + private String flid; + /** + * 分录序号 + */ + private String flxh; + /** + * 物料编码 + */ + private String wlbm; + /** + * 物料名称 + */ + private String wlmc; + /** + * 规格型号 + */ + private String ggxh; + /** + * 批次 + */ + private String pc; + /** + * 辅助属性 + */ + private String fzsx; + /** + * 计量单位 + */ + private String jldw; + /** + * 基本计量单位 + */ + private String jbjldw; + /** + * 数量 + */ + private String sl; + /** + * 基本数量 + */ + private String jbsl; + /** + * 库存类型 + */ + private String kclx; + /** + * 库存状态 + */ + private String kczt; + /** + * 调出仓库编码 + */ + private String dcckbm; + /** + * 调出仓库名称 + */ + private String dcckmc; + /** + * 调出库位编码 + */ + private String dckwbm; + /** + * 调出库位名称 + */ + private String dckwmc; + /** + * 调入仓库编码 + */ + private String drckbm; + /** + * 调入仓库名称 + */ + private String drckmc; + /** + * 调入库位编码 + */ + private String drkwbm; + /** + * 调入库位名称 + */ + private String drkwmc; + /** + * 跟踪号 + */ + private String gzh; + /** + * 计划调入日期 + */ + private String jhdrrq; + /** + * 计划调出日期 + */ + private String jhdcrq; + /** + * 分录备注 + */ + private String flbz; + +} + + + diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/dto/AllocationBillQuery.java b/nlsso-server/src/main/java/org/nl/wms/database/eas/dto/AllocationBillQuery.java new file mode 100644 index 0000000..892e1d4 --- /dev/null +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/dto/AllocationBillQuery.java @@ -0,0 +1,179 @@ +package org.nl.wms.database.eas.dto; +import lombok.*; +import org.nl.common.domain.query.BaseQuery; + +/** + * {@code @Description:} 送货单表(allocationBill)查询参数类 + * {@code @Author:} gbx + * @since 2024-02-21 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class AllocationBillQuery extends BaseQuery { + + + + /** + * 单据ID + */ + private String djid; + /** + * 单据编号 + */ + private String djbh; + /** + * 业务类型 + */ + private String ywlx; + /** + * 业务日期 + */ + private String ywrq; + /** + * 调出库存组织编码 + */ + private String dckcbm; + /** + * 调出库存组织名称 + */ + private String dckcmc; + /** + * 调入库存组织编码 + */ + private String drkcbm; + /** + * 调入库存组织名称 + */ + private String drkcmc; + /** + * 调出部门 + */ + private String dcbm; + /** + * 调入部门 + */ + private String drbm; + /** + * 表头备注 + */ + private String btbz; + /** + * 制单时间 + */ + private String cjsj; + /** + * 创建人 + */ + private String cjr; + /** + * 单据状态 + */ + private String djzt; + /** + * 分录ID + */ + private String flid; + /** + * 分录序号 + */ + private String flxh; + /** + * 物料编码 + */ + private String wlbm; + /** + * 物料名称 + */ + private String wlmc; + /** + * 规格型号 + */ + private String ggxh; + /** + * 批次 + */ + private String pc; + /** + * 辅助属性 + */ + private String fzsx; + /** + * 计量单位 + */ + private String jldw; + /** + * 基本计量单位 + */ + private String jbjldw; + /** + * 数量 + */ + private String sl; + /** + * 基本数量 + */ + private String jbsl; + /** + * 库存类型 + */ + private String kclx; + /** + * 库存状态 + */ + private String kczt; + /** + * 调出仓库编码 + */ + private String dcckbm; + /** + * 调出仓库名称 + */ + private String dcckmc; + /** + * 调出库位编码 + */ + private String dckwbm; + /** + * 调出库位名称 + */ + private String dckwmc; + /** + * 调入仓库编码 + */ + private String drckbm; + /** + * 调入仓库名称 + */ + private String drckmc; + /** + * 调入库位编码 + */ + private String drkwbm; + /** + * 调入库位名称 + */ + private String drkwmc; + /** + * 跟踪号 + */ + private String gzh; + /** + * 计划调入日期 + */ + private String jhdrrq; + /** + * 计划调出日期 + */ + private String jhdcrq; + /** + * 分录备注 + */ + private String flbz; + + + + +} diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/dto/AllocationBillVO.java b/nlsso-server/src/main/java/org/nl/wms/database/eas/dto/AllocationBillVO.java new file mode 100644 index 0000000..ce650ff --- /dev/null +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/dto/AllocationBillVO.java @@ -0,0 +1,179 @@ +package org.nl.wms.database.eas.dto; + + +import lombok.Data; +import lombok.*; +import lombok.EqualsAndHashCode; +import org.nl.common.domain.query.BaseQuery; +import org.nl.wms.database.eas.dao.AllocationBill; + +/** + * {@code @Description:} (AllocationBill)查询参数类 + * {@code @Author:} gbx + * + * @since 2024-05-25 + */ +@Data +@Builder +@ToString +@NoArgsConstructor +@AllArgsConstructor +@EqualsAndHashCode(callSuper = false) +public class AllocationBillVO extends BaseQuery { + /** + * 单据ID + */ + private String djid; + /** + * 单据编号 + */ + private String djbh; + /** + * 业务类型 + */ + private String ywlx; + /** + * 业务日期 + */ + private String ywrq; + /** + * 调出库存组织编码 + */ + private String dckcbm; + /** + * 调出库存组织名称 + */ + private String dckcmc; + /** + * 调入库存组织编码 + */ + private String drkcbm; + /** + * 调入库存组织名称 + */ + private String drkcmc; + /** + * 调出部门 + */ + private String dcbm; + /** + * 调入部门 + */ + private String drbm; + /** + * 表头备注 + */ + private String btbz; + /** + * 制单时间 + */ + private String cjsj; + /** + * 创建人 + */ + private String cjr; + /** + * 单据状态 + */ + private String djzt; + /** + * 分录ID + */ + private String flid; + /** + * 分录序号 + */ + private String flxh; + /** + * 物料编码 + */ + private String wlbm; + /** + * 物料名称 + */ + private String wlmc; + /** + * 规格型号 + */ + private String ggxh; + /** + * 批次 + */ + private String pc; + /** + * 辅助属性 + */ + private String fzsx; + /** + * 计量单位 + */ + private String jldw; + /** + * 基本计量单位 + */ + private String jbjldw; + /** + * 数量 + */ + private String sl; + /** + * 基本数量 + */ + private String jbsl; + /** + * 库存类型 + */ + private String kclx; + /** + * 库存状态 + */ + private String kczt; + /** + * 调出仓库编码 + */ + private String dcckbm; + /** + * 调出仓库名称 + */ + private String dcckmc; + /** + * 调出库位编码 + */ + private String dckwbm; + /** + * 调出库位名称 + */ + private String dckwmc; + /** + * 调入仓库编码 + */ + private String drckbm; + /** + * 调入仓库名称 + */ + private String drckmc; + /** + * 调入库位编码 + */ + private String drkwbm; + /** + * 调入库位名称 + */ + private String drkwmc; + /** + * 跟踪号 + */ + private String gzh; + /** + * 计划调入日期 + */ + private String jhdrrq; + /** + * 计划调出日期 + */ + private String jhdcrq; + /** + * 分录备注 + */ + private String flbz; +} diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/dto/ReceiptBillDto.java b/nlsso-server/src/main/java/org/nl/wms/database/eas/dto/ReceiptBillDto.java new file mode 100644 index 0000000..2b7d260 --- /dev/null +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/dto/ReceiptBillDto.java @@ -0,0 +1,153 @@ +package org.nl.wms.database.eas.dto; + +import java.io.Serializable; + +import lombok.*; +import lombok.Data; +import lombok.Builder; + + +/** + * {@code @Description:} (ReceiptBill)数据传输类 + * {@code @Author:} gbx + * + * @since 2024-05-25 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ReceiptBillDto implements Serializable { + + private static final long serialVersionUID = -7739291296662381396L; + + + /** + * 送货单号 + */ + private String djbh; + /** + * 送贷日期 + */ + private String ywrq; + /** + * 提交时间 + */ + private String tjsj; + /** + * 采购订单号 + */ + private String cgbh; + /** + * 采购公司 + */ + private String cggs; + /** + * 物料编码 + */ + private String wlbm; + /** + * 物科名称 + */ + private String wlmc; + /** + * 规格型号 + */ + private String ggxh; + /** + * 单位 + */ + private String jldw; + /** + * 订单量 + */ + private String ddsl; + /** + * 本次送货数量 + */ + private String bcshsl; + /** + * 收货数量 + */ + private String shsl; + /** + * 件数 + */ + private String num; + /** + * 收货组织 + */ + private String zzbm; + /** + * 收货仓库 + */ + private String zzmc; + /** + * 收货库位 + */ + private String shcw; + /** + * 是否质检 + */ + private String sfzj; + /** + * 批次管理 + */ + private String pcgl; + /** + * 批次 + */ + private String pc; + /** + * 所属厂区 + */ + private String sscq; + /** + * 供应商编码 + */ + private String gysbm; + /** + * 供应商 + */ + private String gys; + /** + * 到货日期 + */ + private String dhrq; + /** + * 创建入编码 + */ + private String cjr; + /** + * 创建日期 + */ + private String cjrq; + /** + * 采购员 + */ + private String cgy; + /** + * 送货人 + */ + private String shy; + /** + * 收货人 + */ + private String shr; + /** + * 预计到货日期 + */ + private String yjdhrq; + /** + * 收货地址 + */ + private String shdz; + /** + * 包装类别 + */ + private String bzlb; + +} + + + diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/dto/ReceiptBillQuery.java b/nlsso-server/src/main/java/org/nl/wms/database/eas/dto/ReceiptBillQuery.java new file mode 100644 index 0000000..fc7fd7d --- /dev/null +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/dto/ReceiptBillQuery.java @@ -0,0 +1,182 @@ +package org.nl.wms.database.eas.dto; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.*; +import org.nl.common.domain.query.BaseQuery; +/** + * {@code @Description:} (ReceiptBill)查询参数类 + * {@code @Author:} gbx + * @since 2024-05-21 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class ReceiptBillQuery extends BaseQuery { + + + + private static final long serialVersionUID = 1L; + + /** + * 送货单号 + */ + @TableId(value = "djbh", type = IdType.NONE) + private String djbh; + + /** + * 送贷日期 + */ + private String ywrq; + + /** + * 提交时间 + */ + private String tjsj; + + /** + * 采购订单号 + */ + private String cgbh; + + /** + * 采购公司 + */ + private String cggs; + + /** + * 物料编码 + */ + private String wlbm; + + /** + * 物科名称 + */ + private String wlmc; + + /** + * 规格型号 + */ + private String ggxh; + + /** + * 单位 + */ + private String jldw; + + /** + * 订单量 + */ + private String ddsl; + + /** + * 本次送货数量 + */ + private String bcshsl; + + /** + * 收货数量 + */ + private String shsl; + + /** + * 件数 + */ + private String num; + + /** + * 收货组织 + */ + private String zzbm; + + /** + * 收货仓库 + */ + private String zzmc; + + /** + * 收货库位 + */ + private String shcw; + + /** + * 是否质检 + */ + private String sfzj; + + /** + * 批次管理 + */ + private String pcgl; + + /** + * 批次 + */ + private String pc; + + /** + * 所属厂区 + */ + private String sscq; + + /** + * 供应商编码 + */ + private String gysbm; + + /** + * 供应商 + */ + private String gys; + + /** + * 到货日期 + */ + private String dhrq; + + /** + * 创建入编码 + */ + private String cjr; + + /** + * 创建日期 + */ + private String cjrq; + + /** + * 采购员 + */ + private String cgy; + + /** + * 送货人 + */ + private String shy; + + /** + * 收货人 + */ + private String shr; + + /** + * 预计到货日期 + */ + private String yjdhrq; + + /** + * 收货地址 + */ + private String shdz; + + /** + * 包装类别 + */ + private String bzlb; + + + + +} diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/dto/ReceiptBillVO.java b/nlsso-server/src/main/java/org/nl/wms/database/eas/dto/ReceiptBillVO.java new file mode 100644 index 0000000..d413a92 --- /dev/null +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/dto/ReceiptBillVO.java @@ -0,0 +1,147 @@ +package org.nl.wms.database.eas.dto; + + +import lombok.Data; +import lombok.*; +import lombok.EqualsAndHashCode; +import org.nl.common.domain.query.BaseQuery; +import org.nl.wms.database.eas.dao.ReceiptBill; + +/** + * {@code @Description:} (ReceiptBill)查询参数类 + * {@code @Author:} gbx + * + * @since 2024-05-25 + */ +@Data +@Builder +@ToString +@NoArgsConstructor +@AllArgsConstructor +@EqualsAndHashCode(callSuper = false) +public class ReceiptBillVO extends BaseQuery { + /** + * 送货单号 + */ + private String djbh; + /** + * 送贷日期 + */ + private String ywrq; + /** + * 提交时间 + */ + private String tjsj; + /** + * 采购订单号 + */ + private String cgbh; + /** + * 采购公司 + */ + private String cggs; + /** + * 物料编码 + */ + private String wlbm; + /** + * 物科名称 + */ + private String wlmc; + /** + * 规格型号 + */ + private String ggxh; + /** + * 单位 + */ + private String jldw; + /** + * 订单量 + */ + private String ddsl; + /** + * 本次送货数量 + */ + private String bcshsl; + /** + * 收货数量 + */ + private String shsl; + /** + * 件数 + */ + private String num; + /** + * 收货组织 + */ + private String zzbm; + /** + * 收货仓库 + */ + private String zzmc; + /** + * 收货库位 + */ + private String shcw; + /** + * 是否质检 + */ + private String sfzj; + /** + * 批次管理 + */ + private String pcgl; + /** + * 批次 + */ + private String pc; + /** + * 所属厂区 + */ + private String sscq; + /** + * 供应商编码 + */ + private String gysbm; + /** + * 供应商 + */ + private String gys; + /** + * 到货日期 + */ + private String dhrq; + /** + * 创建入编码 + */ + private String cjr; + /** + * 创建日期 + */ + private String cjrq; + /** + * 采购员 + */ + private String cgy; + /** + * 送货人 + */ + private String shy; + /** + * 收货人 + */ + private String shr; + /** + * 预计到货日期 + */ + private String yjdhrq; + /** + * 收货地址 + */ + private String shdz; + /** + * 包装类别 + */ + private String bzlb; +} diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/service/IallocationBillService.java b/nlsso-server/src/main/java/org/nl/wms/database/eas/service/IallocationBillService.java new file mode 100644 index 0000000..e4b1316 --- /dev/null +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/service/IallocationBillService.java @@ -0,0 +1,70 @@ +package org.nl.wms.database.eas.service; + +import org.nl.common.base.CommonPage; +import org.nl.wms.database.eas.dao.AllocationBill; +import com.baomidou.mybatisplus.extension.service.IService; +import org.nl.wms.database.eas.dto.AllocationBillVO; + +import java.util.List; +import java.util.Set; + + +/** + * {@code @Description:} (AllocationBill)服务接口层 + * {@code @Author:} gbx + * + * @since 2024-05-25 + */ +public interface IallocationBillService extends IService { + + + /** + * 分页查询 + * + * @param params 查询条件 + * @return CommonPage + */ + CommonPage page(AllocationBillVO params); + + /** + * 条件查询 + * + * @param params 查询条件 + * @return List + */ + List query(AllocationBillVO params); + + + /** + * 单据直接调拨 + * + * @param ids / + */ + void allocationConfirm(List ids); + + /** + * 创建 + * + * @param entity / + */ + void create(AllocationBillVO entity); + + + /** + * 编辑 + * + * @param entity / + */ + void update(AllocationBillVO entity); + + /** + * 多选删除 + * + * @param ids / + */ + void delete(Set ids); + + +} + + diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/service/IeasOutInBillDetailService.java b/nlsso-server/src/main/java/org/nl/wms/database/eas/service/IeasOutInBillDetailService.java index 718e62c..095f34a 100644 --- a/nlsso-server/src/main/java/org/nl/wms/database/eas/service/IeasOutInBillDetailService.java +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/service/IeasOutInBillDetailService.java @@ -1,10 +1,14 @@ package org.nl.wms.database.eas.service; import org.nl.common.base.CommonPage; +import org.nl.wms.database.eas.dao.AllocationBill; import org.nl.wms.database.eas.dao.InventoryInfo; import org.nl.wms.database.eas.dao.EasOutInBillDetail; import com.baomidou.mybatisplus.extension.service.IService; +import org.nl.wms.database.eas.dao.ReceiptBill; +import org.nl.wms.database.eas.dto.AllocationBillVO; import org.nl.wms.database.eas.dto.EasOutInBillDetailVO; +import org.nl.wms.database.eas.dto.ReceiptBillVO; import java.util.List; import java.util.Set; @@ -27,14 +31,14 @@ public interface IeasOutInBillDetailService extends IService */ CommonPage page(EasOutInBillDetailVO params); + /** * 查询库位 * * @param params 查询条件 - * @return List + * @return List */ - CommonPage queryInventoryInfo(List params); - + CommonPage queryInventoryInfo(List params); /** @@ -61,6 +65,7 @@ public interface IeasOutInBillDetailService extends IService */ void update(List entity); + /** * 多选删除 * diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/service/IeasOutInBillService.java b/nlsso-server/src/main/java/org/nl/wms/database/eas/service/IeasOutInBillService.java index 4dc0c5a..497c33b 100644 --- a/nlsso-server/src/main/java/org/nl/wms/database/eas/service/IeasOutInBillService.java +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/service/IeasOutInBillService.java @@ -3,7 +3,7 @@ package org.nl.wms.database.eas.service; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import org.nl.common.base.CommonPage; -import org.nl.wms.database.eas.dao.EasOutInBill; +import org.nl.wms.database.eas.dao.*; import com.baomidou.mybatisplus.extension.service.IService; import java.util.List; @@ -12,9 +12,9 @@ import java.util.Set; import com.baomidou.mybatisplus.core.metadata.IPage; import org.nl.common.domain.query.PageQuery; -import org.nl.wms.database.eas.dao.EasOutInBillDetail; -import org.nl.wms.database.eas.dao.HomeBillCounts; +import org.nl.wms.database.eas.dto.AllocationBillQuery; import org.nl.wms.database.eas.dto.EasOutInBillQuery; +import org.nl.wms.database.eas.dto.ReceiptBillQuery; /** @@ -38,6 +38,15 @@ public interface IeasOutInBillService extends IService { */ List getBillsCount(); + + /** + * 获取仓库信息 + * + * @return JSONObject + */ + List getWarehouseInfo(); + + /** * 查询数据分页 * @@ -46,6 +55,23 @@ public interface IeasOutInBillService extends IService { */ CommonPage page(EasOutInBillQuery params); + /** + * 查询调拨单据 + * + * @param params 查询条件 + * @return IPage + */ + CommonPage allocationPage(AllocationBillQuery params); + + /** + * 查询收货单据 + * + * @param params 查询条件 + * @return IPage + */ + CommonPage receiptPage(ReceiptBillQuery params); + + /** * 根据条件查询 * @@ -109,6 +135,11 @@ public interface IeasOutInBillService extends IService { void audit(List ids, boolean isDetail); + + + + + /** * 多选删除 * diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/service/IreceiptBillService.java b/nlsso-server/src/main/java/org/nl/wms/database/eas/service/IreceiptBillService.java new file mode 100644 index 0000000..9805f8d --- /dev/null +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/service/IreceiptBillService.java @@ -0,0 +1,69 @@ +package org.nl.wms.database.eas.service; + +import org.nl.common.base.CommonPage; +import org.nl.wms.database.eas.dao.ReceiptBill; +import com.baomidou.mybatisplus.extension.service.IService; +import org.nl.wms.database.eas.dto.ReceiptBillVO; + +import java.util.List; +import java.util.Set; + + +/** + * {@code @Description:} (ReceiptBill)服务接口层 + * {@code @Author:} gbx + * + * @since 2024-05-25 + */ +public interface IreceiptBillService extends IService { + + + /** + * 分页查询 + * + * @param params 查询条件 + * @return CommonPage + */ + CommonPage page(ReceiptBillVO params); + + /** + * 条件查询 + * + * @param params 查询条件 + * @return List + */ + List query(ReceiptBillVO params); + + /** + * 收货单确认 + * + * @param ids / + */ + void receiptConfirm(List ids); + + /** + * 创建 + * + * @param entity / + */ + void create(ReceiptBillVO entity); + + + /** + * 编辑 + * + * @param entity / + */ + void update(ReceiptBillVO entity); + + /** + * 多选删除 + * + * @param ids / + */ + void delete(Set ids); + + +} + + diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/AllocationBillServiceImpl.java b/nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/AllocationBillServiceImpl.java new file mode 100644 index 0000000..612ecba --- /dev/null +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/AllocationBillServiceImpl.java @@ -0,0 +1,147 @@ +package org.nl.wms.database.eas.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.apache.commons.lang3.StringUtils; +import org.nl.common.exception.BadRequestException; +import org.nl.wms.database.eas.dao.AllocationBill; +import org.nl.wms.database.eas.dto.AllocationBillVO; +import org.nl.wms.database.eas.dao.mapper.AllocationBillMapper; +import org.nl.wms.database.eas.service.IallocationBillService; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import cn.hutool.core.util.ObjectUtil; +import org.springframework.beans.BeanUtils; + +import javax.annotation.Resource; + +import org.nl.common.base.CommonPage; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Set; +import java.util.List; + +/** + * {@code @Description:} (AllocationBill)服务实现层 + * {@code @Author:} gbx + * + * @since 2024-05-25 + */ +@Service("allocationBillService") +public class AllocationBillServiceImpl extends ServiceImpl implements IallocationBillService { + + + @Resource + private AllocationBillMapper allocationBillMapper; + + + /** + * 分页查询 + * + * @param params 查询条件 + */ + @Override + public CommonPage page(AllocationBillVO params) { + if (StringUtils.isBlank(params.getDjbh())) { + throw new BadRequestException("单据编号不能为空"); + } + // 查询总记录数 + long totalCount = allocationBillMapper.getTotalCount(params.getDjbh()); + Page pageObject = new Page<>(params.getPage(), params.getSize()); + Page receiptBills = allocationBillMapper.allocationDetailPage(pageObject, params.getDjbh(), params.getFuzzy()); + return CommonPage.getPage(receiptBills, totalCount); + } + + + /** + * 根据条件查询 + * + * @param params 查询条件 + */ + @Override + public List query(AllocationBillVO params) { + return allocationBillMapper.selectList(new QueryWrapper() + .lambda() + .eq(ObjectUtil.isNotEmpty(params), AllocationBill::getDjbh, params.getFuzzy()) + .or() + .eq(ObjectUtil.isNotEmpty(params), AllocationBill::getDjid, params.getFuzzy()) + ); + } + + + /** + * 创建 + * + * @param entity 对象实体 + */ + @Override + public void create(AllocationBillVO entity) { + allocationBillMapper.insert(getBasicInfo(entity, true)); + } + + /** + * 单据直接调拨 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void allocationConfirm(List ids) { + + + } + + + /** + * 修改调拨单 + */ + @Override + public void update(AllocationBillVO entity) { + AllocationBill allocationBill = this.getById(entity.getDjid()); + if (allocationBill == null) { + // 如果不存在该记录,则插入数据 + AllocationBill allocationBillNew = new AllocationBill(); + BeanUtils.copyProperties(entity, allocationBillNew); + this.save(allocationBillNew); + } else { + // 如果存在该记录,则更新数据 + BeanUtils.copyProperties(entity, allocationBill); + this.updateById(allocationBill); + } + } + + + /** + * 多选删除 + * + * @param ids 多个Id主键 + */ + @Override + public void delete(Set ids) { + // 物理删除 + allocationBillMapper.deleteBatchIds(ids); + } + + + /** + * 获取实体基础信息 + * + * @param entity 对象实体 + * @param isCreate 是否创建 + */ + private AllocationBill getBasicInfo(AllocationBillVO entity, boolean isCreate) { + // if (isCreate) { + // entity.setId(IdUtil.getStringId()); + // entity.setCreate_id(Long.valueOf(SecurityUtils.getCurrentUserId())); + // entity.setCreate_name(SecurityUtils.getCurrentNickName()); + // entity.setCreate_time(DateUtil.now()); + // } + // entity.setUpdate_optid(Long.valueOf(SecurityUtils.getCurrentUserId())); + // entity.setUpdate_optname(SecurityUtils.getCurrentNickName()); + // entity.setUpdate_time(DateUtil.now()); + AllocationBill allocationBill = new AllocationBill(); + BeanUtils.copyProperties(entity, allocationBill); + return allocationBill; + } + + +} + diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/EasOutInBillDetailServiceImpl.java b/nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/EasOutInBillDetailServiceImpl.java index 21c02c9..629d84e 100644 --- a/nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/EasOutInBillDetailServiceImpl.java +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/EasOutInBillDetailServiceImpl.java @@ -8,13 +8,9 @@ import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.nl.common.exception.BadRequestException; import org.nl.common.utils.SecurityUtils; -import org.nl.wms.database.eas.dao.EasOutInBill; -import org.nl.wms.database.eas.dao.InventoryInfo; -import org.nl.wms.database.eas.dao.EasOutInBillDetail; -import org.nl.wms.database.eas.dto.EasOutInBillDetailDto; -import org.nl.wms.database.eas.dto.EasOutInBillDetailVO; +import org.nl.wms.database.eas.dao.*; +import org.nl.wms.database.eas.dto.*; import org.nl.wms.database.eas.dao.mapper.EasOutInBillDetailMapper; -import org.nl.wms.database.eas.dto.EasOutInBillDto; import org.nl.wms.database.eas.service.IeasOutInBillDetailService; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -46,12 +42,15 @@ import java.util.stream.Collectors; public class EasOutInBillDetailServiceImpl extends ServiceImpl implements IeasOutInBillDetailService { - @Resource - private IeasOutInBillService ieasOutInBillService; @Resource private EasOutInBillDetailMapper easOutInBillDetailMapper; + @Resource + private IeasOutInBillService ieasOutInBillService; + + + /** * 分页查询 @@ -269,6 +268,9 @@ public class EasOutInBillDetailServiceImpl extends ServiceImpl getWarehouseInfo() { + return easOutInBillMapper.getWarehouseInfo(); + } + + @Override public JSONArray appUpdate() { JSONArray jsonArray = new JSONArray(); @@ -126,6 +135,36 @@ public class EasOutInBillServiceImpl extends ServiceImpl receiptPage(ReceiptBillQuery params) { + Page pageObject = new Page<>(params.getPage(), params.getSize()); + Page receiptBills = easOutInBillMapper.receiptPage(pageObject, params.getFuzzy()); + return CommonPage.getPage(receiptBills); + } + + + /** + * 查询调拨单据 + * + * @param params 查询条件 + */ + @Override + @SaIgnore + public CommonPage allocationPage(AllocationBillQuery params) { + // 查询总记录数 + long totalCount = easOutInBillMapper.getTotalCount(); + Page pageObject = new Page<>(params.getPage(), params.getSize()); + Page allocationBills = easOutInBillMapper.allocationPage(pageObject, params.getFuzzy()); + return CommonPage.getPage(allocationBills, totalCount); + } + + /** * 根据条件查询 * @@ -583,6 +622,9 @@ public class EasOutInBillServiceImpl extends ServiceImpl implements IreceiptBillService { + + + @Resource + private ReceiptBillMapper receiptBillMapper; + + + /** + * 分页查询 + * + * @param params 查询条件 + */ + @Override + public CommonPage page(ReceiptBillVO params) { + if (StringUtils.isBlank(params.getDjbh())) { + throw new BadRequestException("单据编号不能为空"); + } + Page pageObject = new Page<>(params.getPage(), params.getSize()); + Page receiptBills = receiptBillMapper.receiptDetailPage(pageObject, params.getDjbh(), params.getFuzzy()); + return CommonPage.getPage(receiptBills); + } + + + /** + * 根据条件查询 + * + * @param params 查询条件 + */ + @Override + public List query(ReceiptBillVO params) { + return receiptBillMapper.selectList(new QueryWrapper() + .lambda() + .eq(ObjectUtil.isNotEmpty(params), ReceiptBill::getDjbh, params.getFuzzy()) + .or() + .eq(ObjectUtil.isNotEmpty(params), ReceiptBill::getWlbm, params.getFuzzy()) + ); + } + + /** + * 收货单确认 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void receiptConfirm(List ids) { + + + } + + + /** + * 创建 + * + * @param entity 对象实体 + */ + @Override + public void create(ReceiptBillVO entity) { + receiptBillMapper.insert(getBasicInfo(entity, true)); + } + + + + /** + * 修改收货单 + */ + @Override + public void update(ReceiptBillVO entity) { + ReceiptBill receiptBill = this.getById(entity.getDjbh()); + if (receiptBill == null) { + // 如果不存在该记录,则插入数据 + ReceiptBill receiptBillNew = new ReceiptBill(); + BeanUtils.copyProperties(entity, receiptBillNew); + this.save(receiptBillNew); + } else { + // 如果存在该记录,则更新数据 + BeanUtils.copyProperties(entity, receiptBill); + this.updateById(receiptBill); + } + } + + /** + * 多选删除 + * + * @param ids 多个Id主键 + */ + @Override + public void delete(Set ids) { + // 物理删除 + receiptBillMapper.deleteBatchIds(ids); + } + + + /** + * 获取实体基础信息 + * + * @param entity 对象实体 + * @param isCreate 是否创建 + */ + private ReceiptBill getBasicInfo(ReceiptBillVO entity, boolean isCreate) { + // if (isCreate) { + // entity.setId(IdUtil.getStringId()); + // entity.setCreate_id(Long.valueOf(SecurityUtils.getCurrentUserId())); + // entity.setCreate_name(SecurityUtils.getCurrentNickName()); + // entity.setCreate_time(DateUtil.now()); + // } + // entity.setUpdate_optid(Long.valueOf(SecurityUtils.getCurrentUserId())); + // entity.setUpdate_optname(SecurityUtils.getCurrentNickName()); + // entity.setUpdate_time(DateUtil.now()); + ReceiptBill receiptBill = new ReceiptBill(); + BeanUtils.copyProperties(entity, receiptBill); + return receiptBill; + } + + +} +