Compare commits
28 Commits
a6c915ce04
...
prod
Author | SHA1 | Date | |
---|---|---|---|
a8d8a76fd2 | |||
a661d4f24c | |||
118b1820cf | |||
f44904a5f1 | |||
8326c3110f | |||
fa5dc0e7ac | |||
6bce3c3dea | |||
33de0ea8eb | |||
0233c59e32 | |||
b9bad1c006 | |||
1cc9186022 | |||
01678fda6a | |||
e706540fe3 | |||
55090acb64 | |||
9173e02471 | |||
7a9a648d9a | |||
92d5fefc26 | |||
5199f104b9 | |||
a716991576 | |||
bb7fa6f71e | |||
1a7ba72978 | |||
e4d1be276b | |||
f3d0db70f8 | |||
ee88d9ea09 | |||
604d1b6da2 | |||
3aa5c53149 | |||
55b96c059e | |||
84204a59a3 |
@ -53,13 +53,13 @@ spring:
|
||||
username: xinnengyuandev
|
||||
password: StRWCZdZirysNSs2
|
||||
# 从库数据源
|
||||
slave:
|
||||
lazy: true
|
||||
type: ${spring.datasource.type}
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://192.168.110.2:13386/zmkgdev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
||||
username: zmkgdev
|
||||
password: JhYxREf25AXdy3h8
|
||||
# slave:
|
||||
# lazy: true
|
||||
# type: ${spring.datasource.type}
|
||||
# driverClassName: com.mysql.cj.jdbc.Driver
|
||||
# url: jdbc:mysql://192.168.110.2:13386/zmkgdev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
||||
# username: zmkgdev
|
||||
# password: JhYxREf25AXdy3h8
|
||||
# oracle:
|
||||
# type: ${spring.datasource.type}
|
||||
# driverClassName: oracle.jdbc.OracleDriver
|
||||
|
289
xinnengyuan/ruoyi-admin/src/main/resources/application-local.yml
Normal file
289
xinnengyuan/ruoyi-admin/src/main/resources/application-local.yml
Normal file
@ -0,0 +1,289 @@
|
||||
--- # 临时文件存储位置 避免临时文件被系统清理报错
|
||||
spring.servlet.multipart.location: /ruoyi/server/temp
|
||||
|
||||
--- # 监控中心配置
|
||||
spring.boot.admin.client:
|
||||
# 增加客户端开关
|
||||
enabled: false
|
||||
url: http://localhost:9090/admin
|
||||
instance:
|
||||
service-host-type: IP
|
||||
metadata:
|
||||
username: ${spring.boot.admin.client.username}
|
||||
userpassword: ${spring.boot.admin.client.password}
|
||||
username: @monitor.username@
|
||||
password: @monitor.password@
|
||||
|
||||
--- # snail-job 配置
|
||||
snail-job:
|
||||
enabled: false
|
||||
# 需要在 SnailJob 后台组管理创建对应名称的组,然后创建任务的时候选择对应的组,才能正确分派任务
|
||||
group: "ruoyi_group"
|
||||
# SnailJob 接入验证令牌 详见 script/sql/ry_job.sql `sj_group_config`表
|
||||
token: "SJ_cKqBTPzCsWA3VyuCfFoccmuIEGXjr5KT"
|
||||
server:
|
||||
host: 127.0.0.1
|
||||
port: 17888
|
||||
# 命名空间UUID 详见 script/sql/ry_job.sql `sj_namespace`表`unique_id`字段
|
||||
namespace: ${spring.profiles.active}
|
||||
# 随主应用端口漂移
|
||||
port: 2${server.port}
|
||||
# 客户端ip指定
|
||||
host:
|
||||
# RPC类型: netty, grpc
|
||||
rpc-type: grpc
|
||||
|
||||
--- # 数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
type: com.zaxxer.hikari.HikariDataSource
|
||||
# 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
|
||||
dynamic:
|
||||
# 性能分析插件(有性能损耗 不建议生产环境使用)
|
||||
p6spy: false
|
||||
# 设置默认的数据源或者数据源组,默认值即为 master
|
||||
primary: master
|
||||
# 严格模式 匹配不到数据源则报错
|
||||
strict: true
|
||||
datasource:
|
||||
# 主库数据源
|
||||
master:
|
||||
type: ${spring.datasource.type}
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
||||
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
||||
url: jdbc:mysql://192.168.110.2:13386/xinnengyuanlocal?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
||||
username: xinnengyuanlocal
|
||||
password: 5Rff6TrihXZAAT5M
|
||||
# # 从库数据源
|
||||
# slave:
|
||||
# lazy: true
|
||||
# type: ${spring.datasource.type}
|
||||
# driverClassName: com.mysql.cj.jdbc.Driver
|
||||
# url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
||||
# username:
|
||||
# password:
|
||||
# oracle:
|
||||
# type: ${spring.datasource.type}
|
||||
# driverClassName: oracle.jdbc.OracleDriver
|
||||
# url: jdbc:oracle:thin:@//localhost:1521/XE
|
||||
# username: ROOT
|
||||
# password: root
|
||||
# postgres:
|
||||
# type: ${spring.datasource.type}
|
||||
# driverClassName: org.postgresql.Driver
|
||||
# url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
|
||||
# username: root
|
||||
# password: root
|
||||
# sqlserver:
|
||||
# type: ${spring.datasource.type}
|
||||
# driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
# url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true
|
||||
# username: SA
|
||||
# password: root
|
||||
hikari:
|
||||
# 最大连接池数量
|
||||
maxPoolSize: 20
|
||||
# 最小空闲线程数量
|
||||
minIdle: 10
|
||||
# 配置获取连接等待超时的时间
|
||||
connectionTimeout: 30000
|
||||
# 校验超时时间
|
||||
validationTimeout: 5000
|
||||
# 空闲连接存活最大时间,默认10分钟
|
||||
idleTimeout: 600000
|
||||
# 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
|
||||
maxLifetime: 1800000
|
||||
# 多久检查一次连接的活性
|
||||
keepaliveTime: 30000
|
||||
|
||||
--- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉)
|
||||
spring.data:
|
||||
redis:
|
||||
# 地址
|
||||
host: 192.168.110.2
|
||||
# 端口,默认为6379
|
||||
port: 9287
|
||||
# 数据库索引
|
||||
database: 6
|
||||
# redis 密码必须配置
|
||||
password: syar23rdsaagdrsa
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
# 是否开启ssl
|
||||
ssl.enabled: false
|
||||
|
||||
# redisson 配置
|
||||
redisson:
|
||||
# redis key前缀
|
||||
keyPrefix:
|
||||
# 线程池数量
|
||||
threads: 16
|
||||
# Netty线程池数量
|
||||
nettyThreads: 32
|
||||
# 单节点配置
|
||||
singleServerConfig:
|
||||
# 客户端名称
|
||||
clientName: ${ruoyi.name}
|
||||
# 最小空闲连接数
|
||||
connectionMinimumIdleSize: 32
|
||||
# 连接池大小
|
||||
connectionPoolSize: 64
|
||||
# 连接空闲超时,单位:毫秒
|
||||
idleConnectionTimeout: 10000
|
||||
# 命令等待超时,单位:毫秒
|
||||
timeout: 3000
|
||||
# 发布和订阅连接池大小
|
||||
subscriptionConnectionPoolSize: 50
|
||||
|
||||
--- # mail 邮件发送
|
||||
mail:
|
||||
enabled: false
|
||||
host: smtp.163.com
|
||||
port: 465
|
||||
# 是否需要用户名密码验证
|
||||
auth: true
|
||||
# 发送方,遵循RFC-822标准
|
||||
from: xxx@163.com
|
||||
# 用户名(注意:如果使用foxmail邮箱,此处user为qq号)
|
||||
user: xxx@163.com
|
||||
# 密码(注意,某些邮箱需要为SMTP服务单独设置密码,详情查看相关帮助)
|
||||
pass: xxxxxxxxxx
|
||||
# 使用 STARTTLS安全连接,STARTTLS是对纯文本通信协议的扩展。
|
||||
starttlsEnable: true
|
||||
# 使用SSL安全连接
|
||||
sslEnable: true
|
||||
# SMTP超时时长,单位毫秒,缺省值不超时
|
||||
timeout: 0
|
||||
# Socket连接超时值,单位毫秒,缺省值不超时
|
||||
connectionTimeout: 0
|
||||
|
||||
--- # sms 短信 支持 阿里云 腾讯云 云片 等等各式各样的短信服务商
|
||||
# https://sms4j.com/doc3/ 差异配置文档地址 支持单厂商多配置,可以配置多个同时使用
|
||||
sms:
|
||||
# 配置源类型用于标定配置来源(interface,yaml)
|
||||
config-type: yaml
|
||||
# 用于标定yml中的配置是否开启短信拦截,接口配置不受此限制
|
||||
restricted: true
|
||||
# 短信拦截限制单手机号每分钟最大发送,只对开启了拦截的配置有效
|
||||
minute-max: 1
|
||||
# 短信拦截限制单手机号每日最大发送量,只对开启了拦截的配置有效
|
||||
account-max: 30
|
||||
# 以下配置来自于 org.dromara.sms4j.provider.config.BaseConfig类中
|
||||
blends:
|
||||
# 唯一ID 用于发送短信寻找具体配置 随便定义别用中文即可
|
||||
# 可以同时存在两个相同厂商 例如: ali1 ali2 两个不同的阿里短信账号 也可用于区分租户
|
||||
config1:
|
||||
# 框架定义的厂商名称标识,标定此配置是哪个厂商,详细请看厂商标识介绍部分
|
||||
supplier: alibaba
|
||||
# 有些称为accessKey有些称之为apiKey,也有称为sdkKey或者appId。
|
||||
access-key-id: 您的accessKey
|
||||
# 称为accessSecret有些称之为apiSecret
|
||||
access-key-secret: 您的accessKeySecret
|
||||
signature: 您的短信签名
|
||||
sdk-app-id: 您的sdkAppId
|
||||
config2:
|
||||
# 厂商标识,标定此配置是哪个厂商,详细请看厂商标识介绍部分
|
||||
supplier: tencent
|
||||
access-key-id: 您的accessKey
|
||||
access-key-secret: 您的accessKeySecret
|
||||
signature: 您的短信签名
|
||||
sdk-app-id: 您的sdkAppId
|
||||
|
||||
--- # 三方授权
|
||||
justauth:
|
||||
# 前端外网访问地址
|
||||
address: http://localhost:80
|
||||
type:
|
||||
maxkey:
|
||||
# maxkey 服务器地址
|
||||
# 注意 如下均配置均不需要修改 maxkey 已经内置好了数据
|
||||
server-url: http://sso.maxkey.top
|
||||
client-id: 876892492581044224
|
||||
client-secret: x1Y5MTMwNzIwMjMxNTM4NDc3Mzche8
|
||||
redirect-uri: ${justauth.address}/social-callback?source=maxkey
|
||||
topiam:
|
||||
# topiam 服务器地址
|
||||
server-url: http://127.0.0.1:1989/api/v1/authorize/y0q************spq***********8ol
|
||||
client-id: 449c4*********937************759
|
||||
client-secret: ac7***********1e0************28d
|
||||
redirect-uri: ${justauth.address}/social-callback?source=topiam
|
||||
scopes: [ openid, email, phone, profile ]
|
||||
qq:
|
||||
client-id: 10**********6
|
||||
client-secret: 1f7d08**********5b7**********29e
|
||||
redirect-uri: ${justauth.address}/social-callback?source=qq
|
||||
union-id: false
|
||||
weibo:
|
||||
client-id: 10**********6
|
||||
client-secret: 1f7d08**********5b7**********29e
|
||||
redirect-uri: ${justauth.address}/social-callback?source=weibo
|
||||
gitee:
|
||||
client-id: 91436b7940090d09c72c7daf85b959cfd5f215d67eea73acbf61b6b590751a98
|
||||
client-secret: 02c6fcfd70342980cd8dd2f2c06c1a350645d76c754d7a264c4e125f9ba915ac
|
||||
redirect-uri: ${justauth.address}/social-callback?source=gitee
|
||||
dingtalk:
|
||||
client-id: 10**********6
|
||||
client-secret: 1f7d08**********5b7**********29e
|
||||
redirect-uri: ${justauth.address}/social-callback?source=dingtalk
|
||||
baidu:
|
||||
client-id: 10**********6
|
||||
client-secret: 1f7d08**********5b7**********29e
|
||||
redirect-uri: ${justauth.address}/social-callback?source=baidu
|
||||
csdn:
|
||||
client-id: 10**********6
|
||||
client-secret: 1f7d08**********5b7**********29e
|
||||
redirect-uri: ${justauth.address}/social-callback?source=csdn
|
||||
coding:
|
||||
client-id: 10**********6
|
||||
client-secret: 1f7d08**********5b7**********29e
|
||||
redirect-uri: ${justauth.address}/social-callback?source=coding
|
||||
coding-group-name: xx
|
||||
oschina:
|
||||
client-id: 10**********6
|
||||
client-secret: 1f7d08**********5b7**********29e
|
||||
redirect-uri: ${justauth.address}/social-callback?source=oschina
|
||||
alipay_wallet:
|
||||
client-id: 10**********6
|
||||
client-secret: 1f7d08**********5b7**********29e
|
||||
redirect-uri: ${justauth.address}/social-callback?source=alipay_wallet
|
||||
alipay-public-key: MIIB**************DAQAB
|
||||
wechat_open:
|
||||
client-id: 10**********6
|
||||
client-secret: 1f7d08**********5b7**********29e
|
||||
redirect-uri: ${justauth.address}/social-callback?source=wechat_open
|
||||
wechat_mp:
|
||||
client-id: 10**********6
|
||||
client-secret: 1f7d08**********5b7**********29e
|
||||
redirect-uri: ${justauth.address}/social-callback?source=wechat_mp
|
||||
wechat_enterprise:
|
||||
client-id: 10**********6
|
||||
client-secret: 1f7d08**********5b7**********29e
|
||||
redirect-uri: ${justauth.address}/social-callback?source=wechat_enterprise
|
||||
agent-id: 1000002
|
||||
gitlab:
|
||||
client-id: 10**********6
|
||||
client-secret: 1f7d08**********5b7**********29e
|
||||
redirect-uri: ${justauth.address}/social-callback?source=gitlab
|
||||
# 和风天气 https://dev.qweather.com/
|
||||
weather:
|
||||
key-id: T65EAABUXC
|
||||
project-id: 2JTHPUQ5YY
|
||||
private-key: MC4CAQAwBQYDK2VwBCIEIMAglX7IsxYiTeM+FXXnvCUsIggajeP4s8gAllewm6BN
|
||||
api-host: n35rk53njv.re.qweatherapi.com
|
||||
# dxf转 geojson 执行文件名
|
||||
dxf2GeoJson:
|
||||
file-name: main
|
||||
ys7:
|
||||
app-key: 3acf9f1a43dc4209841e0893003db0a2
|
||||
app-secret: 4bbf3e9394f55d3af6e3af27b2d3db36
|
||||
# 斯巴达算法
|
||||
sparta:
|
||||
url: http://119.3.204.120:8040
|
||||
client-id: test
|
||||
client-secret: 115fcb08fa6742a1b086d9bb80a6ad59
|
||||
# 身份证加密密钥(32 位)
|
||||
id-card:
|
||||
encrypt-key: 7ae260d150a14027d2238a1cf80a48ef
|
||||
recognizer:
|
||||
url: http://192.168.110.5:50070
|
@ -22,7 +22,7 @@ captcha:
|
||||
# 开发环境配置
|
||||
server:
|
||||
# 服务器的HTTP端口,默认为8080
|
||||
port: 8898
|
||||
port: 8899
|
||||
servlet:
|
||||
# 应用的访问路径
|
||||
context-path: /
|
||||
@ -259,6 +259,8 @@ springdoc:
|
||||
packages-to-scan: org.dromara.cailiaoshebei
|
||||
- group: 18.产值模块
|
||||
packages-to-scan: org.dromara.out
|
||||
- group: 19.消息模块
|
||||
packages-to-scan: org.dromara.message
|
||||
# knife4j的增强配置,不需要增强可以不配
|
||||
knife4j:
|
||||
enable: true
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -2,12 +2,21 @@ package org.dromara.test;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.formalities.domain.bo.AddBusFormalitiesAreConsolidatedBo;
|
||||
import org.dromara.formalities.domain.bo.BusFormalitiesAreConsolidatedBo;
|
||||
import org.dromara.formalities.domain.bo.BusListOfFormalitiesBo;
|
||||
import org.dromara.formalities.domain.vo.BusListOfFormalitiesVo;
|
||||
import org.dromara.formalities.service.IBusFormalitiesAreConsolidatedService;
|
||||
import org.dromara.formalities.service.IBusListOfFormalitiesService;
|
||||
import org.dromara.manager.ys7manager.Ys7Manager;
|
||||
import org.dromara.manager.ys7manager.Ys7RequestUtils;
|
||||
import org.dromara.manager.ys7manager.vo.Ys7QueryDeviceResponseVo;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -34,4 +43,56 @@ public class Ys7Test {
|
||||
System.out.println(pic);
|
||||
}
|
||||
|
||||
@Resource
|
||||
private IBusListOfFormalitiesService busListOfFormalitiesService;
|
||||
|
||||
@Test
|
||||
public void test111(){
|
||||
BusListOfFormalitiesBo busListOfFormalitiesBo = new BusListOfFormalitiesBo();
|
||||
// busListOfFormalitiesBo.setName("test1");
|
||||
// busListOfFormalitiesBo.setPid(1955976169241026561L);
|
||||
// busListOfFormalitiesService.insertByBo(busListOfFormalitiesBo);
|
||||
// List<BusListOfFormalitiesVo> tree = busListOfFormalitiesService.getTree(busListOfFormalitiesBo);
|
||||
// System.out.println(tree);
|
||||
Boolean b = busListOfFormalitiesService.deleteWithValidByIds(1955976169241026561L, true);
|
||||
System.out.println(b);
|
||||
|
||||
}
|
||||
|
||||
@Resource
|
||||
private IBusFormalitiesAreConsolidatedService formalitiesAreConsolidatedService;
|
||||
|
||||
@Test
|
||||
public void test222(){
|
||||
BusFormalitiesAreConsolidatedBo busFormalitiesAreConsolidatedBo = new BusFormalitiesAreConsolidatedBo();
|
||||
// List<AddBusFormalitiesAreConsolidatedBo> addBusFormalitiesAreConsolidatedBos = new ArrayList<>();
|
||||
// AddBusFormalitiesAreConsolidatedBo bo1 = new AddBusFormalitiesAreConsolidatedBo();
|
||||
// bo1.setFormalitiesId(1955977461032103939L);
|
||||
// AddBusFormalitiesAreConsolidatedBo bo2 = new AddBusFormalitiesAreConsolidatedBo();
|
||||
// bo2.setFormalitiesId(1955977461032103940L);
|
||||
// bo2.setFormalitiesPid(1955977461032103939L);
|
||||
// AddBusFormalitiesAreConsolidatedBo bo3 = new AddBusFormalitiesAreConsolidatedBo();
|
||||
// bo3.setFormalitiesId(1955977461032103941L);
|
||||
// bo3.setFormalitiesPid(1955977461032103939L);
|
||||
// AddBusFormalitiesAreConsolidatedBo bo4 = new AddBusFormalitiesAreConsolidatedBo();
|
||||
// bo4.setFormalitiesId(1955977461032103942L);
|
||||
// bo4.setFormalitiesPid(1955977461032103939L);
|
||||
// addBusFormalitiesAreConsolidatedBos.add(bo1);
|
||||
// addBusFormalitiesAreConsolidatedBos.add(bo2);
|
||||
// addBusFormalitiesAreConsolidatedBos.add(bo3);
|
||||
// addBusFormalitiesAreConsolidatedBos.add(bo4);
|
||||
// busFormalitiesAreConsolidatedBo.setAddBusFormalitiesAreConsolidatedBos(addBusFormalitiesAreConsolidatedBos);
|
||||
// busFormalitiesAreConsolidatedBo.setProjectId(1555L);
|
||||
// Boolean b = formalitiesAreConsolidatedService.insertByBo(busFormalitiesAreConsolidatedBo);
|
||||
// System.out.println(b);
|
||||
// busFormalitiesAreConsolidatedBo.setId(1956013379818409985L);
|
||||
// busFormalitiesAreConsolidatedBo.setHead("舟山");
|
||||
// busFormalitiesAreConsolidatedBo.setPlanTheStartTime(new Date());
|
||||
// busFormalitiesAreConsolidatedBo.setRemark("asdasd");
|
||||
// busFormalitiesAreConsolidatedBo.setStatus(0);
|
||||
// MultipartFile[] files = {};
|
||||
// Boolean b = formalitiesAreConsolidatedService.updateByBo(busFormalitiesAreConsolidatedBo, files);
|
||||
// System.out.println(b);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -24,37 +24,37 @@ public enum BusinessStatusEnum {
|
||||
/**
|
||||
* 已撤销
|
||||
*/
|
||||
CANCEL("cancel", "已撤销"),
|
||||
CANCEL("cancel", "已撤销",6),
|
||||
|
||||
/**
|
||||
* 草稿
|
||||
*/
|
||||
DRAFT("draft", "草稿"),
|
||||
DRAFT("draft", "草稿",3),
|
||||
|
||||
/**
|
||||
* 待审核
|
||||
*/
|
||||
WAITING("waiting", "待审核"),
|
||||
WAITING("waiting", "待审核",2),
|
||||
|
||||
/**
|
||||
* 已完成
|
||||
*/
|
||||
FINISH("finish", "已完成"),
|
||||
FINISH("finish", "已完成",1),
|
||||
|
||||
/**
|
||||
* 已作废
|
||||
*/
|
||||
INVALID("invalid", "已作废"),
|
||||
INVALID("invalid", "已作废",7),
|
||||
|
||||
/**
|
||||
* 已退回
|
||||
*/
|
||||
BACK("back", "已退回"),
|
||||
BACK("back", "已退回",4),
|
||||
|
||||
/**
|
||||
* 已终止
|
||||
*/
|
||||
TERMINATION("termination", "已终止");
|
||||
TERMINATION("termination", "已终止",5);
|
||||
|
||||
/**
|
||||
* 状态
|
||||
@ -66,6 +66,11 @@ public enum BusinessStatusEnum {
|
||||
*/
|
||||
private final String desc;
|
||||
|
||||
/**
|
||||
* 排序字段
|
||||
*/
|
||||
private final int order;
|
||||
|
||||
private static final Map<String, BusinessStatusEnum> STATUS_MAP = Arrays.stream(BusinessStatusEnum.values())
|
||||
.collect(Collectors.toConcurrentMap(BusinessStatusEnum::getStatus, Function.identity()));
|
||||
|
||||
|
@ -0,0 +1,226 @@
|
||||
package org.dromara.common.excel.coryUtils;
|
||||
|
||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 工程量清单解析
|
||||
* @Author 铁憨憨
|
||||
* @Date 2025/8/11 16:29
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class BillOfQuantitiesUtils {
|
||||
// 中文数字正则表达式,用于检测顶层节点
|
||||
private static final String CHINESE_NUMBERS_REGEX = "[一二三四五六七八九十]+";
|
||||
// 标记是否已找到中文数字开头的行
|
||||
private static boolean foundChineseStart = false;
|
||||
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
// 文件路径,请根据实际情况修改
|
||||
FileInputStream file = new FileInputStream(new File(
|
||||
"E:\\cory\\app\\xwechat_files\\wxid_8q1mhp57yu6p22_50ad\\msg\\file\\2025-08\\设计管理模块说明\\8、工程量清单表.xls"));
|
||||
|
||||
HSSFWorkbook workbook = new HSSFWorkbook(file);
|
||||
|
||||
for (int sheetIndex = 0; sheetIndex < workbook.getNumberOfSheets(); sheetIndex++) {
|
||||
HSSFSheet sheet = workbook.getSheetAt(sheetIndex);
|
||||
System.out.println("===== 工作表: " + sheet.getSheetName() + " =====");
|
||||
|
||||
// 重置标记,处理新工作表时重新开始检测
|
||||
foundChineseStart = false;
|
||||
List<List<String>> data = new ArrayList<>();
|
||||
|
||||
boolean isFirstRow = true;
|
||||
for (Row row : sheet) {
|
||||
// 跳过表头行
|
||||
if (isFirstRow) {
|
||||
isFirstRow = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
List<String> rowData = new ArrayList<>();
|
||||
// 读取A到E列(索引0到4)
|
||||
for (int cellIndex = 0; cellIndex < 5; cellIndex++) {
|
||||
Cell cell = row.getCell(cellIndex, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK);
|
||||
rowData.add(getCellValue(cell));
|
||||
}
|
||||
|
||||
// 检查是否找到中文数字开头的行
|
||||
String aColumnValue = rowData.get(0).trim();
|
||||
if (aColumnValue.matches(CHINESE_NUMBERS_REGEX)) {
|
||||
foundChineseStart = true;
|
||||
}
|
||||
|
||||
// 只有找到中文数字开头的行之后,才开始收集数据
|
||||
if (foundChineseStart) {
|
||||
data.add(rowData);
|
||||
}
|
||||
}
|
||||
|
||||
if (!data.isEmpty()) {
|
||||
// 构建树形结构
|
||||
TreeNode root = new TreeNode(new ArrayList<>());
|
||||
Map<String, TreeNode> nodeMap = new HashMap<>();
|
||||
nodeMap.put("", root);
|
||||
List<String> nonEmptyKeys = new ArrayList<>(); // 记录非空A列值的顺序
|
||||
|
||||
for (List<String> row : data) {
|
||||
String key = row.get(0).trim();
|
||||
TreeNode node = new TreeNode(row);
|
||||
|
||||
if (!key.isEmpty()) {
|
||||
String parentKey = getParentKey(key);
|
||||
TreeNode parent = nodeMap.get(parentKey);
|
||||
|
||||
if (parent == null) {
|
||||
parent = new TreeNode(new ArrayList<>());
|
||||
nodeMap.put(parentKey, parent);
|
||||
TreeNode grandParent = nodeMap.get(getParentKey(parentKey));
|
||||
if (grandParent != null) {
|
||||
grandParent.addChild(parent);
|
||||
} else {
|
||||
// 如果没有更高级别的父节点,就挂到根节点
|
||||
root.addChild(parent);
|
||||
}
|
||||
}
|
||||
|
||||
parent.addChild(node);
|
||||
nodeMap.put(key, node);
|
||||
nonEmptyKeys.add(key);
|
||||
} else {
|
||||
// A列为空,挂到上一个非空节点下
|
||||
if (!nonEmptyKeys.isEmpty()) {
|
||||
String lastKey = nonEmptyKeys.get(nonEmptyKeys.size() - 1);
|
||||
TreeNode parent = nodeMap.get(lastKey);
|
||||
if (parent != null) {
|
||||
parent.addChild(node);
|
||||
}
|
||||
} else {
|
||||
root.addChild(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 打印树形结构
|
||||
printTree(root, 0);
|
||||
} else {
|
||||
System.out.println("该工作表中未找到以中文数字(一、二、三...)开头的数据行");
|
||||
}
|
||||
}
|
||||
|
||||
workbook.close();
|
||||
file.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单元格的值,处理不同数据类型
|
||||
*/
|
||||
private static String getCellValue(Cell cell) {
|
||||
if (cell == null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
switch (cell.getCellType()) {
|
||||
case STRING:
|
||||
return cell.getStringCellValue().trim();
|
||||
case NUMERIC:
|
||||
// 处理数字,移除不必要的.0后缀
|
||||
String numericValue = String.valueOf(cell.getNumericCellValue());
|
||||
if (numericValue.endsWith(".0")) {
|
||||
return numericValue.substring(0, numericValue.length() - 2);
|
||||
}
|
||||
return numericValue;
|
||||
case BOOLEAN:
|
||||
return String.valueOf(cell.getBooleanCellValue());
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据A列的值确定父节点的键
|
||||
*/
|
||||
private static String getParentKey(String key) {
|
||||
// 中文数字(一、二、三...)的父节点是根节点
|
||||
if (key.matches(CHINESE_NUMBERS_REGEX)) {
|
||||
return "";
|
||||
}
|
||||
|
||||
// 数字格式(1、1.1、1.2.1等)的父节点是上一级
|
||||
if (key.matches("\\d+(\\.\\d+)*")) {
|
||||
int lastDotIndex = key.lastIndexOf('.');
|
||||
if (lastDotIndex > 0) {
|
||||
return key.substring(0, lastDotIndex);
|
||||
} else {
|
||||
// 一级数字(如1、2)的父节点是根节点或最近的中文数字节点
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
// 其他格式默认父节点是根节点
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* 以可视化方式打印树形结构
|
||||
*/
|
||||
private static void printTree(TreeNode node, int depth) {
|
||||
// 跳过空的中间节点
|
||||
if (node.data.isEmpty() && node.children.size() == 1) {
|
||||
printTree(node.children.get(0), depth);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!node.data.isEmpty()) {
|
||||
// 打印层级连接线
|
||||
for (int i = 0; i < depth; i++) {
|
||||
// 最后一级节点用└──,其他用├──
|
||||
if (i == depth - 1) {
|
||||
System.out.print("└── ");
|
||||
} else {
|
||||
System.out.print("│ ");
|
||||
}
|
||||
}
|
||||
// 打印数据,突出显示A列的值
|
||||
System.out.println("[" + node.data.get(0) + "] " + node.data.subList(1, node.data.size()));
|
||||
}
|
||||
|
||||
// 递归打印子节点
|
||||
for (TreeNode child : node.children) {
|
||||
printTree(child, depth + 1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 树形节点类
|
||||
*/
|
||||
static class TreeNode {
|
||||
List<String> data;
|
||||
List<TreeNode> children;
|
||||
|
||||
TreeNode(List<String> data) {
|
||||
this.data = data;
|
||||
this.children = new ArrayList<>();
|
||||
}
|
||||
|
||||
void addChild(TreeNode child) {
|
||||
this.children.add(child);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,484 @@
|
||||
package org.dromara.common.excel.coryUtils;
|
||||
|
||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author 铁憨憨
|
||||
* @Date 2025/8/11 16:44
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class ExcelReader {
|
||||
// 中文数字正则表达式,用于检测顶层节点
|
||||
public static final String CHINESE_NUMBERS_REGEX = "[一二三四五六七八九十]+";
|
||||
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
// 1. 读取Excel中所有sheet的完整数据
|
||||
String filePath = "E:\\cory\\app\\xwechat_files\\wxid_8q1mhp57yu6p22_50ad\\msg\\file\\2025-08\\设计管理模块说明\\8、工程量清单表.xls";
|
||||
ExcelData excelData = readExcelData(filePath);
|
||||
// ExcelData excelData = ExcelReader.readExcelFromMultipartFile(file);
|
||||
|
||||
// 2. 处理每个sheet的数据并打印树形结构
|
||||
for (SheetData sheetData : excelData.getSheetDataList()) {
|
||||
System.out.println("===== 工作表: " + sheetData.getSheetName() + " =====");
|
||||
|
||||
if (sheetData.getData().isEmpty()) {
|
||||
System.out.println("该工作表中未找到以中文数字(一、二、三...)开头的数据行");
|
||||
continue;
|
||||
}
|
||||
|
||||
// 构建树形结构
|
||||
TreeNode root = buildTree(sheetData.getData());
|
||||
|
||||
// 打印树形结构
|
||||
printTree(root, 0);
|
||||
}
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 从MultipartFile读取Excel数据
|
||||
*/
|
||||
public static ExcelData readExcelFromMultipartFile(MultipartFile file) throws IOException {
|
||||
if (file.isEmpty()) {
|
||||
throw new IllegalArgumentException("上传的文件为空");
|
||||
}
|
||||
|
||||
ExcelData excelData = new ExcelData();
|
||||
List<SheetData> sheetDataList = new ArrayList<>();
|
||||
|
||||
// 获取文件名判断文件类型
|
||||
String fileName = file.getOriginalFilename();
|
||||
if (fileName == null || (!fileName.toLowerCase().endsWith(".xls") && !fileName.toLowerCase().endsWith(".xlsx"))) {
|
||||
throw new IllegalArgumentException("不支持的文件类型,仅支持xls和xlsx格式");
|
||||
}
|
||||
|
||||
boolean isXlsx = fileName.toLowerCase().endsWith(".xlsx");
|
||||
|
||||
// 从MultipartFile获取输入流
|
||||
try (InputStream stream = file.getInputStream();
|
||||
org.apache.poi.ss.usermodel.Workbook workbook = isXlsx ?
|
||||
new XSSFWorkbook(stream) : new HSSFWorkbook(stream)) {
|
||||
|
||||
for (int sheetIndex = 0; sheetIndex < workbook.getNumberOfSheets(); sheetIndex++) {
|
||||
org.apache.poi.ss.usermodel.Sheet sheet = workbook.getSheetAt(sheetIndex);
|
||||
SheetData sheetData = new SheetData();
|
||||
sheetData.setSheetName(sheet.getSheetName());
|
||||
|
||||
processSheetData(sheet, sheetData);
|
||||
sheetDataList.add(sheetData);
|
||||
}
|
||||
}
|
||||
|
||||
excelData.setSheetDataList(sheetDataList);
|
||||
return excelData;
|
||||
}
|
||||
|
||||
/**
|
||||
* 文件路径来读取
|
||||
* 读取Excel文件的完整数据并封装为实体
|
||||
*/
|
||||
public static ExcelData readExcelData(String filePath) throws IOException {
|
||||
ExcelData excelData = new ExcelData();
|
||||
List<SheetData> sheetDataList = new ArrayList<>();
|
||||
|
||||
FileInputStream file = new FileInputStream(new File(filePath));
|
||||
boolean isXlsx = filePath.toLowerCase().endsWith(".xlsx");
|
||||
|
||||
// 根据文件后缀选择对应的Workbook实现
|
||||
try (org.apache.poi.ss.usermodel.Workbook workbook = isXlsx ?
|
||||
new XSSFWorkbook(file) : new HSSFWorkbook(file)) {
|
||||
|
||||
for (int sheetIndex = 0; sheetIndex < workbook.getNumberOfSheets(); sheetIndex++) {
|
||||
org.apache.poi.ss.usermodel.Sheet sheet = workbook.getSheetAt(sheetIndex);
|
||||
SheetData sheetData = new SheetData();
|
||||
sheetData.setSheetName(sheet.getSheetName());
|
||||
|
||||
// 处理单个sheet的数据
|
||||
processSheetData(sheet, sheetData);
|
||||
|
||||
sheetDataList.add(sheetData);
|
||||
}
|
||||
} finally {
|
||||
file.close();
|
||||
}
|
||||
|
||||
excelData.setSheetDataList(sheetDataList);
|
||||
return excelData;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理单个工作表的数据
|
||||
*/
|
||||
private static void processSheetData(org.apache.poi.ss.usermodel.Sheet sheet, SheetData sheetData) {
|
||||
boolean foundChineseStart = false;
|
||||
List<List<String>> data = new ArrayList<>();
|
||||
boolean isFirstRow = true;
|
||||
|
||||
for (Row row : sheet) {
|
||||
// 跳过表头行
|
||||
if (isFirstRow) {
|
||||
isFirstRow = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
List<String> rowData = new ArrayList<>();
|
||||
// 读取A到E列(索引0到4)
|
||||
for (int cellIndex = 0; cellIndex < 5; cellIndex++) {
|
||||
Cell cell = row.getCell(cellIndex, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK);
|
||||
rowData.add(getCellValue(cell));
|
||||
}
|
||||
|
||||
// 检查是否找到中文数字开头的行
|
||||
String aColumnValue = rowData.get(0).trim();
|
||||
if (aColumnValue.matches(CHINESE_NUMBERS_REGEX)) {
|
||||
foundChineseStart = true;
|
||||
}
|
||||
|
||||
// 只有找到中文数字开头的行之后,才开始收集数据
|
||||
if (foundChineseStart) {
|
||||
data.add(rowData);
|
||||
}
|
||||
}
|
||||
|
||||
sheetData.setData(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据数据构建树形结构
|
||||
*/
|
||||
public static TreeNode buildTree(List<List<String>> data) {
|
||||
TreeNode root = new TreeNode(new ArrayList<>());
|
||||
Map<String, TreeNode> nodeMap = new HashMap<>();
|
||||
nodeMap.put("", root);
|
||||
List<String> nonEmptyKeys = new ArrayList<>(); // 记录非空A列值的顺序
|
||||
Map<String, String> lastChineseNumberMap = new HashMap<>(); // 记录各级别最近的中文数字节点
|
||||
|
||||
// 初始化根级中文数字节点
|
||||
lastChineseNumberMap.put("", "");
|
||||
|
||||
for (List<String> row : data) {
|
||||
String key = row.get(0).trim();
|
||||
TreeNode node = new TreeNode(row);
|
||||
|
||||
if (!key.isEmpty()) {
|
||||
String parentKey = getParentKey(key, lastChineseNumberMap, nonEmptyKeys);
|
||||
|
||||
// 更新最近的中文数字节点记录
|
||||
if (key.matches(CHINESE_NUMBERS_REGEX)) {
|
||||
String currentLevelParentKey = getParentKey(key, lastChineseNumberMap, nonEmptyKeys);
|
||||
lastChineseNumberMap.put(key, key);
|
||||
lastChineseNumberMap.put(parentKey + ".children", key);
|
||||
}
|
||||
|
||||
TreeNode parent = nodeMap.get(parentKey);
|
||||
|
||||
if (parent == null) {
|
||||
parent = new TreeNode(new ArrayList<>());
|
||||
nodeMap.put(parentKey, parent);
|
||||
TreeNode grandParent = nodeMap.get(getParentKey(parentKey, lastChineseNumberMap, nonEmptyKeys));
|
||||
if (grandParent != null) {
|
||||
parent.setParent(grandParent);
|
||||
grandParent.addChild(parent);
|
||||
} else {
|
||||
// 如果没有更高级别的父节点,就挂到根节点
|
||||
parent.setParent(root);
|
||||
root.addChild(parent);
|
||||
}
|
||||
}
|
||||
|
||||
node.setParent(parent);
|
||||
parent.addChild(node);
|
||||
nodeMap.put(key, node);
|
||||
nonEmptyKeys.add(key);
|
||||
} else {
|
||||
// A列为空,挂到上一个非空节点下
|
||||
if (!nonEmptyKeys.isEmpty()) {
|
||||
String lastKey = nonEmptyKeys.get(nonEmptyKeys.size() - 1);
|
||||
TreeNode parent = nodeMap.get(lastKey);
|
||||
if (parent != null) {
|
||||
node.setParent(parent);
|
||||
parent.addChild(node);
|
||||
}
|
||||
} else {
|
||||
node.setParent(root);
|
||||
root.addChild(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return root;
|
||||
}
|
||||
// public static TreeNode buildTree(List<List<String>> data) {
|
||||
// TreeNode root = new TreeNode(new ArrayList<>());
|
||||
// Map<String, TreeNode> nodeMap = new HashMap<>();
|
||||
// nodeMap.put("", root);
|
||||
// List<String> nonEmptyKeys = new ArrayList<>(); // 记录非空A列值的顺序
|
||||
//
|
||||
// for (List<String> row : data) {
|
||||
// String key = row.get(0).trim();
|
||||
// TreeNode node = new TreeNode(row);
|
||||
//
|
||||
// if (!key.isEmpty()) {
|
||||
// String parentKey = getParentKey(key);
|
||||
// TreeNode parent = nodeMap.get(parentKey);
|
||||
//
|
||||
// if (parent == null) {
|
||||
// parent = new TreeNode(new ArrayList<>());
|
||||
// nodeMap.put(parentKey, parent);
|
||||
// TreeNode grandParent = nodeMap.get(getParentKey(parentKey));
|
||||
// if (grandParent != null) {
|
||||
// grandParent.addChild(parent);
|
||||
// } else {
|
||||
// // 如果没有更高级别的父节点,就挂到根节点
|
||||
// root.addChild(parent);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// parent.addChild(node);
|
||||
// nodeMap.put(key, node);
|
||||
// nonEmptyKeys.add(key);
|
||||
// } else {
|
||||
// // A列为空,挂到上一个非空节点下
|
||||
// if (!nonEmptyKeys.isEmpty()) {
|
||||
// String lastKey = nonEmptyKeys.get(nonEmptyKeys.size() - 1);
|
||||
// TreeNode parent = nodeMap.get(lastKey);
|
||||
// if (parent != null) {
|
||||
// parent.addChild(node);
|
||||
// }
|
||||
// } else {
|
||||
// root.addChild(node);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// return root;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 以可视化方式打印树形结构
|
||||
*/
|
||||
public static void printTree(TreeNode node, int depth) {
|
||||
// 跳过空的中间节点
|
||||
if (node.data.isEmpty() && node.children.size() == 1) {
|
||||
printTree(node.children.get(0), depth);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!node.data.isEmpty()) {
|
||||
// 打印层级连接线
|
||||
for (int i = 0; i < depth; i++) {
|
||||
// 最后一级节点用└──,其他用├──
|
||||
if (i == depth - 1) {
|
||||
System.out.print("└── ");
|
||||
} else {
|
||||
System.out.print("│ ");
|
||||
}
|
||||
}
|
||||
// 打印数据,突出显示A列的值
|
||||
System.out.println("[" + node.data.get(0) + "] " + node.data.subList(1, node.data.size()));
|
||||
}
|
||||
|
||||
// 递归打印子节点
|
||||
for (TreeNode child : node.children) {
|
||||
printTree(child, depth + 1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单元格的值,处理不同数据类型
|
||||
*/
|
||||
private static String getCellValue(Cell cell) {
|
||||
if (cell == null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
switch (cell.getCellType()) {
|
||||
case STRING:
|
||||
return cell.getStringCellValue().trim();
|
||||
case NUMERIC:
|
||||
// 处理数字,移除不必要的.0后缀
|
||||
String numericValue = String.valueOf(cell.getNumericCellValue());
|
||||
if (numericValue.endsWith(".0")) {
|
||||
return numericValue.substring(0, numericValue.length() - 2);
|
||||
}
|
||||
return numericValue;
|
||||
case BOOLEAN:
|
||||
return String.valueOf(cell.getBooleanCellValue());
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据A列的值确定父节点的键
|
||||
*/
|
||||
private static String getParentKey(String key, Map<String, String> lastChineseNumberMap, List<String> nonEmptyKeys) {
|
||||
// 中文数字(一、二、三...)的父节点是根节点
|
||||
if (key.matches(CHINESE_NUMBERS_REGEX)) {
|
||||
return "";
|
||||
}
|
||||
|
||||
// 数字格式(1、1.1、1.2.1等)的父节点是上一级
|
||||
if (key.matches("\\d+(\\.\\d+)*")) {
|
||||
int lastDotIndex = key.lastIndexOf('.');
|
||||
if (lastDotIndex > 0) {
|
||||
return key.substring(0, lastDotIndex);
|
||||
} else {
|
||||
// 一级数字(如1、2)的父节点是最近的中文数字节点
|
||||
if (!nonEmptyKeys.isEmpty()) {
|
||||
// 查找最近的中文数字节点作为父节点
|
||||
for (int i = nonEmptyKeys.size() - 1; i >= 0; i--) {
|
||||
String prevKey = nonEmptyKeys.get(i);
|
||||
if (prevKey.matches(CHINESE_NUMBERS_REGEX)) {
|
||||
return prevKey;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 如果没有找到中文数字节点,使用根节点
|
||||
return lastChineseNumberMap.getOrDefault("", "");
|
||||
}
|
||||
}
|
||||
|
||||
// 其他格式默认父节点是根节点
|
||||
return "";
|
||||
}
|
||||
// private static String getParentKey(String key) {
|
||||
// // 中文数字(一、二、三...)的父节点是根节点
|
||||
// if (key.matches(CHINESE_NUMBERS_REGEX)) {
|
||||
// return "";
|
||||
// }
|
||||
//
|
||||
// // 数字格式(1、1.1、1.2.1等)的父节点是上一级
|
||||
// if (key.matches("\\d+(\\.\\d+)*")) {
|
||||
// int lastDotIndex = key.lastIndexOf('.');
|
||||
// if (lastDotIndex > 0) {
|
||||
// return key.substring(0, lastDotIndex);
|
||||
// } else {
|
||||
// // 一级数字(如1、2)的父节点是根节点或最近的中文数字节点
|
||||
// return "";
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // 其他格式默认父节点是根节点
|
||||
// return "";
|
||||
// }
|
||||
|
||||
/**
|
||||
* Excel数据实体类,包含所有工作表数据
|
||||
*/
|
||||
public static class ExcelData {
|
||||
private List<SheetData> sheetDataList;
|
||||
|
||||
public List<SheetData> getSheetDataList() {
|
||||
return sheetDataList;
|
||||
}
|
||||
|
||||
public void setSheetDataList(List<SheetData> sheetDataList) {
|
||||
this.sheetDataList = sheetDataList;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 工作表数据实体类,包含单个工作表的名称和数据
|
||||
*/
|
||||
public static class SheetData {
|
||||
private String sheetName;
|
||||
private List<List<String>> data;
|
||||
|
||||
public String getSheetName() {
|
||||
return sheetName;
|
||||
}
|
||||
|
||||
public void setSheetName(String sheetName) {
|
||||
this.sheetName = sheetName;
|
||||
}
|
||||
|
||||
public List<List<String>> getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(List<List<String>> data) {
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 树形节点类
|
||||
*/
|
||||
/**
|
||||
* 树形节点类,增加了父节点引用
|
||||
*/
|
||||
public static class TreeNode {
|
||||
List<String> data;
|
||||
List<TreeNode> children;
|
||||
TreeNode parent; // 新增:父节点引用
|
||||
|
||||
public TreeNode(List<String> data) {
|
||||
this.data = data;
|
||||
this.children = new ArrayList<>();
|
||||
this.parent = null;
|
||||
}
|
||||
|
||||
public void addChild(TreeNode child) {
|
||||
this.children.add(child);
|
||||
}
|
||||
|
||||
public List<String> getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public List<TreeNode> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
public TreeNode getParent() {
|
||||
return parent;
|
||||
}
|
||||
|
||||
public void setParent(TreeNode parent) {
|
||||
this.parent = parent;
|
||||
}
|
||||
}
|
||||
// public static class TreeNode {
|
||||
// List<String> data;
|
||||
// List<TreeNode> children;
|
||||
//
|
||||
// public TreeNode(List<String> data) {
|
||||
// this.data = data;
|
||||
// this.children = new ArrayList<>();
|
||||
// }
|
||||
//
|
||||
// public void addChild(TreeNode child) {
|
||||
// this.children.add(child);
|
||||
// }
|
||||
//
|
||||
// public List<String> getData() {
|
||||
// return data;
|
||||
// }
|
||||
//
|
||||
// public List<TreeNode> getChildren() {
|
||||
// return children;
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package org.dromara.common.excel.coryUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author 铁憨憨
|
||||
* @Date 2025/8/11 16:44
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class TreeNode {
|
||||
List<String> data;
|
||||
List<TreeNode> children;
|
||||
|
||||
TreeNode(List<String> data) {
|
||||
this.data = data;
|
||||
this.children = new ArrayList<>();
|
||||
}
|
||||
|
||||
void addChild(TreeNode child) {
|
||||
this.children.add(child);
|
||||
}
|
||||
}
|
@ -77,6 +77,7 @@ public class RedisUtils {
|
||||
public static <T> void publish(String channelKey, T msg, Consumer<T> consumer) {
|
||||
RTopic topic = CLIENT.getTopic(channelKey);
|
||||
topic.publish(msg);
|
||||
System.out.println("发布通道消息---------"+msg.toString());
|
||||
consumer.accept(msg);
|
||||
}
|
||||
|
||||
|
@ -134,6 +134,8 @@ public class SseEmitterManager {
|
||||
SseMessageDto broadcastMessage = new SseMessageDto();
|
||||
broadcastMessage.setMessage(sseMessageDto.getMessage());
|
||||
broadcastMessage.setUserIds(sseMessageDto.getUserIds());
|
||||
broadcastMessage.setRoute(sseMessageDto.getRoute());
|
||||
broadcastMessage.setDetailId(sseMessageDto.getDetailId());
|
||||
RedisUtils.publish(SSE_TOPIC, broadcastMessage, consumer -> {
|
||||
log.info("SSE发送主题订阅消息topic:{} session keys:{} message:{}",
|
||||
SSE_TOPIC, sseMessageDto.getUserIds(), sseMessageDto.getMessage());
|
||||
|
@ -26,4 +26,15 @@ public class SseMessageDto implements Serializable {
|
||||
* 需要发送的消息
|
||||
*/
|
||||
private String message;
|
||||
|
||||
/**
|
||||
* 路由
|
||||
*/
|
||||
private String route;
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
private String detailId;
|
||||
|
||||
}
|
||||
|
@ -7,6 +7,9 @@ import org.dromara.common.core.utils.SpringUtils;
|
||||
import org.dromara.common.sse.core.SseEmitterManager;
|
||||
import org.dromara.common.sse.dto.SseMessageDto;
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* SSE工具类
|
||||
*
|
||||
|
@ -5,13 +5,13 @@ import lombok.RequiredArgsConstructor;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.dromara.cailiaoshebei.domain.BusCailiaoshebeiPici;
|
||||
import org.dromara.cailiaoshebei.domain.BusSuppliesprice;
|
||||
import org.dromara.cailiaoshebei.domain.bo.*;
|
||||
import org.dromara.cailiaoshebei.domain.vo.*;
|
||||
import org.dromara.cailiaoshebei.service.IBusCailiaoshebeiPiciService;
|
||||
import org.dromara.cailiaoshebei.service.IBusSuppliespriceService;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.utils.BatchNumberGenerator;
|
||||
import org.dromara.design.domain.bo.ObtainTheListReq;
|
||||
import org.dromara.design.domain.vo.ObtainTheListRes;
|
||||
import org.dromara.design.service.IBusBillofquantitiesVersionsService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
@ -49,7 +49,7 @@ public class BusCailiaoshebeiController extends BaseController {
|
||||
* 设计-新增批次号
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:cailiaoshebei:pcAdd")
|
||||
@Log(title = "设计-批次号列表", businessType = BusinessType.INSERT)
|
||||
@Log(title = "设计-新增批次号", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/pcAdd")
|
||||
public R<Void> pcAdd(@Validated(AddGroup.class) @RequestBody BusCailiaoshebeiPiciAddReq bo) {
|
||||
@ -235,5 +235,17 @@ public class BusCailiaoshebeiController extends BaseController {
|
||||
return toAjax(busCailiaoshebeiService.updateByPlanBo(bo));
|
||||
}
|
||||
|
||||
//===============================物资-工程量清单===============================
|
||||
|
||||
private final IBusBillofquantitiesVersionsService busBillofquantitiesVersionsService;
|
||||
|
||||
/**
|
||||
* 获取工程量清单
|
||||
*/
|
||||
@SaCheckPermission("design:cailiaoshebei:obtainTheList")
|
||||
@GetMapping("/obtainTheList")
|
||||
public R<List<ObtainTheListRes>> obtainTheList(ObtainTheListReq bo, PageQuery pageQuery) {
|
||||
return R.ok(busBillofquantitiesVersionsService.obtainTheList(bo));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,131 @@
|
||||
package org.dromara.cailiaoshebei.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.dromara.cailiaoshebei.domain.dto.BusLtnDto;
|
||||
import org.dromara.common.utils.logistics.LogisticsInquiryDemo;
|
||||
import org.dromara.common.utils.logistics.LogisticsInquiryUtil;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusLtnVo;
|
||||
import org.dromara.cailiaoshebei.domain.bo.BusLtnBo;
|
||||
import org.dromara.cailiaoshebei.service.IBusLtnService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 物资-物流单号
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-14
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/cailiaoshebei/ltn")
|
||||
public class BusLtnController extends BaseController {
|
||||
|
||||
private final IBusLtnService busLtnService;
|
||||
|
||||
/**
|
||||
* 查询物资-物流单号列表
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:ltn:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<BusLtnVo> list(BusLtnBo bo, PageQuery pageQuery) {
|
||||
return busLtnService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出物资-物流单号列表
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:ltn:export")
|
||||
@Log(title = "物资-物流单号", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(BusLtnBo bo, HttpServletResponse response) {
|
||||
List<BusLtnVo> list = busLtnService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "物资-物流单号", BusLtnVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取物资-物流单号详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:ltn:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<BusLtnVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(busLtnService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增物资-物流单号
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:ltn:add")
|
||||
@Log(title = "物资-物流单号", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody BusLtnBo bo) {
|
||||
return toAjax(busLtnService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物资-物流单号
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:ltn:edit")
|
||||
@Log(title = "物资-物流单号", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BusLtnBo bo) {
|
||||
return toAjax(busLtnService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除物资-物流单号
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:ltn:remove")
|
||||
@Log(title = "物资-物流单号", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(busLtnService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增物资-物流单号
|
||||
*/
|
||||
@Log(title = "物资-物流单号", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/link")
|
||||
public R<Void> linkAdd(@RequestBody BusLtnDto dto) {
|
||||
return toAjax(busLtnService.linkAdd(dto));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取物流信息
|
||||
*
|
||||
* @param ltn 物流单号
|
||||
*/
|
||||
@GetMapping("/logistics/{ltn}")
|
||||
public R<LogisticsInquiryDemo> getInfo(@NotNull(message = "物流单号不能为空")
|
||||
@PathVariable String ltn) {
|
||||
return R.ok(LogisticsInquiryUtil.aLiLogisticsInquiry(ltn));
|
||||
}
|
||||
|
||||
}
|
@ -183,6 +183,4 @@ public class BusMaterialbatchdemandplanController extends BaseController {
|
||||
// return toAjax(busMaterialbatchdemandplanService.deleteWithValidByIds(List.of(ids), true));
|
||||
// }
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ public class BusMaterialsorderController extends BaseController {
|
||||
* @param batchNumber 主键
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:materialsorder:spQuery")
|
||||
@GetMapping("//{batchNumber}")
|
||||
@GetMapping("/spQuery/{batchNumber}")
|
||||
public R<BusCailiaoshebeiPici> spQuery(@NotNull(message = "主键不能为空") @PathVariable String batchNumber) {
|
||||
return R.ok(busCailiaoshebeiPiciService.queryByBatchNumber(batchNumber));
|
||||
}
|
||||
@ -117,6 +117,14 @@ public class BusMaterialsorderController extends BaseController {
|
||||
if (upEntity.isEmpty()){
|
||||
throw new ServiceException("请选择要修改的行");
|
||||
}
|
||||
//如果批次号状态不为草稿,那么不允许修改
|
||||
for (BusMaterialsorder busMaterialsorder : upEntity) {
|
||||
busMaterialsorder.setBatchNumber(req.getBatchNumber());
|
||||
BusCailiaoshebeiPici busCailiaoshebeiPici = busCailiaoshebeiPiciService.queryByBatchNumber(busMaterialsorder.getBatchNumber());
|
||||
if (!"draft".equals(busCailiaoshebeiPici.getApprovalOrder())){
|
||||
throw new ServiceException("批次号状态不为草稿,不允许修改");
|
||||
}
|
||||
}
|
||||
return toAjax(busMaterialsorderService.updateBatchById(upEntity));
|
||||
}
|
||||
|
||||
@ -130,6 +138,16 @@ public class BusMaterialsorderController extends BaseController {
|
||||
return busMaterialsorderService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 订货-批次号列表(供货商修改版)
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:materialsorder:pcPlanListGHS")
|
||||
@GetMapping("/pcPlanListGHS")
|
||||
public TableDataInfo<BusCailiaoshebeiPiciVo> pcPlanListGHS(BusCailiaoshebeiPiciPcListReq bo, PageQuery pageQuery) {
|
||||
BusCailiaoshebeiPiciBo busCailiaoshebeiPiciBo = BeanUtil.copyProperties(bo, BusCailiaoshebeiPiciBo.class);
|
||||
return busCailiaoshebeiPiciService.queryPageList(busCailiaoshebeiPiciBo, pageQuery);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//================================物资设备批次需求计划执行跟踪================================
|
||||
@ -163,8 +181,8 @@ public class BusMaterialsorderController extends BaseController {
|
||||
@Log(title = "跟踪-变更物资设备执行状态", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/changeTheStatusOfTheMaterials")
|
||||
public R<Void> changeTheStatusOfTheMaterials(ChangeTheStatusOfTheMaterialsReq bo,@RequestPart("file") MultipartFile file) {
|
||||
System.out.println("------------"+bo.toString());
|
||||
public R<Void> changeTheStatusOfTheMaterials(ChangeTheStatusOfTheMaterialsReq bo,@RequestParam(value = "file", required = false) MultipartFile file) {
|
||||
System.out.println("!!!!!!!!!!!!!!!!!!!!");
|
||||
BusMaterialsorderBo busMaterialsorderBo = BeanUtil.copyProperties(bo, BusMaterialsorderBo.class);
|
||||
return toAjax(busMaterialsorderService.updateByBo(busMaterialsorderBo,file));
|
||||
}
|
||||
|
@ -0,0 +1,132 @@
|
||||
package org.dromara.cailiaoshebei.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.dromara.cailiaoshebei.domain.dto.BusMrpDto;
|
||||
import org.dromara.cailiaoshebei.domain.dto.BusMrpExportDto;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusMrpVo;
|
||||
import org.dromara.design.domain.dto.desCollect.DesCollectBatchDto;
|
||||
import org.dromara.design.domain.vo.DesCollectVo;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusMrpBaseVo;
|
||||
import org.dromara.cailiaoshebei.domain.bo.BusMrpBaseBo;
|
||||
import org.dromara.cailiaoshebei.service.IBusMrpBaseService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 物资-批次需求计划基础信息
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/cailiaoshebei/mrpBase")
|
||||
public class BusMrpBaseController extends BaseController {
|
||||
|
||||
private final IBusMrpBaseService busMrpBaseService;
|
||||
|
||||
/**
|
||||
* 查询物资-批次需求计划基础信息列表
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:mrpBase:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<BusMrpBaseVo> list(BusMrpBaseBo bo, PageQuery pageQuery) {
|
||||
return busMrpBaseService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出物资-批次需求计划基础信息列表
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:mrpBase:export")
|
||||
@Log(title = "物资-批次需求计划基础信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(BusMrpBaseBo bo, HttpServletResponse response) {
|
||||
List<BusMrpBaseVo> list = busMrpBaseService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "物资-批次需求计划基础信息", BusMrpBaseVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取物资-批次需求计划基础信息详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:mrpBase:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<BusMrpVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(busMrpBaseService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增物资-批次需求计划基础信息
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:mrpBase:add")
|
||||
@Log(title = "物资-批次需求计划基础信息", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody BusMrpBaseBo bo) {
|
||||
return toAjax(busMrpBaseService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物资-批次需求计划基础信息
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:mrpBase:edit")
|
||||
@Log(title = "物资-批次需求计划基础信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BusMrpBaseBo bo) {
|
||||
return toAjax(busMrpBaseService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除物资-批次需求计划基础信息
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:mrpBase:remove")
|
||||
@Log(title = "物资-批次需求计划基础信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(busMrpBaseService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增或修改
|
||||
*/
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/batch")
|
||||
public R<Void> batchAddOrUpdate(@RequestBody BusMrpDto dto) {
|
||||
return toAjax(busMrpBaseService.batchAddOrUpdate(dto));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导入物资需求批次计划
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:mrpBase:add")
|
||||
@Log(title = "物资-批次需求计划基础信息", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/import")
|
||||
public R<Void> importData(BusMrpExportDto dto) {
|
||||
return toAjax(busMrpBaseService.importData(dto));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
package org.dromara.cailiaoshebei.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusPhysicalsupplyVo;
|
||||
import org.dromara.cailiaoshebei.domain.bo.BusPhysicalsupplyBo;
|
||||
import org.dromara.cailiaoshebei.service.IBusPhysicalsupplyService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 物资-使用情况
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-14
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/cailiaoshebei/physicalsupply")
|
||||
public class BusPhysicalsupplyController extends BaseController {
|
||||
|
||||
private final IBusPhysicalsupplyService busPhysicalsupplyService;
|
||||
|
||||
/**
|
||||
* 查询物资-使用情况列表
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:physicalsupply:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<BusPhysicalsupplyVo> list(BusPhysicalsupplyBo bo, PageQuery pageQuery) {
|
||||
return busPhysicalsupplyService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出物资-使用情况列表
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:physicalsupply:export")
|
||||
@Log(title = "物资-使用情况", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(BusPhysicalsupplyBo bo, HttpServletResponse response) {
|
||||
List<BusPhysicalsupplyVo> list = busPhysicalsupplyService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "物资-使用情况", BusPhysicalsupplyVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取物资-使用情况详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:physicalsupply:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<BusPhysicalsupplyVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(busPhysicalsupplyService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增物资-使用情况
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:physicalsupply:add")
|
||||
@Log(title = "物资-使用情况", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody BusPhysicalsupplyBo bo) {
|
||||
return toAjax(busPhysicalsupplyService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物资-使用情况
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:physicalsupply:edit")
|
||||
@Log(title = "物资-使用情况", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BusPhysicalsupplyBo bo) {
|
||||
return toAjax(busPhysicalsupplyService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除物资-使用情况
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:physicalsupply:remove")
|
||||
@Log(title = "物资-使用情况", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(busPhysicalsupplyService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
package org.dromara.cailiaoshebei.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusPhysicalsupplySonVo;
|
||||
import org.dromara.cailiaoshebei.domain.bo.BusPhysicalsupplySonBo;
|
||||
import org.dromara.cailiaoshebei.service.IBusPhysicalsupplySonService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 物资-使用情况子数据
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-14
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/cailiaoshebei/physicalsupplySon")
|
||||
public class BusPhysicalsupplySonController extends BaseController {
|
||||
|
||||
private final IBusPhysicalsupplySonService busPhysicalsupplySonService;
|
||||
|
||||
/**
|
||||
* 查询物资-使用情况子数据列表
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:physicalsupplySon:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<BusPhysicalsupplySonVo> list(BusPhysicalsupplySonBo bo, PageQuery pageQuery) {
|
||||
return busPhysicalsupplySonService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出物资-使用情况子数据列表
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:physicalsupplySon:export")
|
||||
@Log(title = "物资-使用情况子数据", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(BusPhysicalsupplySonBo bo, HttpServletResponse response) {
|
||||
List<BusPhysicalsupplySonVo> list = busPhysicalsupplySonService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "物资-使用情况子数据", BusPhysicalsupplySonVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取物资-使用情况子数据详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:physicalsupplySon:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<BusPhysicalsupplySonVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(busPhysicalsupplySonService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增物资-使用情况子数据
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:physicalsupplySon:add")
|
||||
@Log(title = "物资-使用情况子数据", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody BusPhysicalsupplySonBo bo) {
|
||||
return toAjax(busPhysicalsupplySonService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物资-使用情况子数据
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:physicalsupplySon:edit")
|
||||
@Log(title = "物资-使用情况子数据", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BusPhysicalsupplySonBo bo) {
|
||||
return toAjax(busPhysicalsupplySonService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除物资-使用情况子数据
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:physicalsupplySon:remove")
|
||||
@Log(title = "物资-使用情况子数据", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(busPhysicalsupplySonService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
package org.dromara.cailiaoshebei.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusPlanDocAssociationVo;
|
||||
import org.dromara.cailiaoshebei.domain.bo.BusPlanDocAssociationBo;
|
||||
import org.dromara.cailiaoshebei.service.IBusPlanDocAssociationService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 物资-批次需求计划与采购单关联
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/cailiaoshebei/planDocAssociation")
|
||||
public class BusPlanDocAssociationController extends BaseController {
|
||||
|
||||
private final IBusPlanDocAssociationService busPlanDocAssociationService;
|
||||
|
||||
/**
|
||||
* 查询物资-批次需求计划与采购单关联列表
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:planDocAssociation:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<BusPlanDocAssociationVo> list(BusPlanDocAssociationBo bo, PageQuery pageQuery) {
|
||||
return busPlanDocAssociationService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出物资-批次需求计划与采购单关联列表
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:planDocAssociation:export")
|
||||
@Log(title = "物资-批次需求计划与采购单关联", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(BusPlanDocAssociationBo bo, HttpServletResponse response) {
|
||||
List<BusPlanDocAssociationVo> list = busPlanDocAssociationService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "物资-批次需求计划与采购单关联", BusPlanDocAssociationVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取物资-批次需求计划与采购单关联详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:planDocAssociation:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<BusPlanDocAssociationVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(busPlanDocAssociationService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增物资-批次需求计划与采购单关联
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:planDocAssociation:add")
|
||||
@Log(title = "物资-批次需求计划与采购单关联", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody BusPlanDocAssociationBo bo) {
|
||||
return toAjax(busPlanDocAssociationService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物资-批次需求计划与采购单关联
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:planDocAssociation:edit")
|
||||
@Log(title = "物资-批次需求计划与采购单关联", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BusPlanDocAssociationBo bo) {
|
||||
return toAjax(busPlanDocAssociationService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除物资-批次需求计划与采购单关联
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:planDocAssociation:remove")
|
||||
@Log(title = "物资-批次需求计划与采购单关联", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(busPlanDocAssociationService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@ -0,0 +1,146 @@
|
||||
package org.dromara.cailiaoshebei.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.cailiaoshebei.domain.BusPlanDocAssociation;
|
||||
import org.dromara.cailiaoshebei.domain.bo.BusMaterialbatchdemandplanBo;
|
||||
import org.dromara.cailiaoshebei.domain.bo.BusPurchaseDocBo;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusMaterialbatchdemandplanVo;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusPurchaseDocVo;
|
||||
import org.dromara.cailiaoshebei.service.IBusMaterialbatchdemandplanService;
|
||||
import org.dromara.cailiaoshebei.service.IBusPlanDocAssociationService;
|
||||
import org.dromara.cailiaoshebei.service.IBusPurchaseDocService;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物资-采购联系单
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/cailiaoshebei/purchaseDoc")
|
||||
public class BusPurchaseDocController extends BaseController {
|
||||
|
||||
private final IBusPurchaseDocService busPurchaseDocService;
|
||||
|
||||
private final IBusMaterialbatchdemandplanService materialbatchdemandplanService;
|
||||
|
||||
private final IBusPlanDocAssociationService planDocAssociationService;
|
||||
|
||||
/**
|
||||
* 查询物资-采购联系单列表
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:purchaseDoc:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<BusPurchaseDocVo> list(BusPurchaseDocBo bo, PageQuery pageQuery) {
|
||||
return busPurchaseDocService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出物资-采购联系单列表
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:purchaseDoc:export")
|
||||
@Log(title = "物资-采购联系单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(BusPurchaseDocBo bo, HttpServletResponse response) {
|
||||
List<BusPurchaseDocVo> list = busPurchaseDocService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "物资-采购联系单", BusPurchaseDocVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据主键导出物资-采购联系单
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:purchaseDoc:downloadWord")
|
||||
@Log(title = "物资-采购联系单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export/word")
|
||||
public void exportWordById(@NotNull(message = "主键不能为空") Long id,
|
||||
HttpServletResponse response) {
|
||||
busPurchaseDocService.exportWordById(id, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取物资-采购联系单详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:purchaseDoc:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<BusPurchaseDocVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(busPurchaseDocService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增物资-采购联系单
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:purchaseDoc:add")
|
||||
@Log(title = "物资-采购联系单", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody BusPurchaseDocBo bo) {
|
||||
return toAjax(busPurchaseDocService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物资-采购联系单
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:purchaseDoc:edit")
|
||||
@Log(title = "物资-采购联系单", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BusPurchaseDocBo bo) {
|
||||
return toAjax(busPurchaseDocService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除物资-采购联系单
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:purchaseDoc:remove")
|
||||
@Log(title = "物资-采购联系单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(busPurchaseDocService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询采购单关联的计划
|
||||
*/
|
||||
@GetMapping("/planList/{id}")
|
||||
public R<List<BusMaterialbatchdemandplanVo>> list(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
List<BusPlanDocAssociation> list = planDocAssociationService.list(Wrappers.lambdaQuery(BusPlanDocAssociation.class)
|
||||
.eq(BusPlanDocAssociation::getDocId, id));
|
||||
List<Long> list1 = list.stream().map(BusPlanDocAssociation::getPlanId).toList();
|
||||
if (list1.isEmpty()) {
|
||||
return R.ok(new ArrayList<>());
|
||||
}
|
||||
BusMaterialbatchdemandplanBo bo = new BusMaterialbatchdemandplanBo();
|
||||
bo.setIds(list1);
|
||||
return R.ok(materialbatchdemandplanService.queryList(bo));
|
||||
}
|
||||
}
|
@ -0,0 +1,130 @@
|
||||
package org.dromara.cailiaoshebei.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusPurchaseUserVo;
|
||||
import org.dromara.cailiaoshebei.domain.bo.BusPurchaseUserBo;
|
||||
import org.dromara.cailiaoshebei.service.IBusPurchaseUserService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 物资采购人员
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/cailiaoshebei/purchaseUser")
|
||||
public class BusPurchaseUserController extends BaseController {
|
||||
|
||||
private final IBusPurchaseUserService busPurchaseUserService;
|
||||
|
||||
/**
|
||||
* 查询物资采购人员列表
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:purchaseUser:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<BusPurchaseUserVo> list(BusPurchaseUserBo bo, PageQuery pageQuery) {
|
||||
return busPurchaseUserService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出物资采购人员列表
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:purchaseUser:export")
|
||||
@Log(title = "物资采购人员", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(BusPurchaseUserBo bo, HttpServletResponse response) {
|
||||
List<BusPurchaseUserVo> list = busPurchaseUserService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "物资采购人员", BusPurchaseUserVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取物资采购人员详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:purchaseUser:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<BusPurchaseUserVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(busPurchaseUserService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增物资采购人员
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:purchaseUser:add")
|
||||
@Log(title = "物资采购人员", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody BusPurchaseUserBo bo) {
|
||||
return toAjax(busPurchaseUserService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物资采购人员
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:purchaseUser:edit")
|
||||
@Log(title = "物资采购人员", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BusPurchaseUserBo bo) {
|
||||
return toAjax(busPurchaseUserService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除物资采购人员
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:purchaseUser:remove")
|
||||
@Log(title = "物资采购人员", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(busPurchaseUserService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增或修改物资采购人员
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:purchaseUser:add")
|
||||
@Log(title = "物资采购人员", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/addOrUpdate")
|
||||
public R<Void> addOrUpdate(@Validated(AddGroup.class) @RequestBody BusPurchaseUserBo bo) {
|
||||
return toAjax(busPurchaseUserService.addOrUpdate(bo));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据项目获取物资采购人员详细信息
|
||||
*
|
||||
* @param projectId 项目id
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:purchaseUser:query")
|
||||
@GetMapping("/byProject/{projectId}")
|
||||
public R<BusPurchaseUserVo> getInfoByProject(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long projectId) {
|
||||
return R.ok(busPurchaseUserService.getInfoByProject(projectId));
|
||||
}
|
||||
}
|
@ -0,0 +1,131 @@
|
||||
package org.dromara.cailiaoshebei.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.dromara.cailiaoshebei.domain.bo.BusTotalsupplyplanAuditBo;
|
||||
import org.dromara.cailiaoshebei.domain.bo.MasterDataReq;
|
||||
import org.dromara.cailiaoshebei.domain.bo.TotalsupplyplanQueryListReq;
|
||||
import org.dromara.cailiaoshebei.domain.dto.MasterDataReqDto;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusTotalsupplyplanAuditVo;
|
||||
import org.dromara.cailiaoshebei.service.IBusTotalsupplyplanAuditService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusTotalsupplyplanVo;
|
||||
import org.dromara.cailiaoshebei.domain.bo.BusTotalsupplyplanBo;
|
||||
import org.dromara.cailiaoshebei.service.IBusTotalsupplyplanService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 物资-总供应计划
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/design/totalsupplyplan")
|
||||
public class BusTotalsupplyplanController extends BaseController {
|
||||
|
||||
private final IBusTotalsupplyplanService busTotalsupplyplanService;
|
||||
private final IBusTotalsupplyplanAuditService busTotalsupplyplanAuditService;
|
||||
|
||||
/**
|
||||
* 获取主数据列表
|
||||
*/
|
||||
@SaCheckPermission("design:totalsupplyplan:queryList")
|
||||
@GetMapping("/queryList")
|
||||
public R<List<BusTotalsupplyplanAuditVo>> queryList(TotalsupplyplanQueryListReq bo) {
|
||||
BusTotalsupplyplanAuditBo busTotalsupplyplanAuditBo = BeanUtil.copyProperties(bo, BusTotalsupplyplanAuditBo.class);
|
||||
return R.ok(busTotalsupplyplanAuditService.queryList(busTotalsupplyplanAuditBo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据主数据获取到详情
|
||||
*/
|
||||
@SaCheckPermission("design:totalsupplyplan:masterData")
|
||||
@GetMapping("/masterData")
|
||||
public R<MasterDataReqDto> masterData(MasterDataReq bo) {
|
||||
return R.ok(busTotalsupplyplanService.masterData(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询物资-总供应计划列表
|
||||
*/
|
||||
@SaCheckPermission("design:totalsupplyplan:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<BusTotalsupplyplanVo> list(BusTotalsupplyplanBo bo, PageQuery pageQuery) {
|
||||
return busTotalsupplyplanService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出物资-总供应计划列表
|
||||
*/
|
||||
@SaCheckPermission("design:totalsupplyplan:export")
|
||||
@Log(title = "物资-总供应计划", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(BusTotalsupplyplanBo bo, HttpServletResponse response) {
|
||||
List<BusTotalsupplyplanVo> list = busTotalsupplyplanService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "物资-总供应计划", BusTotalsupplyplanVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取物资-总供应计划详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("design:totalsupplyplan:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<BusTotalsupplyplanVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(busTotalsupplyplanService.queryById(id));
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 新增物资-总供应计划
|
||||
// */
|
||||
// @SaCheckPermission("design:totalsupplyplan:add")
|
||||
// @Log(title = "物资-总供应计划", businessType = BusinessType.INSERT)
|
||||
// @RepeatSubmit()
|
||||
// @PostMapping()
|
||||
// public R<Void> add(@Validated(AddGroup.class) @RequestBody BusTotalsupplyplanBo bo) {
|
||||
// return toAjax(busTotalsupplyplanService.insertByBo(bo));
|
||||
// }
|
||||
|
||||
/**
|
||||
* 修改物资-总供应计划
|
||||
*/
|
||||
@SaCheckPermission("design:totalsupplyplan:edit")
|
||||
@Log(title = "物资-总供应计划", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BusTotalsupplyplanBo bo) {
|
||||
return toAjax(busTotalsupplyplanService.updateByBo(bo));
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 删除物资-总供应计划
|
||||
// *
|
||||
// * @param ids 主键串
|
||||
// */
|
||||
// @SaCheckPermission("design:totalsupplyplan:remove")
|
||||
// @Log(title = "物资-总供应计划", businessType = BusinessType.DELETE)
|
||||
// @DeleteMapping("/{ids}")
|
||||
// public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
// @PathVariable Long[] ids) {
|
||||
// return toAjax(busTotalsupplyplanService.deleteWithValidByIds(List.of(ids), true));
|
||||
// }
|
||||
}
|
@ -10,4 +10,5 @@ public class constant {
|
||||
public static final String MaterialsPlans = "materialsPlans"; //计划
|
||||
public static final String BatchRequirements = "batchRequirements"; //需求
|
||||
public static final String EquipmentOrdering = "equipmentOrdering"; //订货
|
||||
public static final String PURCHASE_DOC_TEMPLATE_PATH = "template/物资采购联系单模版.docx"; // 采购联系单文件路径
|
||||
}
|
||||
|
@ -0,0 +1,57 @@
|
||||
package org.dromara.cailiaoshebei.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 物资-物流单号对象 bus_ltn
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("bus_ltn")
|
||||
public class BusLtn extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 采购联系单id
|
||||
*/
|
||||
private Long docId;
|
||||
|
||||
/**
|
||||
* 计划id
|
||||
*/
|
||||
private Long planId;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private BigDecimal num;
|
||||
|
||||
/**
|
||||
* 物流单号
|
||||
*/
|
||||
private String ltn;
|
||||
|
||||
|
||||
}
|
@ -49,6 +49,11 @@ public class BusMaterialbatchdemandplan extends BaseEntity {
|
||||
*/
|
||||
private Long suppliespriceId;
|
||||
|
||||
/**
|
||||
* 基础信息ID
|
||||
*/
|
||||
private Long mrpBaseId;
|
||||
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
@ -94,5 +99,10 @@ public class BusMaterialbatchdemandplan extends BaseEntity {
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 质量标准
|
||||
*/
|
||||
private String qs;
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,57 @@
|
||||
package org.dromara.cailiaoshebei.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 物资-批次需求计划基础信息对象 bus_mrp_base
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("bus_mrp_base")
|
||||
public class BusMrpBase extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 计划编号
|
||||
*/
|
||||
private String planCode;
|
||||
|
||||
/**
|
||||
* 物资类别
|
||||
*/
|
||||
private String matCat;
|
||||
|
||||
/**
|
||||
* 编制日期
|
||||
*/
|
||||
private LocalDate preparedDate;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,98 @@
|
||||
package org.dromara.cailiaoshebei.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 物资-使用情况对象 bus_physicalsupply
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("bus_physicalsupply")
|
||||
public class BusPhysicalsupply extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 材料名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
private String specification;
|
||||
|
||||
/**
|
||||
* 供应商
|
||||
*/
|
||||
private String supplier;
|
||||
|
||||
/**
|
||||
* 合同签订时间
|
||||
*/
|
||||
private Date contractSigning;
|
||||
|
||||
/**
|
||||
* 供货要求
|
||||
*/
|
||||
private String supplyRequirements;
|
||||
|
||||
/**
|
||||
* 生产周期
|
||||
*/
|
||||
private Long productionPhase;
|
||||
|
||||
/**
|
||||
* 运算周期
|
||||
*/
|
||||
private Long executionCycle;
|
||||
|
||||
/**
|
||||
* 安装量
|
||||
*/
|
||||
private String installationQuantity;
|
||||
|
||||
/**
|
||||
* 安装比列
|
||||
*/
|
||||
private String installationRatio;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 采购提交
|
||||
*/
|
||||
private String purchaseSubmission;
|
||||
|
||||
/**
|
||||
* 材料提交
|
||||
*/
|
||||
private String submissionMaterials;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,168 @@
|
||||
package org.dromara.cailiaoshebei.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 物资-使用情况子数据对象 bus_physicalsupply_son
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("bus_physicalsupply_son")
|
||||
public class BusPhysicalsupplySon extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 使用情况ID
|
||||
*/
|
||||
private Long physicalsupplyId;
|
||||
|
||||
/**
|
||||
* 到货要求
|
||||
*/
|
||||
private String deliveryRequirements;
|
||||
|
||||
/**
|
||||
* 转换为合同
|
||||
*/
|
||||
private String transition;
|
||||
|
||||
/**
|
||||
* 批次
|
||||
*/
|
||||
private String batch;
|
||||
|
||||
/**
|
||||
* 联系单下达时间
|
||||
*/
|
||||
private Date issuanceTime;
|
||||
|
||||
/**
|
||||
* 要求到货时间
|
||||
*/
|
||||
private Date requireDelivery;
|
||||
|
||||
/**
|
||||
* 要求到货数量
|
||||
*/
|
||||
private String requiredQuantity;
|
||||
|
||||
/**
|
||||
* 采购备注
|
||||
*/
|
||||
private String cgRemark;
|
||||
|
||||
/**
|
||||
* 计划到货时间
|
||||
*/
|
||||
private Date scheduledDelivery;
|
||||
|
||||
/**
|
||||
* 计划到货数量
|
||||
*/
|
||||
private String plannedQuantity;
|
||||
|
||||
/**
|
||||
* 差异量
|
||||
*/
|
||||
private String differenceQuantity;
|
||||
|
||||
/**
|
||||
* 供应商备注
|
||||
*/
|
||||
private String gysRemark;
|
||||
|
||||
/**
|
||||
* 实际到货时间
|
||||
*/
|
||||
private Date actualDelivery;
|
||||
|
||||
/**
|
||||
* 验收移交时间
|
||||
*/
|
||||
private Date acceptanceCheck;
|
||||
|
||||
/**
|
||||
* 交接方式
|
||||
*/
|
||||
private String associate;
|
||||
|
||||
/**
|
||||
* 实际到货验收数量
|
||||
*/
|
||||
private String actualAcceptance;
|
||||
|
||||
/**
|
||||
* 到货差异量
|
||||
*/
|
||||
private String dhDifferenceQuantity;
|
||||
|
||||
/**
|
||||
* 逾期状态
|
||||
*/
|
||||
private String expectedState;
|
||||
|
||||
/**
|
||||
* 到货备注
|
||||
*/
|
||||
private String dhRemark;
|
||||
|
||||
/**
|
||||
* 货物金额
|
||||
*/
|
||||
private String cargoAmount;
|
||||
|
||||
/**
|
||||
* 结算金额
|
||||
*/
|
||||
private String settlementAmount;
|
||||
|
||||
/**
|
||||
* 预付款
|
||||
*/
|
||||
private String advance;
|
||||
|
||||
/**
|
||||
* 投料款
|
||||
*/
|
||||
private String feed;
|
||||
|
||||
/**
|
||||
* 到货验收款
|
||||
*/
|
||||
private String acceptancePayment;
|
||||
|
||||
/**
|
||||
* 质保金
|
||||
*/
|
||||
private String qualityGuarantee;
|
||||
|
||||
/**
|
||||
* 调试款
|
||||
*/
|
||||
private String debugging;
|
||||
|
||||
/**
|
||||
* 结算备注
|
||||
*/
|
||||
private String jsRemark;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package org.dromara.cailiaoshebei.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 物资-批次需求计划与采购单关联对象 bus_plan_doc_association
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("bus_plan_doc_association")
|
||||
public class BusPlanDocAssociation extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 计划id
|
||||
*/
|
||||
private Long planId;
|
||||
|
||||
/**
|
||||
* 采购联系单id
|
||||
*/
|
||||
private Long docId;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,135 @@
|
||||
package org.dromara.cailiaoshebei.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 物资-采购联系单对象 bus_purchase_doc
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("bus_purchase_doc")
|
||||
public class BusPurchaseDoc extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 1-采购单,2-补货单
|
||||
*/
|
||||
private String docType;
|
||||
|
||||
/**
|
||||
* 采购单编号
|
||||
*/
|
||||
private String docCode;
|
||||
|
||||
/**
|
||||
* 供应商id
|
||||
*/
|
||||
private Long supplierId;
|
||||
|
||||
/**
|
||||
* 供应商
|
||||
*/
|
||||
private String supplier;
|
||||
|
||||
/**
|
||||
* 事由
|
||||
*/
|
||||
private String reason;
|
||||
|
||||
/**
|
||||
* 设备统称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 到货日期
|
||||
*/
|
||||
private LocalDate arrivalDate;
|
||||
|
||||
/**
|
||||
* 设计负责人联系方式
|
||||
*/
|
||||
private String designDirectorTel;
|
||||
|
||||
/**
|
||||
* 现场技术负责人联系方式
|
||||
*/
|
||||
private String technicalDirectorTel;
|
||||
|
||||
/**
|
||||
* 收货地址
|
||||
*/
|
||||
private String receivingAddress;
|
||||
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
private String contacts;
|
||||
|
||||
/**
|
||||
* 项目负责人
|
||||
*/
|
||||
private String projectDirector;
|
||||
|
||||
/**
|
||||
* 采购经办人
|
||||
*/
|
||||
private String purchasingAgent;
|
||||
|
||||
/**
|
||||
* 日期
|
||||
*/
|
||||
private LocalDate preparedDate;
|
||||
|
||||
/**
|
||||
* 反馈文件地址
|
||||
*/
|
||||
private String feedbackUrl;
|
||||
|
||||
/**
|
||||
* 签收单位
|
||||
*/
|
||||
private String signingUnit;
|
||||
|
||||
/**
|
||||
* 签收人
|
||||
*/
|
||||
private String signingPerson;
|
||||
|
||||
/**
|
||||
* 签收日期
|
||||
*/
|
||||
private LocalDate signingDate;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 计划基础ID
|
||||
*/
|
||||
private Long mrpBaseId;
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package org.dromara.cailiaoshebei.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 物资采购人员对象 bus_purchase_user
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("bus_purchase_user")
|
||||
public class BusPurchaseUser extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 采购人员id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 采购人员姓名
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,119 @@
|
||||
package org.dromara.cailiaoshebei.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 物资-总供应计划对象 bus_totalsupplyplan
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("bus_totalsupplyplan")
|
||||
public class BusTotalsupplyplan extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目Id
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
private String batchNumber;
|
||||
|
||||
/**
|
||||
* 编制日期
|
||||
*/
|
||||
private LocalDate compileDate;
|
||||
|
||||
/**
|
||||
* 计划编号
|
||||
*/
|
||||
private String planNumber;
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private String num;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
private String specification;
|
||||
|
||||
/**
|
||||
* 材质
|
||||
*/
|
||||
private String texture;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private Long quantity;
|
||||
|
||||
/**
|
||||
* 品牌
|
||||
*/
|
||||
private String brand;
|
||||
|
||||
/**
|
||||
* 质量标准
|
||||
*/
|
||||
private String qualityStandard;
|
||||
|
||||
/**
|
||||
* 预计使用日期
|
||||
*/
|
||||
private Date dateService;
|
||||
|
||||
/**
|
||||
* 交货地点
|
||||
*/
|
||||
private String deliveryPoints;
|
||||
|
||||
/**
|
||||
* 使用部位
|
||||
*/
|
||||
private String partUsed;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package org.dromara.cailiaoshebei.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 物资-总供应计划审核对象 bus_totalsupplyplan_audit
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("bus_totalsupplyplan_audit")
|
||||
public class BusTotalsupplyplanAudit extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目Id
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
private String batchNumber;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
@ -100,7 +100,7 @@ public class BusCailiaoshebeiAddReq extends BaseEntity {
|
||||
/**
|
||||
* 物料编码 (必填)
|
||||
*/
|
||||
@NotBlank(message = "物料编码不能为空", groups = { AddGroup.class })
|
||||
// @NotBlank(message = "物料编码不能为空", groups = { AddGroup.class })
|
||||
@Size(max = 128, message = "物料编码长度不能超过255个字符", groups = {AddGroup.class, EditGroup.class})
|
||||
private String materialCode;
|
||||
|
||||
|
@ -28,6 +28,12 @@ public class BusCailiaoshebeiEditReq extends BaseEntity {
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 批次号不能为空
|
||||
*/
|
||||
@NotNull(message = "批次号不能为空", groups = { EditGroup.class })
|
||||
private String batchNumber;
|
||||
|
||||
/**
|
||||
* 供货商ID (必填)
|
||||
*/
|
||||
|
@ -27,4 +27,6 @@ public class BusCailiaoshebeiPiciPcListReq implements Serializable {
|
||||
*/
|
||||
@NotBlank(message = "批次号不能为空")
|
||||
private String batchNumber;
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,60 @@
|
||||
package org.dromara.cailiaoshebei.domain.bo;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.BusLtn;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 物资-物流单号业务对象 bus_ltn
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = BusLtn.class, reverseConvertGenerate = false)
|
||||
public class BusLtnBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 采购联系单id
|
||||
*/
|
||||
@NotNull(message = "采购联系单id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long docId;
|
||||
|
||||
/**
|
||||
* 计划id
|
||||
*/
|
||||
@NotNull(message = "计划id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long planId;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private BigDecimal num;
|
||||
|
||||
/**
|
||||
* 物流单号
|
||||
*/
|
||||
@NotBlank(message = "物流单号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String ltn;
|
||||
|
||||
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
package org.dromara.cailiaoshebei.domain.bo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@ -19,8 +20,15 @@ public class BusMaterialbatchdemandplanAddReq implements Serializable {
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
@NotBlank(message = "批次号不能为空")
|
||||
private String batchNumber;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@NotBlank(message = "项目ID不能为空")
|
||||
private Long projectId;
|
||||
|
||||
|
||||
/**
|
||||
* 新增数据信息
|
||||
|
@ -11,6 +11,8 @@ import jakarta.validation.constraints.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
@ -33,7 +35,6 @@ public class BusMaterialbatchdemandplanBo extends BaseEntity {
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
@NotBlank(message = "批次号不能为空")
|
||||
private String batchNumber;
|
||||
|
||||
/**
|
||||
@ -41,6 +42,11 @@ public class BusMaterialbatchdemandplanBo extends BaseEntity {
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 基础信息ID
|
||||
*/
|
||||
private Long mrpBaseId;
|
||||
|
||||
/**
|
||||
* 材料设备ID
|
||||
*/
|
||||
@ -97,4 +103,14 @@ public class BusMaterialbatchdemandplanBo extends BaseEntity {
|
||||
private String remark;
|
||||
|
||||
|
||||
/**
|
||||
* 质量标准
|
||||
*/
|
||||
private String qs;
|
||||
|
||||
|
||||
/**
|
||||
* 主键集合
|
||||
*/
|
||||
private List<Long> ids;
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ import jakarta.validation.constraints.*;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 物资-设备订货业务对象 bus_materialsorder
|
||||
@ -166,7 +167,4 @@ public class BusMaterialsorderBo extends BaseEntity {
|
||||
* 单据类型(0:无单据 1:签收单,2:退货单 )
|
||||
*/
|
||||
private String billType;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,59 @@
|
||||
package org.dromara.cailiaoshebei.domain.bo;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.BusMrpBase;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 物资-批次需求计划基础信息业务对象 bus_mrp_base
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = BusMrpBase.class, reverseConvertGenerate = false)
|
||||
public class BusMrpBaseBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@NotNull(message = "项目ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 计划编号
|
||||
*/
|
||||
@NotBlank(message = "计划编号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String planCode;
|
||||
|
||||
/**
|
||||
* 物资类别
|
||||
*/
|
||||
private String matCat;
|
||||
|
||||
/**
|
||||
* 编制日期
|
||||
*/
|
||||
private LocalDate preparedDate;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,102 @@
|
||||
package org.dromara.cailiaoshebei.domain.bo;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.BusPhysicalsupply;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 物资-使用情况业务对象 bus_physicalsupply
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = BusPhysicalsupply.class, reverseConvertGenerate = false)
|
||||
public class BusPhysicalsupplyBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 采购1 或 材料2 或 查询所有3
|
||||
*/
|
||||
private String findType;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 材料名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
private String specification;
|
||||
|
||||
/**
|
||||
* 供应商
|
||||
*/
|
||||
private String supplier;
|
||||
|
||||
/**
|
||||
* 合同签订时间
|
||||
*/
|
||||
private Date contractSigning;
|
||||
|
||||
/**
|
||||
* 供货要求
|
||||
*/
|
||||
private String supplyRequirements;
|
||||
|
||||
/**
|
||||
* 生产周期
|
||||
*/
|
||||
private Long productionPhase;
|
||||
|
||||
/**
|
||||
* 运算周期
|
||||
*/
|
||||
private Long executionCycle;
|
||||
|
||||
/**
|
||||
* 安装量
|
||||
*/
|
||||
private String installationQuantity;
|
||||
|
||||
/**
|
||||
* 安装比列
|
||||
*/
|
||||
private String installationRatio;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 采购提交
|
||||
*/
|
||||
private String purchaseSubmission;
|
||||
|
||||
/**
|
||||
* 材料提交
|
||||
*/
|
||||
private String submissionMaterials;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,167 @@
|
||||
package org.dromara.cailiaoshebei.domain.bo;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.BusPhysicalsupplySon;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 物资-使用情况子数据业务对象 bus_physicalsupply_son
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = BusPhysicalsupplySon.class, reverseConvertGenerate = false)
|
||||
public class BusPhysicalsupplySonBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 使用情况ID
|
||||
*/
|
||||
private Long physicalsupplyId;
|
||||
|
||||
/**
|
||||
* 到货要求
|
||||
*/
|
||||
private String deliveryRequirements;
|
||||
|
||||
/**
|
||||
* 转换为合同
|
||||
*/
|
||||
private String transition;
|
||||
|
||||
/**
|
||||
* 批次
|
||||
*/
|
||||
private String batch;
|
||||
|
||||
/**
|
||||
* 联系单下达时间
|
||||
*/
|
||||
private Date issuanceTime;
|
||||
|
||||
/**
|
||||
* 要求到货时间
|
||||
*/
|
||||
private Date requireDelivery;
|
||||
|
||||
/**
|
||||
* 要求到货数量
|
||||
*/
|
||||
private String requiredQuantity;
|
||||
|
||||
/**
|
||||
* 采购备注
|
||||
*/
|
||||
private String cgRemark;
|
||||
|
||||
/**
|
||||
* 计划到货时间
|
||||
*/
|
||||
private Date scheduledDelivery;
|
||||
|
||||
/**
|
||||
* 计划到货数量
|
||||
*/
|
||||
private String plannedQuantity;
|
||||
|
||||
/**
|
||||
* 差异量
|
||||
*/
|
||||
private String differenceQuantity;
|
||||
|
||||
/**
|
||||
* 供应商备注
|
||||
*/
|
||||
private String gysRemark;
|
||||
|
||||
/**
|
||||
* 实际到货时间
|
||||
*/
|
||||
private Date actualDelivery;
|
||||
|
||||
/**
|
||||
* 验收移交时间
|
||||
*/
|
||||
private Date acceptanceCheck;
|
||||
|
||||
/**
|
||||
* 交接方式
|
||||
*/
|
||||
private String associate;
|
||||
|
||||
/**
|
||||
* 实际到货验收数量
|
||||
*/
|
||||
private String actualAcceptance;
|
||||
|
||||
/**
|
||||
* 到货差异量
|
||||
*/
|
||||
private String dhDifferenceQuantity;
|
||||
|
||||
/**
|
||||
* 逾期状态
|
||||
*/
|
||||
private String expectedState;
|
||||
|
||||
/**
|
||||
* 到货备注
|
||||
*/
|
||||
private String dhRemark;
|
||||
|
||||
/**
|
||||
* 货物金额
|
||||
*/
|
||||
private String cargoAmount;
|
||||
|
||||
/**
|
||||
* 结算金额
|
||||
*/
|
||||
private String settlementAmount;
|
||||
|
||||
/**
|
||||
* 预付款
|
||||
*/
|
||||
private String advance;
|
||||
|
||||
/**
|
||||
* 投料款
|
||||
*/
|
||||
private String feed;
|
||||
|
||||
/**
|
||||
* 到货验收款
|
||||
*/
|
||||
private String acceptancePayment;
|
||||
|
||||
/**
|
||||
* 质保金
|
||||
*/
|
||||
private String qualityGuarantee;
|
||||
|
||||
/**
|
||||
* 调试款
|
||||
*/
|
||||
private String debugging;
|
||||
|
||||
/**
|
||||
* 结算备注
|
||||
*/
|
||||
private String jsRemark;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
package org.dromara.cailiaoshebei.domain.bo;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.BusPlanDocAssociation;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 物资-批次需求计划与采购单关联业务对象 bus_plan_doc_association
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = BusPlanDocAssociation.class, reverseConvertGenerate = false)
|
||||
public class BusPlanDocAssociationBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 计划id
|
||||
*/
|
||||
private Long planId;
|
||||
|
||||
/**
|
||||
* 采购联系单id
|
||||
*/
|
||||
private Long docId;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,136 @@
|
||||
package org.dromara.cailiaoshebei.domain.bo;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.BusPurchaseDoc;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物资-采购联系单业务对象 bus_purchase_doc
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = BusPurchaseDoc.class, reverseConvertGenerate = false)
|
||||
public class BusPurchaseDocBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 采购单编号
|
||||
*/
|
||||
private String docCode;
|
||||
|
||||
/**
|
||||
* 供应商id
|
||||
*/
|
||||
private Long supplierId;
|
||||
|
||||
/**
|
||||
* 供应商
|
||||
*/
|
||||
private String supplier;
|
||||
|
||||
/**
|
||||
* 事由
|
||||
*/
|
||||
private String reason;
|
||||
|
||||
/**
|
||||
* 设备统称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 到货日期
|
||||
*/
|
||||
private LocalDate arrivalDate;
|
||||
|
||||
/**
|
||||
* 设计负责人联系方式
|
||||
*/
|
||||
private String designDirectorTel;
|
||||
|
||||
/**
|
||||
* 现场技术负责人联系方式
|
||||
*/
|
||||
private String technicalDirectorTel;
|
||||
|
||||
/**
|
||||
* 收货地址
|
||||
*/
|
||||
private String receivingAddress;
|
||||
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
private String contacts;
|
||||
|
||||
/**
|
||||
* 项目负责人
|
||||
*/
|
||||
private String projectDirector;
|
||||
|
||||
/**
|
||||
* 采购经办人
|
||||
*/
|
||||
private String purchasingAgent;
|
||||
|
||||
/**
|
||||
* 日期
|
||||
*/
|
||||
private LocalDate preparedDate;
|
||||
|
||||
/**
|
||||
* 反馈文件地址
|
||||
*/
|
||||
private String feedbackUrl;
|
||||
|
||||
/**
|
||||
* 签收单位
|
||||
*/
|
||||
private String signingUnit;
|
||||
|
||||
/**
|
||||
* 签收人
|
||||
*/
|
||||
private String signingPerson;
|
||||
|
||||
/**
|
||||
* 签收日期
|
||||
*/
|
||||
private LocalDate signingDate;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 计划基础ID
|
||||
*/
|
||||
private Long mrpBaseId;
|
||||
|
||||
/**
|
||||
* 关联计划
|
||||
*/
|
||||
private List<BusPlanDocAssociationBo> associationList;
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package org.dromara.cailiaoshebei.domain.bo;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.BusPurchaseUser;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 物资采购人员业务对象 bus_purchase_user
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = BusPurchaseUser.class, reverseConvertGenerate = false)
|
||||
public class BusPurchaseUserBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@NotNull(message = "不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
@NotNull(message = "项目id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 采购人员id
|
||||
*/
|
||||
@NotNull(message = "采购人员id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 采购人员姓名
|
||||
*/
|
||||
@NotBlank(message = "采购人员姓名不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String userName;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
package org.dromara.cailiaoshebei.domain.bo;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.BusTotalsupplyplanAudit;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 物资-总供应计划审核业务对象 bus_totalsupplyplan_audit
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = BusTotalsupplyplanAudit.class, reverseConvertGenerate = false)
|
||||
public class BusTotalsupplyplanAuditBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目Id
|
||||
*/
|
||||
@NotNull(message = "项目Id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
@NotBlank(message = "批次号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String batchNumber;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,72 @@
|
||||
package org.dromara.cailiaoshebei.domain.bo;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.BusTotalsupplyplan;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 物资-总供应计划业务对象 bus_totalsupplyplan
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = BusTotalsupplyplan.class, reverseConvertGenerate = false)
|
||||
public class BusTotalsupplyplanBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
private String batchNumber;
|
||||
|
||||
/**
|
||||
* 预计使用日期
|
||||
*/
|
||||
private LocalDate dateService;
|
||||
|
||||
/**
|
||||
* 交货地点
|
||||
*/
|
||||
private String deliveryPoints;
|
||||
|
||||
/**
|
||||
* 使用部位
|
||||
*/
|
||||
private String partUsed;
|
||||
|
||||
/**
|
||||
* 品牌
|
||||
*/
|
||||
private String brand;
|
||||
|
||||
/**
|
||||
* 质量标准
|
||||
*/
|
||||
private String qualityStandard;
|
||||
|
||||
/**
|
||||
* 材质
|
||||
*/
|
||||
private String texture;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
@ -4,6 +4,7 @@ import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
@ -16,9 +17,11 @@ import java.time.LocalDate;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ChangeTheStatusOfTheMaterialsReq implements Serializable {
|
||||
public class ChangeTheStatusOfTheMaterialsReq {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
|
@ -26,7 +26,6 @@ public class MasterDataListReq implements Serializable {
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
@NotBlank(message = "批次号不能为空")
|
||||
private String batchNumber;
|
||||
|
||||
/**
|
||||
|
@ -0,0 +1,28 @@
|
||||
package org.dromara.cailiaoshebei.domain.bo;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Author 铁憨憨
|
||||
* @Date 2025/8/14 11:21
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class MasterDataReq implements Serializable {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
|
||||
}
|
@ -14,6 +14,11 @@ import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ModifyTheOrderFormGYSReq implements Serializable {
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
private String batchNumber;
|
||||
|
||||
/**
|
||||
* 订货-主体数据
|
||||
*/
|
||||
|
@ -0,0 +1,27 @@
|
||||
package org.dromara.cailiaoshebei.domain.bo;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Author 铁憨憨
|
||||
* @Date 2025/8/14 11:32
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class TotalsupplyplanQueryListReq implements Serializable {
|
||||
|
||||
/**
|
||||
* 项目Id
|
||||
*/
|
||||
@NotNull(message = "项目Id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long projectId;
|
||||
|
||||
}
|
@ -38,6 +38,11 @@ public class BusCailiaoshebeiEditPlanDto implements Serializable {
|
||||
*/
|
||||
private String supplierCompany;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private int num;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
|
@ -0,0 +1,44 @@
|
||||
package org.dromara.cailiaoshebei.domain.dto;
|
||||
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.cailiaoshebei.domain.BusLtn;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物资-物流单号业务对象 bus_ltn
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-14
|
||||
*/
|
||||
@Data
|
||||
|
||||
public class BusLtnDto {
|
||||
|
||||
|
||||
/**
|
||||
* 采购联系单id
|
||||
*/
|
||||
private Long docId;
|
||||
|
||||
/**
|
||||
* 供应商
|
||||
*/
|
||||
private String supplier;
|
||||
|
||||
/**
|
||||
* 物流信息
|
||||
*/
|
||||
private List<BusLtnListDto> list;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package org.dromara.cailiaoshebei.domain.dto;
|
||||
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.cailiaoshebei.domain.BusLtn;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 物资-物流单号业务对象 bus_ltn
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-14
|
||||
*/
|
||||
@Data
|
||||
public class BusLtnListDto{
|
||||
|
||||
/**
|
||||
* 计划id不
|
||||
*/
|
||||
@NotNull(message = "计划id不能为空")
|
||||
private Long planId;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private BigDecimal num;
|
||||
|
||||
/**
|
||||
* 物流单号
|
||||
*/
|
||||
@NotBlank(message = "物流单号不能为空")
|
||||
private String ltn;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package org.dromara.cailiaoshebei.domain.dto;
|
||||
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.cailiaoshebei.domain.BusMaterialbatchdemandplan;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物资-批次需求计划业务对象 bus_materialbatchdemandplan
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-02
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = BusMaterialbatchdemandplan.class, reverseConvertGenerate = false)
|
||||
public class BusMaterialbatchdemandplanExportDto extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 设备材料名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
private String specification;
|
||||
|
||||
/**
|
||||
* 计量单位
|
||||
*/
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 需求数量
|
||||
*/
|
||||
private Long demandQuantity;
|
||||
|
||||
/**
|
||||
* 质量标准
|
||||
*/
|
||||
private String qs;
|
||||
|
||||
/**
|
||||
* 计划到场时间
|
||||
*/
|
||||
private LocalDate arrivalTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package org.dromara.cailiaoshebei.domain.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author lilemy
|
||||
* @date 2025-08-18 16:37
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class BusMaterialbatchdemandplanWordDto {
|
||||
|
||||
private Integer num;
|
||||
private String childName;
|
||||
private String specification;
|
||||
private String unit;
|
||||
private Long demandQuantity;
|
||||
private String remark;
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package org.dromara.cailiaoshebei.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import org.dromara.cailiaoshebei.domain.bo.BusMaterialbatchdemandplanBo;
|
||||
import org.dromara.cailiaoshebei.domain.bo.BusMrpBaseBo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class BusMrpDto {
|
||||
|
||||
private BusMrpBaseBo mrpBaseBo;
|
||||
|
||||
private List<BusMaterialbatchdemandplanBo> planList;
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package org.dromara.cailiaoshebei.domain.dto;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import org.dromara.cailiaoshebei.domain.bo.BusMaterialbatchdemandplanBo;
|
||||
import org.dromara.cailiaoshebei.domain.bo.BusMrpBaseBo;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class BusMrpExportDto {
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@NotNull(message = "项目ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 计划编号
|
||||
*/
|
||||
@NotBlank(message = "计划编号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String planCode;
|
||||
|
||||
/**
|
||||
* 物资类别
|
||||
*/
|
||||
private String matCat;
|
||||
|
||||
/**
|
||||
* 编制日期
|
||||
*/
|
||||
private LocalDate preparedDate;
|
||||
|
||||
|
||||
|
||||
private MultipartFile file;
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package org.dromara.cailiaoshebei.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lilemy
|
||||
* @date 2025-08-18 16:31
|
||||
*/
|
||||
@Data
|
||||
public class BusPurchaseDocWordDto {
|
||||
|
||||
private String projectName;
|
||||
private String docCode;
|
||||
private String supplier;
|
||||
private String reason;
|
||||
private String name;
|
||||
private String arrivalDate;
|
||||
private String designDirectorTel;
|
||||
private String technicalDirectorTel;
|
||||
private String receivingAddress;
|
||||
private String contacts;
|
||||
private String projectDirector;
|
||||
private String purchasingAgent;
|
||||
private String preparedDate;
|
||||
private String signingUnit;
|
||||
private String signingPerson;
|
||||
private String signingDate;
|
||||
|
||||
private List<BusMaterialbatchdemandplanWordDto> items;
|
||||
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
package org.dromara.cailiaoshebei.domain.dto;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.dromara.cailiaoshebei.domain.BusTotalsupplyplan;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author 铁憨憨
|
||||
* @Date 2025/8/14 11:24
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class MasterDataReqDto implements Serializable {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目Id
|
||||
*/
|
||||
@ExcelProperty(value = "项目Id")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
@ExcelProperty(value = "批次号")
|
||||
private String batchNumber;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
@ExcelProperty(value = "审核状态")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 子数据
|
||||
*/
|
||||
private List<BusTotalsupplyplan> subData;
|
||||
|
||||
}
|
@ -10,6 +10,7 @@ import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
@ -78,7 +79,7 @@ public class BusCailiaoshebeiPiciVo implements Serializable {
|
||||
/**
|
||||
* 订货-采购时间
|
||||
*/
|
||||
private Date purchasingPeriod;
|
||||
private LocalDate purchasingPeriod;
|
||||
/**
|
||||
* 订货-合同号
|
||||
*/
|
||||
|
@ -0,0 +1,74 @@
|
||||
package org.dromara.cailiaoshebei.domain.vo;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.BusLtn;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 物资-物流单号视图对象 bus_ltn
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-14
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = BusLtn.class)
|
||||
public class BusLtnVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@ExcelProperty(value = "项目ID")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 采购联系单id
|
||||
*/
|
||||
@ExcelProperty(value = "采购联系单id")
|
||||
private Long docId;
|
||||
|
||||
/**
|
||||
* 计划id
|
||||
*/
|
||||
@ExcelProperty(value = "计划id")
|
||||
private Long planId;
|
||||
|
||||
/**
|
||||
* 物资名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
@ExcelProperty(value = "数量")
|
||||
private BigDecimal num;
|
||||
|
||||
/**
|
||||
* 物流单号
|
||||
*/
|
||||
@ExcelProperty(value = "物流单号")
|
||||
private String ltn;
|
||||
|
||||
|
||||
}
|
@ -43,6 +43,11 @@ public class BusMaterialbatchdemandplanVo implements Serializable {
|
||||
@ExcelProperty(value = "批次ID")
|
||||
private String batchId;
|
||||
|
||||
/**
|
||||
* 基础信息ID
|
||||
*/
|
||||
private Long mrpBaseId;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@ -115,5 +120,9 @@ public class BusMaterialbatchdemandplanVo implements Serializable {
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 质量标准
|
||||
*/
|
||||
private String qs;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,73 @@
|
||||
package org.dromara.cailiaoshebei.domain.vo;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.BusMrpBase;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 物资-批次需求计划基础信息视图对象 bus_mrp_base
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = BusMrpBase.class)
|
||||
public class BusMrpBaseVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@ExcelProperty(value = "项目ID")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 计划编号
|
||||
*/
|
||||
@ExcelProperty(value = "计划编号")
|
||||
private String planCode;
|
||||
|
||||
/**
|
||||
* 物资类别
|
||||
*/
|
||||
@ExcelProperty(value = "物资类别")
|
||||
private String matCat;
|
||||
|
||||
/**
|
||||
* 编制日期
|
||||
*/
|
||||
@ExcelProperty(value = "编制日期")
|
||||
private LocalDate preparedDate;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
@ExcelProperty(value = "审核状态")
|
||||
private String status;
|
||||
|
||||
|
||||
/**
|
||||
* 计划详情
|
||||
*/
|
||||
private List<BusMaterialbatchdemandplanVo> planList;
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package org.dromara.cailiaoshebei.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import org.dromara.cailiaoshebei.domain.bo.BusMaterialbatchdemandplanBo;
|
||||
import org.dromara.cailiaoshebei.domain.bo.BusMrpBaseBo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class BusMrpVo {
|
||||
|
||||
private BusMrpBaseVo mrpBaseBo;
|
||||
|
||||
private List<BusMaterialbatchdemandplanVo> planList;
|
||||
}
|
@ -0,0 +1,202 @@
|
||||
package org.dromara.cailiaoshebei.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.cailiaoshebei.domain.BusPhysicalsupplySon;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 物资-使用情况子数据视图对象 bus_physicalsupply_son
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-14
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = BusPhysicalsupplySon.class)
|
||||
public class BusPhysicalsupplySonVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 使用情况ID
|
||||
*/
|
||||
@ExcelProperty(value = "使用情况ID")
|
||||
private Long physicalsupplyId;
|
||||
|
||||
/**
|
||||
* 到货要求
|
||||
*/
|
||||
@ExcelProperty(value = "到货要求")
|
||||
private String deliveryRequirements;
|
||||
|
||||
/**
|
||||
* 转换为合同
|
||||
*/
|
||||
@ExcelProperty(value = "转换为合同")
|
||||
private String transition;
|
||||
|
||||
/**
|
||||
* 批次
|
||||
*/
|
||||
@ExcelProperty(value = "批次")
|
||||
private String batch;
|
||||
|
||||
/**
|
||||
* 联系单下达时间
|
||||
*/
|
||||
@ExcelProperty(value = "联系单下达时间")
|
||||
private Date issuanceTime;
|
||||
|
||||
/**
|
||||
* 要求到货时间
|
||||
*/
|
||||
@ExcelProperty(value = "要求到货时间")
|
||||
private Date requireDelivery;
|
||||
|
||||
/**
|
||||
* 要求到货数量
|
||||
*/
|
||||
@ExcelProperty(value = "要求到货数量")
|
||||
private String requiredQuantity;
|
||||
|
||||
/**
|
||||
* 采购备注
|
||||
*/
|
||||
@ExcelProperty(value = "采购备注")
|
||||
private String cgRemark;
|
||||
|
||||
/**
|
||||
* 计划到货时间
|
||||
*/
|
||||
@ExcelProperty(value = "计划到货时间")
|
||||
private Date scheduledDelivery;
|
||||
|
||||
/**
|
||||
* 计划到货数量
|
||||
*/
|
||||
@ExcelProperty(value = "计划到货数量")
|
||||
private String plannedQuantity;
|
||||
|
||||
/**
|
||||
* 差异量
|
||||
*/
|
||||
@ExcelProperty(value = "差异量")
|
||||
private String differenceQuantity;
|
||||
|
||||
/**
|
||||
* 供应商备注
|
||||
*/
|
||||
@ExcelProperty(value = "供应商备注")
|
||||
private String gysRemark;
|
||||
|
||||
/**
|
||||
* 实际到货时间
|
||||
*/
|
||||
@ExcelProperty(value = "实际到货时间")
|
||||
private Date actualDelivery;
|
||||
|
||||
/**
|
||||
* 验收移交时间
|
||||
*/
|
||||
@ExcelProperty(value = "验收移交时间")
|
||||
private Date acceptanceCheck;
|
||||
|
||||
/**
|
||||
* 交接方式
|
||||
*/
|
||||
@ExcelProperty(value = "交接方式")
|
||||
private String associate;
|
||||
|
||||
/**
|
||||
* 实际到货验收数量
|
||||
*/
|
||||
@ExcelProperty(value = "实际到货验收数量")
|
||||
private String actualAcceptance;
|
||||
|
||||
/**
|
||||
* 到货差异量
|
||||
*/
|
||||
@ExcelProperty(value = "到货差异量")
|
||||
private String dhDifferenceQuantity;
|
||||
|
||||
/**
|
||||
* 逾期状态
|
||||
*/
|
||||
@ExcelProperty(value = "逾期状态")
|
||||
private String expectedState;
|
||||
|
||||
/**
|
||||
* 到货备注
|
||||
*/
|
||||
@ExcelProperty(value = "到货备注")
|
||||
private String dhRemark;
|
||||
|
||||
/**
|
||||
* 货物金额
|
||||
*/
|
||||
@ExcelProperty(value = "货物金额")
|
||||
private String cargoAmount;
|
||||
|
||||
/**
|
||||
* 结算金额
|
||||
*/
|
||||
@ExcelProperty(value = "结算金额")
|
||||
private String settlementAmount;
|
||||
|
||||
/**
|
||||
* 预付款
|
||||
*/
|
||||
@ExcelProperty(value = "预付款")
|
||||
private String advance;
|
||||
|
||||
/**
|
||||
* 投料款
|
||||
*/
|
||||
@ExcelProperty(value = "投料款")
|
||||
private String feed;
|
||||
|
||||
/**
|
||||
* 到货验收款
|
||||
*/
|
||||
@ExcelProperty(value = "到货验收款")
|
||||
private String acceptancePayment;
|
||||
|
||||
/**
|
||||
* 质保金
|
||||
*/
|
||||
@ExcelProperty(value = "质保金")
|
||||
private String qualityGuarantee;
|
||||
|
||||
/**
|
||||
* 调试款
|
||||
*/
|
||||
@ExcelProperty(value = "调试款")
|
||||
private String debugging;
|
||||
|
||||
/**
|
||||
* 结算备注
|
||||
*/
|
||||
@ExcelProperty(value = "结算备注")
|
||||
private String jsRemark;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
package org.dromara.cailiaoshebei.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.cailiaoshebei.domain.BusPhysicalsupply;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 物资-使用情况视图对象 bus_physicalsupply
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-14
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = BusPhysicalsupply.class)
|
||||
public class BusPhysicalsupplyVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@ExcelProperty(value = "项目ID")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 材料名称
|
||||
*/
|
||||
@ExcelProperty(value = "材料名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
@ExcelProperty(value = "规格")
|
||||
private String specification;
|
||||
|
||||
/**
|
||||
* 供应商
|
||||
*/
|
||||
@ExcelProperty(value = "供应商")
|
||||
private String supplier;
|
||||
|
||||
/**
|
||||
* 合同签订时间
|
||||
*/
|
||||
@ExcelProperty(value = "合同签订时间")
|
||||
private Date contractSigning;
|
||||
|
||||
/**
|
||||
* 供货要求
|
||||
*/
|
||||
@ExcelProperty(value = "供货要求")
|
||||
private String supplyRequirements;
|
||||
|
||||
/**
|
||||
* 生产周期
|
||||
*/
|
||||
@ExcelProperty(value = "生产周期")
|
||||
private Long productionPhase;
|
||||
|
||||
/**
|
||||
* 运算周期
|
||||
*/
|
||||
@ExcelProperty(value = "运算周期")
|
||||
private Long executionCycle;
|
||||
|
||||
/**
|
||||
* 安装量
|
||||
*/
|
||||
@ExcelProperty(value = "安装量")
|
||||
private String installationQuantity;
|
||||
|
||||
/**
|
||||
* 安装比列
|
||||
*/
|
||||
@ExcelProperty(value = "安装比列")
|
||||
private String installationRatio;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 采购提交
|
||||
*/
|
||||
@ExcelProperty(value = "采购提交")
|
||||
private String purchaseSubmission;
|
||||
|
||||
/**
|
||||
* 材料提交
|
||||
*/
|
||||
@ExcelProperty(value = "材料提交")
|
||||
private String submissionMaterials;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package org.dromara.cailiaoshebei.domain.vo;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.BusPlanDocAssociation;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 物资-批次需求计划与采购单关联视图对象 bus_plan_doc_association
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = BusPlanDocAssociation.class)
|
||||
public class BusPlanDocAssociationVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@ExcelProperty(value = "项目ID")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 计划id
|
||||
*/
|
||||
@ExcelProperty(value = "计划id")
|
||||
private Long planId;
|
||||
|
||||
/**
|
||||
* 采购联系单id
|
||||
*/
|
||||
@ExcelProperty(value = "采购联系单id")
|
||||
private Long docId;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,171 @@
|
||||
package org.dromara.cailiaoshebei.domain.vo;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.BusPurchaseDoc;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import org.dromara.cailiaoshebei.domain.bo.BusPlanDocAssociationBo;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 物资-采购联系单视图对象 bus_purchase_doc
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = BusPurchaseDoc.class)
|
||||
public class BusPurchaseDocVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@ExcelProperty(value = "项目ID")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 采购单编号
|
||||
*/
|
||||
@ExcelProperty(value = "采购单编号")
|
||||
private String docCode;
|
||||
|
||||
/**
|
||||
* 供应商id
|
||||
*/
|
||||
private Long supplierId;
|
||||
|
||||
/**
|
||||
* 供应商
|
||||
*/
|
||||
@ExcelProperty(value = "供应商")
|
||||
private String supplier;
|
||||
|
||||
/**
|
||||
* 事由
|
||||
*/
|
||||
@ExcelProperty(value = "事由")
|
||||
private String reason;
|
||||
|
||||
/**
|
||||
* 设备统称
|
||||
*/
|
||||
@ExcelProperty(value = "设备统称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 到货日期
|
||||
*/
|
||||
@ExcelProperty(value = "到货日期")
|
||||
private LocalDate arrivalDate;
|
||||
|
||||
/**
|
||||
* 设计负责人联系方式
|
||||
*/
|
||||
@ExcelProperty(value = "设计负责人联系方式")
|
||||
private String designDirectorTel;
|
||||
|
||||
/**
|
||||
* 现场技术负责人联系方式
|
||||
*/
|
||||
@ExcelProperty(value = "现场技术负责人联系方式")
|
||||
private String technicalDirectorTel;
|
||||
|
||||
/**
|
||||
* 收货地址
|
||||
*/
|
||||
@ExcelProperty(value = "收货地址")
|
||||
private String receivingAddress;
|
||||
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
@ExcelProperty(value = "联系人")
|
||||
private String contacts;
|
||||
|
||||
/**
|
||||
* 项目负责人
|
||||
*/
|
||||
@ExcelProperty(value = "项目负责人")
|
||||
private String projectDirector;
|
||||
|
||||
/**
|
||||
* 采购经办人
|
||||
*/
|
||||
@ExcelProperty(value = "采购经办人")
|
||||
private String purchasingAgent;
|
||||
|
||||
/**
|
||||
* 日期
|
||||
*/
|
||||
@ExcelProperty(value = "日期")
|
||||
private LocalDate preparedDate;
|
||||
|
||||
/**
|
||||
* 反馈文件地址
|
||||
*/
|
||||
@ExcelProperty(value = "反馈文件地址")
|
||||
private String feedbackUrl;
|
||||
|
||||
/**
|
||||
* 签收单位
|
||||
*/
|
||||
@ExcelProperty(value = "签收单位")
|
||||
private String signingUnit;
|
||||
|
||||
/**
|
||||
* 签收人
|
||||
*/
|
||||
@ExcelProperty(value = "签收人")
|
||||
private String signingPerson;
|
||||
|
||||
/**
|
||||
* 签收日期
|
||||
*/
|
||||
@ExcelProperty(value = "签收日期")
|
||||
private LocalDate signingDate;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
@ExcelProperty(value = "审核状态")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 计划基础ID
|
||||
*/
|
||||
private Long mrpBaseId;
|
||||
|
||||
/**
|
||||
* 计划编号
|
||||
*/
|
||||
private String planCode;
|
||||
|
||||
/**
|
||||
* 1-采购单,2-补货单
|
||||
*/
|
||||
private String docType;
|
||||
|
||||
/**
|
||||
* 关联计划
|
||||
*/
|
||||
private List<BusPlanDocAssociationVo> associationList;
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package org.dromara.cailiaoshebei.domain.vo;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.BusPurchaseUser;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 物资采购人员视图对象 bus_purchase_user
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = BusPurchaseUser.class)
|
||||
public class BusPurchaseUserVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ExcelProperty(value = "")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
@ExcelProperty(value = "项目id")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 采购人员id
|
||||
*/
|
||||
@ExcelProperty(value = "采购人员id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 采购人员姓名
|
||||
*/
|
||||
@ExcelProperty(value = "采购人员姓名")
|
||||
private String userName;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package org.dromara.cailiaoshebei.domain.vo;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.BusTotalsupplyplanAudit;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* 物资-总供应计划审核视图对象 bus_totalsupplyplan_audit
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = BusTotalsupplyplanAudit.class)
|
||||
public class BusTotalsupplyplanAuditVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目Id
|
||||
*/
|
||||
@ExcelProperty(value = "项目Id")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
@ExcelProperty(value = "批次号")
|
||||
private String batchNumber;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
@ExcelProperty(value = "审核状态")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,137 @@
|
||||
package org.dromara.cailiaoshebei.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.BusTotalsupplyplan;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* 物资-总供应计划视图对象 bus_totalsupplyplan
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = BusTotalsupplyplan.class)
|
||||
public class BusTotalsupplyplanVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
private String batchNumber;
|
||||
|
||||
/**
|
||||
* 项目Id
|
||||
*/
|
||||
@ExcelProperty(value = "项目Id")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 编制日期
|
||||
*/
|
||||
@ExcelProperty(value = "编制日期")
|
||||
private Date compileDate;
|
||||
|
||||
/**
|
||||
* 计划编号
|
||||
*/
|
||||
@ExcelProperty(value = "计划编号")
|
||||
private String planNumber;
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@ExcelProperty(value = "编号")
|
||||
private String num;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@ExcelProperty(value = "名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
@ExcelProperty(value = "规格")
|
||||
private String specification;
|
||||
|
||||
/**
|
||||
* 材质
|
||||
*/
|
||||
@ExcelProperty(value = "材质")
|
||||
private String texture;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
@ExcelProperty(value = "单位")
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
@ExcelProperty(value = "数量")
|
||||
private Long quantity;
|
||||
|
||||
/**
|
||||
* 品牌
|
||||
*/
|
||||
@ExcelProperty(value = "品牌")
|
||||
private String brand;
|
||||
|
||||
/**
|
||||
* 质量标准
|
||||
*/
|
||||
@ExcelProperty(value = "质量标准")
|
||||
private String qualityStandard;
|
||||
|
||||
/**
|
||||
* 预计使用日期
|
||||
*/
|
||||
@ExcelProperty(value = "预计使用日期")
|
||||
private Date dateService;
|
||||
|
||||
/**
|
||||
* 交货地点
|
||||
*/
|
||||
@ExcelProperty(value = "交货地点")
|
||||
private String deliveryPoints;
|
||||
|
||||
/**
|
||||
* 使用部位
|
||||
*/
|
||||
@ExcelProperty(value = "使用部位")
|
||||
private String partUsed;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
@ExcelProperty(value = "审核状态")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
@ -20,9 +20,9 @@ public class MasterDataListRes implements Serializable {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
* 批次号
|
||||
*/
|
||||
private String batchId;
|
||||
private String batchNumber;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
|
@ -0,0 +1,15 @@
|
||||
package org.dromara.cailiaoshebei.mapper;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.BusLtn;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusLtnVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 物资-物流单号Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-14
|
||||
*/
|
||||
public interface BusLtnMapper extends BaseMapperPlus<BusLtn, BusLtnVo> {
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package org.dromara.cailiaoshebei.mapper;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.BusMrpBase;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusMrpBaseVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 物资-批次需求计划基础信息Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
public interface BusMrpBaseMapper extends BaseMapperPlus<BusMrpBase, BusMrpBaseVo> {
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package org.dromara.cailiaoshebei.mapper;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.BusPhysicalsupply;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusPhysicalsupplyVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 物资-使用情况Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-14
|
||||
*/
|
||||
public interface BusPhysicalsupplyMapper extends BaseMapperPlus<BusPhysicalsupply, BusPhysicalsupplyVo> {
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package org.dromara.cailiaoshebei.mapper;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.BusPhysicalsupplySon;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusPhysicalsupplySonVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 物资-使用情况子数据Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-14
|
||||
*/
|
||||
public interface BusPhysicalsupplySonMapper extends BaseMapperPlus<BusPhysicalsupplySon, BusPhysicalsupplySonVo> {
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package org.dromara.cailiaoshebei.mapper;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.BusPlanDocAssociation;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusPlanDocAssociationVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 物资-批次需求计划与采购单关联Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
public interface BusPlanDocAssociationMapper extends BaseMapperPlus<BusPlanDocAssociation, BusPlanDocAssociationVo> {
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package org.dromara.cailiaoshebei.mapper;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.BusPurchaseDoc;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusPurchaseDocVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 物资-采购联系单Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
public interface BusPurchaseDocMapper extends BaseMapperPlus<BusPurchaseDoc, BusPurchaseDocVo> {
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package org.dromara.cailiaoshebei.mapper;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.BusPurchaseUser;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusPurchaseUserVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 物资采购人员Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
public interface BusPurchaseUserMapper extends BaseMapperPlus<BusPurchaseUser, BusPurchaseUserVo> {
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package org.dromara.cailiaoshebei.mapper;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.BusTotalsupplyplanAudit;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusTotalsupplyplanAuditVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 物资-总供应计划审核Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
public interface BusTotalsupplyplanAuditMapper extends BaseMapperPlus<BusTotalsupplyplanAudit, BusTotalsupplyplanAuditVo> {
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package org.dromara.cailiaoshebei.mapper;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.BusTotalsupplyplan;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusTotalsupplyplanVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 物资-总供应计划Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
public interface BusTotalsupplyplanMapper extends BaseMapperPlus<BusTotalsupplyplan, BusTotalsupplyplanVo> {
|
||||
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
package org.dromara.cailiaoshebei.service;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.dto.BusLtnDto;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusLtnVo;
|
||||
import org.dromara.cailiaoshebei.domain.bo.BusLtnBo;
|
||||
import org.dromara.cailiaoshebei.domain.BusLtn;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物资-物流单号Service接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-14
|
||||
*/
|
||||
public interface IBusLtnService extends IService<BusLtn>{
|
||||
|
||||
/**
|
||||
* 查询物资-物流单号
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 物资-物流单号
|
||||
*/
|
||||
BusLtnVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询物资-物流单号列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 物资-物流单号分页列表
|
||||
*/
|
||||
TableDataInfo<BusLtnVo> queryPageList(BusLtnBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的物资-物流单号列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 物资-物流单号列表
|
||||
*/
|
||||
List<BusLtnVo> queryList(BusLtnBo bo);
|
||||
|
||||
/**
|
||||
* 新增物资-物流单号
|
||||
*
|
||||
* @param bo 物资-物流单号
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(BusLtnBo bo);
|
||||
|
||||
/**
|
||||
* 修改物资-物流单号
|
||||
*
|
||||
* @param bo 物资-物流单号
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(BusLtnBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除物资-物流单号信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
|
||||
/**
|
||||
* 添加物流单号
|
||||
*/
|
||||
Boolean linkAdd(BusLtnDto dto);
|
||||
}
|
@ -0,0 +1,85 @@
|
||||
package org.dromara.cailiaoshebei.service;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.dto.BusMrpDto;
|
||||
import org.dromara.cailiaoshebei.domain.dto.BusMrpExportDto;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusMrpBaseVo;
|
||||
import org.dromara.cailiaoshebei.domain.bo.BusMrpBaseBo;
|
||||
import org.dromara.cailiaoshebei.domain.BusMrpBase;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusMrpVo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物资-批次需求计划基础信息Service接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
public interface IBusMrpBaseService extends IService<BusMrpBase>{
|
||||
|
||||
/**
|
||||
* 查询物资-批次需求计划基础信息
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 物资-批次需求计划基础信息
|
||||
*/
|
||||
BusMrpVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询物资-批次需求计划基础信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 物资-批次需求计划基础信息分页列表
|
||||
*/
|
||||
TableDataInfo<BusMrpBaseVo> queryPageList(BusMrpBaseBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的物资-批次需求计划基础信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 物资-批次需求计划基础信息列表
|
||||
*/
|
||||
List<BusMrpBaseVo> queryList(BusMrpBaseBo bo);
|
||||
|
||||
/**
|
||||
* 新增物资-批次需求计划基础信息
|
||||
*
|
||||
* @param bo 物资-批次需求计划基础信息
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(BusMrpBaseBo bo);
|
||||
|
||||
/**
|
||||
* 修改物资-批次需求计划基础信息
|
||||
*
|
||||
* @param bo 物资-批次需求计划基础信息
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(BusMrpBaseBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除物资-批次需求计划基础信息信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 批量新增或修改物资-批次需求计划
|
||||
*/
|
||||
Boolean batchAddOrUpdate(BusMrpDto dto);
|
||||
|
||||
/**
|
||||
* 导入物资需求批次计划
|
||||
*/
|
||||
Boolean importData(BusMrpExportDto dto);
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package org.dromara.cailiaoshebei.service;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusPhysicalsupplyVo;
|
||||
import org.dromara.cailiaoshebei.domain.bo.BusPhysicalsupplyBo;
|
||||
import org.dromara.cailiaoshebei.domain.BusPhysicalsupply;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物资-使用情况Service接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-14
|
||||
*/
|
||||
public interface IBusPhysicalsupplyService extends IService<BusPhysicalsupply>{
|
||||
|
||||
/**
|
||||
* 查询物资-使用情况
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 物资-使用情况
|
||||
*/
|
||||
BusPhysicalsupplyVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询物资-使用情况列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 物资-使用情况分页列表
|
||||
*/
|
||||
TableDataInfo<BusPhysicalsupplyVo> queryPageList(BusPhysicalsupplyBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的物资-使用情况列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 物资-使用情况列表
|
||||
*/
|
||||
List<BusPhysicalsupplyVo> queryList(BusPhysicalsupplyBo bo);
|
||||
|
||||
/**
|
||||
* 新增物资-使用情况
|
||||
*
|
||||
* @param bo 物资-使用情况
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(BusPhysicalsupplyBo bo);
|
||||
|
||||
/**
|
||||
* 修改物资-使用情况
|
||||
*
|
||||
* @param bo 物资-使用情况
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(BusPhysicalsupplyBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除物资-使用情况信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package org.dromara.cailiaoshebei.service;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusPhysicalsupplySonVo;
|
||||
import org.dromara.cailiaoshebei.domain.bo.BusPhysicalsupplySonBo;
|
||||
import org.dromara.cailiaoshebei.domain.BusPhysicalsupplySon;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物资-使用情况子数据Service接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-14
|
||||
*/
|
||||
public interface IBusPhysicalsupplySonService extends IService<BusPhysicalsupplySon>{
|
||||
|
||||
/**
|
||||
* 查询物资-使用情况子数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 物资-使用情况子数据
|
||||
*/
|
||||
BusPhysicalsupplySonVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询物资-使用情况子数据列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 物资-使用情况子数据分页列表
|
||||
*/
|
||||
TableDataInfo<BusPhysicalsupplySonVo> queryPageList(BusPhysicalsupplySonBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的物资-使用情况子数据列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 物资-使用情况子数据列表
|
||||
*/
|
||||
List<BusPhysicalsupplySonVo> queryList(BusPhysicalsupplySonBo bo);
|
||||
|
||||
/**
|
||||
* 新增物资-使用情况子数据
|
||||
*
|
||||
* @param bo 物资-使用情况子数据
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(BusPhysicalsupplySonBo bo);
|
||||
|
||||
/**
|
||||
* 修改物资-使用情况子数据
|
||||
*
|
||||
* @param bo 物资-使用情况子数据
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(BusPhysicalsupplySonBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除物资-使用情况子数据信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package org.dromara.cailiaoshebei.service;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusPlanDocAssociationVo;
|
||||
import org.dromara.cailiaoshebei.domain.bo.BusPlanDocAssociationBo;
|
||||
import org.dromara.cailiaoshebei.domain.BusPlanDocAssociation;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物资-批次需求计划与采购单关联Service接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
public interface IBusPlanDocAssociationService extends IService<BusPlanDocAssociation>{
|
||||
|
||||
/**
|
||||
* 查询物资-批次需求计划与采购单关联
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 物资-批次需求计划与采购单关联
|
||||
*/
|
||||
BusPlanDocAssociationVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询物资-批次需求计划与采购单关联列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 物资-批次需求计划与采购单关联分页列表
|
||||
*/
|
||||
TableDataInfo<BusPlanDocAssociationVo> queryPageList(BusPlanDocAssociationBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的物资-批次需求计划与采购单关联列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 物资-批次需求计划与采购单关联列表
|
||||
*/
|
||||
List<BusPlanDocAssociationVo> queryList(BusPlanDocAssociationBo bo);
|
||||
|
||||
/**
|
||||
* 新增物资-批次需求计划与采购单关联
|
||||
*
|
||||
* @param bo 物资-批次需求计划与采购单关联
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(BusPlanDocAssociationBo bo);
|
||||
|
||||
/**
|
||||
* 修改物资-批次需求计划与采购单关联
|
||||
*
|
||||
* @param bo 物资-批次需求计划与采购单关联
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(BusPlanDocAssociationBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除物资-批次需求计划与采购单关联信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@ -0,0 +1,85 @@
|
||||
package org.dromara.cailiaoshebei.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.dromara.cailiaoshebei.domain.BusPurchaseDoc;
|
||||
import org.dromara.cailiaoshebei.domain.bo.BusPurchaseDocBo;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusPurchaseDocVo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物资-采购联系单Service接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
public interface IBusPurchaseDocService extends IService<BusPurchaseDoc> {
|
||||
|
||||
/**
|
||||
* 查询物资-采购联系单
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 物资-采购联系单
|
||||
*/
|
||||
BusPurchaseDocVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询物资-采购联系单列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 物资-采购联系单分页列表
|
||||
*/
|
||||
TableDataInfo<BusPurchaseDocVo> queryPageList(BusPurchaseDocBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的物资-采购联系单列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 物资-采购联系单列表
|
||||
*/
|
||||
List<BusPurchaseDocVo> queryList(BusPurchaseDocBo bo);
|
||||
|
||||
/**
|
||||
* 新增物资-采购联系单
|
||||
*
|
||||
* @param bo 物资-采购联系单
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(BusPurchaseDocBo bo);
|
||||
|
||||
/**
|
||||
* 修改物资-采购联系单
|
||||
*
|
||||
* @param bo 物资-采购联系单
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(BusPurchaseDocBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除物资-采购联系单信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 创建补货采购单
|
||||
*/
|
||||
void create(Long id, HashMap<Long, BigDecimal> map);
|
||||
|
||||
/**
|
||||
* 根据主键导出Word
|
||||
*
|
||||
* @param id 主键id
|
||||
*/
|
||||
void exportWordById(Long id, HttpServletResponse response);
|
||||
}
|
@ -0,0 +1,83 @@
|
||||
package org.dromara.cailiaoshebei.service;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusPurchaseUserVo;
|
||||
import org.dromara.cailiaoshebei.domain.bo.BusPurchaseUserBo;
|
||||
import org.dromara.cailiaoshebei.domain.BusPurchaseUser;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物资采购人员Service接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
public interface IBusPurchaseUserService extends IService<BusPurchaseUser>{
|
||||
|
||||
/**
|
||||
* 查询物资采购人员
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 物资采购人员
|
||||
*/
|
||||
BusPurchaseUserVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询物资采购人员列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 物资采购人员分页列表
|
||||
*/
|
||||
TableDataInfo<BusPurchaseUserVo> queryPageList(BusPurchaseUserBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的物资采购人员列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 物资采购人员列表
|
||||
*/
|
||||
List<BusPurchaseUserVo> queryList(BusPurchaseUserBo bo);
|
||||
|
||||
/**
|
||||
* 新增物资采购人员
|
||||
*
|
||||
* @param bo 物资采购人员
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(BusPurchaseUserBo bo);
|
||||
|
||||
/**
|
||||
* 修改物资采购人员
|
||||
*
|
||||
* @param bo 物资采购人员
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(BusPurchaseUserBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除物资采购人员信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 新增或修改
|
||||
*/
|
||||
boolean addOrUpdate(BusPurchaseUserBo bo);
|
||||
|
||||
/**
|
||||
* 根据项目id查询采购人员信息
|
||||
*/
|
||||
BusPurchaseUserVo getInfoByProject(Long projectId);
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package org.dromara.cailiaoshebei.service;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusTotalsupplyplanAuditVo;
|
||||
import org.dromara.cailiaoshebei.domain.bo.BusTotalsupplyplanAuditBo;
|
||||
import org.dromara.cailiaoshebei.domain.BusTotalsupplyplanAudit;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物资-总供应计划审核Service接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
public interface IBusTotalsupplyplanAuditService extends IService<BusTotalsupplyplanAudit>{
|
||||
|
||||
/**
|
||||
* 查询物资-总供应计划审核
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 物资-总供应计划审核
|
||||
*/
|
||||
BusTotalsupplyplanAuditVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询物资-总供应计划审核列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 物资-总供应计划审核分页列表
|
||||
*/
|
||||
TableDataInfo<BusTotalsupplyplanAuditVo> queryPageList(BusTotalsupplyplanAuditBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的物资-总供应计划审核列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 物资-总供应计划审核列表
|
||||
*/
|
||||
List<BusTotalsupplyplanAuditVo> queryList(BusTotalsupplyplanAuditBo bo);
|
||||
|
||||
/**
|
||||
* 新增物资-总供应计划审核
|
||||
*
|
||||
* @param bo 物资-总供应计划审核
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(BusTotalsupplyplanAuditBo bo);
|
||||
|
||||
/**
|
||||
* 修改物资-总供应计划审核
|
||||
*
|
||||
* @param bo 物资-总供应计划审核
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(BusTotalsupplyplanAuditBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除物资-总供应计划审核信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
package org.dromara.cailiaoshebei.service;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.bo.MasterDataReq;
|
||||
import org.dromara.cailiaoshebei.domain.dto.MasterDataReqDto;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusTotalsupplyplanVo;
|
||||
import org.dromara.cailiaoshebei.domain.bo.BusTotalsupplyplanBo;
|
||||
import org.dromara.cailiaoshebei.domain.BusTotalsupplyplan;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物资-总供应计划Service接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-13
|
||||
*/
|
||||
public interface IBusTotalsupplyplanService extends IService<BusTotalsupplyplan>{
|
||||
|
||||
/**
|
||||
* 查询物资-总供应计划
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 物资-总供应计划
|
||||
*/
|
||||
BusTotalsupplyplanVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询物资-总供应计划列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 物资-总供应计划分页列表
|
||||
*/
|
||||
TableDataInfo<BusTotalsupplyplanVo> queryPageList(BusTotalsupplyplanBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的物资-总供应计划列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 物资-总供应计划列表
|
||||
*/
|
||||
List<BusTotalsupplyplanVo> queryList(BusTotalsupplyplanBo bo);
|
||||
|
||||
/**
|
||||
* 新增物资-总供应计划
|
||||
*
|
||||
* @param bo 物资-总供应计划
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(BusTotalsupplyplanBo bo);
|
||||
|
||||
/**
|
||||
* 修改物资-总供应计划
|
||||
*
|
||||
* @param bo 物资-总供应计划
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(BusTotalsupplyplanBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除物资-总供应计划信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
|
||||
/**
|
||||
* 物资-总供应计划-主数据
|
||||
*
|
||||
* @param bo 主数据查询条件
|
||||
* @return 主数据列表
|
||||
*/
|
||||
MasterDataReqDto masterData(MasterDataReq bo);
|
||||
}
|
@ -160,17 +160,17 @@ public class BusCailiaoshebeiPiciServiceImpl extends ServiceImpl<BusCailiaoshebe
|
||||
}
|
||||
break;
|
||||
case "2": //计划
|
||||
if (!"finish".equals(busCailiaoshebeiPici.getApprovalPlan())){
|
||||
if (!"draft".equals(busCailiaoshebeiPici.getApprovalPlan())){
|
||||
throw new ServiceException("非草稿状态不允许删除");
|
||||
}
|
||||
break;
|
||||
case "3": //需求
|
||||
if (!"sc".equals(busCailiaoshebeiPici.getApprovalProject())){
|
||||
if (!"draft".equals(busCailiaoshebeiPici.getApprovalProject())){
|
||||
throw new ServiceException("非草稿状态不允许删除");
|
||||
}
|
||||
break;
|
||||
case "4": //订货
|
||||
if (!"sc".equals(busCailiaoshebeiPici.getApprovalOrder())){
|
||||
if (!"draft".equals(busCailiaoshebeiPici.getApprovalOrder())){
|
||||
throw new ServiceException("非草稿状态不允许删除");
|
||||
}
|
||||
break;
|
||||
|
@ -0,0 +1,180 @@
|
||||
package org.dromara.cailiaoshebei.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.dromara.cailiaoshebei.domain.dto.BusLtnDto;
|
||||
import org.dromara.cailiaoshebei.domain.dto.BusLtnListDto;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusPurchaseDocVo;
|
||||
import org.dromara.cailiaoshebei.service.IBusMaterialbatchdemandplanService;
|
||||
import org.dromara.cailiaoshebei.service.IBusPurchaseDocService;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.cailiaoshebei.domain.bo.BusLtnBo;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusLtnVo;
|
||||
import org.dromara.cailiaoshebei.domain.BusLtn;
|
||||
import org.dromara.cailiaoshebei.mapper.BusLtnMapper;
|
||||
import org.dromara.cailiaoshebei.service.IBusLtnService;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 物资-物流单号Service业务层处理
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-14
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class BusLtnServiceImpl extends ServiceImpl<BusLtnMapper, BusLtn> implements IBusLtnService {
|
||||
|
||||
private final BusLtnMapper baseMapper;
|
||||
|
||||
private final IBusPurchaseDocService purchaseDocService;
|
||||
|
||||
private final IBusMaterialbatchdemandplanService planService;
|
||||
|
||||
@Resource
|
||||
@Lazy
|
||||
private IBusLtnService busLtnService;
|
||||
|
||||
/**
|
||||
* 查询物资-物流单号
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 物资-物流单号
|
||||
*/
|
||||
@Override
|
||||
public BusLtnVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询物资-物流单号列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 物资-物流单号分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<BusLtnVo> queryPageList(BusLtnBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<BusLtn> lqw = buildQueryWrapper(bo);
|
||||
Page<BusLtnVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
result.getRecords().forEach(e -> {
|
||||
e.setName(planService.queryById(e.getPlanId()).getName());
|
||||
});
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的物资-物流单号列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 物资-物流单号列表
|
||||
*/
|
||||
@Override
|
||||
public List<BusLtnVo> queryList(BusLtnBo bo) {
|
||||
LambdaQueryWrapper<BusLtn> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<BusLtn> buildQueryWrapper(BusLtnBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<BusLtn> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByDesc(BusLtn::getId);
|
||||
lqw.eq(bo.getProjectId() != null, BusLtn::getProjectId, bo.getProjectId());
|
||||
lqw.eq(bo.getDocId() != null, BusLtn::getDocId, bo.getDocId());
|
||||
lqw.eq(bo.getPlanId() != null, BusLtn::getPlanId, bo.getPlanId());
|
||||
lqw.eq(bo.getNum() != null, BusLtn::getNum, bo.getNum());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getLtn()), BusLtn::getLtn, bo.getLtn());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增物资-物流单号
|
||||
*
|
||||
* @param bo 物资-物流单号
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(BusLtnBo bo) {
|
||||
BusLtn add = MapstructUtils.convert(bo, BusLtn.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物资-物流单号
|
||||
*
|
||||
* @param bo 物资-物流单号
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(BusLtnBo bo) {
|
||||
BusLtn update = MapstructUtils.convert(bo, BusLtn.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(BusLtn entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除物资-物流单号信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean linkAdd(BusLtnDto dto) {
|
||||
|
||||
BusPurchaseDocVo busPurchaseDocVo = purchaseDocService.queryById(dto.getDocId());
|
||||
if (busPurchaseDocVo == null) {
|
||||
throw new ServiceException("采购单不存在");
|
||||
}
|
||||
busLtnService.getBaseMapper().delete(Wrappers.lambdaQuery(BusLtn.class)
|
||||
.eq(BusLtn::getDocId, dto.getDocId()));
|
||||
ArrayList<BusLtn> busLtns = new ArrayList<>();
|
||||
for (BusLtnListDto ltnListDto : dto.getList()) {
|
||||
BusLtn busLtn = BeanUtil.copyProperties(ltnListDto, BusLtn.class);
|
||||
busLtn.setProjectId(busPurchaseDocVo.getProjectId());
|
||||
busLtn.setDocId(dto.getDocId());
|
||||
busLtns.add(busLtn);
|
||||
}
|
||||
boolean save = true;
|
||||
if(CollectionUtil.isNotEmpty(busLtns)){
|
||||
save = busLtnService.saveBatch(busLtns);
|
||||
}
|
||||
return save;
|
||||
}
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
package org.dromara.cailiaoshebei.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -112,6 +113,8 @@ public class BusMaterialbatchdemandplanServiceImpl extends ServiceImpl<BusMateri
|
||||
lqw.eq(bo.getEstimatedCycle() != null, BusMaterialbatchdemandplan::getEstimatedCycle, bo.getEstimatedCycle());
|
||||
lqw.eq(bo.getDemandQuantity() != null, BusMaterialbatchdemandplan::getDemandQuantity, bo.getDemandQuantity());
|
||||
lqw.eq(bo.getArrivalTime() != null, BusMaterialbatchdemandplan::getArrivalTime, bo.getArrivalTime());
|
||||
lqw.eq(bo.getMrpBaseId()!=null, BusMaterialbatchdemandplan::getMrpBaseId, bo.getMrpBaseId());
|
||||
lqw.in(CollectionUtil.isNotEmpty(bo.getIds()), BusMaterialbatchdemandplan::getId, bo.getIds());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
@ -187,6 +190,10 @@ public class BusMaterialbatchdemandplanServiceImpl extends ServiceImpl<BusMateri
|
||||
baseMapper.delete(eq);
|
||||
//2、新增数据
|
||||
List<BusMaterialbatchdemandplan> ts = BeanUtil.copyToList(bo.getAddDataList(), BusMaterialbatchdemandplan.class);
|
||||
for (BusMaterialbatchdemandplan t : ts) {
|
||||
t.setBatchNumber(bo.getBatchNumber());
|
||||
t.setProjectId(bo.getProjectId());
|
||||
}
|
||||
boolean b = baseMapper.insertBatch(ts);
|
||||
if (b) {
|
||||
return true;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user