Compare commits
41 Commits
48ea20581c
...
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 |
@ -92,7 +92,7 @@ public class SysRegisterService {
|
||||
// if (!isValid) {
|
||||
// throw new UserException("注册失败,密码需满足8–18位,包含大小写字母、数字、特殊字符中的至少三种组合");
|
||||
// }
|
||||
// 验证码开关
|
||||
|
||||
SysUserBo sysUser = new SysUserBo();
|
||||
sysUser.setUserName(username);
|
||||
sysUser.setNickName(username);
|
||||
@ -101,16 +101,24 @@ public class SysRegisterService {
|
||||
sysUser.setUserType(userType);
|
||||
sysUser.setEmail(registerBody.getEmail());
|
||||
|
||||
boolean exist = TenantHelper.dynamic(tenantId, () -> {
|
||||
return userMapper.exists(new LambdaQueryWrapper<SysUser>()
|
||||
.eq(SysUser::getPhonenumber, sysUser.getPhonenumber()));
|
||||
});
|
||||
if (exist) {
|
||||
throw new UserException("user.register.save.error", username);
|
||||
}
|
||||
boolean regFlag = userService.registerUser(sysUser, tenantId);
|
||||
if (!regFlag) {
|
||||
throw new UserException("user.register.error");
|
||||
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, () -> {
|
||||
return userMapper.exists(new LambdaQueryWrapper<SysUser>()
|
||||
.eq(SysUser::getPhonenumber, sysUser.getPhonenumber()));
|
||||
});
|
||||
if (exist) {
|
||||
throw new UserException("user.register.save.error", username);
|
||||
}
|
||||
boolean regFlag = userService.registerUser(sysUser, tenantId);
|
||||
if (!regFlag) {
|
||||
throw new UserException("user.register.error");
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
username: xinnengyuandev
|
||||
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:
|
||||
lazy: true
|
||||
@ -71,9 +74,16 @@ spring:
|
||||
lazy: true
|
||||
type: ${spring.datasource.type}
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://192.168.110.2:13386/zmkgdev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
||||
username: zmkgdev
|
||||
password: JhYxREf25AXdy3h8
|
||||
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
|
||||
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:
|
||||
# type: ${spring.datasource.type}
|
||||
# driverClassName: oracle.jdbc.OracleDriver
|
||||
@ -116,7 +126,7 @@ spring.data:
|
||||
# 端口,默认为6379
|
||||
port: 9287
|
||||
# 数据库索引
|
||||
database: 10
|
||||
database: 16
|
||||
# redis 密码必须配置
|
||||
password: syar23rdsaagdrsa
|
||||
# 连接超时时间
|
||||
|
||||
@ -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
|
||||
username: xinnengyuan
|
||||
password: mEZPC5Sdf3r2HENi
|
||||
# 从库数据源
|
||||
slave:
|
||||
lazy: true
|
||||
type: ${spring.datasource.type}
|
||||
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
|
||||
username: zmkgc
|
||||
password: nWKDKRNRT48tFBdh
|
||||
slave1:
|
||||
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
|
||||
# # 从库数据源
|
||||
# slave:
|
||||
# lazy: true
|
||||
# type: ${spring.datasource.type}
|
||||
# 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
|
||||
# username: zmkgc
|
||||
# password: nWKDKRNRT48tFBdh
|
||||
# slave1:
|
||||
# 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
|
||||
# # 从库数据源
|
||||
# slave:
|
||||
# lazy: true
|
||||
|
||||
@ -277,8 +277,10 @@ springdoc:
|
||||
packages-to-scan: org.dromara.gps
|
||||
- group: 24.招标模块
|
||||
packages-to-scan: org.dromara.tender
|
||||
- group: 25.app版本模块
|
||||
packages-to-scan: org.dromara.app
|
||||
# - group: 25.app版本模块
|
||||
# packages-to-scan: org.dromara.app
|
||||
- group: 25.数据迁移模块
|
||||
packages-to-scan: org.dromara.transferData
|
||||
- group: 26.netty消息模块
|
||||
packages-to-scan: org.dromara.websocket
|
||||
- group: 27.新中大模块
|
||||
|
||||
@ -5,7 +5,6 @@ import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.util.IdcardUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
@ -129,7 +128,7 @@ public class DemoTest {
|
||||
log.info("执行定时任务:同步 {}至{} 计划详情到施工产值", lastMonday, lastSunday);
|
||||
Boolean synced = progressPlanDetailService.syncPlanDetail2ConstructionValue(lastMonday, lastSunday, null);*/
|
||||
LocalDate start = LocalDate.of(2024, 1, 1); // 起始时间(2024-01-01)
|
||||
LocalDate end = LocalDate.of(2025, 10, 13); // 截止时间(2025-09-15)
|
||||
LocalDate end = LocalDate.of(2025, 10, 20); // 截止时间(2025-09-15)
|
||||
|
||||
// 如果起始不是周一,调整到当周的周一
|
||||
if (start.getDayOfWeek() != DayOfWeek.MONDAY) {
|
||||
@ -149,7 +148,7 @@ public class DemoTest {
|
||||
.ge(PgsProgressPlanDetail::getDate, monday)
|
||||
.le(PgsProgressPlanDetail::getDate, sunday)
|
||||
.ne(PgsProgressPlanDetail::getFinishedNumber, BigDecimal.ZERO)
|
||||
.eq(PgsProgressPlanDetail::getStatus, "1")
|
||||
// .eq(PgsProgressPlanDetail::getStatus, "1")
|
||||
.list();
|
||||
if (CollUtil.isEmpty(planDetailList)) {
|
||||
// 下一周
|
||||
@ -244,8 +243,8 @@ public class DemoTest {
|
||||
value.setOutValue(constructionValue);
|
||||
value.setOwnerValue(ownerValue);
|
||||
// 统计总产值
|
||||
allConstructionValue = allConstructionValue.add(constructionValue).setScale(4, RoundingMode.HALF_UP);
|
||||
allOwnerValue = allOwnerValue.add(ownerValue).setScale(4, RoundingMode.HALF_UP);
|
||||
allConstructionValue = allConstructionValue.add(constructionValue);
|
||||
allOwnerValue = allOwnerValue.add(ownerValue);
|
||||
// 添加需要修改状态的计划详情
|
||||
PgsProgressPlanDetail update = new PgsProgressPlanDetail();
|
||||
update.setId(planDetail.getId());
|
||||
@ -253,8 +252,8 @@ public class DemoTest {
|
||||
updateList.add(update);
|
||||
saveList.add(value);
|
||||
}
|
||||
range.setOutValue(allConstructionValue);
|
||||
range.setOwnerValue(allOwnerValue);
|
||||
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;
|
||||
|
||||
@ -280,6 +280,13 @@
|
||||
<artifactId>netty-all</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>1.15</version> <!-- 最新版本可自行调整 -->
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
package org.dromara.bigscreen.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@ -62,7 +61,7 @@ public class MoneyBigScreenController {
|
||||
/**
|
||||
* 查询项目位置列表
|
||||
*/
|
||||
@SaCheckPermission("money:bigScreen:projectGis")
|
||||
// @SaCheckPermission("money:bigScreen:projectGis")
|
||||
@GetMapping("/project/gis")
|
||||
public R<List<BusProjectGisVo>> getProjectGis() {
|
||||
return R.ok(moneyBigScreenService.getProjectGis());
|
||||
@ -545,7 +544,7 @@ public class MoneyBigScreenController {
|
||||
/**
|
||||
* 查询项目天气
|
||||
*/
|
||||
@SaCheckPermission("project:bigScreen:weather")
|
||||
// @SaCheckPermission("project:bigScreen:weather")
|
||||
@GetMapping("/weather/{projectId}")
|
||||
public R<List<WeatherVo>> getProjectWeather(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long projectId) {
|
||||
@ -555,7 +554,7 @@ public class MoneyBigScreenController {
|
||||
/**
|
||||
* 查询项目安全天数
|
||||
*/
|
||||
@SaCheckPermission("project:bigScreen:safetyDay")
|
||||
// @SaCheckPermission("project:bigScreen:safetyDay")
|
||||
@GetMapping("/safetyDay/{projectId}")
|
||||
public R<BusProjectSafetyDayVo> getProjectSafetyDay(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long projectId) {
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
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;
|
||||
@ -272,6 +271,10 @@ public class ProjectBigScreenController extends BaseController {
|
||||
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));
|
||||
}
|
||||
|
||||
@ -296,7 +299,7 @@ public class ProjectBigScreenController extends BaseController {
|
||||
/**
|
||||
* 查询GPS设备用户列表
|
||||
*/
|
||||
@SaCheckPermission("project:big:screen")
|
||||
// @SaCheckPermission("project:big:screen")
|
||||
@GetMapping("/getList")
|
||||
public R<List<String>> getList(Long projectId) {
|
||||
return R.ok(projectBigScreenService.getList(projectId));
|
||||
@ -316,7 +319,7 @@ public class ProjectBigScreenController extends BaseController {
|
||||
/**
|
||||
* 查询地图项目分类
|
||||
*/
|
||||
@SaCheckPermission("project:big:screen")
|
||||
// @SaCheckPermission("project:big:screen")
|
||||
@GetMapping("/getProjectMapList")
|
||||
public R<Map<String, Map<String, Map<String, String>>>> getProjectMapList() {
|
||||
return R.ok(projectService.getProjectMapList());
|
||||
@ -325,7 +328,7 @@ public class ProjectBigScreenController extends BaseController {
|
||||
/**
|
||||
* 查询地图项目分类
|
||||
*/
|
||||
@SaCheckPermission("project:big:screen")
|
||||
// @SaCheckPermission("project:big:screen")
|
||||
@PostMapping("/updatePosition")
|
||||
public R<Void> updatePosition(@RequestBody ProjectUpdateDto dto) {
|
||||
return toAjax(projectService.updatePosition(dto));
|
||||
|
||||
@ -5,6 +5,7 @@ import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author lilemy
|
||||
@ -37,4 +38,13 @@ public class Ys7DeviceUpdateReq implements Serializable {
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 纬度(精确到6位小数)
|
||||
*/
|
||||
private BigDecimal latitude;
|
||||
/**
|
||||
* 经度(精确到6位小数)
|
||||
*/
|
||||
private BigDecimal longitude;
|
||||
|
||||
}
|
||||
|
||||
@ -505,7 +505,7 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService {
|
||||
gps.put("id", item.getClientId());
|
||||
gps.put("userId", item.getUserId());
|
||||
gps.put("label", item.getClientId());
|
||||
gps.put("name", item.getDeviceName());
|
||||
gps.put("name", item.getUserId() != null ? item.getUserName() : item.getClientId());
|
||||
gps.put("type", "gps");
|
||||
gps.put("lat", item.getLocLatitude());
|
||||
gps.put("lng", item.getLocLongitude());
|
||||
|
||||
@ -211,6 +211,11 @@ public class BusPurchaseDocServiceImpl extends ServiceImpl<BusPurchaseDocMapper,
|
||||
public void validNum(List<BusPlanDocAssociationBo> associationList, Long supplierId) {
|
||||
|
||||
for (BusPlanDocAssociationBo association : associationList) {
|
||||
|
||||
if(association.getDemandQuantity() == null){
|
||||
throw new ServiceException("请填写需求数量");
|
||||
}
|
||||
|
||||
//获取批次需求计划
|
||||
BusMaterialbatchdemandplan byId = materialbatchdemandplanService.getById(association.getPlanId());
|
||||
List<String> statuss = new ArrayList<>();
|
||||
|
||||
@ -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,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");
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,6 +1,7 @@
|
||||
package org.dromara.contractor.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@ -204,4 +205,10 @@ public class SubConstructionUser extends BaseEntity {
|
||||
private Long goId;
|
||||
|
||||
private String goOpenid;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 1代表删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
}
|
||||
|
||||
@ -19,6 +19,7 @@ import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.DateUtils;
|
||||
import org.dromara.common.core.utils.ObjectUtils;
|
||||
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.TableDataInfo;
|
||||
import org.dromara.common.oss.core.OssClient;
|
||||
@ -276,7 +277,7 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
||||
userRoleMapper.delete(Wrappers.<SysUserRole>lambdaQuery()
|
||||
.eq(SysUserRole::getUserId, constructionUser.getSysUserId())
|
||||
.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;
|
||||
|
||||
@ -6,7 +6,6 @@ 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.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
@ -17,6 +16,7 @@ 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;
|
||||
@ -92,6 +92,15 @@ public class CtrContractProgressSettlementController extends BaseController {
|
||||
return toAjax(ctrContractProgressSettlementService.updateByBo(req));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询金额合计
|
||||
*/
|
||||
@SaCheckPermission("ctr:contractProgressSettlement:query")
|
||||
@GetMapping("/queryMoneyTotal")
|
||||
public R<CtrContractProgressSettlementTotalVo> queryMoneyTotal(CtrContractProgressSettlementBo bo) {
|
||||
return R.ok(ctrContractProgressSettlementService.queryMoneyTotal(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除承包合同进度结算
|
||||
*
|
||||
|
||||
@ -29,6 +29,11 @@ public class CtrSubcontractProgressSettlement extends BaseEntity {
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 单据编码
|
||||
*/
|
||||
|
||||
@ -60,6 +60,11 @@ public class CtrContractProgressSettlementBo extends BaseEntity {
|
||||
@NotBlank(message = "合同编码不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private String contractCode;
|
||||
|
||||
/**
|
||||
* 类型(1付款 2收款)
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
|
||||
@ -31,12 +31,6 @@ public class CtrContractProgressSettlementCreateReq implements Serializable {
|
||||
@NotNull(message = "所属部门不能为空")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 单据编码
|
||||
*/
|
||||
@NotBlank(message = "单据编码不能为空")
|
||||
private String documentCode;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
|
||||
@ -24,10 +24,9 @@ public class CtrSubcontractProgressSettlementCreateReq implements Serializable {
|
||||
private static final long serialVersionUID = 770553999547826460L;
|
||||
|
||||
/**
|
||||
* 单据编码
|
||||
* 所属部门
|
||||
*/
|
||||
@NotBlank(message = "单据编码不能为空")
|
||||
private String documentCode;
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
|
||||
@ -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;
|
||||
}
|
||||
@ -41,6 +41,12 @@ public class CtrContractProgressSettlementVo implements Serializable {
|
||||
@ExcelProperty(value = "所属部门")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
@Translation(type = TransConstant.DEPT_ID_TO_NAME, mapper = "deptId")
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 单据编码
|
||||
*/
|
||||
@ -114,6 +120,12 @@ public class CtrContractProgressSettlementVo implements Serializable {
|
||||
@ExcelProperty(value = "结算单位(客户)")
|
||||
private Long settlementUnit;
|
||||
|
||||
/**
|
||||
* 结算单位名称
|
||||
*/
|
||||
@Translation(type = TransConstant.DEPT_ID_TO_NAME, mapper = "settlementUnit")
|
||||
private String settlementUnitName;
|
||||
|
||||
/**
|
||||
* 本期结算金额
|
||||
*/
|
||||
|
||||
@ -4,6 +4,8 @@ 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;
|
||||
@ -45,6 +47,18 @@ public class CtrSubcontractProgressSettlementVo implements Serializable {
|
||||
@ExcelProperty(value = "标题")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@ExcelProperty(value = "所属部门")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
@Translation(type = TransConstant.DEPT_ID_TO_NAME, mapper = "deptId")
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
@ -105,6 +119,12 @@ public class CtrSubcontractProgressSettlementVo implements Serializable {
|
||||
@ExcelProperty(value = "结算单位")
|
||||
private Long settlementUnit;
|
||||
|
||||
/**
|
||||
* 结算单位名称
|
||||
*/
|
||||
@Translation(type = TransConstant.DEPT_ID_TO_NAME, mapper = "settlementUnit")
|
||||
private String settlementUnitName;
|
||||
|
||||
/**
|
||||
* 合同金额
|
||||
*/
|
||||
|
||||
@ -7,6 +7,7 @@ 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;
|
||||
@ -45,6 +46,14 @@ public interface ICtrContractProgressSettlementService extends IService<CtrContr
|
||||
*/
|
||||
List<CtrContractProgressSettlementVo> queryList(CtrContractProgressSettlementBo bo);
|
||||
|
||||
/**
|
||||
* 查询金额统计
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 金额统计
|
||||
*/
|
||||
CtrContractProgressSettlementTotalVo queryMoneyTotal(CtrContractProgressSettlementBo bo);
|
||||
|
||||
/**
|
||||
* 新增承包合同进度结算
|
||||
*
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
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;
|
||||
@ -8,9 +9,11 @@ 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;
|
||||
@ -19,18 +22,22 @@ 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.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
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;
|
||||
|
||||
/**
|
||||
@ -46,6 +53,8 @@ public class CtrContractProgressSettlementServiceImpl extends ServiceImpl<CtrCon
|
||||
|
||||
private final ICtrContractProgressSettlementItemService contractProgressSettlementItemService;
|
||||
|
||||
private final ISysDeptService deptService;
|
||||
|
||||
/**
|
||||
* 查询承包合同进度结算
|
||||
*
|
||||
@ -97,11 +106,66 @@ public class CtrContractProgressSettlementServiceImpl extends ServiceImpl<CtrCon
|
||||
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);
|
||||
lqw.eq(bo.getDeptId() != null, CtrContractProgressSettlement::getDeptId, bo.getDeptId());
|
||||
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());
|
||||
@ -134,8 +198,25 @@ public class CtrContractProgressSettlementServiceImpl extends ServiceImpl<CtrCon
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean insertByBo(CtrContractProgressSettlementCreateReq req) {
|
||||
CtrContractProgressSettlement add = MapstructUtils.convert(req, CtrContractProgressSettlement.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
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();
|
||||
@ -184,6 +265,9 @@ public class CtrContractProgressSettlementServiceImpl extends ServiceImpl<CtrCon
|
||||
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()
|
||||
|
||||
@ -11,6 +11,7 @@ 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;
|
||||
@ -26,6 +27,9 @@ 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;
|
||||
@ -128,8 +132,22 @@ public class CtrSubcontractProgressSettlementServiceImpl extends ServiceImpl<Ctr
|
||||
@Override
|
||||
public Boolean insertByBo(CtrSubcontractProgressSettlementCreateReq req) {
|
||||
CtrSubcontractProgressSettlement add = MapstructUtils.convert(req, CtrSubcontractProgressSettlement.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
// 生成唯一编号
|
||||
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();
|
||||
|
||||
@ -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,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,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,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,17 @@
|
||||
package org.dromara.design.mapper;
|
||||
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.dromara.design.domain.DesConstructionSchedulePlan;
|
||||
import org.dromara.design.domain.vo.DesConstructionSchedulePlanVo;
|
||||
import org.dromara.progress.domain.PgsConstructionSchedulePlan;
|
||||
import org.dromara.progress.domain.vo.constructionscheduleplan.PgsConstructionSchedulePlanVo;
|
||||
|
||||
/**
|
||||
* 施工进度计划Mapper接口
|
||||
*
|
||||
* @author lilemy
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
public interface DesConstructionSchedulePlanMapper extends BaseMapperPlus<DesConstructionSchedulePlan, DesConstructionSchedulePlanVo> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,117 @@
|
||||
package org.dromara.design.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.dromara.design.domain.DesConstructionSchedulePlan;
|
||||
import org.dromara.design.domain.dto.constructionscheduleplan.*;
|
||||
import org.dromara.design.domain.vo.DesConstructionSchedulePlanVo;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 施工进度计划Service接口
|
||||
*
|
||||
* @author lilemy
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
public interface IDesConstructionSchedulePlanService extends IService<DesConstructionSchedulePlan> {
|
||||
|
||||
/**
|
||||
* 查询施工进度计划
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 施工进度计划
|
||||
*/
|
||||
DesConstructionSchedulePlanVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询符合条件的施工进度计划列表
|
||||
*
|
||||
* @param req 查询条件
|
||||
* @return 施工进度计划列表
|
||||
*/
|
||||
List<DesConstructionSchedulePlanVo> queryList(DesConstructionSchedulePlanQueryReq req);
|
||||
|
||||
/**
|
||||
* 新增施工进度计划
|
||||
*
|
||||
* @param req 施工进度计划
|
||||
* @return 新增施工进度计划封装
|
||||
*/
|
||||
DesConstructionSchedulePlanVo insertByBo(DesConstructionSchedulePlanCreateReq req);
|
||||
|
||||
/**
|
||||
* 修改施工进度计划
|
||||
*
|
||||
* @param req 施工进度计划
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(DesConstructionSchedulePlanUpdateReq req);
|
||||
|
||||
/**
|
||||
* 修改施工进度计划为完成状态
|
||||
*
|
||||
* @param req 施工进度计划
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateFinish(DesConstructionSchedulePlanFinishReq req);
|
||||
|
||||
/**
|
||||
* 批量删除施工进度计划信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteByIds(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 获取施工进度计划视图对象
|
||||
*
|
||||
* @param constructionSchedulePlan 施工进度计划对象
|
||||
* @return 施工进度计划视图对象
|
||||
*/
|
||||
DesConstructionSchedulePlanVo getVo(DesConstructionSchedulePlan constructionSchedulePlan);
|
||||
|
||||
/**
|
||||
* 获取施工进度计划查询条件封装
|
||||
*
|
||||
* @param req 查询条件
|
||||
* @return 查询条件封装
|
||||
*/
|
||||
LambdaQueryWrapper<DesConstructionSchedulePlan> buildQueryWrapper(DesConstructionSchedulePlanQueryReq req);
|
||||
|
||||
/**
|
||||
* 获取施工进度计划分页对象视图
|
||||
*
|
||||
* @param constructionSchedulePlanList 施工进度计划分页对象
|
||||
* @return 施工进度计划分页对象视图
|
||||
*/
|
||||
List<DesConstructionSchedulePlanVo> getVoList(List<DesConstructionSchedulePlan> constructionSchedulePlanList);
|
||||
|
||||
/**
|
||||
* 导出Excel
|
||||
*
|
||||
* @param projectId 项目id
|
||||
*/
|
||||
void exportExcelByProjectId(Long projectId, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 读取Excel文件
|
||||
*
|
||||
* @param file Excel文件
|
||||
* @param projectId 项目ID
|
||||
* @return 读取的数据列表
|
||||
*/
|
||||
List<DesConstructionSchedulePlanExcelDto> readExcel(MultipartFile file, Long projectId);
|
||||
|
||||
/**
|
||||
* 将Excel数据转换为实体列表
|
||||
*
|
||||
* @param excelList Excel数据列表
|
||||
* @return 实体列表
|
||||
*/
|
||||
List<DesConstructionSchedulePlan> convertToEntities(List<DesConstructionSchedulePlanExcelDto> excelList);
|
||||
}
|
||||
@ -0,0 +1,627 @@
|
||||
package org.dromara.design.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.ss.util.CellRangeAddressList;
|
||||
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.dromara.common.core.constant.HttpStatus;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.ObjectUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.design.domain.DesConstructionSchedulePlan;
|
||||
import org.dromara.design.domain.bo.DesUserBo;
|
||||
import org.dromara.design.domain.dto.constructionscheduleplan.*;
|
||||
import org.dromara.design.domain.vo.DesConstructionSchedulePlanVo;
|
||||
import org.dromara.design.mapper.DesConstructionSchedulePlanMapper;
|
||||
import org.dromara.design.service.IDesConstructionSchedulePlanService;
|
||||
|
||||
import org.dromara.project.service.IBusProjectService;
|
||||
import org.dromara.system.domain.vo.SysDictDataVo;
|
||||
import org.dromara.system.service.ISysDictDataService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.time.LocalDate;
|
||||
import java.time.ZoneId;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 施工进度计划Service业务层处理
|
||||
*
|
||||
* @author lilemy
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class DesConstructionSchedulePlanServiceImpl extends ServiceImpl<DesConstructionSchedulePlanMapper, DesConstructionSchedulePlan>
|
||||
implements IDesConstructionSchedulePlanService {
|
||||
|
||||
@Resource
|
||||
private IBusProjectService projectService;
|
||||
|
||||
@Resource
|
||||
private ISysDictDataService dictDataService;
|
||||
|
||||
/**
|
||||
* 查询施工进度计划
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 施工进度计划
|
||||
*/
|
||||
@Override
|
||||
public DesConstructionSchedulePlanVo queryById(Long id) {
|
||||
DesConstructionSchedulePlan constructionSchedulePlan = this.getById(id);
|
||||
if (constructionSchedulePlan == null) {
|
||||
throw new ServiceException("施工进度计划信息不存在", HttpStatus.NOT_FOUND);
|
||||
}
|
||||
return this.getVo(constructionSchedulePlan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的施工进度计划列表
|
||||
*
|
||||
* @param req 查询条件
|
||||
* @return 施工进度计划列表
|
||||
*/
|
||||
@Override
|
||||
public List<DesConstructionSchedulePlanVo> queryList(DesConstructionSchedulePlanQueryReq req) {
|
||||
List<DesConstructionSchedulePlan> result = this.list(this.buildQueryWrapper(req));
|
||||
return this.getVoList(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增施工进度计划
|
||||
*
|
||||
* @param req 施工进度计划
|
||||
* @return 新增施工进度计划封装
|
||||
*/
|
||||
@Override
|
||||
public DesConstructionSchedulePlanVo insertByBo(DesConstructionSchedulePlanCreateReq req) {
|
||||
DesConstructionSchedulePlan constructionSchedulePlan = new DesConstructionSchedulePlan();
|
||||
BeanUtils.copyProperties(req, constructionSchedulePlan);
|
||||
boolean save = this.save(constructionSchedulePlan);
|
||||
if (!save) {
|
||||
throw new ServiceException("新增施工进度计划信息异常", HttpStatus.ERROR);
|
||||
}
|
||||
DesConstructionSchedulePlan newConstructionSchedulePlan = this.getById(constructionSchedulePlan.getId());
|
||||
return this.getVo(newConstructionSchedulePlan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改施工进度计划
|
||||
*
|
||||
* @param req 施工进度计划
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(DesConstructionSchedulePlanUpdateReq req) {
|
||||
DesConstructionSchedulePlan constructionSchedulePlan = new DesConstructionSchedulePlan();
|
||||
BeanUtils.copyProperties(req, constructionSchedulePlan);
|
||||
return this.updateById(constructionSchedulePlan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改施工进度计划为完成状态
|
||||
*
|
||||
* @param req 施工进度计划
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateFinish(DesConstructionSchedulePlanFinishReq req) {
|
||||
DesConstructionSchedulePlan plan = this.getById(req.getId());
|
||||
if (plan == null) {
|
||||
throw new ServiceException("施工进度计划信息不存在", HttpStatus.NOT_FOUND);
|
||||
}
|
||||
if (plan.getStatus().equals("4")) {
|
||||
throw new ServiceException("施工进度计划已完成", HttpStatus.NOT_FOUND);
|
||||
}
|
||||
LocalDate practicalStartDate = plan.getPracticalStartDate();
|
||||
LocalDate finishDate = req.getFinishDate();
|
||||
if (practicalStartDate == null) {
|
||||
throw new ServiceException("请先填写实际开始时间", HttpStatus.NOT_FOUND);
|
||||
}
|
||||
if (finishDate.isBefore(practicalStartDate)) {
|
||||
throw new ServiceException("实际结束时间不能早于实际开始时间", HttpStatus.NOT_FOUND);
|
||||
}
|
||||
plan.setStatus("4");
|
||||
plan.setPracticalEndDate(finishDate);
|
||||
return this.updateById(plan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除施工进度计划信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean deleteByIds(Collection<Long> ids) {
|
||||
return this.removeBatchByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取施工进度计划视图对象
|
||||
*
|
||||
* @param constructionSchedulePlan 施工进度计划对象
|
||||
* @return 施工进度计划视图对象
|
||||
*/
|
||||
@Override
|
||||
public DesConstructionSchedulePlanVo getVo(DesConstructionSchedulePlan constructionSchedulePlan) {
|
||||
DesConstructionSchedulePlanVo vo = new DesConstructionSchedulePlanVo();
|
||||
if (constructionSchedulePlan == null) {
|
||||
return vo;
|
||||
}
|
||||
BeanUtils.copyProperties(constructionSchedulePlan, vo);
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取施工进度计划查询条件封装
|
||||
*
|
||||
* @param req 查询条件
|
||||
* @return 查询条件封装
|
||||
*/
|
||||
@Override
|
||||
public LambdaQueryWrapper<DesConstructionSchedulePlan> buildQueryWrapper(DesConstructionSchedulePlanQueryReq req) {
|
||||
LambdaQueryWrapper<DesConstructionSchedulePlan> lqw = new LambdaQueryWrapper<>();
|
||||
if (req == null) {
|
||||
return lqw;
|
||||
}
|
||||
Long projectId = req.getProjectId();
|
||||
String nodeName = req.getNodeName();
|
||||
String status = req.getStatus();
|
||||
lqw.eq(ObjectUtils.isNotEmpty(projectId), DesConstructionSchedulePlan::getProjectId, projectId);
|
||||
lqw.like(StringUtils.isNotBlank(nodeName), DesConstructionSchedulePlan::getNodeName, nodeName);
|
||||
lqw.eq(StringUtils.isNotBlank(status), DesConstructionSchedulePlan::getStatus, status);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取施工进度计划分页对象视图
|
||||
*
|
||||
* @param constructionSchedulePlanList 施工进度计划分页对象
|
||||
* @return 施工进度计划分页对象视图
|
||||
*/
|
||||
@Override
|
||||
public List<DesConstructionSchedulePlanVo> getVoList(List<DesConstructionSchedulePlan> constructionSchedulePlanList) {
|
||||
return constructionSchedulePlanList.stream().map(this::getVo).toList();
|
||||
}
|
||||
|
||||
// region 导出 excel
|
||||
|
||||
/**
|
||||
* 导出Excel
|
||||
*
|
||||
* @param projectId 项目id
|
||||
*/
|
||||
@Override
|
||||
public void exportExcelByProjectId(Long projectId, HttpServletResponse response) {
|
||||
DesUserBo desUserBo = new DesUserBo();
|
||||
desUserBo.setProjectId(projectId);
|
||||
Map<Long, String> projectStructureMap = projectService.getStructureAsList(projectId);
|
||||
if (projectStructureMap.isEmpty()) {
|
||||
throw new ServiceException("获取项目列表失败,项目为空!!!");
|
||||
}
|
||||
List<SysDictDataVo> dictDataVos = dictDataService.selectByDictType("project_construction_status");
|
||||
if (dictDataVos == null || dictDataVos.isEmpty()) {
|
||||
throw new ServiceException("项目施工状态为空!!");
|
||||
}
|
||||
Map<String, String> statusMap = new HashMap<>();
|
||||
for (SysDictDataVo vo : dictDataVos) {
|
||||
statusMap.put(vo.getDictValue(), vo.getDictLabel());
|
||||
}
|
||||
|
||||
|
||||
Workbook workbook = new XSSFWorkbook();
|
||||
// 创建主 Sheet 和隐藏 Sheet
|
||||
Sheet mainSheet = workbook.createSheet("设计里程碑计划模版");
|
||||
Sheet dataSheet = workbook.createSheet("DropdownData");
|
||||
workbook.setSheetHidden(workbook.getSheetIndex(dataSheet), true);
|
||||
|
||||
// 3. 创建单元格样式
|
||||
CellStyle editableStyle = createEditableCellStyle(workbook); // 可编辑单元格样式
|
||||
CellStyle protectedStyle = createProtectedCellStyle(workbook); // 受保护单元格样式(ID列用
|
||||
//填充隐藏数据Sheet
|
||||
int rowIndex = 0;
|
||||
// 填充项目关联结构(A列和B列)
|
||||
for (Map.Entry<Long, String> entry : projectStructureMap.entrySet()) {
|
||||
Row row = dataSheet.createRow(rowIndex++);
|
||||
row.createCell(0).setCellValue(entry.getValue());
|
||||
row.createCell(1).setCellValue(entry.getKey().toString());
|
||||
}
|
||||
// 重置行索引,填充人员和人员ID(C列和D列)
|
||||
rowIndex = 0;
|
||||
for (Map.Entry<String, String> entry : statusMap.entrySet()) {
|
||||
Row row = dataSheet.getRow(rowIndex);
|
||||
if (row == null) {
|
||||
row = dataSheet.createRow(rowIndex);
|
||||
}
|
||||
row.createCell(4).setCellValue(entry.getValue());
|
||||
row.createCell(5).setCellValue(entry.getKey());
|
||||
rowIndex++;
|
||||
}
|
||||
// 主 Sheet 设置表头
|
||||
Row sheetRow = mainSheet.createRow(0);
|
||||
String[] headers = {"编号(格式:1,1.1,1.1.1。用于进行父子结构关联)", "节点名称",
|
||||
"预计开始时间(输入格式:2025-09-06)", "预计结束时间", "实际开始时间", "实际结束时间", "状态", "状态编码", "备注"};
|
||||
for (int i = 0; i < headers.length; i++) {
|
||||
Cell cell = sheetRow.createCell(i);
|
||||
cell.setCellValue(headers[i]);
|
||||
if (i == 0) {
|
||||
CellStyle css = workbook.createCellStyle();
|
||||
DataFormat format = workbook.createDataFormat();
|
||||
css.setDataFormat(format.getFormat("@"));
|
||||
cell.setCellStyle(css);
|
||||
}
|
||||
|
||||
}
|
||||
// 6. 设置专业下拉列表(第二列)
|
||||
// setMajorDropdown(mainSheet, projectStructureMap.size());
|
||||
setStatusDropdown(mainSheet, statusMap.size());
|
||||
// String formulaTemplate = "IFERROR(INDEX(DropdownData!$B$1:$B$" + projectStructureMap.size() + ", MATCH(C{rowNum}, DropdownData!$A$1:$A$" + projectStructureMap.size() + ", 0)),\"\")";
|
||||
String formulaTemplate1 = "IFERROR(INDEX(DropdownData!$F$1:$F$" + statusMap.size() + ", MATCH(G{rowNum}, DropdownData!$E$1:$E$" + statusMap.size() + ", 0)),\"\")";
|
||||
for (int i = 1; i <= 1000; i++) { // 从第2行到101行
|
||||
Row row = mainSheet.createRow(i);
|
||||
int currentRowNum = i + 1; // Excel行号从1开始
|
||||
// String formula = formulaTemplate.replace("{rowNum}", String.valueOf(currentRowNum));
|
||||
//
|
||||
// Cell cell = row.createCell(2);
|
||||
// cell.setCellStyle(editableStyle); //专业不锁定
|
||||
//
|
||||
// Cell idCell = row.createCell(3);
|
||||
// idCell.setCellFormula(formula);
|
||||
// idCell.setCellStyle(protectedStyle); // 应用隐藏公式样式
|
||||
|
||||
String formula1 = formulaTemplate1.replace("{rowNum}", String.valueOf(currentRowNum));
|
||||
|
||||
Cell cell1 = row.createCell(6);
|
||||
cell1.setCellStyle(editableStyle); //专业不锁定
|
||||
|
||||
Cell idCell1 = row.createCell(7);
|
||||
idCell1.setCellFormula(formula1);
|
||||
idCell1.setCellStyle(protectedStyle); // 应用隐藏公式样式
|
||||
|
||||
}
|
||||
|
||||
|
||||
for (int i = 1; i <= 100; i++) {
|
||||
Row row = mainSheet.getRow(i);
|
||||
if (row == null) {
|
||||
row = mainSheet.createRow(i);
|
||||
}
|
||||
Cell cell = row.createCell(0);
|
||||
CellStyle textStyle = workbook.createCellStyle();
|
||||
textStyle.setLocked(false);
|
||||
DataFormat format = workbook.createDataFormat();
|
||||
textStyle.setDataFormat(format.getFormat("@")); // "@" 表示文本格式
|
||||
cell.setCellStyle(textStyle);
|
||||
|
||||
Cell cell1 = row.createCell(1);
|
||||
cell1.setCellStyle(editableStyle);
|
||||
|
||||
Cell cell4 = row.createCell(2);
|
||||
cell4.setCellStyle(editableStyle);
|
||||
|
||||
Cell cell5 = row.createCell(3);
|
||||
cell5.setCellStyle(editableStyle);
|
||||
|
||||
Cell cell6 = row.createCell(4);
|
||||
cell6.setCellStyle(editableStyle);
|
||||
|
||||
Cell cell7 = row.createCell(5);
|
||||
cell7.setCellStyle(editableStyle);
|
||||
|
||||
Cell cell10 = row.createCell(8);
|
||||
cell10.setCellStyle(editableStyle);
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 保护工作表,仅允许编辑未锁定的单元格
|
||||
mainSheet.protectSheet("123456"); // 空密码
|
||||
|
||||
// 核心:锁定表头(第1行)和前1列(包含ID列)
|
||||
mainSheet.createFreezePane(0, 1, 0, 1);
|
||||
|
||||
// 调整列宽(更新列索引)
|
||||
mainSheet.setColumnWidth(0, 20 * 320); // 编号
|
||||
mainSheet.setColumnWidth(1, 20 * 280); // 节点名称
|
||||
mainSheet.setColumnWidth(2, 20 * 320); // 预计开始时间
|
||||
mainSheet.setColumnWidth(3, 20 * 200); // 预计结束时间
|
||||
mainSheet.setColumnWidth(4, 20 * 200); // 实际开始时间
|
||||
mainSheet.setColumnWidth(5, 20 * 200); // 实际结束时间
|
||||
mainSheet.setColumnWidth(6, 20 * 100); // 状态
|
||||
mainSheet.setColumnWidth(7, 20 * 200); // 状态编码
|
||||
mainSheet.setColumnWidth(8, 20 * 200); // 备注
|
||||
|
||||
|
||||
// 2. 设置响应头
|
||||
// 设置响应头,指定Excel格式和下载文件名
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode("设计里程碑计划模版.xlsx", StandardCharsets.UTF_8));
|
||||
|
||||
// 直接写入响应输出流
|
||||
try {
|
||||
workbook.write(response.getOutputStream());
|
||||
workbook.close();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 创建可编辑单元格样式
|
||||
*/
|
||||
private CellStyle createEditableCellStyle(Workbook workbook) {
|
||||
CellStyle style = workbook.createCellStyle();
|
||||
style.setLocked(false); // 关键:允许编辑
|
||||
return style;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建受保护单元格样式(用于ID列)
|
||||
*/
|
||||
private CellStyle createProtectedCellStyle(Workbook workbook) {
|
||||
CellStyle style = workbook.createCellStyle();
|
||||
DataFormat dataFormat = workbook.createDataFormat();
|
||||
short formatIndex = dataFormat.getFormat("0"); // 匹配“自定义→0”格式
|
||||
style.setDataFormat(formatIndex);
|
||||
style.setHidden(true); // 隐藏公式
|
||||
style.setLocked(true);
|
||||
return style;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置专业下拉列表(第二列,索引1)
|
||||
*/
|
||||
private void setMajorDropdown(Sheet mainSheet, int majorCount) {
|
||||
DataValidationHelper helper = mainSheet.getDataValidationHelper();
|
||||
|
||||
// 专业数据范围:数据Sheet的A列(从第1行到专业数量行)
|
||||
String majorRange = "DropdownData!$A$1:$A$" + majorCount;
|
||||
|
||||
DataValidationConstraint constraint = helper.createFormulaListConstraint(majorRange);
|
||||
// 作用范围:第2行到100行,第二列
|
||||
CellRangeAddressList addressList = new CellRangeAddressList(1, 1000, 2, 2);
|
||||
|
||||
DataValidation validation = helper.createValidation(constraint, addressList);
|
||||
validation.setShowErrorBox(true);
|
||||
mainSheet.addValidationData(validation);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置专业下拉列表(第二列,索引1)
|
||||
*/
|
||||
private void setStatusDropdown(Sheet mainSheet, int majorCount) {
|
||||
DataValidationHelper helper = mainSheet.getDataValidationHelper();
|
||||
|
||||
// 专业数据范围:数据Sheet的A列(从第1行到专业数量行)
|
||||
String majorRange = "DropdownData!$E$1:$E$" + majorCount;
|
||||
|
||||
DataValidationConstraint constraint = helper.createFormulaListConstraint(majorRange);
|
||||
// 作用范围:第2行到100行,第二列
|
||||
CellRangeAddressList addressList = new CellRangeAddressList(1, 1000, 6, 6);
|
||||
|
||||
DataValidation validation = helper.createValidation(constraint, addressList);
|
||||
validation.setShowErrorBox(true);
|
||||
mainSheet.addValidationData(validation);
|
||||
|
||||
}
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
/**
|
||||
* 读取Excel文件
|
||||
*
|
||||
* @param file Excel文件
|
||||
* @param projectId 项目ID
|
||||
* @return 读取的数据列表
|
||||
*/
|
||||
@Override
|
||||
public List<DesConstructionSchedulePlanExcelDto> readExcel(MultipartFile file, Long projectId) {
|
||||
List<DesConstructionSchedulePlanExcelDto> dataList = new ArrayList<>();
|
||||
|
||||
try (InputStream inputStream = file.getInputStream();
|
||||
XSSFWorkbook workbook = new XSSFWorkbook(inputStream)) {
|
||||
|
||||
XSSFSheet sheet = workbook.getSheetAt(0);
|
||||
|
||||
// 从第二行(index=1)开始读取数据,跳过表头
|
||||
for (int rowIndex = 1; rowIndex <= sheet.getLastRowNum(); rowIndex++) {
|
||||
Row row = sheet.getRow(rowIndex);
|
||||
if (hasValidData(row)) {
|
||||
String number = getCellValue(row.getCell(0));
|
||||
String nodeName = getCellValue(row.getCell(1));
|
||||
String projectStructureName = null;
|
||||
Long projectStructure = null;
|
||||
LocalDate planStartDate = getLocalDateValue(row.getCell(2));
|
||||
LocalDate planEndDate = getLocalDateValue(row.getCell(3));
|
||||
LocalDate practicalStartDate = getLocalDateValue(row.getCell(4));
|
||||
LocalDate practicalEndDate = getLocalDateValue(row.getCell(5));
|
||||
String status = getCellValue(row.getCell(7));
|
||||
String remark = getCellValue(row.getCell(8));
|
||||
|
||||
DesConstructionSchedulePlanExcelDto excelData = new DesConstructionSchedulePlanExcelDto(
|
||||
number, projectId, nodeName, projectStructure, projectStructureName,
|
||||
planStartDate, planEndDate, practicalStartDate, practicalEndDate, status, remark
|
||||
);
|
||||
dataList.add(excelData);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("读取表格数据失败", e);
|
||||
throw new ServiceException("读取表格数据失败");
|
||||
}
|
||||
|
||||
return dataList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 将Excel数据转换为实体列表
|
||||
*
|
||||
* @param excelList Excel数据列表
|
||||
* @return 实体列表
|
||||
*/
|
||||
@Override
|
||||
public List<DesConstructionSchedulePlan> convertToEntities(List<DesConstructionSchedulePlanExcelDto> excelList) {
|
||||
List<DesConstructionSchedulePlan> result = new ArrayList<>();
|
||||
Map<String, Long> numberIdMap = new HashMap<>();
|
||||
|
||||
for (DesConstructionSchedulePlanExcelDto dto : excelList) {
|
||||
DesConstructionSchedulePlan entity = new DesConstructionSchedulePlan();
|
||||
|
||||
LocalDate planStartDate = dto.getPlanStartDate();
|
||||
LocalDate planEndDate = dto.getPlanEndDate();
|
||||
if (planStartDate == null || planEndDate == null || planStartDate.isAfter(planEndDate)) {
|
||||
throw new ServiceException("计划开始时间和计划结束时间不能为空,且计划开始时间不能大于计划结束时间", HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
|
||||
// 生成主键
|
||||
Long id = IdWorker.getId();
|
||||
entity.setId(id);
|
||||
|
||||
entity.setProjectId(dto.getProjectId());
|
||||
entity.setNodeName(dto.getNodeName());
|
||||
entity.setProjectStructure(dto.getProjectStructure());
|
||||
entity.setProjectStructureName(dto.getProjectStructureName());
|
||||
entity.setPlanStartDate(planStartDate);
|
||||
entity.setPlanEndDate(planEndDate);
|
||||
entity.setPracticalStartDate(dto.getPracticalStartDate());
|
||||
entity.setPracticalEndDate(dto.getPracticalEndDate());
|
||||
entity.setStatus(dto.getStatus());
|
||||
entity.setRemark(dto.getRemark());
|
||||
// 确定父ID
|
||||
String number = dto.getNumber();
|
||||
if (number != null && number.contains(".")) {
|
||||
String parentNumber = number.substring(0, number.lastIndexOf("."));
|
||||
Long parentId = numberIdMap.get(parentNumber);
|
||||
if (parentId == null) {
|
||||
throw new ServiceException("未找到父编号:" + parentNumber, HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
entity.setParentId(parentId);
|
||||
} else {
|
||||
entity.setParentId(0L); // 顶级节点
|
||||
}
|
||||
|
||||
// 保存当前编号对应的id
|
||||
numberIdMap.put(number, id);
|
||||
result.add(entity);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private static boolean hasValidData(Row row) {
|
||||
// 遍历行中的所有单元格
|
||||
for (int cellIndex = 0; cellIndex < row.getLastCellNum(); cellIndex++) {
|
||||
Cell cell = row.getCell(cellIndex, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK);
|
||||
String cellValue = getCellValue(cell).trim();
|
||||
|
||||
// 只要有一个单元格有非空值,就认为是有效行
|
||||
if (!cellValue.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static String getCellValue(Cell cell) {
|
||||
if (cell == null) {
|
||||
return "";
|
||||
}
|
||||
// 使用CellType枚举判断单元格类型(POI 4.0+版本推荐方式)
|
||||
CellType cellType = cell.getCellType();
|
||||
// 对于公式单元格,获取其计算结果的类型
|
||||
if (cellType == CellType.FORMULA) {
|
||||
cellType = cell.getCachedFormulaResultType();
|
||||
}
|
||||
|
||||
switch (cellType) {
|
||||
case STRING:
|
||||
return cell.getStringCellValue().trim();
|
||||
case NUMERIC:
|
||||
if (DateUtil.isCellDateFormatted(cell)) {
|
||||
Date date = cell.getDateCellValue();
|
||||
return date.toString();
|
||||
} else {
|
||||
// 处理数字类型,避免科学计数法
|
||||
// 处理数字,移除不必要的.0后缀
|
||||
String numericValue = String.valueOf(cell.getNumericCellValue());
|
||||
if (numericValue.endsWith(".0")) {
|
||||
return numericValue.substring(0, numericValue.length() - 2);
|
||||
}
|
||||
return numericValue;
|
||||
}
|
||||
case BOOLEAN:
|
||||
return String.valueOf(cell.getBooleanCellValue());
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
private static LocalDate getLocalDateValue(Cell cell) {
|
||||
if (cell == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
CellType cellType = cell.getCellType();
|
||||
if (cellType == CellType.FORMULA) {
|
||||
cellType = cell.getCachedFormulaResultType();
|
||||
}
|
||||
|
||||
try {
|
||||
if (cellType == CellType.NUMERIC) {
|
||||
if (DateUtil.isCellDateFormatted(cell)) {
|
||||
Date date = cell.getDateCellValue();
|
||||
return date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
||||
} else {
|
||||
// 如果是数字但不是日期,就尝试转为 LocalDate (例如 20250730)
|
||||
double numericValue = cell.getNumericCellValue();
|
||||
String text = String.valueOf((long) numericValue);
|
||||
return LocalDate.parse(text);
|
||||
}
|
||||
} else if (cellType == CellType.STRING) {
|
||||
String text = cell.getStringCellValue().trim();
|
||||
if (text.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
// 尝试解析不同格式
|
||||
try {
|
||||
return LocalDate.parse(text); // 默认 ISO 格式 yyyy-MM-dd
|
||||
} catch (Exception e) {
|
||||
// 如果 Excel 是 yyyy/MM/dd 或 yyyy.MM.dd,可以额外处理
|
||||
try {
|
||||
return LocalDate.parse(text, java.time.format.DateTimeFormatter.ofPattern("yyyy/MM/dd"));
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
try {
|
||||
return LocalDate.parse(text, java.time.format.DateTimeFormatter.ofPattern("yyyy.MM.dd"));
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
return null; // 不识别的格式就返回 null
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -8,6 +8,7 @@ import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.gps.domain.vo.GpsStatusVo;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
@ -56,6 +57,16 @@ public class GpsEquipmentSonController extends BaseController {
|
||||
return R.ok(gpsEquipmentSonService.queryList(bo));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询GPS设备定位日期信息列表
|
||||
*/
|
||||
@SaCheckPermission("gps:equipmentSon:getRlList")
|
||||
@GetMapping("/getRlList")
|
||||
public R<List<GpsStatusVo>> getRlList(GpsEquipmentSonBo bo) {
|
||||
return R.ok(gpsEquipmentSonService.getRlList(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询GPS设备定位信息列表(大屏获取人员最后一次位置)
|
||||
*/
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
package org.dromara.gps.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Data
|
||||
public class GpsStatusVo implements Serializable {
|
||||
private LocalDate riqi;
|
||||
private Long count;
|
||||
}
|
||||
@ -3,8 +3,10 @@ package org.dromara.gps.mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.dromara.gps.domain.GpsEquipmentSon;
|
||||
import org.dromara.gps.domain.bo.GpsEquipmentSonBo;
|
||||
import org.dromara.gps.domain.vo.GpsEquipmentSonVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.dromara.gps.domain.vo.GpsStatusVo;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
@ -28,9 +30,10 @@ public interface GpsEquipmentSonMapper extends BaseMapperPlus<GpsEquipmentSon, G
|
||||
"AND create_time BETWEEN #{startTime} AND #{endTime}\n" +
|
||||
")\n" +
|
||||
"SELECT\n" +
|
||||
" *\n" +
|
||||
" r.*,su.nick_name as userName\n" +
|
||||
"FROM\n" +
|
||||
" RankedData\n" +
|
||||
" RankedData r\n" +
|
||||
"LEFT JOIN sys_user su ON r.user_id=su.user_id\n" +
|
||||
"WHERE\n" +
|
||||
" rn = 1;")
|
||||
List<GpsEquipmentSonVo> getClientList(@Param("projectId") Long projectId, @Param("startTime") LocalDateTime startOfDay, @Param("endTime") LocalDateTime now);
|
||||
@ -77,4 +80,32 @@ public interface GpsEquipmentSonMapper extends BaseMapperPlus<GpsEquipmentSon, G
|
||||
"WHERE\n" +
|
||||
" rn = 1;")
|
||||
List<GpsEquipmentSonVo> getUserListByProjectId(@Param("projectId") Long projectId, @Param("startTime") LocalDateTime startOfDay, @Param("endTime") LocalDateTime now);
|
||||
|
||||
@Select("WITH RECURSIVE date_range AS (\n" +
|
||||
" -- 1. 初始化开始日期(取startTime的“年月日”部分,忽略时分秒)\n" +
|
||||
" SELECT DATE(#{bo.startTime}) AS stat_date\n" +
|
||||
" UNION ALL\n" +
|
||||
" -- 2. 递归生成后续日期,直到不超过endTime的“年月日”\n" +
|
||||
" SELECT DATE_ADD(stat_date, INTERVAL 1 DAY)\n" +
|
||||
" FROM date_range\n" +
|
||||
" WHERE stat_date < DATE(#{bo.endTime})\n" +
|
||||
")\n" +
|
||||
"\n" +
|
||||
"SELECT \n" +
|
||||
" dr.stat_date AS riqi, -- 统计日期(格式:YYYY-MM-DD)\n" +
|
||||
" COUNT(ges.id) AS count -- 当天符合条件的记录数\n" +
|
||||
"FROM date_range dr\n" +
|
||||
"LEFT JOIN (\n" +
|
||||
" SELECT \n" +
|
||||
" DATE(create_time) AS data_date, -- 提取创建时间的“年月日”\n" +
|
||||
" id -- 仅需主键用于计数(减少数据传输)\n" +
|
||||
" FROM gps_equipment_son\n" +
|
||||
" WHERE \n" +
|
||||
" project_id = #{bo.projectId} -- 匹配项目ID\n" +
|
||||
" AND client_id =#{bo.clientId} -- 客户端ID为空\n" +
|
||||
" AND create_time BETWEEN #{bo.startTime} AND #{bo.endTime} -- 时间范围\n" +
|
||||
") ges ON dr.stat_date = ges.data_date -- 按日期关联\n" +
|
||||
"GROUP BY dr.stat_date -- 按统计日期分组\n" +
|
||||
"ORDER BY dr.stat_date; -- 按日期升序排列")
|
||||
List<GpsStatusVo> getRlList(@Param("bo") GpsEquipmentSonBo bo);
|
||||
}
|
||||
|
||||
@ -7,6 +7,7 @@ import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.dromara.gps.domain.vo.GpsStatusVo;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Collection;
|
||||
@ -78,4 +79,6 @@ public interface IGpsEquipmentSonService extends IService<GpsEquipmentSon>{
|
||||
List<GpsEquipmentSonVo> getLargerScreenList(GpsEquipmentSonBo bo);
|
||||
|
||||
List<GpsEquipmentSonVo> getUserListByProjectId(Long projectId, LocalDateTime startOfDay, LocalDateTime now);
|
||||
|
||||
List<GpsStatusVo> getRlList(GpsEquipmentSonBo bo);
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package org.dromara.gps.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
@ -11,6 +12,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.contractor.domain.SubConstructionUser;
|
||||
import org.dromara.contractor.service.ISubConstructionUserService;
|
||||
import org.dromara.gps.domain.vo.GpsStatusVo;
|
||||
import org.dromara.system.domain.vo.SysOssVo;
|
||||
import org.dromara.system.domain.vo.SysUserVo;
|
||||
import org.dromara.system.service.ISysDictDataService;
|
||||
@ -100,6 +102,7 @@ public class GpsEquipmentSonServiceImpl extends ServiceImpl<GpsEquipmentSonMappe
|
||||
lqw.eq(bo.getProjectId() != null, GpsEquipmentSon::getProjectId, bo.getProjectId());
|
||||
lqw.eq(bo.getUserId() != null, GpsEquipmentSon::getUserId, bo.getUserId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getClientId()), GpsEquipmentSon::getClientId, bo.getClientId());
|
||||
lqw.between(bo.getStartTime() != null && bo.getEndTime() != null, GpsEquipmentSon::getCreateTime, bo.getStartTime(), bo.getEndTime());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
@ -194,4 +197,18 @@ public class GpsEquipmentSonServiceImpl extends ServiceImpl<GpsEquipmentSonMappe
|
||||
public List<GpsEquipmentSonVo> getUserListByProjectId(Long projectId, LocalDateTime startOfDay, LocalDateTime now) {
|
||||
return baseMapper.getUserListByProjectId(projectId,startOfDay,now);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GpsStatusVo> getRlList(GpsEquipmentSonBo bo) {
|
||||
if (bo.getProjectId() == null) {
|
||||
throw new ServiceException("项目id不能为空!");
|
||||
}
|
||||
if (bo.getClientId() == null) {
|
||||
throw new ServiceException("设备id不能为空!");
|
||||
}
|
||||
if (bo.getStartTime() == null || bo.getEndTime() == null) {
|
||||
throw new ServiceException("开始时间和结算时间不能为空!!!");
|
||||
}
|
||||
return baseMapper.getRlList(bo);
|
||||
}
|
||||
}
|
||||
|
||||
@ -370,6 +370,9 @@ public class MatMaterialsServiceImpl extends ServiceImpl<MatMaterialsMapper, Mat
|
||||
@Override
|
||||
public void create(Long projectId, List<MatMaterialReceiveItemDto> itemList, String formCode, String supplierUnit, String nickname) {
|
||||
for (MatMaterialReceiveItemDto item : itemList) {
|
||||
if(item.getAcceptedQuantity().compareTo(BigDecimal.ZERO) <= 0){
|
||||
continue;
|
||||
}
|
||||
MatMaterials matMaterials = new MatMaterials();
|
||||
matMaterials.setMaterialsName(item.getName());
|
||||
matMaterials.setProjectId(projectId);
|
||||
|
||||
@ -452,7 +452,9 @@ public class OutTableController extends BaseController {
|
||||
|
||||
BigDecimal monthCompletionValue = BigDecimal.ZERO;
|
||||
for (BusProcurement busProcurement : busProcurements1) {
|
||||
monthCompletionValue = monthCompletionValue.add(busProcurement.getAcceptedQuantity().multiply(busProcurement.getUnitPrice()).setScale(4, RoundingMode.HALF_UP));
|
||||
if(busProcurement.getAcceptedQuantity()!=null){
|
||||
monthCompletionValue = monthCompletionValue.add(busProcurement.getAcceptedQuantity().multiply(busProcurement.getUnitPrice()).setScale(4, RoundingMode.HALF_UP));
|
||||
}
|
||||
}
|
||||
vo.setMonthCompletionValue(monthCompletionValue);
|
||||
|
||||
|
||||
@ -254,7 +254,7 @@ public class PgsConstructionSchedulePlanServiceImpl extends ServiceImpl<PgsConst
|
||||
}
|
||||
// 主 Sheet 设置表头
|
||||
Row sheetRow = mainSheet.createRow(0);
|
||||
String[] headers = {"编号(格式:1,1-1,1-1-1。用于进行父子结构关联)", "节点名称", "对应项目结构", "对应项目结构编码",
|
||||
String[] headers = {"编号(格式:1,1.1,1.1.1。用于进行父子结构关联)", "节点名称", "对应项目结构", "对应项目结构编码",
|
||||
"预计开始时间(输入格式:2025-09-06)", "预计结束时间", "实际开始时间", "实际结束时间", "状态", "状态编码", "备注"};
|
||||
for (int i = 0; i < headers.length; i++) {
|
||||
Cell cell = sheetRow.createCell(i);
|
||||
@ -302,7 +302,11 @@ public class PgsConstructionSchedulePlanServiceImpl extends ServiceImpl<PgsConst
|
||||
row = mainSheet.createRow(i);
|
||||
}
|
||||
Cell cell = row.createCell(0);
|
||||
cell.setCellStyle(editableStyle);
|
||||
CellStyle textStyle = workbook.createCellStyle();
|
||||
textStyle.setLocked(false);
|
||||
DataFormat format = workbook.createDataFormat();
|
||||
textStyle.setDataFormat(format.getFormat("@")); // "@" 表示文本格式
|
||||
cell.setCellStyle(textStyle);
|
||||
|
||||
Cell cell1 = row.createCell(1);
|
||||
cell1.setCellStyle(editableStyle);
|
||||
|
||||
@ -3,10 +3,12 @@ package org.dromara.project.controller;
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.project.domain.BusAttendanceMachine;
|
||||
import org.dromara.project.domain.dto.attendance.*;
|
||||
import org.dromara.project.domain.vo.attendance.DeviceResult;
|
||||
import org.dromara.project.service.IBusAttendanceMachineService;
|
||||
import org.dromara.project.service.IBusAttendanceService;
|
||||
import org.springframework.mock.web.MockMultipartFile;
|
||||
@ -17,7 +19,7 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
import java.io.IOException;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Base64;
|
||||
|
||||
|
||||
/**
|
||||
* 考勤
|
||||
@ -34,15 +36,15 @@ public class BusAttendanceDeviceController extends BaseController {
|
||||
|
||||
private final IBusAttendanceService busAttendanceService;
|
||||
|
||||
private final IBusAttendanceMachineService busAttendanceMachineService;
|
||||
private final IBusAttendanceMachineService busAttendanceMachineService;
|
||||
|
||||
@PostMapping("/api/v1/record/face")
|
||||
@SaIgnore
|
||||
public R<Boolean> punchCardByFace(@RequestBody DeviceDto dto) {
|
||||
public DeviceResult punchCardByFace(@RequestBody DeviceDto dto) {
|
||||
//打印接收数据
|
||||
log.info("接收数据:{}", dto);
|
||||
if (dto.getLogs().isEmpty()) {
|
||||
return R.fail("没有数据");
|
||||
return new DeviceResult(500, "没有数据");
|
||||
}
|
||||
Log first = dto.getLogs().getFirst();
|
||||
|
||||
@ -53,7 +55,7 @@ public class BusAttendanceDeviceController extends BaseController {
|
||||
.last("limit 1")
|
||||
.one();
|
||||
if (one == null || one.getProjectId() == null) {
|
||||
return R.fail("考勤机不存在或未关联项目");
|
||||
return new DeviceResult(500, "考勤机不存在或未关联项目");
|
||||
}
|
||||
|
||||
String recogTime = first.getRecog_time();
|
||||
@ -67,6 +69,7 @@ public class BusAttendanceDeviceController extends BaseController {
|
||||
req.setProjectId(one.getProjectId());
|
||||
req.setUserId(userId);
|
||||
req.setPunchTime(localDateTime);
|
||||
req.setSource("1");
|
||||
//打印req
|
||||
log.info("请求参数:{}", req);
|
||||
//base64转MultipartFile
|
||||
@ -74,14 +77,14 @@ public class BusAttendanceDeviceController extends BaseController {
|
||||
// 假设first.getImage()返回base64字符串,且你有一个文件名
|
||||
MultipartFile file = convert(first.getPhoto(), "face.jpg");
|
||||
log.info("开始打卡");
|
||||
return R.ok(busAttendanceService.punchCardByFace(file, req));
|
||||
busAttendanceService.punchCardByFace(file, req);
|
||||
return new DeviceResult(0, "打卡成功");
|
||||
} catch (IOException e) {
|
||||
return R.fail("文件转换失败");
|
||||
return new DeviceResult(500, "文件转换失败");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static MultipartFile convert(String base64String, String fileName) throws IOException {
|
||||
// 先进行URL解码(如果是URL编码过的数据)
|
||||
try {
|
||||
@ -96,23 +99,11 @@ public class BusAttendanceDeviceController extends BaseController {
|
||||
}
|
||||
|
||||
// 解码base64字符串
|
||||
byte[] decodedBytes = Base64.getDecoder().decode(base64String);
|
||||
byte[] decodedBytes = Base64.decodeBase64(base64String);
|
||||
|
||||
// 创建MultipartFile对象
|
||||
return new MockMultipartFile(fileName, fileName, "image/jpeg", decodedBytes);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -113,4 +113,9 @@ public class BusAttendance extends BaseEntity {
|
||||
* 代打卡人员Id
|
||||
*/
|
||||
private Long replaceId;
|
||||
|
||||
/**
|
||||
* 来源
|
||||
*/
|
||||
private String source;
|
||||
}
|
||||
|
||||
@ -47,4 +47,10 @@ public class BusAttendancePunchCardByFaceReq implements Serializable {
|
||||
*/
|
||||
private LocalDateTime punchTime;
|
||||
|
||||
|
||||
/**
|
||||
* 来源 (0-app,1-考勤机 )
|
||||
*/
|
||||
private String source;
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,16 @@
|
||||
package org.dromara.project.domain.vo.attendance;
|
||||
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class DeviceResult {
|
||||
|
||||
private Integer Result;
|
||||
|
||||
private String Msg;
|
||||
}
|
||||
@ -12,6 +12,8 @@ import org.dromara.common.core.exception.ServiceException;
|
||||
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.contractor.domain.SubConstructionUser;
|
||||
import org.dromara.contractor.service.ISubConstructionUserService;
|
||||
import org.dromara.mobileAttendanceMachine.DeviceMessageSender;
|
||||
import org.dromara.project.domain.BusAttendanceMachine;
|
||||
import org.dromara.project.domain.BusProject;
|
||||
@ -58,6 +60,9 @@ public class BusAttendanceMachineServiceImpl extends ServiceImpl<BusAttendanceMa
|
||||
@Resource
|
||||
private DeviceMessageSender deviceMessageSender;
|
||||
|
||||
@Resource
|
||||
private ISubConstructionUserService constructionUserService;
|
||||
|
||||
/**
|
||||
* 查询考勤机
|
||||
*
|
||||
@ -220,6 +225,38 @@ public class BusAttendanceMachineServiceImpl extends ServiceImpl<BusAttendanceMa
|
||||
}
|
||||
}
|
||||
}
|
||||
// 新增的班组不为空时,添加考勤机中对应人
|
||||
if (CollUtil.isNotEmpty(added)) {
|
||||
// 获取待添加到考勤机的班组的所有用户id
|
||||
List<Long> userIds = projectTeamMemberService.lambdaQuery()
|
||||
.select(BusProjectTeamMember::getMemberId)
|
||||
.in(BusProjectTeamMember::getTeamId, added)
|
||||
.list()
|
||||
.stream().map(BusProjectTeamMember::getMemberId)
|
||||
.toList();
|
||||
// 获取待添加到考勤机的用户信息
|
||||
List<SubConstructionUser> users = constructionUserService.lambdaQuery()
|
||||
.in(SubConstructionUser::getSysUserId, userIds)
|
||||
.list();
|
||||
for (SubConstructionUser user : users) {
|
||||
// 添加考勤机中用户
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 添加考勤机中对应人
|
||||
List<Long> userIds = projectTeamMemberService.lambdaQuery()
|
||||
.select(BusProjectTeamMember::getMemberId)
|
||||
.in(BusProjectTeamMember::getTeamId, teamIds)
|
||||
.list()
|
||||
.stream().map(BusProjectTeamMember::getMemberId)
|
||||
.toList();
|
||||
// 获取待添加到考勤机的用户信息
|
||||
List<SubConstructionUser> users = constructionUserService.lambdaQuery()
|
||||
.in(SubConstructionUser::getSysUserId, userIds)
|
||||
.list();
|
||||
for (SubConstructionUser user : users) {
|
||||
// 添加考勤机中用户
|
||||
}
|
||||
}
|
||||
projectTeams.forEach(team -> {
|
||||
if (!team.getProjectId().equals(projectId)) {
|
||||
|
||||
@ -391,63 +391,105 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
||||
List<BusAttendance> outAttendances = attendances.stream().filter(attendance ->
|
||||
BusAttendanceCommuterEnum.CLOCKOUT.getValue().equals(attendance.getClockType())).toList();
|
||||
|
||||
if (clockTypeByTime == 1 && CollectionUtils.isEmpty(inAttendances)) {
|
||||
BusAttendance attendance = new BusAttendance();
|
||||
// 上班打卡
|
||||
attendance.setClockType(BusAttendanceCommuterEnum.CLOCKIN.getValue());
|
||||
//打卡时间
|
||||
attendance.setRuleTime(busAttendanceRuleVo.getClockInTime());
|
||||
// 判断是否为迟到
|
||||
if (isLate(now, busAttendanceRuleVo)) {
|
||||
attendance.setClockStatus(BusAttendanceClockStatusEnum.LATE.getValue());
|
||||
attendance.setMinuteCount(getMinutesDifference(now, busAttendanceRuleVo.getClockInTime()));
|
||||
} else {
|
||||
attendance.setClockStatus(BusAttendanceClockStatusEnum.NORMAL.getValue());
|
||||
}
|
||||
//只要请假,直接归为请假
|
||||
LocalDateTime localDateTime = localDate.atTime(busAttendanceRuleVo.getClockInTime());
|
||||
if (leaveService.isLeave(localDateTime, userId)) {
|
||||
attendance.setClockStatus(BusAttendanceClockStatusEnum.LEAVE.getValue());
|
||||
}
|
||||
|
||||
// 填充信息
|
||||
attendance.setUserId(userId);
|
||||
attendance.setProjectId(req.getProjectId());
|
||||
attendance.setClockDate(localDate);
|
||||
attendance.setClockTime(now);
|
||||
attendance.setUserName(constructionUser.getUserName());
|
||||
attendance.setReplaceId(replaceId);
|
||||
// 记录打卡坐标
|
||||
attendance.setLat(req.getLat());
|
||||
attendance.setLng(req.getLng());
|
||||
try {
|
||||
attendance.setClockLocation(JSTUtil.getLocationName(req.getLat(), req.getLng()));
|
||||
} catch (Exception e) {
|
||||
log.error("获取打卡位置失败", e);
|
||||
}
|
||||
|
||||
// 上传人脸照
|
||||
SysOssVo upload = ossService.upload(file);
|
||||
attendance.setFacePic(upload.getOssId().toString());
|
||||
Long finalUserId = userId;
|
||||
CompletableFuture.runAsync(() -> {
|
||||
try {
|
||||
chatServerHandler.sendSystemMessageToUser(finalUserId, "打卡成功", "1");
|
||||
} catch (Exception e) {
|
||||
log.error("异步发送系统消息失败,用户ID: {}, 消息: {}", finalUserId, "打卡成功", e);
|
||||
if (clockTypeByTime == 1) {
|
||||
if(CollectionUtils.isEmpty(inAttendances)){
|
||||
BusAttendance attendance = new BusAttendance();
|
||||
// 上班打卡
|
||||
attendance.setClockType(BusAttendanceCommuterEnum.CLOCKIN.getValue());
|
||||
//打卡时间
|
||||
attendance.setRuleTime(busAttendanceRuleVo.getClockInTime());
|
||||
// 判断是否为迟到
|
||||
if (isLate(now, busAttendanceRuleVo)) {
|
||||
attendance.setClockStatus(BusAttendanceClockStatusEnum.LATE.getValue());
|
||||
attendance.setMinuteCount(getMinutesDifference(now, busAttendanceRuleVo.getClockInTime()));
|
||||
} else {
|
||||
attendance.setClockStatus(BusAttendanceClockStatusEnum.NORMAL.getValue());
|
||||
}
|
||||
});
|
||||
//计算工资
|
||||
attendance.setSalary(computeSalary(constructionUser, inAttendances));
|
||||
return this.save(attendance);
|
||||
//只要请假,直接归为请假
|
||||
LocalDateTime localDateTime = localDate.atTime(busAttendanceRuleVo.getClockInTime());
|
||||
if (leaveService.isLeave(localDateTime, userId)) {
|
||||
attendance.setClockStatus(BusAttendanceClockStatusEnum.LEAVE.getValue());
|
||||
}
|
||||
|
||||
// 填充信息
|
||||
attendance.setUserId(userId);
|
||||
attendance.setProjectId(req.getProjectId());
|
||||
attendance.setClockDate(localDate);
|
||||
attendance.setClockTime(now);
|
||||
attendance.setUserName(constructionUser.getUserName());
|
||||
attendance.setReplaceId(replaceId);
|
||||
if(req.getSource() != null){
|
||||
attendance.setSource(req.getSource());
|
||||
}
|
||||
// 记录打卡坐标
|
||||
attendance.setLat(req.getLat());
|
||||
attendance.setLng(req.getLng());
|
||||
try {
|
||||
attendance.setClockLocation(JSTUtil.getLocationName(req.getLat(), req.getLng()));
|
||||
} catch (Exception e) {
|
||||
log.error("获取打卡位置失败", e);
|
||||
}
|
||||
|
||||
// 上传人脸照
|
||||
SysOssVo upload = ossService.upload(file);
|
||||
attendance.setFacePic(upload.getOssId().toString());
|
||||
Long finalUserId = userId;
|
||||
CompletableFuture.runAsync(() -> {
|
||||
try {
|
||||
chatServerHandler.sendSystemMessageToUser(finalUserId, "打卡成功", "1");
|
||||
} catch (Exception e) {
|
||||
log.error("异步发送系统消息失败,用户ID: {}, 消息: {}", finalUserId, "打卡成功", e);
|
||||
}
|
||||
});
|
||||
//计算工资
|
||||
attendance.setSalary(computeSalary(constructionUser, inAttendances));
|
||||
return this.save(attendance);
|
||||
}
|
||||
//考勤机打卡会有历史记录,需要更新状态
|
||||
if(CollectionUtil.isNotEmpty(outAttendances) && "1".equals(req.getSource())){
|
||||
BusAttendance busAttendance = outAttendances.getFirst();
|
||||
String oldStatus = busAttendance.getClockStatus();
|
||||
//更新打卡时间
|
||||
busAttendance.setClockTime(now);
|
||||
// 判断是否为迟到
|
||||
if (isLate(now, busAttendanceRuleVo)) {
|
||||
busAttendance.setClockStatus(BusAttendanceClockStatusEnum.LATE.getValue());
|
||||
busAttendance.setMinuteCount(getMinutesDifference(now, busAttendanceRuleVo.getClockInTime()));
|
||||
} else {
|
||||
busAttendance.setClockStatus(BusAttendanceClockStatusEnum.NORMAL.getValue());
|
||||
}
|
||||
//只要请假,直接归为请假
|
||||
LocalDateTime localDateTime = localDate.atTime(busAttendanceRuleVo.getClockInTime());
|
||||
if (leaveService.isLeave(localDateTime, userId)) {
|
||||
busAttendance.setClockStatus(BusAttendanceClockStatusEnum.LEAVE.getValue());
|
||||
}
|
||||
|
||||
busAttendance.setSource(req.getSource());
|
||||
//如果是缺卡需要上传人脸
|
||||
if(oldStatus.equals(BusAttendanceClockStatusEnum.UNCLOCK.getValue())){
|
||||
SysOssVo upload = ossService.upload(file);
|
||||
busAttendance.setFacePic(upload.getOssId().toString());
|
||||
}
|
||||
updateById(busAttendance);
|
||||
}
|
||||
|
||||
|
||||
} else if (clockTypeByTime == 2 || CollectionUtils.isNotEmpty(inAttendances)) {
|
||||
|
||||
if (CollectionUtil.isNotEmpty(outAttendances)) {
|
||||
BusAttendance busAttendance = outAttendances.getFirst();
|
||||
if (busAttendance.getClockStatus().equals(BusAttendanceClockStatusEnum.UNCLOCK.getValue())) {
|
||||
throw new ServiceException("下班缺卡记录已生成,不能更新");
|
||||
if("1".equals(req.getSource())){
|
||||
busAttendance.setSource(req.getSource());
|
||||
if(busAttendance.getClockStatus().equals(BusAttendanceClockStatusEnum.UNCLOCK.getValue())){
|
||||
SysOssVo upload = ossService.upload(file);
|
||||
busAttendance.setFacePic(upload.getOssId().toString());
|
||||
}
|
||||
}else {
|
||||
if (busAttendance.getClockStatus().equals(BusAttendanceClockStatusEnum.UNCLOCK.getValue())) {
|
||||
throw new ServiceException("下班缺卡记录已生成,不能更新");
|
||||
}
|
||||
}
|
||||
|
||||
//更新打卡时间
|
||||
busAttendance.setClockTime(now);
|
||||
// 判断是否为早退
|
||||
@ -488,6 +530,9 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
||||
attendance.setClockTime(now);
|
||||
attendance.setUserName(constructionUser.getUserName());
|
||||
attendance.setReplaceId(replaceId);
|
||||
if(req.getSource() != null){
|
||||
attendance.setSource(req.getSource());
|
||||
}
|
||||
// 记录打卡坐标
|
||||
attendance.setLat(req.getLat());
|
||||
attendance.setLng(req.getLng());
|
||||
@ -1109,7 +1154,9 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
||||
// 过滤有效考勤记录并按日期分组
|
||||
Map<LocalDate, List<BusAttendanceVo>> dateAttendanceMap = attendanceList.stream()
|
||||
.filter(a -> validStatusList.contains(a.getClockStatus()))
|
||||
.collect(Collectors.groupingBy(BusAttendanceVo::getClockDate));
|
||||
.collect(Collectors.groupingBy(BusAttendanceVo::getClockDate,
|
||||
LinkedHashMap::new,
|
||||
Collectors.toList()));
|
||||
List<AttendanceUserDataDetailVo> workList = new ArrayList<>();
|
||||
for (Map.Entry<LocalDate, List<BusAttendanceVo>> entry : dateAttendanceMap.entrySet()) {
|
||||
LocalDate key = entry.getKey();
|
||||
|
||||
@ -780,7 +780,7 @@ public class BusProjectServiceImpl extends ServiceImpl<BusProjectMapper, BusProj
|
||||
final Long PID = 0L;
|
||||
lqw.eq(BusProject::getPId, PID);
|
||||
}
|
||||
if (ObjectUtils.isNotEmpty(deptId)) {
|
||||
if (ObjectUtils.isNotEmpty(deptId) && deptId != 100) {
|
||||
SysDeptVo sysDeptVo = deptService.selectDeptById(deptId);
|
||||
List<Long> list = StringUtils.splitTo(sysDeptVo.getAncestors(), Convert::toLong);
|
||||
List<Long> projectDepts = new ArrayList<>();
|
||||
@ -1402,7 +1402,7 @@ public class BusProjectServiceImpl extends ServiceImpl<BusProjectMapper, BusProj
|
||||
projectVos.add(create("四川省", "阿坝公司运检大楼“风光油储型”微电网试点项目", 31.9500, 102.2167, 2));
|
||||
|
||||
// 老挝 - 万象
|
||||
projectVos.add(create("老挝", "巴塞", 15.110507, 15.110507, 1));
|
||||
projectVos.add(create("老挝", "巴塞", 15.110507, 105.817291, 1));
|
||||
// 老挝 - 琅勃拉邦
|
||||
projectVos.add(create("老挝", "波利坎塞", 18.39639, 103.65583, 1));
|
||||
Map<String, Map<String, Map<String, String>>> map = new HashMap<>();
|
||||
@ -1418,6 +1418,7 @@ public class BusProjectServiceImpl extends ServiceImpl<BusProjectMapper, BusProj
|
||||
map2.put("lng", project.getLng());
|
||||
map2.put("lat", project.getLat());
|
||||
map2.put("position", project.getPosition());
|
||||
map2.put("plan", project.getPlan());
|
||||
map2.put("projectId", project.getId().toString());
|
||||
map1.put(project.getProjectName(), map2);
|
||||
//当满足条件时删除该元素
|
||||
|
||||
@ -13,6 +13,7 @@ import org.dromara.common.core.constant.HttpStatus;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.ObjectUtils;
|
||||
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.TableDataInfo;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
@ -198,14 +199,14 @@ public class BusProjectTeamMemberServiceImpl extends ServiceImpl<BusProjectTeamM
|
||||
relevancy.setProjectId(req.getProjectId());
|
||||
userProjectRelevancyService.save(relevancy);
|
||||
}
|
||||
//设置基础角色 先清空已有角色
|
||||
//设置基础角色 清空所有App权限角色
|
||||
userRoleMapper.delete(Wrappers.<SysUserRole>lambdaQuery()
|
||||
.eq(SysUserRole::getUserId, constructionUser.getSysUserId())
|
||||
.eq(SysUserRole::getProjectId, req.getProjectId())
|
||||
.in(SysUserRole::getRoleId, Arrays.asList(2L, 3L))
|
||||
.in(SysUserRole::getRoleId, AppUserTypeEnum.ROLE_ID_LIST)
|
||||
);
|
||||
//再添加分配角色
|
||||
Long roleId = "0".equals(req.getPostId()) ? 2L : 3L;
|
||||
Long roleId = "0".equals(req.getPostId()) ? AppUserTypeEnum.SG.getRoleId() : AppUserTypeEnum.BZZ.getRoleId();
|
||||
SysUserRole sysUserRole = new SysUserRole();
|
||||
sysUserRole.setUserId(constructionUser.getSysUserId());
|
||||
sysUserRole.setRoleId(roleId);
|
||||
|
||||
@ -145,7 +145,7 @@ public class QltQualityInspectionServiceImpl extends ServiceImpl<QltQualityInspe
|
||||
}
|
||||
// 获取巡检情况
|
||||
List<QltQualityInspectionGis> list = qualityInspectionList.stream()
|
||||
.filter(q -> "2".equals(q.getIsReply()))
|
||||
// .filter(q -> "2".equals(q.getIsReply()))
|
||||
.toList().stream().map(q -> {
|
||||
QltQualityInspectionGis gis = new QltQualityInspectionGis();
|
||||
BeanUtils.copyProperties(q, gis);
|
||||
@ -153,7 +153,7 @@ public class QltQualityInspectionServiceImpl extends ServiceImpl<QltQualityInspe
|
||||
}).toList();
|
||||
gisVo.setList(list.stream()
|
||||
.sorted(Comparator.comparing(QltQualityInspectionGis::getCreateTime).reversed())
|
||||
.limit(Optional.ofNullable(req.getPageSize()).orElse(20))
|
||||
// .limit(Optional.ofNullable(req.getPageSize()).orElse(20))
|
||||
.toList());
|
||||
gisVo.setCount((long) list.size());
|
||||
// 获取整改情况
|
||||
@ -168,7 +168,7 @@ public class QltQualityInspectionServiceImpl extends ServiceImpl<QltQualityInspe
|
||||
gisVo.setCorrectSituation((long) correctList.size());
|
||||
gisVo.setCorrectList(correctList.stream()
|
||||
.sorted(Comparator.comparing(QltQualityInspectionGis::getCreateTime).reversed())
|
||||
.limit(Optional.ofNullable(req.getPageSize()).orElse(20))
|
||||
// .limit(Optional.ofNullable(req.getPageSize()).orElse(20))
|
||||
.toList());
|
||||
// gisVo.setCorrectSituation(String.format("%.2f", passCount * 100.0 / qualityInspectionList.size()));
|
||||
return gisVo;
|
||||
|
||||
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.common.core.constant.HttpStatus;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
@ -39,6 +40,7 @@ import java.util.Objects;
|
||||
* @author lilemy
|
||||
* @date 2025-06-24
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class HseRecognizeRecordServiceImpl extends ServiceImpl<HseRecognizeRecordMapper, HseRecognizeRecord>
|
||||
implements IHseRecognizeRecordService {
|
||||
@ -109,7 +111,8 @@ public class HseRecognizeRecordServiceImpl extends ServiceImpl<HseRecognizeRecor
|
||||
entity.setCreateTime(record.getCreateTime());
|
||||
Long projectId = record.getProjectId();
|
||||
if (projectId == null) {
|
||||
entity.setRemark("该摄像头暂未分配到项目中");
|
||||
log.warn("摄像头[{}]暂未分配到项目中", record.getDeviceSerial());
|
||||
continue;
|
||||
}
|
||||
List<RecognizeTargetVo> targets = record.getTargets();
|
||||
List<String> codeList = targets.stream()
|
||||
|
||||
@ -232,7 +232,7 @@ public class HseSafetyInspectionServiceImpl extends ServiceImpl<HseSafetyInspect
|
||||
return gis;
|
||||
}).toList();
|
||||
List<HseSafetyInspectionGis> inspections = safetyInspectionList.stream()
|
||||
.filter(q -> "2".equals(q.getIsReply()))
|
||||
// .filter(q -> "2".equals(q.getIsReply()))
|
||||
.toList()
|
||||
.stream().map(p -> {
|
||||
HseSafetyInspectionGis gis = new HseSafetyInspectionGis();
|
||||
|
||||
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.bigscreen.domain.dto.WeatherQueryReq;
|
||||
import org.dromara.common.core.constant.HttpStatus;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
@ -41,6 +42,7 @@ import java.util.List;
|
||||
* @date 2025-03-20
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class HseSafetyLogServiceImpl extends ServiceImpl<HseSafetyLogMapper, HseSafetyLog>
|
||||
implements IHseSafetyLogService {
|
||||
|
||||
@ -248,6 +250,8 @@ public class HseSafetyLogServiceImpl extends ServiceImpl<HseSafetyLogMapper, Hse
|
||||
|
||||
@Override
|
||||
public WeatherVo getWeatherNowDaysList(WeatherQueryReq req) {
|
||||
//打印参数
|
||||
log.info("获取天气信息参数:{}", req);
|
||||
List<WeatherVo> weatherListVo = weatherManager.getWeatherListVo(req.getLng(), req.getLat(), WeatherConstant.THREE_DAYS_WEATHER_PATH);
|
||||
return weatherListVo.getFirst();
|
||||
}
|
||||
|
||||
@ -17,6 +17,7 @@ import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.encrypt.annotation.ApiEncrypt;
|
||||
import org.dromara.common.excel.core.ExcelResult;
|
||||
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;
|
||||
@ -83,5 +84,21 @@ public class SysUserAppController extends BaseController {
|
||||
return R.ok(deptService.selectDeptTreeList(dept));
|
||||
}
|
||||
|
||||
/**
|
||||
* 注销用户信息
|
||||
*/
|
||||
@RepeatSubmit()
|
||||
@PutMapping("/deletion")
|
||||
public R<Boolean> deletion() {
|
||||
return R.ok(userService.deletion());
|
||||
}
|
||||
|
||||
/**
|
||||
* 密码比对
|
||||
*/
|
||||
@GetMapping("/passwordCompare")
|
||||
public R<Boolean> passwordCompare(String password) {
|
||||
return R.ok(userService.passwordCompare(password));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -9,6 +9,7 @@ import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.system.domain.bo.SysDeptBo;
|
||||
import org.dromara.system.domain.vo.SysDeptVo;
|
||||
@ -157,4 +158,23 @@ public class SysDeptController extends BaseController {
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前登录用户顶级部门
|
||||
*/
|
||||
@GetMapping("/getTopDept")
|
||||
public R<SysDeptVo> getTopDept() {
|
||||
// 获取当前用户部门
|
||||
Long deptId = LoginHelper.getDeptId();
|
||||
SysDeptVo deptVo = deptService.selectDeptById(deptId);
|
||||
if (LoginHelper.isSuperAdmin()) {
|
||||
return R.ok(deptVo);
|
||||
}
|
||||
String ancestors = deptVo.getAncestors();
|
||||
List<Long> ids = StringUtils.splitTo(ancestors, Convert::toLong);
|
||||
if (ids.size() == 2) {
|
||||
return R.ok(deptVo);
|
||||
}
|
||||
return R.ok(deptService.selectDeptById(ids.get(2)));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -16,6 +16,7 @@ import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.StreamUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.encrypt.annotation.ApiEncrypt;
|
||||
import org.dromara.common.enums.AppUserTypeEnum;
|
||||
import org.dromara.common.excel.core.ExcelResult;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
@ -45,6 +46,8 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 用户信息
|
||||
@ -224,6 +227,29 @@ public class SysUserController extends BaseController {
|
||||
.flatMap(dto -> dto.getRoleIds().stream())
|
||||
.distinct()
|
||||
.toList();
|
||||
//校验roleId (2,3,4,5)的数量,只能选择1个
|
||||
|
||||
// 过滤出roleList中包含的目标元素
|
||||
List<Long> matchedRoles = roleList.stream()
|
||||
.filter(AppUserTypeEnum.ROLE_ID_LIST::contains)
|
||||
.toList();
|
||||
|
||||
// 统计数量
|
||||
long count = matchedRoles.size();
|
||||
|
||||
// 数量校验
|
||||
if (count > 1) {
|
||||
return R.fail("app用户类型角色只能选择一个");
|
||||
}
|
||||
|
||||
// 获取具体包含的元素(或提示不包含)
|
||||
if (count == 1) {
|
||||
Long matchedRole = matchedRoles.get(0);
|
||||
AppUserTypeEnum byRoleId = AppUserTypeEnum.getByRoleId(matchedRole);
|
||||
if (byRoleId != null) {
|
||||
user.setAppUserType(byRoleId.getType());
|
||||
}
|
||||
}
|
||||
deptService.checkDeptMatchRole(user.getUserId(), roleList);
|
||||
if (!userService.checkUserNameUnique(user)) {
|
||||
return R.fail("修改用户'" + user.getUserName() + "'失败,登录账号已存在");
|
||||
|
||||
@ -8,6 +8,7 @@ import org.dromara.common.mybatis.annotation.DataColumn;
|
||||
import org.dromara.common.mybatis.annotation.DataPermission;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.dromara.system.domain.SysUser;
|
||||
import org.dromara.system.domain.bo.SysUserBo;
|
||||
import org.dromara.system.domain.vo.SysUserExportVo;
|
||||
import org.dromara.system.domain.vo.SysUserVo;
|
||||
|
||||
@ -137,4 +138,13 @@ public interface SysUserMapper extends BaseMapperPlus<SysUser, SysUserVo> {
|
||||
|
||||
|
||||
List<SysUserVo> selectUserListByAppUserType(@Param("appUserType") String appUserType, @Param("projectId")Long projectId, @Param("contractorId")Long contractorId);
|
||||
|
||||
|
||||
SysUser selectDefFlagUser(@Param("phonenumber") String phonenumber);
|
||||
|
||||
|
||||
void updateDefFlag(@Param("sysUserBo") SysUserBo sysUserBo);
|
||||
|
||||
void updateConstructionUser(@Param("userId") Long userId);
|
||||
|
||||
}
|
||||
|
||||
@ -165,4 +165,6 @@ public interface ISysDeptService {
|
||||
int deleteDeptById(Long deptId);
|
||||
|
||||
List<SysDeptVo> querListDept();
|
||||
|
||||
String selectDeptNameById(Long id);
|
||||
}
|
||||
|
||||
@ -283,5 +283,7 @@ public interface ISysUserService {
|
||||
|
||||
String queryNameById(Long id);
|
||||
|
||||
Boolean deletion();
|
||||
|
||||
Boolean passwordCompare(String password);
|
||||
}
|
||||
|
||||
@ -538,6 +538,12 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
|
||||
return sysDeptVos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String selectDeptNameById(Long id) {
|
||||
SysDept sysDept = baseMapper.selectById(id);
|
||||
return sysDept != null ?sysDept.getDeptName():"";
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前部门的祖先ID、自己ID、以及所有祖先的“同级部门ID”
|
||||
*
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package org.dromara.system.service.impl;
|
||||
|
||||
import cn.dev33.satoken.secure.BCrypt;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
@ -15,6 +16,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.aspectj.apache.bcel.generic.RET;
|
||||
import org.dromara.common.core.constant.CacheNames;
|
||||
import org.dromara.common.core.constant.SystemConstants;
|
||||
import org.dromara.common.core.domain.dto.UserDTO;
|
||||
@ -22,6 +24,7 @@ import org.dromara.common.core.enums.UserType;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.service.UserService;
|
||||
import org.dromara.common.core.utils.*;
|
||||
import org.dromara.common.enums.AppUserTypeEnum;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
@ -57,6 +60,7 @@ import org.springframework.http.HttpStatus;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@ -493,6 +497,14 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
||||
if (flag < 1) {
|
||||
throw new ServiceException("修改用户" + user.getUserName() + "信息失败");
|
||||
}
|
||||
//修改construction_user表
|
||||
if(user.getAppUserType() != null){
|
||||
constructionUserService.lambdaUpdate()
|
||||
.set(SubConstructionUser::getUserRole, user.getAppUserType())
|
||||
.eq(SubConstructionUser::getSysUserId, user.getUserId())
|
||||
.update();
|
||||
}
|
||||
|
||||
// 没有修改部门则不需要修改用户与项目的关联
|
||||
// if (oldUser.getDeptId().equals(user.getDeptId())) {
|
||||
// return flag;
|
||||
@ -895,6 +907,9 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
||||
if (sysUser == null) {
|
||||
throw new ServiceException("用户不存在!");
|
||||
}
|
||||
if(appUserType.equals(sysUser.getAppUserType())){
|
||||
throw new ServiceException("当前已是选中用户类型 !");
|
||||
}
|
||||
Long contractorId = null;
|
||||
SubConstructionUser constructionUser = constructionUserService.lambdaQuery()
|
||||
.eq(SubConstructionUser::getSysUserId, userId)
|
||||
@ -910,7 +925,7 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
||||
contractorId = constructionUser.getContractorId();
|
||||
}
|
||||
String oldType = sysUser.getAppUserType();
|
||||
if ("0".equals(oldType)) { //施工人员->管理人员/分包人员
|
||||
if (AppUserTypeEnum.SG.getType().equals(oldType)) { //施工人员->管理人员/分包人员
|
||||
//清除app所有角色
|
||||
userRoleMapper.deleteAppRoleByUserId(userId);
|
||||
}else { //管理人员 <-> 施工人员
|
||||
@ -929,7 +944,10 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
||||
projects = projectIds;
|
||||
}
|
||||
|
||||
Long roleId = "1".equals(appUserType)?4L:5L;
|
||||
Long roleId = 2L;
|
||||
if(!AppUserTypeEnum.SG.getType().equals(appUserType)){
|
||||
roleId = AppUserTypeEnum.getByType(appUserType).getRoleId();
|
||||
}
|
||||
ArrayList<SysUserRole> sysUserRoles = new ArrayList<>();
|
||||
for (Long project : projects) {
|
||||
SysUserRole sysUserRole = new SysUserRole();
|
||||
@ -1281,6 +1299,49 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
||||
return sysUserVo != null ? sysUserVo.getNickName() : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean deletion() {
|
||||
Long userId = LoginHelper.getUserId();
|
||||
SubConstructionUser constructionUser = constructionUserService.getByUserId(userId);
|
||||
if(constructionUser!=null && constructionUser.getTeamId()!=null){
|
||||
throw new ServiceException("请先退出班组");
|
||||
}
|
||||
|
||||
//清空关联项目
|
||||
userProjectRelevancyService.deleteByUserId(userId);
|
||||
|
||||
//逻辑删除
|
||||
constructionUserService.lambdaUpdate()
|
||||
.set(SubConstructionUser::getProjectId, null)
|
||||
.set(SubConstructionUser::getContractorId, null)
|
||||
.set(SubConstructionUser::getTeamId, null)
|
||||
.set(SubConstructionUser::getUserRole, "9")
|
||||
.set(SubConstructionUser::getTypeOfWork, null)
|
||||
.set(SubConstructionUser::getWageMeasureUnit, null)
|
||||
.set(SubConstructionUser::getEntryDate, null)
|
||||
.set(SubConstructionUser::getLeaveDate, null)
|
||||
.set(SubConstructionUser::getSalary, BigDecimal.ZERO)
|
||||
.set(SubConstructionUser::getFirstDate, null)
|
||||
.set(SubConstructionUser::getExitStatus, "0")
|
||||
.set(SubConstructionUser::getDelFlag, "1")
|
||||
.eq(SubConstructionUser::getSysUserId, userId)
|
||||
.update();
|
||||
|
||||
|
||||
//删除用户角色关联
|
||||
userRoleMapper.delete(new LambdaQueryWrapper<SysUserRole>().eq(SysUserRole::getUserId, userId));
|
||||
|
||||
return baseMapper.deleteById(userId)>0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean passwordCompare(String password) {
|
||||
Long userId = LoginHelper.getUserId();
|
||||
SysUser sysUser = baseMapper.selectById(userId);
|
||||
return BCrypt.checkpw(password, sysUser.getPassword());
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserDTO selectUser(Long userId) {
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package org.dromara.tender.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
@ -384,6 +385,9 @@ public class BusBiddingPlanServiceImpl extends ServiceImpl<BusBiddingPlanMapper,
|
||||
bplanIdds.add(busBiddingPlanVo.getId());
|
||||
}
|
||||
Map<Long, BigDecimal> map = new HashMap<>();
|
||||
if(CollectionUtil.isEmpty(bplanIdds)){
|
||||
return map;
|
||||
}
|
||||
//获取该供应商的所有材料
|
||||
List<BusTenderPlanningLimitList> busTenderPlanningLimitLists = busTenderPlanningLimitListMapper.selectList(new LambdaQueryWrapper<BusTenderPlanningLimitList>().in(BusTenderPlanningLimitList::getBiddingPlanId, bplanIdds));
|
||||
for (BusTenderPlanningLimitList v : busTenderPlanningLimitLists) {
|
||||
|
||||
@ -0,0 +1,73 @@
|
||||
package org.dromara.xzd.biddingManagement.biddingDocumentList.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 投标文件-要求对象 xzd_tbwj_zsyq
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xzd_tbwj_zsyq")
|
||||
public class XzdTbwjZsyq extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 主表id
|
||||
*/
|
||||
private Long masterId;
|
||||
|
||||
/**
|
||||
* 要求 资审要求 商务标要求 技术标要求
|
||||
*/
|
||||
private String qualificationRequirement;
|
||||
|
||||
|
||||
/**
|
||||
* 类型 1资审要求 2商务标要求 3技术标要求
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 编制要点
|
||||
*/
|
||||
private String compilationPoints;
|
||||
|
||||
/**
|
||||
* 提供时间
|
||||
*/
|
||||
private LocalDate provisionTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String auditStatus;
|
||||
|
||||
|
||||
}
|
||||
@ -5,6 +5,8 @@ import lombok.Data;
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.domain.XzdBiddingDocument;
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.domain.vo.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class XzdBiddingDocumentBoBylist {
|
||||
|
||||
@ -18,25 +20,6 @@ public class XzdBiddingDocumentBoBylist {
|
||||
// 投标文件-商务标
|
||||
private XzdTbwjBusinessBidBo xzdTbwjBusinessBidVo;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// // 投标文件-商务标要求
|
||||
// private XzdTbwjBusinessBidRequirementsBo xzdTbwjBusinessBidRequirementsVo;
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//// 投标文件-资审要求
|
||||
// private XzdTbwjQualificationRequirementsBo xzdTbwjQualificationRequirementsVo;
|
||||
//
|
||||
//// 投标文件-技术标要求
|
||||
// private XzdTbwjTechnicalBidRequirementsBo xzdTbwjTechnicalBidRequirementsVo;
|
||||
//
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 投标文件-资审要求
|
||||
private List<XzdTbwjZsyqBo> yqList;
|
||||
}
|
||||
|
||||
@ -0,0 +1,72 @@
|
||||
package org.dromara.xzd.biddingManagement.biddingDocumentList.domain.bo;
|
||||
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.domain.XzdTbwjZsyq;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 投标文件-要求业务对象 xzd_tbwj_zsyq
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XzdTbwjZsyq.class, reverseConvertGenerate = false)
|
||||
public class XzdTbwjZsyqBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 主表id
|
||||
*/
|
||||
private Long masterId;
|
||||
|
||||
/**
|
||||
* 要求 资审要求 商务标要求 技术标要求
|
||||
*/
|
||||
private String qualificationRequirement;
|
||||
|
||||
/**
|
||||
* 类型 1资审要求 2商务标要求 3技术标要求
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 编制要点
|
||||
*/
|
||||
private String compilationPoints;
|
||||
|
||||
/**
|
||||
* 提供时间
|
||||
*/
|
||||
private LocalDate provisionTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String auditStatus;
|
||||
|
||||
|
||||
}
|
||||
@ -5,6 +5,9 @@ import lombok.Data;
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.domain.XzdBiddingDocument;
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.domain.XzdTbwjBusinessBid;
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.domain.XzdTbwjTechnicalBid;
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.domain.bo.XzdTbwjZsyqBo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class XzdBiddingDocumentVoBylist {
|
||||
@ -20,6 +23,10 @@ public class XzdBiddingDocumentVoBylist {
|
||||
// 投标文件-商务标
|
||||
private XzdTbwjBusinessBid xzdTbwjBusinessBidVo;
|
||||
|
||||
// 投标文件-资审要求
|
||||
private List<XzdTbwjZsyqVo> yqList;
|
||||
|
||||
|
||||
//// 投标文件-商务标要求
|
||||
// private XzdTbwjBusinessBidRequirementsVo xzdTbwjBusinessBidRequirementsVo;
|
||||
//
|
||||
|
||||
@ -0,0 +1,86 @@
|
||||
package org.dromara.xzd.biddingManagement.biddingDocumentList.domain.vo;
|
||||
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.domain.XzdTbwjZsyq;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 投标文件-要求视图对象 xzd_tbwj_zsyq
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-21
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XzdTbwjZsyq.class)
|
||||
public class XzdTbwjZsyqVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 主表id
|
||||
*/
|
||||
@ExcelProperty(value = "主表id")
|
||||
private Long masterId;
|
||||
|
||||
/**
|
||||
* 要求 资审要求 商务标要求 技术标要求
|
||||
*/
|
||||
@ExcelProperty(value = "要求 资审要求 商务标要求 技术标要求")
|
||||
private String qualificationRequirement;
|
||||
|
||||
/**
|
||||
* 类型 1资审要求 2商务标要求 3技术标要求
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 编制要点
|
||||
*/
|
||||
@ExcelProperty(value = "编制要点")
|
||||
private String compilationPoints;
|
||||
|
||||
/**
|
||||
* 提供时间
|
||||
*/
|
||||
@ExcelProperty(value = "提供时间")
|
||||
private LocalDate provisionTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
@ExcelProperty(value = "文件ID")
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
@ExcelProperty(value = "审核状态")
|
||||
private String auditStatus;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package org.dromara.xzd.biddingManagement.biddingDocumentList.mapper;
|
||||
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.domain.XzdTbwjZsyq;
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.domain.vo.XzdTbwjZsyqVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 投标文件-要求Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-21
|
||||
*/
|
||||
public interface XzdTbwjZsyqMapper extends BaseMapperPlus<XzdTbwjZsyq, XzdTbwjZsyqVo> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package org.dromara.xzd.biddingManagement.biddingDocumentList.service;
|
||||
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.domain.vo.XzdTbwjZsyqVo;
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.domain.bo.XzdTbwjZsyqBo;
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.domain.XzdTbwjZsyq;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 投标文件-要求Service接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-21
|
||||
*/
|
||||
public interface IXzdTbwjZsyqService extends IService<XzdTbwjZsyq>{
|
||||
|
||||
/**
|
||||
* 查询投标文件-要求
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 投标文件-要求
|
||||
*/
|
||||
XzdTbwjZsyqVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询投标文件-要求列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 投标文件-要求分页列表
|
||||
*/
|
||||
TableDataInfo<XzdTbwjZsyqVo> queryPageList(XzdTbwjZsyqBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的投标文件-要求列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 投标文件-要求列表
|
||||
*/
|
||||
List<XzdTbwjZsyqVo> queryList(XzdTbwjZsyqBo bo);
|
||||
|
||||
/**
|
||||
* 新增投标文件-要求
|
||||
*
|
||||
* @param bo 投标文件-要求
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(XzdTbwjZsyqBo bo);
|
||||
|
||||
/**
|
||||
* 修改投标文件-要求
|
||||
*
|
||||
* @param bo 投标文件-要求
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(XzdTbwjZsyqBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除投标文件-要求信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@ -14,17 +14,17 @@ import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.XzdBidPreProject
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.domain.XzdBiddingDocument;
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.domain.XzdTbwjBusinessBid;
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.domain.XzdTbwjTechnicalBid;
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.domain.bo.XzdBiddingDocumentBo;
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.domain.bo.XzdBiddingDocumentBoBylist;
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.domain.bo.XzdTbwjBusinessBidBo;
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.domain.bo.XzdTbwjTechnicalBidBo;
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.domain.XzdTbwjZsyq;
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.domain.bo.*;
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.domain.vo.XzdBiddingDocumentVo;
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.domain.vo.XzdBiddingDocumentVoBylist;
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.domain.vo.XzdTbwjBusinessBidVo;
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.domain.vo.XzdTbwjZsyqVo;
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.mapper.XzdBiddingDocumentMapper;
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.service.IXzdBiddingDocumentService;
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.service.IXzdTbwjBusinessBidService;
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.service.IXzdTbwjTechnicalBidService;
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.service.IXzdTbwjZsyqService;
|
||||
import org.dromara.xzd.utilS.AreaUtil;
|
||||
import org.locationtech.jts.edgegraph.HalfEdge;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
@ -57,6 +57,8 @@ public class XzdBiddingDocumentServiceImpl extends ServiceImpl<XzdBiddingDocumen
|
||||
// 投标文件-商务标
|
||||
private final IXzdTbwjBusinessBidService xzdTbwjBusinessBidService;
|
||||
|
||||
private final IXzdTbwjZsyqService iXzdTbwjZsyqService;
|
||||
|
||||
/**
|
||||
* 查询投标文件
|
||||
*
|
||||
@ -70,10 +72,13 @@ public class XzdBiddingDocumentServiceImpl extends ServiceImpl<XzdBiddingDocumen
|
||||
XzdBiddingDocumentVo xzdBiddingDocumentVo = baseMapper.selectVoById(id);
|
||||
XzdTbwjTechnicalBid xzdTbwjTechnicalBid = xzdTbwjTechnicalBidService.getBaseMapper().selectOne(new LambdaQueryWrapper<XzdTbwjTechnicalBid>().eq(XzdTbwjTechnicalBid::getBiddingDocumentId, id));
|
||||
XzdTbwjBusinessBid xzdTbwjBusinessBid = xzdTbwjBusinessBidService.getBaseMapper().selectOne(new LambdaQueryWrapper<XzdTbwjBusinessBid>().eq(XzdTbwjBusinessBid::getBiddingDocumentId, id));
|
||||
List<XzdTbwjZsyq> xzdTbwjZsyqs = iXzdTbwjZsyqService.getBaseMapper().selectList(new LambdaQueryWrapper<XzdTbwjZsyq>().eq(XzdTbwjZsyq::getMasterId, id));
|
||||
|
||||
|
||||
bylist.setXzdBiddingDocument(xzdBiddingDocumentVo);
|
||||
bylist.setXzdTbwjTechnicalBidVo(xzdTbwjTechnicalBid);
|
||||
bylist.setXzdTbwjBusinessBidVo(xzdTbwjBusinessBid);
|
||||
bylist.setYqList(MapstructUtils.convert(xzdTbwjZsyqs, XzdTbwjZsyqVo.class));
|
||||
|
||||
return bylist;
|
||||
}
|
||||
@ -161,6 +166,15 @@ public class XzdBiddingDocumentServiceImpl extends ServiceImpl<XzdBiddingDocumen
|
||||
xzdTbwjBusinessBid.setBiddingDocumentId(xzdBiddingDocument.getId());
|
||||
xzdTbwjBusinessBidService.save(xzdTbwjBusinessBid);
|
||||
|
||||
// 资审要求 商务标要求 技术标要求
|
||||
List<XzdTbwjZsyqBo> yqList = bo.getYqList();
|
||||
if (yqList != null && yqList.size() > 0){
|
||||
yqList.forEach(yq -> {
|
||||
yq.setMasterId(xzdBiddingDocument.getId());
|
||||
});
|
||||
iXzdTbwjZsyqService.saveBatch(MapstructUtils.convert(yqList, XzdTbwjZsyq.class));
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -175,12 +189,28 @@ public class XzdBiddingDocumentServiceImpl extends ServiceImpl<XzdBiddingDocumen
|
||||
public Boolean updateByBo(XzdBiddingDocumentBoBylist bo) {
|
||||
XzdBiddingDocument update = MapstructUtils.convert(bo.getXzdBiddingDocument(), XzdBiddingDocument.class);
|
||||
// 投标文件-技术标
|
||||
XzdTbwjTechnicalBid xzdTbwjTechnicalBid = MapstructUtils.convert(bo.getXzdTbwjTechnicalBidVo(), XzdTbwjTechnicalBid.class);
|
||||
xzdTbwjTechnicalBidService.updateById(xzdTbwjTechnicalBid);
|
||||
if (bo.getXzdTbwjTechnicalBidVo() != null){
|
||||
XzdTbwjTechnicalBid xzdTbwjTechnicalBid = MapstructUtils.convert(bo.getXzdTbwjTechnicalBidVo(), XzdTbwjTechnicalBid.class);
|
||||
xzdTbwjTechnicalBidService.updateById(xzdTbwjTechnicalBid);
|
||||
}
|
||||
|
||||
// 投标文件-商务标
|
||||
XzdTbwjBusinessBid xzdTbwjBusinessBid = MapstructUtils.convert(bo.getXzdTbwjBusinessBidVo(), XzdTbwjBusinessBid.class);
|
||||
xzdTbwjBusinessBidService.updateById(xzdTbwjBusinessBid);
|
||||
if (bo.getXzdTbwjBusinessBidVo() != null){
|
||||
XzdTbwjBusinessBid xzdTbwjBusinessBid = MapstructUtils.convert(bo.getXzdTbwjBusinessBidVo(), XzdTbwjBusinessBid.class);
|
||||
xzdTbwjBusinessBidService.updateById(xzdTbwjBusinessBid);
|
||||
}
|
||||
// 资审要求 商务标要求 技术标要求
|
||||
iXzdTbwjZsyqService.getBaseMapper().delete(new LambdaQueryWrapper<XzdTbwjZsyq>().eq(XzdTbwjZsyq::getMasterId,update.getId()));
|
||||
List<XzdTbwjZsyqBo> yqList = bo.getYqList();
|
||||
if (yqList != null && yqList.size() > 0){
|
||||
yqList.forEach(yq -> {
|
||||
yq.setMasterId(update.getId());
|
||||
});
|
||||
iXzdTbwjZsyqService.saveBatch(MapstructUtils.convert(yqList, XzdTbwjZsyq.class));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
@ -211,6 +241,8 @@ public class XzdBiddingDocumentServiceImpl extends ServiceImpl<XzdBiddingDocumen
|
||||
// 删除商务标
|
||||
xzdTbwjBusinessBidService.removeByMap(hashMap);
|
||||
});
|
||||
iXzdTbwjZsyqService.getBaseMapper().delete(new LambdaQueryWrapper<XzdTbwjZsyq>().in(XzdTbwjZsyq::getMasterId,ids));
|
||||
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
@ -0,0 +1,136 @@
|
||||
package org.dromara.xzd.biddingManagement.biddingDocumentList.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.xzd.biddingManagement.biddingDocumentList.domain.bo.XzdTbwjZsyqBo;
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.domain.vo.XzdTbwjZsyqVo;
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.domain.XzdTbwjZsyq;
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.mapper.XzdTbwjZsyqMapper;
|
||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.service.IXzdTbwjZsyqService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 投标文件-要求Service业务层处理
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-21
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XzdTbwjZsyqServiceImpl extends ServiceImpl<XzdTbwjZsyqMapper, XzdTbwjZsyq> implements IXzdTbwjZsyqService {
|
||||
|
||||
private final XzdTbwjZsyqMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询投标文件-要求
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 投标文件-要求
|
||||
*/
|
||||
@Override
|
||||
public XzdTbwjZsyqVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询投标文件-要求列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 投标文件-要求分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XzdTbwjZsyqVo> queryPageList(XzdTbwjZsyqBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XzdTbwjZsyq> lqw = buildQueryWrapper(bo);
|
||||
Page<XzdTbwjZsyqVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的投标文件-要求列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 投标文件-要求列表
|
||||
*/
|
||||
@Override
|
||||
public List<XzdTbwjZsyqVo> queryList(XzdTbwjZsyqBo bo) {
|
||||
LambdaQueryWrapper<XzdTbwjZsyq> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XzdTbwjZsyq> buildQueryWrapper(XzdTbwjZsyqBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<XzdTbwjZsyq> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByDesc(XzdTbwjZsyq::getId);
|
||||
lqw.eq(bo.getMasterId() != null, XzdTbwjZsyq::getMasterId, bo.getMasterId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getQualificationRequirement()), XzdTbwjZsyq::getQualificationRequirement, bo.getQualificationRequirement());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCompilationPoints()), XzdTbwjZsyq::getCompilationPoints, bo.getCompilationPoints());
|
||||
lqw.eq(bo.getProvisionTime() != null, XzdTbwjZsyq::getProvisionTime, bo.getProvisionTime());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFileId()), XzdTbwjZsyq::getFileId, bo.getFileId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getAuditStatus()), XzdTbwjZsyq::getAuditStatus, bo.getAuditStatus());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增投标文件-要求
|
||||
*
|
||||
* @param bo 投标文件-要求
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(XzdTbwjZsyqBo bo) {
|
||||
XzdTbwjZsyq add = MapstructUtils.convert(bo, XzdTbwjZsyq.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改投标文件-要求
|
||||
*
|
||||
* @param bo 投标文件-要求
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(XzdTbwjZsyqBo bo) {
|
||||
XzdTbwjZsyq update = MapstructUtils.convert(bo, XzdTbwjZsyq.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(XzdTbwjZsyq entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除投标文件-要求信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@ -4,6 +4,9 @@ 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.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
@ -37,7 +40,7 @@ public class XzdBidDepositPayment extends BaseEntity {
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
private Date documentDate;
|
||||
private LocalDate documentDate;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
@ -72,7 +75,7 @@ public class XzdBidDepositPayment extends BaseEntity {
|
||||
/**
|
||||
* 支付截止时间
|
||||
*/
|
||||
private Date paymentDeadline;
|
||||
private LocalDate paymentDeadline;
|
||||
|
||||
/**
|
||||
* 收款单位
|
||||
@ -121,7 +124,7 @@ public class XzdBidDepositPayment extends BaseEntity {
|
||||
/**
|
||||
* 保证金比例
|
||||
*/
|
||||
private Long depositRatio;
|
||||
private BigDecimal depositRatio;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
|
||||
@ -7,6 +7,9 @@ import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.xzd.biddingManagement.earnestMoney.domain.XzdBidDepositPayment;
|
||||
@ -36,7 +39,7 @@ public class XzdBidDepositPaymentBo extends BaseEntity {
|
||||
* 单据日期
|
||||
*/
|
||||
@NotNull(message = "单据日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date documentDate;
|
||||
private LocalDate documentDate;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
@ -74,7 +77,7 @@ public class XzdBidDepositPaymentBo extends BaseEntity {
|
||||
/**
|
||||
* 支付截止时间
|
||||
*/
|
||||
private Date paymentDeadline;
|
||||
private LocalDate paymentDeadline;
|
||||
|
||||
/**
|
||||
* 收款单位
|
||||
@ -125,7 +128,7 @@ public class XzdBidDepositPaymentBo extends BaseEntity {
|
||||
/**
|
||||
* 保证金比例
|
||||
*/
|
||||
private Long depositRatio;
|
||||
private BigDecimal depositRatio;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
|
||||
@ -9,8 +9,6 @@ import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.vo.QueryListXzdV
|
||||
public class XzdBidDepositPaymentByBqlx {
|
||||
|
||||
|
||||
|
||||
|
||||
private XzdBidDepositPaymentVo xzdBidDepositPaymentVo;
|
||||
|
||||
private QuerListXzdBidPreVo queryListXzdVo;
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package org.dromara.xzd.biddingManagement.earnestMoney.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
@ -51,7 +53,7 @@ public class XzdBidDepositPaymentVo implements Serializable {
|
||||
* 单据日期
|
||||
*/
|
||||
@ExcelProperty(value = "单据日期")
|
||||
private Date documentDate;
|
||||
private LocalDate documentDate;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
@ -93,7 +95,7 @@ public class XzdBidDepositPaymentVo implements Serializable {
|
||||
* 支付截止时间
|
||||
*/
|
||||
@ExcelProperty(value = "支付截止时间")
|
||||
private Date paymentDeadline;
|
||||
private LocalDate paymentDeadline;
|
||||
|
||||
/**
|
||||
* 收款单位
|
||||
@ -101,6 +103,13 @@ public class XzdBidDepositPaymentVo implements Serializable {
|
||||
@ExcelProperty(value = "收款单位")
|
||||
private String receivingUnit;
|
||||
|
||||
|
||||
/**
|
||||
* 收款单位名称
|
||||
*/
|
||||
@ExcelProperty(value = "收款单位名称")
|
||||
private String receivingUnitName;
|
||||
|
||||
/**
|
||||
* 收款单位ID
|
||||
*/
|
||||
@ -152,7 +161,7 @@ public class XzdBidDepositPaymentVo implements Serializable {
|
||||
* 保证金比例
|
||||
*/
|
||||
@ExcelProperty(value = "保证金比例")
|
||||
private Long depositRatio;
|
||||
private BigDecimal depositRatio;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
|
||||
@ -21,7 +21,9 @@ import org.dromara.xzd.biddingManagement.earnestMoney.domain.vo.XzdBidDepositPay
|
||||
import org.dromara.xzd.biddingManagement.earnestMoney.domain.vo.XzdBidDepositPaymentVo;
|
||||
import org.dromara.xzd.biddingManagement.earnestMoney.mapper.XzdBidDepositPaymentMapper;
|
||||
import org.dromara.xzd.biddingManagement.earnestMoney.service.IXzdBidDepositPaymentService;
|
||||
import org.dromara.xzd.service.impl.XzdSupplierInfoServiceImpl;
|
||||
import org.dromara.xzd.utilS.AreaUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDate;
|
||||
@ -48,6 +50,9 @@ public class XzdBidDepositPaymentServiceImpl extends ServiceImpl<XzdBidDepositPa
|
||||
|
||||
private final IXzdBidPreProjectService xzdBidPreProjectService;
|
||||
|
||||
@Autowired
|
||||
private XzdSupplierInfoServiceImpl xzdSupplierInfoService;
|
||||
|
||||
/**
|
||||
* 查询投标保证金缴纳
|
||||
*
|
||||
@ -59,9 +64,9 @@ public class XzdBidDepositPaymentServiceImpl extends ServiceImpl<XzdBidDepositPa
|
||||
XzdBidDepositPaymentByBqlx res = new XzdBidDepositPaymentByBqlx();
|
||||
|
||||
XzdBidDepositPaymentVo xzdBidDepositPaymentVo = baseMapper.selectVoById(id);
|
||||
saveName(xzdBidDepositPaymentVo);
|
||||
res.setXzdBidDepositPaymentVo(xzdBidDepositPaymentVo);
|
||||
|
||||
|
||||
if (xzdBidDepositPaymentVo.getBqlxId() != null){
|
||||
QuerListXzdBidPreVo vo = xzdBidPreProjectService.queryById(xzdBidDepositPaymentVo.getBqlxId());
|
||||
res.setQueryListXzdVo(vo);
|
||||
@ -71,6 +76,19 @@ public class XzdBidDepositPaymentServiceImpl extends ServiceImpl<XzdBidDepositPa
|
||||
return res;
|
||||
}
|
||||
|
||||
private void saveName(XzdBidDepositPaymentVo xzdBidDepositPaymentVo) {
|
||||
if (xzdBidDepositPaymentVo != null){
|
||||
String receivingUnit = xzdBidDepositPaymentVo.getReceivingUnit();
|
||||
if (receivingUnit != null){
|
||||
String unitName = xzdSupplierInfoService.queryNameById(Long.parseLong(receivingUnit));
|
||||
if (unitName != null){
|
||||
xzdBidDepositPaymentVo.setReceivingUnitName(unitName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询投标保证金缴纳列表
|
||||
*
|
||||
|
||||
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
@ -39,7 +40,7 @@ public class XzdBidDepositRecovery extends BaseEntity {
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
private LocalDateTime documentDate;
|
||||
private LocalDate documentDate;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
@ -89,7 +90,7 @@ public class XzdBidDepositRecovery extends BaseEntity {
|
||||
/**
|
||||
* 收回日期
|
||||
*/
|
||||
private LocalDateTime recoveryDate;
|
||||
private LocalDate recoveryDate;
|
||||
|
||||
/**
|
||||
* 保证金状态
|
||||
@ -114,10 +115,10 @@ public class XzdBidDepositRecovery extends BaseEntity {
|
||||
/**
|
||||
* 支付截止时间
|
||||
*/
|
||||
private LocalDateTime paymentDeadline;
|
||||
private LocalDate paymentDeadline;
|
||||
|
||||
/**
|
||||
* 收款单位(保证金信息)
|
||||
* 收款单位
|
||||
*/
|
||||
private Long receivingUnit;
|
||||
|
||||
@ -151,7 +152,7 @@ public class XzdBidDepositRecovery extends BaseEntity {
|
||||
/**
|
||||
* 申请日期
|
||||
*/
|
||||
private LocalDateTime applicationDate;
|
||||
private LocalDate applicationDate;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
|
||||
@ -8,6 +8,7 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
@ -38,7 +39,7 @@ public class XzdBidDepositRecoveryBo extends BaseEntity {
|
||||
* 单据日期
|
||||
*/
|
||||
@NotNull(message = "单据日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date documentDate;
|
||||
private LocalDate documentDate;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
@ -89,7 +90,7 @@ public class XzdBidDepositRecoveryBo extends BaseEntity {
|
||||
/**
|
||||
* 收回日期
|
||||
*/
|
||||
private LocalDateTime recoveryDate;
|
||||
private LocalDate recoveryDate;
|
||||
|
||||
/**
|
||||
* 保证金状态
|
||||
@ -114,12 +115,18 @@ public class XzdBidDepositRecoveryBo extends BaseEntity {
|
||||
/**
|
||||
* 支付截止时间
|
||||
*/
|
||||
private LocalDateTime paymentDeadline;
|
||||
private LocalDate paymentDeadline;
|
||||
|
||||
/**
|
||||
* 收款单位
|
||||
*/
|
||||
private String receivingUnit;
|
||||
private Long receivingUnit;
|
||||
|
||||
|
||||
/**
|
||||
* 收款单位名称
|
||||
*/
|
||||
private String receivingUnitName;
|
||||
|
||||
/**
|
||||
* 保证金收款账户名称
|
||||
@ -149,7 +156,7 @@ public class XzdBidDepositRecoveryBo extends BaseEntity {
|
||||
/**
|
||||
* 申请日期
|
||||
*/
|
||||
private LocalDateTime applicationDate;
|
||||
private LocalDate applicationDate;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
@ -180,6 +187,9 @@ public class XzdBidDepositRecoveryBo extends BaseEntity {
|
||||
* 收款单位(供应商信息)
|
||||
*/
|
||||
private Long payeeId;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 收款账户银行 (供应商信息)
|
||||
*/
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package org.dromara.xzd.biddingManagement.earnestMoneyWithdraw.domain.vo;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
@ -52,7 +53,7 @@ public class XzdBidDepositRecoveryVo implements Serializable {
|
||||
* 单据日期
|
||||
*/
|
||||
@ExcelProperty(value = "单据日期")
|
||||
private LocalDateTime documentDate;
|
||||
private LocalDate documentDate;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
@ -112,7 +113,7 @@ public class XzdBidDepositRecoveryVo implements Serializable {
|
||||
* 收回日期
|
||||
*/
|
||||
@ExcelProperty(value = "收回日期")
|
||||
private LocalDateTime recoveryDate;
|
||||
private LocalDate recoveryDate;
|
||||
|
||||
/**
|
||||
* 保证金状态
|
||||
@ -142,13 +143,18 @@ public class XzdBidDepositRecoveryVo implements Serializable {
|
||||
* 支付截止时间
|
||||
*/
|
||||
@ExcelProperty(value = "支付截止时间")
|
||||
private LocalDateTime paymentDeadline;
|
||||
private LocalDate paymentDeadline;
|
||||
|
||||
/**
|
||||
* 收款单位
|
||||
*/
|
||||
@ExcelProperty(value = "收款单位")
|
||||
private String receivingUnit;
|
||||
private Long receivingUnit;
|
||||
/**
|
||||
* 收款单位名称
|
||||
*/
|
||||
@ExcelProperty(value = "收款单位名称")
|
||||
private String receivingUnitName;
|
||||
|
||||
/**
|
||||
* 保证金收款账户名称
|
||||
@ -184,7 +190,7 @@ public class XzdBidDepositRecoveryVo implements Serializable {
|
||||
* 申请日期
|
||||
*/
|
||||
@ExcelProperty(value = "申请日期")
|
||||
private LocalDateTime applicationDate;
|
||||
private LocalDate applicationDate;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
@ -236,6 +242,11 @@ public class XzdBidDepositRecoveryVo implements Serializable {
|
||||
*/
|
||||
private Long payeeId;
|
||||
|
||||
/**
|
||||
* 收款单位(供应商信息)
|
||||
*/
|
||||
private String payeeIdName;
|
||||
|
||||
/**
|
||||
* 收款账户名称(供应商信息)
|
||||
*/
|
||||
|
||||
@ -30,6 +30,7 @@ import java.util.Map;
|
||||
import java.util.Collection;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* 投标保证金收回Service业务层处理
|
||||
*
|
||||
@ -65,6 +66,8 @@ public class XzdBidDepositRecoveryServiceImpl extends ServiceImpl<XzdBidDepositR
|
||||
XzdBidDepositPaymentByBqlx xzdBidDepositPaymentByBqlx = xzdBidDepositRecoveryXqVo.queryById(xzdBidDepositRecoveryVo.getPaymentId());
|
||||
XzdSupplierInfoVo xzdSupplierInfoVo = xzdSupplierInfoService.queryById(xzdBidDepositRecoveryVo.getPayeeId());
|
||||
|
||||
saveName(xzdBidDepositRecoveryVo);
|
||||
|
||||
vo.setXzdBidDepositRecoveryVo(xzdBidDepositRecoveryVo);
|
||||
vo.setXzdBidDepositPaymentByBqlx(xzdBidDepositPaymentByBqlx);
|
||||
vo.setXzdSupplierInfoVo(xzdSupplierInfoVo);
|
||||
@ -73,6 +76,24 @@ public class XzdBidDepositRecoveryServiceImpl extends ServiceImpl<XzdBidDepositR
|
||||
return vo;
|
||||
}
|
||||
|
||||
private void saveName(XzdBidDepositRecoveryVo xzdBidDepositRecoveryVo) {
|
||||
if (xzdBidDepositRecoveryVo != null){
|
||||
Long payeeId = xzdBidDepositRecoveryVo.getPayeeId();
|
||||
|
||||
String unitName = xzdSupplierInfoService.queryNameById(payeeId);
|
||||
if (unitName != null){
|
||||
xzdBidDepositRecoveryVo.setPayeeIdName(unitName);
|
||||
}
|
||||
Long receivingUnit = xzdBidDepositRecoveryVo.getReceivingUnit();
|
||||
String unitNameTemp = xzdSupplierInfoService.queryNameById(receivingUnit);
|
||||
if (unitNameTemp != null){
|
||||
xzdBidDepositRecoveryVo.setReceivingUnitName(unitNameTemp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询投标保证金收回列表
|
||||
*
|
||||
@ -84,6 +105,7 @@ public class XzdBidDepositRecoveryServiceImpl extends ServiceImpl<XzdBidDepositR
|
||||
public TableDataInfo<XzdBidDepositRecoveryVo> queryPageList(XzdBidDepositRecoveryBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XzdBidDepositRecovery> lqw = buildQueryWrapper(bo);
|
||||
Page<XzdBidDepositRecoveryVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
result.getRecords().forEach(this::saveName);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@ -120,7 +142,7 @@ public class XzdBidDepositRecoveryServiceImpl extends ServiceImpl<XzdBidDepositR
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDepositAmountCapital()), XzdBidDepositRecovery::getDepositAmountCapital, bo.getDepositAmountCapital());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDepositRemittanceMethod()), XzdBidDepositRecovery::getDepositRemittanceMethod, bo.getDepositRemittanceMethod());
|
||||
lqw.eq(bo.getPaymentDeadline() != null, XzdBidDepositRecovery::getPaymentDeadline, bo.getPaymentDeadline());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getReceivingUnit()), XzdBidDepositRecovery::getReceivingUnit, bo.getReceivingUnit());
|
||||
lqw.eq(bo.getReceivingUnit() != null, XzdBidDepositRecovery::getReceivingUnit, bo.getReceivingUnit());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getDepositReceivingAccountName()), XzdBidDepositRecovery::getDepositReceivingAccountName, bo.getDepositReceivingAccountName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getReceivingBank()), XzdBidDepositRecovery::getReceivingBank, bo.getReceivingBank());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getReceivingBankAccount()), XzdBidDepositRecovery::getReceivingBankAccount, bo.getReceivingBankAccount());
|
||||
|
||||
@ -0,0 +1,67 @@
|
||||
package org.dromara.xzd.biddingManagement.postAnalysis.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;
|
||||
|
||||
/**
|
||||
* 投标管理-标后分析-投标单位排名对象 xzd_bhfx_dwpm
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xzd_bhfx_dwpm")
|
||||
public class XzdBhfxDwpm extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 主表id
|
||||
*/
|
||||
private Long masterId;
|
||||
|
||||
/**
|
||||
* 参与投标单位
|
||||
*/
|
||||
private String participatingBiddingUnit;
|
||||
|
||||
/**
|
||||
* 投标报价(万元)
|
||||
*/
|
||||
private BigDecimal bidPrice;
|
||||
|
||||
/**
|
||||
* 排名
|
||||
*/
|
||||
private Long ranking;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String auditStatus;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,66 @@
|
||||
package org.dromara.xzd.biddingManagement.postAnalysis.domain.bo;
|
||||
|
||||
import org.dromara.xzd.biddingManagement.postAnalysis.domain.XzdBhfxDwpm;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 投标管理-标后分析-投标单位排名业务对象 xzd_bhfx_dwpm
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XzdBhfxDwpm.class, reverseConvertGenerate = false)
|
||||
public class XzdBhfxDwpmBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 主表id
|
||||
*/
|
||||
private Long masterId;
|
||||
|
||||
/**
|
||||
* 参与投标单位
|
||||
*/
|
||||
private String participatingBiddingUnit;
|
||||
|
||||
/**
|
||||
* 投标报价(万元)
|
||||
*/
|
||||
private BigDecimal bidPrice;
|
||||
|
||||
/**
|
||||
* 排名
|
||||
*/
|
||||
private Long ranking;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String auditStatus;
|
||||
|
||||
|
||||
}
|
||||
@ -8,6 +8,8 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.xzd.biddingManagement.postAnalysis.domain.XzdPostBidAnalysis;
|
||||
|
||||
@ -124,5 +126,7 @@ public class XzdPostBidAnalysisBo extends BaseEntity {
|
||||
*/
|
||||
private String auditStatus;
|
||||
|
||||
private List<XzdBhfxDwpmBo> pm;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,81 @@
|
||||
package org.dromara.xzd.biddingManagement.postAnalysis.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import org.dromara.xzd.biddingManagement.postAnalysis.domain.XzdBhfxDwpm;
|
||||
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;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 投标管理-标后分析-投标单位排名视图对象 xzd_bhfx_dwpm
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-21
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XzdBhfxDwpm.class)
|
||||
public class XzdBhfxDwpmVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 主表id
|
||||
*/
|
||||
@ExcelProperty(value = "主表id")
|
||||
private Long masterId;
|
||||
|
||||
/**
|
||||
* 参与投标单位
|
||||
*/
|
||||
@ExcelProperty(value = "参与投标单位")
|
||||
private String participatingBiddingUnit;
|
||||
|
||||
/**
|
||||
* 投标报价(万元)
|
||||
*/
|
||||
@ExcelProperty(value = "投标报价(万元)")
|
||||
private BigDecimal bidPrice;
|
||||
|
||||
/**
|
||||
* 排名
|
||||
*/
|
||||
@ExcelProperty(value = "排名")
|
||||
private Long ranking;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
@ExcelProperty(value = "文件ID")
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
@ExcelProperty(value = "审核状态")
|
||||
private String auditStatus;
|
||||
|
||||
|
||||
}
|
||||
@ -8,12 +8,13 @@ import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import org.dromara.xzd.biddingManagement.postAnalysis.domain.XzdBhfxDwpm;
|
||||
import org.dromara.xzd.biddingManagement.postAnalysis.domain.XzdPostBidAnalysis;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
@ -151,6 +152,8 @@ public class XzdPostBidAnalysisVo implements Serializable {
|
||||
@ExcelProperty(value = "审核状态")
|
||||
private String auditStatus;
|
||||
|
||||
private List<XzdBhfxDwpmVo> pm;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,15 @@
|
||||
package org.dromara.xzd.biddingManagement.postAnalysis.mapper;
|
||||
|
||||
import org.dromara.xzd.biddingManagement.postAnalysis.domain.XzdBhfxDwpm;
|
||||
import org.dromara.xzd.biddingManagement.postAnalysis.domain.vo.XzdBhfxDwpmVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 投标管理-标后分析-投标单位排名Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-21
|
||||
*/
|
||||
public interface XzdBhfxDwpmMapper extends BaseMapperPlus<XzdBhfxDwpm, XzdBhfxDwpmVo> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package org.dromara.xzd.biddingManagement.postAnalysis.service;
|
||||
|
||||
import org.dromara.xzd.biddingManagement.postAnalysis.domain.vo.XzdBhfxDwpmVo;
|
||||
import org.dromara.xzd.biddingManagement.postAnalysis.domain.bo.XzdBhfxDwpmBo;
|
||||
import org.dromara.xzd.biddingManagement.postAnalysis.domain.XzdBhfxDwpm;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 投标管理-标后分析-投标单位排名Service接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-21
|
||||
*/
|
||||
public interface IXzdBhfxDwpmService extends IService<XzdBhfxDwpm>{
|
||||
|
||||
/**
|
||||
* 查询投标管理-标后分析-投标单位排名
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 投标管理-标后分析-投标单位排名
|
||||
*/
|
||||
XzdBhfxDwpmVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询投标管理-标后分析-投标单位排名列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 投标管理-标后分析-投标单位排名分页列表
|
||||
*/
|
||||
TableDataInfo<XzdBhfxDwpmVo> queryPageList(XzdBhfxDwpmBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的投标管理-标后分析-投标单位排名列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 投标管理-标后分析-投标单位排名列表
|
||||
*/
|
||||
List<XzdBhfxDwpmVo> queryList(XzdBhfxDwpmBo bo);
|
||||
|
||||
/**
|
||||
* 新增投标管理-标后分析-投标单位排名
|
||||
*
|
||||
* @param bo 投标管理-标后分析-投标单位排名
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(XzdBhfxDwpmBo bo);
|
||||
|
||||
/**
|
||||
* 修改投标管理-标后分析-投标单位排名
|
||||
*
|
||||
* @param bo 投标管理-标后分析-投标单位排名
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(XzdBhfxDwpmBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除投标管理-标后分析-投标单位排名信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@ -0,0 +1,136 @@
|
||||
package org.dromara.xzd.biddingManagement.postAnalysis.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.xzd.biddingManagement.postAnalysis.domain.bo.XzdBhfxDwpmBo;
|
||||
import org.dromara.xzd.biddingManagement.postAnalysis.domain.vo.XzdBhfxDwpmVo;
|
||||
import org.dromara.xzd.biddingManagement.postAnalysis.domain.XzdBhfxDwpm;
|
||||
import org.dromara.xzd.biddingManagement.postAnalysis.mapper.XzdBhfxDwpmMapper;
|
||||
import org.dromara.xzd.biddingManagement.postAnalysis.service.IXzdBhfxDwpmService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 投标管理-标后分析-投标单位排名Service业务层处理
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-21
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XzdBhfxDwpmServiceImpl extends ServiceImpl<XzdBhfxDwpmMapper, XzdBhfxDwpm> implements IXzdBhfxDwpmService {
|
||||
|
||||
private final XzdBhfxDwpmMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询投标管理-标后分析-投标单位排名
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 投标管理-标后分析-投标单位排名
|
||||
*/
|
||||
@Override
|
||||
public XzdBhfxDwpmVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询投标管理-标后分析-投标单位排名列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 投标管理-标后分析-投标单位排名分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XzdBhfxDwpmVo> queryPageList(XzdBhfxDwpmBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XzdBhfxDwpm> lqw = buildQueryWrapper(bo);
|
||||
Page<XzdBhfxDwpmVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的投标管理-标后分析-投标单位排名列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 投标管理-标后分析-投标单位排名列表
|
||||
*/
|
||||
@Override
|
||||
public List<XzdBhfxDwpmVo> queryList(XzdBhfxDwpmBo bo) {
|
||||
LambdaQueryWrapper<XzdBhfxDwpm> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XzdBhfxDwpm> buildQueryWrapper(XzdBhfxDwpmBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<XzdBhfxDwpm> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByDesc(XzdBhfxDwpm::getId);
|
||||
lqw.eq(bo.getMasterId() != null, XzdBhfxDwpm::getMasterId, bo.getMasterId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getParticipatingBiddingUnit()), XzdBhfxDwpm::getParticipatingBiddingUnit, bo.getParticipatingBiddingUnit());
|
||||
lqw.eq(bo.getBidPrice() != null, XzdBhfxDwpm::getBidPrice, bo.getBidPrice());
|
||||
lqw.eq(bo.getRanking() != null, XzdBhfxDwpm::getRanking, bo.getRanking());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFileId()), XzdBhfxDwpm::getFileId, bo.getFileId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getAuditStatus()), XzdBhfxDwpm::getAuditStatus, bo.getAuditStatus());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增投标管理-标后分析-投标单位排名
|
||||
*
|
||||
* @param bo 投标管理-标后分析-投标单位排名
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(XzdBhfxDwpmBo bo) {
|
||||
XzdBhfxDwpm add = MapstructUtils.convert(bo, XzdBhfxDwpm.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改投标管理-标后分析-投标单位排名
|
||||
*
|
||||
* @param bo 投标管理-标后分析-投标单位排名
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(XzdBhfxDwpmBo bo) {
|
||||
XzdBhfxDwpm update = MapstructUtils.convert(bo, XzdBhfxDwpm.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(XzdBhfxDwpm entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除投标管理-标后分析-投标单位排名信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@ -9,17 +9,22 @@ 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.dromara.system.service.impl.SysOssServiceImpl;
|
||||
import org.dromara.xzd.biddingManagement.postAnalysis.domain.XzdBhfxDwpm;
|
||||
import org.dromara.xzd.biddingManagement.postAnalysis.domain.XzdPostBidAnalysis;
|
||||
import org.dromara.xzd.biddingManagement.postAnalysis.domain.bo.XzdBhfxDwpmBo;
|
||||
import org.dromara.xzd.biddingManagement.postAnalysis.domain.bo.XzdPostBidAnalysisBo;
|
||||
import org.dromara.xzd.biddingManagement.postAnalysis.domain.vo.XzdBhfxDwpmVo;
|
||||
import org.dromara.xzd.biddingManagement.postAnalysis.domain.vo.XzdPostBidAnalysisVo;
|
||||
import org.dromara.xzd.biddingManagement.postAnalysis.mapper.XzdPostBidAnalysisMapper;
|
||||
import org.dromara.xzd.biddingManagement.postAnalysis.service.IXzdBhfxDwpmService;
|
||||
import org.dromara.xzd.biddingManagement.postAnalysis.service.IXzdPostBidAnalysisService;
|
||||
import org.dromara.xzd.settlement.domain.vo.XzdJsCgJungonVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 标后分析Service业务层处理
|
||||
@ -33,6 +38,11 @@ public class XzdPostBidAnalysisServiceImpl extends ServiceImpl<XzdPostBidAnalysi
|
||||
|
||||
private final XzdPostBidAnalysisMapper baseMapper;
|
||||
|
||||
private final IXzdBhfxDwpmService xzdBhfxDwpmService;
|
||||
|
||||
@Autowired
|
||||
private SysOssServiceImpl sysOssService;
|
||||
|
||||
/**
|
||||
* 查询标后分析
|
||||
*
|
||||
@ -41,7 +51,10 @@ public class XzdPostBidAnalysisServiceImpl extends ServiceImpl<XzdPostBidAnalysi
|
||||
*/
|
||||
@Override
|
||||
public XzdPostBidAnalysisVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
XzdPostBidAnalysisVo vo = baseMapper.selectVoById(id);
|
||||
List<XzdBhfxDwpm> xzdBhfxDwpms = xzdBhfxDwpmService.getBaseMapper().selectList(new LambdaQueryWrapper<XzdBhfxDwpm>().eq(XzdBhfxDwpm::getMasterId, id).orderByAsc(XzdBhfxDwpm::getRanking));
|
||||
vo.setPm(MapstructUtils.convert(xzdBhfxDwpms, XzdBhfxDwpmVo.class));
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -106,6 +119,14 @@ public class XzdPostBidAnalysisServiceImpl extends ServiceImpl<XzdPostBidAnalysi
|
||||
XzdPostBidAnalysis add = MapstructUtils.convert(bo, XzdPostBidAnalysis.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
List<XzdBhfxDwpmBo> pm = bo.getPm();
|
||||
if(pm != null && pm.size() > 0){
|
||||
pm.forEach(temp ->{
|
||||
temp.setMasterId(add.getId());
|
||||
});
|
||||
xzdBhfxDwpmService.saveBatch(MapstructUtils.convert(pm, XzdBhfxDwpm.class));
|
||||
}
|
||||
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
@ -122,6 +143,15 @@ public class XzdPostBidAnalysisServiceImpl extends ServiceImpl<XzdPostBidAnalysi
|
||||
public Boolean updateByBo(XzdPostBidAnalysisBo bo) {
|
||||
XzdPostBidAnalysis update = MapstructUtils.convert(bo, XzdPostBidAnalysis.class);
|
||||
validEntityBeforeSave(update);
|
||||
List<XzdBhfxDwpmBo> pm = bo.getPm();
|
||||
xzdBhfxDwpmService.getBaseMapper().delete(new LambdaQueryWrapper<XzdBhfxDwpm>().eq(XzdBhfxDwpm::getMasterId, update.getId()));
|
||||
if(pm != null && pm.size() > 0){
|
||||
pm.forEach(temp ->{
|
||||
temp.setMasterId(update.getId());
|
||||
});
|
||||
xzdBhfxDwpmService.saveBatch(MapstructUtils.convert(pm, XzdBhfxDwpm.class));
|
||||
}
|
||||
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
@ -142,7 +172,22 @@ public class XzdPostBidAnalysisServiceImpl extends ServiceImpl<XzdPostBidAnalysi
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
|
||||
}
|
||||
|
||||
List<Long> deleteIds = new ArrayList<>();
|
||||
for (Long id : ids) {
|
||||
XzdPostBidAnalysisVo vo = baseMapper.selectVoById(id);
|
||||
if (vo != null){
|
||||
//删除附件
|
||||
if (vo.getFileId()!= null && !vo.getFileId().isEmpty()){
|
||||
List<Long> list = Arrays.stream(vo.getFileId().split(",")).map(Long::valueOf).toList();
|
||||
deleteIds.addAll(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!deleteIds.isEmpty()) {
|
||||
sysOssService.deleteWithValidByIds(deleteIds, false);
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
@ -0,0 +1,76 @@
|
||||
package org.dromara.xzd.comprehensive.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;
|
||||
|
||||
/**
|
||||
* 综合服务合同-支付款项对象 xzd_cs_contract_suspend_zfkx
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xzd_cs_contract_suspend_zfkx")
|
||||
public class XzdCsContractSuspendZfkx extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 采购合同信息ID(合同编码)
|
||||
*/
|
||||
private Long contractInformationId;
|
||||
|
||||
/**
|
||||
* 名称(*必填)
|
||||
*/
|
||||
private String name;
|
||||
private String changeName;
|
||||
|
||||
/**
|
||||
* 款项属性(*必填,如“预付款”“进度款”)
|
||||
*/
|
||||
private String paymentAttribute;
|
||||
private String changePaymentAttribute;
|
||||
|
||||
/**
|
||||
* 预付百分比(如“100.00”表示100%)
|
||||
*/
|
||||
private BigDecimal advancePercentage;
|
||||
private BigDecimal changeAdvancePercentage;
|
||||
|
||||
/**
|
||||
* 合同预付款金额
|
||||
*/
|
||||
private BigDecimal contractAdvanceAmount;
|
||||
private BigDecimal changeContractAdvanceAmount;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 支付计算基数(*必填)
|
||||
*/
|
||||
private BigDecimal paymentCalcBase;
|
||||
|
||||
/**
|
||||
* 付款性质(*必填,如“全款”“分期”)
|
||||
*/
|
||||
private String paymentNature;
|
||||
|
||||
|
||||
}
|
||||
@ -15,6 +15,7 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.xzd.comprehensive.domain.XzdCsContractSuspendZfkx;
|
||||
import org.dromara.xzd.comprehensive.domain.XzdHtglHtbgqd;
|
||||
import org.dromara.xzd.domain.XzdContractClause;
|
||||
import org.dromara.xzd.domain.XzdDeductionItems;
|
||||
@ -224,7 +225,7 @@ public class XzdCsContractChangeBo extends BaseEntity {
|
||||
/**
|
||||
* 支付条款
|
||||
*/
|
||||
private List<XzdSettlementRules> zftk;
|
||||
private List<XzdCsContractSuspendZfkx> zftk;
|
||||
|
||||
/**
|
||||
* 合同变更清单
|
||||
|
||||
@ -15,6 +15,7 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.xzd.comprehensive.domain.XzdCsContractSuspendZfkx;
|
||||
import org.dromara.xzd.comprehensive.domain.XzdHtglHtbgqd;
|
||||
import org.dromara.xzd.domain.XzdContractClause;
|
||||
import org.dromara.xzd.domain.XzdDeductionItems;
|
||||
@ -267,7 +268,7 @@ public class XzdCsContractInformationBo extends BaseEntity {
|
||||
/**
|
||||
* 支付条款
|
||||
*/
|
||||
private List<XzdSettlementRules> zftk;
|
||||
private List<XzdCsContractSuspendZfkx> zftk;
|
||||
|
||||
/**
|
||||
* 合同变更清单
|
||||
|
||||
@ -0,0 +1,78 @@
|
||||
package org.dromara.xzd.comprehensive.domain.bo;
|
||||
|
||||
import org.dromara.xzd.comprehensive.domain.XzdCsContractSuspendZfkx;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 综合服务合同-支付款项业务对象 xzd_cs_contract_suspend_zfkx
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XzdCsContractSuspendZfkx.class, reverseConvertGenerate = false)
|
||||
public class XzdCsContractSuspendZfkxBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 采购合同信息ID(合同编码)
|
||||
*/
|
||||
@NotNull(message = "采购合同信息ID(合同编码)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long contractInformationId;
|
||||
|
||||
/**
|
||||
* 名称(*必填)
|
||||
*/
|
||||
private String name;
|
||||
private String changeName;
|
||||
|
||||
/**
|
||||
* 款项属性(*必填,如“预付款”“进度款”)
|
||||
*/
|
||||
private String paymentAttribute;
|
||||
private String changePaymentAttribute;
|
||||
|
||||
/**
|
||||
* 预付百分比(如“100.00”表示100%)
|
||||
*/
|
||||
private BigDecimal advancePercentage;
|
||||
private BigDecimal changeAdvancePercentage;
|
||||
|
||||
/**
|
||||
* 合同预付款金额
|
||||
*/
|
||||
private BigDecimal contractAdvanceAmount;
|
||||
private BigDecimal changeContractAdvanceAmount;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 支付计算基数(*必填)
|
||||
*/
|
||||
@NotNull(message = "支付计算基数(*必填)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private BigDecimal paymentCalcBase;
|
||||
|
||||
/**
|
||||
* 付款性质(*必填,如“全款”“分期”)
|
||||
*/
|
||||
@NotBlank(message = "付款性质(*必填,如“全款”“分期”)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String paymentNature;
|
||||
|
||||
|
||||
}
|
||||
@ -11,6 +11,7 @@ import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import org.dromara.xzd.comprehensive.domain.XzdCsContractSuspendZfkx;
|
||||
import org.dromara.xzd.comprehensive.domain.XzdHtglHtbgqd;
|
||||
import org.dromara.xzd.domain.XzdContractClause;
|
||||
import org.dromara.xzd.domain.XzdDeductionItems;
|
||||
@ -273,7 +274,7 @@ public class XzdCsContractChangeVo implements Serializable {
|
||||
/**
|
||||
* 支付条款
|
||||
*/
|
||||
private List<XzdSettlementRules> zftk;
|
||||
private List<XzdCsContractSuspendZfkx> zftk;
|
||||
|
||||
/**
|
||||
* 合同变更清单
|
||||
|
||||
@ -11,6 +11,7 @@ import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import org.dromara.xzd.comprehensive.domain.XzdCsContractSuspendZfkx;
|
||||
import org.dromara.xzd.comprehensive.domain.XzdHtglHtbgqd;
|
||||
import org.dromara.xzd.domain.XzdContractClause;
|
||||
import org.dromara.xzd.domain.XzdDeductionItems;
|
||||
@ -322,7 +323,7 @@ public class XzdCsContractInformationVo implements Serializable {
|
||||
/**
|
||||
* 支付条款
|
||||
*/
|
||||
private List<XzdSettlementRules> zftk;
|
||||
private List<XzdCsContractSuspendZfkx> zftk;
|
||||
|
||||
/**
|
||||
* 合同变更清单
|
||||
|
||||
@ -0,0 +1,90 @@
|
||||
package org.dromara.xzd.comprehensive.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import org.dromara.xzd.comprehensive.domain.XzdCsContractSuspendZfkx;
|
||||
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;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 综合服务合同-支付款项视图对象 xzd_cs_contract_suspend_zfkx
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-21
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XzdCsContractSuspendZfkx.class)
|
||||
public class XzdCsContractSuspendZfkxVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 采购合同信息ID(合同编码)
|
||||
*/
|
||||
@ExcelProperty(value = "采购合同信息ID", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "合=同编码")
|
||||
private Long contractInformationId;
|
||||
|
||||
/**
|
||||
* 名称(*必填)
|
||||
*/
|
||||
private String name;
|
||||
private String changeName;
|
||||
|
||||
/**
|
||||
* 款项属性(*必填,如“预付款”“进度款”)
|
||||
*/
|
||||
private String paymentAttribute;
|
||||
private String changePaymentAttribute;
|
||||
|
||||
/**
|
||||
* 预付百分比(如“100.00”表示100%)
|
||||
*/
|
||||
private BigDecimal advancePercentage;
|
||||
private BigDecimal changeAdvancePercentage;
|
||||
|
||||
/**
|
||||
* 合同预付款金额
|
||||
*/
|
||||
private BigDecimal contractAdvanceAmount;
|
||||
private BigDecimal changeContractAdvanceAmount;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 支付计算基数(*必填)
|
||||
*/
|
||||
@ExcelProperty(value = "支付计算基数", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "*=必填")
|
||||
private BigDecimal paymentCalcBase;
|
||||
|
||||
/**
|
||||
* 付款性质(*必填,如“全款”“分期”)
|
||||
*/
|
||||
@ExcelProperty(value = "付款性质", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "*=必填,如“全款”“分期”")
|
||||
private String paymentNature;
|
||||
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user