Compare commits
174 Commits
3eae13e67a
...
prod
| Author | SHA1 | Date | |
|---|---|---|---|
| dbc09a62ea | |||
| f3fa78475c | |||
| c565771283 | |||
| bac8488244 | |||
| a5f661b558 | |||
| ceecec97c7 | |||
| c6ae8a4c00 | |||
| 37d0c776c0 | |||
| f8eea0f63f | |||
| 59c749ab2a | |||
| eeeba2bf4b | |||
| a9ce42101f | |||
| 13de88265f | |||
| a464a1236d | |||
| fce5d0e7fc | |||
| 66ba43d030 | |||
| 1aa77e5eda | |||
| 037016fc13 | |||
| 99f0026552 | |||
| 535262d721 | |||
| fbcb9ca3f2 | |||
| 2a7a20b966 | |||
| 98fdab0dba | |||
| bd71335ae6 | |||
| 7f746fc250 | |||
| 901c8785fe | |||
| e4e9718acb | |||
| 738101f374 | |||
| a7befd7278 | |||
| 52e968c313 | |||
| de9d7d34d6 | |||
| 9f0105d88a | |||
| 80ec8ff86d | |||
| f3473fe5d5 | |||
| 856f3f334b | |||
| 0b216a4101 | |||
| c7338b45ad | |||
| c93b1b752e | |||
| e38074bb25 | |||
| be0f425e14 | |||
| f24e33b1c7 | |||
| 48ea20581c | |||
| e7fa22e573 | |||
| 83b7b32035 | |||
| 6a0be071b8 | |||
| 7bdf8f53b9 | |||
| 03b249afe7 | |||
| 2e5e42fd84 | |||
| f9d9785536 | |||
| a06511e0bf | |||
| 31aa56d34b | |||
| 2b4517760f | |||
| c318d0b10b | |||
| ec54b4ff52 | |||
| 965a0cc90e | |||
| ebddc5c51f | |||
| a323844440 | |||
| 6bcddf50da | |||
| c72275859f | |||
| 9561ee9323 | |||
| b7a52de2d2 | |||
| bfc3ea60fd | |||
| 1acc676b0f | |||
| d6a378f711 | |||
| b4f56b6c79 | |||
| b5d2b3df06 | |||
| 4042b4a441 | |||
| 1fd3da3e2a | |||
| 0d84c49ca4 | |||
| cecfb60e71 | |||
| aec8667edc | |||
| e930cd3b7c | |||
| 373906bde7 | |||
| bca9745e60 | |||
| 6808057111 | |||
| 9f1da9e6c0 | |||
| d8838f8e01 | |||
| d92d37c646 | |||
| 6398a28974 | |||
| cce9ef98d8 | |||
| 467a972a6d | |||
| 00e5f5ede6 | |||
| 1b590bbcbd | |||
| 40d53dffba | |||
| db3af72d5f | |||
| 9604cab4d6 | |||
| 536b25d773 | |||
| e87cbce77a | |||
| f34afd962d | |||
| 98f23e2c02 | |||
| b9507e1fd7 | |||
| 1ceef7f1d1 | |||
| 0fb3fd70a6 | |||
| aab0a5e0b8 | |||
| f9d1a7a489 | |||
| 87e58ca4af | |||
| d6263c6430 | |||
| 253ef81066 | |||
| 2f4bec42a3 | |||
| 3879ce28b6 | |||
| 691b5341c7 | |||
| 4a50dc6ff0 | |||
| d7e4c65afb | |||
| 61b39d89de | |||
| 2497527c77 | |||
| 79f74434f7 | |||
| bd0fe7228b | |||
| 66b45df3fb | |||
| 38d6832f2c | |||
| 8e51d67071 | |||
| 942ca4202a | |||
| 255a202c02 | |||
| 1033ee01fb | |||
| 201f7bd3a7 | |||
| 8a7726e216 | |||
| bc85fe64a4 | |||
| 549fbe92de | |||
| 270071a5f3 | |||
| 09cbb6a8c5 | |||
| f825b9f968 | |||
| f7b9d2f431 | |||
| 742df7279b | |||
| 684209aa36 | |||
| d033b505e2 | |||
| 59623f53a0 | |||
| b9cf8ea3de | |||
| 45761415fa | |||
| 4dca396d11 | |||
| 0efaf12849 | |||
| 51686c212e | |||
| 866c53c6cc | |||
| 809494ffca | |||
| 7824803bf6 | |||
| 5df3bb7baf | |||
| c7dcddb58e | |||
| cc64f16231 | |||
| 26129e7433 | |||
| e7aec88abf | |||
| f820edebb5 | |||
| 9d586f7b77 | |||
| 00e9fa1ea3 | |||
| 9a698857ce | |||
| b47cdb5732 | |||
| 3bf7a1201f | |||
| bb38b6a6e1 | |||
| 11b5908d8c | |||
| 6c96c6f534 | |||
| 22a7500048 | |||
| 412db4d348 | |||
| 6a200b391e | |||
| 6e0e867e57 | |||
| 66d2f24256 | |||
| 69e8e4169b | |||
| 33d051164e | |||
| 2d18345087 | |||
| ef10a4f0a4 | |||
| 9784aa7ee3 | |||
| af069f3fa5 | |||
| d8f5cc34ea | |||
| 0870003967 | |||
| fb4ce63f59 | |||
| 502cc55143 | |||
| 372c825844 | |||
| ca256a28a1 | |||
| 666e402d5d | |||
| 3630c13f59 | |||
| 334ff20129 | |||
| 3371ef9c1c | |||
| ed6b4c608f | |||
| cdd9266452 | |||
| a1450c4796 | |||
| a1ba33c06d | |||
| b0493e7de9 | |||
| 7b00d67cf7 |
@ -92,7 +92,7 @@ public class SysRegisterService {
|
|||||||
// if (!isValid) {
|
// if (!isValid) {
|
||||||
// throw new UserException("注册失败,密码需满足8–18位,包含大小写字母、数字、特殊字符中的至少三种组合");
|
// throw new UserException("注册失败,密码需满足8–18位,包含大小写字母、数字、特殊字符中的至少三种组合");
|
||||||
// }
|
// }
|
||||||
// 验证码开关
|
|
||||||
SysUserBo sysUser = new SysUserBo();
|
SysUserBo sysUser = new SysUserBo();
|
||||||
sysUser.setUserName(username);
|
sysUser.setUserName(username);
|
||||||
sysUser.setNickName(username);
|
sysUser.setNickName(username);
|
||||||
@ -101,6 +101,13 @@ public class SysRegisterService {
|
|||||||
sysUser.setUserType(userType);
|
sysUser.setUserType(userType);
|
||||||
sysUser.setEmail(registerBody.getEmail());
|
sysUser.setEmail(registerBody.getEmail());
|
||||||
|
|
||||||
|
SysUser sysUserByPhonenumber = userMapper.selectDefFlagUser(username);
|
||||||
|
if(sysUserByPhonenumber != null){
|
||||||
|
sysUser.setUserId(sysUserByPhonenumber.getUserId());
|
||||||
|
userMapper.updateDefFlag(sysUser);
|
||||||
|
userMapper.updateConstructionUser(sysUserByPhonenumber.getUserId());
|
||||||
|
}else {
|
||||||
|
|
||||||
boolean exist = TenantHelper.dynamic(tenantId, () -> {
|
boolean exist = TenantHelper.dynamic(tenantId, () -> {
|
||||||
return userMapper.exists(new LambdaQueryWrapper<SysUser>()
|
return userMapper.exists(new LambdaQueryWrapper<SysUser>()
|
||||||
.eq(SysUser::getPhonenumber, sysUser.getPhonenumber()));
|
.eq(SysUser::getPhonenumber, sysUser.getPhonenumber()));
|
||||||
@ -112,6 +119,7 @@ public class SysRegisterService {
|
|||||||
if (!regFlag) {
|
if (!regFlag) {
|
||||||
throw new UserException("user.register.error");
|
throw new UserException("user.register.error");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
recordLogininfor(tenantId, username, Constants.REGISTER, MessageUtils.message("user.register.success"));
|
recordLogininfor(tenantId, username, Constants.REGISTER, MessageUtils.message("user.register.success"));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -52,6 +52,9 @@ spring:
|
|||||||
url: jdbc:mysql://192.168.110.2:13386/xinnengyuandev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://192.168.110.2:13386/xinnengyuandev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
username: xinnengyuandev
|
username: xinnengyuandev
|
||||||
password: StRWCZdZirysNSs2
|
password: StRWCZdZirysNSs2
|
||||||
|
# url: jdbc:mysql://192.168.110.2:13386/xinnengyuan?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
|
# username: xinnengyuan
|
||||||
|
# password: mEZPC5Sdf3r2HENi
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
lazy: true
|
lazy: true
|
||||||
@ -71,9 +74,16 @@ spring:
|
|||||||
lazy: true
|
lazy: true
|
||||||
type: ${spring.datasource.type}
|
type: ${spring.datasource.type}
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
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
|
url: jdbc:mysql://192.168.110.2:13386/zmkgc?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
||||||
username: zmkgdev
|
username: zmkgc
|
||||||
password: JhYxREf25AXdy3h8
|
password: nWKDKRNRT48tFBdh
|
||||||
|
# slave:
|
||||||
|
# lazy: true
|
||||||
|
# type: ${spring.datasource.type}
|
||||||
|
# driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
|
# url: jdbc:mysql://192.168.110.2:13386/zmkgprod?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
||||||
|
# username: zmkgprod
|
||||||
|
# password: MaY8nehwWkJriWPm
|
||||||
# oracle:
|
# oracle:
|
||||||
# type: ${spring.datasource.type}
|
# type: ${spring.datasource.type}
|
||||||
# driverClassName: oracle.jdbc.OracleDriver
|
# driverClassName: oracle.jdbc.OracleDriver
|
||||||
@ -116,7 +126,7 @@ spring.data:
|
|||||||
# 端口,默认为6379
|
# 端口,默认为6379
|
||||||
port: 9287
|
port: 9287
|
||||||
# 数据库索引
|
# 数据库索引
|
||||||
database: 10
|
database: 16
|
||||||
# redis 密码必须配置
|
# redis 密码必须配置
|
||||||
password: syar23rdsaagdrsa
|
password: syar23rdsaagdrsa
|
||||||
# 连接超时时间
|
# 连接超时时间
|
||||||
@ -175,7 +185,7 @@ sms:
|
|||||||
# 配置源类型用于标定配置来源(interface,yaml)
|
# 配置源类型用于标定配置来源(interface,yaml)
|
||||||
config-type: yaml
|
config-type: yaml
|
||||||
# 用于标定yml中的配置是否开启短信拦截,接口配置不受此限制
|
# 用于标定yml中的配置是否开启短信拦截,接口配置不受此限制
|
||||||
restricted: true
|
restricted: false
|
||||||
# 短信拦截限制单手机号每分钟最大发送,只对开启了拦截的配置有效
|
# 短信拦截限制单手机号每分钟最大发送,只对开启了拦截的配置有效
|
||||||
minute-max: 1
|
minute-max: 1
|
||||||
# 短信拦截限制单手机号每日最大发送量,只对开启了拦截的配置有效
|
# 短信拦截限制单手机号每日最大发送量,只对开启了拦截的配置有效
|
||||||
@ -209,6 +219,30 @@ sms:
|
|||||||
signature: 重庆远界大数据研究院
|
signature: 重庆远界大数据研究院
|
||||||
sdk-app-id: 1401018866
|
sdk-app-id: 1401018866
|
||||||
template-id: 2491776
|
template-id: 2491776
|
||||||
|
config4:
|
||||||
|
# 质量工单逾期
|
||||||
|
supplier: tencent
|
||||||
|
access-key-id: AKIDb3JK5dx4wa0DCxWqvxlKejvysZ3ITVJv
|
||||||
|
access-key-secret: c5LPFsJI8k7GDxTkoeFj4A1ukQr66rPi
|
||||||
|
signature: 重庆远界大数据研究院
|
||||||
|
sdk-app-id: 1401018866
|
||||||
|
template-id: 2534747
|
||||||
|
config5:
|
||||||
|
# 设计图纸
|
||||||
|
supplier: tencent
|
||||||
|
access-key-id: AKIDb3JK5dx4wa0DCxWqvxlKejvysZ3ITVJv
|
||||||
|
access-key-secret: c5LPFsJI8k7GDxTkoeFj4A1ukQr66rPi
|
||||||
|
signature: 重庆远界大数据研究院
|
||||||
|
sdk-app-id: 1401018866
|
||||||
|
template-id: 2534750
|
||||||
|
config6:
|
||||||
|
# 安全工单
|
||||||
|
supplier: tencent
|
||||||
|
access-key-id: AKIDb3JK5dx4wa0DCxWqvxlKejvysZ3ITVJv
|
||||||
|
access-key-secret: c5LPFsJI8k7GDxTkoeFj4A1ukQr66rPi
|
||||||
|
signature: 重庆远界大数据研究院
|
||||||
|
sdk-app-id: 1401018866
|
||||||
|
template-id: 2534848
|
||||||
|
|
||||||
|
|
||||||
--- # 三方授权
|
--- # 三方授权
|
||||||
@ -297,7 +331,10 @@ dxf2GeoJson:
|
|||||||
file-name: main.exe
|
file-name: main.exe
|
||||||
ys7:
|
ys7:
|
||||||
app-key: 3acf9f1a43dc4209841e0893003db0a2
|
app-key: 3acf9f1a43dc4209841e0893003db0a2
|
||||||
app-secret: 4bbf3e9394f55d3af6e3af27b2d3db36
|
app-secret: 09e29c70ae1161fbc3ce2030fc09ba2e
|
||||||
|
job:
|
||||||
|
capture-enabled: false # 控制是否启用萤石抓拍任务
|
||||||
|
device-sync-enabled: false # 控制是否同步萤石设备
|
||||||
#ys7:
|
#ys7:
|
||||||
# app-key: 081b0d6d5f7f4de8bc5c7fa350fb26ec
|
# app-key: 081b0d6d5f7f4de8bc5c7fa350fb26ec
|
||||||
# app-secret: caa37b9f60ef02deb57e563bc190e6db
|
# app-secret: caa37b9f60ef02deb57e563bc190e6db
|
||||||
|
|||||||
@ -55,21 +55,21 @@ spring:
|
|||||||
url: jdbc:mysql://192.168.110.2:13386/xinnengyuan?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
url: jdbc:mysql://192.168.110.2:13386/xinnengyuan?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
||||||
username: xinnengyuan
|
username: xinnengyuan
|
||||||
password: mEZPC5Sdf3r2HENi
|
password: mEZPC5Sdf3r2HENi
|
||||||
# 从库数据源
|
# # 从库数据源
|
||||||
slave:
|
# slave:
|
||||||
lazy: true
|
# lazy: true
|
||||||
type: ${spring.datasource.type}
|
# type: ${spring.datasource.type}
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
# driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://192.168.110.2:13386/zmkgc?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
# url: jdbc:mysql://192.168.110.2:13386/zmkgc?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
||||||
username: zmkgc
|
# username: zmkgc
|
||||||
password: nWKDKRNRT48tFBdh
|
# password: nWKDKRNRT48tFBdh
|
||||||
slave1:
|
# slave1:
|
||||||
lazy: true
|
# lazy: true
|
||||||
type: ${spring.datasource.type}
|
# type: ${spring.datasource.type}
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
# driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://192.168.110.2:13386/zmkgprod?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
# url: jdbc:mysql://192.168.110.2:13386/zmkgprod?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
||||||
username: zmkgprod
|
# username: zmkgprod
|
||||||
password: MaY8nehwWkJriWPm
|
# password: MaY8nehwWkJriWPm
|
||||||
# # 从库数据源
|
# # 从库数据源
|
||||||
# slave:
|
# slave:
|
||||||
# lazy: true
|
# lazy: true
|
||||||
@ -179,7 +179,7 @@ sms:
|
|||||||
# 配置源类型用于标定配置来源(interface,yaml)
|
# 配置源类型用于标定配置来源(interface,yaml)
|
||||||
config-type: yaml
|
config-type: yaml
|
||||||
# 用于标定yml中的配置是否开启短信拦截,接口配置不受此限制
|
# 用于标定yml中的配置是否开启短信拦截,接口配置不受此限制
|
||||||
restricted: true
|
restricted: false
|
||||||
# 短信拦截限制单手机号每分钟最大发送,只对开启了拦截的配置有效
|
# 短信拦截限制单手机号每分钟最大发送,只对开启了拦截的配置有效
|
||||||
minute-max: 1
|
minute-max: 1
|
||||||
# 短信拦截限制单手机号每日最大发送量,只对开启了拦截的配置有效
|
# 短信拦截限制单手机号每日最大发送量,只对开启了拦截的配置有效
|
||||||
@ -213,6 +213,30 @@ sms:
|
|||||||
signature: 重庆远界大数据研究院
|
signature: 重庆远界大数据研究院
|
||||||
sdk-app-id: 1401018866
|
sdk-app-id: 1401018866
|
||||||
template-id: 2491776
|
template-id: 2491776
|
||||||
|
config4:
|
||||||
|
# 质量工单逾期
|
||||||
|
supplier: tencent
|
||||||
|
access-key-id: AKIDb3JK5dx4wa0DCxWqvxlKejvysZ3ITVJv
|
||||||
|
access-key-secret: c5LPFsJI8k7GDxTkoeFj4A1ukQr66rPi
|
||||||
|
signature: 重庆远界大数据研究院
|
||||||
|
sdk-app-id: 1401018866
|
||||||
|
template-id: 2534747
|
||||||
|
config5:
|
||||||
|
# 设计图纸
|
||||||
|
supplier: tencent
|
||||||
|
access-key-id: AKIDb3JK5dx4wa0DCxWqvxlKejvysZ3ITVJv
|
||||||
|
access-key-secret: c5LPFsJI8k7GDxTkoeFj4A1ukQr66rPi
|
||||||
|
signature: 重庆远界大数据研究院
|
||||||
|
sdk-app-id: 1401018866
|
||||||
|
template-id: 2534750
|
||||||
|
config6:
|
||||||
|
# 安全工单
|
||||||
|
supplier: tencent
|
||||||
|
access-key-id: AKIDb3JK5dx4wa0DCxWqvxlKejvysZ3ITVJv
|
||||||
|
access-key-secret: c5LPFsJI8k7GDxTkoeFj4A1ukQr66rPi
|
||||||
|
signature: 重庆远界大数据研究院
|
||||||
|
sdk-app-id: 1401018866
|
||||||
|
template-id: 2534848
|
||||||
|
|
||||||
--- # 三方授权
|
--- # 三方授权
|
||||||
justauth:
|
justauth:
|
||||||
@ -297,10 +321,13 @@ weather:
|
|||||||
api-host: n35rk53njv.re.qweatherapi.com
|
api-host: n35rk53njv.re.qweatherapi.com
|
||||||
# dxf转 geojson 执行文件名
|
# dxf转 geojson 执行文件名
|
||||||
dxf2GeoJson:
|
dxf2GeoJson:
|
||||||
file-name: main.exe
|
file-name: main
|
||||||
ys7:
|
ys7:
|
||||||
app-key: 3acf9f1a43dc4209841e0893003db0a2
|
app-key: 3acf9f1a43dc4209841e0893003db0a2
|
||||||
app-secret: 4bbf3e9394f55d3af6e3af27b2d3db36
|
app-secret: 09e29c70ae1161fbc3ce2030fc09ba2e
|
||||||
|
job:
|
||||||
|
capture-enabled: false # 控制是否启用萤石抓拍任务
|
||||||
|
device-sync-enabled: true # 控制是否同步萤石设备
|
||||||
# 斯巴达算法
|
# 斯巴达算法
|
||||||
sparta:
|
sparta:
|
||||||
url: http://119.3.204.120:8040
|
url: http://119.3.204.120:8040
|
||||||
|
|||||||
@ -129,6 +129,7 @@ security:
|
|||||||
- /resource/oss/upload
|
- /resource/oss/upload
|
||||||
# todo 仅测试
|
# todo 仅测试
|
||||||
- /facility/matrix/**
|
- /facility/matrix/**
|
||||||
|
- /hat/device/data
|
||||||
|
|
||||||
# 多租户配置
|
# 多租户配置
|
||||||
tenant:
|
tenant:
|
||||||
@ -252,6 +253,8 @@ springdoc:
|
|||||||
packages-to-scan: org.dromara.design
|
packages-to-scan: org.dromara.design
|
||||||
- group: 13.工作流模块
|
- group: 13.工作流模块
|
||||||
packages-to-scan: org.dromara.workflow
|
packages-to-scan: org.dromara.workflow
|
||||||
|
- group: 14.合同模块
|
||||||
|
packages-to-scan: org.dromara.ctr
|
||||||
- group: 15.无人机模块
|
- group: 15.无人机模块
|
||||||
packages-to-scan: org.dromara.drone
|
packages-to-scan: org.dromara.drone
|
||||||
- group: 20.代码生成模块
|
- group: 20.代码生成模块
|
||||||
@ -274,10 +277,14 @@ springdoc:
|
|||||||
packages-to-scan: org.dromara.gps
|
packages-to-scan: org.dromara.gps
|
||||||
- group: 24.招标模块
|
- group: 24.招标模块
|
||||||
packages-to-scan: org.dromara.tender
|
packages-to-scan: org.dromara.tender
|
||||||
- group: 25.app版本模块
|
# - group: 25.app版本模块
|
||||||
packages-to-scan: org.dromara.app
|
# packages-to-scan: org.dromara.app
|
||||||
|
- group: 25.数据迁移模块
|
||||||
|
packages-to-scan: org.dromara.transferData
|
||||||
- group: 26.netty消息模块
|
- group: 26.netty消息模块
|
||||||
packages-to-scan: org.dromara.websocket
|
packages-to-scan: org.dromara.websocket
|
||||||
|
- group: 27.新中大模块
|
||||||
|
packages-to-scan: org.dromara.xzd
|
||||||
# knife4j的增强配置,不需要增强可以不配
|
# knife4j的增强配置,不需要增强可以不配
|
||||||
knife4j:
|
knife4j:
|
||||||
enable: true
|
enable: true
|
||||||
|
|||||||
@ -3,12 +3,18 @@ package org.dromara.test;
|
|||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.io.FileUtil;
|
import cn.hutool.core.io.FileUtil;
|
||||||
import cn.hutool.core.util.IdcardUtil;
|
import cn.hutool.core.util.IdcardUtil;
|
||||||
|
import cn.hutool.http.HttpRequest;
|
||||||
|
import cn.hutool.http.HttpResponse;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.dromara.common.core.constant.HttpStatus;
|
||||||
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
import org.dromara.common.utils.IdCardEncryptorUtil;
|
import org.dromara.common.utils.IdCardEncryptorUtil;
|
||||||
import org.dromara.contractor.domain.SubConstructionUser;
|
import org.dromara.contractor.domain.SubConstructionUser;
|
||||||
import org.dromara.contractor.service.ISubConstructionUserService;
|
import org.dromara.contractor.service.ISubConstructionUserService;
|
||||||
@ -19,7 +25,17 @@ import org.dromara.facility.service.IFacMatrixService;
|
|||||||
import org.dromara.facility.service.IFacPhotovoltaicPanelPartsService;
|
import org.dromara.facility.service.IFacPhotovoltaicPanelPartsService;
|
||||||
import org.dromara.facility.service.IFacPhotovoltaicPanelService;
|
import org.dromara.facility.service.IFacPhotovoltaicPanelService;
|
||||||
import org.dromara.manager.recognizermanager.vo.RecognizeConvertCoordinateResult;
|
import org.dromara.manager.recognizermanager.vo.RecognizeConvertCoordinateResult;
|
||||||
|
import org.dromara.manager.ys7manager.Ys7Constant;
|
||||||
|
import org.dromara.manager.ys7manager.Ys7Manager;
|
||||||
|
import org.dromara.manager.ys7manager.vo.Ys7ResponseVo;
|
||||||
|
import org.dromara.other.domain.OthYs7Device;
|
||||||
|
import org.dromara.other.service.IOthYs7DeviceService;
|
||||||
|
import org.dromara.out.domain.OutConstructionValue;
|
||||||
|
import org.dromara.out.domain.OutConstructionValueRange;
|
||||||
|
import org.dromara.out.service.IOutConstructionValueRangeService;
|
||||||
|
import org.dromara.out.service.IOutConstructionValueService;
|
||||||
import org.dromara.progress.domain.PgsProgressCategory;
|
import org.dromara.progress.domain.PgsProgressCategory;
|
||||||
|
import org.dromara.progress.domain.PgsProgressPlanDetail;
|
||||||
import org.dromara.progress.domain.dto.progresscategory.PgsProgressCategoryCreateReq;
|
import org.dromara.progress.domain.dto.progresscategory.PgsProgressCategoryCreateReq;
|
||||||
import org.dromara.progress.service.IPgsProgressCategoryService;
|
import org.dromara.progress.service.IPgsProgressCategoryService;
|
||||||
import org.dromara.progress.service.IPgsProgressCategoryTemplateService;
|
import org.dromara.progress.service.IPgsProgressCategoryTemplateService;
|
||||||
@ -37,9 +53,7 @@ import java.math.RoundingMode;
|
|||||||
import java.time.DayOfWeek;
|
import java.time.DayOfWeek;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.temporal.TemporalAdjusters;
|
import java.time.temporal.TemporalAdjusters;
|
||||||
import java.util.Date;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -89,9 +103,22 @@ public class DemoTest {
|
|||||||
@Resource
|
@Resource
|
||||||
private IFacPhotovoltaicPanelService photovoltaicPanelService;
|
private IFacPhotovoltaicPanelService photovoltaicPanelService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IOutConstructionValueRangeService constructionValueRangeService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IOutConstructionValueService constructionValueService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IOthYs7DeviceService ys7DeviceService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private Ys7Manager ys7Manager;
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testConstructionValue() {
|
void testConstructionValue() {
|
||||||
LocalDate today = LocalDate.now();
|
/* LocalDate today = LocalDate.now();
|
||||||
// 找到本周一
|
// 找到本周一
|
||||||
LocalDate thisMonday = today.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY));
|
LocalDate thisMonday = today.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY));
|
||||||
// 上周一 = 本周一 - 1 周
|
// 上周一 = 本周一 - 1 周
|
||||||
@ -99,7 +126,173 @@ public class DemoTest {
|
|||||||
// 上周日 = 上周一 + 6 天
|
// 上周日 = 上周一 + 6 天
|
||||||
LocalDate lastSunday = lastMonday.plusDays(6);
|
LocalDate lastSunday = lastMonday.plusDays(6);
|
||||||
log.info("执行定时任务:同步 {}至{} 计划详情到施工产值", lastMonday, lastSunday);
|
log.info("执行定时任务:同步 {}至{} 计划详情到施工产值", lastMonday, lastSunday);
|
||||||
Boolean synced = progressPlanDetailService.syncPlanDetail2ConstructionValue(lastMonday, lastSunday, null);
|
Boolean synced = progressPlanDetailService.syncPlanDetail2ConstructionValue(lastMonday, lastSunday, null);*/
|
||||||
|
LocalDate start = LocalDate.of(2024, 1, 1); // 起始时间(2024-01-01)
|
||||||
|
LocalDate end = LocalDate.of(2025, 10, 20); // 截止时间(2025-09-15)
|
||||||
|
|
||||||
|
// 如果起始不是周一,调整到当周的周一
|
||||||
|
if (start.getDayOfWeek() != DayOfWeek.MONDAY) {
|
||||||
|
start = start.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY));
|
||||||
|
}
|
||||||
|
|
||||||
|
while (!start.isAfter(end)) {
|
||||||
|
LocalDate monday = start;
|
||||||
|
LocalDate sunday = start.with(TemporalAdjusters.nextOrSame(DayOfWeek.SUNDAY));
|
||||||
|
|
||||||
|
// 输出本周的周一和周日
|
||||||
|
System.out.println(monday + " ~ " + sunday);
|
||||||
|
log.info("执行定时任务:同步 {}至{} 计划详情到施工产值", monday, sunday);
|
||||||
|
// Boolean synced = progressPlanDetailService.syncPlanDetail2ConstructionValue(start, now, null);
|
||||||
|
// 获取范围时间内的计划详情
|
||||||
|
List<PgsProgressPlanDetail> planDetailList = progressPlanDetailService.lambdaQuery()
|
||||||
|
.ge(PgsProgressPlanDetail::getDate, monday)
|
||||||
|
.le(PgsProgressPlanDetail::getDate, sunday)
|
||||||
|
.ne(PgsProgressPlanDetail::getFinishedNumber, BigDecimal.ZERO)
|
||||||
|
// .eq(PgsProgressPlanDetail::getStatus, "1")
|
||||||
|
.list();
|
||||||
|
if (CollUtil.isEmpty(planDetailList)) {
|
||||||
|
// 下一周
|
||||||
|
start = start.plusWeeks(1);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// 获取进度类别
|
||||||
|
List<Long> categoryIds = planDetailList.stream()
|
||||||
|
.map(PgsProgressPlanDetail::getProgressCategoryId)
|
||||||
|
.distinct()
|
||||||
|
.toList();
|
||||||
|
List<PgsProgressCategory> categoryList = progressCategoryService.lambdaQuery()
|
||||||
|
.in(CollUtil.isNotEmpty(categoryIds), PgsProgressCategory::getId, categoryIds)
|
||||||
|
.list();
|
||||||
|
Map<Long, PgsProgressCategory> categoryMap = categoryList.stream()
|
||||||
|
.collect(
|
||||||
|
Collectors.toMap(PgsProgressCategory::getId,
|
||||||
|
Function.identity(),
|
||||||
|
(v1, v2) -> v1)
|
||||||
|
);
|
||||||
|
// 为每一个项目创建一个施工产值范围
|
||||||
|
Set<Long> projectIds = planDetailList.stream()
|
||||||
|
.map(PgsProgressPlanDetail::getProjectId).collect(Collectors.toSet());
|
||||||
|
// 获取所有父级项目
|
||||||
|
List<BusProject> projectList = projectService.listByIds(projectIds);
|
||||||
|
List<Long> allProjectIds = projectList
|
||||||
|
.stream().map(project -> {
|
||||||
|
if (project.getPId() != 0L) {
|
||||||
|
return project.getPId();
|
||||||
|
} else {
|
||||||
|
return project.getId();
|
||||||
|
}
|
||||||
|
}).distinct().toList();
|
||||||
|
// 根据项目区分
|
||||||
|
Map<Long, List<PgsProgressPlanDetail>> detailMap = planDetailList.stream()
|
||||||
|
.collect(Collectors.groupingBy(PgsProgressPlanDetail::getProjectId));
|
||||||
|
List<OutConstructionValue> saveList = new ArrayList<>();
|
||||||
|
List<PgsProgressPlanDetail> allUpdateList = new ArrayList<>();
|
||||||
|
List<OutConstructionValueRange> ranges = allProjectIds.stream().map(id -> {
|
||||||
|
OutConstructionValueRange range = new OutConstructionValueRange();
|
||||||
|
long rangeId = IdWorker.getId(range);
|
||||||
|
range.setId(rangeId);
|
||||||
|
range.setProjectId(id);
|
||||||
|
range.setStartDate(monday);
|
||||||
|
range.setEndDate(sunday);
|
||||||
|
// 获取所有子项目
|
||||||
|
List<Long> subProject = new ArrayList<>(projectList.stream()
|
||||||
|
.filter(project -> Objects.equals(project.getPId(), id))
|
||||||
|
.map(BusProject::getId)
|
||||||
|
.distinct()
|
||||||
|
.toList());
|
||||||
|
subProject.add(id);
|
||||||
|
List<PgsProgressPlanDetail> detailList = new ArrayList<>();
|
||||||
|
for (Long p : subProject) {
|
||||||
|
List<PgsProgressPlanDetail> details = detailMap.getOrDefault(p, List.of());
|
||||||
|
detailList.addAll(details);
|
||||||
|
}
|
||||||
|
if (CollUtil.isEmpty(detailList)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
BigDecimal allConstructionValue = BigDecimal.ZERO;
|
||||||
|
BigDecimal allOwnerValue = BigDecimal.ZERO;
|
||||||
|
List<PgsProgressPlanDetail> updateList = new ArrayList<>();
|
||||||
|
for (PgsProgressPlanDetail planDetail : detailList) {
|
||||||
|
OutConstructionValue value = new OutConstructionValue();
|
||||||
|
Long progressCategoryId = planDetail.getProgressCategoryId();
|
||||||
|
PgsProgressCategory category = categoryMap.get(progressCategoryId);
|
||||||
|
if (category == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
value.setProjectId(id);
|
||||||
|
value.setRangeId(rangeId);
|
||||||
|
value.setMatrixId(category.getMatrixId());
|
||||||
|
value.setProgressCategoryId(progressCategoryId);
|
||||||
|
value.setDetailId(planDetail.getId());
|
||||||
|
BigDecimal finishedNumber = planDetail.getFinishedNumber();
|
||||||
|
BigDecimal aiFill = planDetail.getAiFill();
|
||||||
|
// 如果完成数量为0, 则不保存
|
||||||
|
if (finishedNumber.compareTo(BigDecimal.ZERO) == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
value.setArtificialNum(finishedNumber.subtract(aiFill).intValue());
|
||||||
|
value.setUavNum(aiFill.intValue());
|
||||||
|
value.setPlanNum(planDetail.getPlanNumber().intValue());
|
||||||
|
value.setReportDate(planDetail.getDate());
|
||||||
|
value.setPlanDate(planDetail.getDate());
|
||||||
|
// 计算产值
|
||||||
|
BigDecimal constructionPrice = category.getConstructionPrice();
|
||||||
|
BigDecimal ownerPrice = category.getOwnerPrice();
|
||||||
|
BigDecimal constructionValue = constructionPrice.multiply(finishedNumber).setScale(4, RoundingMode.HALF_UP);
|
||||||
|
BigDecimal ownerValue = ownerPrice.multiply(finishedNumber).setScale(4, RoundingMode.HALF_UP);
|
||||||
|
value.setOutValue(constructionValue);
|
||||||
|
value.setOwnerValue(ownerValue);
|
||||||
|
// 统计总产值
|
||||||
|
allConstructionValue = allConstructionValue.add(constructionValue);
|
||||||
|
allOwnerValue = allOwnerValue.add(ownerValue);
|
||||||
|
// 添加需要修改状态的计划详情
|
||||||
|
PgsProgressPlanDetail update = new PgsProgressPlanDetail();
|
||||||
|
update.setId(planDetail.getId());
|
||||||
|
update.setStatus("2");
|
||||||
|
updateList.add(update);
|
||||||
|
saveList.add(value);
|
||||||
|
}
|
||||||
|
range.setOutValue(allConstructionValue.setScale(4, RoundingMode.HALF_UP));
|
||||||
|
range.setOwnerValue(allOwnerValue.setScale(4, RoundingMode.HALF_UP));
|
||||||
|
// 如果产值都为0,则不保存
|
||||||
|
if (allConstructionValue.compareTo(BigDecimal.ZERO) == 0 && allOwnerValue.compareTo(BigDecimal.ZERO) == 0) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
allUpdateList.addAll(updateList);
|
||||||
|
return range;
|
||||||
|
}).filter(Objects::nonNull).toList();
|
||||||
|
// 保存数据
|
||||||
|
if (CollUtil.isNotEmpty(ranges)) {
|
||||||
|
boolean saveBatch = constructionValueRangeService.saveBatch(ranges);
|
||||||
|
if (!saveBatch) {
|
||||||
|
throw new ServiceException("同步计划详情到施工产值失败,数据库异常", HttpStatus.ERROR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (CollUtil.isNotEmpty(saveList)) {
|
||||||
|
boolean saved = constructionValueService.saveBatch(saveList);
|
||||||
|
if (!saved) {
|
||||||
|
throw new ServiceException("同步计划详情到施工产值失败,数据库异常", HttpStatus.ERROR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (CollUtil.isNotEmpty(allUpdateList)) {
|
||||||
|
boolean updateBatch = progressPlanDetailService.updateBatchById(allUpdateList);
|
||||||
|
if (!updateBatch) {
|
||||||
|
throw new ServiceException("同步计划详情到施工产值失败,数据库异常", HttpStatus.ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
// 下一周
|
||||||
|
start = start.plusWeeks(1);
|
||||||
|
}
|
||||||
|
/* LocalDate today = LocalDate.of(2025, 9, 16);
|
||||||
|
LocalDate localDate = today.minusDays(1);*/
|
||||||
|
/* // 找到本周一
|
||||||
|
LocalDate thisMonday = today.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY));
|
||||||
|
// 上周一 = 本周一 - 1 周
|
||||||
|
LocalDate lastMonday = thisMonday.minusWeeks(1);
|
||||||
|
// 上周日 = 上周一 + 6 天
|
||||||
|
LocalDate lastSunday = lastMonday.plusDays(6);*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -326,4 +519,32 @@ public class DemoTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void openSxtLx() {
|
||||||
|
String token = ys7Manager.getToken();
|
||||||
|
List<OthYs7Device> list = ys7DeviceService.list();
|
||||||
|
for (OthYs7Device othYs7Device : list) {
|
||||||
|
HashMap<String, Object> paramMap = new HashMap<>();
|
||||||
|
paramMap.put("accessToken", token);
|
||||||
|
paramMap.put("deviceSerial", othYs7Device.getDeviceSerial());
|
||||||
|
paramMap.put("enable", 1);
|
||||||
|
String errorMsg = "Ys7 Token 请求失败";
|
||||||
|
try (HttpResponse response = HttpRequest.post(Ys7Constant.setDeviceVideoUrlByPost)
|
||||||
|
.form(paramMap)
|
||||||
|
.execute()) {
|
||||||
|
if (!response.isOk()) {
|
||||||
|
log.error("{}:{}", errorMsg, response.getStatus());
|
||||||
|
// throw new ServiceException(errorMsg + response.getStatus());
|
||||||
|
}
|
||||||
|
String body = response.body();
|
||||||
|
Ys7ResponseVo responseVo = JSONUtil.toBean(body, Ys7ResponseVo.class);
|
||||||
|
if (!responseVo.getCode().equals("200")) {
|
||||||
|
log.error("{},状态码:{},{}", errorMsg, responseVo.getCode(), responseVo.getMsg());
|
||||||
|
// throw new ServiceException(errorMsg + responseVo.getMsg());
|
||||||
|
}
|
||||||
|
log.info("Ys7 Token 请求成功:{}", body);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,7 +23,7 @@ public class RecognizerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void test() {
|
void test() {
|
||||||
RecognizeVo recognize = recognizerManager.recognize("http://xny.yj-3d.com:7363/file/tif/20250625160218orthophoto.png", List.of(RecognizerTypeEnum.PHO));
|
RecognizeVo recognize = recognizerManager.recognize("http://xny.yj-3d.com:7363/file/tif/20250625160218orthophoto.png", List.of(RecognizerTypeEnum.SOLAR));
|
||||||
log.info("recognize: {}", recognize);
|
log.info("recognize: {}", recognize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import lombok.Data;
|
|||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|||||||
@ -77,7 +77,7 @@ public class RedisUtils {
|
|||||||
public static <T> void publish(String channelKey, T msg, Consumer<T> consumer) {
|
public static <T> void publish(String channelKey, T msg, Consumer<T> consumer) {
|
||||||
RTopic topic = CLIENT.getTopic(channelKey);
|
RTopic topic = CLIENT.getTopic(channelKey);
|
||||||
topic.publish(msg);
|
topic.publish(msg);
|
||||||
System.out.println("发布通道消息---------"+msg.toString());
|
// System.out.println("发布通道消息---------"+msg.toString());
|
||||||
consumer.accept(msg);
|
consumer.accept(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -28,7 +28,7 @@ public class SaPermissionImpl implements StpInterface {
|
|||||||
public List<String> getPermissionList(Object loginId, String loginType) {
|
public List<String> getPermissionList(Object loginId, String loginType) {
|
||||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||||
UserType userType = UserType.getUserType(loginUser.getUserType());
|
UserType userType = UserType.getUserType(loginUser.getUserType());
|
||||||
if (userType == UserType.SYS_USER) {
|
if (userType == UserType.SYS_USER || userType == UserType.APP_USER) {
|
||||||
Long projectId = loginUser.getProjectId();
|
Long projectId = loginUser.getProjectId();
|
||||||
List<SysProjectRoleMenuVo> menuPermission = loginUser.getMenuPermission();
|
List<SysProjectRoleMenuVo> menuPermission = loginUser.getMenuPermission();
|
||||||
if (CollUtil.isNotEmpty(menuPermission)) {
|
if (CollUtil.isNotEmpty(menuPermission)) {
|
||||||
@ -51,9 +51,10 @@ public class SaPermissionImpl implements StpInterface {
|
|||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (userType == UserType.APP_USER) {
|
|
||||||
// 其他端 自行根据业务编写
|
|
||||||
}
|
}
|
||||||
|
/* else if (userType == UserType.APP_USER) {
|
||||||
|
// 其他端 自行根据业务编写
|
||||||
|
}*/
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
// return Collections.singletonList("*");
|
// return Collections.singletonList("*");
|
||||||
}
|
}
|
||||||
@ -65,7 +66,7 @@ public class SaPermissionImpl implements StpInterface {
|
|||||||
public List<String> getRoleList(Object loginId, String loginType) {
|
public List<String> getRoleList(Object loginId, String loginType) {
|
||||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||||
UserType userType = UserType.getUserType(loginUser.getUserType());
|
UserType userType = UserType.getUserType(loginUser.getUserType());
|
||||||
if (userType == UserType.SYS_USER) {
|
if (userType == UserType.SYS_USER || userType == UserType.APP_USER) {
|
||||||
Long projectId = loginUser.getProjectId();
|
Long projectId = loginUser.getProjectId();
|
||||||
List<SysProjectRolePermissionVo> rolePermission = loginUser.getRolePermission();
|
List<SysProjectRolePermissionVo> rolePermission = loginUser.getRolePermission();
|
||||||
if (CollUtil.isNotEmpty(rolePermission)) {
|
if (CollUtil.isNotEmpty(rolePermission)) {
|
||||||
@ -87,9 +88,10 @@ public class SaPermissionImpl implements StpInterface {
|
|||||||
} else {
|
} else {
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
} else if (userType == UserType.APP_USER) {
|
|
||||||
// 其他端 自行根据业务编写
|
|
||||||
}
|
}
|
||||||
|
/* else if (userType == UserType.APP_USER) {
|
||||||
|
// 其他端 自行根据业务编写
|
||||||
|
}*/
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,6 +13,7 @@ import org.springframework.web.socket.WebSocketHandler;
|
|||||||
import org.springframework.web.socket.config.annotation.EnableWebSocket;
|
import org.springframework.web.socket.config.annotation.EnableWebSocket;
|
||||||
import org.springframework.web.socket.config.annotation.WebSocketConfigurer;
|
import org.springframework.web.socket.config.annotation.WebSocketConfigurer;
|
||||||
import org.springframework.web.socket.server.HandshakeInterceptor;
|
import org.springframework.web.socket.server.HandshakeInterceptor;
|
||||||
|
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WebSocket 配置
|
* WebSocket 配置
|
||||||
|
|||||||
@ -26,7 +26,7 @@ public class WebSocketTopicListener implements ApplicationRunner, Ordered {
|
|||||||
public void run(ApplicationArguments args) throws Exception {
|
public void run(ApplicationArguments args) throws Exception {
|
||||||
// 订阅WebSocket消息
|
// 订阅WebSocket消息
|
||||||
WebSocketUtils.subscribeMessage((message) -> {
|
WebSocketUtils.subscribeMessage((message) -> {
|
||||||
log.info("WebSocket主题订阅收到消息session keys={} message={}", message.getSessionKeys(), message.getMessage());
|
// log.info("WebSocket主题订阅收到消息session keys={} message={}", message.getSessionKeys(), message.getMessage());
|
||||||
// 如果key不为空就按照key发消息 如果为空就群发
|
// 如果key不为空就按照key发消息 如果为空就群发
|
||||||
if (CollUtil.isNotEmpty(message.getSessionKeys())) {
|
if (CollUtil.isNotEmpty(message.getSessionKeys())) {
|
||||||
message.getSessionKeys().forEach(key -> {
|
message.getSessionKeys().forEach(key -> {
|
||||||
|
|||||||
@ -69,8 +69,8 @@ public class WebSocketUtils {
|
|||||||
broadcastMessage.setMessage(webSocketMessage.getMessage());
|
broadcastMessage.setMessage(webSocketMessage.getMessage());
|
||||||
broadcastMessage.setSessionKeys(unsentSessionKeys);
|
broadcastMessage.setSessionKeys(unsentSessionKeys);
|
||||||
RedisUtils.publish(WEB_SOCKET_TOPIC, broadcastMessage, consumer -> {
|
RedisUtils.publish(WEB_SOCKET_TOPIC, broadcastMessage, consumer -> {
|
||||||
log.info(" WebSocket发送主题订阅消息topic:{} session keys:{} message:{}",
|
// log.info(" WebSocket发送主题订阅消息topic:{} session keys:{} message:{}",
|
||||||
WEB_SOCKET_TOPIC, unsentSessionKeys, webSocketMessage.getMessage());
|
// WEB_SOCKET_TOPIC, unsentSessionKeys, webSocketMessage.getMessage());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -84,7 +84,7 @@ public class WebSocketUtils {
|
|||||||
WebSocketMessageDto broadcastMessage = new WebSocketMessageDto();
|
WebSocketMessageDto broadcastMessage = new WebSocketMessageDto();
|
||||||
broadcastMessage.setMessage(message);
|
broadcastMessage.setMessage(message);
|
||||||
RedisUtils.publish(WEB_SOCKET_TOPIC, broadcastMessage, consumer -> {
|
RedisUtils.publish(WEB_SOCKET_TOPIC, broadcastMessage, consumer -> {
|
||||||
log.info("WebSocket发送主题订阅消息topic:{} message:{}", WEB_SOCKET_TOPIC, message);
|
// log.info("WebSocket发送主题订阅消息topic:{} message:{}", WEB_SOCKET_TOPIC, message);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -18,6 +18,24 @@
|
|||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
|
<!-- Java WebSocket 标准API -->
|
||||||
|
<!-- <dependency>-->
|
||||||
|
<!-- <groupId>javax.websocket</groupId>-->
|
||||||
|
<!-- <artifactId>javax.websocket-api</artifactId>-->
|
||||||
|
<!-- <version>1.1</version>-->
|
||||||
|
<!-- <scope>provided</scope>-->
|
||||||
|
<!-- </dependency>-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-websocket</artifactId>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- <dependency>-->
|
<!-- <dependency>-->
|
||||||
<!-- <groupId>com.drewnoakes</groupId>-->
|
<!-- <groupId>com.drewnoakes</groupId>-->
|
||||||
<!-- <artifactId>metadata-extractor</artifactId>-->
|
<!-- <artifactId>metadata-extractor</artifactId>-->
|
||||||
@ -262,6 +280,13 @@
|
|||||||
<artifactId>netty-all</artifactId>
|
<artifactId>netty-all</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-codec</groupId>
|
||||||
|
<artifactId>commons-codec</artifactId>
|
||||||
|
<version>1.15</version> <!-- 最新版本可自行调整 -->
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@ -41,40 +41,87 @@ public class SysPackageController {
|
|||||||
/**
|
/**
|
||||||
* 上传最新安装包及版本
|
* 上传最新安装包及版本
|
||||||
*/
|
*/
|
||||||
@Transactional
|
|
||||||
@GetMapping("/uploadNewVersion")
|
@GetMapping("/uploadNewVersion")
|
||||||
public R<SysPackage> uploadNewVersion(String version, String type, MultipartFile file) {
|
public R<SysPackage> uploadNewVersion(String version, String type, MultipartFile file) {
|
||||||
String originalFileName = "apk/package/app-release.apk";
|
String originalFileName = "apk/package/app-release.apk";
|
||||||
|
|
||||||
//覆盖失败,先删除文件
|
// 先查询最新记录
|
||||||
LambdaQueryWrapper<SysPackage> lambdaQueryWrapper =new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<SysPackage> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
lambdaQueryWrapper.orderByDesc(SysPackage::getCreateTime);
|
lambdaQueryWrapper.orderByDesc(SysPackage::getCreateTime);
|
||||||
List<SysPackage> list = sysPackageService.list(lambdaQueryWrapper);
|
List<SysPackage> list = sysPackageService.list(lambdaQueryWrapper);
|
||||||
if (list != null && !list.isEmpty()){
|
|
||||||
SysPackage first = list.getFirst();
|
// 分离事务:先处理文件上传
|
||||||
|
SysOssVo upload = sysOssService.upload(file, originalFileName);
|
||||||
|
if (upload == null) {
|
||||||
|
return R.fail("上传失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分离事务:再处理数据库操作
|
||||||
|
return handleDatabaseOperations(version, type, upload, list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public R<SysPackage> handleDatabaseOperations(String version, String type, SysOssVo upload, List<SysPackage> existingPackages) {
|
||||||
|
try {
|
||||||
|
// 先删除旧文件记录
|
||||||
|
if (existingPackages != null && !existingPackages.isEmpty()) {
|
||||||
|
SysPackage first = existingPackages.getFirst();
|
||||||
Boolean b = sysOssService.deleteWithValidByIds(List.of(first.getFileId()), false);
|
Boolean b = sysOssService.deleteWithValidByIds(List.of(first.getFileId()), false);
|
||||||
if (!b){
|
if (!b) {
|
||||||
log.error("通过IDS删除文件失败");
|
log.error("通过IDS删除文件失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SysOssVo upload = sysOssService.upload(file, originalFileName);
|
// 保存新记录
|
||||||
if (upload == null){
|
|
||||||
return R.fail("上传失败");
|
|
||||||
}
|
|
||||||
SysPackage sysPackage = new SysPackage();
|
SysPackage sysPackage = new SysPackage();
|
||||||
sysPackage.setVersion( version);
|
sysPackage.setVersion(version);
|
||||||
sysPackage.setFileId(upload.getOssId());
|
sysPackage.setFileId(upload.getOssId());
|
||||||
sysPackage.setFileUrl(upload.getUrl());
|
sysPackage.setFileUrl(upload.getUrl());
|
||||||
sysPackage.setType(type);
|
sysPackage.setType(type);
|
||||||
|
|
||||||
boolean save = sysPackageService.save(sysPackage);
|
boolean save = sysPackageService.save(sysPackage);
|
||||||
if (!save){
|
if (!save) {
|
||||||
return R.fail("保存失败");
|
return R.fail("保存失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
return R.ok(sysPackage);
|
return R.ok(sysPackage);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("数据库操作失败", e);
|
||||||
|
throw e; // 重新抛出异常触发事务回滚
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
// public R<SysPackage> uploadNewVersion(String version, String type, MultipartFile file) {
|
||||||
|
// String originalFileName = "apk/package/app-release.apk";
|
||||||
|
//
|
||||||
|
// //覆盖失败,先删除文件
|
||||||
|
// LambdaQueryWrapper<SysPackage> lambdaQueryWrapper =new LambdaQueryWrapper<>();
|
||||||
|
// lambdaQueryWrapper.orderByDesc(SysPackage::getCreateTime);
|
||||||
|
// List<SysPackage> list = sysPackageService.list(lambdaQueryWrapper);
|
||||||
|
// if (list != null && !list.isEmpty()){
|
||||||
|
// SysPackage first = list.getFirst();
|
||||||
|
// Boolean b = sysOssService.deleteWithValidByIds(List.of(first.getFileId()), false);
|
||||||
|
// if (!b){
|
||||||
|
// log.error("通过IDS删除文件失败");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// SysOssVo upload = sysOssService.upload(file, originalFileName);
|
||||||
|
// if (upload == null){
|
||||||
|
// return R.fail("上传失败");
|
||||||
|
// }
|
||||||
|
// SysPackage sysPackage = new SysPackage();
|
||||||
|
// sysPackage.setVersion( version);
|
||||||
|
// sysPackage.setFileId(upload.getOssId());
|
||||||
|
// sysPackage.setFileUrl(upload.getUrl());
|
||||||
|
// sysPackage.setType(type);
|
||||||
|
//
|
||||||
|
// boolean save = sysPackageService.save(sysPackage);
|
||||||
|
// if (!save){
|
||||||
|
// return R.fail("保存失败");
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// return R.ok(sysPackage);
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -0,0 +1,56 @@
|
|||||||
|
package org.dromara.bigscreen.config;
|
||||||
|
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import org.dromara.bigscreen.listener.RedisMessageListener;
|
||||||
|
import org.dromara.drone.service.IDroProjectDroneService;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
|
import org.springframework.data.redis.connection.RedisConnectionFactory;
|
||||||
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
|
import org.springframework.data.redis.listener.PatternTopic;
|
||||||
|
import org.springframework.data.redis.listener.RedisMessageListenerContainer;
|
||||||
|
import org.springframework.data.redis.listener.adapter.MessageListenerAdapter;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class RedisConfig {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
@Lazy
|
||||||
|
private IDroProjectDroneService droProjectDroneService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 配置Redis消息监听容器
|
||||||
|
*/
|
||||||
|
@Bean
|
||||||
|
public RedisMessageListenerContainer container(RedisConnectionFactory connectionFactory,
|
||||||
|
MessageListenerAdapter listenerAdapter) {
|
||||||
|
|
||||||
|
RedisMessageListenerContainer container = new RedisMessageListenerContainer();
|
||||||
|
container.setConnectionFactory(connectionFactory);
|
||||||
|
// List<String> wrjKeys = droProjectDroneService.getTopicsByKeyPrefix();
|
||||||
|
// for (String key : wrjKeys) {
|
||||||
|
// // 订阅 wrj:8UUXN4P00A06NK 频道
|
||||||
|
// container.addMessageListener(listenerAdapter, new PatternTopic("wrj:osd4"+key));
|
||||||
|
// }
|
||||||
|
return container;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 配置消息监听适配器,将消息转发给自定义的监听器
|
||||||
|
*/
|
||||||
|
@Bean
|
||||||
|
public MessageListenerAdapter listenerAdapter(RedisMessageListener listener) {
|
||||||
|
return new MessageListenerAdapter(listener);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 配置StringRedisTemplate
|
||||||
|
*/
|
||||||
|
@Bean
|
||||||
|
public StringRedisTemplate stringRedisTemplate(RedisConnectionFactory connectionFactory) {
|
||||||
|
return new StringRedisTemplate(connectionFactory);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,10 +1,8 @@
|
|||||||
package org.dromara.bigscreen.controller;
|
package org.dromara.bigscreen.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
|
||||||
import org.dromara.bigscreen.domain.dto.WeatherQueryReq;
|
import org.dromara.bigscreen.domain.dto.WeatherQueryReq;
|
||||||
import org.dromara.bigscreen.domain.vo.*;
|
import org.dromara.bigscreen.domain.vo.*;
|
||||||
import org.dromara.bigscreen.mapper.ProjectBigScreenMapper;
|
import org.dromara.bigscreen.mapper.ProjectBigScreenMapper;
|
||||||
@ -52,14 +50,10 @@ public class EnterpriseBigScreenController {
|
|||||||
@Resource
|
@Resource
|
||||||
private IBusProjectService projectService;
|
private IBusProjectService projectService;
|
||||||
|
|
||||||
@Resource
|
|
||||||
private ProjectBigScreenMapper projectBigScreenMapper;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取关键指标
|
* 获取关键指标
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("enterprise:bigScreen:keyIndex")
|
// @SaCheckPermission("enterprise:bigScreen:keyIndex")
|
||||||
@GetMapping("/keyIndex")
|
@GetMapping("/keyIndex")
|
||||||
public R<EnterpriseKeyIndexVo> getEnterpriseKeyIndex() {
|
public R<EnterpriseKeyIndexVo> getEnterpriseKeyIndex() {
|
||||||
return R.ok(enterpriseBigScreenService.getEnterpriseKeyIndex());
|
return R.ok(enterpriseBigScreenService.getEnterpriseKeyIndex());
|
||||||
@ -68,7 +62,7 @@ public class EnterpriseBigScreenController {
|
|||||||
/**
|
/**
|
||||||
* 项目进度分析
|
* 项目进度分析
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("enterprise:bigScreen:projectProgress")
|
// @SaCheckPermission("enterprise:bigScreen:projectProgress")
|
||||||
@GetMapping("/projectProgress")
|
@GetMapping("/projectProgress")
|
||||||
public R<ProjectProgressAnalysisVo> getProjectProgress() {
|
public R<ProjectProgressAnalysisVo> getProjectProgress() {
|
||||||
return R.ok(enterpriseBigScreenService.getProjectProgressAnalysis());
|
return R.ok(enterpriseBigScreenService.getProjectProgressAnalysis());
|
||||||
@ -77,7 +71,7 @@ public class EnterpriseBigScreenController {
|
|||||||
/**
|
/**
|
||||||
* 项目产值对比
|
* 项目产值对比
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("enterprise:bigScreen:projectOutputValueComparison")
|
// @SaCheckPermission("enterprise:bigScreen:projectOutputValueComparison")
|
||||||
@GetMapping("/projectOutputValueComparison")
|
@GetMapping("/projectOutputValueComparison")
|
||||||
public R<List<OutputValueComparisonVo>> getProjectOutputValueComparison() {
|
public R<List<OutputValueComparisonVo>> getProjectOutputValueComparison() {
|
||||||
return R.ok(enterpriseBigScreenService.getProjectOutputValueComparison());
|
return R.ok(enterpriseBigScreenService.getProjectOutputValueComparison());
|
||||||
@ -86,7 +80,7 @@ public class EnterpriseBigScreenController {
|
|||||||
/**
|
/**
|
||||||
* 项目进度完成度和计划容量
|
* 项目进度完成度和计划容量
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("enterprise:bigScreen:projectProgressCapacity")
|
// @SaCheckPermission("enterprise:bigScreen:projectProgressCapacity")
|
||||||
@GetMapping("/projectProgressCapacity")
|
@GetMapping("/projectProgressCapacity")
|
||||||
public R<List<ProjectProgressCapacityVo>> getProjectProgressCapacity() {
|
public R<List<ProjectProgressCapacityVo>> getProjectProgressCapacity() {
|
||||||
return R.ok(enterpriseBigScreenService.getProjectProgressCapacity());
|
return R.ok(enterpriseBigScreenService.getProjectProgressCapacity());
|
||||||
@ -95,7 +89,7 @@ public class EnterpriseBigScreenController {
|
|||||||
/**
|
/**
|
||||||
* 风险预警
|
* 风险预警
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("enterprise:bigScreen:riskEarlyWarning")
|
// @SaCheckPermission("enterprise:bigScreen:riskEarlyWarning")
|
||||||
@GetMapping("/riskEarlyWarning")
|
@GetMapping("/riskEarlyWarning")
|
||||||
public R<List<RiskEarlyWarningVo>> getRiskEarlyWarning() {
|
public R<List<RiskEarlyWarningVo>> getRiskEarlyWarning() {
|
||||||
return R.ok(enterpriseBigScreenService.getRiskEarlyWarning());
|
return R.ok(enterpriseBigScreenService.getRiskEarlyWarning());
|
||||||
@ -104,7 +98,7 @@ public class EnterpriseBigScreenController {
|
|||||||
/**
|
/**
|
||||||
* 查询天气
|
* 查询天气
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("enterprise:bigScreen:weather")
|
// @SaCheckPermission("enterprise:bigScreen:weather")
|
||||||
@GetMapping("/weather")
|
@GetMapping("/weather")
|
||||||
public R<List<WeatherVo>> getProjectWeather(WeatherQueryReq req) {
|
public R<List<WeatherVo>> getProjectWeather(WeatherQueryReq req) {
|
||||||
return R.ok(enterpriseBigScreenService.getWeather3DaysList(req));
|
return R.ok(enterpriseBigScreenService.getWeather3DaysList(req));
|
||||||
@ -113,7 +107,7 @@ public class EnterpriseBigScreenController {
|
|||||||
/**
|
/**
|
||||||
* 查询安全天数
|
* 查询安全天数
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("enterprise:bigScreen:safetyDay")
|
// @SaCheckPermission("enterprise:bigScreen:safetyDay")
|
||||||
@GetMapping("/safetyDay")
|
@GetMapping("/safetyDay")
|
||||||
public R<Long> getProjectSafetyDay() {
|
public R<Long> getProjectSafetyDay() {
|
||||||
LocalDate date = LocalDate.of(2023, 1, 1);
|
LocalDate date = LocalDate.of(2023, 1, 1);
|
||||||
@ -125,7 +119,7 @@ public class EnterpriseBigScreenController {
|
|||||||
/**
|
/**
|
||||||
* 人数统计
|
* 人数统计
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("enterprise:bigScreen:peopleCount")
|
// @SaCheckPermission("enterprise:bigScreen:peopleCount")
|
||||||
@GetMapping("/peopleCount")
|
@GetMapping("/peopleCount")
|
||||||
public R<PeopleCountVo> getProjectPeopleCount() {
|
public R<PeopleCountVo> getProjectPeopleCount() {
|
||||||
PeopleCountVo peopleCountVo = new PeopleCountVo();
|
PeopleCountVo peopleCountVo = new PeopleCountVo();
|
||||||
@ -156,7 +150,7 @@ public class EnterpriseBigScreenController {
|
|||||||
/**
|
/**
|
||||||
* 出勤人数统计
|
* 出勤人数统计
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("enterprise:bigScreen:allAttendanceCount")
|
// @SaCheckPermission("enterprise:bigScreen:allAttendanceCount")
|
||||||
@GetMapping("/allAttendanceCount")
|
@GetMapping("/allAttendanceCount")
|
||||||
public R<TodayAttendanceCountVo> getAllAttendanceCount() {
|
public R<TodayAttendanceCountVo> getAllAttendanceCount() {
|
||||||
TodayAttendanceCountVo todayAttendanceCountVo = new TodayAttendanceCountVo();
|
TodayAttendanceCountVo todayAttendanceCountVo = new TodayAttendanceCountVo();
|
||||||
@ -195,7 +189,7 @@ public class EnterpriseBigScreenController {
|
|||||||
/**
|
/**
|
||||||
* 每个项目的出勤人数
|
* 每个项目的出勤人数
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("enterprise:bigScreen:projectAttendanceCount")
|
// @SaCheckPermission("enterprise:bigScreen:projectAttendanceCount")
|
||||||
@GetMapping("/projectAttendanceCount")
|
@GetMapping("/projectAttendanceCount")
|
||||||
public R<List<ProjectAttendanceCountVo>> getProjectAttendanceCount() {
|
public R<List<ProjectAttendanceCountVo>> getProjectAttendanceCount() {
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
package org.dromara.bigscreen.controller;
|
package org.dromara.bigscreen.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@ -62,7 +61,7 @@ public class MoneyBigScreenController {
|
|||||||
/**
|
/**
|
||||||
* 查询项目位置列表
|
* 查询项目位置列表
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("money:bigScreen:projectGis")
|
// @SaCheckPermission("money:bigScreen:projectGis")
|
||||||
@GetMapping("/project/gis")
|
@GetMapping("/project/gis")
|
||||||
public R<List<BusProjectGisVo>> getProjectGis() {
|
public R<List<BusProjectGisVo>> getProjectGis() {
|
||||||
return R.ok(moneyBigScreenService.getProjectGis());
|
return R.ok(moneyBigScreenService.getProjectGis());
|
||||||
@ -545,7 +544,7 @@ public class MoneyBigScreenController {
|
|||||||
/**
|
/**
|
||||||
* 查询项目天气
|
* 查询项目天气
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("project:bigScreen:weather")
|
// @SaCheckPermission("project:bigScreen:weather")
|
||||||
@GetMapping("/weather/{projectId}")
|
@GetMapping("/weather/{projectId}")
|
||||||
public R<List<WeatherVo>> getProjectWeather(@NotNull(message = "主键不能为空")
|
public R<List<WeatherVo>> getProjectWeather(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long projectId) {
|
@PathVariable Long projectId) {
|
||||||
@ -555,7 +554,7 @@ public class MoneyBigScreenController {
|
|||||||
/**
|
/**
|
||||||
* 查询项目安全天数
|
* 查询项目安全天数
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("project:bigScreen:safetyDay")
|
// @SaCheckPermission("project:bigScreen:safetyDay")
|
||||||
@GetMapping("/safetyDay/{projectId}")
|
@GetMapping("/safetyDay/{projectId}")
|
||||||
public R<BusProjectSafetyDayVo> getProjectSafetyDay(@NotNull(message = "主键不能为空")
|
public R<BusProjectSafetyDayVo> getProjectSafetyDay(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long projectId) {
|
@PathVariable Long projectId) {
|
||||||
|
|||||||
@ -1,27 +1,35 @@
|
|||||||
package org.dromara.bigscreen.controller;
|
package org.dromara.bigscreen.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.bigscreen.domain.dto.ProjectUpdateDto;
|
||||||
|
import org.dromara.bigscreen.domain.dto.TanchuangInfoReq;
|
||||||
|
import org.dromara.bigscreen.domain.dto.Ys7DeviceUpdateReq;
|
||||||
import org.dromara.bigscreen.domain.vo.ProjectImageProgressVo;
|
import org.dromara.bigscreen.domain.vo.ProjectImageProgressVo;
|
||||||
import org.dromara.bigscreen.domain.vo.ProjectLandVo;
|
import org.dromara.bigscreen.domain.vo.ProjectLandVo;
|
||||||
import org.dromara.bigscreen.domain.vo.ProjectPeopleVo;
|
import org.dromara.bigscreen.domain.vo.ProjectPeopleVo;
|
||||||
import org.dromara.bigscreen.domain.vo.ProjectSafetyInspectionVo;
|
import org.dromara.bigscreen.domain.vo.ProjectSafetyInspectionVo;
|
||||||
import org.dromara.bigscreen.service.ProjectBigScreenService;
|
import org.dromara.bigscreen.service.ProjectBigScreenService;
|
||||||
|
import org.dromara.common.core.constant.HttpStatus;
|
||||||
import org.dromara.common.core.domain.R;
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
import org.dromara.common.log.annotation.Log;
|
import org.dromara.common.log.annotation.Log;
|
||||||
import org.dromara.common.log.enums.BusinessType;
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
import org.dromara.gps.domain.bo.GpsEquipmentBo;
|
import org.dromara.gps.domain.bo.GpsEquipmentBo;
|
||||||
import org.dromara.gps.domain.vo.GpsEquipmentSonVo;
|
|
||||||
import org.dromara.gps.service.IGpsEquipmentService;
|
|
||||||
import org.dromara.land.domain.BusLandBlock;
|
import org.dromara.land.domain.BusLandBlock;
|
||||||
import org.dromara.land.domain.BusLandTransferLedger;
|
import org.dromara.land.domain.BusLandTransferLedger;
|
||||||
|
import org.dromara.land.domain.BusLandTransferLedgerSon;
|
||||||
import org.dromara.land.service.IBusLandBlockService;
|
import org.dromara.land.service.IBusLandBlockService;
|
||||||
import org.dromara.land.service.IBusLandTransferLedgerService;
|
import org.dromara.land.service.IBusLandTransferLedgerService;
|
||||||
|
import org.dromara.land.service.impl.BusLandTransferLedgerSonServiceImpl;
|
||||||
import org.dromara.manager.weathermanager.vo.WeatherVo;
|
import org.dromara.manager.weathermanager.vo.WeatherVo;
|
||||||
|
import org.dromara.manager.ys7manager.Ys7Manager;
|
||||||
import org.dromara.other.domain.OthYs7Device;
|
import org.dromara.other.domain.OthYs7Device;
|
||||||
import org.dromara.other.service.IOthYs7DeviceService;
|
import org.dromara.other.service.IOthYs7DeviceService;
|
||||||
import org.dromara.project.domain.vo.project.BusProjectSafetyDayVo;
|
import org.dromara.project.domain.vo.project.BusProjectSafetyDayVo;
|
||||||
@ -34,12 +42,12 @@ import org.dromara.quality.service.IQltQualityInspectionService;
|
|||||||
import org.dromara.safety.domain.dto.safetyinspection.HseSafetyInspectionGisReq;
|
import org.dromara.safety.domain.dto.safetyinspection.HseSafetyInspectionGisReq;
|
||||||
import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionListGisVo;
|
import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionListGisVo;
|
||||||
import org.dromara.safety.service.IHseSafetyInspectionService;
|
import org.dromara.safety.service.IHseSafetyInspectionService;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@ -54,7 +62,7 @@ import java.util.stream.Collectors;
|
|||||||
@RestController
|
@RestController
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@RequestMapping("/project/big/screen")
|
@RequestMapping("/project/big/screen")
|
||||||
public class ProjectBigScreenController {
|
public class ProjectBigScreenController extends BaseController {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ProjectBigScreenService projectBigScreenService;
|
private ProjectBigScreenService projectBigScreenService;
|
||||||
@ -63,7 +71,6 @@ public class ProjectBigScreenController {
|
|||||||
|
|
||||||
private final IBusLandBlockService busLandBlockService;
|
private final IBusLandBlockService busLandBlockService;
|
||||||
|
|
||||||
private final IGpsEquipmentService gpsEquipmentService;
|
|
||||||
|
|
||||||
private final IOthYs7DeviceService othYs7DeviceService;
|
private final IOthYs7DeviceService othYs7DeviceService;
|
||||||
|
|
||||||
@ -75,15 +82,42 @@ public class ProjectBigScreenController {
|
|||||||
|
|
||||||
private final IHseSafetyInspectionService safetyInspectionService;
|
private final IHseSafetyInspectionService safetyInspectionService;
|
||||||
|
|
||||||
|
private final Ys7Manager ys7Manager;
|
||||||
|
|
||||||
|
private final BusLandTransferLedgerSonServiceImpl busLandTransferLedgerSonService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询项目土地统计
|
* 查询项目土地统计
|
||||||
*/
|
*/
|
||||||
|
// @SaCheckPermission("project:big:screen")
|
||||||
@GetMapping("/{projectId}")
|
@GetMapping("/{projectId}")
|
||||||
public R<List<ProjectLandVo>> landCount(@NotNull(message = "主键不能为空")
|
public R<List<ProjectLandVo>> landCount(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long projectId) {
|
@PathVariable Long projectId) {
|
||||||
List<BusLandTransferLedger> levelList = busLandTransferLedgerService.list(Wrappers.lambdaQuery(BusLandTransferLedger.class)
|
List<BusLandTransferLedger> levelList = busLandTransferLedgerService.list(Wrappers.lambdaQuery(BusLandTransferLedger.class)
|
||||||
.eq(BusLandTransferLedger::getProjectId, projectId));
|
.eq(BusLandTransferLedger::getProjectId, projectId));
|
||||||
|
|
||||||
|
if (CollectionUtil.isNotEmpty(levelList)) {
|
||||||
|
List<Long> list1 = levelList.stream().map(BusLandTransferLedger::getId).toList();
|
||||||
|
LambdaQueryWrapper<BusLandTransferLedgerSon> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.in(BusLandTransferLedgerSon::getParentId, list1);
|
||||||
|
List<BusLandTransferLedgerSon> sonList = busLandTransferLedgerSonService.list(lambdaQueryWrapper);
|
||||||
|
Map<Long, BigDecimal> collect = sonList.stream()
|
||||||
|
.filter(vo -> "1".equals(vo.getTransferStatus()))
|
||||||
|
.collect(Collectors.groupingBy(
|
||||||
|
BusLandTransferLedgerSon::getParentId,
|
||||||
|
Collectors.reducing(
|
||||||
|
BigDecimal.ZERO,
|
||||||
|
BusLandTransferLedgerSon::getAreaValue,
|
||||||
|
BigDecimal::add
|
||||||
|
)
|
||||||
|
));
|
||||||
|
for (BusLandTransferLedger busLandTransferLedger : levelList) {
|
||||||
|
BigDecimal areaValue = collect.get(busLandTransferLedger.getId());
|
||||||
|
if (areaValue != null) {
|
||||||
|
busLandTransferLedger.setTransferAea(areaValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// 根据 landBlockId 分组,并对 designArea 和 transferAea 进行求和
|
// 根据 landBlockId 分组,并对 designArea 和 transferAea 进行求和
|
||||||
Map<Long, Map<String, BigDecimal>> groupedResult = levelList.stream()
|
Map<Long, Map<String, BigDecimal>> groupedResult = levelList.stream()
|
||||||
.collect(Collectors.groupingBy(
|
.collect(Collectors.groupingBy(
|
||||||
@ -127,7 +161,7 @@ public class ProjectBigScreenController {
|
|||||||
/**
|
/**
|
||||||
* 查询项目天气
|
* 查询项目天气
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("project:bigScreen:weather")
|
// @SaCheckPermission("project:big:screen")
|
||||||
@GetMapping("/weather/{projectId}")
|
@GetMapping("/weather/{projectId}")
|
||||||
public R<List<WeatherVo>> getProjectWeather(@NotNull(message = "主键不能为空")
|
public R<List<WeatherVo>> getProjectWeather(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long projectId) {
|
@PathVariable Long projectId) {
|
||||||
@ -137,7 +171,7 @@ public class ProjectBigScreenController {
|
|||||||
/**
|
/**
|
||||||
* 查询项目安全天数
|
* 查询项目安全天数
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("project:bigScreen:safetyDay")
|
// @SaCheckPermission("project:big:screen")
|
||||||
@GetMapping("/safetyDay/{projectId}")
|
@GetMapping("/safetyDay/{projectId}")
|
||||||
public R<BusProjectSafetyDayVo> getProjectSafetyDay(@NotNull(message = "主键不能为空")
|
public R<BusProjectSafetyDayVo> getProjectSafetyDay(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long projectId) {
|
@PathVariable Long projectId) {
|
||||||
@ -147,109 +181,39 @@ public class ProjectBigScreenController {
|
|||||||
/**
|
/**
|
||||||
* 查询项目公告
|
* 查询项目公告
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("project:bigScreen:news")
|
// @SaCheckPermission("project:big:screen")
|
||||||
@GetMapping("/news/{projectId}")
|
@GetMapping("/news/{projectId}")
|
||||||
public R<List<BusProjectNewsVo>> getProjectNews(@NotNull(message = "主键不能为空")
|
public R<List<BusProjectNewsVo>> getProjectNews(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long projectId) {
|
@PathVariable Long projectId) {
|
||||||
// List<BusCorporateEvents> busCorporateEvents = projectBigScreenMapper.getBusCorporateEvents();
|
return R.ok(projectBigScreenService.getProjectNews(projectId));
|
||||||
// return R.ok(busCorporateEvents.stream().map(event -> {
|
|
||||||
// BusProjectNewsVo vo = new BusProjectNewsVo();
|
|
||||||
// vo.setId(event.getId());
|
|
||||||
// vo.setTitle(event.getHeadline());
|
|
||||||
// vo.setContent(event.getContent());
|
|
||||||
// return vo;
|
|
||||||
// }).toList());
|
|
||||||
return R.ok(projectNewsService.getLimtVoByProjectId(projectId));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询项目AI安全巡检
|
* 查询项目AI安全巡检
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("project:bigScreen:safetyInspection")
|
// @SaCheckPermission("project:big:screen")
|
||||||
@GetMapping("/safetyInspection/{projectId}")
|
@GetMapping("/safetyInspection/{projectId}")
|
||||||
public R<List<ProjectSafetyInspectionVo>> getProjectSafetyInspection(@NotNull(message = "主键不能为空")
|
public R<List<ProjectSafetyInspectionVo>> getProjectSafetyInspection(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long projectId) {
|
@PathVariable Long projectId) {
|
||||||
/* BusProject project = projectService.getById(projectId);
|
|
||||||
projectId = project.getGoId();
|
|
||||||
String pic;
|
|
||||||
if (projectId == 60) {
|
|
||||||
pic = "http://xny.yj-3d.com:7464";
|
|
||||||
} else {
|
|
||||||
pic = "http://xny.yj-3d.com:7363";
|
|
||||||
}
|
|
||||||
List<BusTour> busTours = projectBigScreenMapper.selectTourByProjectId(projectId);
|
|
||||||
return R.ok(busTours.stream().map(tour -> {
|
|
||||||
ProjectSafetyInspectionVo vo = new ProjectSafetyInspectionVo();
|
|
||||||
vo.setId(tour.getId());
|
|
||||||
vo.setViolationType(tour.getTourType());
|
|
||||||
vo.setPicture(pic + tour.getPicture());
|
|
||||||
vo.setCreateTime(tour.getCreatedAt());
|
|
||||||
return vo;
|
|
||||||
}).toList());*/
|
|
||||||
return R.ok(projectBigScreenService.getProjectSafetyInspection(projectId));
|
return R.ok(projectBigScreenService.getProjectSafetyInspection(projectId));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询项目人员情况
|
* 查询项目人员情况
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("project:bigScreen:people")
|
// @SaCheckPermission("project:big:screen")
|
||||||
@GetMapping("/people/{projectId}")
|
@GetMapping("/people/{projectId}")
|
||||||
public R<ProjectPeopleVo> getProjectPeople(@NotNull(message = "主键不能为空")
|
public R<ProjectPeopleVo> getProjectPeople(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long projectId) {
|
@PathVariable Long projectId) {
|
||||||
// BusProject project = projectService.getById(projectId);
|
|
||||||
// projectId = project.getGoId();
|
|
||||||
// Integer projectUserCount = projectBigScreenMapper.getProjectUserCount(projectId);
|
|
||||||
// ProjectPeopleVo vo = new ProjectPeopleVo();
|
|
||||||
// vo.setPeopleCount(BigDecimal.valueOf(projectUserCount));
|
|
||||||
// Integer attendanceCount = projectBigScreenMapper.getAttendanceCount(projectId, DateUtils.getDate());
|
|
||||||
// vo.setAttendanceCount(BigDecimal.valueOf(attendanceCount));
|
|
||||||
// vo.setAttendanceRate(BigDecimalUtil.toPercentage(BigDecimal.valueOf(attendanceCount), BigDecimal.valueOf(projectUserCount)));
|
|
||||||
// List<BusConstructionUser> projectUserList = projectBigScreenMapper.getProjectUserList(projectId);
|
|
||||||
// List<BusProjectTeamByGo> teamList = projectBigScreenMapper.getTeamList(projectId);
|
|
||||||
//
|
|
||||||
// List<ProjectTeamAttendanceVo> teamAttendanceList = new ArrayList<>();
|
|
||||||
// String punchRange = project.getPunchRange();
|
|
||||||
// String punchTime = "";
|
|
||||||
// if (punchRange != null) {
|
|
||||||
// String start = punchRange.split(",")[0];
|
|
||||||
// punchTime = LocalDate.now() + " " + start;
|
|
||||||
// }
|
|
||||||
// if (projectUserList != null && teamList != null) {
|
|
||||||
// projectUserList = projectUserList.stream().filter(user -> user.getTeamId() != null).toList();
|
|
||||||
// Map<Long, List<BusConstructionUser>> userMap = projectUserList.stream()
|
|
||||||
// .collect(Collectors.groupingBy(BusConstructionUser::getTeamId));
|
|
||||||
// for (BusProjectTeamByGo team : teamList) {
|
|
||||||
// ProjectTeamAttendanceVo vo1 = new ProjectTeamAttendanceVo();
|
|
||||||
// vo1.setId(team.getId());
|
|
||||||
// vo1.setTeamName(team.getName());
|
|
||||||
// vo1.setAttendanceTime(punchTime);
|
|
||||||
// vo1.setAttendanceNumber(BigDecimal.ZERO);
|
|
||||||
// List<BusConstructionUser> userList = userMap.get(team.getId());
|
|
||||||
// if (CollUtil.isNotEmpty(userList)) {
|
|
||||||
// List<String> list = userList.stream().map(BusConstructionUser::getOpenid).distinct().toList();
|
|
||||||
// Integer aCount = projectBigScreenMapper.getAttendanceCountByOpenIds(list, LocalDate.now());
|
|
||||||
// vo1.setAttendanceNumber(BigDecimal.valueOf(aCount));
|
|
||||||
// }
|
|
||||||
// vo1.setAllNumber(BigDecimal.valueOf(userMap.getOrDefault(team.getId(), List.of()).size()));
|
|
||||||
// if (vo1.getAttendanceNumber() != null && vo1.getAllNumber() != null && vo1.getAllNumber().compareTo(BigDecimal.ZERO) != 0) {
|
|
||||||
// vo1.setAttendanceRate(BigDecimalUtil.toPercentage(vo1.getAttendanceNumber(), vo1.getAllNumber()));
|
|
||||||
// } else {
|
|
||||||
// vo1.setAttendanceRate(BigDecimal.ZERO);
|
|
||||||
// }
|
|
||||||
// teamAttendanceList.add(vo1);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// vo.setTeamAttendanceList(teamAttendanceList);
|
|
||||||
// return R.ok(vo);
|
|
||||||
return R.ok(projectBigScreenService.getProjectPeople(projectId));
|
return R.ok(projectBigScreenService.getProjectPeople(projectId));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询项目形象进度
|
* 查询项目形象进度
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("project:bigScreen:imageProgress")
|
// @SaCheckPermission("project:big:screen")
|
||||||
@GetMapping("/imageProgress/{projectId}")
|
@GetMapping("/imageProgress/{projectId}")
|
||||||
public R<ProjectImageProgressVo> getProjectImageProgress(@NotNull(message = "主键不能为空")
|
public R<List<ProjectImageProgressVo>> getProjectImageProgress(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long projectId) {
|
@PathVariable Long projectId) {
|
||||||
return R.ok(projectBigScreenService.getProjectImageProgress(projectId));
|
return R.ok(projectBigScreenService.getProjectImageProgress(projectId));
|
||||||
}
|
}
|
||||||
@ -257,93 +221,67 @@ public class ProjectBigScreenController {
|
|||||||
/**
|
/**
|
||||||
* 查询项目概括
|
* 查询项目概括
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("project:bigScreen:generalize")
|
// @SaCheckPermission("project:big:screen")
|
||||||
@GetMapping("/generalize/{projectId}")
|
@GetMapping("/generalize/{projectId}")
|
||||||
public R<String> getProjectGeneralize(@NotNull(message = "主键不能为空")
|
public R<String> getProjectGeneralize(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long projectId) {
|
@PathVariable Long projectId) {
|
||||||
// BusProject project = projectService.getById(projectId);
|
|
||||||
// if (project != null) {
|
|
||||||
// Long goId = project.getGoId();
|
|
||||||
// if (goId != null) {
|
|
||||||
// List<SysProjectIntroduce> sysProjectIntroduces = projectBigScreenMapper.selectByProjectId(goId);
|
|
||||||
// if (CollUtil.isNotEmpty(sysProjectIntroduces)) {
|
|
||||||
// return R.ok(sysProjectIntroduces.getFirst().getRichText());
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
return R.ok(projectBigScreenService.getProjectGeneralize(projectId));
|
return R.ok(projectBigScreenService.getProjectGeneralize(projectId));
|
||||||
// return R.ok();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询设备列表
|
* 查询设备列表
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("project:bigScreen:getClientList")
|
// @SaCheckPermission("project:big:screen")
|
||||||
@GetMapping("/getClientList/{projectId}")
|
@GetMapping("/getClientList/{projectId}")
|
||||||
public R<List<Map<String, Object>>> getClientList(@NotNull(message = "主键不能为空")
|
public R<List<Map<String, Object>>> getClientList(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long projectId) {
|
@PathVariable Long projectId) {
|
||||||
List<GpsEquipmentSonVo> voList = gpsEquipmentService.getClientList(projectId);
|
return R.ok(projectBigScreenService.getClientList(projectId));
|
||||||
List<OthYs7Device> othYs7DeviceList = othYs7DeviceService.lambdaQuery()
|
|
||||||
.eq(OthYs7Device::getProjectId, projectId)
|
|
||||||
.list();
|
|
||||||
List<Map<String, Object>> maps = new ArrayList<>();
|
|
||||||
Map<String, Object> gpsMap = new HashMap<>();
|
|
||||||
Map<String, Object> wrjMap = new HashMap<>();
|
|
||||||
Map<String, Object> sxtMap = new HashMap<>();
|
|
||||||
List<Map<String, Object>> gpsChildrenMap = new ArrayList<>();
|
|
||||||
List<Map<String, Object>> wrjChildrenMap = new ArrayList<>();
|
|
||||||
List<Map<String, Object>> sxtChildrenMap = new ArrayList<>();
|
|
||||||
if (voList != null && !voList.isEmpty()) {
|
|
||||||
for (GpsEquipmentSonVo item : voList) {
|
|
||||||
Map<String, Object> gps = new HashMap<>();
|
|
||||||
gps.put("id", item.getClientId());
|
|
||||||
gps.put("label", item.getClientId());
|
|
||||||
gps.put("name", item.getDeviceName());
|
|
||||||
gps.put("type", "positioningDevice");
|
|
||||||
gps.put("lat", item.getLocLatitude());
|
|
||||||
gps.put("lng", item.getLocLongitude());
|
|
||||||
gps.put("alt", item.getLocAltitude());
|
|
||||||
gpsChildrenMap.add(gps);
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (othYs7DeviceList != null && !othYs7DeviceList.isEmpty()) {
|
|
||||||
for (OthYs7Device item : othYs7DeviceList) {
|
|
||||||
Map<String, Object> sxt = new HashMap<>();
|
|
||||||
sxt.put("id", item.getDeviceSerial());
|
|
||||||
sxt.put("label", item.getDeviceSerial());
|
|
||||||
sxt.put("name", item.getDeviceName());
|
|
||||||
sxt.put("type", "shexiangtou");
|
|
||||||
sxt.put("lat", item.getLatitude());
|
|
||||||
sxt.put("lng", item.getLongitude());
|
|
||||||
sxt.put("alt", item.getAltitude());
|
|
||||||
sxtChildrenMap.add(sxt);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// List<Map<String, Object>> maps1 = setSxt();
|
|
||||||
List<Map<String, Object>> maps2 = setWrj();
|
|
||||||
|
|
||||||
gpsMap.put("id", 1);
|
/**
|
||||||
gpsMap.put("label", "定位设备");
|
* 修改萤石摄像头
|
||||||
gpsMap.put("children", gpsChildrenMap);
|
*/
|
||||||
sxtMap.put("id", 2);
|
// @SaCheckPermission("project:big:screen")
|
||||||
sxtMap.put("label", "摄像头");
|
@RepeatSubmit()
|
||||||
sxtMap.put("children", sxtChildrenMap);
|
@PutMapping("/device")
|
||||||
// sxtMap.put("children", maps1);
|
public R<Void> edit(@Validated @RequestBody Ys7DeviceUpdateReq req) {
|
||||||
wrjMap.put("id", 3);
|
OthYs7Device one = othYs7DeviceService.lambdaQuery()
|
||||||
wrjMap.put("label", "无人机");
|
.eq(OthYs7Device::getDeviceSerial, req.getDeviceSerial())
|
||||||
// wrjMap.put("children",wrjChildrenMap);
|
.last("limit 1")
|
||||||
wrjMap.put("children", maps2);
|
.one();
|
||||||
|
if (one == null) {
|
||||||
|
throw new ServiceException("萤石摄像头信息不存在", HttpStatus.NOT_FOUND);
|
||||||
maps.add(gpsMap);
|
}
|
||||||
maps.add(wrjMap);
|
// 将实体类和 DTO 进行转换
|
||||||
maps.add(sxtMap);
|
OthYs7Device ys7Device = new OthYs7Device();
|
||||||
return R.ok(maps);
|
BeanUtils.copyProperties(req, ys7Device);
|
||||||
|
ys7Device.setId(one.getId());
|
||||||
|
// 判断是否更新名称
|
||||||
|
String deviceName = req.getDeviceName();
|
||||||
|
if (deviceName != null && !deviceName.equals(one.getDeviceName())) {
|
||||||
|
Long count = othYs7DeviceService.lambdaQuery()
|
||||||
|
.eq(OthYs7Device::getDeviceName, req.getDeviceName())
|
||||||
|
.count();
|
||||||
|
if (count > 0) {
|
||||||
|
throw new ServiceException("已存在同名萤石摄像头", HttpStatus.CONFLICT);
|
||||||
|
}
|
||||||
|
// 更新云端名称
|
||||||
|
Boolean result = ys7Manager.updateDeviceName(one.getDeviceSerial(), deviceName);
|
||||||
|
if (!result) {
|
||||||
|
throw new ServiceException("更新云端萤石摄像头名称异常", HttpStatus.ERROR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (req.getLatitude() != null && req.getLongitude() != null) {
|
||||||
|
ys7Device.setLatitude(req.getLatitude());
|
||||||
|
ys7Device.setLongitude(req.getLongitude());
|
||||||
|
}
|
||||||
|
return toAjax(othYs7DeviceService.updateById(ys7Device));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询质量信息
|
* 查询质量信息
|
||||||
*/
|
*/
|
||||||
|
// @SaCheckPermission("project:big:screen")
|
||||||
@GetMapping("/getQualityList/gis")
|
@GetMapping("/getQualityList/gis")
|
||||||
public R<QltQualityInspectionListGisVo> queryGisList(QltQualityInspectionGisReq req) {
|
public R<QltQualityInspectionListGisVo> queryGisList(QltQualityInspectionGisReq req) {
|
||||||
return R.ok(qualityInspectionService.queryGisList(req));
|
return R.ok(qualityInspectionService.queryGisList(req));
|
||||||
@ -352,6 +290,7 @@ public class ProjectBigScreenController {
|
|||||||
/**
|
/**
|
||||||
* 查询大屏安全信息
|
* 查询大屏安全信息
|
||||||
*/
|
*/
|
||||||
|
// @SaCheckPermission("project:big:screen")
|
||||||
@GetMapping("/getSafetyList/gis")
|
@GetMapping("/getSafetyList/gis")
|
||||||
public R<HseSafetyInspectionListGisVo> queryGisList(HseSafetyInspectionGisReq req) {
|
public R<HseSafetyInspectionListGisVo> queryGisList(HseSafetyInspectionGisReq req) {
|
||||||
return R.ok(safetyInspectionService.queryGisList(req));
|
return R.ok(safetyInspectionService.queryGisList(req));
|
||||||
@ -360,7 +299,7 @@ public class ProjectBigScreenController {
|
|||||||
/**
|
/**
|
||||||
* 查询GPS设备用户列表
|
* 查询GPS设备用户列表
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("project:bigScreen:getList")
|
// @SaCheckPermission("project:big:screen")
|
||||||
@GetMapping("/getList")
|
@GetMapping("/getList")
|
||||||
public R<List<String>> getList(Long projectId) {
|
public R<List<String>> getList(Long projectId) {
|
||||||
return R.ok(projectBigScreenService.getList(projectId));
|
return R.ok(projectBigScreenService.getList(projectId));
|
||||||
@ -369,7 +308,7 @@ public class ProjectBigScreenController {
|
|||||||
/**
|
/**
|
||||||
* 新增GPS设备详细
|
* 新增GPS设备详细
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("project:bigScreen:setList")
|
// @SaCheckPermission("project:big:screen")
|
||||||
@Log(title = "GPS设备详细", businessType = BusinessType.INSERT)
|
@Log(title = "GPS设备详细", businessType = BusinessType.INSERT)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PostMapping("/setList")
|
@PostMapping("/setList")
|
||||||
@ -380,17 +319,26 @@ public class ProjectBigScreenController {
|
|||||||
/**
|
/**
|
||||||
* 查询地图项目分类
|
* 查询地图项目分类
|
||||||
*/
|
*/
|
||||||
// @SaCheckPermission("project:bigScreen:getProjectMapList")
|
// @SaCheckPermission("project:big:screen")
|
||||||
@GetMapping("/getProjectMapList")
|
@GetMapping("/getProjectMapList")
|
||||||
public R<Map<String, Map<String, Map<String, String>>>> getProjectMapList() {
|
public R<Map<String, Map<String, Map<String, String>>>> getProjectMapList() {
|
||||||
return R.ok(projectService.getProjectMapList());
|
return R.ok(projectService.getProjectMapList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询地图项目分类
|
||||||
|
*/
|
||||||
|
// @SaCheckPermission("project:big:screen")
|
||||||
|
@PostMapping("/updatePosition")
|
||||||
|
public R<Void> updatePosition(@RequestBody ProjectUpdateDto dto) {
|
||||||
|
return toAjax(projectService.updatePosition(dto));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询项目地域分散图
|
* 查询项目地域分散图
|
||||||
*/
|
*/
|
||||||
// @SaCheckPermission("project:bigScreen:getProjectMapList")
|
// @SaCheckPermission("project:big:screen")
|
||||||
@GetMapping("/getProjectDiYv")
|
@GetMapping("/getProjectDiYv")
|
||||||
public R<Map<String, Long>> getProjectDiYv() {
|
public R<Map<String, Long>> getProjectDiYv() {
|
||||||
return R.ok(projectService.getProjectDiYv());
|
return R.ok(projectService.getProjectDiYv());
|
||||||
@ -399,140 +347,29 @@ public class ProjectBigScreenController {
|
|||||||
/**
|
/**
|
||||||
* 计划和实际容量对比
|
* 计划和实际容量对比
|
||||||
*/
|
*/
|
||||||
// @SaCheckPermission("project:bigScreen:getProjectMapList")
|
// @SaCheckPermission("project:big:screen")
|
||||||
@GetMapping("/getProjectCapacity")
|
@GetMapping("/getProjectCapacity")
|
||||||
public R<Map<String, Map<String, String>>> getProjectCapacity() {
|
public R<Map<String, Map<String, String>>> getProjectCapacity() {
|
||||||
return R.ok(projectService.getProjectCapacity());
|
return R.ok(projectService.getProjectCapacity());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// public List<Map<String, Object>> setSxt() {
|
/**
|
||||||
// List<Map<String, Object>> sxtChildrenMap = new ArrayList<>();
|
* 更新无人机缓存
|
||||||
// HashMap<String, Object> map1 = new HashMap<>();
|
*/
|
||||||
// map1.put("id", "55");
|
// @SaCheckPermission("project:big:screen")
|
||||||
// map1.put("label", "那荷4号方阵-1");
|
@GetMapping("/setWrjHc")
|
||||||
// map1.put("name", "22");
|
public void setWrjHc() {
|
||||||
// map1.put("type", "camera");
|
projectBigScreenService.setWrjHc();
|
||||||
// map1.put("lng", 107.111325);
|
|
||||||
// map1.put("lat", 23.820919);
|
|
||||||
// map1.put("alt", 0);
|
|
||||||
// HashMap<String, Object> map2 = new HashMap<>();
|
|
||||||
// map2.put("id", "56");
|
|
||||||
// map2.put("label", "甫必 1号方阵");
|
|
||||||
// map2.put("name", "23");
|
|
||||||
// map2.put("type", "camera");
|
|
||||||
// map2.put("lng", 107.091297);
|
|
||||||
// map2.put("lat", 23.813567);
|
|
||||||
// map2.put("alt", 0);
|
|
||||||
// HashMap<String, Object> map3 = new HashMap<>();
|
|
||||||
// map3.put("id", "57");
|
|
||||||
// map3.put("label", "1222224");
|
|
||||||
// map3.put("name", "24");
|
|
||||||
// map3.put("type", "camera");
|
|
||||||
// map3.put("lng", 107.085442);
|
|
||||||
// map3.put("lat", 23.811958);
|
|
||||||
// map3.put("alt", 0);
|
|
||||||
// HashMap<String, Object> map4 = new HashMap<>();
|
|
||||||
// map4.put("id", "58");
|
|
||||||
// map4.put("label", "甫必2号方阵-1");
|
|
||||||
// map4.put("name", "25");
|
|
||||||
// map4.put("type", "camera");
|
|
||||||
// map4.put("lng", 107.085181);
|
|
||||||
// map4.put("lat", 23.810556);
|
|
||||||
// map4.put("alt", 0);
|
|
||||||
// HashMap<String, Object> map5 = new HashMap<>();
|
|
||||||
// map5.put("id", "58");
|
|
||||||
// map5.put("label", "甫必 4号方阵");
|
|
||||||
// map5.put("name", "25");
|
|
||||||
// map5.put("type", "camera");
|
|
||||||
// map5.put("lng", 107.081747);
|
|
||||||
// map5.put("lat", 23.808131);
|
|
||||||
// map5.put("alt", 0);
|
|
||||||
// HashMap<String, Object> map6 = new HashMap<>();
|
|
||||||
// map6.put("id", "58");
|
|
||||||
// map6.put("label", "甫必 7号方阵-1");
|
|
||||||
// map6.put("name", "25");
|
|
||||||
// map6.put("type", "camera");
|
|
||||||
// map6.put("lng", 107.077922);
|
|
||||||
// map6.put("lat", 23.798344);
|
|
||||||
// map6.put("alt", 0);
|
|
||||||
// HashMap<String, Object> map7 = new HashMap<>();
|
|
||||||
// map7.put("id", "58");
|
|
||||||
// map7.put("label", "68甫必6");
|
|
||||||
// map7.put("name", "25");
|
|
||||||
// map7.put("type", "camera");
|
|
||||||
// map7.put("lng", 107.077333);
|
|
||||||
// map7.put("lat", 23.797969);
|
|
||||||
// map7.put("alt", 0);
|
|
||||||
// HashMap<String, Object> map8 = new HashMap<>();
|
|
||||||
// map8.put("id", "58");
|
|
||||||
// map8.put("label", "甫必5号方阵");
|
|
||||||
// map8.put("name", "25");
|
|
||||||
// map8.put("type", "camera");
|
|
||||||
// map8.put("lng", 107.075853);
|
|
||||||
// map8.put("lat", 23.796711);
|
|
||||||
// map8.put("alt", 0);
|
|
||||||
// HashMap<String, Object> map9 = new HashMap<>();
|
|
||||||
// map9.put("id", "58");
|
|
||||||
// map9.put("label", "西牛2号方阵");
|
|
||||||
// map9.put("name", "25");
|
|
||||||
// map9.put("type", "camera");
|
|
||||||
// map9.put("lng", 107.078942);
|
|
||||||
// map9.put("lat", 23.789306);
|
|
||||||
// map9.put("alt", 0);
|
|
||||||
// HashMap<String, Object> map10 = new HashMap<>();
|
|
||||||
// map10.put("id", "58");
|
|
||||||
// map10.put("label", "福绿1号方阵");
|
|
||||||
// map10.put("name", "25");
|
|
||||||
// map10.put("type", "camera");
|
|
||||||
// map10.put("lng", 107.090061);
|
|
||||||
// map10.put("lat", 23.790411);
|
|
||||||
// map10.put("alt", 0);
|
|
||||||
// HashMap<String, Object> map11 = new HashMap<>();
|
|
||||||
// map11.put("id", "58");
|
|
||||||
// map11.put("label", "福绿6号方阵-2");
|
|
||||||
// map11.put("name", "25");
|
|
||||||
// map11.put("type", "camera");
|
|
||||||
// map11.put("lng", 107.112883);
|
|
||||||
// map11.put("lat", 23.771378);
|
|
||||||
// map11.put("alt", 0);
|
|
||||||
//
|
|
||||||
// sxtChildrenMap.add(map1);
|
|
||||||
// sxtChildrenMap.add(map2);
|
|
||||||
// sxtChildrenMap.add(map3);
|
|
||||||
// sxtChildrenMap.add(map4);
|
|
||||||
// sxtChildrenMap.add(map5);
|
|
||||||
// sxtChildrenMap.add(map6);
|
|
||||||
// sxtChildrenMap.add(map7);
|
|
||||||
// sxtChildrenMap.add(map8);
|
|
||||||
// sxtChildrenMap.add(map9);
|
|
||||||
// sxtChildrenMap.add(map10);
|
|
||||||
// sxtChildrenMap.add(map11);
|
|
||||||
//
|
|
||||||
// return sxtChildrenMap;
|
|
||||||
// }
|
|
||||||
|
|
||||||
public List<Map<String, Object>> setWrj() {
|
|
||||||
List<Map<String, Object>> sxtChildrenMap = new ArrayList<>();
|
|
||||||
HashMap<String, Object> map1 = new HashMap<>();
|
|
||||||
map1.put("id", "65");
|
|
||||||
map1.put("label", "田东无人机");
|
|
||||||
map1.put("name", "32");
|
|
||||||
map1.put("type", "drone");
|
|
||||||
map1.put("lng", 107.12744694624267);
|
|
||||||
map1.put("lat", 23.615965741917278);
|
|
||||||
map1.put("alt", 0);
|
|
||||||
// HashMap<String, Object> map2 = new HashMap<>();
|
|
||||||
// map2.put("id", "66");
|
|
||||||
// map2.put("label", "长顺无人机");
|
|
||||||
// map2.put("name", "33");
|
|
||||||
// map2.put("type", "drone");
|
|
||||||
// map2.put("lng", 106.49142431645038);
|
|
||||||
// map2.put("lat", 29.534472802500083);
|
|
||||||
// map2.put("alt", 0);
|
|
||||||
sxtChildrenMap.add(map1);
|
|
||||||
// sxtChildrenMap.add(map2);
|
|
||||||
|
|
||||||
return sxtChildrenMap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新无人机缓存
|
||||||
|
*/
|
||||||
|
// @SaCheckPermission("project:big:screen")
|
||||||
|
@GetMapping("/getInfoData")
|
||||||
|
public R<Map<String, Map<String, Object>>> getInfoData(TanchuangInfoReq req) {
|
||||||
|
return R.ok(projectBigScreenService.getInfoData(req));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,16 @@
|
|||||||
|
package org.dromara.bigscreen.domain.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ProjectUpdateDto implements Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
private Long projectId; // 项目id
|
||||||
|
|
||||||
|
private String position; // 图片
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package org.dromara.bigscreen.domain.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TanchuangInfoReq implements Serializable {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
}
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
package org.dromara.bigscreen.domain.dto;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-09-09 15:16
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WurenjiQueryReq {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经度
|
||||||
|
*/
|
||||||
|
private String longitude;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 纬度
|
||||||
|
*/
|
||||||
|
private String latitude;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
package org.dromara.bigscreen.domain.dto;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025/6/13 10:19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class Ys7DeviceUpdateReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = -3434796275594146484L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备序列号
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "设备序列号不能为空")
|
||||||
|
private String deviceSerial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备名称
|
||||||
|
*/
|
||||||
|
private String deviceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备详情
|
||||||
|
*/
|
||||||
|
private String detail;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 纬度(精确到6位小数)
|
||||||
|
*/
|
||||||
|
private BigDecimal latitude;
|
||||||
|
/**
|
||||||
|
* 经度(精确到6位小数)
|
||||||
|
*/
|
||||||
|
private BigDecimal longitude;
|
||||||
|
|
||||||
|
}
|
||||||
@ -16,39 +16,49 @@ public class ProjectImageProgressVo implements Serializable {
|
|||||||
@Serial
|
@Serial
|
||||||
private static final long serialVersionUID = 7963637133004484891L;
|
private static final long serialVersionUID = 7963637133004484891L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类别名称
|
||||||
|
*/
|
||||||
|
private String progressName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度百分比
|
||||||
|
*/
|
||||||
|
private BigDecimal progressTotal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 场区百分比
|
* 场区百分比
|
||||||
*/
|
*/
|
||||||
private BigDecimal areaPercentage;
|
// private BigDecimal areaPercentage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 道路百分比
|
* 道路百分比
|
||||||
*/
|
*/
|
||||||
private BigDecimal roadPercentage;
|
// private BigDecimal roadPercentage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 集电线路百分比
|
* 集电线路百分比
|
||||||
*/
|
*/
|
||||||
private BigDecimal collectorLinePercentage;
|
// private BigDecimal collectorLinePercentage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 送出线路百分比
|
* 送出线路百分比
|
||||||
*/
|
*/
|
||||||
private BigDecimal exportLinePercentage;
|
// private BigDecimal exportLinePercentage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 升压站百分比
|
* 升压站百分比
|
||||||
*/
|
*/
|
||||||
private BigDecimal substationPercentage;
|
// private BigDecimal substationPercentage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 箱变百分比
|
* 箱变百分比
|
||||||
*/
|
*/
|
||||||
private BigDecimal boxTransformerPercentage;
|
// private BigDecimal boxTransformerPercentage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 总百分比
|
* 总百分比
|
||||||
*/
|
*/
|
||||||
private BigDecimal totalPercentage;
|
// private BigDecimal totalPercentage;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,92 @@
|
|||||||
|
package org.dromara.bigscreen.listener;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import org.dromara.common.websocket.dto.WebSocketMessageDto;
|
||||||
|
import org.dromara.common.websocket.utils.WebSocketUtils;
|
||||||
|
import org.dromara.drone.domain.DroProjectDrone;
|
||||||
|
import org.dromara.drone.service.IDroProjectDroneService;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
|
import org.springframework.data.redis.connection.Message;
|
||||||
|
import org.springframework.data.redis.connection.MessageListener;
|
||||||
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Redis消息监听器,用于处理订阅频道收到的消息
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class RedisMessageListener implements MessageListener {
|
||||||
|
|
||||||
|
@Lazy
|
||||||
|
private final StringRedisTemplate stringRedisTemplate;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
@Lazy
|
||||||
|
private IDroProjectDroneService droProjectDroneService;
|
||||||
|
|
||||||
|
// 构造函数注入StringRedisTemplate
|
||||||
|
public RedisMessageListener(StringRedisTemplate stringRedisTemplate) {
|
||||||
|
this.stringRedisTemplate = stringRedisTemplate;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理接收到的消息
|
||||||
|
* @param message 消息对象
|
||||||
|
* @param pattern 订阅的模式
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void onMessage(Message message, byte[] pattern) {
|
||||||
|
// 处理消息
|
||||||
|
// System.out.println("返回:"+stringRedisTemplate.getStringSerializer().deserialize(message.getBody()));
|
||||||
|
String gateway = JSONUtil.parseObj(stringRedisTemplate.getStringSerializer().deserialize(message.getBody())).getStr("gateway");
|
||||||
|
String key = "";
|
||||||
|
if (JSONUtil.parseObj(stringRedisTemplate.getStringSerializer().deserialize(message.getBody())).getJSONObject("data").get("job_number") != null) {
|
||||||
|
key = "wrj:osd1:"+gateway;
|
||||||
|
}else if (JSONUtil.parseObj(stringRedisTemplate.getStringSerializer().deserialize(message.getBody())).getJSONObject("data").get("wireless_link") != null) {
|
||||||
|
key = "wrj:osd2:"+gateway;
|
||||||
|
}else if (JSONUtil.parseObj(stringRedisTemplate.getStringSerializer().deserialize(message.getBody())).getJSONObject("data").get("network_state") != null) {
|
||||||
|
key = "wrj:osd3:"+gateway;
|
||||||
|
DroProjectDrone droProjectDrone = droProjectDroneService.getBaseMapper().selectOne(new LambdaQueryWrapper<DroProjectDrone>().eq(DroProjectDrone::getDroneSn, gateway));
|
||||||
|
setWs(message, gateway, droProjectDrone);
|
||||||
|
}else{
|
||||||
|
key = "wrj:osd4:"+gateway;
|
||||||
|
DroProjectDrone droProjectDrone = droProjectDroneService.getBaseMapper().selectOne(new LambdaQueryWrapper<DroProjectDrone>().eq(DroProjectDrone::getDroneSn, gateway));
|
||||||
|
setWs(message, gateway, droProjectDrone);
|
||||||
|
|
||||||
|
}
|
||||||
|
stringRedisTemplate
|
||||||
|
.opsForValue()
|
||||||
|
.set(key
|
||||||
|
, Objects.requireNonNull(stringRedisTemplate.getStringSerializer().deserialize(message.getBody())));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setWs(Message message, String gateway, DroProjectDrone droProjectDrone) {
|
||||||
|
String pushContent = buildPushMessage(gateway,stringRedisTemplate.getStringSerializer().deserialize(message.getBody()), droProjectDrone.getProjectId());
|
||||||
|
// 发送给指定用户(equipment.getUserId())
|
||||||
|
WebSocketMessageDto messageDto = new WebSocketMessageDto();
|
||||||
|
messageDto.setMessage(pushContent);
|
||||||
|
messageDto.setSessionKeys(Collections.singletonList(droProjectDrone.getProjectId()));
|
||||||
|
WebSocketUtils.publishMessage(messageDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
private String buildPushMessage(String key, String message, Long projectId) {
|
||||||
|
JSONObject messageObj = new JSONObject();
|
||||||
|
messageObj.put("type", "wrj_DATA_UPDATE");
|
||||||
|
messageObj.put("projectId",projectId.toString());
|
||||||
|
messageObj.put("clientId",key);
|
||||||
|
// 位置信息
|
||||||
|
JSONObject locationObj = new JSONObject();
|
||||||
|
locationObj.put("latitude", JSONUtil.parseObj(message).getJSONObject("data").get("latitude").toString()); // 纬度
|
||||||
|
locationObj.put("longitude", JSONUtil.parseObj(message).getJSONObject("data").get("longitude").toString()); // 经度
|
||||||
|
messageObj.put("location", locationObj);
|
||||||
|
return messageObj.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,193 @@
|
|||||||
|
package org.dromara.bigscreen.manager;
|
||||||
|
|
||||||
|
import jakarta.annotation.PostConstruct;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.dromara.common.redis.utils.RedisUtils;
|
||||||
|
import org.dromara.drone.service.IDroProjectDroneService;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
|
import org.springframework.data.redis.listener.PatternTopic;
|
||||||
|
import org.springframework.data.redis.listener.RedisMessageListenerContainer;
|
||||||
|
import org.springframework.data.redis.listener.adapter.MessageListenerAdapter;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Redis 订阅管理器(定时任务动态更新订阅关系)
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
@Slf4j
|
||||||
|
public class RedisSubscribeManager {
|
||||||
|
|
||||||
|
// 1. 注入 Redis 核心组件
|
||||||
|
@Resource
|
||||||
|
private RedisMessageListenerContainer redisMessageListenerContainer;
|
||||||
|
@Resource
|
||||||
|
private MessageListenerAdapter redisMessageListenerAdapter;
|
||||||
|
|
||||||
|
// 2. 注入业务 Service(延迟加载,避免循环依赖)
|
||||||
|
@Resource
|
||||||
|
@Lazy
|
||||||
|
private IDroProjectDroneService droProjectDroneService;
|
||||||
|
|
||||||
|
// 3. 维护已订阅的主题关系:key=完整主题(如wrj:8UUXN4P00A06NK),value=对应的PatternTopic
|
||||||
|
private final Map<String, PatternTopic> subscribedTopics = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目启动后立即执行一次订阅(避免等待定时任务首次执行)
|
||||||
|
*/
|
||||||
|
@PostConstruct
|
||||||
|
public void initSubscribe() {
|
||||||
|
log.info("项目启动,初始化Redis订阅...");
|
||||||
|
// 步骤1:从数据库获取最新的主题列表(原逻辑:getTopicsByKeyPrefix)
|
||||||
|
List<String> latestKeys = droProjectDroneService.getTopicsByKeyPrefix();
|
||||||
|
if (latestKeys == null || latestKeys.isEmpty()) {
|
||||||
|
log.warn("未获取到任何主题,将取消所有现有订阅");
|
||||||
|
cancelAllSubscribes();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 步骤2:构建最新的完整主题(格式:wrj:key)
|
||||||
|
Set<String> latestFullTopics = new HashSet<>();
|
||||||
|
for (String key : latestKeys) {
|
||||||
|
latestFullTopics.add("wrj:osd1:" + key);
|
||||||
|
latestFullTopics.add("wrj:osd2:" + key);
|
||||||
|
latestFullTopics.add("wrj:osd3:" + key);
|
||||||
|
latestFullTopics.add("wrj:osd4:" + key);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 步骤3:对比现有订阅,删除过期主题
|
||||||
|
cancelExpiredSubscribes(latestFullTopics);
|
||||||
|
|
||||||
|
// 步骤4:对比现有订阅,新增未订阅的主题
|
||||||
|
addNewSubscribes(latestFullTopics);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 4. 定时任务:定期更新订阅(每5分钟执行一次,可调整cron表达式)
|
||||||
|
* cron格式:秒 分 时 日 月 周 年(示例:0 0/5 * * * ? 表示每5分钟)
|
||||||
|
*/
|
||||||
|
@Scheduled(cron = "0 0/6 * * * ?")
|
||||||
|
public void dynamicUpdateSubscribe() {
|
||||||
|
try {
|
||||||
|
Object object = RedisUtils.getCacheObject("xmjdap:ws");
|
||||||
|
log.info("开始执行Redis订阅更新定时任务...");
|
||||||
|
if (object == null) {
|
||||||
|
cancelAllSubscribes();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
long oldTime = Long.parseLong(String.valueOf(object));
|
||||||
|
long now = System.currentTimeMillis();
|
||||||
|
if (now-oldTime > 300000) {
|
||||||
|
RedisUtils.deleteObject("xmjdap:ws");
|
||||||
|
cancelAllSubscribes();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 步骤1:从数据库获取最新的主题列表(原逻辑:getTopicsByKeyPrefix)
|
||||||
|
List<String> latestKeys = droProjectDroneService.getTopicsByKeyPrefix();
|
||||||
|
if (latestKeys == null || latestKeys.isEmpty()) {
|
||||||
|
log.warn("定时任务未获取到任何主题,将取消所有现有订阅");
|
||||||
|
cancelAllSubscribes();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 步骤2:构建最新的完整主题(格式:wrj:key)
|
||||||
|
Set<String> latestFullTopics = new HashSet<>();
|
||||||
|
for (String key : latestKeys) {
|
||||||
|
latestFullTopics.add("wrj:osd1:" + key);
|
||||||
|
latestFullTopics.add("wrj:osd2:" + key);
|
||||||
|
latestFullTopics.add("wrj:osd3:" + key);
|
||||||
|
latestFullTopics.add("wrj:osd4:" + key);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 步骤3:对比现有订阅,删除过期主题
|
||||||
|
cancelExpiredSubscribes(latestFullTopics);
|
||||||
|
|
||||||
|
// 步骤4:对比现有订阅,新增未订阅的主题
|
||||||
|
addNewSubscribes(latestFullTopics);
|
||||||
|
|
||||||
|
log.info("Redis订阅更新完成,当前已订阅主题数:{}", subscribedTopics.size());
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("Redis订阅更新定时任务执行失败", e);
|
||||||
|
// 异常时不修改现有订阅,避免误删
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消过期的订阅(现有订阅不在最新列表中的主题)
|
||||||
|
*/
|
||||||
|
private void cancelExpiredSubscribes(Set<String> latestFullTopics) {
|
||||||
|
// 遍历现有订阅,找出需要删除的主题
|
||||||
|
Set<String> expiredTopics = subscribedTopics.keySet().stream()
|
||||||
|
.filter(topic -> !latestFullTopics.contains(topic))
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
|
||||||
|
if (expiredTopics.isEmpty()) {
|
||||||
|
log.info("无过期订阅主题,无需删除");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 取消每个过期主题的订阅
|
||||||
|
for (String expiredTopic : expiredTopics) {
|
||||||
|
PatternTopic topic = subscribedTopics.get(expiredTopic);
|
||||||
|
if (topic != null) {
|
||||||
|
// 从容器中移除监听器(取消订阅)
|
||||||
|
redisMessageListenerContainer.removeMessageListener(redisMessageListenerAdapter, topic);
|
||||||
|
subscribedTopics.remove(expiredTopic);
|
||||||
|
log.info("已取消过期订阅:{}", expiredTopic);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增未订阅的主题(最新列表中有但现有订阅没有的主题)
|
||||||
|
*/
|
||||||
|
private void addNewSubscribes(Set<String> latestFullTopics) {
|
||||||
|
// 遍历最新主题,找出需要新增的主题
|
||||||
|
Set<String> newTopics = latestFullTopics.stream()
|
||||||
|
.filter(topic -> !subscribedTopics.containsKey(topic))
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
|
||||||
|
if (newTopics.isEmpty()) {
|
||||||
|
log.info("无新增订阅主题,无需添加");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 为每个新主题添加订阅
|
||||||
|
for (String newTopic : newTopics) {
|
||||||
|
PatternTopic topic = new PatternTopic(newTopic);
|
||||||
|
// 向容器中添加监听器(新增订阅)
|
||||||
|
redisMessageListenerContainer.addMessageListener(redisMessageListenerAdapter, topic);
|
||||||
|
subscribedTopics.put(newTopic, topic);
|
||||||
|
log.info("已新增订阅:{}", newTopic);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消所有现有订阅(兜底方法)
|
||||||
|
*/
|
||||||
|
public void cancelAllSubscribes() {
|
||||||
|
if (subscribedTopics.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 遍历所有已订阅主题,取消订阅
|
||||||
|
for (Map.Entry<String, PatternTopic> entry : subscribedTopics.entrySet()) {
|
||||||
|
redisMessageListenerContainer.removeMessageListener(redisMessageListenerAdapter, entry.getValue());
|
||||||
|
log.info("已取消订阅:{}", entry.getKey());
|
||||||
|
}
|
||||||
|
subscribedTopics.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,14 +1,16 @@
|
|||||||
package org.dromara.bigscreen.service;
|
package org.dromara.bigscreen.service;
|
||||||
|
|
||||||
|
import org.dromara.bigscreen.domain.dto.TanchuangInfoReq;
|
||||||
import org.dromara.bigscreen.domain.vo.ProjectImageProgressVo;
|
import org.dromara.bigscreen.domain.vo.ProjectImageProgressVo;
|
||||||
import org.dromara.bigscreen.domain.vo.ProjectPeopleVo;
|
import org.dromara.bigscreen.domain.vo.ProjectPeopleVo;
|
||||||
import org.dromara.bigscreen.domain.vo.ProjectSafetyInspectionVo;
|
import org.dromara.bigscreen.domain.vo.ProjectSafetyInspectionVo;
|
||||||
import org.dromara.manager.weathermanager.vo.WeatherVo;
|
|
||||||
import org.dromara.gps.domain.bo.GpsEquipmentBo;
|
import org.dromara.gps.domain.bo.GpsEquipmentBo;
|
||||||
|
import org.dromara.manager.weathermanager.vo.WeatherVo;
|
||||||
import org.dromara.project.domain.vo.project.BusProjectSafetyDayVo;
|
import org.dromara.project.domain.vo.project.BusProjectSafetyDayVo;
|
||||||
import org.dromara.project.domain.vo.projectnews.BusProjectNewsVo;
|
import org.dromara.project.domain.vo.projectnews.BusProjectNewsVo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lilemy
|
* @author lilemy
|
||||||
@ -62,7 +64,7 @@ public interface ProjectBigScreenService {
|
|||||||
* @param projectId 项目id
|
* @param projectId 项目id
|
||||||
* @return 项目形象进度
|
* @return 项目形象进度
|
||||||
*/
|
*/
|
||||||
ProjectImageProgressVo getProjectImageProgress(Long projectId);
|
List<ProjectImageProgressVo> getProjectImageProgress(Long projectId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取项目概括
|
* 获取项目概括
|
||||||
@ -75,4 +77,13 @@ public interface ProjectBigScreenService {
|
|||||||
List<String> getList(Long projectId);
|
List<String> getList(Long projectId);
|
||||||
|
|
||||||
void setList(GpsEquipmentBo bo);
|
void setList(GpsEquipmentBo bo);
|
||||||
|
|
||||||
|
List<Map<String, Object>> getClientList(Long projectId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新无人机缓存
|
||||||
|
*/
|
||||||
|
void setWrjHc();
|
||||||
|
|
||||||
|
Map<String, Map<String, Object>> getInfoData(TanchuangInfoReq req);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,8 +2,10 @@ package org.dromara.bigscreen.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.json.JSONArray;
|
import cn.hutool.json.JSONArray;
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
import org.dromara.bigscreen.domain.dto.TanchuangInfoReq;
|
||||||
import org.dromara.bigscreen.domain.vo.ProjectImageProgressVo;
|
import org.dromara.bigscreen.domain.vo.ProjectImageProgressVo;
|
||||||
import org.dromara.bigscreen.domain.vo.ProjectPeopleVo;
|
import org.dromara.bigscreen.domain.vo.ProjectPeopleVo;
|
||||||
import org.dromara.bigscreen.domain.vo.ProjectSafetyInspectionVo;
|
import org.dromara.bigscreen.domain.vo.ProjectSafetyInspectionVo;
|
||||||
@ -15,10 +17,18 @@ import org.dromara.common.redis.utils.RedisUtils;
|
|||||||
import org.dromara.common.utils.BigDecimalUtil;
|
import org.dromara.common.utils.BigDecimalUtil;
|
||||||
import org.dromara.contractor.domain.SubConstructionUser;
|
import org.dromara.contractor.domain.SubConstructionUser;
|
||||||
import org.dromara.contractor.service.ISubConstructionUserService;
|
import org.dromara.contractor.service.ISubConstructionUserService;
|
||||||
|
import org.dromara.drone.service.IDroProjectDroneService;
|
||||||
import org.dromara.gps.domain.bo.GpsEquipmentBo;
|
import org.dromara.gps.domain.bo.GpsEquipmentBo;
|
||||||
|
import org.dromara.gps.domain.vo.DeviceVo;
|
||||||
|
import org.dromara.gps.domain.vo.GpsEquipmentSonVo;
|
||||||
|
import org.dromara.gps.domain.vo.LocationVo;
|
||||||
|
import org.dromara.gps.service.IDeviceService;
|
||||||
|
import org.dromara.gps.service.IGpsEquipmentService;
|
||||||
import org.dromara.manager.weathermanager.vo.WeatherVo;
|
import org.dromara.manager.weathermanager.vo.WeatherVo;
|
||||||
|
import org.dromara.other.domain.OthYs7Device;
|
||||||
|
import org.dromara.other.service.IOthYs7DeviceService;
|
||||||
|
import org.dromara.progress.constant.PgsProgressCategoryConstant;
|
||||||
import org.dromara.progress.domain.PgsProgressCategory;
|
import org.dromara.progress.domain.PgsProgressCategory;
|
||||||
import org.dromara.progress.domain.enums.PgsProgressUnitTypeEnum;
|
|
||||||
import org.dromara.progress.service.IPgsProgressCategoryService;
|
import org.dromara.progress.service.IPgsProgressCategoryService;
|
||||||
import org.dromara.project.domain.BusProject;
|
import org.dromara.project.domain.BusProject;
|
||||||
import org.dromara.project.domain.BusProjectTeam;
|
import org.dromara.project.domain.BusProjectTeam;
|
||||||
@ -29,11 +39,14 @@ import org.dromara.project.service.*;
|
|||||||
import org.dromara.safety.domain.HseRecognizeRecord;
|
import org.dromara.safety.domain.HseRecognizeRecord;
|
||||||
import org.dromara.safety.service.IHseRecognizeRecordService;
|
import org.dromara.safety.service.IHseRecognizeRecordService;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.RoundingMode;
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.LocalTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -68,6 +81,20 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService {
|
|||||||
@Resource
|
@Resource
|
||||||
private IPgsProgressCategoryService progressCategoryService;
|
private IPgsProgressCategoryService progressCategoryService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IDroProjectDroneService droProjectDroneService;
|
||||||
|
@Resource
|
||||||
|
private IGpsEquipmentService gpsEquipmentService;
|
||||||
|
@Resource
|
||||||
|
private IOthYs7DeviceService othYs7DeviceService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
@Lazy
|
||||||
|
private StringRedisTemplate stringRedisTemplate;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IDeviceService deviceService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取项目天气
|
* 获取项目天气
|
||||||
*
|
*
|
||||||
@ -141,8 +168,12 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService {
|
|||||||
// 获取大屏数据
|
// 获取大屏数据
|
||||||
ProjectPeopleVo vo = new ProjectPeopleVo();
|
ProjectPeopleVo vo = new ProjectPeopleVo();
|
||||||
// 获取施工人员总数
|
// 获取施工人员总数
|
||||||
Long count = constructionUserService.lambdaQuery()
|
List<SubConstructionUser> list = constructionUserService.lambdaQuery()
|
||||||
.eq(SubConstructionUser::getProjectId, projectId).count();
|
.eq(SubConstructionUser::getProjectId, projectId)
|
||||||
|
.eq(SubConstructionUser::getUserRole, "0")
|
||||||
|
.isNotNull(SubConstructionUser::getTeamId).list();
|
||||||
|
List<Long> sysUserIdList = list.stream().map(SubConstructionUser::getSysUserId).toList();
|
||||||
|
int count = list.size();
|
||||||
BigDecimal countDec = BigDecimal.valueOf(count);
|
BigDecimal countDec = BigDecimal.valueOf(count);
|
||||||
vo.setPeopleCount(countDec);
|
vo.setPeopleCount(countDec);
|
||||||
// 获取考勤数据
|
// 获取考勤数据
|
||||||
@ -156,13 +187,17 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService {
|
|||||||
List<BusProjectTeamMember> memberList = projectTeamMemberService.lambdaQuery()
|
List<BusProjectTeamMember> memberList = projectTeamMemberService.lambdaQuery()
|
||||||
.select(BusProjectTeamMember::getId, BusProjectTeamMember::getTeamId)
|
.select(BusProjectTeamMember::getId, BusProjectTeamMember::getTeamId)
|
||||||
.eq(BusProjectTeamMember::getProjectId, projectId)
|
.eq(BusProjectTeamMember::getProjectId, projectId)
|
||||||
|
.in(BusProjectTeamMember::getMemberId, sysUserIdList)
|
||||||
.list();
|
.list();
|
||||||
Map<Long, List<BusProjectTeamMember>> memberMap = memberList.stream()
|
Map<Long, List<BusProjectTeamMember>> memberMap = memberList.stream()
|
||||||
.collect(Collectors.groupingBy(BusProjectTeamMember::getTeamId));
|
.collect(Collectors.groupingBy(BusProjectTeamMember::getTeamId));
|
||||||
// 统计班组考勤数据
|
// 统计班组考勤数据
|
||||||
Map<Long, List<SubConstructionUser>> userTeamMap = new HashMap<>();
|
Map<Long, List<SubConstructionUser>> userTeamMap = new HashMap<>();
|
||||||
if (CollUtil.isNotEmpty(attendancePeopleList)) {
|
if (CollUtil.isNotEmpty(attendancePeopleList)) {
|
||||||
List<SubConstructionUser> users = constructionUserService.listByIds(attendancePeopleList);
|
List<SubConstructionUser> users = constructionUserService.lambdaQuery()
|
||||||
|
.in(SubConstructionUser::getSysUserId, attendancePeopleList)
|
||||||
|
.isNotNull(SubConstructionUser::getTeamId)
|
||||||
|
.list();
|
||||||
userTeamMap = users.stream()
|
userTeamMap = users.stream()
|
||||||
.collect(Collectors.groupingBy(SubConstructionUser::getTeamId));
|
.collect(Collectors.groupingBy(SubConstructionUser::getTeamId));
|
||||||
}
|
}
|
||||||
@ -173,7 +208,7 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService {
|
|||||||
String punchTime = "";
|
String punchTime = "";
|
||||||
if (punchRange != null) {
|
if (punchRange != null) {
|
||||||
String start = punchRange.split(",")[0];
|
String start = punchRange.split(",")[0];
|
||||||
punchTime = LocalDate.now() + " " + start;
|
punchTime = LocalDate.now() + " ";
|
||||||
}
|
}
|
||||||
List<ProjectTeamAttendanceVo> listVo = new ArrayList<>();
|
List<ProjectTeamAttendanceVo> listVo = new ArrayList<>();
|
||||||
for (BusProjectTeam projectTeam : teamList) {
|
for (BusProjectTeam projectTeam : teamList) {
|
||||||
@ -207,9 +242,59 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService {
|
|||||||
* @return 项目形象进度
|
* @return 项目形象进度
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public ProjectImageProgressVo getProjectImageProgress(Long projectId) {
|
public List<ProjectImageProgressVo> getProjectImageProgress(Long projectId) {
|
||||||
checkProject(projectId);
|
checkProject(projectId);
|
||||||
ProjectImageProgressVo vo = new ProjectImageProgressVo();
|
// 获取当前项目的所有子项目
|
||||||
|
List<Long> projectIds = new ArrayList<>(projectService.lambdaQuery()
|
||||||
|
.select(BusProject::getId)
|
||||||
|
.eq(BusProject::getPId, projectId)
|
||||||
|
.list()
|
||||||
|
.stream()
|
||||||
|
.map(BusProject::getId)
|
||||||
|
.toList());
|
||||||
|
projectIds.add(projectId);
|
||||||
|
// 查询该子项目下的顶级进度类别(父ID为0)
|
||||||
|
List<PgsProgressCategory> list = progressCategoryService.lambdaQuery()
|
||||||
|
.in(PgsProgressCategory::getProjectId, projectIds)
|
||||||
|
.eq(PgsProgressCategory::getParentId, PgsProgressCategoryConstant.TOP_PARENT_ID)
|
||||||
|
.list();
|
||||||
|
// 如果没有查询到顶级进度类别,直接返回空集合
|
||||||
|
if (CollUtil.isEmpty(list)) {
|
||||||
|
return List.of();
|
||||||
|
}
|
||||||
|
List<ProjectImageProgressVo> topList = new ArrayList<>();
|
||||||
|
// 获取这些顶级类别的所有子节点
|
||||||
|
List<Long> ids = list.stream().map(PgsProgressCategory::getId).distinct().toList();
|
||||||
|
List<PgsProgressCategory> childrenNodes = progressCategoryService.getChildrenNodeByTopIds(ids);
|
||||||
|
if (CollUtil.isNotEmpty(list)) {
|
||||||
|
// 按名称分组(同名的放在一起)
|
||||||
|
Map<String, List<PgsProgressCategory>> subMap = list.stream()
|
||||||
|
.collect(Collectors.groupingBy(PgsProgressCategory::getName));
|
||||||
|
for (Map.Entry<String, List<PgsProgressCategory>> entry : subMap.entrySet()) {
|
||||||
|
ProjectImageProgressVo topVo = new ProjectImageProgressVo();
|
||||||
|
topVo.setProgressName(entry.getKey());
|
||||||
|
List<PgsProgressCategory> value = entry.getValue();
|
||||||
|
// 获取这些类别下的所有叶子节点
|
||||||
|
List<Long> topIds = value.stream().map(PgsProgressCategory::getId).distinct().toList();
|
||||||
|
List<PgsProgressCategory> leafNodesByTopIds = childrenNodes.stream()
|
||||||
|
.filter(node -> {
|
||||||
|
Set<Long> ancestorSet = Arrays.stream(node.getAncestors().split(","))
|
||||||
|
.map(Long::parseLong)
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
return topIds.stream().anyMatch(ancestorSet::contains);
|
||||||
|
}).toList();
|
||||||
|
// 如果有叶子节点,统计进度和状态;否则初始化为未完成
|
||||||
|
if (CollUtil.isNotEmpty(leafNodesByTopIds)) {
|
||||||
|
topVo.setProgressTotal(progressCategoryService.getCompletedPercentage(leafNodesByTopIds));
|
||||||
|
} else {
|
||||||
|
topVo.setProgressTotal(BigDecimal.ZERO);
|
||||||
|
}
|
||||||
|
// 加入结果集
|
||||||
|
topList.add(topVo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return topList;
|
||||||
|
/* ProjectImageProgressVo vo = new ProjectImageProgressVo();
|
||||||
// 获取所有子项目列表
|
// 获取所有子项目列表
|
||||||
List<BusProject> subProjectList = projectService.lambdaQuery()
|
List<BusProject> subProjectList = projectService.lambdaQuery()
|
||||||
.eq(BusProject::getPId, projectId)
|
.eq(BusProject::getPId, projectId)
|
||||||
@ -218,7 +303,7 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService {
|
|||||||
return vo;
|
return vo;
|
||||||
}
|
}
|
||||||
// 子项目id列表
|
// 子项目id列表
|
||||||
List<Long> subProjectIds = subProjectList.stream().map(BusProject::getId).toList();
|
List<Long> projectIds = new ArrayList<>(subProjectList.stream().map(BusProject::getId).toList());
|
||||||
// 计算集电线路
|
// 计算集电线路
|
||||||
vo.setCollectorLinePercentage(BigDecimal.valueOf(0.00));
|
vo.setCollectorLinePercentage(BigDecimal.valueOf(0.00));
|
||||||
// 计算送出线路
|
// 计算送出线路
|
||||||
@ -232,8 +317,9 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService {
|
|||||||
// 计算箱变
|
// 计算箱变
|
||||||
vo.setBoxTransformerPercentage(BigDecimal.ZERO);
|
vo.setBoxTransformerPercentage(BigDecimal.ZERO);
|
||||||
// 获取集电线路、送出线路、升压站数据
|
// 获取集电线路、送出线路、升压站数据
|
||||||
|
projectIds.add(projectId);
|
||||||
List<PgsProgressCategory> progressCategoryList = progressCategoryService.lambdaQuery()
|
List<PgsProgressCategory> progressCategoryList = progressCategoryService.lambdaQuery()
|
||||||
.in(PgsProgressCategory::getProjectId, subProjectIds)
|
.in(PgsProgressCategory::getProjectId, projectIds)
|
||||||
.in(PgsProgressCategory::getName, "集电线路", "送出线路", "升压站", "光伏场区")
|
.in(PgsProgressCategory::getName, "集电线路", "送出线路", "升压站", "光伏场区")
|
||||||
.eq(PgsProgressCategory::getParentId, 0L)
|
.eq(PgsProgressCategory::getParentId, 0L)
|
||||||
.list();
|
.list();
|
||||||
@ -301,7 +387,7 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService {
|
|||||||
}
|
}
|
||||||
// 计算道路
|
// 计算道路
|
||||||
List<PgsProgressCategory> roadCategoryList = progressCategoryService.lambdaQuery()
|
List<PgsProgressCategory> roadCategoryList = progressCategoryService.lambdaQuery()
|
||||||
.in(PgsProgressCategory::getProjectId, subProjectIds)
|
.in(PgsProgressCategory::getProjectId, projectIds)
|
||||||
.like(PgsProgressCategory::getName, "道路")
|
.like(PgsProgressCategory::getName, "道路")
|
||||||
.ne(PgsProgressCategory::getUnitType, PgsProgressUnitTypeEnum.NULL.getValue())
|
.ne(PgsProgressCategory::getUnitType, PgsProgressUnitTypeEnum.NULL.getValue())
|
||||||
.list();
|
.list();
|
||||||
@ -313,7 +399,7 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService {
|
|||||||
}
|
}
|
||||||
// 计算箱变
|
// 计算箱变
|
||||||
List<PgsProgressCategory> boxTransformerCategoryList = progressCategoryService.lambdaQuery()
|
List<PgsProgressCategory> boxTransformerCategoryList = progressCategoryService.lambdaQuery()
|
||||||
.in(PgsProgressCategory::getProjectId, subProjectIds)
|
.in(PgsProgressCategory::getProjectId, projectIds)
|
||||||
.like(PgsProgressCategory::getName, "箱变")
|
.like(PgsProgressCategory::getName, "箱变")
|
||||||
.ne(PgsProgressCategory::getUnitType, PgsProgressUnitTypeEnum.NULL.getValue())
|
.ne(PgsProgressCategory::getUnitType, PgsProgressUnitTypeEnum.NULL.getValue())
|
||||||
.list();
|
.list();
|
||||||
@ -333,7 +419,7 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService {
|
|||||||
.add(vo.getBoxTransformerPercentage())
|
.add(vo.getBoxTransformerPercentage())
|
||||||
.divide(BigDecimal.valueOf(6), 2, RoundingMode.HALF_UP) // 保留两位小数
|
.divide(BigDecimal.valueOf(6), 2, RoundingMode.HALF_UP) // 保留两位小数
|
||||||
);
|
);
|
||||||
return vo;
|
return vo;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -365,7 +451,7 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> getList(Long projectId) {
|
public List<String> getList(Long projectId) {
|
||||||
if (projectId == null){
|
if (projectId == null) {
|
||||||
throw new ServiceException("项目id不能为空!!!");
|
throw new ServiceException("项目id不能为空!!!");
|
||||||
}
|
}
|
||||||
Object object = RedisUtils.getCacheObject("xmjdp:" + projectId);
|
Object object = RedisUtils.getCacheObject("xmjdp:" + projectId);
|
||||||
@ -379,9 +465,173 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setList(GpsEquipmentBo bo) {
|
public void setList(GpsEquipmentBo bo) {
|
||||||
if (bo.getProjectId() == null){
|
if (bo.getProjectId() == null) {
|
||||||
throw new ServiceException("项目id不能为空!!!");
|
throw new ServiceException("项目id不能为空!!!");
|
||||||
}
|
}
|
||||||
RedisUtils.setCacheObject("xmjdp:"+bo.getProjectId(), bo.getIdList());
|
RedisUtils.setCacheObject("xmjdp:" + bo.getProjectId(), bo.getIdList());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Map<String, Object>> getClientList(Long projectId) {
|
||||||
|
// 获取当天的开始时间(00:00:00)
|
||||||
|
LocalDateTime startOfDay = LocalDateTime.now().with(LocalTime.MIN);
|
||||||
|
|
||||||
|
// 获取当前时间
|
||||||
|
LocalDateTime now = LocalDateTime.now();
|
||||||
|
List<GpsEquipmentSonVo> voList = gpsEquipmentService.getClientList(projectId, startOfDay, now);
|
||||||
|
List<GpsEquipmentSonVo> appList = gpsEquipmentService.getUserListByProjectId(projectId, startOfDay, now);
|
||||||
|
List<LocationVo> anqmList = deviceService.getUserListByProjectId(projectId, startOfDay, now);
|
||||||
|
List<OthYs7Device> othYs7DeviceList = othYs7DeviceService.lambdaQuery()
|
||||||
|
.eq(OthYs7Device::getProjectId, projectId)
|
||||||
|
// .between(OthYs7Device::getUpdateTime, startOfDay, now)
|
||||||
|
.list();
|
||||||
|
List<String> wrjKeys = droProjectDroneService.getTopicsByProjectId(projectId);
|
||||||
|
List<Map<String, Object>> maps = new ArrayList<>();
|
||||||
|
Map<String, Object> gpsMap = new HashMap<>();
|
||||||
|
Map<String, Object> anqmMap = new HashMap<>();
|
||||||
|
Map<String, Object> appMap = new HashMap<>();
|
||||||
|
Map<String, Object> sbMap = new HashMap<>();
|
||||||
|
Map<String, Object> wrjMap = new HashMap<>();
|
||||||
|
Map<String, Object> sxtMap = new HashMap<>();
|
||||||
|
List<Map<String, Object>> gpsChildrenMap = new ArrayList<>();
|
||||||
|
List<Map<String, Object>> sbChildrenMap = new ArrayList<>();
|
||||||
|
List<Map<String, Object>> appChildrenMap = new ArrayList<>();
|
||||||
|
List<Map<String, Object>> anqmChildrenMap = new ArrayList<>();
|
||||||
|
List<Map<String, Object>> wrjChildrenMap = new ArrayList<>();
|
||||||
|
List<Map<String, Object>> sxtChildrenMap = new ArrayList<>();
|
||||||
|
if (voList != null && !voList.isEmpty()) {
|
||||||
|
for (GpsEquipmentSonVo item : voList) {
|
||||||
|
Map<String, Object> gps = new HashMap<>();
|
||||||
|
gps.put("id", item.getClientId());
|
||||||
|
gps.put("userId", item.getUserId());
|
||||||
|
gps.put("label", item.getClientId());
|
||||||
|
gps.put("name", item.getUserId() != null ? item.getUserName() : item.getClientId());
|
||||||
|
gps.put("type", "gps");
|
||||||
|
gps.put("lat", item.getLocLatitude());
|
||||||
|
gps.put("lng", item.getLocLongitude());
|
||||||
|
gps.put("alt", item.getLocAltitude());
|
||||||
|
sbChildrenMap.add(gps);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (appList != null && !appList.isEmpty()) {
|
||||||
|
for (GpsEquipmentSonVo item : appList) {
|
||||||
|
Map<String, Object> app = new HashMap<>();
|
||||||
|
app.put("id", item.getUserId());
|
||||||
|
app.put("userId", item.getUserId());
|
||||||
|
app.put("label", item.getUserId());
|
||||||
|
app.put("name", item.getUserName());
|
||||||
|
app.put("type", "app");
|
||||||
|
app.put("lat", item.getLocLatitude());
|
||||||
|
app.put("lng", item.getLocLongitude());
|
||||||
|
app.put("alt", item.getLocAltitude());
|
||||||
|
appChildrenMap.add(app);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (anqmList != null && !anqmList.isEmpty()) {
|
||||||
|
for (LocationVo item : anqmList) {
|
||||||
|
Map<String, Object> anqm = new HashMap<>();
|
||||||
|
anqm.put("id", item.getDevNum());
|
||||||
|
anqm.put("userId", item.getUserId());
|
||||||
|
anqm.put("label", item.getDevNum());
|
||||||
|
anqm.put("name", item.getDevNum());
|
||||||
|
anqm.put("type", "positioningDevice");
|
||||||
|
anqm.put("lat", item.getLatitude());
|
||||||
|
anqm.put("lng", item.getLongitude());
|
||||||
|
anqm.put("alt", item.getElevation());
|
||||||
|
anqmChildrenMap.add(anqm);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (othYs7DeviceList != null && !othYs7DeviceList.isEmpty()) {
|
||||||
|
for (OthYs7Device item : othYs7DeviceList) {
|
||||||
|
Map<String, Object> sxt = new HashMap<>();
|
||||||
|
sxt.put("id", item.getDeviceSerial());
|
||||||
|
sxt.put("label", item.getDeviceSerial());
|
||||||
|
sxt.put("name", item.getDeviceName());
|
||||||
|
sxt.put("type", "shexiangtou");
|
||||||
|
sxt.put("lat", item.getLatitude());
|
||||||
|
sxt.put("lng", item.getLongitude());
|
||||||
|
sxt.put("alt", item.getAltitude());
|
||||||
|
sxt.put("status", item.getStatus());
|
||||||
|
sxt.put("detail", item.getDetail());
|
||||||
|
sxtChildrenMap.add(sxt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (wrjKeys != null && !wrjKeys.isEmpty()) {
|
||||||
|
for (String key : wrjKeys) {
|
||||||
|
Object object = stringRedisTemplate.opsForValue().get("wrj:osd4:" + key);
|
||||||
|
Object object6 = stringRedisTemplate.opsForValue().get("wrj:osd2:" + key);
|
||||||
|
String status = "";
|
||||||
|
if (object6 != null) {
|
||||||
|
JSONObject object1 = JSONUtil.parseObj(object6);
|
||||||
|
status = object1.getJSONObject("data").get("flighttask_step_code").toString();
|
||||||
|
}
|
||||||
|
if (object != null) {
|
||||||
|
JSONObject object1 = JSONUtil.parseObj(object);
|
||||||
|
Map<String, Object> wrj = new HashMap<>();
|
||||||
|
wrj.put("id", key);
|
||||||
|
wrj.put("label", key);
|
||||||
|
wrj.put("name", key);
|
||||||
|
wrj.put("type", "wurenji");
|
||||||
|
wrj.put("status", status);
|
||||||
|
wrj.put("lat", object1.getJSONObject("data").get("latitude"));
|
||||||
|
wrj.put("lng", object1.getJSONObject("data").get("longitude"));
|
||||||
|
wrj.put("alt", object1.getJSONObject("data").get("height"));
|
||||||
|
wrjChildrenMap.add(wrj);
|
||||||
|
}else {
|
||||||
|
Object object2 = stringRedisTemplate.opsForValue().get("wrj:osd3:" + key);
|
||||||
|
if (object2 != null) {
|
||||||
|
JSONObject object3 = JSONUtil.parseObj(object2);
|
||||||
|
Map<String, Object> wrj = new HashMap<>();
|
||||||
|
wrj.put("id", key);
|
||||||
|
wrj.put("label", key);
|
||||||
|
wrj.put("name", key);
|
||||||
|
wrj.put("type", "wurenji");
|
||||||
|
wrj.put("status", status);
|
||||||
|
wrj.put("lat", object3.getJSONObject("data").get("latitude"));
|
||||||
|
wrj.put("lng", object3.getJSONObject("data").get("longitude"));
|
||||||
|
wrj.put("alt", object3.getJSONObject("data").get("height"));
|
||||||
|
wrjChildrenMap.add(wrj);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
gpsChildrenMap.add(sbMap);
|
||||||
|
gpsChildrenMap.add(appMap);
|
||||||
|
gpsChildrenMap.add(anqmMap);
|
||||||
|
|
||||||
|
gpsMap.put("id", 1);
|
||||||
|
gpsMap.put("label", "人员定位");
|
||||||
|
gpsMap.put("children", gpsChildrenMap);
|
||||||
|
sbMap.put("id", 4);
|
||||||
|
sbMap.put("label", "设备定位");
|
||||||
|
sbMap.put("children", sbChildrenMap);
|
||||||
|
appMap.put("id", 5);
|
||||||
|
appMap.put("label", "app定位");
|
||||||
|
appMap.put("children", appChildrenMap);
|
||||||
|
anqmMap.put("id", 6);
|
||||||
|
anqmMap.put("label", "安全帽定位");
|
||||||
|
anqmMap.put("children", anqmChildrenMap);
|
||||||
|
sxtMap.put("id", 2);
|
||||||
|
sxtMap.put("label", "摄像头");
|
||||||
|
sxtMap.put("children", sxtChildrenMap);
|
||||||
|
wrjMap.put("id", 3);
|
||||||
|
wrjMap.put("label", "无人机");
|
||||||
|
wrjMap.put("children", wrjChildrenMap);
|
||||||
|
|
||||||
|
|
||||||
|
maps.add(gpsMap);
|
||||||
|
maps.add(wrjMap);
|
||||||
|
maps.add(sxtMap);
|
||||||
|
return maps;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setWrjHc() {
|
||||||
|
RedisUtils.setCacheObject("xmjdap:ws",System.currentTimeMillis() );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Map<String, Object>> getInfoData(TanchuangInfoReq req) {
|
||||||
|
return projectService.getInfoData(req);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,6 +13,7 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import jakarta.validation.constraints.*;
|
import jakarta.validation.constraints.*;
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.dromara.cailiaoshebei.domain.bo.RemainingReq;
|
||||||
import org.dromara.cailiaoshebei.domain.dto.BusMrpDto;
|
import org.dromara.cailiaoshebei.domain.dto.BusMrpDto;
|
||||||
import org.dromara.cailiaoshebei.domain.dto.BusMrpExportDto;
|
import org.dromara.cailiaoshebei.domain.dto.BusMrpExportDto;
|
||||||
import org.dromara.cailiaoshebei.domain.vo.BusMrpVo;
|
import org.dromara.cailiaoshebei.domain.vo.BusMrpVo;
|
||||||
@ -24,6 +25,10 @@ import org.dromara.design.domain.bo.CoryObtainTheListReq;
|
|||||||
import org.dromara.design.domain.vo.ObtainTheListRes;
|
import org.dromara.design.domain.vo.ObtainTheListRes;
|
||||||
import org.dromara.design.service.IBusBillofquantitiesService;
|
import org.dromara.design.service.IBusBillofquantitiesService;
|
||||||
import org.dromara.design.service.IBusBillofquantitiesVersionsService;
|
import org.dromara.design.service.IBusBillofquantitiesVersionsService;
|
||||||
|
import org.dromara.tender.domain.bo.BusBiddingPlanBo;
|
||||||
|
import org.dromara.tender.domain.vo.BusBiddingPlanVo;
|
||||||
|
import org.dromara.tender.domain.vo.BusBillofquantitiesLimitListVo;
|
||||||
|
import org.dromara.tender.service.IBusBiddingPlanService;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@ -59,6 +64,7 @@ public class BusMrpBaseController extends BaseController {
|
|||||||
private final IBusBillofquantitiesVersionsService busBillofquantitiesVersionsService;
|
private final IBusBillofquantitiesVersionsService busBillofquantitiesVersionsService;
|
||||||
|
|
||||||
private final IBusBillofquantitiesService busBillofquantitiesService;
|
private final IBusBillofquantitiesService busBillofquantitiesService;
|
||||||
|
private final IBusBiddingPlanService busBiddingPlanService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询物资-批次需求计划基础信息列表
|
* 查询物资-批次需求计划基础信息列表
|
||||||
@ -141,8 +147,14 @@ public class BusMrpBaseController extends BaseController {
|
|||||||
* 获取剩余量
|
* 获取剩余量
|
||||||
*/
|
*/
|
||||||
@GetMapping("/remaining")
|
@GetMapping("/remaining")
|
||||||
public R<Map<String,Object>> remaining(Long projectId, String suppliespriceName,String specification,Long mrpBaseId) {
|
public R<List<Map<String,Object>>> remaining( RemainingReq req) {
|
||||||
return R.ok(busMrpBaseService.remaining(projectId,suppliespriceName,specification,mrpBaseId));
|
String[] split = req.getLimitListId().split(",");
|
||||||
|
List<Map<String, Object>> maps = new ArrayList<>();
|
||||||
|
for (String id : split) {
|
||||||
|
Map<String, Object> remaining = busMrpBaseService.remaining(req.getProjectId(), Long.valueOf(id), req.getMrpBaseId());
|
||||||
|
maps.add(remaining);
|
||||||
|
}
|
||||||
|
return R.ok(maps);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -175,6 +187,35 @@ public class BusMrpBaseController extends BaseController {
|
|||||||
return R.ok(list);
|
return R.ok(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取工程量清单列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cailiaoshebei:mrpBase:getZhaoBiaoList")
|
||||||
|
@GetMapping("/getZhaoBiaoList")
|
||||||
|
public R<List<BusBiddingPlanVo>> getZhaoBiaoList(CoryObtainTheListReq req) {
|
||||||
|
BusBiddingPlanBo bo = new BusBiddingPlanBo();
|
||||||
|
bo.setProjectId(req.getProjectId());
|
||||||
|
bo.setType("3");
|
||||||
|
bo.setBidStatus(1);
|
||||||
|
List<BusBiddingPlanVo> busBiddingPlanVos = busBiddingPlanService.queryList(bo);
|
||||||
|
return R.ok(busBiddingPlanVos);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 招标计划数据详情
|
||||||
|
* @param bo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cailiaoshebei:mrpBase:getMore")
|
||||||
|
@GetMapping("/getMore")
|
||||||
|
public R<List<BusBillofquantitiesLimitListVo>> getMore(BusBiddingPlanBo bo) {
|
||||||
|
if (bo.getId() == null) {
|
||||||
|
throw new ServiceException("id不能为空");
|
||||||
|
}
|
||||||
|
return R.ok(busBiddingPlanService.getMore(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取工程量清单列表
|
* 获取工程量清单列表
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -0,0 +1,160 @@
|
|||||||
|
package org.dromara.cailiaoshebei.controller.app;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
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.bo.BusMrpBaseBo;
|
||||||
|
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.vo.BusMrpVo;
|
||||||
|
import org.dromara.cailiaoshebei.service.IBusMrpBaseService;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.enums.BusinessStatusEnum;
|
||||||
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
|
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.dromara.design.domain.BusBillofquantities;
|
||||||
|
import org.dromara.design.domain.BusBillofquantitiesVersions;
|
||||||
|
import org.dromara.design.domain.bo.CoryObtainTheListReq;
|
||||||
|
import org.dromara.design.domain.bo.ObtainAllVersionNumbersReq;
|
||||||
|
import org.dromara.design.domain.vo.BusBillofquantitiesVo;
|
||||||
|
import org.dromara.design.domain.vo.ObtainTheListRes;
|
||||||
|
import org.dromara.design.service.IBusBillofquantitiesService;
|
||||||
|
import org.dromara.design.service.IBusBillofquantitiesVersionsService;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* app物资-批次需求计划基础信息
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-08-13
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/app/cailiaoshebei/mrpBase")
|
||||||
|
public class BusMrpBaseAppController extends BaseController {
|
||||||
|
|
||||||
|
private final IBusMrpBaseService busMrpBaseService;
|
||||||
|
|
||||||
|
private final IBusBillofquantitiesVersionsService busBillofquantitiesVersionsService;
|
||||||
|
|
||||||
|
private final IBusBillofquantitiesService busBillofquantitiesService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物资-批次需求计划基础信息列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<BusMrpBaseVo> list(BusMrpBaseBo bo, PageQuery pageQuery) {
|
||||||
|
return busMrpBaseService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取物资-批次需求计划基础信息详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BusMrpVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(busMrpBaseService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除物资-批次需求计划基础信息
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@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));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取剩余量
|
||||||
|
*/
|
||||||
|
@GetMapping("/remaining")
|
||||||
|
public R<Map<String,Object>> remaining(Long projectId,Long limitListId,Long mrpBaseId) {
|
||||||
|
return R.ok(busMrpBaseService.remaining(projectId,limitListId,mrpBaseId));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有大类
|
||||||
|
*/
|
||||||
|
@GetMapping("/obtainAllClassification")
|
||||||
|
public R<List<BusBillofquantitiesVo>> obtainAllClassification(ObtainAllVersionNumbersReq bo) {
|
||||||
|
return R.ok(busBillofquantitiesVersionsService.obtainAllClassification(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取工程量清单列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/coryEngineeringList")
|
||||||
|
public R<List<BusBillofquantities>> obtainTheList(CoryObtainTheListReq req) {
|
||||||
|
List<BusBillofquantities> busBillofquantities = busBillofquantitiesService.getBaseMapper()
|
||||||
|
.selectList(new LambdaQueryWrapper<BusBillofquantities>()
|
||||||
|
.eq(BusBillofquantities::getProjectId, req.getProjectId())
|
||||||
|
.eq(BusBillofquantities::getName, req.getSid()));
|
||||||
|
List<String> sids = new ArrayList<>();
|
||||||
|
busBillofquantities.forEach(busBillofquantities1 -> {
|
||||||
|
sids.add(busBillofquantities1.getSid());
|
||||||
|
});
|
||||||
|
return R.ok(busBillofquantitiesService
|
||||||
|
.getBaseMapper()
|
||||||
|
.selectList(new LambdaQueryWrapper<BusBillofquantities>()
|
||||||
|
.eq(BusBillofquantities::getProjectId, req.getProjectId())
|
||||||
|
.in(BusBillofquantities::getPid, sids)));
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<ObtainTheListRes> buildTree(String parentId, Map<String, List<ObtainTheListRes>> parentMap) {
|
||||||
|
// 获取当前父节点的所有直接子节点
|
||||||
|
List<ObtainTheListRes> children = parentMap.getOrDefault(parentId, Collections.emptyList());
|
||||||
|
if (children.isEmpty()) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 为每个子节点递归设置其下一级子节点
|
||||||
|
for (ObtainTheListRes child : children) {
|
||||||
|
// 递归查询当前子节点的子节点,设置为它的子树
|
||||||
|
List<ObtainTheListRes> subChildren = buildTree(child.getSid(), parentMap);
|
||||||
|
// 注意:需要在Vo中添加子节点列表字段,用于存储子树
|
||||||
|
child.setChildren(subChildren);
|
||||||
|
}
|
||||||
|
|
||||||
|
return children;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,214 @@
|
|||||||
|
package org.dromara.cailiaoshebei.controller.app;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
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.bo.FeedbackDto;
|
||||||
|
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.dromara.design.service.IBusBillofquantitiesService;
|
||||||
|
import org.dromara.design.service.IBusBillofquantitiesVersionsService;
|
||||||
|
import org.dromara.tender.domain.bo.TenderSupplierInputBo;
|
||||||
|
import org.dromara.tender.domain.vo.TenderSupplierInputVo;
|
||||||
|
import org.dromara.tender.service.ITenderSupplierInputService;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* app物资-采购联系单
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-08-13
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/app/cailiaoshebei/purchaseDoc")
|
||||||
|
public class BusPurchaseDocAppController extends BaseController {
|
||||||
|
|
||||||
|
private final IBusPurchaseDocService busPurchaseDocService;
|
||||||
|
|
||||||
|
private final IBusMaterialbatchdemandplanService materialbatchdemandplanService;
|
||||||
|
|
||||||
|
private final IBusPlanDocAssociationService planDocAssociationService;
|
||||||
|
|
||||||
|
private final IBusBillofquantitiesVersionsService busBillofquantitiesVersionsService;
|
||||||
|
|
||||||
|
private final IBusBillofquantitiesService busBillofquantitiesService;
|
||||||
|
|
||||||
|
private final ITenderSupplierInputService tenderSupplierInputService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物资-采购联系单列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<BusPurchaseDocVo> list(BusPurchaseDocBo bo, PageQuery pageQuery) {
|
||||||
|
return busPurchaseDocService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询供应商入库列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/supList")
|
||||||
|
public TableDataInfo<TenderSupplierInputVo> list(TenderSupplierInputBo bo, PageQuery pageQuery) {
|
||||||
|
return tenderSupplierInputService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物资-批次需求计划列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/planList")
|
||||||
|
public TableDataInfo<BusMaterialbatchdemandplanVo> list(BusMaterialbatchdemandplanBo bo, PageQuery pageQuery) {
|
||||||
|
return materialbatchdemandplanService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取物资-采购联系单详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BusPurchaseDocVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(busPurchaseDocService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取物资-采购联系单详细PDF
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cailiaoshebei:purchaseDoc:pdf")
|
||||||
|
@GetMapping("/pdf/{id}")
|
||||||
|
public R<String> getPic(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok("操作成功", busPurchaseDocService.queryPicBase64ById(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));
|
||||||
|
if (CollectionUtil.isEmpty(list)) {
|
||||||
|
return R.ok(new ArrayList<>());
|
||||||
|
}
|
||||||
|
Map<Long, BigDecimal> collect = list.stream()
|
||||||
|
.filter(Objects::nonNull) // 过滤空对象
|
||||||
|
.collect(Collectors.toMap(
|
||||||
|
BusPlanDocAssociation::getPlanId,
|
||||||
|
BusPlanDocAssociation::getDemandQuantity,
|
||||||
|
(existing, replacement) -> existing // 保留第一个遇到的重复键
|
||||||
|
));
|
||||||
|
BusMaterialbatchdemandplanBo bo = new BusMaterialbatchdemandplanBo();
|
||||||
|
bo.setIds(new ArrayList<>(collect.keySet()));
|
||||||
|
List<BusMaterialbatchdemandplanVo> busMaterialbatchdemandplanVos = materialbatchdemandplanService.queryList(bo);
|
||||||
|
for (BusMaterialbatchdemandplanVo busMaterialbatchdemandplanVo : busMaterialbatchdemandplanVos) {
|
||||||
|
busMaterialbatchdemandplanVo.setDemandQuantity(collect.get(busMaterialbatchdemandplanVo.getId()));
|
||||||
|
}
|
||||||
|
return R.ok(busMaterialbatchdemandplanVos);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改回单
|
||||||
|
*/
|
||||||
|
@Log(title = "物资-采购联系单", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping("/updateFeedback")
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody FeedbackDto bo) {
|
||||||
|
return toAjax(busPurchaseDocService.updateFeedback(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 获取工程量清单列表
|
||||||
|
// */
|
||||||
|
// @SaCheckPermission("cailiaoshebei:purchaseDoc:add")
|
||||||
|
// @GetMapping("/engineeringList")
|
||||||
|
// public R<List<BusBillofquantities>> obtainTheList(Long projectId) {
|
||||||
|
// BusBillofquantitiesVersions one = busBillofquantitiesVersionsService.getOne(Wrappers.<BusBillofquantitiesVersions>lambdaQuery()
|
||||||
|
// .eq(BusBillofquantitiesVersions::getWorkOrderType, "3") //物资工程量清单
|
||||||
|
// .eq(BusBillofquantitiesVersions::getProjectId, projectId)
|
||||||
|
// .eq(BusBillofquantitiesVersions::getStatus, BusinessStatusEnum.FINISH.getStatus())
|
||||||
|
// .last("limit 1")
|
||||||
|
// );
|
||||||
|
// if (one == null) {
|
||||||
|
// throw new ServiceException("请先完成物资工程量清单");
|
||||||
|
// }
|
||||||
|
// List<BusBillofquantities> list = busBillofquantitiesService.list(Wrappers.<BusBillofquantities>lambdaQuery()
|
||||||
|
// .eq(BusBillofquantities::getVersions, one.getVersions())
|
||||||
|
// );
|
||||||
|
//
|
||||||
|
// return R.ok(list);
|
||||||
|
// }
|
||||||
|
}
|
||||||
@ -42,6 +42,10 @@ public class BusPlanDocAssociationBo extends BaseEntity {
|
|||||||
* 采购联系单id
|
* 采购联系单id
|
||||||
*/
|
*/
|
||||||
private Long docId;
|
private Long docId;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Long suppliespriceId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 需求数量
|
* 需求数量
|
||||||
|
|||||||
@ -0,0 +1,16 @@
|
|||||||
|
package org.dromara.cailiaoshebei.domain.bo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class RemainingReq implements Serializable {
|
||||||
|
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
private String limitListId;
|
||||||
|
|
||||||
|
private Long mrpBaseId;
|
||||||
|
}
|
||||||
@ -140,4 +140,12 @@ public class BusMaterialbatchdemandplanVo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private BigDecimal remaining;
|
private BigDecimal remaining;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商提供数量
|
||||||
|
*/
|
||||||
|
private BigDecimal tenderQuantity;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -86,5 +86,5 @@ public interface IBusMrpBaseService extends IService<BusMrpBase>{
|
|||||||
/**
|
/**
|
||||||
* 获取物资已有数量
|
* 获取物资已有数量
|
||||||
*/
|
*/
|
||||||
Map<String, Object> remaining(Long projectId, String suppliespriceName, String specification, Long mrpBaseId);
|
Map<String, Object> remaining(Long projectId,Long limitListId,Long mrpBaseId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,10 +24,13 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.dromara.design.domain.BusBillofquantities;
|
import org.dromara.design.domain.BusBillofquantities;
|
||||||
import org.dromara.design.service.IBusBillofquantitiesService;
|
import org.dromara.design.service.IBusBillofquantitiesService;
|
||||||
|
import org.dromara.tender.domain.BusBillofquantitiesLimitList;
|
||||||
import org.dromara.tender.domain.bo.BusBiddingPlanBo;
|
import org.dromara.tender.domain.bo.BusBiddingPlanBo;
|
||||||
import org.dromara.tender.domain.vo.BusBiddingPlanVo;
|
import org.dromara.tender.domain.vo.BusBiddingPlanVo;
|
||||||
import org.dromara.tender.domain.vo.BusBillofquantitiesLimitListVo;
|
import org.dromara.tender.domain.vo.BusBillofquantitiesLimitListVo;
|
||||||
|
import org.dromara.tender.domain.vo.BusTenderPlanningLimitListVo;
|
||||||
import org.dromara.tender.service.IBusBiddingPlanService;
|
import org.dromara.tender.service.IBusBiddingPlanService;
|
||||||
|
import org.dromara.tender.service.IBusBillofquantitiesLimitListService;
|
||||||
import org.dromara.tender.service.ITenderSupplierInputService;
|
import org.dromara.tender.service.ITenderSupplierInputService;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -41,6 +44,7 @@ import org.dromara.cailiaoshebei.mapper.BusMaterialbatchdemandplanMapper;
|
|||||||
import org.dromara.cailiaoshebei.service.IBusMaterialbatchdemandplanService;
|
import org.dromara.cailiaoshebei.service.IBusMaterialbatchdemandplanService;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -72,6 +76,9 @@ public class BusMaterialbatchdemandplanServiceImpl extends ServiceImpl<BusMateri
|
|||||||
@Lazy
|
@Lazy
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBusBillofquantitiesService busBillofquantitiesService;
|
private IBusBillofquantitiesService busBillofquantitiesService;
|
||||||
|
@Lazy
|
||||||
|
@Autowired
|
||||||
|
private IBusBillofquantitiesLimitListService busBillofquantitiesLimitListService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询物资-批次需求计划
|
* 查询物资-批次需求计划
|
||||||
@ -101,22 +108,26 @@ public class BusMaterialbatchdemandplanServiceImpl extends ServiceImpl<BusMateri
|
|||||||
bo1.setType("3");
|
bo1.setType("3");
|
||||||
bo1.setWinningBidderId(bo.getSupplierId());
|
bo1.setWinningBidderId(bo.getSupplierId());
|
||||||
List<BusBillofquantitiesLimitListVo> busBiddingPlanVos = busBiddingPlanService.getBillofquantitiesLimitListVo(bo1);
|
List<BusBillofquantitiesLimitListVo> busBiddingPlanVos = busBiddingPlanService.getBillofquantitiesLimitListVo(bo1);
|
||||||
|
Map<Long, BigDecimal> map = busBiddingPlanService.getCailiaoCount(bo1);
|
||||||
if (busBiddingPlanVos == null || busBiddingPlanVos.isEmpty()) {
|
if (busBiddingPlanVos == null || busBiddingPlanVos.isEmpty()) {
|
||||||
throw new ServiceException("该供应商暂无材料");
|
throw new ServiceException("该供应商暂无材料");
|
||||||
}
|
}
|
||||||
Set<String> hashSet = new HashSet<>();
|
Set<Long> hashSet = new HashSet<>();
|
||||||
busBiddingPlanVos.stream().forEach(vo -> {
|
busBiddingPlanVos.forEach(vo -> {
|
||||||
hashSet.add(vo.getName()+"+"+vo.getSpecification());
|
hashSet.add(vo.getId());
|
||||||
});
|
});
|
||||||
List<BusMaterialbatchdemandplanVo> list = result.getRecords().stream().filter(vo -> {
|
result.getRecords().stream().filter(vo -> {
|
||||||
String key = vo.getName() + "+" + vo.getSpecification(); // 拼接字符串(需与 Set 中格式一致)
|
return hashSet.contains(vo.getSuppliespriceId()); // 仅保留 Set 中存在的数据
|
||||||
return hashSet.contains(key); // 仅保留 Set 中存在的数据
|
}).forEach(item->{
|
||||||
}).toList();
|
if (map.containsKey(item.getId())) {
|
||||||
result.setRecords(list);
|
item.setTenderQuantity(map.get(item.getId()));
|
||||||
}
|
}
|
||||||
result.getRecords().stream().forEach(vo -> {
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
result.getRecords().forEach(vo -> {
|
||||||
if (vo.getSuppliespricePid() != null){
|
if (vo.getSuppliespricePid() != null){
|
||||||
BusBillofquantities billofquantities = busBillofquantitiesService.getById(vo.getSuppliespricePid());
|
BusBillofquantitiesLimitList billofquantities = busBillofquantitiesLimitListService.getById(vo.getSuppliespricePid());
|
||||||
vo.setSuppliespricePname(billofquantities.getName());
|
vo.setSuppliespricePname(billofquantities.getName());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -29,6 +29,10 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import org.dromara.common.utils.excel.ExcelDynamicReader;
|
import org.dromara.common.utils.excel.ExcelDynamicReader;
|
||||||
import org.dromara.design.domain.BusBillofquantities;
|
import org.dromara.design.domain.BusBillofquantities;
|
||||||
import org.dromara.design.service.IBusBillofquantitiesService;
|
import org.dromara.design.service.IBusBillofquantitiesService;
|
||||||
|
import org.dromara.tender.domain.BusBillofquantitiesLimitList;
|
||||||
|
import org.dromara.tender.domain.BusTenderPlanningLimitList;
|
||||||
|
import org.dromara.tender.service.IBusBillofquantitiesLimitListService;
|
||||||
|
import org.dromara.tender.service.IBusTenderPlanningLimitListService;
|
||||||
import org.springframework.context.event.EventListener;
|
import org.springframework.context.event.EventListener;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.dromara.cailiaoshebei.domain.bo.BusMrpBaseBo;
|
import org.dromara.cailiaoshebei.domain.bo.BusMrpBaseBo;
|
||||||
@ -57,7 +61,10 @@ public class BusMrpBaseServiceImpl extends ServiceImpl<BusMrpBaseMapper, BusMrpB
|
|||||||
|
|
||||||
private final IBusMaterialbatchdemandplanService planservice;
|
private final IBusMaterialbatchdemandplanService planservice;
|
||||||
|
|
||||||
private final IBusBillofquantitiesService busBillofquantitiesService;
|
private final IBusBillofquantitiesLimitListService busBillofquantitiesService;
|
||||||
|
|
||||||
|
private final IBusTenderPlanningLimitListService tenderPlanningLimitListService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -75,7 +82,7 @@ public class BusMrpBaseServiceImpl extends ServiceImpl<BusMrpBaseMapper, BusMrpB
|
|||||||
planBo.setMrpBaseId(id);
|
planBo.setMrpBaseId(id);
|
||||||
List<BusMaterialbatchdemandplanVo> voList = planservice.queryList(planBo);
|
List<BusMaterialbatchdemandplanVo> voList = planservice.queryList(planBo);
|
||||||
for (BusMaterialbatchdemandplanVo vo : voList) {
|
for (BusMaterialbatchdemandplanVo vo : voList) {
|
||||||
Map<String, Object> map = remaining(vo.getProjectId(),vo.getName(), vo.getSpecification(), id);
|
Map<String, Object> map = remaining(vo.getProjectId(), vo.getSuppliespriceId(), id);
|
||||||
vo.setRemaining(Convert.toBigDecimal(map.get("remainingQuantity")));
|
vo.setRemaining(Convert.toBigDecimal(map.get("remainingQuantity")));
|
||||||
}
|
}
|
||||||
busMrpVo.setMrpBaseBo(busMrpBaseVo);
|
busMrpVo.setMrpBaseBo(busMrpBaseVo);
|
||||||
@ -190,14 +197,13 @@ public class BusMrpBaseServiceImpl extends ServiceImpl<BusMrpBaseMapper, BusMrpB
|
|||||||
|
|
||||||
if (CollectionUtil.isNotEmpty(dto.getPlanList())) {
|
if (CollectionUtil.isNotEmpty(dto.getPlanList())) {
|
||||||
// 按 suppliespriceId 分组统计本次提交的数量
|
// 按 suppliespriceId 分组统计本次提交的数量
|
||||||
Map<String, BigDecimal> batchSumMap = dto.getPlanList().stream()
|
// String name = item.getName() != null ? item.getName() : "";
|
||||||
|
// String spec = item.getSpecification() != null ? item.getSpecification() : "";
|
||||||
|
// return name + "&&&" + spec;
|
||||||
|
Map<Long, BigDecimal> batchSumMap = dto.getPlanList().stream()
|
||||||
.collect(Collectors.groupingBy(
|
.collect(Collectors.groupingBy(
|
||||||
// 关键修改:使用 name + specification 拼接作为分组键
|
// 关键修改:使用 name + specification 拼接作为分组键
|
||||||
item -> {
|
BusMaterialbatchdemandplanBo::getSuppliespriceId,
|
||||||
String name = item.getName() != null ? item.getName() : "";
|
|
||||||
String spec = item.getSpecification() != null ? item.getSpecification() : "";
|
|
||||||
return name + "&&&" + spec;
|
|
||||||
},
|
|
||||||
Collectors.reducing(
|
Collectors.reducing(
|
||||||
BigDecimal.ZERO,
|
BigDecimal.ZERO,
|
||||||
item -> {
|
item -> {
|
||||||
@ -209,45 +215,36 @@ public class BusMrpBaseServiceImpl extends ServiceImpl<BusMrpBaseMapper, BusMrpB
|
|||||||
));
|
));
|
||||||
|
|
||||||
// 检查每种物料是否超出数量限制
|
// 检查每种物料是否超出数量限制
|
||||||
for (Map.Entry<String, BigDecimal> entry : batchSumMap.entrySet()) {
|
for (Map.Entry<Long, BigDecimal> entry : batchSumMap.entrySet()) {
|
||||||
String biaoshi = entry.getKey();
|
Long biaoshi = entry.getKey();
|
||||||
BigDecimal batchSum = entry.getValue();
|
BigDecimal batchSum = entry.getValue();
|
||||||
String[] split = biaoshi.split("&&&");
|
|
||||||
// 获取数据库中已有的数量
|
// 获取数据库中已有的数量
|
||||||
List<BusMaterialbatchdemandplan> existingList = planservice.list(
|
List<BusMaterialbatchdemandplan> existingList = planservice.list(
|
||||||
Wrappers.lambdaQuery(BusMaterialbatchdemandplan.class)
|
Wrappers.lambdaQuery(BusMaterialbatchdemandplan.class)
|
||||||
.eq(BusMaterialbatchdemandplan::getName, split[0])
|
.eq(BusMaterialbatchdemandplan::getSuppliespriceId, biaoshi)
|
||||||
.eq(BusMaterialbatchdemandplan::getSpecification,split[1])
|
|
||||||
.ne(BusMaterialbatchdemandplan::getMrpBaseId, convert.getId()) // 排除当前批次
|
.ne(BusMaterialbatchdemandplan::getMrpBaseId, convert.getId()) // 排除当前批次
|
||||||
);
|
);
|
||||||
|
//计算数据库保存数量
|
||||||
BigDecimal existingSum = existingList.stream()
|
BigDecimal existingSum = existingList.stream()
|
||||||
.map(BusMaterialbatchdemandplan::getDemandQuantity)
|
.map(BusMaterialbatchdemandplan::getDemandQuantity)
|
||||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
|
||||||
// 检查总数量是否超出限制
|
// 检查总数量是否超出限制
|
||||||
List<BusBillofquantities> busBillofquantities = busBillofquantitiesService.getBaseMapper().selectList(new LambdaQueryWrapper<BusBillofquantities>()
|
List<BusTenderPlanningLimitList> busTenderPlanningLimitLists = tenderPlanningLimitListService.getBaseMapper()
|
||||||
.eq(BusBillofquantities::getProjectId, dto.getMrpBaseBo().getProjectId())
|
.selectList(new LambdaQueryWrapper<BusTenderPlanningLimitList>()
|
||||||
.eq(BusBillofquantities::getName, split[0])
|
.eq(BusTenderPlanningLimitList::getLimitListId, biaoshi));
|
||||||
.eq(BusBillofquantities::getSpecification, split[1]));
|
BigDecimal quantity = busTenderPlanningLimitLists.stream()
|
||||||
BigDecimal quantity = busBillofquantities.stream()
|
.map(BusTenderPlanningLimitList::getNum)
|
||||||
.map(BusBillofquantities::getQuantity)
|
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
if (existingSum.add(batchSum).compareTo(quantity) > 0) {
|
if (existingSum.add(batchSum).compareTo(quantity) > 0) {
|
||||||
// 找到超出限制的物料名称用于提示
|
// 找到超出限制的物料名称用于提示
|
||||||
String itemName = dto.getPlanList().stream()
|
String itemName = dto.getPlanList().stream()
|
||||||
.filter(item -> {
|
.filter(item -> Objects.equals(biaoshi, item.getSuppliespriceId()))
|
||||||
String name = item.getName() != null ? item.getName() : "";
|
|
||||||
String spec = item.getSpecification() != null ? item.getSpecification() : "";
|
|
||||||
return (name + "&&&" + spec).equals(biaoshi);
|
|
||||||
|
|
||||||
})
|
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.map(item -> {
|
.map(item -> {
|
||||||
String name = item.getName() != null ? item.getName() : "";
|
String name = item.getName() != null ? item.getName() : "";
|
||||||
String spec = item.getSpecification() != null ? item.getSpecification() : "";
|
return "名称:“"+name + "”";
|
||||||
return "名称:“"+name + "”,规格:“" + spec+"”";
|
|
||||||
})
|
})
|
||||||
.orElse("未知物料");
|
.orElse("未知物料");
|
||||||
throw new ServiceException(itemName + "超出数量");
|
throw new ServiceException(itemName + "超出数量");
|
||||||
@ -257,11 +254,11 @@ public class BusMrpBaseServiceImpl extends ServiceImpl<BusMrpBaseMapper, BusMrpB
|
|||||||
// 转换并保存数据
|
// 转换并保存数据
|
||||||
List<BusMaterialbatchdemandplan> plans = MapstructUtils.convert(dto.getPlanList(), BusMaterialbatchdemandplan.class);
|
List<BusMaterialbatchdemandplan> plans = MapstructUtils.convert(dto.getPlanList(), BusMaterialbatchdemandplan.class);
|
||||||
plans.forEach(item -> {
|
plans.forEach(item -> {
|
||||||
// BusBillofquantities byId = busBillofquantitiesService.getById(item.getSuppliespriceId());
|
BusBillofquantitiesLimitList byId = busBillofquantitiesService.getById(item.getSuppliespriceId());
|
||||||
// if (!"0".equals(byId.getPid())) {
|
if (!"0".equals(byId.getPid())) {
|
||||||
// BusBillofquantities one = busBillofquantitiesService.getOne(new LambdaQueryWrapper<BusBillofquantities>().eq(BusBillofquantities::getSid, byId.getPid()));
|
BusBillofquantitiesLimitList one = busBillofquantitiesService.getOne(new LambdaQueryWrapper<BusBillofquantitiesLimitList>().eq(BusBillofquantitiesLimitList::getSid, byId.getPid()));
|
||||||
// item.setSuppliespricePid(one.getId());
|
item.setSuppliespricePid(one.getId());
|
||||||
// }
|
}
|
||||||
item.setMrpBaseId(convert.getId());
|
item.setMrpBaseId(convert.getId());
|
||||||
item.setProjectId(convert.getProjectId());
|
item.setProjectId(convert.getProjectId());
|
||||||
});
|
});
|
||||||
@ -297,23 +294,21 @@ public class BusMrpBaseServiceImpl extends ServiceImpl<BusMrpBaseMapper, BusMrpB
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> remaining(Long projectId, String suppliespriceName, String specification, Long mrpBaseId) {
|
public Map<String, Object> remaining(Long projectId, Long limitListId,Long mrpBaseId) {
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
List<BusBillofquantities> busBillofquantities = busBillofquantitiesService.getBaseMapper()
|
List<BusTenderPlanningLimitList> busTenderPlanningLimitLists = tenderPlanningLimitListService.getBaseMapper()
|
||||||
.selectList(new LambdaQueryWrapper<BusBillofquantities>()
|
.selectList(new LambdaQueryWrapper<BusTenderPlanningLimitList>()
|
||||||
.eq(BusBillofquantities::getProjectId, projectId)
|
.eq(BusTenderPlanningLimitList::getLimitListId, limitListId));
|
||||||
.eq(BusBillofquantities::getName, suppliespriceName)
|
BigDecimal quantity = busTenderPlanningLimitLists.stream()
|
||||||
.eq(BusBillofquantities::getSpecification,specification));
|
.map(BusTenderPlanningLimitList::getNum)
|
||||||
BigDecimal quantity = busBillofquantities.stream()
|
|
||||||
.map(BusBillofquantities::getQuantity)
|
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
// BusBillofquantities byId = busBillofquantitiesService.getById(suppliespriceId);
|
|
||||||
|
BusBillofquantitiesLimitList busBillofquantities = busBillofquantitiesService.getById(limitListId);
|
||||||
// 获取数据库中已有的数量
|
// 获取数据库中已有的数量
|
||||||
List<BusMaterialbatchdemandplan> existingList = planservice.list(
|
List<BusMaterialbatchdemandplan> existingList = planservice.list(
|
||||||
Wrappers.lambdaQuery(BusMaterialbatchdemandplan.class)
|
Wrappers.lambdaQuery(BusMaterialbatchdemandplan.class)
|
||||||
.eq(BusMaterialbatchdemandplan::getName, suppliespriceName)
|
.eq(BusMaterialbatchdemandplan::getSuppliespriceId ,limitListId)
|
||||||
.eq(BusMaterialbatchdemandplan::getSpecification ,specification)
|
|
||||||
.ne(mrpBaseId!=null,BusMaterialbatchdemandplan::getMrpBaseId, mrpBaseId)// 排除当前批次
|
.ne(mrpBaseId!=null,BusMaterialbatchdemandplan::getMrpBaseId, mrpBaseId)// 排除当前批次
|
||||||
);
|
);
|
||||||
BigDecimal reduce = BigDecimal.ZERO;
|
BigDecimal reduce = BigDecimal.ZERO;
|
||||||
@ -323,10 +318,11 @@ public class BusMrpBaseServiceImpl extends ServiceImpl<BusMrpBaseMapper, BusMrpB
|
|||||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
}
|
}
|
||||||
map.put("remainingQuantity",quantity.subtract(reduce));
|
map.put("remainingQuantity",quantity.subtract(reduce));
|
||||||
map.put("specification",busBillofquantities.getFirst().getSpecification());
|
map.put("specification",busBillofquantities.getSpecification());
|
||||||
map.put("unit",busBillofquantities.getFirst().getUnit());
|
map.put("suppliespriceId",limitListId);
|
||||||
map.put("remark",busBillofquantities.getFirst().getRemark());
|
map.put("unit",busBillofquantities.getUnit());
|
||||||
map.put("name",busBillofquantities.getFirst().getName());
|
map.put("remark",busBillofquantities.getRemark());
|
||||||
|
map.put("name",busBillofquantities.getName());
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -51,6 +51,8 @@ import org.dromara.project.domain.BusProject;
|
|||||||
import org.dromara.project.service.IBusProjectService;
|
import org.dromara.project.service.IBusProjectService;
|
||||||
import org.dromara.system.domain.vo.SysOssVo;
|
import org.dromara.system.domain.vo.SysOssVo;
|
||||||
import org.dromara.system.service.ISysOssService;
|
import org.dromara.system.service.ISysOssService;
|
||||||
|
import org.dromara.tender.domain.BusTenderPlanningLimitList;
|
||||||
|
import org.dromara.tender.service.IBusTenderPlanningLimitListService;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.context.event.EventListener;
|
import org.springframework.context.event.EventListener;
|
||||||
import org.springframework.scheduling.annotation.Async;
|
import org.springframework.scheduling.annotation.Async;
|
||||||
@ -98,6 +100,8 @@ public class BusPurchaseDocServiceImpl extends ServiceImpl<BusPurchaseDocMapper,
|
|||||||
|
|
||||||
private final ISysOssService ossService;
|
private final ISysOssService ossService;
|
||||||
|
|
||||||
|
private final IBusTenderPlanningLimitListService tenderPlanningLimitListService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询物资-采购联系单
|
* 查询物资-采购联系单
|
||||||
*
|
*
|
||||||
@ -187,7 +191,7 @@ public class BusPurchaseDocServiceImpl extends ServiceImpl<BusPurchaseDocMapper,
|
|||||||
|
|
||||||
BusPurchaseDoc add = MapstructUtils.convert(bo, BusPurchaseDoc.class);
|
BusPurchaseDoc add = MapstructUtils.convert(bo, BusPurchaseDoc.class);
|
||||||
validEntityBeforeSave(add);
|
validEntityBeforeSave(add);
|
||||||
validNum(bo.getAssociationList());
|
validNum(bo.getAssociationList(),add.getSupplierId());
|
||||||
boolean flag = baseMapper.insert(add) > 0;
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
if (flag) {
|
if (flag) {
|
||||||
bo.setId(add.getId());
|
bo.setId(add.getId());
|
||||||
@ -204,20 +208,65 @@ public class BusPurchaseDocServiceImpl extends ServiceImpl<BusPurchaseDocMapper,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void validNum(List<BusPlanDocAssociationBo> associationList) {
|
public void validNum(List<BusPlanDocAssociationBo> associationList, Long supplierId) {
|
||||||
|
|
||||||
for (BusPlanDocAssociationBo association : associationList) {
|
for (BusPlanDocAssociationBo association : associationList) {
|
||||||
|
|
||||||
BusMaterialbatchdemandplan byId = materialbatchdemandplanService.getById(association.getPlanId());
|
if(association.getDemandQuantity() == null){
|
||||||
|
throw new ServiceException("请填写需求数量");
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取批次需求计划
|
||||||
|
BusMaterialbatchdemandplan byId = materialbatchdemandplanService.getById(association.getPlanId());
|
||||||
|
List<String> statuss = new ArrayList<>();
|
||||||
|
statuss.add(BusinessStatusEnum.DRAFT.getStatus());
|
||||||
|
statuss.add(BusinessStatusEnum.FINISH.getStatus());
|
||||||
|
statuss.add(BusinessStatusEnum.WAITING.getStatus());
|
||||||
|
//查询处于草稿、待审核、已审核状态的联系单
|
||||||
|
List<Long> ids = new ArrayList<>();
|
||||||
|
//该供应商的联系单
|
||||||
|
List<Long> ids1 = new ArrayList<>();
|
||||||
|
for (BusPurchaseDoc busPurchaseDoc : baseMapper.selectList(new LambdaQueryWrapper<BusPurchaseDoc>().in(BusPurchaseDoc::getStatus, statuss))) {
|
||||||
|
ids.add(busPurchaseDoc.getId());
|
||||||
|
if (busPurchaseDoc.getSupplierId().equals(supplierId)) {
|
||||||
|
ids1.add(busPurchaseDoc.getId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
List<BusTenderPlanningLimitList> busTenderPlanningLimitLists = tenderPlanningLimitListService.getBaseMapper()
|
||||||
|
.selectList(new LambdaQueryWrapper<BusTenderPlanningLimitList>()
|
||||||
|
.eq(BusTenderPlanningLimitList::getLimitListId, association.getSuppliespriceId()));
|
||||||
|
BigDecimal quantity = busTenderPlanningLimitLists.stream()
|
||||||
|
.map(BusTenderPlanningLimitList::getNum)
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
//查询处于这些采购联系单
|
||||||
List<BusPlanDocAssociation> list = planDocAssociationService.list(Wrappers.lambdaQuery(BusPlanDocAssociation.class)
|
List<BusPlanDocAssociation> list = planDocAssociationService.list(Wrappers.lambdaQuery(BusPlanDocAssociation.class)
|
||||||
.eq(BusPlanDocAssociation::getPlanId, association.getPlanId()));
|
.eq(BusPlanDocAssociation::getPlanId, association.getPlanId())
|
||||||
|
.in(BusPlanDocAssociation::getDocId, ids));
|
||||||
|
List<BusMaterialbatchdemandplan> busMaterialbatchdemandplans = materialbatchdemandplanService.getBaseMapper().selectList(new LambdaQueryWrapper<BusMaterialbatchdemandplan>()
|
||||||
|
.eq(BusMaterialbatchdemandplan::getSuppliespriceId, association.getSuppliespriceId()));
|
||||||
|
Set<Long> planids = new HashSet<>();
|
||||||
|
busMaterialbatchdemandplans.forEach(busMaterialbatchdemandplan -> {
|
||||||
|
planids.add(busMaterialbatchdemandplan.getId());
|
||||||
|
});
|
||||||
|
if (!ids1.isEmpty()){
|
||||||
|
List<BusPlanDocAssociation> list1 = planDocAssociationService.list(Wrappers.lambdaQuery(BusPlanDocAssociation.class)
|
||||||
|
.in(BusPlanDocAssociation::getDocId, ids1));
|
||||||
|
//计算材料已存在的数量
|
||||||
|
BigDecimal cltotal = list1.stream()
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.filter(item->planids.contains(item.getPlanId()))
|
||||||
|
.map(BusPlanDocAssociation::getDemandQuantity)
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
if (cltotal.add(association.getDemandQuantity()).compareTo(quantity) > 0) {
|
||||||
|
throw new ServiceException("材料:" + byId.getName() + "已超出供应商提供数量");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//计算采购已存在的数量
|
||||||
BigDecimal total = list.stream()
|
BigDecimal total = list.stream()
|
||||||
.map(BusPlanDocAssociation::getDemandQuantity)
|
.map(BusPlanDocAssociation::getDemandQuantity)
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
|
||||||
|
|
||||||
if (total.add(association.getDemandQuantity()).compareTo(byId.getDemandQuantity()) > 0) {
|
if (total.add(association.getDemandQuantity()).compareTo(byId.getDemandQuantity()) > 0) {
|
||||||
throw new ServiceException("材料:" + byId.getName() + "已超出计划单的物料批次需求计划数量");
|
throw new ServiceException("材料:" + byId.getName() + "已超出计划单的物料批次需求计划数量");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,65 @@
|
|||||||
|
package org.dromara.common.enums;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
public enum AppUserTypeEnum {
|
||||||
|
|
||||||
|
|
||||||
|
SG("0", "施工人员", 2L),
|
||||||
|
BZZ("0", "施工人员(班组长)", 3L),
|
||||||
|
GL("1", "管理", 4L),
|
||||||
|
FB("2", "分包", 5L),
|
||||||
|
;
|
||||||
|
|
||||||
|
private final String type;
|
||||||
|
|
||||||
|
private final String value;
|
||||||
|
|
||||||
|
private final Long roleId;
|
||||||
|
|
||||||
|
AppUserTypeEnum(String type, String value,Long roleId) {
|
||||||
|
this.type = type;
|
||||||
|
this.value = value;
|
||||||
|
this.roleId = roleId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static final List<Long> ROLE_ID_LIST = Arrays.asList(SG.roleId, BZZ.roleId, FB.roleId, GL.roleId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* roleId获取枚举
|
||||||
|
*
|
||||||
|
* @param roleId 角色
|
||||||
|
* @return 枚举
|
||||||
|
*/
|
||||||
|
public static AppUserTypeEnum getByRoleId(Long roleId) {
|
||||||
|
for (AppUserTypeEnum value : AppUserTypeEnum.values()) {
|
||||||
|
if (value.getRoleId().equals(roleId)) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* type获取枚举
|
||||||
|
*
|
||||||
|
* @param type 类型
|
||||||
|
* @return 枚举
|
||||||
|
*/
|
||||||
|
public static AppUserTypeEnum getByType(String type) {
|
||||||
|
for (AppUserTypeEnum value : AppUserTypeEnum.values()) {
|
||||||
|
if (value.getType().equals(type)) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
package org.dromara.common.utils;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.dromara.common.core.utils.MessageUtils;
|
||||||
|
import org.dromara.common.sse.dto.SseMessageDto;
|
||||||
|
import org.dromara.common.sse.utils.SseMessageUtils;
|
||||||
|
import org.dromara.sms4j.api.SmsBlend;
|
||||||
|
import org.dromara.sms4j.api.entity.SmsResponse;
|
||||||
|
import org.dromara.sms4j.core.factory.SmsFactory;
|
||||||
|
import org.springframework.scheduling.annotation.Async;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
@Slf4j
|
||||||
|
public class AsyncUtil {
|
||||||
|
|
||||||
|
//发送短信
|
||||||
|
@Async
|
||||||
|
public void sendSms(List<String> mobileList, String config) {
|
||||||
|
SmsBlend smsBlend = SmsFactory.getSmsBlend(config);
|
||||||
|
for (String mobile : mobileList) {
|
||||||
|
SmsResponse smsResponse = smsBlend.sendMessage(mobile, new LinkedHashMap<String, String>());
|
||||||
|
if (!smsResponse.isSuccess()) {
|
||||||
|
log.error("验证码短信发送异常 => {}", smsResponse);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//发送sse
|
||||||
|
@Async
|
||||||
|
public void sendSse(List<Long> userId, String message) {
|
||||||
|
SseMessageDto sseMessageDto = new SseMessageDto();
|
||||||
|
sseMessageDto.setUserIds(userId);
|
||||||
|
sseMessageDto.setMessage(message);
|
||||||
|
SseMessageUtils.publishMessage(sseMessageDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,89 @@
|
|||||||
|
package org.dromara.common.utils.attendance;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.http.HttpUtil;
|
||||||
|
import com.alibaba.fastjson2.JSON;
|
||||||
|
import com.alibaba.fastjson2.JSONArray;
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.scheduling.annotation.Async;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
public class FaceUtil {
|
||||||
|
|
||||||
|
private static final String FACE_URL = "http://192.168.110.5:1224";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人脸记录 post
|
||||||
|
* @param name 姓名
|
||||||
|
* @param card 身份证
|
||||||
|
* @param path 人脸图片HTTP地址(需可公开访问)
|
||||||
|
*/
|
||||||
|
public static void createFaceRecord(String name, String card, String path) {
|
||||||
|
String url = FACE_URL+"/api/faces";
|
||||||
|
|
||||||
|
HashMap<String, Object> param = new HashMap<>() {{
|
||||||
|
put("name", name);
|
||||||
|
put("card", card);
|
||||||
|
put("path", path);
|
||||||
|
}};
|
||||||
|
HttpUtil.post(url, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人脸检测
|
||||||
|
* @param path 图片HTTP地址(需可公开访问)
|
||||||
|
*/
|
||||||
|
public static Map<String, String> faceDetect(String path) {
|
||||||
|
String url = FACE_URL+"/api/faces/detect";
|
||||||
|
|
||||||
|
HashMap<String, Object> param = new HashMap<>() {{
|
||||||
|
put("path", path);
|
||||||
|
put("similarity_threshold", 0.8);
|
||||||
|
}};
|
||||||
|
//转成json
|
||||||
|
|
||||||
|
String post = HttpUtil.post(url, param);
|
||||||
|
Map<String, String> map = new HashMap<>();
|
||||||
|
// 遍历检测到的人脸数据
|
||||||
|
try {
|
||||||
|
// 解析返回的JSON数据
|
||||||
|
JSONObject response = JSON.parseObject(post);
|
||||||
|
JSONObject data = response.getJSONObject("data");
|
||||||
|
JSONArray detectedFaces = data.getJSONArray("detected_faces");
|
||||||
|
|
||||||
|
for (int i = 0; i < detectedFaces.size(); i++) {
|
||||||
|
JSONObject face = detectedFaces.getJSONObject(i);
|
||||||
|
JSONObject matchInfo = face.getJSONObject("match_info");
|
||||||
|
|
||||||
|
// 检查相似度是否大于等于阈值
|
||||||
|
double similarity = matchInfo.getDoubleValue("similarity");
|
||||||
|
double threshold = matchInfo.getDoubleValue("threshold");
|
||||||
|
|
||||||
|
if (similarity >= threshold) {
|
||||||
|
// 提取用户信息
|
||||||
|
JSONObject userInfo = face.getJSONObject("user_info");
|
||||||
|
String name = userInfo.getString("name");
|
||||||
|
String idCard = userInfo.getString("id_card");
|
||||||
|
map.put(idCard, name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
log.error("人脸检测失败",e);
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
// Map<String, String> map = faceDetect("http://xny.yj-3d.com:9000/xinnengyuan-dev/2025/10/12/9688ce2474ad47e7bf59c641848cdf8f.jpg");
|
||||||
|
// System.out.println(map);
|
||||||
|
// createFaceRecord("石志强","513022111145632652","http://xny.yj-3d.com:9000/xinnengyuan-dev/2025/10/12/9688ce2474ad47e7bf59c641848cdf8f.jpg");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -3,7 +3,6 @@ package org.dromara.contractor.controller.app;
|
|||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import org.dromara.common.core.domain.R;
|
import org.dromara.common.core.domain.R;
|
||||||
import org.dromara.common.core.validate.AddGroup;
|
|
||||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
import org.dromara.common.log.annotation.Log;
|
import org.dromara.common.log.annotation.Log;
|
||||||
import org.dromara.common.log.enums.BusinessType;
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
@ -136,7 +135,7 @@ public class SubConstructionUserAppController {
|
|||||||
@Log(title = "施工人员", businessType = BusinessType.OTHER)
|
@Log(title = "施工人员", businessType = BusinessType.OTHER)
|
||||||
@PostMapping("/face/comparison")
|
@PostMapping("/face/comparison")
|
||||||
public R<Boolean> faceComparison(@RequestParam("file") MultipartFile file) {
|
public R<Boolean> faceComparison(@RequestParam("file") MultipartFile file) {
|
||||||
return R.ok(constructionUserService.faceComparison(file));
|
return R.ok(constructionUserService.faceComparison(file,null ));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package org.dromara.contractor.domain;
|
package org.dromara.contractor.domain;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
@ -204,4 +205,10 @@ public class SubConstructionUser extends BaseEntity {
|
|||||||
private Long goId;
|
private Long goId;
|
||||||
|
|
||||||
private String goOpenid;
|
private String goOpenid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标志(0代表存在 1代表删除)
|
||||||
|
*/
|
||||||
|
@TableLogic
|
||||||
|
private String delFlag;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,6 @@ public class SubContractorCreateReq implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 供应商id
|
* 供应商id
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "供应商不能为空")
|
|
||||||
private Long supplierId;
|
private Long supplierId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -214,9 +214,10 @@ public interface ISubConstructionUserService extends IService<SubConstructionUse
|
|||||||
* 人脸识别
|
* 人脸识别
|
||||||
*
|
*
|
||||||
* @param file 图片文件
|
* @param file 图片文件
|
||||||
|
* @param userId
|
||||||
* @return 是否匹配成功
|
* @return 是否匹配成功
|
||||||
*/
|
*/
|
||||||
Boolean faceComparison(MultipartFile file);
|
Boolean faceComparison(MultipartFile file, Long userId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据系统用户id查询施工人员
|
* 根据系统用户id查询施工人员
|
||||||
@ -236,4 +237,12 @@ public interface ISubConstructionUserService extends IService<SubConstructionUse
|
|||||||
TableDataInfo<SubConstructionUserAppVo> queryUndistributedList(SubConstructionUserQueryReq req, PageQuery pageQuery);
|
TableDataInfo<SubConstructionUserAppVo> queryUndistributedList(SubConstructionUserQueryReq req, PageQuery pageQuery);
|
||||||
|
|
||||||
void deleteeBySysUserIds( List<Long> ids);
|
void deleteeBySysUserIds( List<Long> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据系统用户id查询施工人员
|
||||||
|
*
|
||||||
|
* @param sysUserId 系统用户id
|
||||||
|
* @return 施工人员
|
||||||
|
*/
|
||||||
|
SubConstructionUser getByUserId(Long sysUserId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,6 +19,7 @@ import org.dromara.common.core.exception.ServiceException;
|
|||||||
import org.dromara.common.core.utils.DateUtils;
|
import org.dromara.common.core.utils.DateUtils;
|
||||||
import org.dromara.common.core.utils.ObjectUtils;
|
import org.dromara.common.core.utils.ObjectUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
|
import org.dromara.common.enums.AppUserTypeEnum;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import org.dromara.common.oss.core.OssClient;
|
import org.dromara.common.oss.core.OssClient;
|
||||||
@ -76,6 +77,8 @@ import java.time.temporal.ChronoUnit;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import static org.dromara.project.domain.enums.BusAttendanceClockStatusEnum.ATTENDANCE_LIST;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 施工人员Service业务层处理
|
* 施工人员Service业务层处理
|
||||||
*
|
*
|
||||||
@ -180,15 +183,15 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
if ("2".equals(appUserType)) {
|
if ("2".equals(appUserType)) {
|
||||||
List<BusProjectTeamAppVo> byUserId = projectTeamService.getByUserId(userId, req.getProjectId());
|
List<BusProjectTeamAppVo> byUserId = projectTeamService.getByUserId(userId, req.getProjectId());
|
||||||
|
|
||||||
if(CollectionUtil.isEmpty(byUserId)){
|
if (CollectionUtil.isEmpty(byUserId)) {
|
||||||
return new TableDataInfo<>();
|
return TableDataInfo.build(new ArrayList<>());
|
||||||
}
|
}
|
||||||
list1 = byUserId.stream().map(BusProjectTeamAppVo::getId).toList();
|
list1 = byUserId.stream().map(BusProjectTeamAppVo::getId).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询数据库
|
// 查询数据库
|
||||||
LambdaQueryWrapper<SubConstructionUser> wrapper = this.buildQueryWrapper(req);
|
LambdaQueryWrapper<SubConstructionUser> wrapper = this.buildQueryWrapper(req);
|
||||||
wrapper.in(req.getTeamId() == null && "2".equals(appUserType), SubConstructionUser::getTeamId,list1);
|
wrapper.in(req.getTeamId() == null && "2".equals(appUserType), SubConstructionUser::getTeamId, list1);
|
||||||
wrapper.eq(SubConstructionUser::getUserRole, "0");
|
wrapper.eq(SubConstructionUser::getUserRole, "0");
|
||||||
Page<SubConstructionUser> result = this.page(pageQuery.build(), wrapper);
|
Page<SubConstructionUser> result = this.page(pageQuery.build(), wrapper);
|
||||||
return TableDataInfo.build(getVoPage(result));
|
return TableDataInfo.build(getVoPage(result));
|
||||||
@ -230,14 +233,14 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean allocate(AllocateDto dto) {
|
public Boolean allocate(AllocateDto dto) {
|
||||||
SubConstructionUser constructionUser = baseMapper.selectById(dto.getId());
|
SubConstructionUser constructionUser = baseMapper.selectById(dto.getId());
|
||||||
if(constructionUser == null){
|
if (constructionUser == null) {
|
||||||
throw new ServiceException("施工人员信息不存在", HttpStatus.ERROR);
|
throw new ServiceException("施工人员信息不存在", HttpStatus.ERROR);
|
||||||
}
|
}
|
||||||
constructionUser.setProjectId(dto.getProjectId());
|
constructionUser.setProjectId(dto.getProjectId());
|
||||||
constructionUser.setContractorId(dto.getContractorId());
|
constructionUser.setContractorId(dto.getContractorId());
|
||||||
|
|
||||||
BusProjectTeam team = projectTeamService.getById(dto.getTeamId());
|
BusProjectTeam team = projectTeamService.getById(dto.getTeamId());
|
||||||
if(team == null){
|
if (team == null) {
|
||||||
throw new ServiceException("班组信息不存在", HttpStatus.ERROR);
|
throw new ServiceException("班组信息不存在", HttpStatus.ERROR);
|
||||||
}
|
}
|
||||||
constructionUser.setTeamId(dto.getTeamId());
|
constructionUser.setTeamId(dto.getTeamId());
|
||||||
@ -274,7 +277,7 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
userRoleMapper.delete(Wrappers.<SysUserRole>lambdaQuery()
|
userRoleMapper.delete(Wrappers.<SysUserRole>lambdaQuery()
|
||||||
.eq(SysUserRole::getUserId, constructionUser.getSysUserId())
|
.eq(SysUserRole::getUserId, constructionUser.getSysUserId())
|
||||||
.eq(SysUserRole::getProjectId, dto.getProjectId())
|
.eq(SysUserRole::getProjectId, dto.getProjectId())
|
||||||
.in(SysUserRole::getRoleId, Arrays.asList(2L, 3L))
|
.in(SysUserRole::getRoleId, AppUserTypeEnum.ROLE_ID_LIST)
|
||||||
);
|
);
|
||||||
//再添加分配角色
|
//再添加分配角色
|
||||||
Long roleId = "0".equals(dto.getPostId()) ? 2L : 3L;
|
Long roleId = "0".equals(dto.getPostId()) ? 2L : 3L;
|
||||||
@ -287,7 +290,7 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
//强退
|
//强退
|
||||||
roleService.cleanOnlineUser(Collections.singletonList(constructionUser.getSysUserId()));
|
roleService.cleanOnlineUser(Collections.singletonList(constructionUser.getSysUserId()));
|
||||||
|
|
||||||
return i>0;
|
return i > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -853,7 +856,7 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
String decrypt = constructionUserVo.getSfzNumber();
|
String decrypt = constructionUserVo.getSfzNumber();
|
||||||
try {
|
try {
|
||||||
decrypt = idCardEncryptorUtil.decrypt(constructionUserVo.getSfzNumber());
|
decrypt = idCardEncryptorUtil.decrypt(constructionUserVo.getSfzNumber());
|
||||||
}catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("身份证号码解密失败", e);
|
log.error("身份证号码解密失败", e);
|
||||||
}
|
}
|
||||||
constructionUserVo.setSfzNumber(decrypt);
|
constructionUserVo.setSfzNumber(decrypt);
|
||||||
@ -1064,7 +1067,7 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
constructionUserVo.setPostId(one.getPostId());
|
constructionUserVo.setPostId(one.getPostId());
|
||||||
}
|
}
|
||||||
|
|
||||||
}else {
|
} else {
|
||||||
constructionUserVo.setTeamName(null);
|
constructionUserVo.setTeamName(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1084,18 +1087,7 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
@Override
|
@Override
|
||||||
public Page<SubConstructionUserAttendanceTotalVo> getAttendanceTotalVoPage(SubConstructionUserAttendanceQueryReq req,
|
public Page<SubConstructionUserAttendanceTotalVo> getAttendanceTotalVoPage(SubConstructionUserAttendanceQueryReq req,
|
||||||
PageQuery pageQuery) {
|
PageQuery pageQuery) {
|
||||||
LambdaQueryWrapper<SubConstructionUser> lqw = Wrappers.lambdaQuery();
|
|
||||||
// 从对象中取值
|
|
||||||
String userName = req.getUserName();
|
|
||||||
Long projectId = req.getProjectId();
|
|
||||||
Long teamId = req.getTeamId();
|
|
||||||
String typeOfWork = req.getTypeOfWork();
|
|
||||||
String clockMonth = req.getClockDate();
|
String clockMonth = req.getClockDate();
|
||||||
// 联表查询
|
|
||||||
LambdaQueryWrapper<BusAttendance> attendanceLqw = Wrappers.lambdaQuery(BusAttendance.class)
|
|
||||||
.eq(BusAttendance::getProjectId, projectId);
|
|
||||||
if (ObjectUtils.isNotEmpty(clockMonth)) {
|
|
||||||
// 校验月份格式
|
|
||||||
if (!DateConstant.YEAR_MONTH_PATTERN.matcher(clockMonth).matches()) {
|
if (!DateConstant.YEAR_MONTH_PATTERN.matcher(clockMonth).matches()) {
|
||||||
throw new ServiceException("月份格式不正确", HttpStatus.BAD_REQUEST);
|
throw new ServiceException("月份格式不正确", HttpStatus.BAD_REQUEST);
|
||||||
}
|
}
|
||||||
@ -1108,13 +1100,38 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
// 计算当月第一天 / 最后一天
|
// 计算当月第一天 / 最后一天
|
||||||
LocalDate start = yearMonth.atDay(1);
|
LocalDate start = yearMonth.atDay(1);
|
||||||
LocalDate end = yearMonth.atEndOfMonth();
|
LocalDate end = yearMonth.atEndOfMonth();
|
||||||
attendanceLqw.between(BusAttendance::getClockDate, start, end);
|
|
||||||
List<Long> userIdList = attendanceService.list(attendanceLqw)
|
LambdaQueryWrapper<SubConstructionUser> lqw = Wrappers.lambdaQuery();
|
||||||
.stream().map(BusAttendance::getUserId).toList();
|
// 从对象中取值
|
||||||
if (CollUtil.isNotEmpty(userIdList)) {
|
String userName = req.getUserName();
|
||||||
lqw.in(SubConstructionUser::getSysUserId, userIdList);
|
Long projectId = req.getProjectId();
|
||||||
}
|
Long teamId = req.getTeamId();
|
||||||
}
|
String typeOfWork = req.getTypeOfWork();
|
||||||
|
|
||||||
|
// 联表查询
|
||||||
|
LambdaQueryWrapper<BusAttendance> attendanceLqw = Wrappers.lambdaQuery(BusAttendance.class)
|
||||||
|
.eq(BusAttendance::getProjectId, projectId);
|
||||||
|
// if (ObjectUtils.isNotEmpty(clockMonth)) {
|
||||||
|
// // 校验月份格式
|
||||||
|
// if (!DateConstant.YEAR_MONTH_PATTERN.matcher(clockMonth).matches()) {
|
||||||
|
// throw new ServiceException("月份格式不正确", HttpStatus.BAD_REQUEST);
|
||||||
|
// }
|
||||||
|
// // 解析月份
|
||||||
|
// YearMonth yearMonth = YearMonth.parse(clockMonth);
|
||||||
|
// // 判断是否大于当前月份
|
||||||
|
// if (yearMonth.isAfter(YearMonth.now())) {
|
||||||
|
// throw new ServiceException("不能查看大于当前月份的记录", HttpStatus.BAD_REQUEST);
|
||||||
|
// }
|
||||||
|
// // 计算当月第一天 / 最后一天
|
||||||
|
// LocalDate start = yearMonth.atDay(1);
|
||||||
|
// LocalDate end = yearMonth.atEndOfMonth();
|
||||||
|
// attendanceLqw.between(BusAttendance::getClockDate, start, end);
|
||||||
|
// List<Long> userIdList = attendanceService.list(attendanceLqw)
|
||||||
|
// .stream().map(BusAttendance::getUserId).toList();
|
||||||
|
// if (CollUtil.isNotEmpty(userIdList)) {
|
||||||
|
// lqw.in(SubConstructionUser::getSysUserId, userIdList);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
// 模糊查询
|
// 模糊查询
|
||||||
lqw.like(StringUtils.isNotBlank(userName), SubConstructionUser::getUserName, userName);
|
lqw.like(StringUtils.isNotBlank(userName), SubConstructionUser::getUserName, userName);
|
||||||
// 精确查询
|
// 精确查询
|
||||||
@ -1129,6 +1146,7 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
}
|
}
|
||||||
//只查施工人员
|
//只查施工人员
|
||||||
lqw.eq(SubConstructionUser::getUserRole, "0");
|
lqw.eq(SubConstructionUser::getUserRole, "0");
|
||||||
|
lqw.isNotNull(SubConstructionUser::getTeamId);
|
||||||
// 分页查询获取数据
|
// 分页查询获取数据
|
||||||
Page<SubConstructionUser> constructionUserPage = this.page(pageQuery.build(), lqw);
|
Page<SubConstructionUser> constructionUserPage = this.page(pageQuery.build(), lqw);
|
||||||
List<SubConstructionUser> constructionUserList = constructionUserPage.getRecords();
|
List<SubConstructionUser> constructionUserList = constructionUserPage.getRecords();
|
||||||
@ -1143,6 +1161,7 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
List<Long> userIdList = constructionUserList.stream().map(SubConstructionUser::getSysUserId).toList();
|
List<Long> userIdList = constructionUserList.stream().map(SubConstructionUser::getSysUserId).toList();
|
||||||
// 关联查询施工人员考勤列表
|
// 关联查询施工人员考勤列表
|
||||||
attendanceLqw.in(BusAttendance::getUserId, userIdList);
|
attendanceLqw.in(BusAttendance::getUserId, userIdList);
|
||||||
|
attendanceLqw.between(BusAttendance::getClockDate, start, end);
|
||||||
Map<Long, List<BusAttendance>> userIdBusAttendanceListMap = attendanceService.list(attendanceLqw)
|
Map<Long, List<BusAttendance>> userIdBusAttendanceListMap = attendanceService.list(attendanceLqw)
|
||||||
.stream().collect(Collectors.groupingBy(BusAttendance::getUserId));
|
.stream().collect(Collectors.groupingBy(BusAttendance::getUserId));
|
||||||
// 填充信息
|
// 填充信息
|
||||||
@ -1194,8 +1213,12 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
unClockDays++;
|
unClockDays++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ((clockInStatus != null && ATTENDANCE_LIST.contains(clockInStatus))
|
||||||
|
|| (clockOutStatus != null && ATTENDANCE_LIST.contains(clockOutStatus))) {
|
||||||
|
attendanceDays++;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
attendanceDays = dailyMap.size() - leaveDays;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
constructionUserAttendanceTotalResp.setAttendanceDays(attendanceDays);
|
constructionUserAttendanceTotalResp.setAttendanceDays(attendanceDays);
|
||||||
@ -1261,12 +1284,12 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
vo.setGender(wordsResult.getGender() != null ? wordsResult.getGender().getWords() : "");
|
vo.setGender(wordsResult.getGender() != null ? wordsResult.getGender().getWords() : "");
|
||||||
vo.setImage(upload);
|
vo.setImage(upload);
|
||||||
} else {
|
} else {
|
||||||
if (wordsResult.getExpiryDate() != null ) {
|
if (wordsResult.getExpiryDate() != null) {
|
||||||
vo.setExpiryDate(wordsResult.getExpiryDate().getWords());
|
vo.setExpiryDate(wordsResult.getExpiryDate().getWords());
|
||||||
if ("长期".equals(wordsResult.getExpiryDate().getWords())) {
|
if ("长期".equals(wordsResult.getExpiryDate().getWords())) {
|
||||||
vo.setExpiryDate("99991231");
|
vo.setExpiryDate("99991231");
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
vo.setExpiryDate("");
|
vo.setExpiryDate("");
|
||||||
}
|
}
|
||||||
vo.setIssuingAuthority(wordsResult.getIssuingAuthority() != null ? wordsResult.getIssuingAuthority().getWords() : "");
|
vo.setIssuingAuthority(wordsResult.getIssuingAuthority() != null ? wordsResult.getIssuingAuthority().getWords() : "");
|
||||||
@ -1372,6 +1395,7 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
SysUserBo sysUserBo = new SysUserBo();
|
SysUserBo sysUserBo = new SysUserBo();
|
||||||
sysUserBo.setUserId(userId);
|
sysUserBo.setUserId(userId);
|
||||||
sysUserBo.setNickName(user.getUserName());
|
sysUserBo.setNickName(user.getUserName());
|
||||||
|
sysUserBo.setSex(user.getSex());
|
||||||
userService.updateUser(sysUserBo);
|
userService.updateUser(sysUserBo);
|
||||||
return user.getId();
|
return user.getId();
|
||||||
}
|
}
|
||||||
@ -1396,14 +1420,17 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
* 人脸识别
|
* 人脸识别
|
||||||
*
|
*
|
||||||
* @param file 图片文件
|
* @param file 图片文件
|
||||||
|
* @param userId
|
||||||
* @return 是否匹配成功
|
* @return 是否匹配成功
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Boolean faceComparison(MultipartFile file) {
|
public Boolean faceComparison(MultipartFile file, Long userId) {
|
||||||
String reqBase64 = this.getPicBase64(file);
|
String reqBase64 = this.getPicBase64(file);
|
||||||
HumanFaceReq request = new HumanFaceReq();
|
HumanFaceReq request = new HumanFaceReq();
|
||||||
request.setImage(reqBase64);
|
request.setImage(reqBase64);
|
||||||
Long userId = LoginHelper.getUserId();
|
if(userId == null){
|
||||||
|
userId = LoginHelper.getUserId();
|
||||||
|
}
|
||||||
SubConstructionUser constructionUser = this.getBySysUserId(userId);
|
SubConstructionUser constructionUser = this.getBySysUserId(userId);
|
||||||
if (constructionUser == null || StringUtils.isBlank(constructionUser.getFacePic())) {
|
if (constructionUser == null || StringUtils.isBlank(constructionUser.getFacePic())) {
|
||||||
throw new ServiceException("未进行实名认证");
|
throw new ServiceException("未进行实名认证");
|
||||||
@ -1488,9 +1515,11 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
lqw.eq(ObjectUtils.isNotEmpty(typeOfWork), SubConstructionUser::getTypeOfWork, typeOfWork);
|
lqw.eq(ObjectUtils.isNotEmpty(typeOfWork), SubConstructionUser::getTypeOfWork, typeOfWork);
|
||||||
|
|
||||||
lqw.isNull(SubConstructionUser::getTeamId);
|
lqw.isNull(SubConstructionUser::getTeamId);
|
||||||
if(req.getProjectId() == null){
|
lqw.eq(SubConstructionUser::getUserRole, "0");
|
||||||
|
if (req.getProjectId() == null) {
|
||||||
lqw.isNull(SubConstructionUser::getProjectId);
|
lqw.isNull(SubConstructionUser::getProjectId);
|
||||||
}else{
|
lqw.apply("exists (select 1 from sys_user where user_id = sys_user_id and dept_id is null)");
|
||||||
|
} else {
|
||||||
lqw.eq(SubConstructionUser::getProjectId, req.getProjectId());
|
lqw.eq(SubConstructionUser::getProjectId, req.getProjectId());
|
||||||
}
|
}
|
||||||
Page<SubConstructionUser> result = this.page(pageQuery.build(), lqw);
|
Page<SubConstructionUser> result = this.page(pageQuery.build(), lqw);
|
||||||
@ -1526,4 +1555,12 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
this.remove(Wrappers.<SubConstructionUser>lambdaUpdate()
|
this.remove(Wrappers.<SubConstructionUser>lambdaUpdate()
|
||||||
.in(SubConstructionUser::getSysUserId, ids));
|
.in(SubConstructionUser::getSysUserId, ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SubConstructionUser getByUserId(Long sysUserId) {
|
||||||
|
return this.lambdaQuery()
|
||||||
|
.eq(SubConstructionUser::getSysUserId, sysUserId)
|
||||||
|
.last("limit 1")
|
||||||
|
.one();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -295,7 +295,7 @@ public class SubUserSalaryDetailServiceImpl extends ServiceImpl<SubUserSalaryDet
|
|||||||
List<BusProjectTeamAppVo> byUserId = projectTeamService.getByUserId(userId, dto.getProjectId());
|
List<BusProjectTeamAppVo> byUserId = projectTeamService.getByUserId(userId, dto.getProjectId());
|
||||||
|
|
||||||
if(CollectionUtil.isEmpty(byUserId)){
|
if(CollectionUtil.isEmpty(byUserId)){
|
||||||
return new TableDataInfo<>();
|
return TableDataInfo.build(new ArrayList<>());
|
||||||
}
|
}
|
||||||
list1 = byUserId.stream().map(BusProjectTeamAppVo::getId).toList();
|
list1 = byUserId.stream().map(BusProjectTeamAppVo::getId).toList();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,116 @@
|
|||||||
|
package org.dromara.ctr.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
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.dromara.ctr.domain.bo.CtrContractProgressSettlementBo;
|
||||||
|
import org.dromara.ctr.domain.dto.CtrContractProgressSettlementCreateReq;
|
||||||
|
import org.dromara.ctr.domain.dto.CtrContractProgressSettlementUpdateReq;
|
||||||
|
import org.dromara.ctr.domain.vo.CtrContractProgressSettlementTotalVo;
|
||||||
|
import org.dromara.ctr.domain.vo.CtrContractProgressSettlementVo;
|
||||||
|
import org.dromara.ctr.service.ICtrContractProgressSettlementService;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 承包合同进度结算
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/ctr/contractProgressSettlement")
|
||||||
|
public class CtrContractProgressSettlementController extends BaseController {
|
||||||
|
|
||||||
|
private final ICtrContractProgressSettlementService ctrContractProgressSettlementService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询承包合同进度结算列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("ctr:contractProgressSettlement:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<CtrContractProgressSettlementVo> list(CtrContractProgressSettlementBo bo, PageQuery pageQuery) {
|
||||||
|
return ctrContractProgressSettlementService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出承包合同进度结算列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("ctr:contractProgressSettlement:export")
|
||||||
|
@Log(title = "承包合同进度结算", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(CtrContractProgressSettlementBo bo, HttpServletResponse response) {
|
||||||
|
List<CtrContractProgressSettlementVo> list = ctrContractProgressSettlementService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "承包合同进度结算", CtrContractProgressSettlementVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取承包合同进度结算详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("ctr:contractProgressSettlement:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<CtrContractProgressSettlementVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(ctrContractProgressSettlementService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增承包合同进度结算
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("ctr:contractProgressSettlement:add")
|
||||||
|
@Log(title = "承包合同进度结算", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated @RequestBody CtrContractProgressSettlementCreateReq req) {
|
||||||
|
return toAjax(ctrContractProgressSettlementService.insertByBo(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改承包合同进度结算
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("ctr:contractProgressSettlement:edit")
|
||||||
|
@Log(title = "承包合同进度结算", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated @RequestBody CtrContractProgressSettlementUpdateReq req) {
|
||||||
|
return toAjax(ctrContractProgressSettlementService.updateByBo(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询金额合计
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("ctr:contractProgressSettlement:query")
|
||||||
|
@GetMapping("/queryMoneyTotal")
|
||||||
|
public R<CtrContractProgressSettlementTotalVo> queryMoneyTotal(CtrContractProgressSettlementBo bo) {
|
||||||
|
return R.ok(ctrContractProgressSettlementService.queryMoneyTotal(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除承包合同进度结算
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("ctr:contractProgressSettlement:remove")
|
||||||
|
@Log(title = "承包合同进度结算", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(ctrContractProgressSettlementService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,105 @@
|
|||||||
|
package org.dromara.ctr.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.ctr.domain.vo.CtrContractProgressSettlementItemVo;
|
||||||
|
import org.dromara.ctr.domain.bo.CtrContractProgressSettlementItemBo;
|
||||||
|
import org.dromara.ctr.service.ICtrContractProgressSettlementItemService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 承包合同进度结算清单
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/ctr/contractProgressSettlementItem")
|
||||||
|
public class CtrContractProgressSettlementItemController extends BaseController {
|
||||||
|
|
||||||
|
private final ICtrContractProgressSettlementItemService ctrContractProgressSettlementItemService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询承包合同进度结算清单列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("ctr:contractProgressSettlementItem:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<CtrContractProgressSettlementItemVo> list(CtrContractProgressSettlementItemBo bo, PageQuery pageQuery) {
|
||||||
|
return ctrContractProgressSettlementItemService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出承包合同进度结算清单列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("ctr:contractProgressSettlementItem:export")
|
||||||
|
@Log(title = "承包合同进度结算清单", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(CtrContractProgressSettlementItemBo bo, HttpServletResponse response) {
|
||||||
|
List<CtrContractProgressSettlementItemVo> list = ctrContractProgressSettlementItemService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "承包合同进度结算清单", CtrContractProgressSettlementItemVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取承包合同进度结算清单详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("ctr:contractProgressSettlementItem:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<CtrContractProgressSettlementItemVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(ctrContractProgressSettlementItemService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增承包合同进度结算清单
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("ctr:contractProgressSettlementItem:add")
|
||||||
|
@Log(title = "承包合同进度结算清单", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody CtrContractProgressSettlementItemBo bo) {
|
||||||
|
return toAjax(ctrContractProgressSettlementItemService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改承包合同进度结算清单
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("ctr:contractProgressSettlementItem:edit")
|
||||||
|
@Log(title = "承包合同进度结算清单", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody CtrContractProgressSettlementItemBo bo) {
|
||||||
|
return toAjax(ctrContractProgressSettlementItemService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除承包合同进度结算清单
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("ctr:contractProgressSettlementItem:remove")
|
||||||
|
@Log(title = "承包合同进度结算清单", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(ctrContractProgressSettlementItemService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,106 @@
|
|||||||
|
package org.dromara.ctr.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
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.dromara.ctr.domain.bo.CtrSubcontractProgressSettlementBo;
|
||||||
|
import org.dromara.ctr.domain.dto.CtrSubcontractProgressSettlementCreateReq;
|
||||||
|
import org.dromara.ctr.domain.dto.CtrSubcontractProgressSettlementUpdateReq;
|
||||||
|
import org.dromara.ctr.domain.vo.CtrSubcontractProgressSettlementVo;
|
||||||
|
import org.dromara.ctr.service.ICtrSubcontractProgressSettlementService;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分包合同进度结算
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/ctr/subcontractProgressSettlement")
|
||||||
|
public class CtrSubcontractProgressSettlementController extends BaseController {
|
||||||
|
|
||||||
|
private final ICtrSubcontractProgressSettlementService ctrSubcontractProgressSettlementService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询分包合同进度结算列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("ctr:subcontractProgressSettlement:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<CtrSubcontractProgressSettlementVo> list(CtrSubcontractProgressSettlementBo bo, PageQuery pageQuery) {
|
||||||
|
return ctrSubcontractProgressSettlementService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出分包合同进度结算列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("ctr:subcontractProgressSettlement:export")
|
||||||
|
@Log(title = "分包合同进度结算", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(CtrSubcontractProgressSettlementBo bo, HttpServletResponse response) {
|
||||||
|
List<CtrSubcontractProgressSettlementVo> list = ctrSubcontractProgressSettlementService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "分包合同进度结算", CtrSubcontractProgressSettlementVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取分包合同进度结算详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("ctr:subcontractProgressSettlement:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<CtrSubcontractProgressSettlementVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(ctrSubcontractProgressSettlementService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增分包合同进度结算
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("ctr:subcontractProgressSettlement:add")
|
||||||
|
@Log(title = "分包合同进度结算", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated @RequestBody CtrSubcontractProgressSettlementCreateReq req) {
|
||||||
|
return toAjax(ctrSubcontractProgressSettlementService.insertByBo(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改分包合同进度结算
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("ctr:subcontractProgressSettlement:edit")
|
||||||
|
@Log(title = "分包合同进度结算", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated @RequestBody CtrSubcontractProgressSettlementUpdateReq req) {
|
||||||
|
return toAjax(ctrSubcontractProgressSettlementService.updateByBo(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除分包合同进度结算
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("ctr:subcontractProgressSettlement:remove")
|
||||||
|
@Log(title = "分包合同进度结算", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(ctrSubcontractProgressSettlementService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,105 @@
|
|||||||
|
package org.dromara.ctr.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.ctr.domain.vo.CtrSubcontractProgressSettlementItemVo;
|
||||||
|
import org.dromara.ctr.domain.bo.CtrSubcontractProgressSettlementItemBo;
|
||||||
|
import org.dromara.ctr.service.ICtrSubcontractProgressSettlementItemService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分包合同进度结算清单
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/ctr/subcontractProgressSettlementItem")
|
||||||
|
public class CtrSubcontractProgressSettlementItemController extends BaseController {
|
||||||
|
|
||||||
|
private final ICtrSubcontractProgressSettlementItemService ctrSubcontractProgressSettlementItemService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询分包合同进度结算清单列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("ctr:subcontractProgressSettlementItem:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<CtrSubcontractProgressSettlementItemVo> list(CtrSubcontractProgressSettlementItemBo bo, PageQuery pageQuery) {
|
||||||
|
return ctrSubcontractProgressSettlementItemService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出分包合同进度结算清单列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("ctr:subcontractProgressSettlementItem:export")
|
||||||
|
@Log(title = "分包合同进度结算清单", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(CtrSubcontractProgressSettlementItemBo bo, HttpServletResponse response) {
|
||||||
|
List<CtrSubcontractProgressSettlementItemVo> list = ctrSubcontractProgressSettlementItemService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "分包合同进度结算清单", CtrSubcontractProgressSettlementItemVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取分包合同进度结算清单详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("ctr:subcontractProgressSettlementItem:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<CtrSubcontractProgressSettlementItemVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(ctrSubcontractProgressSettlementItemService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增分包合同进度结算清单
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("ctr:subcontractProgressSettlementItem:add")
|
||||||
|
@Log(title = "分包合同进度结算清单", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody CtrSubcontractProgressSettlementItemBo bo) {
|
||||||
|
return toAjax(ctrSubcontractProgressSettlementItemService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改分包合同进度结算清单
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("ctr:subcontractProgressSettlementItem:edit")
|
||||||
|
@Log(title = "分包合同进度结算清单", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody CtrSubcontractProgressSettlementItemBo bo) {
|
||||||
|
return toAjax(ctrSubcontractProgressSettlementItemService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除分包合同进度结算清单
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("ctr:subcontractProgressSettlementItem:remove")
|
||||||
|
@Log(title = "分包合同进度结算清单", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(ctrSubcontractProgressSettlementItemService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,139 @@
|
|||||||
|
package org.dromara.ctr.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 承包合同进度结算对象 ctr_contract_progress_settlement
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("ctr_contract_progress_settlement")
|
||||||
|
public class CtrContractProgressSettlement extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属部门
|
||||||
|
*/
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单据编码
|
||||||
|
*/
|
||||||
|
private String documentCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标题
|
||||||
|
*/
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算日期
|
||||||
|
*/
|
||||||
|
private LocalDate settlementDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同编码
|
||||||
|
*/
|
||||||
|
private String contractCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同名称
|
||||||
|
*/
|
||||||
|
private String contractName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计周期
|
||||||
|
*/
|
||||||
|
private String contractProgress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目名称
|
||||||
|
*/
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批金额
|
||||||
|
*/
|
||||||
|
private BigDecimal approvalAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量开始日期
|
||||||
|
*/
|
||||||
|
private LocalDate measureDateBegin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量结束日期
|
||||||
|
*/
|
||||||
|
private LocalDate measureDateEnd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算单位(客户)
|
||||||
|
*/
|
||||||
|
private Long settlementUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算金额
|
||||||
|
*/
|
||||||
|
private BigDecimal settlementMoney;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期扣款金额
|
||||||
|
*/
|
||||||
|
private BigDecimal deductionMoney;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期奖励金额
|
||||||
|
*/
|
||||||
|
private BigDecimal bonus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同金额
|
||||||
|
*/
|
||||||
|
private BigDecimal contractAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本次结算比例
|
||||||
|
*/
|
||||||
|
private BigDecimal thisSettlementRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付条款
|
||||||
|
*/
|
||||||
|
private Long paymentTerms;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 多文件逗号分隔
|
||||||
|
*/
|
||||||
|
private String fileId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,107 @@
|
|||||||
|
package org.dromara.ctr.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 承包合同进度结算清单对象 ctr_contract_progress_settlement_item
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("ctr_contract_progress_settlement_item")
|
||||||
|
public class CtrContractProgressSettlementItem extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算单ID
|
||||||
|
*/
|
||||||
|
private Long settlementId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型(1合同内清单 2变更增加清单 3合同外清单)
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编码
|
||||||
|
*/
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同清单名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量单位
|
||||||
|
*/
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单价
|
||||||
|
*/
|
||||||
|
private BigDecimal unitPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 含税单价
|
||||||
|
*/
|
||||||
|
private BigDecimal taxUnitPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算数量
|
||||||
|
*/
|
||||||
|
private BigDecimal currentQty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算百分比
|
||||||
|
*/
|
||||||
|
private BigDecimal currentRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算金额
|
||||||
|
*/
|
||||||
|
private BigDecimal currentAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算不含税金额
|
||||||
|
*/
|
||||||
|
private BigDecimal currentNoAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期审批数量
|
||||||
|
*/
|
||||||
|
private BigDecimal currentApprovedQty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期审批金额
|
||||||
|
*/
|
||||||
|
private BigDecimal currentApprovedAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 税率(%)
|
||||||
|
*/
|
||||||
|
private String taxRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,123 @@
|
|||||||
|
package org.dromara.ctr.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分包合同进度结算对象 ctr_subcontract_progress_settlement
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("ctr_subcontract_progress_settlement")
|
||||||
|
public class CtrSubcontractProgressSettlement extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属部门
|
||||||
|
*/
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单据编码
|
||||||
|
*/
|
||||||
|
private String documentCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标题
|
||||||
|
*/
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单据日期
|
||||||
|
*/
|
||||||
|
private LocalDate documentDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同编码
|
||||||
|
*/
|
||||||
|
private String contractCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同名称
|
||||||
|
*/
|
||||||
|
private String contractName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计周期
|
||||||
|
*/
|
||||||
|
private String contractProgress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量开始日期
|
||||||
|
*/
|
||||||
|
private LocalDate measureDateBegin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量结束日期
|
||||||
|
*/
|
||||||
|
private LocalDate measureDateEnd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目名称
|
||||||
|
*/
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批金额
|
||||||
|
*/
|
||||||
|
private BigDecimal approvalAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算单位
|
||||||
|
*/
|
||||||
|
private Long settlementUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同金额
|
||||||
|
*/
|
||||||
|
private BigDecimal contractAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本次结算比例
|
||||||
|
*/
|
||||||
|
private BigDecimal currentSettlementRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件ID
|
||||||
|
*/
|
||||||
|
private String fileId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,130 @@
|
|||||||
|
package org.dromara.ctr.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分包合同进度结算清单对象 ctr_subcontract_progress_settlement_item
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ctr_subcontract_progress_settlement_item")
|
||||||
|
public class CtrSubcontractProgressSettlementItem implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算单ID
|
||||||
|
*/
|
||||||
|
private Long settlementId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型(1合同内清单 2变更增加清单 3合同外清单)
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编码
|
||||||
|
*/
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同清单名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量单位
|
||||||
|
*/
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单价
|
||||||
|
*/
|
||||||
|
private BigDecimal unitPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 含税单价
|
||||||
|
*/
|
||||||
|
private BigDecimal taxUnitPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算数量
|
||||||
|
*/
|
||||||
|
private BigDecimal currentQty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算百分比
|
||||||
|
*/
|
||||||
|
private BigDecimal currentRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算金额
|
||||||
|
*/
|
||||||
|
private BigDecimal currentAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算不含税金额
|
||||||
|
*/
|
||||||
|
private BigDecimal currentNoAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期审批数量
|
||||||
|
*/
|
||||||
|
private BigDecimal currentApprovedQty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期审批金额
|
||||||
|
*/
|
||||||
|
private BigDecimal currentApprovedAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 税率(%)
|
||||||
|
*/
|
||||||
|
private String taxRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 税额
|
||||||
|
*/
|
||||||
|
private String tax;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WBS工作分解结构
|
||||||
|
*/
|
||||||
|
private String wbs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CBS成本分解结构
|
||||||
|
*/
|
||||||
|
private String cbs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CBS预算总额
|
||||||
|
*/
|
||||||
|
private BigDecimal cbsBudgetTotal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CBS余额
|
||||||
|
*/
|
||||||
|
private BigDecimal cbsBalance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,150 @@
|
|||||||
|
package org.dromara.ctr.domain.bo;
|
||||||
|
|
||||||
|
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.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import org.dromara.ctr.domain.CtrContractProgressSettlement;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 承包合同进度结算业务对象 ctr_contract_progress_settlement
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = CtrContractProgressSettlement.class, reverseConvertGenerate = false)
|
||||||
|
public class CtrContractProgressSettlementBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键ID不能为空", groups = {EditGroup.class})
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属部门
|
||||||
|
*/
|
||||||
|
@NotNull(message = "所属部门不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单据编码
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "单据编码不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private String documentCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标题
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "标题不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算日期
|
||||||
|
*/
|
||||||
|
@NotNull(message = "结算日期不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private LocalDate settlementDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同编码
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "合同编码不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private String contractCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型(1付款 2收款)
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同名称
|
||||||
|
*/
|
||||||
|
private String contractName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计周期
|
||||||
|
*/
|
||||||
|
private String contractProgress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目名称
|
||||||
|
*/
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批金额
|
||||||
|
*/
|
||||||
|
@NotNull(message = "审批金额不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private BigDecimal approvalAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量开始日期
|
||||||
|
*/
|
||||||
|
private LocalDate measureDateBegin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量结束日期
|
||||||
|
*/
|
||||||
|
private LocalDate measureDateEnd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算单位(客户)
|
||||||
|
*/
|
||||||
|
private Long settlementUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算金额
|
||||||
|
*/
|
||||||
|
private BigDecimal settlementMoney;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期扣款金额
|
||||||
|
*/
|
||||||
|
private BigDecimal deductionMoney;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期奖励金额
|
||||||
|
*/
|
||||||
|
private BigDecimal bonus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同金额
|
||||||
|
*/
|
||||||
|
private BigDecimal contractAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本次结算比例
|
||||||
|
*/
|
||||||
|
private BigDecimal thisSettlementRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付条款
|
||||||
|
*/
|
||||||
|
private Long paymentTerms;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 多文件逗号分隔
|
||||||
|
*/
|
||||||
|
private String fileId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,110 @@
|
|||||||
|
package org.dromara.ctr.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.ctr.domain.CtrContractProgressSettlementItem;
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 承包合同进度结算清单业务对象 ctr_contract_progress_settlement_item
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = CtrContractProgressSettlementItem.class, reverseConvertGenerate = false)
|
||||||
|
public class CtrContractProgressSettlementItemBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算单ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "结算单ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long settlementId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型(1合同内清单 2变更增加清单 3合同外清单)
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "类型(1合同内清单 2变更增加清单 3合同外清单)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编码
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同清单名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "合同清单名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量单位
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "计量单位不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单价
|
||||||
|
*/
|
||||||
|
private BigDecimal unitPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 含税单价
|
||||||
|
*/
|
||||||
|
private BigDecimal taxUnitPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算数量
|
||||||
|
*/
|
||||||
|
private BigDecimal currentQty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算百分比
|
||||||
|
*/
|
||||||
|
private BigDecimal currentRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算金额
|
||||||
|
*/
|
||||||
|
private BigDecimal currentAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算不含税金额
|
||||||
|
*/
|
||||||
|
private BigDecimal currentNoAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期审批数量
|
||||||
|
*/
|
||||||
|
private BigDecimal currentApprovedQty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期审批金额
|
||||||
|
*/
|
||||||
|
private BigDecimal currentApprovedAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 税率(%)
|
||||||
|
*/
|
||||||
|
private String taxRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,122 @@
|
|||||||
|
package org.dromara.ctr.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.ctr.domain.CtrSubcontractProgressSettlement;
|
||||||
|
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;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分包合同进度结算业务对象 ctr_subcontract_progress_settlement
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = CtrSubcontractProgressSettlement.class, reverseConvertGenerate = false)
|
||||||
|
public class CtrSubcontractProgressSettlementBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单据编码
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "单据编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String documentCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标题
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "标题不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单据日期
|
||||||
|
*/
|
||||||
|
@NotNull(message = "单据日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private LocalDate documentDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同编码
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "合同编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String contractCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同名称
|
||||||
|
*/
|
||||||
|
private String contractName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计周期
|
||||||
|
*/
|
||||||
|
private String contractProgress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量开始日期
|
||||||
|
*/
|
||||||
|
private LocalDate measureDateBegin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量结束日期
|
||||||
|
*/
|
||||||
|
private LocalDate measureDateEnd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目名称
|
||||||
|
*/
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批金额
|
||||||
|
*/
|
||||||
|
@NotNull(message = "审批金额不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private BigDecimal approvalAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算单位
|
||||||
|
*/
|
||||||
|
private Long settlementUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同金额
|
||||||
|
*/
|
||||||
|
private BigDecimal contractAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本次结算比例
|
||||||
|
*/
|
||||||
|
private BigDecimal currentSettlementRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件ID
|
||||||
|
*/
|
||||||
|
private String fileId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,136 @@
|
|||||||
|
package org.dromara.ctr.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.ctr.domain.CtrSubcontractProgressSettlementItem;
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分包合同进度结算清单业务对象 ctr_subcontract_progress_settlement_item
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = CtrSubcontractProgressSettlementItem.class, reverseConvertGenerate = false)
|
||||||
|
public class CtrSubcontractProgressSettlementItemBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算单ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "结算单ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long settlementId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型(1合同内清单 2变更增加清单 3合同外清单)
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "类型(1合同内清单 2变更增加清单 3合同外清单)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编码
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同清单名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "合同清单名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量单位
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "计量单位不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单价
|
||||||
|
*/
|
||||||
|
private BigDecimal unitPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 含税单价
|
||||||
|
*/
|
||||||
|
private BigDecimal taxUnitPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算数量
|
||||||
|
*/
|
||||||
|
private BigDecimal currentQty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算百分比
|
||||||
|
*/
|
||||||
|
private BigDecimal currentRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算金额
|
||||||
|
*/
|
||||||
|
private BigDecimal currentAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算不含税金额
|
||||||
|
*/
|
||||||
|
private BigDecimal currentNoAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期审批数量
|
||||||
|
*/
|
||||||
|
private BigDecimal currentApprovedQty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期审批金额
|
||||||
|
*/
|
||||||
|
private BigDecimal currentApprovedAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 税率(%)
|
||||||
|
*/
|
||||||
|
private String taxRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 税额
|
||||||
|
*/
|
||||||
|
private String tax;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WBS工作分解结构
|
||||||
|
*/
|
||||||
|
private String wbs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CBS成本分解结构
|
||||||
|
*/
|
||||||
|
private String cbs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CBS预算总额
|
||||||
|
*/
|
||||||
|
private BigDecimal cbsBudgetTotal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CBS余额
|
||||||
|
*/
|
||||||
|
private BigDecimal cbsBalance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,148 @@
|
|||||||
|
package org.dromara.ctr.domain.dto;
|
||||||
|
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.dromara.ctr.domain.CtrContractProgressSettlement;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 承包合同进度结算业务对象 ctr_contract_progress_settlement
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AutoMapper(target = CtrContractProgressSettlement.class, reverseConvertGenerate = false)
|
||||||
|
public class CtrContractProgressSettlementCreateReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = -7707258738219359278L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属部门
|
||||||
|
*/
|
||||||
|
@NotNull(message = "所属部门不能为空")
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标题
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "标题不能为空")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算日期
|
||||||
|
*/
|
||||||
|
@NotNull(message = "结算日期不能为空")
|
||||||
|
private LocalDate settlementDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同编码
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "合同编码不能为空")
|
||||||
|
private String contractCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同名称
|
||||||
|
*/
|
||||||
|
private String contractName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计周期
|
||||||
|
*/
|
||||||
|
private String contractProgress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目名称
|
||||||
|
*/
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批金额
|
||||||
|
*/
|
||||||
|
@NotNull(message = "审批金额不能为空")
|
||||||
|
private BigDecimal approvalAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量开始日期
|
||||||
|
*/
|
||||||
|
private LocalDate measureDateBegin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量结束日期
|
||||||
|
*/
|
||||||
|
private LocalDate measureDateEnd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算单位(客户)
|
||||||
|
*/
|
||||||
|
private Long settlementUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算金额
|
||||||
|
*/
|
||||||
|
private BigDecimal settlementMoney;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期扣款金额
|
||||||
|
*/
|
||||||
|
private BigDecimal deductionMoney;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期奖励金额
|
||||||
|
*/
|
||||||
|
private BigDecimal bonus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同金额
|
||||||
|
*/
|
||||||
|
private BigDecimal contractAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本次结算比例
|
||||||
|
*/
|
||||||
|
private BigDecimal thisSettlementRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付条款
|
||||||
|
*/
|
||||||
|
private Long paymentTerms;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 多文件逗号分隔
|
||||||
|
*/
|
||||||
|
private String fileId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同内清单
|
||||||
|
*/
|
||||||
|
private List<CtrContractProgressSettlementItemCreateReq> inInventory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变更增加清单
|
||||||
|
*/
|
||||||
|
private List<CtrContractProgressSettlementItemCreateReq> changeInventory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同外清单
|
||||||
|
*/
|
||||||
|
private List<CtrContractProgressSettlementItemCreateReq> outInventory;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,86 @@
|
|||||||
|
package org.dromara.ctr.domain.dto;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18 17:05
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class CtrContractProgressSettlementItemCreateReq {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编码
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "编码不能为空")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同清单名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "合同清单名称不能为空")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量单位
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "计量单位不能为空")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单价
|
||||||
|
*/
|
||||||
|
private BigDecimal unitPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 含税单价
|
||||||
|
*/
|
||||||
|
private BigDecimal taxUnitPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算数量
|
||||||
|
*/
|
||||||
|
private BigDecimal currentQty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算百分比
|
||||||
|
*/
|
||||||
|
private BigDecimal currentRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算金额
|
||||||
|
*/
|
||||||
|
private BigDecimal currentAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算不含税金额
|
||||||
|
*/
|
||||||
|
private BigDecimal currentNoAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期审批数量
|
||||||
|
*/
|
||||||
|
private BigDecimal currentApprovedQty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期审批金额
|
||||||
|
*/
|
||||||
|
private BigDecimal currentApprovedAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 税率(%)
|
||||||
|
*/
|
||||||
|
private String taxRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
}
|
||||||
@ -0,0 +1,91 @@
|
|||||||
|
package org.dromara.ctr.domain.dto;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18 17:39
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class CtrContractProgressSettlementItemUpdateReq {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编码
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "编码不能为空")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同清单名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "合同清单名称不能为空")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量单位
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "计量单位不能为空")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单价
|
||||||
|
*/
|
||||||
|
private BigDecimal unitPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 含税单价
|
||||||
|
*/
|
||||||
|
private BigDecimal taxUnitPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算数量
|
||||||
|
*/
|
||||||
|
private BigDecimal currentQty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算百分比
|
||||||
|
*/
|
||||||
|
private BigDecimal currentRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算金额
|
||||||
|
*/
|
||||||
|
private BigDecimal currentAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算不含税金额
|
||||||
|
*/
|
||||||
|
private BigDecimal currentNoAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期审批数量
|
||||||
|
*/
|
||||||
|
private BigDecimal currentApprovedQty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期审批金额
|
||||||
|
*/
|
||||||
|
private BigDecimal currentApprovedAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 税率(%)
|
||||||
|
*/
|
||||||
|
private String taxRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
}
|
||||||
@ -0,0 +1,157 @@
|
|||||||
|
package org.dromara.ctr.domain.dto;
|
||||||
|
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.dromara.ctr.domain.CtrContractProgressSettlement;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18 17:30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AutoMapper(target = CtrContractProgressSettlement.class, reverseConvertGenerate = false)
|
||||||
|
public class CtrContractProgressSettlementUpdateReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = -105855005415297131L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键ID不能为空")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属部门
|
||||||
|
*/
|
||||||
|
@NotNull(message = "所属部门不能为空")
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单据编码
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "单据编码不能为空")
|
||||||
|
private String documentCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标题
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "标题不能为空")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算日期
|
||||||
|
*/
|
||||||
|
@NotNull(message = "结算日期不能为空")
|
||||||
|
private LocalDate settlementDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同编码
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "合同编码不能为空")
|
||||||
|
private String contractCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同名称
|
||||||
|
*/
|
||||||
|
private String contractName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计周期
|
||||||
|
*/
|
||||||
|
private String contractProgress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目名称
|
||||||
|
*/
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批金额
|
||||||
|
*/
|
||||||
|
@NotNull(message = "审批金额不能为空")
|
||||||
|
private BigDecimal approvalAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量开始日期
|
||||||
|
*/
|
||||||
|
private LocalDate measureDateBegin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量结束日期
|
||||||
|
*/
|
||||||
|
private LocalDate measureDateEnd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算单位(客户)
|
||||||
|
*/
|
||||||
|
private Long settlementUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算金额
|
||||||
|
*/
|
||||||
|
private BigDecimal settlementMoney;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期扣款金额
|
||||||
|
*/
|
||||||
|
private BigDecimal deductionMoney;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期奖励金额
|
||||||
|
*/
|
||||||
|
private BigDecimal bonus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同金额
|
||||||
|
*/
|
||||||
|
private BigDecimal contractAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本次结算比例
|
||||||
|
*/
|
||||||
|
private BigDecimal thisSettlementRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付条款
|
||||||
|
*/
|
||||||
|
private Long paymentTerms;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 多文件逗号分隔
|
||||||
|
*/
|
||||||
|
private String fileId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同内清单
|
||||||
|
*/
|
||||||
|
private List<CtrContractProgressSettlementItemUpdateReq> inInventory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变更增加清单
|
||||||
|
*/
|
||||||
|
private List<CtrContractProgressSettlementItemUpdateReq> changeInventory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同外清单
|
||||||
|
*/
|
||||||
|
private List<CtrContractProgressSettlementItemUpdateReq> outInventory;
|
||||||
|
}
|
||||||
@ -0,0 +1,129 @@
|
|||||||
|
package org.dromara.ctr.domain.dto;
|
||||||
|
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.dromara.ctr.domain.CtrSubcontractProgressSettlement;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18 19:14
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AutoMapper(target = CtrSubcontractProgressSettlement.class, reverseConvertGenerate = false)
|
||||||
|
public class CtrSubcontractProgressSettlementCreateReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 770553999547826460L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属部门
|
||||||
|
*/
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标题
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "标题不能为空")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单据日期
|
||||||
|
*/
|
||||||
|
@NotNull(message = "单据日期不能为空")
|
||||||
|
private LocalDate documentDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同编码
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "合同编码不能为空")
|
||||||
|
private String contractCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同名称
|
||||||
|
*/
|
||||||
|
private String contractName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计周期
|
||||||
|
*/
|
||||||
|
private String contractProgress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量开始日期
|
||||||
|
*/
|
||||||
|
private LocalDate measureDateBegin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量结束日期
|
||||||
|
*/
|
||||||
|
private LocalDate measureDateEnd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目名称
|
||||||
|
*/
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批金额
|
||||||
|
*/
|
||||||
|
@NotNull(message = "审批金额不能为空")
|
||||||
|
private BigDecimal approvalAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算单位
|
||||||
|
*/
|
||||||
|
private Long settlementUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同金额
|
||||||
|
*/
|
||||||
|
private BigDecimal contractAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本次结算比例
|
||||||
|
*/
|
||||||
|
private BigDecimal currentSettlementRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件ID
|
||||||
|
*/
|
||||||
|
private String fileId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同内清单
|
||||||
|
*/
|
||||||
|
private List<CtrSubcontractProgressSettlementItemCreateReq> inInventory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变更增加清单
|
||||||
|
*/
|
||||||
|
private List<CtrSubcontractProgressSettlementItemCreateReq> changeInventory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同外清单
|
||||||
|
*/
|
||||||
|
private List<CtrSubcontractProgressSettlementItemCreateReq> outInventory;
|
||||||
|
}
|
||||||
@ -0,0 +1,115 @@
|
|||||||
|
package org.dromara.ctr.domain.dto;
|
||||||
|
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.dromara.ctr.domain.CtrSubcontractProgressSettlementItem;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18 19:17
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AutoMapper(target = CtrSubcontractProgressSettlementItem.class, reverseConvertGenerate = false)
|
||||||
|
public class CtrSubcontractProgressSettlementItemCreateReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = -7720839036718185218L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编码
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "编码不能为空")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同清单名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "合同清单名称不能为空")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量单位
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "计量单位不能为空")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单价
|
||||||
|
*/
|
||||||
|
private BigDecimal unitPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 含税单价
|
||||||
|
*/
|
||||||
|
private BigDecimal taxUnitPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算数量
|
||||||
|
*/
|
||||||
|
private BigDecimal currentQty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算百分比
|
||||||
|
*/
|
||||||
|
private BigDecimal currentRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算金额
|
||||||
|
*/
|
||||||
|
private BigDecimal currentAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算不含税金额
|
||||||
|
*/
|
||||||
|
private BigDecimal currentNoAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期审批数量
|
||||||
|
*/
|
||||||
|
private BigDecimal currentApprovedQty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期审批金额
|
||||||
|
*/
|
||||||
|
private BigDecimal currentApprovedAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 税率(%)
|
||||||
|
*/
|
||||||
|
private String taxRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 税额
|
||||||
|
*/
|
||||||
|
private String tax;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WBS工作分解结构
|
||||||
|
*/
|
||||||
|
private String wbs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CBS成本分解结构
|
||||||
|
*/
|
||||||
|
private String cbs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CBS预算总额
|
||||||
|
*/
|
||||||
|
private BigDecimal cbsBudgetTotal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CBS余额
|
||||||
|
*/
|
||||||
|
private BigDecimal cbsBalance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
}
|
||||||
@ -0,0 +1,123 @@
|
|||||||
|
package org.dromara.ctr.domain.dto;
|
||||||
|
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.dromara.ctr.domain.CtrSubcontractProgressSettlementItem;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18 19:21
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AutoMapper(target = CtrSubcontractProgressSettlementItem.class, reverseConvertGenerate = false)
|
||||||
|
public class CtrSubcontractProgressSettlementItemUpdateReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 4319471696029509036L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键ID不能为空")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编码
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "编码不能为空")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同清单名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "合同清单名称不能为空")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量单位
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "计量单位不能为空")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单价
|
||||||
|
*/
|
||||||
|
private BigDecimal unitPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 含税单价
|
||||||
|
*/
|
||||||
|
private BigDecimal taxUnitPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算数量
|
||||||
|
*/
|
||||||
|
private BigDecimal currentQty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算百分比
|
||||||
|
*/
|
||||||
|
private BigDecimal currentRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算金额
|
||||||
|
*/
|
||||||
|
private BigDecimal currentAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算不含税金额
|
||||||
|
*/
|
||||||
|
private BigDecimal currentNoAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期审批数量
|
||||||
|
*/
|
||||||
|
private BigDecimal currentApprovedQty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期审批金额
|
||||||
|
*/
|
||||||
|
private BigDecimal currentApprovedAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 税率(%)
|
||||||
|
*/
|
||||||
|
private String taxRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 税额
|
||||||
|
*/
|
||||||
|
private String tax;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WBS工作分解结构
|
||||||
|
*/
|
||||||
|
private String wbs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CBS成本分解结构
|
||||||
|
*/
|
||||||
|
private String cbs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CBS预算总额
|
||||||
|
*/
|
||||||
|
private BigDecimal cbsBudgetTotal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CBS余额
|
||||||
|
*/
|
||||||
|
private BigDecimal cbsBalance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,136 @@
|
|||||||
|
package org.dromara.ctr.domain.dto;
|
||||||
|
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.dromara.ctr.domain.CtrSubcontractProgressSettlement;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18 19:20
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AutoMapper(target = CtrSubcontractProgressSettlement.class, reverseConvertGenerate = false)
|
||||||
|
public class CtrSubcontractProgressSettlementUpdateReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = -7099475527833822253L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键ID不能为空")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单据编码
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "单据编码不能为空")
|
||||||
|
private String documentCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标题
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "标题不能为空")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单据日期
|
||||||
|
*/
|
||||||
|
@NotNull(message = "单据日期不能为空")
|
||||||
|
private LocalDate documentDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同编码
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "合同编码不能为空")
|
||||||
|
private String contractCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同名称
|
||||||
|
*/
|
||||||
|
private String contractName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计周期
|
||||||
|
*/
|
||||||
|
private String contractProgress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量开始日期
|
||||||
|
*/
|
||||||
|
private LocalDate measureDateBegin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量结束日期
|
||||||
|
*/
|
||||||
|
private LocalDate measureDateEnd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目名称
|
||||||
|
*/
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批金额
|
||||||
|
*/
|
||||||
|
@NotNull(message = "审批金额不能为空")
|
||||||
|
private BigDecimal approvalAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算单位
|
||||||
|
*/
|
||||||
|
private Long settlementUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同金额
|
||||||
|
*/
|
||||||
|
private BigDecimal contractAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本次结算比例
|
||||||
|
*/
|
||||||
|
private BigDecimal currentSettlementRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件ID
|
||||||
|
*/
|
||||||
|
private String fileId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同内清单
|
||||||
|
*/
|
||||||
|
private List<CtrSubcontractProgressSettlementItemUpdateReq> inInventory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变更增加清单
|
||||||
|
*/
|
||||||
|
private List<CtrSubcontractProgressSettlementItemUpdateReq> changeInventory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同外清单
|
||||||
|
*/
|
||||||
|
private List<CtrSubcontractProgressSettlementItemUpdateReq> outInventory;
|
||||||
|
}
|
||||||
@ -0,0 +1,130 @@
|
|||||||
|
package org.dromara.ctr.domain.vo;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import org.dromara.ctr.domain.CtrContractProgressSettlementItem;
|
||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 承包合同进度结算清单视图对象 ctr_contract_progress_settlement_item
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = CtrContractProgressSettlementItem.class)
|
||||||
|
public class CtrContractProgressSettlementItemVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "主键ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算单ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "结算单ID")
|
||||||
|
private Long settlementId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型(1合同内清单 2变更增加清单 3合同外清单)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "类型(1合同内清单 2变更增加清单 3合同外清单)")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编码
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "编码")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同清单名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "合同清单名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量单位
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "计量单位")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单价
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "单价")
|
||||||
|
private BigDecimal unitPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 含税单价
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "含税单价")
|
||||||
|
private BigDecimal taxUnitPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算数量
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "本期结算数量")
|
||||||
|
private BigDecimal currentQty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算百分比
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "本期结算百分比")
|
||||||
|
private BigDecimal currentRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算金额
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "本期结算金额")
|
||||||
|
private BigDecimal currentAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算不含税金额
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "本期结算不含税金额")
|
||||||
|
private BigDecimal currentNoAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期审批数量
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "本期审批数量")
|
||||||
|
private BigDecimal currentApprovedQty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期审批金额
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "本期审批金额")
|
||||||
|
private BigDecimal currentApprovedAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 税率(%)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "税率", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(dictType = "xzd_tax_rate")
|
||||||
|
private String taxRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
package org.dromara.ctr.domain.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-21 11:01
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class CtrContractProgressSettlementTotalVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1537548228169684228L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总金额
|
||||||
|
*/
|
||||||
|
private BigDecimal moneyTotal;
|
||||||
|
}
|
||||||
@ -0,0 +1,192 @@
|
|||||||
|
package org.dromara.ctr.domain.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.dromara.common.translation.annotation.Translation;
|
||||||
|
import org.dromara.common.translation.constant.TransConstant;
|
||||||
|
import org.dromara.ctr.domain.CtrContractProgressSettlement;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 承包合同进度结算视图对象 ctr_contract_progress_settlement
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = CtrContractProgressSettlement.class)
|
||||||
|
public class CtrContractProgressSettlementVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "主键ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属部门
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "所属部门")
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门名称
|
||||||
|
*/
|
||||||
|
@Translation(type = TransConstant.DEPT_ID_TO_NAME, mapper = "deptId")
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单据编码
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "单据编码")
|
||||||
|
private String documentCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标题
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算日期
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "结算日期")
|
||||||
|
private LocalDate settlementDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同编码
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "合同编码")
|
||||||
|
private String contractCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "合同名称")
|
||||||
|
private String contractName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计周期
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "统计周期")
|
||||||
|
private String contractProgress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "项目ID")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "项目名称")
|
||||||
|
@Translation(type = TransConstant.PROJECT_ID_TO_NAME, mapper = "projectId")
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批金额
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "审批金额")
|
||||||
|
private BigDecimal approvalAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量开始日期
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "计量开始日期")
|
||||||
|
private LocalDate measureDateBegin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量结束日期
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "计量结束日期")
|
||||||
|
private LocalDate measureDateEnd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算单位(客户)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "结算单位(客户)")
|
||||||
|
private Long settlementUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算单位名称
|
||||||
|
*/
|
||||||
|
@Translation(type = TransConstant.DEPT_ID_TO_NAME, mapper = "settlementUnit")
|
||||||
|
private String settlementUnitName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算金额
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "本期结算金额")
|
||||||
|
private BigDecimal settlementMoney;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期扣款金额
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "本期扣款金额")
|
||||||
|
private BigDecimal deductionMoney;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期奖励金额
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "本期奖励金额")
|
||||||
|
private BigDecimal bonus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同金额
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "合同金额")
|
||||||
|
private BigDecimal contractAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本次结算比例
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "本次结算比例")
|
||||||
|
private BigDecimal thisSettlementRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付条款
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "支付条款")
|
||||||
|
private Long paymentTerms;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 多文件逗号分隔
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "多文件逗号分隔")
|
||||||
|
private String fileId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同内清单
|
||||||
|
*/
|
||||||
|
private List<CtrContractProgressSettlementItemVo> inInventory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变更增加清单
|
||||||
|
*/
|
||||||
|
private List<CtrContractProgressSettlementItemVo> changeInventory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同外清单
|
||||||
|
*/
|
||||||
|
private List<CtrContractProgressSettlementItemVo> outInventory;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,160 @@
|
|||||||
|
package org.dromara.ctr.domain.vo;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import org.dromara.ctr.domain.CtrSubcontractProgressSettlementItem;
|
||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分包合同进度结算清单视图对象 ctr_subcontract_progress_settlement_item
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = CtrSubcontractProgressSettlementItem.class)
|
||||||
|
public class CtrSubcontractProgressSettlementItemVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "主键ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算单ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "结算单ID")
|
||||||
|
private Long settlementId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型(1合同内清单 2变更增加清单 3合同外清单)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "类型(1合同内清单 2变更增加清单 3合同外清单)")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编码
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "编码")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同清单名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "合同清单名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量单位
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "计量单位")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单价
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "单价")
|
||||||
|
private BigDecimal unitPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 含税单价
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "含税单价")
|
||||||
|
private BigDecimal taxUnitPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算数量
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "本期结算数量")
|
||||||
|
private BigDecimal currentQty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算百分比
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "本期结算百分比")
|
||||||
|
private BigDecimal currentRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算金额
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "本期结算金额")
|
||||||
|
private BigDecimal currentAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期结算不含税金额
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "本期结算不含税金额")
|
||||||
|
private BigDecimal currentNoAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期审批数量
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "本期审批数量")
|
||||||
|
private BigDecimal currentApprovedQty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本期审批金额
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "本期审批金额")
|
||||||
|
private BigDecimal currentApprovedAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 税率(%)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "税率", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(dictType = "xzd_tax_rate")
|
||||||
|
private String taxRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 税额
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "税额")
|
||||||
|
private String tax;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WBS工作分解结构
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "WBS工作分解结构")
|
||||||
|
private String wbs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CBS成本分解结构
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "CBS成本分解结构")
|
||||||
|
private String cbs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CBS预算总额
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "CBS预算总额")
|
||||||
|
private BigDecimal cbsBudgetTotal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CBS余额
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "CBS余额")
|
||||||
|
private BigDecimal cbsBalance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,173 @@
|
|||||||
|
package org.dromara.ctr.domain.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.dromara.common.translation.annotation.Translation;
|
||||||
|
import org.dromara.common.translation.constant.TransConstant;
|
||||||
|
import org.dromara.ctr.domain.CtrSubcontractProgressSettlement;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分包合同进度结算视图对象 ctr_subcontract_progress_settlement
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = CtrSubcontractProgressSettlement.class)
|
||||||
|
public class CtrSubcontractProgressSettlementVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "主键ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单据编码
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "单据编码")
|
||||||
|
private String documentCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标题
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属部门
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "所属部门")
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门名称
|
||||||
|
*/
|
||||||
|
@Translation(type = TransConstant.DEPT_ID_TO_NAME, mapper = "deptId")
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单据日期
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "单据日期")
|
||||||
|
private LocalDate documentDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同编码
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "合同编码")
|
||||||
|
private String contractCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "合同名称")
|
||||||
|
private String contractName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计周期
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "统计周期")
|
||||||
|
private String contractProgress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量开始日期
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "计量开始日期")
|
||||||
|
private LocalDate measureDateBegin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量结束日期
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "计量结束日期")
|
||||||
|
private LocalDate measureDateEnd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "项目ID")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "项目名称")
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批金额
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "审批金额")
|
||||||
|
private BigDecimal approvalAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算单位
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "结算单位")
|
||||||
|
private Long settlementUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算单位名称
|
||||||
|
*/
|
||||||
|
@Translation(type = TransConstant.DEPT_ID_TO_NAME, mapper = "settlementUnit")
|
||||||
|
private String settlementUnitName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同金额
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "合同金额")
|
||||||
|
private BigDecimal contractAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本次结算比例
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "本次结算比例")
|
||||||
|
private BigDecimal currentSettlementRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "文件ID")
|
||||||
|
private String fileId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "审核状态")
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同内清单
|
||||||
|
*/
|
||||||
|
private List<CtrSubcontractProgressSettlementItemVo> inInventory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变更增加清单
|
||||||
|
*/
|
||||||
|
private List<CtrSubcontractProgressSettlementItemVo> changeInventory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同外清单
|
||||||
|
*/
|
||||||
|
private List<CtrSubcontractProgressSettlementItemVo> outInventory;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.ctr.mapper;
|
||||||
|
|
||||||
|
import org.dromara.ctr.domain.CtrContractProgressSettlementItem;
|
||||||
|
import org.dromara.ctr.domain.vo.CtrContractProgressSettlementItemVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 承包合同进度结算清单Mapper接口
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18
|
||||||
|
*/
|
||||||
|
public interface CtrContractProgressSettlementItemMapper extends BaseMapperPlus<CtrContractProgressSettlementItem, CtrContractProgressSettlementItemVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.ctr.mapper;
|
||||||
|
|
||||||
|
import org.dromara.ctr.domain.CtrContractProgressSettlement;
|
||||||
|
import org.dromara.ctr.domain.vo.CtrContractProgressSettlementVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 承包合同进度结算Mapper接口
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18
|
||||||
|
*/
|
||||||
|
public interface CtrContractProgressSettlementMapper extends BaseMapperPlus<CtrContractProgressSettlement, CtrContractProgressSettlementVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.ctr.mapper;
|
||||||
|
|
||||||
|
import org.dromara.ctr.domain.CtrSubcontractProgressSettlementItem;
|
||||||
|
import org.dromara.ctr.domain.vo.CtrSubcontractProgressSettlementItemVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分包合同进度结算清单Mapper接口
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18
|
||||||
|
*/
|
||||||
|
public interface CtrSubcontractProgressSettlementItemMapper extends BaseMapperPlus<CtrSubcontractProgressSettlementItem, CtrSubcontractProgressSettlementItemVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.ctr.mapper;
|
||||||
|
|
||||||
|
import org.dromara.ctr.domain.CtrSubcontractProgressSettlement;
|
||||||
|
import org.dromara.ctr.domain.vo.CtrSubcontractProgressSettlementVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分包合同进度结算Mapper接口
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18
|
||||||
|
*/
|
||||||
|
public interface CtrSubcontractProgressSettlementMapper extends BaseMapperPlus<CtrSubcontractProgressSettlement, CtrSubcontractProgressSettlementVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,70 @@
|
|||||||
|
package org.dromara.ctr.service;
|
||||||
|
|
||||||
|
import org.dromara.ctr.domain.vo.CtrContractProgressSettlementItemVo;
|
||||||
|
import org.dromara.ctr.domain.bo.CtrContractProgressSettlementItemBo;
|
||||||
|
import org.dromara.ctr.domain.CtrContractProgressSettlementItem;
|
||||||
|
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 lilemy
|
||||||
|
* @date 2025-10-18
|
||||||
|
*/
|
||||||
|
public interface ICtrContractProgressSettlementItemService extends IService<CtrContractProgressSettlementItem>{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询承包合同进度结算清单
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 承包合同进度结算清单
|
||||||
|
*/
|
||||||
|
CtrContractProgressSettlementItemVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询承包合同进度结算清单列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 承包合同进度结算清单分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<CtrContractProgressSettlementItemVo> queryPageList(CtrContractProgressSettlementItemBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的承包合同进度结算清单列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 承包合同进度结算清单列表
|
||||||
|
*/
|
||||||
|
List<CtrContractProgressSettlementItemVo> queryList(CtrContractProgressSettlementItemBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增承包合同进度结算清单
|
||||||
|
*
|
||||||
|
* @param bo 承包合同进度结算清单
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(CtrContractProgressSettlementItemBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改承包合同进度结算清单
|
||||||
|
*
|
||||||
|
* @param bo 承包合同进度结算清单
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(CtrContractProgressSettlementItemBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除承包合同进度结算清单信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
@ -0,0 +1,81 @@
|
|||||||
|
package org.dromara.ctr.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.ctr.domain.CtrContractProgressSettlement;
|
||||||
|
import org.dromara.ctr.domain.bo.CtrContractProgressSettlementBo;
|
||||||
|
import org.dromara.ctr.domain.dto.CtrContractProgressSettlementCreateReq;
|
||||||
|
import org.dromara.ctr.domain.dto.CtrContractProgressSettlementUpdateReq;
|
||||||
|
import org.dromara.ctr.domain.vo.CtrContractProgressSettlementTotalVo;
|
||||||
|
import org.dromara.ctr.domain.vo.CtrContractProgressSettlementVo;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 承包合同进度结算Service接口
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18
|
||||||
|
*/
|
||||||
|
public interface ICtrContractProgressSettlementService extends IService<CtrContractProgressSettlement> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询承包合同进度结算
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 承包合同进度结算
|
||||||
|
*/
|
||||||
|
CtrContractProgressSettlementVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询承包合同进度结算列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 承包合同进度结算分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<CtrContractProgressSettlementVo> queryPageList(CtrContractProgressSettlementBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的承包合同进度结算列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 承包合同进度结算列表
|
||||||
|
*/
|
||||||
|
List<CtrContractProgressSettlementVo> queryList(CtrContractProgressSettlementBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询金额统计
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 金额统计
|
||||||
|
*/
|
||||||
|
CtrContractProgressSettlementTotalVo queryMoneyTotal(CtrContractProgressSettlementBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增承包合同进度结算
|
||||||
|
*
|
||||||
|
* @param req 承包合同进度结算
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(CtrContractProgressSettlementCreateReq req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改承包合同进度结算
|
||||||
|
*
|
||||||
|
* @param req 承包合同进度结算
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(CtrContractProgressSettlementUpdateReq req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除承包合同进度结算信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
@ -0,0 +1,70 @@
|
|||||||
|
package org.dromara.ctr.service;
|
||||||
|
|
||||||
|
import org.dromara.ctr.domain.vo.CtrSubcontractProgressSettlementItemVo;
|
||||||
|
import org.dromara.ctr.domain.bo.CtrSubcontractProgressSettlementItemBo;
|
||||||
|
import org.dromara.ctr.domain.CtrSubcontractProgressSettlementItem;
|
||||||
|
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 lilemy
|
||||||
|
* @date 2025-10-18
|
||||||
|
*/
|
||||||
|
public interface ICtrSubcontractProgressSettlementItemService extends IService<CtrSubcontractProgressSettlementItem>{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询分包合同进度结算清单
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 分包合同进度结算清单
|
||||||
|
*/
|
||||||
|
CtrSubcontractProgressSettlementItemVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询分包合同进度结算清单列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 分包合同进度结算清单分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<CtrSubcontractProgressSettlementItemVo> queryPageList(CtrSubcontractProgressSettlementItemBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的分包合同进度结算清单列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 分包合同进度结算清单列表
|
||||||
|
*/
|
||||||
|
List<CtrSubcontractProgressSettlementItemVo> queryList(CtrSubcontractProgressSettlementItemBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增分包合同进度结算清单
|
||||||
|
*
|
||||||
|
* @param bo 分包合同进度结算清单
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(CtrSubcontractProgressSettlementItemBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改分包合同进度结算清单
|
||||||
|
*
|
||||||
|
* @param bo 分包合同进度结算清单
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(CtrSubcontractProgressSettlementItemBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除分包合同进度结算清单信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
@ -0,0 +1,72 @@
|
|||||||
|
package org.dromara.ctr.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.ctr.domain.CtrSubcontractProgressSettlement;
|
||||||
|
import org.dromara.ctr.domain.bo.CtrSubcontractProgressSettlementBo;
|
||||||
|
import org.dromara.ctr.domain.dto.CtrSubcontractProgressSettlementCreateReq;
|
||||||
|
import org.dromara.ctr.domain.dto.CtrSubcontractProgressSettlementUpdateReq;
|
||||||
|
import org.dromara.ctr.domain.vo.CtrSubcontractProgressSettlementVo;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分包合同进度结算Service接口
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18
|
||||||
|
*/
|
||||||
|
public interface ICtrSubcontractProgressSettlementService extends IService<CtrSubcontractProgressSettlement> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询分包合同进度结算
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 分包合同进度结算
|
||||||
|
*/
|
||||||
|
CtrSubcontractProgressSettlementVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询分包合同进度结算列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 分包合同进度结算分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<CtrSubcontractProgressSettlementVo> queryPageList(CtrSubcontractProgressSettlementBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的分包合同进度结算列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 分包合同进度结算列表
|
||||||
|
*/
|
||||||
|
List<CtrSubcontractProgressSettlementVo> queryList(CtrSubcontractProgressSettlementBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增分包合同进度结算
|
||||||
|
*
|
||||||
|
* @param req 分包合同进度结算
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(CtrSubcontractProgressSettlementCreateReq req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改分包合同进度结算
|
||||||
|
*
|
||||||
|
* @param req 分包合同进度结算
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(CtrSubcontractProgressSettlementUpdateReq req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除分包合同进度结算信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
@ -0,0 +1,142 @@
|
|||||||
|
package org.dromara.ctr.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
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.stereotype.Service;
|
||||||
|
import org.dromara.ctr.domain.bo.CtrContractProgressSettlementItemBo;
|
||||||
|
import org.dromara.ctr.domain.vo.CtrContractProgressSettlementItemVo;
|
||||||
|
import org.dromara.ctr.domain.CtrContractProgressSettlementItem;
|
||||||
|
import org.dromara.ctr.mapper.CtrContractProgressSettlementItemMapper;
|
||||||
|
import org.dromara.ctr.service.ICtrContractProgressSettlementItemService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 承包合同进度结算清单Service业务层处理
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18
|
||||||
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class CtrContractProgressSettlementItemServiceImpl extends ServiceImpl<CtrContractProgressSettlementItemMapper, CtrContractProgressSettlementItem> implements ICtrContractProgressSettlementItemService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询承包合同进度结算清单
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 承包合同进度结算清单
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CtrContractProgressSettlementItemVo queryById(Long id){
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询承包合同进度结算清单列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 承包合同进度结算清单分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<CtrContractProgressSettlementItemVo> queryPageList(CtrContractProgressSettlementItemBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<CtrContractProgressSettlementItem> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<CtrContractProgressSettlementItemVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的承包合同进度结算清单列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 承包合同进度结算清单列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<CtrContractProgressSettlementItemVo> queryList(CtrContractProgressSettlementItemBo bo) {
|
||||||
|
LambdaQueryWrapper<CtrContractProgressSettlementItem> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<CtrContractProgressSettlementItem> buildQueryWrapper(CtrContractProgressSettlementItemBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<CtrContractProgressSettlementItem> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.orderByDesc(CtrContractProgressSettlementItem::getId);
|
||||||
|
lqw.eq(bo.getSettlementId() != null, CtrContractProgressSettlementItem::getSettlementId, bo.getSettlementId());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getType()), CtrContractProgressSettlementItem::getType, bo.getType());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getCode()), CtrContractProgressSettlementItem::getCode, bo.getCode());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getName()), CtrContractProgressSettlementItem::getName, bo.getName());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getUnit()), CtrContractProgressSettlementItem::getUnit, bo.getUnit());
|
||||||
|
lqw.eq(bo.getUnitPrice() != null, CtrContractProgressSettlementItem::getUnitPrice, bo.getUnitPrice());
|
||||||
|
lqw.eq(bo.getTaxUnitPrice() != null, CtrContractProgressSettlementItem::getTaxUnitPrice, bo.getTaxUnitPrice());
|
||||||
|
lqw.eq(bo.getCurrentQty() != null, CtrContractProgressSettlementItem::getCurrentQty, bo.getCurrentQty());
|
||||||
|
lqw.eq(bo.getCurrentRate() != null, CtrContractProgressSettlementItem::getCurrentRate, bo.getCurrentRate());
|
||||||
|
lqw.eq(bo.getCurrentAmount() != null, CtrContractProgressSettlementItem::getCurrentAmount, bo.getCurrentAmount());
|
||||||
|
lqw.eq(bo.getCurrentNoAmount() != null, CtrContractProgressSettlementItem::getCurrentNoAmount, bo.getCurrentNoAmount());
|
||||||
|
lqw.eq(bo.getCurrentApprovedQty() != null, CtrContractProgressSettlementItem::getCurrentApprovedQty, bo.getCurrentApprovedQty());
|
||||||
|
lqw.eq(bo.getCurrentApprovedAmount() != null, CtrContractProgressSettlementItem::getCurrentApprovedAmount, bo.getCurrentApprovedAmount());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getTaxRate()), CtrContractProgressSettlementItem::getTaxRate, bo.getTaxRate());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增承包合同进度结算清单
|
||||||
|
*
|
||||||
|
* @param bo 承包合同进度结算清单
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(CtrContractProgressSettlementItemBo bo) {
|
||||||
|
CtrContractProgressSettlementItem add = MapstructUtils.convert(bo, CtrContractProgressSettlementItem.class);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
if (flag) {
|
||||||
|
bo.setId(add.getId());
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改承包合同进度结算清单
|
||||||
|
*
|
||||||
|
* @param bo 承包合同进度结算清单
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(CtrContractProgressSettlementItemBo bo) {
|
||||||
|
CtrContractProgressSettlementItem update = MapstructUtils.convert(bo, CtrContractProgressSettlementItem.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
return baseMapper.updateById(update) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(CtrContractProgressSettlementItem entity){
|
||||||
|
//TODO 做一些数据校验,如唯一约束
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除承包合同进度结算清单信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if(isValid){
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,353 @@
|
|||||||
|
package org.dromara.ctr.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.convert.Convert;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
|
import org.dromara.common.core.utils.ObjectUtils;
|
||||||
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.satoken.utils.LoginHelper;
|
||||||
|
import org.dromara.ctr.domain.CtrContractProgressSettlement;
|
||||||
|
import org.dromara.ctr.domain.CtrContractProgressSettlementItem;
|
||||||
|
import org.dromara.ctr.domain.bo.CtrContractProgressSettlementBo;
|
||||||
|
import org.dromara.ctr.domain.dto.CtrContractProgressSettlementCreateReq;
|
||||||
|
import org.dromara.ctr.domain.dto.CtrContractProgressSettlementItemCreateReq;
|
||||||
|
import org.dromara.ctr.domain.dto.CtrContractProgressSettlementItemUpdateReq;
|
||||||
|
import org.dromara.ctr.domain.dto.CtrContractProgressSettlementUpdateReq;
|
||||||
|
import org.dromara.ctr.domain.vo.CtrContractProgressSettlementItemVo;
|
||||||
|
import org.dromara.ctr.domain.vo.CtrContractProgressSettlementTotalVo;
|
||||||
|
import org.dromara.ctr.domain.vo.CtrContractProgressSettlementVo;
|
||||||
|
import org.dromara.ctr.mapper.CtrContractProgressSettlementMapper;
|
||||||
|
import org.dromara.ctr.service.ICtrContractProgressSettlementItemService;
|
||||||
|
import org.dromara.ctr.service.ICtrContractProgressSettlementService;
|
||||||
|
import org.dromara.system.domain.vo.SysDeptVo;
|
||||||
|
import org.dromara.system.service.ISysDeptService;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 承包合同进度结算Service业务层处理
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18
|
||||||
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class CtrContractProgressSettlementServiceImpl extends ServiceImpl<CtrContractProgressSettlementMapper, CtrContractProgressSettlement>
|
||||||
|
implements ICtrContractProgressSettlementService {
|
||||||
|
|
||||||
|
private final ICtrContractProgressSettlementItemService contractProgressSettlementItemService;
|
||||||
|
|
||||||
|
private final ISysDeptService deptService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询承包合同进度结算
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 承包合同进度结算
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CtrContractProgressSettlementVo queryById(Long id) {
|
||||||
|
CtrContractProgressSettlementVo vo = baseMapper.selectVoById(id);
|
||||||
|
List<CtrContractProgressSettlementItem> list = contractProgressSettlementItemService.lambdaQuery()
|
||||||
|
.eq(CtrContractProgressSettlementItem::getSettlementId, id)
|
||||||
|
.list();
|
||||||
|
if (CollUtil.isNotEmpty(list)) {
|
||||||
|
List<CtrContractProgressSettlementItemVo> listVo = list.stream().map(item ->
|
||||||
|
MapstructUtils.convert(item, CtrContractProgressSettlementItemVo.class))
|
||||||
|
.toList();
|
||||||
|
Map<String, List<CtrContractProgressSettlementItemVo>> map = listVo.stream()
|
||||||
|
.collect(Collectors.groupingBy(CtrContractProgressSettlementItemVo::getType));
|
||||||
|
vo.setInInventory(map.getOrDefault("1", new ArrayList<>()));
|
||||||
|
vo.setChangeInventory(map.getOrDefault("2", new ArrayList<>()));
|
||||||
|
vo.setOutInventory(map.getOrDefault("3", new ArrayList<>()));
|
||||||
|
}
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询承包合同进度结算列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 承包合同进度结算分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<CtrContractProgressSettlementVo> queryPageList(CtrContractProgressSettlementBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<CtrContractProgressSettlement> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<CtrContractProgressSettlementVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的承包合同进度结算列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 承包合同进度结算列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<CtrContractProgressSettlementVo> queryList(CtrContractProgressSettlementBo bo) {
|
||||||
|
LambdaQueryWrapper<CtrContractProgressSettlement> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询金额统计
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 金额统计
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CtrContractProgressSettlementTotalVo queryMoneyTotal(CtrContractProgressSettlementBo bo) {
|
||||||
|
LambdaQueryWrapper<CtrContractProgressSettlement> lqw = Wrappers.lambdaQuery();
|
||||||
|
Long deptId = bo.getDeptId();
|
||||||
|
String type = bo.getType();
|
||||||
|
if (ObjectUtils.isNotEmpty(deptId) && StringUtils.isNotBlank(type) && !LoginHelper.isSuperAdmin()) {
|
||||||
|
SysDeptVo sysDeptVo = deptService.selectDeptById(deptId);
|
||||||
|
List<Long> list = StringUtils.splitTo(sysDeptVo.getAncestors(), Convert::toLong);
|
||||||
|
if (list.size() == 2 && Objects.equals(type, "1")) {
|
||||||
|
lqw.eq(CtrContractProgressSettlement::getDeptId, deptId);
|
||||||
|
} else if (list.size() == 2 && Objects.equals(type, "2")) {
|
||||||
|
lqw.eq(CtrContractProgressSettlement::getSettlementUnit, deptId);
|
||||||
|
} else if (list.size() > 2 && Objects.equals(type, "1")) {
|
||||||
|
lqw.eq(CtrContractProgressSettlement::getDeptId, list.get(2));
|
||||||
|
} else if (list.size() > 2 && Objects.equals(type, "2")) {
|
||||||
|
lqw.eq(CtrContractProgressSettlement::getSettlementUnit, list.get(2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
List<CtrContractProgressSettlement> settlementList = this.list(lqw);
|
||||||
|
CtrContractProgressSettlementTotalVo vo = new CtrContractProgressSettlementTotalVo();
|
||||||
|
if (CollUtil.isEmpty(settlementList)) {
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
if (Objects.equals(type, "1")) {
|
||||||
|
vo.setMoneyTotal(settlementList.stream().map(CtrContractProgressSettlement::getSettlementMoney)
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||||
|
} else if (Objects.equals(type, "2")) {
|
||||||
|
vo.setMoneyTotal(settlementList.stream().map(CtrContractProgressSettlement::getDeductionMoney)
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||||
|
}
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<CtrContractProgressSettlement> buildQueryWrapper(CtrContractProgressSettlementBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<CtrContractProgressSettlement> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.orderByDesc(CtrContractProgressSettlement::getId);
|
||||||
|
Long deptId = bo.getDeptId();
|
||||||
|
String type = bo.getType();
|
||||||
|
if (ObjectUtils.isNotEmpty(deptId) && StringUtils.isNotBlank(type) && !LoginHelper.isSuperAdmin()) {
|
||||||
|
SysDeptVo sysDeptVo = deptService.selectDeptById(deptId);
|
||||||
|
List<Long> list = StringUtils.splitTo(sysDeptVo.getAncestors(), Convert::toLong);
|
||||||
|
if (list.size() == 2 && Objects.equals(type, "1")) {
|
||||||
|
lqw.eq(CtrContractProgressSettlement::getDeptId, deptId);
|
||||||
|
} else if (list.size() == 2 && Objects.equals(type, "2")) {
|
||||||
|
lqw.eq(CtrContractProgressSettlement::getSettlementUnit, deptId);
|
||||||
|
} else if (list.size() > 2 && Objects.equals(type, "1")) {
|
||||||
|
lqw.eq(CtrContractProgressSettlement::getDeptId, list.get(2));
|
||||||
|
} else if (list.size() > 2 && Objects.equals(type, "2")) {
|
||||||
|
lqw.eq(CtrContractProgressSettlement::getSettlementUnit, list.get(2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getDocumentCode()), CtrContractProgressSettlement::getDocumentCode, bo.getDocumentCode());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), CtrContractProgressSettlement::getTitle, bo.getTitle());
|
||||||
|
lqw.eq(bo.getSettlementDate() != null, CtrContractProgressSettlement::getSettlementDate, bo.getSettlementDate());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getContractCode()), CtrContractProgressSettlement::getContractCode, bo.getContractCode());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getContractName()), CtrContractProgressSettlement::getContractName, bo.getContractName());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getContractProgress()), CtrContractProgressSettlement::getContractProgress, bo.getContractProgress());
|
||||||
|
lqw.eq(bo.getProjectId() != null, CtrContractProgressSettlement::getProjectId, bo.getProjectId());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getProjectName()), CtrContractProgressSettlement::getProjectName, bo.getProjectName());
|
||||||
|
lqw.eq(bo.getApprovalAmount() != null, CtrContractProgressSettlement::getApprovalAmount, bo.getApprovalAmount());
|
||||||
|
lqw.eq(bo.getMeasureDateBegin() != null, CtrContractProgressSettlement::getMeasureDateBegin, bo.getMeasureDateBegin());
|
||||||
|
lqw.eq(bo.getMeasureDateEnd() != null, CtrContractProgressSettlement::getMeasureDateEnd, bo.getMeasureDateEnd());
|
||||||
|
lqw.eq(bo.getSettlementUnit() != null, CtrContractProgressSettlement::getSettlementUnit, bo.getSettlementUnit());
|
||||||
|
lqw.eq(bo.getSettlementMoney() != null, CtrContractProgressSettlement::getSettlementMoney, bo.getSettlementMoney());
|
||||||
|
lqw.eq(bo.getDeductionMoney() != null, CtrContractProgressSettlement::getDeductionMoney, bo.getDeductionMoney());
|
||||||
|
lqw.eq(bo.getBonus() != null, CtrContractProgressSettlement::getBonus, bo.getBonus());
|
||||||
|
lqw.eq(bo.getContractAmount() != null, CtrContractProgressSettlement::getContractAmount, bo.getContractAmount());
|
||||||
|
lqw.eq(bo.getThisSettlementRatio() != null, CtrContractProgressSettlement::getThisSettlementRatio, bo.getThisSettlementRatio());
|
||||||
|
lqw.eq(bo.getPaymentTerms() != null, CtrContractProgressSettlement::getPaymentTerms, bo.getPaymentTerms());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getFileId()), CtrContractProgressSettlement::getFileId, bo.getFileId());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增承包合同进度结算
|
||||||
|
*
|
||||||
|
* @param req 承包合同进度结算
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean insertByBo(CtrContractProgressSettlementCreateReq req) {
|
||||||
|
CtrContractProgressSettlement add = MapstructUtils.convert(req, CtrContractProgressSettlement.class);
|
||||||
|
if (Objects.equals(req.getDeptId(), req.getSettlementUnit())) {
|
||||||
|
throw new ServiceException("结算单位不能与收款单位相同");
|
||||||
|
}
|
||||||
|
// 生成唯一编号
|
||||||
|
LocalDate today = LocalDate.now();
|
||||||
|
Long userId = LoginHelper.getUserId();
|
||||||
|
boolean flag;
|
||||||
|
synchronized (userId.toString().intern()) {
|
||||||
|
LocalDateTime startOfDay = today.atStartOfDay();
|
||||||
|
LocalDateTime endOfDay = today.plusDays(1).atStartOfDay().minusNanos(1);
|
||||||
|
// 获取当天的最大编号
|
||||||
|
Long count = this.lambdaQuery()
|
||||||
|
.between(CtrContractProgressSettlement::getCreateTime, startOfDay, endOfDay)
|
||||||
|
.count();
|
||||||
|
String result = String.format("%03d", count + 1); // 3表示长度,0表示补0
|
||||||
|
add.setDocumentCode(today.format(DateTimeFormatter.BASIC_ISO_DATE) + "-" + result);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
flag = baseMapper.insert(add) > 0;
|
||||||
|
}
|
||||||
|
if (flag) {
|
||||||
|
Long id = add.getId();
|
||||||
|
List<CtrContractProgressSettlementItemCreateReq> inInventory = req.getInInventory();
|
||||||
|
List<CtrContractProgressSettlementItemCreateReq> changeInventory = req.getChangeInventory();
|
||||||
|
List<CtrContractProgressSettlementItemCreateReq> outInventory = req.getOutInventory();
|
||||||
|
List<CtrContractProgressSettlementItem> itemList = new ArrayList<>();
|
||||||
|
itemList.addAll(inInventory.stream().map(r -> {
|
||||||
|
CtrContractProgressSettlementItem item = new CtrContractProgressSettlementItem();
|
||||||
|
item.setSettlementId(id);
|
||||||
|
item.setType("1");
|
||||||
|
BeanUtils.copyProperties(r, item);
|
||||||
|
return item;
|
||||||
|
}).toList());
|
||||||
|
itemList.addAll(changeInventory.stream().map(r -> {
|
||||||
|
CtrContractProgressSettlementItem item = new CtrContractProgressSettlementItem();
|
||||||
|
item.setSettlementId(id);
|
||||||
|
item.setType("2");
|
||||||
|
BeanUtils.copyProperties(r, item);
|
||||||
|
return item;
|
||||||
|
}).toList());
|
||||||
|
itemList.addAll(outInventory.stream().map(r -> {
|
||||||
|
CtrContractProgressSettlementItem item = new CtrContractProgressSettlementItem();
|
||||||
|
item.setSettlementId(id);
|
||||||
|
item.setType("3");
|
||||||
|
BeanUtils.copyProperties(r, item);
|
||||||
|
return item;
|
||||||
|
}).toList());
|
||||||
|
if (CollUtil.isNotEmpty(itemList)) {
|
||||||
|
boolean saveBatch = contractProgressSettlementItemService.saveBatch(itemList);
|
||||||
|
if (!saveBatch) {
|
||||||
|
throw new ServiceException("保存承包合同进度结算明细失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改承包合同进度结算
|
||||||
|
*
|
||||||
|
* @param req 承包合同进度结算
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean updateByBo(CtrContractProgressSettlementUpdateReq req) {
|
||||||
|
CtrContractProgressSettlement update = MapstructUtils.convert(req, CtrContractProgressSettlement.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
if (Objects.equals(req.getDeptId(), req.getSettlementUnit())) {
|
||||||
|
throw new ServiceException("结算单位不能与收款单位相同");
|
||||||
|
}
|
||||||
|
Long id = req.getId();
|
||||||
|
// 删除旧数据
|
||||||
|
List<CtrContractProgressSettlementItem> oldList = contractProgressSettlementItemService.lambdaQuery()
|
||||||
|
.eq(CtrContractProgressSettlementItem::getSettlementId, id)
|
||||||
|
.list();
|
||||||
|
if (CollUtil.isNotEmpty(oldList)) {
|
||||||
|
boolean deleteBatch = contractProgressSettlementItemService.removeByIds(oldList);
|
||||||
|
if (!deleteBatch) {
|
||||||
|
throw new ServiceException("删除承包合同进度结算明细失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 新增子数据
|
||||||
|
List<CtrContractProgressSettlementItemUpdateReq> inInventory = req.getInInventory();
|
||||||
|
List<CtrContractProgressSettlementItemUpdateReq> changeInventory = req.getChangeInventory();
|
||||||
|
List<CtrContractProgressSettlementItemUpdateReq> outInventory = req.getOutInventory();
|
||||||
|
List<CtrContractProgressSettlementItem> itemList = new ArrayList<>();
|
||||||
|
itemList.addAll(inInventory.stream().map(r -> {
|
||||||
|
CtrContractProgressSettlementItem item = new CtrContractProgressSettlementItem();
|
||||||
|
item.setSettlementId(id);
|
||||||
|
item.setType("1");
|
||||||
|
BeanUtils.copyProperties(r, item);
|
||||||
|
return item;
|
||||||
|
}).toList());
|
||||||
|
itemList.addAll(changeInventory.stream().map(r -> {
|
||||||
|
CtrContractProgressSettlementItem item = new CtrContractProgressSettlementItem();
|
||||||
|
item.setSettlementId(id);
|
||||||
|
item.setType("2");
|
||||||
|
BeanUtils.copyProperties(r, item);
|
||||||
|
return item;
|
||||||
|
}).toList());
|
||||||
|
itemList.addAll(outInventory.stream().map(r -> {
|
||||||
|
CtrContractProgressSettlementItem item = new CtrContractProgressSettlementItem();
|
||||||
|
item.setSettlementId(id);
|
||||||
|
item.setType("3");
|
||||||
|
BeanUtils.copyProperties(r, item);
|
||||||
|
return item;
|
||||||
|
}).toList());
|
||||||
|
if (CollUtil.isNotEmpty(itemList)) {
|
||||||
|
boolean saveBatch = contractProgressSettlementItemService.saveBatch(itemList);
|
||||||
|
if (!saveBatch) {
|
||||||
|
throw new ServiceException("保存承包合同进度结算明细失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 保存主数据
|
||||||
|
boolean b = baseMapper.updateById(update) > 0;
|
||||||
|
if (!b) {
|
||||||
|
throw new ServiceException("修改承包合同进度结算失败");
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(CtrContractProgressSettlement entity) {
|
||||||
|
//TODO 做一些数据校验,如唯一约束
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除承包合同进度结算信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if (isValid) {
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
// 删除关联数据
|
||||||
|
List<CtrContractProgressSettlementItem> list = contractProgressSettlementItemService.lambdaQuery()
|
||||||
|
.in(CtrContractProgressSettlementItem::getSettlementId, ids)
|
||||||
|
.list();
|
||||||
|
if (CollUtil.isNotEmpty(list)) {
|
||||||
|
boolean deleteBatch = contractProgressSettlementItemService.removeByIds(list);
|
||||||
|
if (!deleteBatch) {
|
||||||
|
throw new ServiceException("删除承包合同进度结算明细失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,150 @@
|
|||||||
|
package org.dromara.ctr.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.ctr.domain.CtrSubcontractProgressSettlementItem;
|
||||||
|
import org.dromara.ctr.domain.bo.CtrSubcontractProgressSettlementItemBo;
|
||||||
|
import org.dromara.ctr.domain.vo.CtrSubcontractProgressSettlementItemVo;
|
||||||
|
import org.dromara.ctr.mapper.CtrSubcontractProgressSettlementItemMapper;
|
||||||
|
import org.dromara.ctr.service.ICtrSubcontractProgressSettlementItemService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分包合同进度结算清单Service业务层处理
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18
|
||||||
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class CtrSubcontractProgressSettlementItemServiceImpl extends ServiceImpl<CtrSubcontractProgressSettlementItemMapper, CtrSubcontractProgressSettlementItem>
|
||||||
|
implements ICtrSubcontractProgressSettlementItemService {
|
||||||
|
|
||||||
|
private final CtrSubcontractProgressSettlementItemMapper baseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询分包合同进度结算清单
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 分包合同进度结算清单
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CtrSubcontractProgressSettlementItemVo queryById(Long id) {
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询分包合同进度结算清单列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 分包合同进度结算清单分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<CtrSubcontractProgressSettlementItemVo> queryPageList(CtrSubcontractProgressSettlementItemBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<CtrSubcontractProgressSettlementItem> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<CtrSubcontractProgressSettlementItemVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的分包合同进度结算清单列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 分包合同进度结算清单列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<CtrSubcontractProgressSettlementItemVo> queryList(CtrSubcontractProgressSettlementItemBo bo) {
|
||||||
|
LambdaQueryWrapper<CtrSubcontractProgressSettlementItem> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<CtrSubcontractProgressSettlementItem> buildQueryWrapper(CtrSubcontractProgressSettlementItemBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<CtrSubcontractProgressSettlementItem> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.orderByDesc(CtrSubcontractProgressSettlementItem::getId);
|
||||||
|
lqw.eq(bo.getSettlementId() != null, CtrSubcontractProgressSettlementItem::getSettlementId, bo.getSettlementId());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getType()), CtrSubcontractProgressSettlementItem::getType, bo.getType());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getCode()), CtrSubcontractProgressSettlementItem::getCode, bo.getCode());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getName()), CtrSubcontractProgressSettlementItem::getName, bo.getName());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getUnit()), CtrSubcontractProgressSettlementItem::getUnit, bo.getUnit());
|
||||||
|
lqw.eq(bo.getUnitPrice() != null, CtrSubcontractProgressSettlementItem::getUnitPrice, bo.getUnitPrice());
|
||||||
|
lqw.eq(bo.getTaxUnitPrice() != null, CtrSubcontractProgressSettlementItem::getTaxUnitPrice, bo.getTaxUnitPrice());
|
||||||
|
lqw.eq(bo.getCurrentQty() != null, CtrSubcontractProgressSettlementItem::getCurrentQty, bo.getCurrentQty());
|
||||||
|
lqw.eq(bo.getCurrentRate() != null, CtrSubcontractProgressSettlementItem::getCurrentRate, bo.getCurrentRate());
|
||||||
|
lqw.eq(bo.getCurrentAmount() != null, CtrSubcontractProgressSettlementItem::getCurrentAmount, bo.getCurrentAmount());
|
||||||
|
lqw.eq(bo.getCurrentNoAmount() != null, CtrSubcontractProgressSettlementItem::getCurrentNoAmount, bo.getCurrentNoAmount());
|
||||||
|
lqw.eq(bo.getCurrentApprovedQty() != null, CtrSubcontractProgressSettlementItem::getCurrentApprovedQty, bo.getCurrentApprovedQty());
|
||||||
|
lqw.eq(bo.getCurrentApprovedAmount() != null, CtrSubcontractProgressSettlementItem::getCurrentApprovedAmount, bo.getCurrentApprovedAmount());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getTaxRate()), CtrSubcontractProgressSettlementItem::getTaxRate, bo.getTaxRate());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getTax()), CtrSubcontractProgressSettlementItem::getTax, bo.getTax());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getWbs()), CtrSubcontractProgressSettlementItem::getWbs, bo.getWbs());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getCbs()), CtrSubcontractProgressSettlementItem::getCbs, bo.getCbs());
|
||||||
|
lqw.eq(bo.getCbsBudgetTotal() != null, CtrSubcontractProgressSettlementItem::getCbsBudgetTotal, bo.getCbsBudgetTotal());
|
||||||
|
lqw.eq(bo.getCbsBalance() != null, CtrSubcontractProgressSettlementItem::getCbsBalance, bo.getCbsBalance());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增分包合同进度结算清单
|
||||||
|
*
|
||||||
|
* @param bo 分包合同进度结算清单
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(CtrSubcontractProgressSettlementItemBo bo) {
|
||||||
|
CtrSubcontractProgressSettlementItem add = MapstructUtils.convert(bo, CtrSubcontractProgressSettlementItem.class);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
if (flag) {
|
||||||
|
bo.setId(add.getId());
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改分包合同进度结算清单
|
||||||
|
*
|
||||||
|
* @param bo 分包合同进度结算清单
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(CtrSubcontractProgressSettlementItemBo bo) {
|
||||||
|
CtrSubcontractProgressSettlementItem update = MapstructUtils.convert(bo, CtrSubcontractProgressSettlementItem.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
return baseMapper.updateById(update) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(CtrSubcontractProgressSettlementItem entity) {
|
||||||
|
//TODO 做一些数据校验,如唯一约束
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除分包合同进度结算清单信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if (isValid) {
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,280 @@
|
|||||||
|
package org.dromara.ctr.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
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.PageQuery;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.satoken.utils.LoginHelper;
|
||||||
|
import org.dromara.ctr.domain.CtrSubcontractProgressSettlement;
|
||||||
|
import org.dromara.ctr.domain.CtrSubcontractProgressSettlementItem;
|
||||||
|
import org.dromara.ctr.domain.bo.CtrSubcontractProgressSettlementBo;
|
||||||
|
import org.dromara.ctr.domain.dto.CtrSubcontractProgressSettlementCreateReq;
|
||||||
|
import org.dromara.ctr.domain.dto.CtrSubcontractProgressSettlementItemCreateReq;
|
||||||
|
import org.dromara.ctr.domain.dto.CtrSubcontractProgressSettlementItemUpdateReq;
|
||||||
|
import org.dromara.ctr.domain.dto.CtrSubcontractProgressSettlementUpdateReq;
|
||||||
|
import org.dromara.ctr.domain.vo.CtrSubcontractProgressSettlementItemVo;
|
||||||
|
import org.dromara.ctr.domain.vo.CtrSubcontractProgressSettlementVo;
|
||||||
|
import org.dromara.ctr.mapper.CtrSubcontractProgressSettlementMapper;
|
||||||
|
import org.dromara.ctr.service.ICtrSubcontractProgressSettlementItemService;
|
||||||
|
import org.dromara.ctr.service.ICtrSubcontractProgressSettlementService;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分包合同进度结算Service业务层处理
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-18
|
||||||
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class CtrSubcontractProgressSettlementServiceImpl extends ServiceImpl<CtrSubcontractProgressSettlementMapper, CtrSubcontractProgressSettlement>
|
||||||
|
implements ICtrSubcontractProgressSettlementService {
|
||||||
|
|
||||||
|
private final ICtrSubcontractProgressSettlementItemService subcontractProgressSettlementItemService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询分包合同进度结算
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 分包合同进度结算
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CtrSubcontractProgressSettlementVo queryById(Long id) {
|
||||||
|
CtrSubcontractProgressSettlementVo vo = baseMapper.selectVoById(id);
|
||||||
|
List<CtrSubcontractProgressSettlementItem> list = subcontractProgressSettlementItemService.lambdaQuery()
|
||||||
|
.eq(CtrSubcontractProgressSettlementItem::getSettlementId, id)
|
||||||
|
.list();
|
||||||
|
if (CollUtil.isNotEmpty(list)) {
|
||||||
|
List<CtrSubcontractProgressSettlementItemVo> listVo = list.stream().map(item ->
|
||||||
|
MapstructUtils.convert(item, CtrSubcontractProgressSettlementItemVo.class))
|
||||||
|
.toList();
|
||||||
|
Map<String, List<CtrSubcontractProgressSettlementItemVo>> map = listVo.stream()
|
||||||
|
.collect(Collectors.groupingBy(CtrSubcontractProgressSettlementItemVo::getType));
|
||||||
|
vo.setInInventory(map.getOrDefault("1", new ArrayList<>()));
|
||||||
|
vo.setChangeInventory(map.getOrDefault("2", new ArrayList<>()));
|
||||||
|
vo.setOutInventory(map.getOrDefault("3", new ArrayList<>()));
|
||||||
|
}
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询分包合同进度结算列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 分包合同进度结算分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<CtrSubcontractProgressSettlementVo> queryPageList(CtrSubcontractProgressSettlementBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<CtrSubcontractProgressSettlement> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<CtrSubcontractProgressSettlementVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的分包合同进度结算列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 分包合同进度结算列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<CtrSubcontractProgressSettlementVo> queryList(CtrSubcontractProgressSettlementBo bo) {
|
||||||
|
LambdaQueryWrapper<CtrSubcontractProgressSettlement> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<CtrSubcontractProgressSettlement> buildQueryWrapper(CtrSubcontractProgressSettlementBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<CtrSubcontractProgressSettlement> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.orderByDesc(CtrSubcontractProgressSettlement::getId);
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getDocumentCode()), CtrSubcontractProgressSettlement::getDocumentCode, bo.getDocumentCode());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), CtrSubcontractProgressSettlement::getTitle, bo.getTitle());
|
||||||
|
lqw.eq(bo.getDocumentDate() != null, CtrSubcontractProgressSettlement::getDocumentDate, bo.getDocumentDate());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getContractCode()), CtrSubcontractProgressSettlement::getContractCode, bo.getContractCode());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getContractName()), CtrSubcontractProgressSettlement::getContractName, bo.getContractName());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getContractProgress()), CtrSubcontractProgressSettlement::getContractProgress, bo.getContractProgress());
|
||||||
|
lqw.eq(bo.getMeasureDateBegin() != null, CtrSubcontractProgressSettlement::getMeasureDateBegin, bo.getMeasureDateBegin());
|
||||||
|
lqw.eq(bo.getMeasureDateEnd() != null, CtrSubcontractProgressSettlement::getMeasureDateEnd, bo.getMeasureDateEnd());
|
||||||
|
lqw.eq(bo.getProjectId() != null, CtrSubcontractProgressSettlement::getProjectId, bo.getProjectId());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getProjectName()), CtrSubcontractProgressSettlement::getProjectName, bo.getProjectName());
|
||||||
|
lqw.eq(bo.getApprovalAmount() != null, CtrSubcontractProgressSettlement::getApprovalAmount, bo.getApprovalAmount());
|
||||||
|
lqw.eq(bo.getSettlementUnit() != null, CtrSubcontractProgressSettlement::getSettlementUnit, bo.getSettlementUnit());
|
||||||
|
lqw.eq(bo.getContractAmount() != null, CtrSubcontractProgressSettlement::getContractAmount, bo.getContractAmount());
|
||||||
|
lqw.eq(bo.getCurrentSettlementRate() != null, CtrSubcontractProgressSettlement::getCurrentSettlementRate, bo.getCurrentSettlementRate());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getFileId()), CtrSubcontractProgressSettlement::getFileId, bo.getFileId());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getAuditStatus()), CtrSubcontractProgressSettlement::getAuditStatus, bo.getAuditStatus());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增分包合同进度结算
|
||||||
|
*
|
||||||
|
* @param req 分包合同进度结算
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(CtrSubcontractProgressSettlementCreateReq req) {
|
||||||
|
CtrSubcontractProgressSettlement add = MapstructUtils.convert(req, CtrSubcontractProgressSettlement.class);
|
||||||
|
// 生成唯一编号
|
||||||
|
LocalDate today = LocalDate.now();
|
||||||
|
Long userId = LoginHelper.getUserId();
|
||||||
|
boolean flag;
|
||||||
|
synchronized (userId.toString().intern()) {
|
||||||
|
LocalDateTime startOfDay = today.atStartOfDay();
|
||||||
|
LocalDateTime endOfDay = today.plusDays(1).atStartOfDay().minusNanos(1);
|
||||||
|
// 获取当天的最大编号
|
||||||
|
Long count = this.lambdaQuery()
|
||||||
|
.between(CtrSubcontractProgressSettlement::getCreateTime, startOfDay, endOfDay)
|
||||||
|
.count();
|
||||||
|
String result = String.format("%03d", count + 1); // 3表示长度,0表示补0
|
||||||
|
add.setDocumentCode(today.format(DateTimeFormatter.BASIC_ISO_DATE) + "-" + result);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
flag = baseMapper.insert(add) > 0;
|
||||||
|
}
|
||||||
|
if (flag) {
|
||||||
|
Long id = add.getId();
|
||||||
|
List<CtrSubcontractProgressSettlementItemCreateReq> inInventory = req.getInInventory();
|
||||||
|
List<CtrSubcontractProgressSettlementItemCreateReq> changeInventory = req.getChangeInventory();
|
||||||
|
List<CtrSubcontractProgressSettlementItemCreateReq> outInventory = req.getOutInventory();
|
||||||
|
List<CtrSubcontractProgressSettlementItem> itemList = new ArrayList<>();
|
||||||
|
itemList.addAll(inInventory.stream().map(r -> {
|
||||||
|
CtrSubcontractProgressSettlementItem item = new CtrSubcontractProgressSettlementItem();
|
||||||
|
item.setSettlementId(id);
|
||||||
|
item.setType("1");
|
||||||
|
BeanUtils.copyProperties(r, item);
|
||||||
|
return item;
|
||||||
|
}).toList());
|
||||||
|
itemList.addAll(changeInventory.stream().map(r -> {
|
||||||
|
CtrSubcontractProgressSettlementItem item = new CtrSubcontractProgressSettlementItem();
|
||||||
|
item.setSettlementId(id);
|
||||||
|
item.setType("2");
|
||||||
|
BeanUtils.copyProperties(r, item);
|
||||||
|
return item;
|
||||||
|
}).toList());
|
||||||
|
itemList.addAll(outInventory.stream().map(r -> {
|
||||||
|
CtrSubcontractProgressSettlementItem item = new CtrSubcontractProgressSettlementItem();
|
||||||
|
item.setSettlementId(id);
|
||||||
|
item.setType("3");
|
||||||
|
BeanUtils.copyProperties(r, item);
|
||||||
|
return item;
|
||||||
|
}).toList());
|
||||||
|
if (CollUtil.isNotEmpty(itemList)) {
|
||||||
|
boolean saveBatch = subcontractProgressSettlementItemService.saveBatch(itemList);
|
||||||
|
if (!saveBatch) {
|
||||||
|
throw new ServiceException("保存分包合同进度结算明细失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改分包合同进度结算
|
||||||
|
*
|
||||||
|
* @param req 分包合同进度结算
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(CtrSubcontractProgressSettlementUpdateReq req) {
|
||||||
|
CtrSubcontractProgressSettlement update = MapstructUtils.convert(req, CtrSubcontractProgressSettlement.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
Long id = req.getId();
|
||||||
|
// 删除旧数据
|
||||||
|
List<CtrSubcontractProgressSettlementItem> oldList = subcontractProgressSettlementItemService.lambdaQuery()
|
||||||
|
.eq(CtrSubcontractProgressSettlementItem::getSettlementId, id)
|
||||||
|
.list();
|
||||||
|
if (CollUtil.isNotEmpty(oldList)) {
|
||||||
|
boolean deleteBatch = subcontractProgressSettlementItemService.removeByIds(oldList);
|
||||||
|
if (!deleteBatch) {
|
||||||
|
throw new ServiceException("删除分包合同进度结算明细失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 新增子数据
|
||||||
|
List<CtrSubcontractProgressSettlementItemUpdateReq> inInventory = req.getInInventory();
|
||||||
|
List<CtrSubcontractProgressSettlementItemUpdateReq> changeInventory = req.getChangeInventory();
|
||||||
|
List<CtrSubcontractProgressSettlementItemUpdateReq> outInventory = req.getOutInventory();
|
||||||
|
List<CtrSubcontractProgressSettlementItem> itemList = new ArrayList<>();
|
||||||
|
itemList.addAll(inInventory.stream().map(r -> {
|
||||||
|
CtrSubcontractProgressSettlementItem item = new CtrSubcontractProgressSettlementItem();
|
||||||
|
item.setSettlementId(id);
|
||||||
|
item.setType("1");
|
||||||
|
BeanUtils.copyProperties(r, item);
|
||||||
|
return item;
|
||||||
|
}).toList());
|
||||||
|
itemList.addAll(changeInventory.stream().map(r -> {
|
||||||
|
CtrSubcontractProgressSettlementItem item = new CtrSubcontractProgressSettlementItem();
|
||||||
|
item.setSettlementId(id);
|
||||||
|
item.setType("2");
|
||||||
|
BeanUtils.copyProperties(r, item);
|
||||||
|
return item;
|
||||||
|
}).toList());
|
||||||
|
itemList.addAll(outInventory.stream().map(r -> {
|
||||||
|
CtrSubcontractProgressSettlementItem item = new CtrSubcontractProgressSettlementItem();
|
||||||
|
item.setSettlementId(id);
|
||||||
|
item.setType("3");
|
||||||
|
BeanUtils.copyProperties(r, item);
|
||||||
|
return item;
|
||||||
|
}).toList());
|
||||||
|
if (CollUtil.isNotEmpty(itemList)) {
|
||||||
|
boolean saveBatch = subcontractProgressSettlementItemService.saveBatch(itemList);
|
||||||
|
if (!saveBatch) {
|
||||||
|
throw new ServiceException("保存承包合同进度结算明细失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 保存主数据
|
||||||
|
boolean b = baseMapper.updateById(update) > 0;
|
||||||
|
if (!b) {
|
||||||
|
throw new ServiceException("修改分包合同进度结算失败");
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(CtrSubcontractProgressSettlement entity) {
|
||||||
|
//TODO 做一些数据校验,如唯一约束
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除分包合同进度结算信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if (isValid) {
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
// 删除关联数据
|
||||||
|
List<CtrSubcontractProgressSettlementItem> list = subcontractProgressSettlementItemService.lambdaQuery()
|
||||||
|
.in(CtrSubcontractProgressSettlementItem::getSettlementId, ids)
|
||||||
|
.list();
|
||||||
|
if (CollUtil.isNotEmpty(list)) {
|
||||||
|
boolean deleteBatch = subcontractProgressSettlementItemService.removeByIds(list);
|
||||||
|
if (!deleteBatch) {
|
||||||
|
throw new ServiceException("删除分包合同进度结算明细失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,146 @@
|
|||||||
|
package org.dromara.design.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
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.web.core.BaseController;
|
||||||
|
import org.dromara.design.domain.DesConstructionSchedulePlan;
|
||||||
|
import org.dromara.design.domain.dto.constructionscheduleplan.*;
|
||||||
|
import org.dromara.design.domain.vo.DesConstructionSchedulePlanVo;
|
||||||
|
import org.dromara.design.service.IDesConstructionSchedulePlanService;
|
||||||
|
|
||||||
|
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计计划
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-08-01
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/design/constructionSchedulePlan")
|
||||||
|
public class DesConstructionSchedulePlanController extends BaseController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IDesConstructionSchedulePlanService desConstructionSchedulePlanService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询设计计划列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("design:constructionSchedulePlan:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public R<List<DesConstructionSchedulePlanVo>> list(DesConstructionSchedulePlanQueryReq req) {
|
||||||
|
List<DesConstructionSchedulePlanVo> list = desConstructionSchedulePlanService.queryList(req);
|
||||||
|
return R.ok(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出设计计划列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("design:constructionSchedulePlan:export")
|
||||||
|
@Log(title = "施工进度计划", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(DesConstructionSchedulePlanQueryReq req, HttpServletResponse response) {
|
||||||
|
List<DesConstructionSchedulePlanVo> list = desConstructionSchedulePlanService.queryList(req);
|
||||||
|
ExcelUtil.exportExcel(list, "施工进度计划", DesConstructionSchedulePlanVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据项目id导出设计计划模版
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("design:constructionSchedulePlan:exportTemplate")
|
||||||
|
@Log(title = "施工进度计划", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/exportTemplate/{projectId}")
|
||||||
|
public void exportExcelByProjectId(@NotNull(message = "项目id不能为空")
|
||||||
|
@PathVariable Long projectId, HttpServletResponse response) {
|
||||||
|
desConstructionSchedulePlanService.exportExcelByProjectId(projectId, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 读取设计计划模版
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("design:constructionSchedulePlan:readTemplate")
|
||||||
|
@Log(title = "施工进度计划", businessType = BusinessType.IMPORT)
|
||||||
|
@PostMapping("/readTemplate")
|
||||||
|
public R<Void> readExcel(@RequestParam("file") MultipartFile file, Long projectId) {
|
||||||
|
List<DesConstructionSchedulePlanExcelDto> list = desConstructionSchedulePlanService.readExcel(file, projectId);
|
||||||
|
if (CollUtil.isNotEmpty(list)) {
|
||||||
|
List<DesConstructionSchedulePlan> planList = desConstructionSchedulePlanService.convertToEntities(list);
|
||||||
|
return toAjax(desConstructionSchedulePlanService.saveBatch(planList));
|
||||||
|
}
|
||||||
|
return toAjax(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取设计计划详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("design:constructionSchedulePlan:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<DesConstructionSchedulePlanVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(desConstructionSchedulePlanService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增设计计划
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("design:constructionSchedulePlan:add")
|
||||||
|
@Log(title = "施工进度计划", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<DesConstructionSchedulePlanVo> add(@Validated @RequestBody DesConstructionSchedulePlanCreateReq req) {
|
||||||
|
return R.ok(desConstructionSchedulePlanService.insertByBo(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改设计计划
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("design:constructionSchedulePlan:edit")
|
||||||
|
@Log(title = "施工进度计划", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated @RequestBody DesConstructionSchedulePlanUpdateReq req) {
|
||||||
|
return toAjax(desConstructionSchedulePlanService.updateByBo(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改设计计划为完成状态
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("design:constructionSchedulePlan:editFinish")
|
||||||
|
@Log(title = "施工进度计划", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping("/finish")
|
||||||
|
public R<Void> editFinish(@Validated @RequestBody DesConstructionSchedulePlanFinishReq req) {
|
||||||
|
return toAjax(desConstructionSchedulePlanService.updateFinish(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除设计计划
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("design:constructionSchedulePlan:remove")
|
||||||
|
@Log(title = "施工进度计划", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(desConstructionSchedulePlanService.deleteByIds(List.of(ids)));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,105 @@
|
|||||||
|
package org.dromara.design.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.design.domain.vo.DesSmsRecordVo;
|
||||||
|
import org.dromara.design.domain.bo.DesSmsRecordBo;
|
||||||
|
import org.dromara.design.service.IDesSmsRecordService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计图纸短信记录
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-10-13
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/design/smsRecord")
|
||||||
|
public class DesSmsRecordController extends BaseController {
|
||||||
|
|
||||||
|
private final IDesSmsRecordService desSmsRecordService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询设计图纸短信记录列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("design:smsRecord:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<DesSmsRecordVo> list(DesSmsRecordBo bo, PageQuery pageQuery) {
|
||||||
|
return desSmsRecordService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出设计图纸短信记录列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("design:smsRecord:export")
|
||||||
|
@Log(title = "设计图纸短信记录", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(DesSmsRecordBo bo, HttpServletResponse response) {
|
||||||
|
List<DesSmsRecordVo> list = desSmsRecordService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "设计图纸短信记录", DesSmsRecordVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取设计图纸短信记录详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("design:smsRecord:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<DesSmsRecordVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(desSmsRecordService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增设计图纸短信记录
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("design:smsRecord:add")
|
||||||
|
@Log(title = "设计图纸短信记录", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody DesSmsRecordBo bo) {
|
||||||
|
return toAjax(desSmsRecordService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改设计图纸短信记录
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("design:smsRecord:edit")
|
||||||
|
@Log(title = "设计图纸短信记录", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody DesSmsRecordBo bo) {
|
||||||
|
return toAjax(desSmsRecordService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除设计图纸短信记录
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("design:smsRecord:remove")
|
||||||
|
@Log(title = "设计图纸短信记录", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(desSmsRecordService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -14,8 +14,10 @@ import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|||||||
import org.dromara.common.web.core.BaseController;
|
import org.dromara.common.web.core.BaseController;
|
||||||
import org.dromara.design.domain.bo.DesUserBo;
|
import org.dromara.design.domain.bo.DesUserBo;
|
||||||
import org.dromara.design.domain.bo.DesVolumeFileBo;
|
import org.dromara.design.domain.bo.DesVolumeFileBo;
|
||||||
|
import org.dromara.design.domain.dto.volumefile.AuditFileDto;
|
||||||
import org.dromara.design.domain.dto.volumefile.DesVolumeFileCreateReq;
|
import org.dromara.design.domain.dto.volumefile.DesVolumeFileCreateReq;
|
||||||
import org.dromara.design.domain.vo.DesUserVo;
|
import org.dromara.design.domain.vo.DesUserVo;
|
||||||
|
import org.dromara.design.domain.vo.volumefile.AuditFileVo;
|
||||||
import org.dromara.design.domain.vo.volumefile.DesVolumeFileCodeVo;
|
import org.dromara.design.domain.vo.volumefile.DesVolumeFileCodeVo;
|
||||||
import org.dromara.design.domain.vo.volumefile.DesVolumeFileJoinVo;
|
import org.dromara.design.domain.vo.volumefile.DesVolumeFileJoinVo;
|
||||||
import org.dromara.design.domain.vo.volumefile.DesVolumeFileVo;
|
import org.dromara.design.domain.vo.volumefile.DesVolumeFileVo;
|
||||||
@ -101,6 +103,14 @@ public class DesVolumeFileController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取待审核图纸
|
||||||
|
*/
|
||||||
|
@GetMapping("/auditFile")
|
||||||
|
public R<AuditFileVo> auditFile(AuditFileDto dto) {
|
||||||
|
return R.ok(desVolumeFileService.auditFile(dto));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,12 +40,9 @@ public class DesVolumeFileAppController extends BaseController {
|
|||||||
private IDesVolumeFileService desVolumeFileService;
|
private IDesVolumeFileService desVolumeFileService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
@GetMapping("/joinList")
|
||||||
* app图纸管理分页查询
|
public TableDataInfo<DesVolumeFileJoinVo> joinList(DesVolumeFileBo bo, PageQuery pageQuery) {
|
||||||
*/
|
return desVolumeFileService.queryJoinPageList(bo, pageQuery);
|
||||||
@GetMapping("/list")
|
|
||||||
public TableDataInfo<DesVolumeFileAppVo> list(DesVolumeFileAppPageDto dto, PageQuery pageQuery) {
|
|
||||||
return desVolumeFileService.queryAppPageList(dto, pageQuery);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,52 @@
|
|||||||
|
package org.dromara.design.controller.app;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
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.dromara.design.domain.bo.DesVolumeFileViewerBo;
|
||||||
|
import org.dromara.design.domain.vo.volumefileviewer.DesVolumeFileViewerVo;
|
||||||
|
import org.dromara.design.service.IDesVolumeFileViewerService;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 卷册文件查阅人
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-08-14
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/app/design/volumeFileViewer")
|
||||||
|
public class DesVolumeFileViewerAppController extends BaseController {
|
||||||
|
|
||||||
|
private final IDesVolumeFileViewerService desVolumeFileViewerService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增卷册文件查阅人
|
||||||
|
*/
|
||||||
|
@Log(title = "卷册文件查阅人", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody DesVolumeFileViewerBo bo) {
|
||||||
|
return toAjax(desVolumeFileViewerService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,87 @@
|
|||||||
|
package org.dromara.design.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工进度计划对象 pgs_construction_schedule_plan
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-08-01
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("des_construction_schedule_plan")
|
||||||
|
public class DesConstructionSchedulePlan extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父ID
|
||||||
|
*/
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点名称
|
||||||
|
*/
|
||||||
|
private String nodeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对应项目结构
|
||||||
|
*/
|
||||||
|
private Long projectStructure;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对应项目结构名称
|
||||||
|
*/
|
||||||
|
private String projectStructureName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预计开始时间
|
||||||
|
*/
|
||||||
|
private LocalDate planStartDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预计结束时间
|
||||||
|
*/
|
||||||
|
private LocalDate planEndDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际开始时间
|
||||||
|
*/
|
||||||
|
private LocalDate practicalStartDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际结束时间
|
||||||
|
*/
|
||||||
|
private LocalDate practicalEndDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,46 @@
|
|||||||
|
package org.dromara.design.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计图纸短信记录对象 des_sms_record
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-10-13
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("des_sms_record")
|
||||||
|
public class DesSmsRecord extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图纸id
|
||||||
|
*/
|
||||||
|
private Long volumeFileId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0-不需要再次发送 1-需要再次发送
|
||||||
|
*/
|
||||||
|
private String again;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户类型(1-项目经理,2-设计部主任)
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,46 @@
|
|||||||
|
package org.dromara.design.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.design.domain.DesSmsRecord;
|
||||||
|
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.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计图纸短信记录业务对象 des_sms_record
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-10-13
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = DesSmsRecord.class, reverseConvertGenerate = false)
|
||||||
|
public class DesSmsRecordBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图纸id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "图纸id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long volumeFileId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0-不需要再次发送 1-需要再次发送
|
||||||
|
*/
|
||||||
|
private String again;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户类型(1-项目经理,2-设计部主任)
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -62,7 +62,7 @@ public class DesVolumeFileBo extends BaseEntity {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 项目id
|
||||||
*/
|
*/
|
||||||
private Long projectId;
|
private Long projectId;
|
||||||
|
|
||||||
@ -78,6 +78,9 @@ public class DesVolumeFileBo extends BaseEntity {
|
|||||||
private String documentName;
|
private String documentName;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
private String auditStatus;
|
private String auditStatus;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,77 @@
|
|||||||
|
package org.dromara.design.domain.dto.constructionscheduleplan;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-08-01 14:05
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class DesConstructionSchedulePlanCreateReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 4060838737379600701L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "项目ID不能为空")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父ID
|
||||||
|
*/
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "节点名称不能为空")
|
||||||
|
private String nodeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对应项目结构
|
||||||
|
*/
|
||||||
|
private Long projectStructure;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对应项目结构名称
|
||||||
|
*/
|
||||||
|
private String projectStructureName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预计开始时间
|
||||||
|
*/
|
||||||
|
private LocalDate planStartDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预计结束时间
|
||||||
|
*/
|
||||||
|
private LocalDate planEndDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际开始时间
|
||||||
|
*/
|
||||||
|
private LocalDate practicalStartDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际结束时间
|
||||||
|
*/
|
||||||
|
private LocalDate practicalEndDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
}
|
||||||
@ -0,0 +1,71 @@
|
|||||||
|
package org.dromara.design.domain.dto.constructionscheduleplan;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-09-06 17:12
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class DesConstructionSchedulePlanExcelDto {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编号(1, 1.1, 1.1.1)
|
||||||
|
*/
|
||||||
|
private String number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点名称
|
||||||
|
*/
|
||||||
|
private String nodeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对应项目结构
|
||||||
|
*/
|
||||||
|
private Long projectStructure;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对应项目结构名称
|
||||||
|
*/
|
||||||
|
private String projectStructureName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预计开始时间
|
||||||
|
*/
|
||||||
|
private LocalDate planStartDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预计结束时间
|
||||||
|
*/
|
||||||
|
private LocalDate planEndDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际开始时间
|
||||||
|
*/
|
||||||
|
private LocalDate practicalStartDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际结束时间
|
||||||
|
*/
|
||||||
|
private LocalDate practicalEndDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
package org.dromara.design.domain.dto.constructionscheduleplan;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-09-17 10:15
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class DesConstructionSchedulePlanFinishReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 8139653508791280689L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键不能为空")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成时间
|
||||||
|
*/
|
||||||
|
@NotNull(message = "完成时间不能为空")
|
||||||
|
private LocalDate finishDate;
|
||||||
|
}
|
||||||
@ -0,0 +1,37 @@
|
|||||||
|
package org.dromara.design.domain.dto.constructionscheduleplan;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-08-01 14:05
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class DesConstructionSchedulePlanQueryReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 9021370369055688811L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点名称
|
||||||
|
*/
|
||||||
|
private String nodeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对应项目结构名称
|
||||||
|
*/
|
||||||
|
private String projectStructureName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
}
|
||||||
@ -0,0 +1,74 @@
|
|||||||
|
package org.dromara.design.domain.dto.constructionscheduleplan;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-08-01 14:06
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class DesConstructionSchedulePlanUpdateReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 6955873817030428268L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点名称
|
||||||
|
*/
|
||||||
|
private String nodeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父ID
|
||||||
|
*/
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对应项目结构
|
||||||
|
*/
|
||||||
|
private Long projectStructure;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对应项目结构名称
|
||||||
|
*/
|
||||||
|
private String projectStructureName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预计开始时间
|
||||||
|
*/
|
||||||
|
private LocalDate planStartDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预计结束时间
|
||||||
|
*/
|
||||||
|
private LocalDate planEndDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际开始时间
|
||||||
|
*/
|
||||||
|
private LocalDate practicalStartDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际结束时间
|
||||||
|
*/
|
||||||
|
private LocalDate practicalEndDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package org.dromara.design.domain.dto.volumefile;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class AuditFileDto {
|
||||||
|
|
||||||
|
private List<Long> volumeCatalogIds;
|
||||||
|
}
|
||||||
@ -0,0 +1,104 @@
|
|||||||
|
package org.dromara.design.domain.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||||
|
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||||
|
import org.dromara.progress.domain.PgsConstructionSchedulePlan;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工进度计划视图对象 pgs_construction_schedule_plan
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-08-01
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = PgsConstructionSchedulePlan.class)
|
||||||
|
public class DesConstructionSchedulePlanVo 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 parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "节点名称")
|
||||||
|
private String nodeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对应项目结构
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "对应项目结构")
|
||||||
|
private Long projectStructure;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对应项目结构名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "对应项目结构名称")
|
||||||
|
private String projectStructureName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预计开始时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "预计开始时间")
|
||||||
|
private LocalDate planStartDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预计结束时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "预计结束时间")
|
||||||
|
private LocalDate planEndDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际开始时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "实际开始时间")
|
||||||
|
private LocalDate practicalStartDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际结束时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "实际结束时间")
|
||||||
|
private LocalDate practicalEndDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(dictType = "project_construction_status")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,56 @@
|
|||||||
|
package org.dromara.design.domain.vo;
|
||||||
|
|
||||||
|
import org.dromara.design.domain.DesSmsRecord;
|
||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计图纸短信记录视图对象 des_sms_record
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-10-13
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = DesSmsRecord.class)
|
||||||
|
public class DesSmsRecordVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "主键ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图纸id
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "图纸id")
|
||||||
|
private Long volumeFileId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0-不需要再次发送 1-需要再次发送
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "0-不需要再次发送 1-需要再次发送")
|
||||||
|
private String again;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户类型(1-项目经理,2-设计部主任)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "用户类型(1-项目经理,2-设计部主任)")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user