Compare commits
29 Commits
0b42c1d6a6
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
| 07509c8e15 | |||
| e6c58a64ac | |||
| abb6b8c13a | |||
| de492728bc | |||
| 82fa732db6 | |||
| 275d640263 | |||
| 7e47b8a74f | |||
| d4301da0ec | |||
| fe5b5473dd | |||
| 0126d44761 | |||
| dbefd88e41 | |||
| 9a3b7ebe54 | |||
| 81be4a862c | |||
| 43f2db9f7e | |||
| abefa90408 | |||
| 08f48b7817 | |||
| 6b8ace60d4 | |||
| b997dd5f00 | |||
| 6174743858 | |||
| 82d55d7188 | |||
| aec5eacd0b | |||
| a320b85965 | |||
| b61a7c153d | |||
| fb9b01cf34 | |||
| 32f134873a | |||
| f4220be9d6 | |||
| 8252fd7216 | |||
| 57855f4307 | |||
| 6784eafe6e |
@ -289,6 +289,8 @@ springdoc:
|
|||||||
packages-to-scan: org.dromara.websocket
|
packages-to-scan: org.dromara.websocket
|
||||||
- group: 27.新中大模块
|
- group: 27.新中大模块
|
||||||
packages-to-scan: org.dromara.xzd
|
packages-to-scan: org.dromara.xzd
|
||||||
|
- group: 28.车辆模块
|
||||||
|
packages-to-scan: org.dromara.vehicle
|
||||||
# knife4j的增强配置,不需要增强可以不配
|
# knife4j的增强配置,不需要增强可以不配
|
||||||
knife4j:
|
knife4j:
|
||||||
enable: true
|
enable: true
|
||||||
@ -306,12 +308,13 @@ xss:
|
|||||||
- /project/project
|
- /project/project
|
||||||
- /xzd/contractDetails/**
|
- /xzd/contractDetails/**
|
||||||
- /xzd/contractChange/**
|
- /xzd/contractChange/**
|
||||||
- /comprehensive/csContractChange/**
|
- /xzd/comprehensive/csContractChange/**
|
||||||
- /comprehensive/csContractInformation/**
|
- /xzd/comprehensive/csContractInformation/**
|
||||||
- /hetongbiangeng/**
|
- /xzd/hetongbiangeng/**
|
||||||
- /fenbaohetongbiangg/**
|
- /xzd/fenbaohetongjungong/**
|
||||||
- /fenbaohetongxinxi/**
|
- /xzd/fenbaohetongbiangg/**
|
||||||
- /contractManagement/**
|
- /xzd/fenbaohetongxinxi/**
|
||||||
|
- /xzd/contractManagement/**
|
||||||
|
|
||||||
# 全局线程池相关配置
|
# 全局线程池相关配置
|
||||||
# 如使用JDK21请直接使用虚拟线程 不要开启此配置
|
# 如使用JDK21请直接使用虚拟线程 不要开启此配置
|
||||||
@ -383,5 +386,5 @@ warm-flow:
|
|||||||
--- # 百度云配置
|
--- # 百度云配置
|
||||||
baidu:
|
baidu:
|
||||||
client:
|
client:
|
||||||
id: zSB7KdLgY7a1tIEx3eTy65TE
|
id: pXACgshs1ABNFa6UM6HvkQ78 #zSB7KdLgY7a1tIEx3eTy65TE
|
||||||
secret: 5nabjclW5BWGV8UwEueDgBDmOveRVkmD
|
secret: EtTCBwd0KjGFOMDkbq84y3RxJxWpIVv4 #5nabjclW5BWGV8UwEueDgBDmOveRVkmD
|
||||||
|
|||||||
@ -36,7 +36,7 @@ public class SubConstructionUserAuthenticationReq implements Serializable {
|
|||||||
private String phone;
|
private String phone;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 0:保密 1:男 2女
|
* 0男1女2未知
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "性别不能为空")
|
@NotBlank(message = "性别不能为空")
|
||||||
private String sex;
|
private String sex;
|
||||||
|
|||||||
@ -0,0 +1,159 @@
|
|||||||
|
package org.dromara.dataTransmission;
|
||||||
|
|
||||||
|
import cn.hutool.crypto.asymmetric.KeyType;
|
||||||
|
import cn.hutool.crypto.asymmetric.RSA;
|
||||||
|
import cn.hutool.http.HttpUtil;
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
|
import org.dromara.common.redis.utils.RedisUtils;
|
||||||
|
|
||||||
|
import javax.crypto.Cipher;
|
||||||
|
import java.net.URI;
|
||||||
|
import java.net.http.HttpClient;
|
||||||
|
import java.net.http.HttpRequest;
|
||||||
|
import java.net.http.HttpResponse;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.security.KeyFactory;
|
||||||
|
import java.security.PublicKey;
|
||||||
|
import java.security.spec.X509EncodedKeySpec;
|
||||||
|
import java.time.Duration;
|
||||||
|
import java.util.Base64;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.springframework.http.HttpHeaders;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import java.io.ByteArrayOutputStream;
|
||||||
|
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class TokenUtils {
|
||||||
|
|
||||||
|
// Token过期时间:25分钟(与Redis存储过期时间保持一致)
|
||||||
|
private static final long TOKEN_EXPIRE_SECONDS = 1500;
|
||||||
|
// HTTP请求超时时间:10秒
|
||||||
|
private static final Duration HTTP_TIMEOUT = Duration.ofSeconds(10);
|
||||||
|
//通用字符
|
||||||
|
private static final String USER_NAME = "username";
|
||||||
|
private static final String PASSWORD = "password";
|
||||||
|
private static final String PUBLIC_KEY = "publicKey";
|
||||||
|
private static final String URL = "url";
|
||||||
|
|
||||||
|
//clientId
|
||||||
|
public static final String CLARITYPM = "claritypm";
|
||||||
|
|
||||||
|
//接口信息及参数
|
||||||
|
private static final Map<String, Map<String, String>> tokenMap = new HashMap<>(){
|
||||||
|
{
|
||||||
|
put(CLARITYPM, new HashMap<>(){{
|
||||||
|
put(URL, "https://claritypm.powerchina.cn/neSmartsite-api/loginCli");
|
||||||
|
put(USER_NAME, "zhangweiwei");
|
||||||
|
put(PASSWORD, "Hkrsoft@#2023");
|
||||||
|
put(PUBLIC_KEY, "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCoaejbjbttHyHuEzHL8lIX5GZZ6zIYrqJpEDlPM4V5LHn19rSAYp2FyAr8y5Ctny9uUdaYbkoFiVQgxWrAYo4X/3O0OFDsowE25FMOLQY0Mn5B6CvVR7Sdt3DqzIzM1tUnJCIbVGNfDMgxLrLwFN8RvOW8MPlB6LgOvlGMDbj+OQIDAQAB");
|
||||||
|
}});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
//字段参数
|
||||||
|
private static final Map<String, Map<String, String>> paramMap = new HashMap<>(){
|
||||||
|
{
|
||||||
|
put(CLARITYPM, new HashMap<>(){{
|
||||||
|
|
||||||
|
put(USER_NAME, "username");
|
||||||
|
put(PASSWORD, "password");
|
||||||
|
}});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 优先从Redis获取Token,不存在则调用接口获取并存储
|
||||||
|
* @param clientId 客户端ID
|
||||||
|
* @return 有效的Token字符串
|
||||||
|
* @throws Exception 当获取过程发生异常时抛出
|
||||||
|
*/
|
||||||
|
public static String getToken(String clientId) throws Exception {
|
||||||
|
// 1. 定义Redis中的Token键名
|
||||||
|
// String redisKey = "data_auth:token:" + clientId;
|
||||||
|
//
|
||||||
|
// // 2. 尝试从Redis获取Token
|
||||||
|
// String token = RedisUtils.getCacheObject(redisKey);
|
||||||
|
// if (token != null && !token.isBlank()) {
|
||||||
|
// // 缓存命中,直接返回
|
||||||
|
// return token;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// 3. 缓存未命中,调用接口获取Token
|
||||||
|
Map<String, String> map = tokenMap.get(clientId);
|
||||||
|
String token = fetchTokenFromApi(clientId,map.get(URL), map.get(USER_NAME), rsaEncrypt(map.get(PASSWORD),map.get(PUBLIC_KEY)));
|
||||||
|
|
||||||
|
// 4. 存储到Redis(设置25分钟过期)
|
||||||
|
// RedisUtils.setCacheObject(redisKey, token,Duration.ofSeconds(TOKEN_EXPIRE_SECONDS) );
|
||||||
|
|
||||||
|
return token;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 从接口获取Token的内部方法
|
||||||
|
*/
|
||||||
|
private static String fetchTokenFromApi(String clientId, String authUrl, String username, String encryptedPassword) throws Exception {
|
||||||
|
// 构建JSON请求体(包含加密后的密码)
|
||||||
|
// 1. 构建请求头(与原 Go 代码一致的头信息)
|
||||||
|
// Map<String, String> headers = new HashMap<>();
|
||||||
|
// headers.put(HttpHeaders.CONTENT_TYPE, "application/json; charset=UTF-8");
|
||||||
|
// headers.put("User-Agent", "Mozilla/5.0");
|
||||||
|
// headers.put(HttpHeaders.ACCEPT, "application/json");
|
||||||
|
// headers.put("Origin", "https://claritypm.powerchina.cn");
|
||||||
|
// headers.put("Referer", "https://claritypm.powerchina.cn/");
|
||||||
|
|
||||||
|
// 2. 构建请求体(保持你的原有逻辑)
|
||||||
|
Map<String, String> map = paramMap.get(clientId);
|
||||||
|
JSONObject requestBody = new JSONObject();
|
||||||
|
requestBody.put(map.get(USER_NAME), username); // 从 map 中获取接口要求的用户名参数名
|
||||||
|
requestBody.put(map.get(PASSWORD), encryptedPassword); // 加密后的密码
|
||||||
|
String jsonBody = requestBody.toJSONString();
|
||||||
|
System.out.println("请求体:" + jsonBody);
|
||||||
|
|
||||||
|
// 3. 带 Header 发送 POST 请求(Hutool HttpUtil 重载方法)
|
||||||
|
String post = HttpUtil.createPost(authUrl)
|
||||||
|
// .addHeaders(headers) // 设置所有请求头
|
||||||
|
.body(jsonBody) // 设置请求体
|
||||||
|
.execute() // 执行请求
|
||||||
|
.body(); // 获取响应体
|
||||||
|
|
||||||
|
System.out.println("响应结果:" + post);
|
||||||
|
// 3. 解析响应(核心解析逻辑)
|
||||||
|
JSONObject responseJson = JSONObject.parseObject(post);
|
||||||
|
int code = responseJson.getIntValue("code");
|
||||||
|
String msg = responseJson.getString("msg");
|
||||||
|
String token = responseJson.getString("token");
|
||||||
|
|
||||||
|
// 4. 校验响应有效性
|
||||||
|
if (code != 200) {
|
||||||
|
throw new RuntimeException("获取 Token 失败,响应信息:" + msg + ",状态码:" + code);
|
||||||
|
}
|
||||||
|
if (token == null || token.trim().isEmpty()) {
|
||||||
|
throw new RuntimeException("响应中未包含有效 Token,响应内容:" + post);
|
||||||
|
}
|
||||||
|
|
||||||
|
return token;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* RSA公钥加密(核心加密方法)
|
||||||
|
* @param content 待加密内容(原始密码)
|
||||||
|
* @param publicKeyStr 公钥字符串(Base64编码)
|
||||||
|
* @return 加密后的Base64字符串
|
||||||
|
* @throws Exception 加密过程异常
|
||||||
|
*/
|
||||||
|
public static String rsaEncrypt(String content, String publicKeyStr) throws Exception {
|
||||||
|
RSA rsa = new RSA(null, publicKeyStr);
|
||||||
|
byte[] encryptedBytes = rsa.encrypt(content, KeyType.PublicKey);
|
||||||
|
return Base64.getEncoder().encodeToString(encryptedBytes);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void main(String[] args) throws Exception {
|
||||||
|
String claritypm = getToken(CLARITYPM);
|
||||||
|
System.out.println(claritypm);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,79 @@
|
|||||||
|
package org.dromara.dataTransmission.claritypm;
|
||||||
|
|
||||||
|
|
||||||
|
import org.dromara.dataTransmission.TokenUtils;
|
||||||
|
import org.dromara.dataTransmission.claritypm.dto.RealUser;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import cn.hutool.http.HttpUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class ClaritypmClient {
|
||||||
|
|
||||||
|
// 接口地址
|
||||||
|
private static final String INSERT_REAL_USER_URL = "https://claritypm.powerchina.cn/neSmartsite-api/realUser/tiandong/insertRealUser";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private TokenUtils tokenUtils; // 依赖之前的Token获取服务
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增实名制用户信息
|
||||||
|
* @param userList 用户信息列表(建议单次不超过10条)
|
||||||
|
* @return 接口响应结果(JSON格式)
|
||||||
|
* @throws Exception 调用异常
|
||||||
|
*/
|
||||||
|
public static String batchInsertRealUser(List<RealUser> userList) throws Exception {
|
||||||
|
// 1. 校验列表大小(建议不超过10条)
|
||||||
|
if (userList == null || userList.isEmpty()) {
|
||||||
|
throw new IllegalArgumentException("用户列表不能为空");
|
||||||
|
}
|
||||||
|
if (userList.size() > 10) {
|
||||||
|
throw new IllegalArgumentException("单次批量新增不能超过10条数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 获取Token(从之前的TokenService获取)
|
||||||
|
String token = TokenUtils.getToken(TokenUtils.CLARITYPM);
|
||||||
|
if ( token.trim().isEmpty()) {
|
||||||
|
throw new RuntimeException("获取Token失败,无法调用接口");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. 构建请求头(包含Token认证)
|
||||||
|
Map<String, String> headers = new HashMap<>();
|
||||||
|
headers.put("Content-Type", "application/json; charset=UTF-8");
|
||||||
|
headers.put("User-Agent", "Mozilla/5.0");
|
||||||
|
headers.put("Accept", "application/json");
|
||||||
|
headers.put("Origin", "https://claritypm.powerchina.cn");
|
||||||
|
headers.put("Referer", "https://claritypm.powerchina.cn/");
|
||||||
|
headers.put("Authorization", "Bearer " + token); // 假设接口使用Bearer Token认证
|
||||||
|
|
||||||
|
// 4. 构建请求体(JSONArray格式)
|
||||||
|
JSONArray requestBody = JSONArray.parseArray(JSON.toJSONString(userList));
|
||||||
|
String jsonBody = requestBody.toJSONString();
|
||||||
|
System.out.println("批量新增用户请求体:" + jsonBody);
|
||||||
|
|
||||||
|
// 5. 发送POST请求
|
||||||
|
String response = HttpUtil.createPost(INSERT_REAL_USER_URL)
|
||||||
|
.addHeaders(headers)
|
||||||
|
.body(jsonBody)
|
||||||
|
.execute()
|
||||||
|
.body();
|
||||||
|
System.out.println("批量新增用户响应:" + response);
|
||||||
|
|
||||||
|
// 6. 解析响应(根据实际响应结构调整,此处假设与登录接口类似)
|
||||||
|
JSONObject responseJson = JSONObject.parseObject(response);
|
||||||
|
int code = responseJson.getIntValue("code");
|
||||||
|
String msg = responseJson.getString("msg");
|
||||||
|
if (code != 200) {
|
||||||
|
throw new RuntimeException("批量新增用户失败:" + msg + "(状态码:" + code + ")");
|
||||||
|
}
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,92 @@
|
|||||||
|
package org.dromara.dataTransmission.claritypm.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实名制用户信息实体类(对应接口参数)
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class RealUser {
|
||||||
|
// 人员姓名(必填)
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
// 是否班组长(非必填,0-否 1-是)
|
||||||
|
private String classManagerFlag;
|
||||||
|
|
||||||
|
// 手机号码(必填)
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
// 性别(必填,1.男 2.女 3.未知)
|
||||||
|
private String sex;
|
||||||
|
|
||||||
|
// 证件类型(必填,0.身份证)
|
||||||
|
private String cardType;
|
||||||
|
|
||||||
|
// 证件号码(必填,身份证号码)
|
||||||
|
private String cardNumber;
|
||||||
|
|
||||||
|
// 人员类型(必填,0.作业人员 1.管理人员)
|
||||||
|
private String userType;
|
||||||
|
|
||||||
|
// 发证机关(非必填)
|
||||||
|
private String cardDept;
|
||||||
|
|
||||||
|
// 民族(非必填)
|
||||||
|
private String nation;
|
||||||
|
|
||||||
|
// 生日(非必填,datetime格式)
|
||||||
|
private LocalDate birthday;
|
||||||
|
|
||||||
|
// 住址(非必填)
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
// 头像(非必填,http地址)
|
||||||
|
private String avatar;
|
||||||
|
|
||||||
|
// 采集相片(非必填,http地址)
|
||||||
|
private String pic;
|
||||||
|
|
||||||
|
// 安全教育表(非必填,http地址)
|
||||||
|
private String safetyEdu;
|
||||||
|
|
||||||
|
// 技术交底表(非必填,http地址)
|
||||||
|
private String technology;
|
||||||
|
|
||||||
|
// 证件有效期始(非必填,datetime格式)
|
||||||
|
private LocalDate cardStartTime;
|
||||||
|
|
||||||
|
// 证件有效期至(非必填,datetime格式)
|
||||||
|
private LocalDate cardEndTime;
|
||||||
|
|
||||||
|
// 学历(非必填,1-9对应小学至其他)
|
||||||
|
private String studyLevel;
|
||||||
|
|
||||||
|
// 政治面貌(非必填,0-3对应党员至民主党派)
|
||||||
|
private String politicsType;
|
||||||
|
|
||||||
|
// 购买保险(非必填,0-否 1-是)
|
||||||
|
private String insuranceFlag;
|
||||||
|
|
||||||
|
// 重大病史(非必填,0-否 1-是)
|
||||||
|
private String diseaseFlag;
|
||||||
|
|
||||||
|
// 劳动合同(非必填,0-未签订 1-已签订)
|
||||||
|
private String laborContractFlag;
|
||||||
|
|
||||||
|
// 紧急联系人(非必填)
|
||||||
|
private String contacts;
|
||||||
|
|
||||||
|
// 紧急联系人电话(非必填)
|
||||||
|
private String contactsPhone;
|
||||||
|
|
||||||
|
// 婚姻状况(非必填,0-3对应未婚至丧偶)
|
||||||
|
private String marryRemark;
|
||||||
|
|
||||||
|
// 企业名称(非必填)
|
||||||
|
private String companyName;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -23,7 +23,10 @@ import org.dromara.facility.constant.FacRedisKeyConstant;
|
|||||||
import org.dromara.facility.domain.FacMatrix;
|
import org.dromara.facility.domain.FacMatrix;
|
||||||
import org.dromara.facility.domain.FacPhotovoltaicPanel;
|
import org.dromara.facility.domain.FacPhotovoltaicPanel;
|
||||||
import org.dromara.facility.domain.dto.geojson.*;
|
import org.dromara.facility.domain.dto.geojson.*;
|
||||||
import org.dromara.facility.domain.dto.photovoltaicpanel.*;
|
import org.dromara.facility.domain.dto.photovoltaicpanel.FacPhotovoltaicPanelCreateByGeoJsonReq;
|
||||||
|
import org.dromara.facility.domain.dto.photovoltaicpanel.FacPhotovoltaicPanelCreateReq;
|
||||||
|
import org.dromara.facility.domain.dto.photovoltaicpanel.FacPhotovoltaicPanelQueryReq;
|
||||||
|
import org.dromara.facility.domain.dto.photovoltaicpanel.FacPhotovoltaicPanelUpdateReq;
|
||||||
import org.dromara.facility.domain.enums.FacFinishStatusEnum;
|
import org.dromara.facility.domain.enums.FacFinishStatusEnum;
|
||||||
import org.dromara.facility.domain.enums.FacFinishTypeEnum;
|
import org.dromara.facility.domain.enums.FacFinishTypeEnum;
|
||||||
import org.dromara.facility.domain.vo.photovoltaicpanel.FacPhotovoltaicPanelVo;
|
import org.dromara.facility.domain.vo.photovoltaicpanel.FacPhotovoltaicPanelVo;
|
||||||
@ -329,10 +332,10 @@ public class FacPhotovoltaicPanelServiceImpl extends ServiceImpl<FacPhotovoltaic
|
|||||||
}
|
}
|
||||||
Long matrixId = matrix.getId();*/
|
Long matrixId = matrix.getId();*/
|
||||||
// 去掉首字母 (T/G)
|
// 去掉首字母 (T/G)
|
||||||
String withoutPrefix = name.substring(2);
|
String withoutPrefix = name.substring(1);
|
||||||
|
|
||||||
// 如果包含".",只取第一个"."前的数字
|
// 如果包含".",只取第一个"."前的数字
|
||||||
int dotIndex = withoutPrefix.indexOf("#");
|
int dotIndex = withoutPrefix.indexOf(".");
|
||||||
if (dotIndex != -1) {
|
if (dotIndex != -1) {
|
||||||
withoutPrefix = withoutPrefix.substring(0, dotIndex);
|
withoutPrefix = withoutPrefix.substring(0, dotIndex);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -210,8 +210,7 @@ public class AttendanceJob {
|
|||||||
.lt(BusAttendanceRule::getClockOutResultTime, end));
|
.lt(BusAttendanceRule::getClockOutResultTime, end));
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取当前日期
|
|
||||||
LocalDate date = LocalDate.now();
|
|
||||||
|
|
||||||
//管理员关联多个项目,需要记录是否已生成缺卡记录
|
//管理员关联多个项目,需要记录是否已生成缺卡记录
|
||||||
// HashSet<Long> manageUserIds = new HashSet<>();
|
// HashSet<Long> manageUserIds = new HashSet<>();
|
||||||
@ -220,6 +219,8 @@ public class AttendanceJob {
|
|||||||
List<BusAttendance> missList = new ArrayList<>();
|
List<BusAttendance> missList = new ArrayList<>();
|
||||||
|
|
||||||
for (BusAttendanceRule rule : list) {
|
for (BusAttendanceRule rule : list) {
|
||||||
|
//获取当前日期
|
||||||
|
LocalDate date = LocalDate.now();
|
||||||
|
|
||||||
LocalTime clockOutTime = rule.getClockOutTime();
|
LocalTime clockOutTime = rule.getClockOutTime();
|
||||||
LocalTime clockOutResultTime = rule.getClockOutResultTime();
|
LocalTime clockOutResultTime = rule.getClockOutResultTime();
|
||||||
|
|||||||
@ -26,16 +26,20 @@ import org.dromara.common.utils.DocumentUtil;
|
|||||||
import org.dromara.materials.constants.MatMaterialsConstant;
|
import org.dromara.materials.constants.MatMaterialsConstant;
|
||||||
import org.dromara.materials.domain.MatMaterialReceive;
|
import org.dromara.materials.domain.MatMaterialReceive;
|
||||||
import org.dromara.materials.domain.MatMaterialReceiveItem;
|
import org.dromara.materials.domain.MatMaterialReceiveItem;
|
||||||
|
import org.dromara.materials.domain.MatMaterials;
|
||||||
|
import org.dromara.materials.domain.MatMaterialsInventory;
|
||||||
import org.dromara.materials.domain.dto.materialreceive.MatMaterialReceiveCreateReq;
|
import org.dromara.materials.domain.dto.materialreceive.MatMaterialReceiveCreateReq;
|
||||||
import org.dromara.materials.domain.dto.materialreceive.MatMaterialReceiveQueryReq;
|
import org.dromara.materials.domain.dto.materialreceive.MatMaterialReceiveQueryReq;
|
||||||
import org.dromara.materials.domain.dto.materialreceive.MatMaterialReceiveUpdateReq;
|
import org.dromara.materials.domain.dto.materialreceive.MatMaterialReceiveUpdateReq;
|
||||||
import org.dromara.materials.domain.dto.materialreceive.MatMaterialReceiveWordDto;
|
import org.dromara.materials.domain.dto.materialreceive.MatMaterialReceiveWordDto;
|
||||||
import org.dromara.materials.domain.dto.materialreceiveitem.MatMaterialReceiveItemDto;
|
import org.dromara.materials.domain.dto.materialreceiveitem.MatMaterialReceiveItemDto;
|
||||||
import org.dromara.materials.domain.dto.materialreceiveitem.MatMaterialReceiveItemWordDto;
|
import org.dromara.materials.domain.dto.materialreceiveitem.MatMaterialReceiveItemWordDto;
|
||||||
|
import org.dromara.materials.domain.enums.MatMaterialsInventoryOutPutEnum;
|
||||||
import org.dromara.materials.domain.vo.materialreceive.MatMaterialReceiveVo;
|
import org.dromara.materials.domain.vo.materialreceive.MatMaterialReceiveVo;
|
||||||
import org.dromara.materials.mapper.MatMaterialReceiveMapper;
|
import org.dromara.materials.mapper.MatMaterialReceiveMapper;
|
||||||
import org.dromara.materials.service.IMatMaterialReceiveItemService;
|
import org.dromara.materials.service.IMatMaterialReceiveItemService;
|
||||||
import org.dromara.materials.service.IMatMaterialReceiveService;
|
import org.dromara.materials.service.IMatMaterialReceiveService;
|
||||||
|
import org.dromara.materials.service.IMatMaterialsInventoryService;
|
||||||
import org.dromara.materials.service.IMatMaterialsService;
|
import org.dromara.materials.service.IMatMaterialsService;
|
||||||
import org.dromara.project.service.IBusProjectService;
|
import org.dromara.project.service.IBusProjectService;
|
||||||
import org.dromara.system.domain.vo.SysOssVo;
|
import org.dromara.system.domain.vo.SysOssVo;
|
||||||
@ -53,6 +57,7 @@ import java.nio.file.Files;
|
|||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
import java.util.zip.ZipOutputStream;
|
import java.util.zip.ZipOutputStream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -81,6 +86,9 @@ public class MatMaterialReceiveServiceImpl extends ServiceImpl<MatMaterialReceiv
|
|||||||
@Resource
|
@Resource
|
||||||
private IMatMaterialsService materialsService;
|
private IMatMaterialsService materialsService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IMatMaterialsInventoryService materialsInventoryService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询物料接收单
|
* 查询物料接收单
|
||||||
*
|
*
|
||||||
@ -366,12 +374,37 @@ public class MatMaterialReceiveServiceImpl extends ServiceImpl<MatMaterialReceiv
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean deleteByIds(Collection<Long> ids) {
|
public Boolean deleteByIds(Collection<Long> ids) {
|
||||||
|
List<MatMaterialReceive> receiveList = this.listByIds(ids);
|
||||||
List<MatMaterialReceiveItem> itemList = materialReceiveItemService.lambdaQuery()
|
List<MatMaterialReceiveItem> itemList = materialReceiveItemService.lambdaQuery()
|
||||||
.in(MatMaterialReceiveItem::getReceiveId, ids)
|
.in(MatMaterialReceiveItem::getReceiveId, ids)
|
||||||
.list();
|
.list();
|
||||||
if (CollUtil.isNotEmpty(itemList)) {
|
if (CollUtil.isNotEmpty(itemList)) {
|
||||||
materialReceiveItemService.removeBatchByIds(itemList);
|
materialReceiveItemService.removeBatchByIds(itemList);
|
||||||
}
|
}
|
||||||
|
// 关联删除材料数据
|
||||||
|
Set<String> formCode = receiveList.stream().map(MatMaterialReceive::getFormCode).collect(Collectors.toSet());
|
||||||
|
List<MatMaterials> materials = materialsService.lambdaQuery()
|
||||||
|
.in(MatMaterials::getFormCode, formCode)
|
||||||
|
.list();
|
||||||
|
if (CollUtil.isNotEmpty(materials)) {
|
||||||
|
for (MatMaterials material : materials) {
|
||||||
|
List<MatMaterialsInventory> inventoryList = materialsInventoryService.lambdaQuery()
|
||||||
|
.eq(MatMaterialsInventory::getMaterialsId, material.getId())
|
||||||
|
.eq(MatMaterialsInventory::getOutPut, MatMaterialsInventoryOutPutEnum.OUT.getValue())
|
||||||
|
.list();
|
||||||
|
if (CollUtil.isNotEmpty(inventoryList)) {
|
||||||
|
throw new ServiceException("存在关联的库存数据,无法删除", HttpStatus.BAD_REQUEST);
|
||||||
|
}
|
||||||
|
Set<Long> materialIds = materials.stream().map(MatMaterials::getId).collect(Collectors.toSet());
|
||||||
|
List<MatMaterialsInventory> allInventoryList = materialsInventoryService.lambdaQuery()
|
||||||
|
.in(MatMaterialsInventory::getMaterialsId, materialIds)
|
||||||
|
.list();
|
||||||
|
if (CollUtil.isNotEmpty(allInventoryList)) {
|
||||||
|
materialsInventoryService.removeBatchByIds(allInventoryList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
materialsService.removeBatchByIds(materials);
|
||||||
|
}
|
||||||
return this.removeBatchByIds(ids);
|
return this.removeBatchByIds(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -668,11 +668,13 @@ public class MatMaterialsServiceImpl extends ServiceImpl<MatMaterialsMapper, Mat
|
|||||||
BeanUtils.copyProperties(material, vo);
|
BeanUtils.copyProperties(material, vo);
|
||||||
Long id = material.getId();
|
Long id = material.getId();
|
||||||
MatMaterialsInventory put = putMap.get(id);
|
MatMaterialsInventory put = putMap.get(id);
|
||||||
vo.setSupplier(put.getRecipient());
|
if (put != null) {
|
||||||
vo.setInventoryId(put.getId());
|
vo.setSupplier(put.getRecipient());
|
||||||
vo.setNumber(put.getNumber());
|
vo.setInventoryId(put.getId());
|
||||||
vo.setOperator(put.getOperator());
|
vo.setNumber(put.getNumber());
|
||||||
vo.setEnterTime(put.getCreateTime());
|
vo.setOperator(put.getOperator());
|
||||||
|
vo.setEnterTime(put.getCreateTime());
|
||||||
|
}
|
||||||
if (CollUtil.isNotEmpty(outList)) {
|
if (CollUtil.isNotEmpty(outList)) {
|
||||||
List<MatMaterialsInventory> outs = outList.stream()
|
List<MatMaterialsInventory> outs = outList.stream()
|
||||||
.filter(inventory -> inventory.getMaterialsId().equals(id))
|
.filter(inventory -> inventory.getMaterialsId().equals(id))
|
||||||
|
|||||||
@ -5,8 +5,10 @@ import org.springframework.context.annotation.Bean;
|
|||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
|
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
|
||||||
|
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
//@Configuration
|
|
||||||
|
@Configuration
|
||||||
public class WebSocketConfig {
|
public class WebSocketConfig {
|
||||||
@Bean
|
@Bean
|
||||||
public ServerEndpointExporter serverEndpointExporter() {
|
public ServerEndpointExporter serverEndpointExporter() {
|
||||||
|
|||||||
@ -41,6 +41,12 @@ public class OutConstructionValueRangeVo implements Serializable {
|
|||||||
@ExcelProperty(value = "项目ID")
|
@ExcelProperty(value = "项目ID")
|
||||||
private Long projectId;
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 第N周
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "第N周")
|
||||||
|
private int week;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 开始日期
|
* 开始日期
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -31,15 +31,15 @@ import org.dromara.progress.service.IPgsProgressPlanDetailService;
|
|||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.context.event.EventListener;
|
import org.springframework.context.event.EventListener;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
import java.time.DayOfWeek;
|
import java.time.DayOfWeek;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.temporal.TemporalAdjusters;
|
import java.time.temporal.TemporalAdjusters;
|
||||||
import java.util.Collection;
|
import java.time.temporal.WeekFields;
|
||||||
import java.util.List;
|
import java.util.*;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 施工产值范围Service业务层处理
|
* 施工产值范围Service业务层处理
|
||||||
@ -61,6 +61,22 @@ public class OutConstructionValueRangeServiceImpl extends ServiceImpl<OutConstru
|
|||||||
@Resource
|
@Resource
|
||||||
private IPgsProgressPlanDetailService progressPlanDetailService;
|
private IPgsProgressPlanDetailService progressPlanDetailService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取指定日期所在的周数(根据中国周规则)
|
||||||
|
*
|
||||||
|
* @param dateStr 日期字符串(格式:yyyy-MM-dd)
|
||||||
|
* @return 指定日期所在的周数(1-52)
|
||||||
|
*/
|
||||||
|
public Integer getCurrentWeekOfYear(String dateStr) {
|
||||||
|
// 解析为 LocalDate(可根据需要调整日期格式)
|
||||||
|
LocalDate specifiedDate = LocalDate.parse(dateStr, DateTimeFormatter.ISO_LOCAL_DATE);
|
||||||
|
// 2. 定义周规则(可选,默认使用系统区域,也可指定)
|
||||||
|
// 示例2:中国规则(周一为第一天,第一周包含1月1日即可)
|
||||||
|
WeekFields chinaWeekFields = WeekFields.of(Locale.CHINA);
|
||||||
|
// 3. 获取指定时间在当年的周数(根据需要选择周规则)
|
||||||
|
return specifiedDate.get(chinaWeekFields.weekOfYear());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询施工产值范围
|
* 查询施工产值范围
|
||||||
*
|
*
|
||||||
@ -87,6 +103,10 @@ public class OutConstructionValueRangeServiceImpl extends ServiceImpl<OutConstru
|
|||||||
public TableDataInfo<OutConstructionValueRangeVo> queryPageList(OutConstructionValueRangeBo bo, PageQuery pageQuery) {
|
public TableDataInfo<OutConstructionValueRangeVo> queryPageList(OutConstructionValueRangeBo bo, PageQuery pageQuery) {
|
||||||
LambdaQueryWrapper<OutConstructionValueRange> lqw = buildQueryWrapper(bo);
|
LambdaQueryWrapper<OutConstructionValueRange> lqw = buildQueryWrapper(bo);
|
||||||
Page<OutConstructionValueRangeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
Page<OutConstructionValueRangeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
//增加第N周
|
||||||
|
result.getRecords().forEach(item -> {
|
||||||
|
item.setWeek(getCurrentWeekOfYear(item.getStartDate().toString()));
|
||||||
|
});
|
||||||
return TableDataInfo.build(result);
|
return TableDataInfo.build(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -15,6 +15,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.dromara.common.core.constant.HttpStatus;
|
import org.dromara.common.core.constant.HttpStatus;
|
||||||
import org.dromara.common.core.domain.R;
|
import org.dromara.common.core.domain.R;
|
||||||
import org.dromara.common.core.exception.ServiceException;
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.excel.core.DefaultExcelListener;
|
import org.dromara.common.excel.core.DefaultExcelListener;
|
||||||
import org.dromara.common.excel.utils.ExcelUtil;
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
@ -39,6 +40,7 @@ import java.math.RoundingMode;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -257,21 +259,30 @@ public class PgsProgressCategoryController extends BaseController {
|
|||||||
List<PgsProgressCategoryVo> list = sheetListener.getExcelResult().getList();
|
List<PgsProgressCategoryVo> list = sheetListener.getExcelResult().getList();
|
||||||
List<PgsProgressCategoryVo> newList = list.stream().filter(vo -> vo.getId() == null).toList();
|
List<PgsProgressCategoryVo> newList = list.stream().filter(vo -> vo.getId() == null).toList();
|
||||||
List<PgsProgressCategoryVo> oldList = list.stream().filter(vo -> vo.getId() != null).toList();
|
List<PgsProgressCategoryVo> oldList = list.stream().filter(vo -> vo.getId() != null).toList();
|
||||||
// 将当前sheet的数据添加到总数据中
|
Set<Long> ids = oldList.stream().map(PgsProgressCategoryVo::getId).collect(Collectors.toSet());
|
||||||
allData.addAll(oldList);
|
List<PgsProgressCategory> categoryList = pgsProgressCategoryService.listByIds(ids);
|
||||||
if (CollUtil.isNotEmpty(newList)) {
|
// 筛选出关联设计图的数据
|
||||||
if (CollUtil.isNotEmpty(oldList)) {
|
List<PgsProgressCategoryVo> oldListVo = oldList.stream().filter(vo -> {
|
||||||
PgsProgressCategoryVo first = oldList.getFirst();
|
PgsProgressCategory category = categoryList.stream().filter(c -> c.getId().equals(vo.getId())).findFirst().orElse(null);
|
||||||
PgsProgressCategory category = pgsProgressCategoryService.getById(first.getId());
|
if (category == null) {
|
||||||
newList.forEach(vo -> {
|
return true;
|
||||||
vo.setParentId(category.getParentId());
|
|
||||||
vo.setProjectId(category.getProjectId());
|
|
||||||
vo.setMatrixId(category.getMatrixId());
|
|
||||||
vo.setAncestors(category.getAncestors());
|
|
||||||
vo.setRelevancyStructure(category.getRelevancyStructure());
|
|
||||||
});
|
|
||||||
allData.addAll(newList);
|
|
||||||
}
|
}
|
||||||
|
String workType = category.getWorkType();
|
||||||
|
return StringUtils.isBlank(workType);
|
||||||
|
}).toList();
|
||||||
|
// 将当前sheet的数据添加到总数据中
|
||||||
|
allData.addAll(oldListVo);
|
||||||
|
if (CollUtil.isNotEmpty(newList) && CollUtil.isNotEmpty(oldList)) {
|
||||||
|
PgsProgressCategoryVo first = oldList.getFirst();
|
||||||
|
PgsProgressCategory category = pgsProgressCategoryService.getById(first.getId());
|
||||||
|
newList.forEach(vo -> {
|
||||||
|
vo.setParentId(category.getParentId());
|
||||||
|
vo.setProjectId(category.getProjectId());
|
||||||
|
vo.setMatrixId(category.getMatrixId());
|
||||||
|
vo.setAncestors(category.getAncestors());
|
||||||
|
vo.setRelevancyStructure(category.getRelevancyStructure());
|
||||||
|
});
|
||||||
|
allData.addAll(newList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -333,10 +333,11 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
|||||||
}
|
}
|
||||||
|
|
||||||
//打卡范围
|
//打卡范围
|
||||||
if (!checkInRange(req)) {
|
if (!"1".equals(req.getSource())){
|
||||||
throw new ServiceException("打卡位置不在范围内", HttpStatus.ERROR);
|
if (!checkInRange(req)) {
|
||||||
|
throw new ServiceException("打卡位置不在范围内", HttpStatus.ERROR);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//用户信息校验
|
//用户信息校验
|
||||||
SubConstructionUser constructionUser = constructionUserService.getBySysUserId(userId);
|
SubConstructionUser constructionUser = constructionUserService.getBySysUserId(userId);
|
||||||
if ("1".equals(constructionUser.getStatus())) {
|
if ("1".equals(constructionUser.getStatus())) {
|
||||||
|
|||||||
@ -0,0 +1,137 @@
|
|||||||
|
package org.dromara.vehicle.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.vehicle.domain.dto.vehicleapply.*;
|
||||||
|
import org.dromara.vehicle.domain.vo.VehVehicleApplyVo;
|
||||||
|
import org.dromara.vehicle.service.IVehVehicleApplyService;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 乘车申请
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-25
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/vehicle/vehicleApply")
|
||||||
|
public class VehVehicleApplyController extends BaseController {
|
||||||
|
|
||||||
|
private final IVehVehicleApplyService vehVehicleApplyService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询乘车申请列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("vehicle:vehicleApply:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<VehVehicleApplyVo> list(VehVehicleApplyQueryReq req, PageQuery pageQuery) {
|
||||||
|
return vehVehicleApplyService.queryPageList(req, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出乘车申请列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("vehicle:vehicleApply:export")
|
||||||
|
@Log(title = "乘车申请", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(VehVehicleApplyQueryReq req, HttpServletResponse response) {
|
||||||
|
List<VehVehicleApplyVo> list = vehVehicleApplyService.queryList(req);
|
||||||
|
ExcelUtil.exportExcel(list, "乘车申请", VehVehicleApplyVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取乘车申请详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("vehicle:vehicleApply:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<VehVehicleApplyVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(vehVehicleApplyService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增乘车申请
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("vehicle:vehicleApply:add")
|
||||||
|
@Log(title = "乘车申请", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated @RequestBody VehVehicleApplyCreateReq req) {
|
||||||
|
return toAjax(vehVehicleApplyService.insertByBo(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改乘车申请
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("vehicle:vehicleApply:edit")
|
||||||
|
@Log(title = "乘车申请", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated @RequestBody VehVehicleApplyUpdateReq req) {
|
||||||
|
return toAjax(vehVehicleApplyService.updateByBo(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车主审核
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("vehicle:vehicleApply:edit")
|
||||||
|
@Log(title = "乘车申请", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping("/driverReview")
|
||||||
|
public R<Void> driverReview(@Validated @RequestBody VehVehicleApplyReviewReq req) {
|
||||||
|
return toAjax(vehVehicleApplyService.driverReview(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 乘客确认上车状态
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("vehicle:vehicleApply:edit")
|
||||||
|
@Log(title = "乘车申请", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping("/changeStatus")
|
||||||
|
public R<Void> changeStatus(@Validated @RequestBody VehVehicleApplyChangeStatusReq req) {
|
||||||
|
return toAjax(vehVehicleApplyService.changeStatus(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 乘客取消申请
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("vehicle:vehicleApply:edit")
|
||||||
|
@Log(title = "乘车申请", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping("/cancel")
|
||||||
|
public R<Void> cancel(@Validated @RequestBody VehVehicleApplyCancelReq req) {
|
||||||
|
return toAjax(vehVehicleApplyService.cancelApply(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除乘车申请
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("vehicle:vehicleApply:remove")
|
||||||
|
@Log(title = "乘车申请", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(vehVehicleApplyService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,118 @@
|
|||||||
|
package org.dromara.vehicle.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.vehicle.domain.dto.vehicletrip.VehVehicleTripCancelReq;
|
||||||
|
import org.dromara.vehicle.domain.dto.vehicletrip.VehVehicleTripCreateReq;
|
||||||
|
import org.dromara.vehicle.domain.dto.vehicletrip.VehVehicleTripQueryReq;
|
||||||
|
import org.dromara.vehicle.domain.dto.vehicletrip.VehVehicleTripUpdateReq;
|
||||||
|
import org.dromara.vehicle.domain.vo.VehVehicleTripVo;
|
||||||
|
import org.dromara.vehicle.service.IVehVehicleTripService;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆出行记录
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-25
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/vehicle/vehicleTrip")
|
||||||
|
public class VehVehicleTripController extends BaseController {
|
||||||
|
|
||||||
|
private final IVehVehicleTripService vehVehicleTripService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询车辆出行记录列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("vehicle:vehicleTrip:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<VehVehicleTripVo> list(VehVehicleTripQueryReq req, PageQuery pageQuery) {
|
||||||
|
return vehVehicleTripService.queryPageList(req, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出车辆出行记录列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("vehicle:vehicleTrip:export")
|
||||||
|
@Log(title = "车辆出行记录", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(VehVehicleTripQueryReq req, HttpServletResponse response) {
|
||||||
|
List<VehVehicleTripVo> list = vehVehicleTripService.queryList(req);
|
||||||
|
ExcelUtil.exportExcel(list, "车辆出行记录", VehVehicleTripVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取车辆出行记录详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("vehicle:vehicleTrip:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<VehVehicleTripVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(vehVehicleTripService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增车辆出行记录
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("vehicle:vehicleTrip:add")
|
||||||
|
@Log(title = "车辆出行记录", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated @RequestBody VehVehicleTripCreateReq req) {
|
||||||
|
return toAjax(vehVehicleTripService.insertByBo(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改车辆出行记录
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("vehicle:vehicleTrip:edit")
|
||||||
|
@Log(title = "车辆出行记录", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated @RequestBody VehVehicleTripUpdateReq req) {
|
||||||
|
return toAjax(vehVehicleTripService.updateByBo(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消车辆出行记录
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("vehicle:vehicleTrip:edit")
|
||||||
|
@Log(title = "车辆出行记录", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping("/cancel")
|
||||||
|
public R<Void> cancel(@Validated @RequestBody VehVehicleTripCancelReq req) {
|
||||||
|
return toAjax(vehVehicleTripService.cancel(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除车辆出行记录
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("vehicle:vehicleTrip:remove")
|
||||||
|
@Log(title = "车辆出行记录", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(vehVehicleTripService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,115 @@
|
|||||||
|
package org.dromara.vehicle.controller.app;
|
||||||
|
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.vehicle.domain.dto.vehicleapply.*;
|
||||||
|
import org.dromara.vehicle.domain.vo.VehVehicleApplyVo;
|
||||||
|
import org.dromara.vehicle.service.IVehVehicleApplyService;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 乘车申请 app 接口
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-28 10:16
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/app/vehicle/vehicleApply")
|
||||||
|
public class VehVehicleApplyAppController extends BaseController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IVehVehicleApplyService vehicleApplyService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询乘车申请列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<VehVehicleApplyVo> list(VehVehicleApplyQueryReq req, PageQuery pageQuery) {
|
||||||
|
return vehicleApplyService.queryPageList(req, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取乘车申请详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<VehVehicleApplyVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(vehicleApplyService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增乘车申请
|
||||||
|
*/
|
||||||
|
@Log(title = "乘车申请", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated @RequestBody VehVehicleApplyCreateReq req) {
|
||||||
|
return toAjax(vehicleApplyService.insertByBo(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改乘车申请
|
||||||
|
*/
|
||||||
|
@Log(title = "乘车申请", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated @RequestBody VehVehicleApplyUpdateReq req) {
|
||||||
|
return toAjax(vehicleApplyService.updateByBo(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车主审核
|
||||||
|
*/
|
||||||
|
@Log(title = "乘车申请", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping("/driverReview")
|
||||||
|
public R<Void> driverReview(@Validated @RequestBody VehVehicleApplyReviewReq req) {
|
||||||
|
return toAjax(vehicleApplyService.driverReview(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 乘客确认上车状态
|
||||||
|
*/
|
||||||
|
@Log(title = "乘车申请", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping("/changeStatus")
|
||||||
|
public R<Void> changeStatus(@Validated @RequestBody VehVehicleApplyChangeStatusReq req) {
|
||||||
|
return toAjax(vehicleApplyService.changeStatus(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 乘客取消申请
|
||||||
|
*/
|
||||||
|
@Log(title = "乘车申请", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping("/cancel")
|
||||||
|
public R<Void> cancel(@Validated @RequestBody VehVehicleApplyCancelReq req) {
|
||||||
|
return toAjax(vehicleApplyService.cancelApply(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除乘车申请
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@Log(title = "乘车申请", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(vehicleApplyService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,98 @@
|
|||||||
|
package org.dromara.vehicle.controller.app;
|
||||||
|
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.vehicle.domain.dto.vehicletrip.VehVehicleTripCancelReq;
|
||||||
|
import org.dromara.vehicle.domain.dto.vehicletrip.VehVehicleTripCreateReq;
|
||||||
|
import org.dromara.vehicle.domain.dto.vehicletrip.VehVehicleTripQueryReq;
|
||||||
|
import org.dromara.vehicle.domain.dto.vehicletrip.VehVehicleTripUpdateReq;
|
||||||
|
import org.dromara.vehicle.domain.vo.VehVehicleTripVo;
|
||||||
|
import org.dromara.vehicle.service.IVehVehicleTripService;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆出行记录 app 接口
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-28 10:19
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/app/vehicle/vehicleTrip")
|
||||||
|
public class VehVehicleTripAppController extends BaseController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IVehVehicleTripService vehicleTripService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询车辆出行记录列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<VehVehicleTripVo> list(VehVehicleTripQueryReq req, PageQuery pageQuery) {
|
||||||
|
return vehicleTripService.queryPageList(req, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取车辆出行记录详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<VehVehicleTripVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(vehicleTripService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增车辆出行记录
|
||||||
|
*/
|
||||||
|
@Log(title = "车辆出行记录", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated @RequestBody VehVehicleTripCreateReq req) {
|
||||||
|
return toAjax(vehicleTripService.insertByBo(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改车辆出行记录
|
||||||
|
*/
|
||||||
|
@Log(title = "车辆出行记录", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated @RequestBody VehVehicleTripUpdateReq req) {
|
||||||
|
return toAjax(vehicleTripService.updateByBo(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消车辆出行记录
|
||||||
|
*/
|
||||||
|
@Log(title = "车辆出行记录", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping("/cancel")
|
||||||
|
public R<Void> cancel(@Validated @RequestBody VehVehicleTripCancelReq req) {
|
||||||
|
return toAjax(vehicleTripService.cancel(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除车辆出行记录
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@Log(title = "车辆出行记录", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(vehicleTripService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,91 @@
|
|||||||
|
package org.dromara.vehicle.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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 乘车申请对象 veh_vehicle_apply
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("veh_vehicle_apply")
|
||||||
|
public class VehVehicleApply extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联行程ID
|
||||||
|
*/
|
||||||
|
private Long tripId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请人数
|
||||||
|
*/
|
||||||
|
private Integer peopleNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
private String passengerPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出发地
|
||||||
|
*/
|
||||||
|
private String startPlace;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地
|
||||||
|
*/
|
||||||
|
private String endPlace;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出发地经度
|
||||||
|
*/
|
||||||
|
private String startLat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出发地纬度
|
||||||
|
*/
|
||||||
|
private String startLng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地经度
|
||||||
|
*/
|
||||||
|
private String endLat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地纬度
|
||||||
|
*/
|
||||||
|
private String endLng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 乘车状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,12 +1,13 @@
|
|||||||
package org.dromara.vehicle.domain;
|
package org.dromara.vehicle.domain;
|
||||||
|
|
||||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import java.math.BigDecimal;
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -144,5 +145,4 @@ public class VehVehicleInfo extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,122 @@
|
|||||||
|
package org.dromara.vehicle.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.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆出行记录对象 veh_vehicle_trip
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("veh_vehicle_trip")
|
||||||
|
public class VehVehicleTrip extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆ID
|
||||||
|
*/
|
||||||
|
private Long vehicleId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车牌号
|
||||||
|
*/
|
||||||
|
private String plateNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
private String passengerPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出行事由
|
||||||
|
*/
|
||||||
|
private String tripReason;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出发地
|
||||||
|
*/
|
||||||
|
private String startPlace;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地
|
||||||
|
*/
|
||||||
|
private String endPlace;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出发地经度
|
||||||
|
*/
|
||||||
|
private String startLat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出发地纬度
|
||||||
|
*/
|
||||||
|
private String startLng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地经度
|
||||||
|
*/
|
||||||
|
private String endLat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地纬度
|
||||||
|
*/
|
||||||
|
private String endLng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划出发时间
|
||||||
|
*/
|
||||||
|
private Date startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划到达时间
|
||||||
|
*/
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请人数
|
||||||
|
*/
|
||||||
|
private Integer peopleNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 剩余座位数
|
||||||
|
*/
|
||||||
|
private Integer leftSeat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
private String reviewStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
private String tripStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
package org.dromara.vehicle.domain.dto.vehicleapply;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-28 09:22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class VehVehicleApplyCancelReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = -3178638460132028254L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键不能为空")
|
||||||
|
private Long id;
|
||||||
|
}
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
package org.dromara.vehicle.domain.dto.vehicleapply;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-28 09:24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class VehVehicleApplyChangeStatusReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = -7509344474542508076L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键不能为空")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 乘车状态
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "乘车状态不能为空")
|
||||||
|
private String status;
|
||||||
|
}
|
||||||
@ -0,0 +1,80 @@
|
|||||||
|
package org.dromara.vehicle.domain.dto.vehicleapply;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-27 14:15
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class VehVehicleApplyCreateReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1199219811382958686L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "项目ID不能为空")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联行程ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "关联行程ID不能为空")
|
||||||
|
private Long tripId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请人数
|
||||||
|
*/
|
||||||
|
@NotNull(message = "申请人数不能为空")
|
||||||
|
private Integer peopleNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
private String passengerPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出发地
|
||||||
|
*/
|
||||||
|
private String startPlace;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "目的地不能为空")
|
||||||
|
private String endPlace;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出发地经度
|
||||||
|
*/
|
||||||
|
private String startLat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出发地纬度
|
||||||
|
*/
|
||||||
|
private String startLng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地经度
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "目的地经度不能为空")
|
||||||
|
private String endLat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地纬度
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "目的地纬度不能为空")
|
||||||
|
private String endLng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
}
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
package org.dromara.vehicle.domain.dto.vehicleapply;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-27 14:48
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class VehVehicleApplyQueryReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = -7148064523789231728L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联行程ID
|
||||||
|
*/
|
||||||
|
private Long tripId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请人数
|
||||||
|
*/
|
||||||
|
private Integer peopleNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
private String passengerPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出发地
|
||||||
|
*/
|
||||||
|
private String startPlace;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地
|
||||||
|
*/
|
||||||
|
private String endPlace;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 乘车状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
}
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
package org.dromara.vehicle.domain.dto.vehicleapply;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-27 15:00
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class VehVehicleApplyReviewReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = -5881272503469997069L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键不能为空")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 乘车状态
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "乘车状态不能为空")
|
||||||
|
private String status;
|
||||||
|
}
|
||||||
@ -0,0 +1,69 @@
|
|||||||
|
package org.dromara.vehicle.domain.dto.vehicleapply;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-27 15:30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class VehVehicleApplyUpdateReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 7272254511495824388L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键不能为空")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请人数
|
||||||
|
*/
|
||||||
|
private Integer peopleNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
private String passengerPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出发地
|
||||||
|
*/
|
||||||
|
private String startPlace;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地
|
||||||
|
*/
|
||||||
|
private String endPlace;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出发地经度
|
||||||
|
*/
|
||||||
|
private String startLat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出发地纬度
|
||||||
|
*/
|
||||||
|
private String startLng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地经度
|
||||||
|
*/
|
||||||
|
private String endLat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地纬度
|
||||||
|
*/
|
||||||
|
private String endLng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
}
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
package org.dromara.vehicle.domain.dto.vehicletrip;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-27 09:22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class VehVehicleTripCancelReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 7690656986769836247L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键不能为空")
|
||||||
|
private Long id;
|
||||||
|
}
|
||||||
@ -0,0 +1,109 @@
|
|||||||
|
package org.dromara.vehicle.domain.dto.vehicletrip;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-27 10:05
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class VehVehicleTripCreateReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 7691668678158594767L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆ID
|
||||||
|
*/
|
||||||
|
private Long vehicleId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车牌号
|
||||||
|
*/
|
||||||
|
private String plateNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
private String passengerPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出行事由
|
||||||
|
*/
|
||||||
|
private String tripReason;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出发地
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "出发地不能为空")
|
||||||
|
private String startPlace;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "目的地不能为空")
|
||||||
|
private String endPlace;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出发地经度
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "出发地经度不能为空")
|
||||||
|
private String startLat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出发地纬度
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "出发地纬度不能为空")
|
||||||
|
private String startLng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地经度
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "目的地经度不能为空")
|
||||||
|
private String endLat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地纬度
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "目的地纬度不能为空")
|
||||||
|
private String endLng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划出发时间
|
||||||
|
*/
|
||||||
|
@NotNull(message = "计划出发时间不能为空")
|
||||||
|
private Date startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划到达时间
|
||||||
|
*/
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请人数
|
||||||
|
*/
|
||||||
|
@NotNull(message = "申请人数不能为空")
|
||||||
|
private Integer peopleNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 剩余座位数
|
||||||
|
*/
|
||||||
|
@NotNull(message = "剩余座位数不能为空")
|
||||||
|
private Integer leftSeat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
}
|
||||||
@ -0,0 +1,54 @@
|
|||||||
|
package org.dromara.vehicle.domain.dto.vehicletrip;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-25 19:40
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class VehVehicleTripQueryReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = -7795154504461471208L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地
|
||||||
|
*/
|
||||||
|
private String endPlace;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地经度
|
||||||
|
*/
|
||||||
|
private String endLat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地纬度
|
||||||
|
*/
|
||||||
|
private String endLng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划出发时间
|
||||||
|
*/
|
||||||
|
private Date startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出行人数
|
||||||
|
*/
|
||||||
|
private Integer peopleNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
private String reviewStatus;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,105 @@
|
|||||||
|
package org.dromara.vehicle.domain.dto.vehicletrip;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-27 11:33
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class VehVehicleTripUpdateReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 3855392201273235078L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键不能为空")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆ID
|
||||||
|
*/
|
||||||
|
private Long vehicleId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车牌号
|
||||||
|
*/
|
||||||
|
private String plateNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
private String passengerPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出行事由
|
||||||
|
*/
|
||||||
|
private String tripReason;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出发地
|
||||||
|
*/
|
||||||
|
private String startPlace;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地
|
||||||
|
*/
|
||||||
|
private String endPlace;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出发地经度
|
||||||
|
*/
|
||||||
|
private String startLat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出发地纬度
|
||||||
|
*/
|
||||||
|
private String startLng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地经度
|
||||||
|
*/
|
||||||
|
private String endLat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地纬度
|
||||||
|
*/
|
||||||
|
private String endLng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划出发时间
|
||||||
|
*/
|
||||||
|
private Date startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划到达时间
|
||||||
|
*/
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请人数
|
||||||
|
*/
|
||||||
|
private Integer peopleNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 剩余座位数
|
||||||
|
*/
|
||||||
|
private Integer leftSeat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
}
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
package org.dromara.vehicle.domain.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-27 09:39
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum VehApplyStatusEnum {
|
||||||
|
|
||||||
|
APPLYING("申请中", "1"),
|
||||||
|
CONFIRMED("已确认", "2"),
|
||||||
|
REJECTED("已拒绝", "3"),
|
||||||
|
ALREADY("已上车", "4"),
|
||||||
|
ARRIVED("已到达", "5"),
|
||||||
|
CANCELED("已取消", "6");
|
||||||
|
|
||||||
|
private final String text;
|
||||||
|
|
||||||
|
private final String value;
|
||||||
|
|
||||||
|
VehApplyStatusEnum(String text, String value) {
|
||||||
|
this.text = text;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
package org.dromara.vehicle.domain.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-27 09:32
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum VehTripStatusEnum {
|
||||||
|
|
||||||
|
READY_DEPART("待出发","1"),
|
||||||
|
UNDERWAY("进行中","2"),
|
||||||
|
COMPLETED("已完成","3"),
|
||||||
|
CANCELED("已取消","4" );
|
||||||
|
|
||||||
|
private final String text;
|
||||||
|
|
||||||
|
private final String value;
|
||||||
|
|
||||||
|
VehTripStatusEnum(String text, String value) {
|
||||||
|
this.text = text;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
package org.dromara.vehicle.domain.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-27 11:42
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum VehVehicleInfoStatusEnum {
|
||||||
|
|
||||||
|
AVAILABLE("可用", "1"),
|
||||||
|
IN_USE("使用中", "2"),
|
||||||
|
UNDER_MAINTENANCE("维护中", "3"),
|
||||||
|
DISABLE("停用", "4");
|
||||||
|
|
||||||
|
private final String text;
|
||||||
|
|
||||||
|
private final String value;
|
||||||
|
|
||||||
|
VehVehicleInfoStatusEnum(String text, String value) {
|
||||||
|
this.text = text;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,111 @@
|
|||||||
|
package org.dromara.vehicle.domain.vo;
|
||||||
|
|
||||||
|
import org.dromara.vehicle.domain.VehVehicleApply;
|
||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 乘车申请视图对象 veh_vehicle_apply
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = VehVehicleApply.class)
|
||||||
|
public class VehVehicleApplyVo 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 tripId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请人数
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "申请人数")
|
||||||
|
private Integer peopleNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "联系电话")
|
||||||
|
private String passengerPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出发地
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "出发地")
|
||||||
|
private String startPlace;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "目的地")
|
||||||
|
private String endPlace;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出发地经度
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "出发地经度")
|
||||||
|
private String startLat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出发地纬度
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "出发地纬度")
|
||||||
|
private String startLng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地经度
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "目的地经度")
|
||||||
|
private String endLat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地纬度
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "目的地纬度")
|
||||||
|
private String endLng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 乘车状态
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "乘车状态", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(dictType = "veh_vehicle_apply_status")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,19 +1,17 @@
|
|||||||
package org.dromara.vehicle.domain.vo;
|
package org.dromara.vehicle.domain.vo;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import org.dromara.vehicle.domain.VehVehicleInfo;
|
|
||||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
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 io.github.linpeilie.annotations.AutoMapper;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||||
|
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||||
|
import org.dromara.vehicle.domain.VehVehicleInfo;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -0,0 +1,183 @@
|
|||||||
|
package org.dromara.vehicle.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.common.translation.annotation.Translation;
|
||||||
|
import org.dromara.common.translation.constant.TransConstant;
|
||||||
|
import org.dromara.vehicle.domain.VehVehicleTrip;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆出行记录视图对象 veh_vehicle_trip
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = VehVehicleTrip.class)
|
||||||
|
public class VehVehicleTripVo 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 vehicleId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车牌号
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "车牌号")
|
||||||
|
private String plateNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "联系电话")
|
||||||
|
private String passengerPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出行事由
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "出行事由")
|
||||||
|
private String tripReason;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出发地
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "出发地")
|
||||||
|
private String startPlace;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "目的地")
|
||||||
|
private String endPlace;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出发地经度
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "出发地经度")
|
||||||
|
private String startLat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出发地纬度
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "出发地纬度")
|
||||||
|
private String startLng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地经度
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "目的地经度")
|
||||||
|
private String endLat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地纬度
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "目的地纬度")
|
||||||
|
private String endLng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划出发时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "计划出发时间")
|
||||||
|
private Date startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划到达时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "计划到达时间")
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请人数
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "申请人数")
|
||||||
|
private Integer peopleNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 剩余座位数
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "剩余座位数")
|
||||||
|
private Integer leftSeat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "审核状态", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(dictType = "wf_business_status")
|
||||||
|
private String reviewStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(dictType = "veh_vehicle_trip_status")
|
||||||
|
private String tripStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 距离(米)
|
||||||
|
*/
|
||||||
|
private String distanceM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 距离评分
|
||||||
|
*/
|
||||||
|
private String distanceScore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时间评分
|
||||||
|
*/
|
||||||
|
private String timeScore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人数评分
|
||||||
|
*/
|
||||||
|
private String peopleScore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总评分
|
||||||
|
*/
|
||||||
|
private String totalScore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
|
private Long createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者名称
|
||||||
|
*/
|
||||||
|
@Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "createBy")
|
||||||
|
private String createByName;
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.vehicle.mapper;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
import org.dromara.vehicle.domain.VehVehicleApply;
|
||||||
|
import org.dromara.vehicle.domain.vo.VehVehicleApplyVo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 乘车申请Mapper接口
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-25
|
||||||
|
*/
|
||||||
|
public interface VehVehicleApplyMapper extends BaseMapperPlus<VehVehicleApply, VehVehicleApplyVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
package org.dromara.vehicle.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
import org.dromara.vehicle.domain.VehVehicleTrip;
|
||||||
|
import org.dromara.vehicle.domain.dto.vehicletrip.VehVehicleTripQueryReq;
|
||||||
|
import org.dromara.vehicle.domain.vo.VehVehicleTripVo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆出行记录Mapper接口
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-25
|
||||||
|
*/
|
||||||
|
public interface VehVehicleTripMapper extends BaseMapperPlus<VehVehicleTrip, VehVehicleTripVo> {
|
||||||
|
|
||||||
|
Page<VehVehicleTripVo> selectVehicleTripPage(@Param("page") Page<VehVehicleTrip> page,
|
||||||
|
@Param("req") VehVehicleTripQueryReq req);
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,94 @@
|
|||||||
|
package org.dromara.vehicle.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.vehicle.domain.VehVehicleApply;
|
||||||
|
import org.dromara.vehicle.domain.dto.vehicleapply.*;
|
||||||
|
import org.dromara.vehicle.domain.vo.VehVehicleApplyVo;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 乘车申请Service接口
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-25
|
||||||
|
*/
|
||||||
|
public interface IVehVehicleApplyService extends IService<VehVehicleApply> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询乘车申请
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 乘车申请
|
||||||
|
*/
|
||||||
|
VehVehicleApplyVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询乘车申请列表
|
||||||
|
*
|
||||||
|
* @param req 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 乘车申请分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<VehVehicleApplyVo> queryPageList(VehVehicleApplyQueryReq req, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的乘车申请列表
|
||||||
|
*
|
||||||
|
* @param req 查询条件
|
||||||
|
* @return 乘车申请列表
|
||||||
|
*/
|
||||||
|
List<VehVehicleApplyVo> queryList(VehVehicleApplyQueryReq req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增乘车申请
|
||||||
|
*
|
||||||
|
* @param req 乘车申请
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(VehVehicleApplyCreateReq req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改乘车申请
|
||||||
|
*
|
||||||
|
* @param req 乘车申请
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(VehVehicleApplyUpdateReq req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车主审核
|
||||||
|
*
|
||||||
|
* @param req 审核信息
|
||||||
|
* @return 是否审核成功
|
||||||
|
*/
|
||||||
|
Boolean driverReview(VehVehicleApplyReviewReq req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改乘车状态
|
||||||
|
*
|
||||||
|
* @param req 修改乘车状态信息
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean changeStatus(VehVehicleApplyChangeStatusReq req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消申请
|
||||||
|
*
|
||||||
|
* @param req 取消申请信息
|
||||||
|
* @return 是否取消成功
|
||||||
|
*/
|
||||||
|
Boolean cancelApply(VehVehicleApplyCancelReq req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除乘车申请信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
@ -0,0 +1,81 @@
|
|||||||
|
package org.dromara.vehicle.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.vehicle.domain.VehVehicleTrip;
|
||||||
|
import org.dromara.vehicle.domain.dto.vehicletrip.VehVehicleTripCancelReq;
|
||||||
|
import org.dromara.vehicle.domain.dto.vehicletrip.VehVehicleTripCreateReq;
|
||||||
|
import org.dromara.vehicle.domain.dto.vehicletrip.VehVehicleTripQueryReq;
|
||||||
|
import org.dromara.vehicle.domain.dto.vehicletrip.VehVehicleTripUpdateReq;
|
||||||
|
import org.dromara.vehicle.domain.vo.VehVehicleTripVo;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆出行记录Service接口
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-25
|
||||||
|
*/
|
||||||
|
public interface IVehVehicleTripService extends IService<VehVehicleTrip> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询车辆出行记录
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 车辆出行记录
|
||||||
|
*/
|
||||||
|
VehVehicleTripVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询车辆出行记录列表
|
||||||
|
*
|
||||||
|
* @param req 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 车辆出行记录分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<VehVehicleTripVo> queryPageList(VehVehicleTripQueryReq req, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的车辆出行记录列表
|
||||||
|
*
|
||||||
|
* @param req 查询条件
|
||||||
|
* @return 车辆出行记录列表
|
||||||
|
*/
|
||||||
|
List<VehVehicleTripVo> queryList(VehVehicleTripQueryReq req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增车辆出行记录
|
||||||
|
*
|
||||||
|
* @param req 车辆出行记录
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(VehVehicleTripCreateReq req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改车辆出行记录
|
||||||
|
*
|
||||||
|
* @param req 车辆出行记录
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(VehVehicleTripUpdateReq req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消车辆出行记录
|
||||||
|
*
|
||||||
|
* @param req 车辆出行记录
|
||||||
|
* @return 是否取消成功
|
||||||
|
*/
|
||||||
|
Boolean cancel(VehVehicleTripCancelReq req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除车辆出行记录信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
@ -0,0 +1,375 @@
|
|||||||
|
package org.dromara.vehicle.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.PhoneUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import 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;
|
||||||
|
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.vehicle.domain.VehVehicleApply;
|
||||||
|
import org.dromara.vehicle.domain.VehVehicleTrip;
|
||||||
|
import org.dromara.vehicle.domain.dto.vehicleapply.*;
|
||||||
|
import org.dromara.vehicle.domain.enums.VehApplyStatusEnum;
|
||||||
|
import org.dromara.vehicle.domain.enums.VehTripStatusEnum;
|
||||||
|
import org.dromara.vehicle.domain.vo.VehVehicleApplyVo;
|
||||||
|
import org.dromara.vehicle.mapper.VehVehicleApplyMapper;
|
||||||
|
import org.dromara.vehicle.service.IVehVehicleApplyService;
|
||||||
|
import org.dromara.vehicle.service.IVehVehicleTripService;
|
||||||
|
import org.dromara.websocket.ChatServerHandler;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 乘车申请Service业务层处理
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-25
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class VehVehicleApplyServiceImpl extends ServiceImpl<VehVehicleApplyMapper, VehVehicleApply>
|
||||||
|
implements IVehVehicleApplyService {
|
||||||
|
|
||||||
|
private final IVehVehicleTripService vehicleTripService;
|
||||||
|
|
||||||
|
private final ChatServerHandler chatServerHandler;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询乘车申请
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 乘车申请
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public VehVehicleApplyVo queryById(Long id) {
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询乘车申请列表
|
||||||
|
*
|
||||||
|
* @param req 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 乘车申请分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<VehVehicleApplyVo> queryPageList(VehVehicleApplyQueryReq req, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<VehVehicleApply> lqw = buildQueryWrapper(req);
|
||||||
|
Page<VehVehicleApplyVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的乘车申请列表
|
||||||
|
*
|
||||||
|
* @param req 查询条件
|
||||||
|
* @return 乘车申请列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<VehVehicleApplyVo> queryList(VehVehicleApplyQueryReq req) {
|
||||||
|
LambdaQueryWrapper<VehVehicleApply> lqw = buildQueryWrapper(req);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<VehVehicleApply> buildQueryWrapper(VehVehicleApplyQueryReq req) {
|
||||||
|
LambdaQueryWrapper<VehVehicleApply> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.orderByDesc(VehVehicleApply::getId);
|
||||||
|
lqw.eq(req.getProjectId() != null, VehVehicleApply::getProjectId, req.getProjectId());
|
||||||
|
lqw.eq(req.getTripId() != null, VehVehicleApply::getTripId, req.getTripId());
|
||||||
|
lqw.eq(req.getPeopleNum() != null, VehVehicleApply::getPeopleNum, req.getPeopleNum());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(req.getPassengerPhone()), VehVehicleApply::getPassengerPhone, req.getPassengerPhone());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(req.getStartPlace()), VehVehicleApply::getStartPlace, req.getStartPlace());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(req.getEndPlace()), VehVehicleApply::getEndPlace, req.getEndPlace());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(req.getStatus()), VehVehicleApply::getStatus, req.getStatus());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增乘车申请
|
||||||
|
*
|
||||||
|
* @param req 乘车申请
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(VehVehicleApplyCreateReq req) {
|
||||||
|
VehVehicleApply apply = new VehVehicleApply();
|
||||||
|
BeanUtils.copyProperties(req, apply);
|
||||||
|
validEntityBeforeSave(apply);
|
||||||
|
VehVehicleTrip vehicleTrip = vehicleTripService.getById(req.getTripId());
|
||||||
|
if (vehicleTrip == null) {
|
||||||
|
throw new ServiceException("行程不存在", HttpStatus.NOT_FOUND);
|
||||||
|
}
|
||||||
|
boolean save = this.save(apply);
|
||||||
|
if (!save) {
|
||||||
|
throw new ServiceException("新增失败");
|
||||||
|
}
|
||||||
|
// 发送消息
|
||||||
|
CompletableFuture.runAsync(() -> {
|
||||||
|
Long createBy = vehicleTrip.getCreateBy();
|
||||||
|
String title = "有乘客申请乘车,请及时查看!";
|
||||||
|
try {
|
||||||
|
chatServerHandler.sendSystemMessageToUser(createBy, title, "4");
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("异步发送系统消息失败,用户ID: {}, 消息: {}", createBy, title, e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改乘车申请
|
||||||
|
*
|
||||||
|
* @param req 乘车申请
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(VehVehicleApplyUpdateReq req) {
|
||||||
|
// 获取旧数据
|
||||||
|
VehVehicleApply oldApply = this.getById(req.getId());
|
||||||
|
if (oldApply == null) {
|
||||||
|
throw new ServiceException("数据不存在", HttpStatus.NOT_FOUND);
|
||||||
|
}
|
||||||
|
VehVehicleApply apply = new VehVehicleApply();
|
||||||
|
BeanUtils.copyProperties(req, apply);
|
||||||
|
validEntityBeforeSave(apply);
|
||||||
|
return this.updateById(apply);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车主审核
|
||||||
|
*
|
||||||
|
* @param req 审核信息
|
||||||
|
* @return 是否审核成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean driverReview(VehVehicleApplyReviewReq req) {
|
||||||
|
Long id = req.getId();
|
||||||
|
String status = req.getStatus();
|
||||||
|
// 获取数据
|
||||||
|
VehVehicleApply apply = this.getById(id);
|
||||||
|
if (apply == null) {
|
||||||
|
throw new ServiceException("数据不存在", HttpStatus.NOT_FOUND);
|
||||||
|
}
|
||||||
|
String applyStatus = apply.getStatus();
|
||||||
|
if (Objects.equals(applyStatus, VehApplyStatusEnum.CANCELED.getValue())) {
|
||||||
|
throw new ServiceException("该申请已取消,无需审核", HttpStatus.BAD_REQUEST);
|
||||||
|
}
|
||||||
|
if (Objects.equals(applyStatus, VehApplyStatusEnum.ALREADY.getValue())
|
||||||
|
|| Objects.equals(applyStatus, VehApplyStatusEnum.ARRIVED.getValue())) {
|
||||||
|
throw new ServiceException("该申请已上车,无需审核", HttpStatus.BAD_REQUEST);
|
||||||
|
}
|
||||||
|
// 获取行程信息
|
||||||
|
VehVehicleTrip vehicleTrip = vehicleTripService.getById(apply.getTripId());
|
||||||
|
if (vehicleTrip == null) {
|
||||||
|
throw new ServiceException("行程不存在", HttpStatus.NOT_FOUND);
|
||||||
|
}
|
||||||
|
// 判断是否有审核权限
|
||||||
|
if (!Objects.equals(vehicleTrip.getCreateBy(), LoginHelper.getUserId())) {
|
||||||
|
throw new ServiceException("没有审核权限", HttpStatus.FORBIDDEN);
|
||||||
|
}
|
||||||
|
if (Objects.equals(status, VehApplyStatusEnum.CONFIRMED.getValue())) {
|
||||||
|
// 修改行程信息
|
||||||
|
int left = vehicleTrip.getLeftSeat() - apply.getPeopleNum();
|
||||||
|
if (left < 0) {
|
||||||
|
throw new ServiceException("座位不足", HttpStatus.BAD_REQUEST);
|
||||||
|
}
|
||||||
|
vehicleTrip.setLeftSeat(left);
|
||||||
|
boolean updateTrip = vehicleTripService.updateById(vehicleTrip);
|
||||||
|
if (!updateTrip) {
|
||||||
|
throw new ServiceException("行程信息更新失败", HttpStatus.ERROR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
apply.setStatus(status);
|
||||||
|
boolean updateApply = this.updateById(apply);
|
||||||
|
if (!updateApply) {
|
||||||
|
throw new ServiceException("行程信息更新失败", HttpStatus.ERROR);
|
||||||
|
}
|
||||||
|
// 通知申请人
|
||||||
|
CompletableFuture.runAsync(() -> {
|
||||||
|
Long createBy = apply.getCreateBy();
|
||||||
|
String title = Objects.equals(status, VehApplyStatusEnum.CONFIRMED.getValue()) ?
|
||||||
|
"您申请的行程已通过审核,请及时查看!" : "您申请的行程未通过审核,请及时查看!";
|
||||||
|
try {
|
||||||
|
chatServerHandler.sendSystemMessageToUser(createBy, title, "4");
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("异步发送系统消息失败,用户ID: {}, 消息: {}", createBy, title, e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改乘车状态
|
||||||
|
*
|
||||||
|
* @param req 修改乘车状态信息
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean changeStatus(VehVehicleApplyChangeStatusReq req) {
|
||||||
|
Long id = req.getId();
|
||||||
|
String status = req.getStatus();
|
||||||
|
// 获取数据
|
||||||
|
VehVehicleApply apply = this.getById(id);
|
||||||
|
if (apply == null) {
|
||||||
|
throw new ServiceException("数据不存在", HttpStatus.NOT_FOUND);
|
||||||
|
}
|
||||||
|
// 判断是否为申请人
|
||||||
|
if (!Objects.equals(apply.getCreateBy(), LoginHelper.getUserId())) {
|
||||||
|
throw new ServiceException("您没有权限修改该申请", HttpStatus.FORBIDDEN);
|
||||||
|
}
|
||||||
|
String applyStatus = apply.getStatus();
|
||||||
|
// 状态校验
|
||||||
|
if (Objects.equals(applyStatus, VehApplyStatusEnum.CANCELED.getValue())) {
|
||||||
|
throw new ServiceException("该申请已取消,无法修改", HttpStatus.BAD_REQUEST);
|
||||||
|
}
|
||||||
|
if (Objects.equals(applyStatus, VehApplyStatusEnum.APPLYING.getValue())) {
|
||||||
|
throw new ServiceException("该申请正在审核中,无法修改", HttpStatus.BAD_REQUEST);
|
||||||
|
}
|
||||||
|
if (Objects.equals(applyStatus, VehApplyStatusEnum.REJECTED.getValue())) {
|
||||||
|
throw new ServiceException("该申请已被拒绝,无法修改", HttpStatus.BAD_REQUEST);
|
||||||
|
}
|
||||||
|
if (Objects.equals(applyStatus, VehApplyStatusEnum.ARRIVED.getValue())
|
||||||
|
&& !Objects.equals(status, VehApplyStatusEnum.ALREADY.getValue())) {
|
||||||
|
throw new ServiceException("请先确认上车后再确认到达目的地", HttpStatus.BAD_REQUEST);
|
||||||
|
}
|
||||||
|
apply.setStatus(status);
|
||||||
|
boolean updateApply = this.updateById(apply);
|
||||||
|
if (!updateApply) {
|
||||||
|
throw new ServiceException("行程信息更新失败", HttpStatus.ERROR);
|
||||||
|
}
|
||||||
|
// 如果状态为已到达,则修改行程信息
|
||||||
|
if (Objects.equals(status, VehApplyStatusEnum.ALREADY.getValue())) {
|
||||||
|
VehVehicleTrip vehicleTrip = vehicleTripService.getById(apply.getTripId());
|
||||||
|
if (vehicleTrip == null) {
|
||||||
|
throw new ServiceException("行程不存在", HttpStatus.NOT_FOUND);
|
||||||
|
}
|
||||||
|
if (!Objects.equals(vehicleTrip.getTripStatus(), VehTripStatusEnum.COMPLETED.getValue())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
Integer leftSeat = vehicleTrip.getLeftSeat();
|
||||||
|
vehicleTrip.setLeftSeat(leftSeat + apply.getPeopleNum());
|
||||||
|
boolean updateTrip = vehicleTripService.updateById(vehicleTrip);
|
||||||
|
if (!updateTrip) {
|
||||||
|
throw new ServiceException("行程信息更新失败", HttpStatus.ERROR);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消申请
|
||||||
|
*
|
||||||
|
* @param req 取消申请信息
|
||||||
|
* @return 是否取消成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean cancelApply(VehVehicleApplyCancelReq req) {
|
||||||
|
Long id = req.getId();
|
||||||
|
VehVehicleApply apply = this.getById(id);
|
||||||
|
if (apply == null) {
|
||||||
|
throw new ServiceException("数据不存在", HttpStatus.NOT_FOUND);
|
||||||
|
}
|
||||||
|
// 判断是否为申请人
|
||||||
|
if (!Objects.equals(apply.getCreateBy(), LoginHelper.getUserId())) {
|
||||||
|
throw new ServiceException("您没有权限取消该申请", HttpStatus.FORBIDDEN);
|
||||||
|
}
|
||||||
|
String applyStatus = apply.getStatus();
|
||||||
|
// 状态校验
|
||||||
|
if (Objects.equals(applyStatus, VehApplyStatusEnum.CANCELED.getValue())) {
|
||||||
|
throw new ServiceException("该申请已取消,无需取消", HttpStatus.BAD_REQUEST);
|
||||||
|
}
|
||||||
|
if (Objects.equals(applyStatus, VehApplyStatusEnum.ARRIVED.getValue())) {
|
||||||
|
throw new ServiceException("该申请已到达目的地,无法取消", HttpStatus.BAD_REQUEST);
|
||||||
|
}
|
||||||
|
// 获取行程信息
|
||||||
|
VehVehicleTrip vehicleTrip = vehicleTripService.getById(apply.getTripId());
|
||||||
|
if (vehicleTrip == null) {
|
||||||
|
throw new ServiceException("行程不存在", HttpStatus.NOT_FOUND);
|
||||||
|
}
|
||||||
|
// 需要通知司机的状态
|
||||||
|
if (Objects.equals(applyStatus, VehApplyStatusEnum.CONFIRMED.getValue())
|
||||||
|
|| Objects.equals(applyStatus, VehApplyStatusEnum.ALREADY.getValue())
|
||||||
|
|| Objects.equals(applyStatus, VehApplyStatusEnum.APPLYING.getValue())) {
|
||||||
|
CompletableFuture.runAsync(() -> {
|
||||||
|
Long createBy = vehicleTrip.getCreateBy();
|
||||||
|
String title = "有乘客取消预约,请及时查看!";
|
||||||
|
try {
|
||||||
|
chatServerHandler.sendSystemMessageToUser(createBy, title, "4");
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("异步发送系统消息失败,用户ID: {}, 消息: {}", createBy, title, e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 如果已确认,减少乘车人数
|
||||||
|
if (Objects.equals(applyStatus, VehApplyStatusEnum.CONFIRMED.getValue())
|
||||||
|
|| Objects.equals(applyStatus, VehApplyStatusEnum.ALREADY.getValue())) {
|
||||||
|
Integer leftSeat = vehicleTrip.getLeftSeat();
|
||||||
|
vehicleTrip.setLeftSeat(leftSeat + apply.getPeopleNum());
|
||||||
|
boolean updateTrip = vehicleTripService.updateById(vehicleTrip);
|
||||||
|
if (!updateTrip) {
|
||||||
|
throw new ServiceException("行程信息更新失败", HttpStatus.ERROR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
apply.setStatus(VehApplyStatusEnum.CANCELED.getValue());
|
||||||
|
boolean updateApply = this.updateById(apply);
|
||||||
|
if (!updateApply) {
|
||||||
|
throw new ServiceException("行程信息更新失败", HttpStatus.ERROR);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(VehVehicleApply entity) {
|
||||||
|
//TODO 做一些数据校验,如唯一约束
|
||||||
|
String passengerPhone = entity.getPassengerPhone();
|
||||||
|
if (!PhoneUtil.isPhone(passengerPhone)) {
|
||||||
|
throw new ServiceException("手机号码格式不正确", HttpStatus.BAD_REQUEST);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除乘车申请信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if (isValid) {
|
||||||
|
List<VehVehicleApply> applyList = this.listByIds(ids);
|
||||||
|
for (VehVehicleApply apply : applyList) {
|
||||||
|
// 判断是否能删除
|
||||||
|
if (apply.getStatus().equals(VehApplyStatusEnum.CONFIRMED.getValue())
|
||||||
|
|| apply.getStatus().equals(VehApplyStatusEnum.ALREADY.getValue())) {
|
||||||
|
throw new ServiceException("该申请已确认,无法删除", HttpStatus.BAD_REQUEST);
|
||||||
|
}
|
||||||
|
// 判断是否为申请人
|
||||||
|
if (!Objects.equals(apply.getCreateBy(), LoginHelper.getUserId())) {
|
||||||
|
throw new ServiceException("您没有权限删除该申请", HttpStatus.FORBIDDEN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
@ -26,6 +27,7 @@ import java.util.Map;
|
|||||||
* @author lilemy
|
* @author lilemy
|
||||||
* @date 2025-10-25
|
* @date 2025-10-25
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Service
|
@Service
|
||||||
public class VehVehicleInfoServiceImpl extends ServiceImpl<VehVehicleInfoMapper, VehVehicleInfo>
|
public class VehVehicleInfoServiceImpl extends ServiceImpl<VehVehicleInfoMapper, VehVehicleInfo>
|
||||||
@ -38,7 +40,7 @@ public class VehVehicleInfoServiceImpl extends ServiceImpl<VehVehicleInfoMapper,
|
|||||||
* @return 车辆信息
|
* @return 车辆信息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public VehVehicleInfoVo queryById(Long id){
|
public VehVehicleInfoVo queryById(Long id) {
|
||||||
return baseMapper.selectVoById(id);
|
return baseMapper.selectVoById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -130,7 +132,7 @@ public class VehVehicleInfoServiceImpl extends ServiceImpl<VehVehicleInfoMapper,
|
|||||||
/**
|
/**
|
||||||
* 保存前的数据校验
|
* 保存前的数据校验
|
||||||
*/
|
*/
|
||||||
private void validEntityBeforeSave(VehVehicleInfo entity){
|
private void validEntityBeforeSave(VehVehicleInfo entity) {
|
||||||
//TODO 做一些数据校验,如唯一约束
|
//TODO 做一些数据校验,如唯一约束
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,7 +145,7 @@ public class VehVehicleInfoServiceImpl extends ServiceImpl<VehVehicleInfoMapper,
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
if(isValid){
|
if (isValid) {
|
||||||
//TODO 做一些业务上的校验,判断是否需要校验
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
}
|
}
|
||||||
return baseMapper.deleteByIds(ids) > 0;
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
|||||||
@ -0,0 +1,382 @@
|
|||||||
|
package org.dromara.vehicle.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.util.PhoneUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.dromara.common.core.constant.HttpStatus;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessTaskEvent;
|
||||||
|
import org.dromara.common.core.enums.BusinessStatusEnum;
|
||||||
|
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.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.satoken.utils.LoginHelper;
|
||||||
|
import org.dromara.system.domain.vo.SysUserVo;
|
||||||
|
import org.dromara.system.service.ISysUserService;
|
||||||
|
import org.dromara.vehicle.domain.VehVehicleApply;
|
||||||
|
import org.dromara.vehicle.domain.VehVehicleInfo;
|
||||||
|
import org.dromara.vehicle.domain.VehVehicleTrip;
|
||||||
|
import org.dromara.vehicle.domain.dto.vehicletrip.VehVehicleTripCancelReq;
|
||||||
|
import org.dromara.vehicle.domain.dto.vehicletrip.VehVehicleTripCreateReq;
|
||||||
|
import org.dromara.vehicle.domain.dto.vehicletrip.VehVehicleTripQueryReq;
|
||||||
|
import org.dromara.vehicle.domain.dto.vehicletrip.VehVehicleTripUpdateReq;
|
||||||
|
import org.dromara.vehicle.domain.enums.VehApplyStatusEnum;
|
||||||
|
import org.dromara.vehicle.domain.enums.VehTripStatusEnum;
|
||||||
|
import org.dromara.vehicle.domain.enums.VehVehicleInfoStatusEnum;
|
||||||
|
import org.dromara.vehicle.domain.vo.VehVehicleTripVo;
|
||||||
|
import org.dromara.vehicle.mapper.VehVehicleTripMapper;
|
||||||
|
import org.dromara.vehicle.service.IVehVehicleApplyService;
|
||||||
|
import org.dromara.vehicle.service.IVehVehicleInfoService;
|
||||||
|
import org.dromara.vehicle.service.IVehVehicleTripService;
|
||||||
|
import org.dromara.websocket.ChatServerHandler;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
|
import org.springframework.context.event.EventListener;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆出行记录Service业务层处理
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-10-25
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class VehVehicleTripServiceImpl extends ServiceImpl<VehVehicleTripMapper, VehVehicleTrip>
|
||||||
|
implements IVehVehicleTripService {
|
||||||
|
|
||||||
|
@Lazy
|
||||||
|
@Resource
|
||||||
|
private IVehVehicleInfoService vehicleInfoService;
|
||||||
|
|
||||||
|
@Lazy
|
||||||
|
@Resource
|
||||||
|
private IVehVehicleApplyService vehicleApplyService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ISysUserService userService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ChatServerHandler chatServerHandler;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询车辆出行记录
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 车辆出行记录
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public VehVehicleTripVo queryById(Long id) {
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询车辆出行记录列表
|
||||||
|
*
|
||||||
|
* @param req 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 车辆出行记录分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<VehVehicleTripVo> queryPageList(VehVehicleTripQueryReq req, PageQuery pageQuery) {
|
||||||
|
Page<VehVehicleTripVo> result;
|
||||||
|
if (StringUtils.isNotBlank(req.getEndLat()) && StringUtils.isNotBlank(req.getEndLng())
|
||||||
|
&& ObjectUtils.isNotNull(req.getEndLat()) && ObjectUtils.isNotNull(req.getEndLng())) {
|
||||||
|
result = baseMapper.selectVehicleTripPage(pageQuery.build(), req);
|
||||||
|
} else {
|
||||||
|
result = baseMapper.selectVoPage(pageQuery.build(), buildQueryWrapper(req));
|
||||||
|
}
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的车辆出行记录列表
|
||||||
|
*
|
||||||
|
* @param req 查询条件
|
||||||
|
* @return 车辆出行记录列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<VehVehicleTripVo> queryList(VehVehicleTripQueryReq req) {
|
||||||
|
LambdaQueryWrapper<VehVehicleTrip> lqw = buildQueryWrapper(req);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<VehVehicleTrip> buildQueryWrapper(VehVehicleTripQueryReq req) {
|
||||||
|
LambdaQueryWrapper<VehVehicleTrip> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.eq(req.getProjectId() != null, VehVehicleTrip::getProjectId, req.getProjectId());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(req.getEndPlace()), VehVehicleTrip::getEndPlace, req.getEndPlace());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(req.getEndLat()), VehVehicleTrip::getEndLat, req.getEndLat());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(req.getEndLng()), VehVehicleTrip::getEndLng, req.getEndLng());
|
||||||
|
lqw.eq(req.getStartTime() != null, VehVehicleTrip::getStartTime, req.getStartTime());
|
||||||
|
lqw.eq(req.getPeopleNum() != null, VehVehicleTrip::getPeopleNum, req.getPeopleNum());
|
||||||
|
lqw.eq(req.getReviewStatus() != null, VehVehicleTrip::getReviewStatus, req.getReviewStatus());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增车辆出行记录
|
||||||
|
*
|
||||||
|
* @param req 车辆出行记录
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(VehVehicleTripCreateReq req) {
|
||||||
|
VehVehicleTrip trip = new VehVehicleTrip();
|
||||||
|
BeanUtils.copyProperties(req, trip);
|
||||||
|
validEntityBeforeSave(trip);
|
||||||
|
// 判断车辆是否被占用
|
||||||
|
Long vehicleId = trip.getVehicleId();
|
||||||
|
if (vehicleId != null) {
|
||||||
|
synchronized (vehicleId.toString()) {
|
||||||
|
// 获取车辆信息
|
||||||
|
VehVehicleInfo vehicle = vehicleInfoService.getById(vehicleId);
|
||||||
|
if (vehicle == null) {
|
||||||
|
throw new ServiceException("车辆不存在", HttpStatus.NOT_FOUND);
|
||||||
|
}
|
||||||
|
if (!vehicle.getVehicleStatus().equals(VehVehicleInfoStatusEnum.AVAILABLE.getValue())) {
|
||||||
|
throw new ServiceException("车辆已被占用", HttpStatus.BAD_REQUEST);
|
||||||
|
}
|
||||||
|
// 修改车辆状态
|
||||||
|
vehicle.setVehicleStatus(VehVehicleInfoStatusEnum.IN_USE.getValue());
|
||||||
|
boolean update = vehicleInfoService.updateById(vehicle);
|
||||||
|
if (!update) {
|
||||||
|
throw new ServiceException("修改车辆状态失败");
|
||||||
|
}
|
||||||
|
trip.setPlateNumber(vehicle.getPlateNumber());
|
||||||
|
return this.save(trip);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return this.save(trip);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改车辆出行记录
|
||||||
|
*
|
||||||
|
* @param req 车辆出行记录
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(VehVehicleTripUpdateReq req) {
|
||||||
|
// 获取旧数据
|
||||||
|
VehVehicleTrip oldEntity = this.getById(req.getId());
|
||||||
|
if (oldEntity == null) {
|
||||||
|
throw new ServiceException("数据不存在", HttpStatus.NOT_FOUND);
|
||||||
|
}
|
||||||
|
if (ObjectUtils.isNotEmpty(req.getVehicleId()) && !Objects.equals(req.getVehicleId(), oldEntity.getVehicleId())) {
|
||||||
|
// 车辆id不一致,需要判断车辆是否被占用
|
||||||
|
VehVehicleInfo vehicle = vehicleInfoService.getById(req.getVehicleId());
|
||||||
|
if (vehicle == null) {
|
||||||
|
throw new ServiceException("车辆不存在", HttpStatus.NOT_FOUND);
|
||||||
|
}
|
||||||
|
if (!vehicle.getVehicleStatus().equals(VehVehicleInfoStatusEnum.AVAILABLE.getValue())) {
|
||||||
|
throw new ServiceException("当前车辆无法使用", HttpStatus.CONFLICT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
VehVehicleTrip trip = new VehVehicleTrip();
|
||||||
|
BeanUtils.copyProperties(req, trip);
|
||||||
|
validEntityBeforeSave(trip);
|
||||||
|
return this.updateById(trip);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消车辆出行记录
|
||||||
|
*
|
||||||
|
* @param req 车辆出行记录
|
||||||
|
* @return 是否取消成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean cancel(VehVehicleTripCancelReq req) {
|
||||||
|
// 数据校验
|
||||||
|
VehVehicleTrip trip = this.getById(req.getId());
|
||||||
|
if (trip == null) {
|
||||||
|
throw new ServiceException("车辆出行记录不存在", HttpStatus.NOT_FOUND);
|
||||||
|
}
|
||||||
|
if (trip.getTripStatus().equals(VehTripStatusEnum.CANCELED.getValue())) {
|
||||||
|
throw new ServiceException("该记录已取消", HttpStatus.BAD_REQUEST);
|
||||||
|
}
|
||||||
|
// 权限校验
|
||||||
|
Long userId = LoginHelper.getUserId();
|
||||||
|
if (!LoginHelper.isSuperAdmin() && !userId.equals(trip.getCreateBy())) {
|
||||||
|
throw new ServiceException("没有权限取消该记录", HttpStatus.FORBIDDEN);
|
||||||
|
}
|
||||||
|
// 设置取消状态
|
||||||
|
trip.setTripStatus(VehTripStatusEnum.CANCELED.getValue());
|
||||||
|
// 通知已预约用户
|
||||||
|
List<VehVehicleApply> applyList = vehicleApplyService.lambdaQuery()
|
||||||
|
.eq(VehVehicleApply::getTripId, trip.getId())
|
||||||
|
.list();
|
||||||
|
if (CollUtil.isNotEmpty(applyList)) {
|
||||||
|
// 通知
|
||||||
|
for (VehVehicleApply apply : applyList) {
|
||||||
|
CompletableFuture.runAsync(() -> {
|
||||||
|
Long createBy = apply.getCreateBy();
|
||||||
|
String title = "司机已取消您预约的行程,请及时查看!";
|
||||||
|
try {
|
||||||
|
chatServerHandler.sendSystemMessageToUser(createBy, title, "4");
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("异步发送系统消息失败,用户ID: {}, 消息: {}", createBy, title, e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 修改申请状态
|
||||||
|
applyList.forEach(apply -> apply.setStatus(VehApplyStatusEnum.CANCELED.getValue()));
|
||||||
|
boolean updateApply = vehicleApplyService.updateBatchById(applyList);
|
||||||
|
if (!updateApply) {
|
||||||
|
throw new ServiceException("修改申请状态失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 更新数据
|
||||||
|
boolean update = this.updateById(trip);
|
||||||
|
if (!update) {
|
||||||
|
throw new ServiceException("修改车辆出行记录失败");
|
||||||
|
}
|
||||||
|
// 释放车辆
|
||||||
|
if (trip.getVehicleId() != null) {
|
||||||
|
VehVehicleInfo vehicle = vehicleInfoService.getById(trip.getVehicleId());
|
||||||
|
if (vehicle != null) {
|
||||||
|
vehicle.setVehicleStatus(VehVehicleInfoStatusEnum.AVAILABLE.getValue());
|
||||||
|
boolean updateVehicle = vehicleInfoService.updateById(vehicle);
|
||||||
|
if (!updateVehicle) {
|
||||||
|
throw new ServiceException("修改车辆状态失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(VehVehicleTrip entity) {
|
||||||
|
Long vehicleId = entity.getVehicleId();
|
||||||
|
String plateNumber = entity.getPlateNumber();
|
||||||
|
String passengerPhone = entity.getPassengerPhone();
|
||||||
|
if (vehicleId == null && StringUtils.isBlank(plateNumber)) {
|
||||||
|
throw new ServiceException("车辆不能为空");
|
||||||
|
}
|
||||||
|
// 如果手机号为空,则使用用户手机号
|
||||||
|
if (StringUtils.isBlank(passengerPhone)) {
|
||||||
|
Long userId = LoginHelper.getUserId();
|
||||||
|
SysUserVo userVo = userService.selectUserById(userId);
|
||||||
|
passengerPhone = userVo.getPhonenumber();
|
||||||
|
}
|
||||||
|
if (!PhoneUtil.isPhone(passengerPhone)) {
|
||||||
|
throw new ServiceException("手机号格式错误", HttpStatus.BAD_REQUEST);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除车辆出行记录信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
// 获取数据列表
|
||||||
|
List<VehVehicleTrip> list = this.listByIds(ids);
|
||||||
|
if (isValid) {
|
||||||
|
// 获取登录用户
|
||||||
|
Long userId = LoginHelper.getUserId();
|
||||||
|
Set<Long> userIds = list.stream().map(VehVehicleTrip::getCreateBy).collect(Collectors.toSet());
|
||||||
|
if (!userIds.contains(userId)) {
|
||||||
|
throw new ServiceException("没有权限删除该记录", HttpStatus.FORBIDDEN);
|
||||||
|
}
|
||||||
|
// 获取出现状态
|
||||||
|
for (VehVehicleTrip trip : list) {
|
||||||
|
if (!trip.getTripStatus().equals(VehTripStatusEnum.CANCELED.getValue())
|
||||||
|
|| !trip.getTripStatus().equals(VehTripStatusEnum.READY_DEPART.getValue())) {
|
||||||
|
throw new ServiceException("该记录已开始,不能删除", HttpStatus.BAD_REQUEST);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 同步删除用户申请记录
|
||||||
|
List<VehVehicleApply> applyList = vehicleApplyService.lambdaQuery()
|
||||||
|
.in(VehVehicleApply::getTripId, ids)
|
||||||
|
.list();
|
||||||
|
if (CollUtil.isNotEmpty(applyList)) {
|
||||||
|
boolean deleteApply = vehicleApplyService.removeByIds(applyList);
|
||||||
|
if (!deleteApply) {
|
||||||
|
throw new ServiceException("删除用户申请记录失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this.removeBatchByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等)
|
||||||
|
* 正常使用只需#processEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processEvent.flowCode.endsWith('vehVehicleTrip')")
|
||||||
|
@Transactional
|
||||||
|
public void processPlansHandler(ProcessEvent processEvent) {
|
||||||
|
log.info("车辆出行审核任务执行了{}", processEvent.toString());
|
||||||
|
String id = processEvent.getBusinessId();
|
||||||
|
VehVehicleTrip vehicleTrip = this.getById(Long.valueOf(id));
|
||||||
|
if (vehicleTrip == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
vehicleTrip.setReviewStatus(processEvent.getStatus());
|
||||||
|
this.updateById(vehicleTrip);
|
||||||
|
if (processEvent.getStatus().equals(BusinessStatusEnum.FINISH.getStatus())
|
||||||
|
|| processEvent.getStatus().equals(BusinessStatusEnum.TERMINATION.getStatus())
|
||||||
|
|| processEvent.getStatus().equals(BusinessStatusEnum.INVALID.getStatus())
|
||||||
|
|| processEvent.getStatus().equals(BusinessStatusEnum.CANCEL.getStatus())) {
|
||||||
|
// 获取车辆申请列表
|
||||||
|
VehVehicleInfo vehicleInfo = new VehVehicleInfo();
|
||||||
|
vehicleInfo.setId(vehicleTrip.getVehicleId());
|
||||||
|
vehicleInfo.setVehicleStatus(VehVehicleInfoStatusEnum.AVAILABLE.getValue());
|
||||||
|
vehicleInfoService.updateById(vehicleInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行任务创建监听
|
||||||
|
* 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断
|
||||||
|
* 在方法中判断流程节点key
|
||||||
|
* if ("xxx".equals(processTaskEvent.getNodeCode())) {
|
||||||
|
* //执行业务逻辑
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* @param processTaskEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processTaskEvent.flowCode.endsWith('vehVehicleTrip')")
|
||||||
|
public void processTaskPlansHandler(ProcessTaskEvent processTaskEvent) {
|
||||||
|
log.info("车辆出行审核任务创建了{}", processTaskEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监听删除流程事件
|
||||||
|
* 正常使用只需#processDeleteEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processDeleteEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('vehVehicleTrip')")
|
||||||
|
public void processDeletePlansHandler(ProcessDeleteEvent processDeleteEvent) {
|
||||||
|
log.info("车辆出行审核删除流程任务执行了{}", processDeleteEvent.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -12,7 +12,6 @@ import io.netty.handler.codec.http.websocketx.TextWebSocketFrame;
|
|||||||
import io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler;
|
import io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler;
|
||||||
import io.netty.util.concurrent.GlobalEventExecutor;
|
import io.netty.util.concurrent.GlobalEventExecutor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.dromara.common.core.domain.dto.UserDTO;
|
|
||||||
import org.dromara.common.core.domain.model.LoginUser;
|
import org.dromara.common.core.domain.model.LoginUser;
|
||||||
import org.dromara.common.satoken.utils.LoginHelper;
|
import org.dromara.common.satoken.utils.LoginHelper;
|
||||||
import org.dromara.system.domain.vo.SysOssVo;
|
import org.dromara.system.domain.vo.SysOssVo;
|
||||||
@ -44,20 +43,24 @@ public class ChatServerHandler extends SimpleChannelInboundHandler<TextWebSocket
|
|||||||
private static ChatGroupServiceImpl chatGroupService;
|
private static ChatGroupServiceImpl chatGroupService;
|
||||||
private static SysUserServiceImpl sysUserService;
|
private static SysUserServiceImpl sysUserService;
|
||||||
private static SysOssServiceImpl sysOssService;
|
private static SysOssServiceImpl sysOssService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public void setChatHistoryService(ChatHistoryServiceImpl service) {
|
public void setChatHistoryService(ChatHistoryServiceImpl service) {
|
||||||
chatHistoryService = service;
|
chatHistoryService = service;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public void setChatGroupService(ChatGroupServiceImpl service){
|
public void setChatGroupService(ChatGroupServiceImpl service) {
|
||||||
chatGroupService = service;
|
chatGroupService = service;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public void setSysUserService(SysUserServiceImpl service){
|
public void setSysUserService(SysUserServiceImpl service) {
|
||||||
sysUserService = service;
|
sysUserService = service;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public void setSysOssService(SysOssServiceImpl service){
|
public void setSysOssService(SysOssServiceImpl service) {
|
||||||
sysOssService = service;
|
sysOssService = service;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,7 +75,8 @@ public class ChatServerHandler extends SimpleChannelInboundHandler<TextWebSocket
|
|||||||
private static final ConcurrentHashMap<String, Integer> userRoomCountMap = new ConcurrentHashMap<>();
|
private static final ConcurrentHashMap<String, Integer> userRoomCountMap = new ConcurrentHashMap<>();
|
||||||
//维护一个在线用户列表
|
//维护一个在线用户列表
|
||||||
private static final List<String> onlineUserList = new ArrayList<>();
|
private static final List<String> onlineUserList = new ArrayList<>();
|
||||||
public static List<String> getOnlineUserList(){
|
|
||||||
|
public static List<String> getOnlineUserList() {
|
||||||
return onlineUserList;
|
return onlineUserList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,13 +103,13 @@ public class ChatServerHandler extends SimpleChannelInboundHandler<TextWebSocket
|
|||||||
|
|
||||||
//建立双向映射关系
|
//建立双向映射关系
|
||||||
LoginUser loginUser = LoginHelper.getLoginUser(token.replace("Bearer%20", ""));
|
LoginUser loginUser = LoginHelper.getLoginUser(token.replace("Bearer%20", ""));
|
||||||
if (loginUser == null){
|
if (loginUser == null) {
|
||||||
throw new RuntimeException("token获取信息失败");
|
throw new RuntimeException("token获取信息失败");
|
||||||
}
|
}
|
||||||
//判断是否存在该账号的通道实例列表
|
//判断是否存在该账号的通道实例列表
|
||||||
userChannelMap.computeIfAbsent(loginUser.getUserId().toString(), k -> new ArrayList<>());
|
userChannelMap.computeIfAbsent(loginUser.getUserId().toString(), k -> new ArrayList<>());
|
||||||
List<ChannelHandlerContext> channelHandlerContexts = userChannelMap.get(loginUser.getUserId().toString());
|
List<ChannelHandlerContext> channelHandlerContexts = userChannelMap.get(loginUser.getUserId().toString());
|
||||||
if (!channelHandlerContexts.contains( ctx)){
|
if (!channelHandlerContexts.contains(ctx)) {
|
||||||
channelHandlerContexts.add(ctx);
|
channelHandlerContexts.add(ctx);
|
||||||
}
|
}
|
||||||
//把该账号的通道实例列表跟账号id关联 一个账号有多个通道实例
|
//把该账号的通道实例列表跟账号id关联 一个账号有多个通道实例
|
||||||
@ -131,7 +135,7 @@ public class ChatServerHandler extends SimpleChannelInboundHandler<TextWebSocket
|
|||||||
|
|
||||||
//构建各个聊天房间未读 数量
|
//构建各个聊天房间未读 数量
|
||||||
LambdaQueryWrapper<ChatGroup> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ChatGroup> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.like(ChatGroup::getMembers, loginUser.getUserId()+",").or().like(ChatGroup::getMembers,loginUser.getUserId()+"]");
|
queryWrapper.like(ChatGroup::getMembers, loginUser.getUserId() + ",").or().like(ChatGroup::getMembers, loginUser.getUserId() + "]");
|
||||||
//拿到该用户所参与的房间列表
|
//拿到该用户所参与的房间列表
|
||||||
List<ChatGroup> chatGroups = chatGroupService.list(queryWrapper);
|
List<ChatGroup> chatGroups = chatGroupService.list(queryWrapper);
|
||||||
boolean isHaveSystemRoom = false;
|
boolean isHaveSystemRoom = false;
|
||||||
@ -150,12 +154,12 @@ public class ChatServerHandler extends SimpleChannelInboundHandler<TextWebSocket
|
|||||||
historyLambdaQueryWrapper.eq(ChatHistory::getIsRead, "1");
|
historyLambdaQueryWrapper.eq(ChatHistory::getIsRead, "1");
|
||||||
List<ChatHistory> list = chatHistoryService.list(historyLambdaQueryWrapper);
|
List<ChatHistory> list = chatHistoryService.list(historyLambdaQueryWrapper);
|
||||||
if (list != null && !list.isEmpty()) {
|
if (list != null && !list.isEmpty()) {
|
||||||
roomCounts.put(loginUser.getUserId()+"+"+chatGroup.getId().toString(), list.size());
|
roomCounts.put(loginUser.getUserId() + "+" + chatGroup.getId().toString(), list.size());
|
||||||
//连接后同步未读消息到内存中
|
//连接后同步未读消息到内存中
|
||||||
userRoomCountMap.put(loginUser.getUserId()+"+"+chatGroup.getId().toString(), list.size());
|
userRoomCountMap.put(loginUser.getUserId() + "+" + chatGroup.getId().toString(), list.size());
|
||||||
}
|
}
|
||||||
//在遍历的同时寻找是否有系统消息房间
|
//在遍历的同时寻找是否有系统消息房间
|
||||||
if (!isHaveSystemRoom && chatGroup.getMembers().contains("["+ ChatRoomEnum.SYSTEM.getRoomId())){
|
if (!isHaveSystemRoom && chatGroup.getMembers().contains("[" + ChatRoomEnum.SYSTEM.getRoomId())) {
|
||||||
isHaveSystemRoom = true;
|
isHaveSystemRoom = true;
|
||||||
}
|
}
|
||||||
// if (!isHaveAttendanceRoom && chatGroup.getMembers().contains("["+ChatRoomEnum.ATTENDANCE.getRoomId())){
|
// if (!isHaveAttendanceRoom && chatGroup.getMembers().contains("["+ChatRoomEnum.ATTENDANCE.getRoomId())){
|
||||||
@ -170,18 +174,18 @@ public class ChatServerHandler extends SimpleChannelInboundHandler<TextWebSocket
|
|||||||
}
|
}
|
||||||
JSONObject message = new JSONObject();
|
JSONObject message = new JSONObject();
|
||||||
message.put("type", "3");
|
message.put("type", "3");
|
||||||
message.put("messageType","txt");
|
message.put("messageType", "txt");
|
||||||
message.put("unReadCount", roomCounts);
|
message.put("unReadCount", roomCounts);
|
||||||
log.info("发送所有未读消息:{}",message);
|
log.info("发送所有未读消息:{}", message);
|
||||||
if(message.get("unReadCount") != null && !roomCounts.isEmpty()) {
|
if (message.get("unReadCount") != null && !roomCounts.isEmpty()) {
|
||||||
sendMessage(ctx, message.toJSONString());
|
sendMessage(ctx, message.toJSONString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//认证完成后开始构建系统消息房间 判断是否有系统消息房间 没有则增加
|
//认证完成后开始构建系统消息房间 判断是否有系统消息房间 没有则增加
|
||||||
if (!isHaveSystemRoom){
|
if (!isHaveSystemRoom) {
|
||||||
ChatGroup chatGroup = new ChatGroup();
|
ChatGroup chatGroup = new ChatGroup();
|
||||||
chatGroup.setType(String.valueOf(2));
|
chatGroup.setType(String.valueOf(2));
|
||||||
chatGroup.setMembers("["+ChatRoomEnum.SYSTEM.getRoomId()+", " + loginUser.getUserId()+"]");
|
chatGroup.setMembers("[" + ChatRoomEnum.SYSTEM.getRoomId() + ", " + loginUser.getUserId() + "]");
|
||||||
chatGroupService.save(chatGroup);
|
chatGroupService.save(chatGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -310,9 +314,9 @@ public class ChatServerHandler extends SimpleChannelInboundHandler<TextWebSocket
|
|||||||
//来自哪个用户
|
//来自哪个用户
|
||||||
jsonObject.put("from", sysUserVo.getUserId().toString());
|
jsonObject.put("from", sysUserVo.getUserId().toString());
|
||||||
jsonObject.put("nickName", sysUserVo.getNickName());
|
jsonObject.put("nickName", sysUserVo.getNickName());
|
||||||
if(sysUserVo.getAvatar() != null){
|
if (sysUserVo.getAvatar() != null) {
|
||||||
SysOssVo byId = sysOssService.getById(sysUserVo.getAvatar());
|
SysOssVo byId = sysOssService.getById(sysUserVo.getAvatar());
|
||||||
if(byId != null){
|
if (byId != null) {
|
||||||
jsonObject.put("avatar", byId.getUrl());
|
jsonObject.put("avatar", byId.getUrl());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -329,7 +333,7 @@ public class ChatServerHandler extends SimpleChannelInboundHandler<TextWebSocket
|
|||||||
//只要发送一条数据,就要给接收方推送所有未读消息
|
//只要发送一条数据,就要给接收方推送所有未读消息
|
||||||
if (!userRoomCountMap.containsKey(id + "+" + RoomId)) {
|
if (!userRoomCountMap.containsKey(id + "+" + RoomId)) {
|
||||||
userRoomCountMap.put(id + "+" + RoomId, 1);
|
userRoomCountMap.put(id + "+" + RoomId, 1);
|
||||||
}else {
|
} else {
|
||||||
userRoomCountMap.put(id + "+" + RoomId, userRoomCountMap.get(id + "+" + RoomId) + 1);
|
userRoomCountMap.put(id + "+" + RoomId, userRoomCountMap.get(id + "+" + RoomId) + 1);
|
||||||
}
|
}
|
||||||
//发送消息完成后添加聊天记录
|
//发送消息完成后添加聊天记录
|
||||||
@ -340,7 +344,7 @@ public class ChatServerHandler extends SimpleChannelInboundHandler<TextWebSocket
|
|||||||
chatHistory.setIsRead("1");
|
chatHistory.setIsRead("1");
|
||||||
chatHistory.setMessageType(jsonObject.get("messageType").toString());
|
chatHistory.setMessageType(jsonObject.get("messageType").toString());
|
||||||
|
|
||||||
if (!jsonObject.get("messageType").equals("txt")){
|
if (!jsonObject.get("messageType").equals("txt")) {
|
||||||
|
|
||||||
//将携带base64转为文件然后进行存储 赋值url
|
//将携带base64转为文件然后进行存储 赋值url
|
||||||
String base64Data = jsonObject.get("message").toString();
|
String base64Data = jsonObject.get("message").toString();
|
||||||
@ -352,7 +356,7 @@ public class ChatServerHandler extends SimpleChannelInboundHandler<TextWebSocket
|
|||||||
byte[] fileBytes = Base64.getDecoder().decode(base64Data);
|
byte[] fileBytes = Base64.getDecoder().decode(base64Data);
|
||||||
|
|
||||||
// 创建临时文件
|
// 创建临时文件
|
||||||
File tempFile = File.createTempFile("", jsonObject.get("fileName").toString());
|
File tempFile = File.createTempFile("", jsonObject.get("fileName").toString());
|
||||||
tempFile.deleteOnExit();
|
tempFile.deleteOnExit();
|
||||||
|
|
||||||
// 写入文件
|
// 写入文件
|
||||||
@ -390,37 +394,37 @@ public class ChatServerHandler extends SimpleChannelInboundHandler<TextWebSocket
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}else if ("1".equals(type)){
|
} else if ("1".equals(type)) {
|
||||||
log.info("收到客户端确认消息:{}", jsonObject);
|
log.info("收到客户端确认消息:{}", jsonObject);
|
||||||
//前端接收方收到消息返回1 说明此时处于聊天框内 可以清空该房间的所有未读消息 将此房间聊天记录全部已读
|
//前端接收方收到消息返回1 说明此时处于聊天框内 可以清空该房间的所有未读消息 将此房间聊天记录全部已读
|
||||||
//现在是用户发送消息 ctx为接收方用户
|
//现在是用户发送消息 ctx为接收方用户
|
||||||
LambdaQueryWrapper<ChatHistory> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ChatHistory> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
lambdaQueryWrapper
|
lambdaQueryWrapper
|
||||||
.ne(ChatHistory::getSenderId,sysUserVo.getUserId().toString())
|
.ne(ChatHistory::getSenderId, sysUserVo.getUserId().toString())
|
||||||
.eq(ChatHistory::getGeterId,jsonObject.get("roomId"))
|
.eq(ChatHistory::getGeterId, jsonObject.get("roomId"))
|
||||||
.eq(ChatHistory::getIsRead,"1");
|
.eq(ChatHistory::getIsRead, "1");
|
||||||
List<ChatHistory> list = chatHistoryService.list(lambdaQueryWrapper);
|
List<ChatHistory> list = chatHistoryService.list(lambdaQueryWrapper);
|
||||||
if (list != null && !list.isEmpty()){
|
if (list != null && !list.isEmpty()) {
|
||||||
for (ChatHistory chatHistory : list) {
|
for (ChatHistory chatHistory : list) {
|
||||||
chatHistory.setIsRead("0");
|
chatHistory.setIsRead("0");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
chatHistoryService.updateBatchById( list);
|
chatHistoryService.updateBatchById(list);
|
||||||
|
|
||||||
//将该房间未读消息 清空
|
//将该房间未读消息 清空
|
||||||
userRoomCountMap.put(sysUserVo.getUserId() + "+" + jsonObject.get("roomId"), 0);
|
userRoomCountMap.put(sysUserVo.getUserId() + "+" + jsonObject.get("roomId"), 0);
|
||||||
//清空过后返回其余房间未读消息
|
//清空过后返回其余房间未读消息
|
||||||
HashMap<String,Object> temp = new HashMap<>();
|
HashMap<String, Object> temp = new HashMap<>();
|
||||||
userRoomCountMap.forEachKey(0,key ->{
|
userRoomCountMap.forEachKey(0, key -> {
|
||||||
if (key.contains(sysUserVo.getUserId().toString())){
|
if (key.contains(sysUserVo.getUserId().toString())) {
|
||||||
temp.put(key,userRoomCountMap.get(key));
|
temp.put(key, userRoomCountMap.get(key));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//构建消息
|
//构建消息
|
||||||
JSONObject message = new JSONObject();
|
JSONObject message = new JSONObject();
|
||||||
message.put("type", "1");
|
message.put("type", "1");
|
||||||
message.put("unReadCount", temp);
|
message.put("unReadCount", temp);
|
||||||
message.put("messageType","txt");
|
message.put("messageType", "txt");
|
||||||
//发送
|
//发送
|
||||||
sendMessage(ctx, message.toString());
|
sendMessage(ctx, message.toString());
|
||||||
}
|
}
|
||||||
@ -435,21 +439,21 @@ public class ChatServerHandler extends SimpleChannelInboundHandler<TextWebSocket
|
|||||||
}
|
}
|
||||||
|
|
||||||
//给固定的人发消息
|
//给固定的人发消息
|
||||||
private void sendMessage(ChannelHandlerContext ctx,String message) {
|
private void sendMessage(ChannelHandlerContext ctx, String message) {
|
||||||
|
|
||||||
ctx.channel().writeAndFlush(new TextWebSocketFrame(message));
|
ctx.channel().writeAndFlush(new TextWebSocketFrame(message));
|
||||||
}
|
}
|
||||||
|
|
||||||
//发送群消息,此时其他客户端也能收到群消息
|
//发送群消息,此时其他客户端也能收到群消息
|
||||||
private void sendAllMessage(){
|
private void sendAllMessage() {
|
||||||
String message = "我是服务器,这里发送的是群消息";
|
String message = "我是服务器,这里发送的是群消息";
|
||||||
channelGroup.writeAndFlush( new TextWebSocketFrame(message));
|
channelGroup.writeAndFlush(new TextWebSocketFrame(message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//通过userId进行发送消息
|
//通过userId进行发送消息
|
||||||
@Transactional
|
@Transactional
|
||||||
public void sendSystemMessageToUser(Long userId, String message,String value){
|
public void sendSystemMessageToUser(Long userId, String message, String value) {
|
||||||
// /现在已用type:0 1 3 (暂定为0)
|
// /现在已用type:0 1 3 (暂定为0)
|
||||||
// {
|
// {
|
||||||
// "type":"4",
|
// "type":"4",
|
||||||
@ -465,94 +469,116 @@ public class ChatServerHandler extends SimpleChannelInboundHandler<TextWebSocket
|
|||||||
ChatGroup groupServiceOne = null;
|
ChatGroup groupServiceOne = null;
|
||||||
ChatHistory chatHistory = null;
|
ChatHistory chatHistory = null;
|
||||||
|
|
||||||
switch (value){
|
switch (value) {
|
||||||
//1:系统消息
|
//1:系统消息
|
||||||
case "0" ->{
|
case "0" -> {
|
||||||
//生成系统消息的聊天记录
|
//生成系统消息的聊天记录
|
||||||
lambdaQueryWrapper.eq(ChatGroup::getMembers,"["+ChatRoomEnum.SYSTEM.getRoomId()+", "+userId+"]");
|
lambdaQueryWrapper.eq(ChatGroup::getMembers, "[" + ChatRoomEnum.SYSTEM.getRoomId() + ", " + userId + "]");
|
||||||
groupServiceOne = chatGroupService.getOne(lambdaQueryWrapper);
|
groupServiceOne = chatGroupService.getOne(lambdaQueryWrapper);
|
||||||
//如果给成员发送系统消息 而该成员还没有建立过连接从而没有群聊房间 则创建该成员系统消息房间
|
//如果给成员发送系统消息 而该成员还没有建立过连接从而没有群聊房间 则创建该成员系统消息房间
|
||||||
if (groupServiceOne == null){
|
if (groupServiceOne == null) {
|
||||||
groupServiceOne = new ChatGroup();
|
groupServiceOne = new ChatGroup();
|
||||||
groupServiceOne.setType(String.valueOf(2));
|
groupServiceOne.setType(String.valueOf(2));
|
||||||
groupServiceOne.setMembers("["+ChatRoomEnum.SYSTEM.getRoomId()+", "+userId+"]");
|
groupServiceOne.setMembers("[" + ChatRoomEnum.SYSTEM.getRoomId() + ", " + userId + "]");
|
||||||
groupServiceOne.setLastMessage(message);
|
groupServiceOne.setLastMessage(message);
|
||||||
groupServiceOne.setLastMessageTime(new Date());
|
groupServiceOne.setLastMessageTime(new Date());
|
||||||
}else {
|
} else {
|
||||||
groupServiceOne.setLastMessage(message);
|
groupServiceOne.setLastMessage(message);
|
||||||
groupServiceOne.setLastMessageTime(new Date());
|
groupServiceOne.setLastMessageTime(new Date());
|
||||||
}
|
}
|
||||||
chatHistory = new ChatHistory();
|
chatHistory = new ChatHistory();
|
||||||
//发送方设置为99 表示系统消息
|
//发送方设置为99 表示系统消息
|
||||||
chatHistory.setSenderId(99L);
|
chatHistory.setSenderId(99L);
|
||||||
jsonObject.put("nickName","系统消息");
|
jsonObject.put("nickName", "系统消息");
|
||||||
jsonObject.put("roomType",2);
|
jsonObject.put("roomType", 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
//2:考勤消息
|
//2:考勤消息
|
||||||
case "1" ->{
|
case "1" -> {
|
||||||
lambdaQueryWrapper.eq(ChatGroup::getMembers,"["+ChatRoomEnum.ATTENDANCE.getRoomId()+", "+userId+"]");
|
lambdaQueryWrapper.eq(ChatGroup::getMembers, "[" + ChatRoomEnum.ATTENDANCE.getRoomId() + ", " + userId + "]");
|
||||||
groupServiceOne = chatGroupService.getOne(lambdaQueryWrapper);
|
groupServiceOne = chatGroupService.getOne(lambdaQueryWrapper);
|
||||||
//如果给成员发送考勤消息 而该成员还没有建立过连接从而没有考勤房间 则创建该成员考勤消息房间
|
//如果给成员发送考勤消息 而该成员还没有建立过连接从而没有考勤房间 则创建该成员考勤消息房间
|
||||||
if (groupServiceOne == null){
|
if (groupServiceOne == null) {
|
||||||
groupServiceOne = new ChatGroup();
|
groupServiceOne = new ChatGroup();
|
||||||
groupServiceOne.setType(String.valueOf(3));
|
groupServiceOne.setType(String.valueOf(3));
|
||||||
groupServiceOne.setMembers("["+ChatRoomEnum.ATTENDANCE.getRoomId()+", "+userId+"]");
|
groupServiceOne.setMembers("[" + ChatRoomEnum.ATTENDANCE.getRoomId() + ", " + userId + "]");
|
||||||
groupServiceOne.setLastMessage(message);
|
groupServiceOne.setLastMessage(message);
|
||||||
groupServiceOne.setLastMessageTime(new Date());
|
groupServiceOne.setLastMessageTime(new Date());
|
||||||
}else {
|
} else {
|
||||||
groupServiceOne.setLastMessage(message);
|
groupServiceOne.setLastMessage(message);
|
||||||
groupServiceOne.setLastMessageTime(new Date());
|
groupServiceOne.setLastMessageTime(new Date());
|
||||||
}
|
}
|
||||||
chatHistory = new ChatHistory();
|
chatHistory = new ChatHistory();
|
||||||
//发送方设置为100 表示系统消息中的考勤消息
|
//发送方设置为100 表示系统消息中的考勤消息
|
||||||
chatHistory.setSenderId(100L);
|
chatHistory.setSenderId(100L);
|
||||||
jsonObject.put("nickName","考勤消息");
|
jsonObject.put("nickName", "考勤消息");
|
||||||
jsonObject.put("roomType",3);
|
jsonObject.put("roomType", 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
//安全消息
|
//安全消息
|
||||||
case "2" ->{
|
case "2" -> {
|
||||||
lambdaQueryWrapper.eq(ChatGroup::getMembers,"["+ChatRoomEnum.SAFE.getRoomId()+", "+userId+"]");
|
lambdaQueryWrapper.eq(ChatGroup::getMembers, "[" + ChatRoomEnum.SAFE.getRoomId() + ", " + userId + "]");
|
||||||
groupServiceOne = chatGroupService.getOne(lambdaQueryWrapper);
|
groupServiceOne = chatGroupService.getOne(lambdaQueryWrapper);
|
||||||
//如果给成员发送安全消息 而该成员还没有建立过连接从而没有安全消息 则创建该成员安全消息房间
|
//如果给成员发送安全消息 而该成员还没有建立过连接从而没有安全消息 则创建该成员安全消息房间
|
||||||
if (groupServiceOne == null){
|
if (groupServiceOne == null) {
|
||||||
groupServiceOne = new ChatGroup();
|
groupServiceOne = new ChatGroup();
|
||||||
groupServiceOne.setType(String.valueOf(4));
|
groupServiceOne.setType(String.valueOf(4));
|
||||||
groupServiceOne.setMembers("["+ChatRoomEnum.SAFE.getRoomId()+", "+userId+"]");
|
groupServiceOne.setMembers("[" + ChatRoomEnum.SAFE.getRoomId() + ", " + userId + "]");
|
||||||
groupServiceOne.setLastMessage(message);
|
groupServiceOne.setLastMessage(message);
|
||||||
groupServiceOne.setLastMessageTime(new Date());
|
groupServiceOne.setLastMessageTime(new Date());
|
||||||
}else {
|
} else {
|
||||||
groupServiceOne.setLastMessage(message);
|
groupServiceOne.setLastMessage(message);
|
||||||
groupServiceOne.setLastMessageTime(new Date());
|
groupServiceOne.setLastMessageTime(new Date());
|
||||||
}
|
}
|
||||||
chatHistory = new ChatHistory();
|
chatHistory = new ChatHistory();
|
||||||
//发送方设置为101 表示系统消息中的安全消息
|
//发送方设置为101 表示系统消息中的安全消息
|
||||||
chatHistory.setSenderId(101L);
|
chatHistory.setSenderId(101L);
|
||||||
jsonObject.put("nickName","安全消息");
|
jsonObject.put("nickName", "安全消息");
|
||||||
jsonObject.put("roomType",4);
|
jsonObject.put("roomType", 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
//质量消息
|
//质量消息
|
||||||
case "3" ->{
|
case "3" -> {
|
||||||
lambdaQueryWrapper.eq(ChatGroup::getMembers,"["+ChatRoomEnum.QUALITY.getRoomId()+", "+userId+"]");
|
lambdaQueryWrapper.eq(ChatGroup::getMembers, "[" + ChatRoomEnum.QUALITY.getRoomId() + ", " + userId + "]");
|
||||||
groupServiceOne = chatGroupService.getOne(lambdaQueryWrapper);
|
groupServiceOne = chatGroupService.getOne(lambdaQueryWrapper);
|
||||||
//如果给成员发送质量消息 而该成员还没有建立过连接从而没有质量消息 则创建该成员质量消息房间
|
//如果给成员发送质量消息 而该成员还没有建立过连接从而没有质量消息 则创建该成员质量消息房间
|
||||||
if (groupServiceOne == null){
|
if (groupServiceOne == null) {
|
||||||
groupServiceOne = new ChatGroup();
|
groupServiceOne = new ChatGroup();
|
||||||
groupServiceOne.setType(String.valueOf(5));
|
groupServiceOne.setType(String.valueOf(5));
|
||||||
groupServiceOne.setMembers("["+ChatRoomEnum.QUALITY.getRoomId()+", "+userId+"]");
|
groupServiceOne.setMembers("[" + ChatRoomEnum.QUALITY.getRoomId() + ", " + userId + "]");
|
||||||
groupServiceOne.setLastMessage(message);
|
groupServiceOne.setLastMessage(message);
|
||||||
groupServiceOne.setLastMessageTime(new Date());
|
groupServiceOne.setLastMessageTime(new Date());
|
||||||
}else {
|
} else {
|
||||||
groupServiceOne.setLastMessage(message);
|
groupServiceOne.setLastMessage(message);
|
||||||
groupServiceOne.setLastMessageTime(new Date());
|
groupServiceOne.setLastMessageTime(new Date());
|
||||||
}
|
}
|
||||||
chatHistory = new ChatHistory();
|
chatHistory = new ChatHistory();
|
||||||
//发送方设置为102 表示系统消息中的质量消息
|
//发送方设置为102 表示系统消息中的质量消息
|
||||||
chatHistory.setSenderId(102L);
|
chatHistory.setSenderId(102L);
|
||||||
jsonObject.put("nickName","质量消息");
|
jsonObject.put("nickName", "质量消息");
|
||||||
jsonObject.put("roomType",5);
|
jsonObject.put("roomType", 5);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 车辆消息
|
||||||
|
case "4" -> {
|
||||||
|
lambdaQueryWrapper.eq(ChatGroup::getMembers, "[" + ChatRoomEnum.VEHICLE.getRoomId() + ", " + userId + "]");
|
||||||
|
groupServiceOne = chatGroupService.getOne(lambdaQueryWrapper);
|
||||||
|
//如果给成员发送车辆消息 而该成员还没有建立过连接从而没有车辆消息 则创建该成员车辆消息房间
|
||||||
|
if (groupServiceOne == null) {
|
||||||
|
groupServiceOne = new ChatGroup();
|
||||||
|
groupServiceOne.setType(String.valueOf(6));
|
||||||
|
groupServiceOne.setMembers("[" + ChatRoomEnum.VEHICLE.getRoomId() + ", " + userId + "]");
|
||||||
|
groupServiceOne.setLastMessage(message);
|
||||||
|
groupServiceOne.setLastMessageTime(new Date());
|
||||||
|
} else {
|
||||||
|
groupServiceOne.setLastMessage(message);
|
||||||
|
groupServiceOne.setLastMessageTime(new Date());
|
||||||
|
}
|
||||||
|
chatHistory = new ChatHistory();
|
||||||
|
//发送方设置为103 表示系统消息中的车辆消息
|
||||||
|
chatHistory.setSenderId(103L);
|
||||||
|
jsonObject.put("nickName", "车辆消息");
|
||||||
|
jsonObject.put("roomType", 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
default -> {
|
default -> {
|
||||||
@ -572,12 +598,12 @@ public class ChatServerHandler extends SimpleChannelInboundHandler<TextWebSocket
|
|||||||
chatHistoryService.save(chatHistory);
|
chatHistoryService.save(chatHistory);
|
||||||
|
|
||||||
//发送消息后 将该房间未读消息数加1
|
//发送消息后 将该房间未读消息数加1
|
||||||
if (userRoomCountMap.containsKey(userId+"+"+groupServiceOne.getId())){
|
if (userRoomCountMap.containsKey(userId + "+" + groupServiceOne.getId())) {
|
||||||
//该房间未读消息数加1
|
//该房间未读消息数加1
|
||||||
userRoomCountMap.put(userId+"+"+groupServiceOne.getId(), userRoomCountMap.get(userId+"+"+groupServiceOne.getId())+1);
|
userRoomCountMap.put(userId + "+" + groupServiceOne.getId(), userRoomCountMap.get(userId + "+" + groupServiceOne.getId()) + 1);
|
||||||
}else{
|
} else {
|
||||||
//将该房间未读消息数设置为1
|
//将该房间未读消息数设置为1
|
||||||
userRoomCountMap.put(userId+"+"+groupServiceOne.getId(), 1);
|
userRoomCountMap.put(userId + "+" + groupServiceOne.getId(), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
//通过userId拿到该用户所有通道实例
|
//通过userId拿到该用户所有通道实例
|
||||||
@ -595,10 +621,10 @@ public class ChatServerHandler extends SimpleChannelInboundHandler<TextWebSocket
|
|||||||
|
|
||||||
//设置未读消息数
|
//设置未读消息数
|
||||||
private void setUnReadCount(Long userId, JSONObject jsonObject) {
|
private void setUnReadCount(Long userId, JSONObject jsonObject) {
|
||||||
HashMap<String,Object> temp = new HashMap<>();
|
HashMap<String, Object> temp = new HashMap<>();
|
||||||
userRoomCountMap.forEachKey(0, (value) -> {
|
userRoomCountMap.forEachKey(0, (value) -> {
|
||||||
if (value.contains(userId.toString())){
|
if (value.contains(userId.toString())) {
|
||||||
temp.put(value,userRoomCountMap.get(value));
|
temp.put(value, userRoomCountMap.get(value));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
jsonObject.put("unReadCount", temp);
|
jsonObject.put("unReadCount", temp);
|
||||||
@ -606,23 +632,23 @@ public class ChatServerHandler extends SimpleChannelInboundHandler<TextWebSocket
|
|||||||
|
|
||||||
|
|
||||||
//用于房间创建后发送确认消息
|
//用于房间创建后发送确认消息
|
||||||
public void sendRoomInfo(Long userId,ChatGroup chatGroup){
|
public void sendRoomInfo(Long userId, ChatGroup chatGroup) {
|
||||||
//通过ID找到所有通道 发送消息
|
//通过ID找到所有通道 发送消息
|
||||||
List<ChannelHandlerContext> channelHandlerContexts = userChannelMap.get(userId.toString());
|
List<ChannelHandlerContext> channelHandlerContexts = userChannelMap.get(userId.toString());
|
||||||
if (channelHandlerContexts == null||channelHandlerContexts.isEmpty()){
|
if (channelHandlerContexts == null || channelHandlerContexts.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject jsonObject = new JSONObject();
|
JSONObject jsonObject = new JSONObject();
|
||||||
jsonObject.put("type", "5");
|
jsonObject.put("type", "5");
|
||||||
jsonObject.put("messageType","txt");
|
jsonObject.put("messageType", "txt");
|
||||||
jsonObject.put("roomInfo", chatGroup);
|
jsonObject.put("roomInfo", chatGroup);
|
||||||
|
|
||||||
for (ChannelHandlerContext channelHandlerContext : channelHandlerContexts) {
|
for (ChannelHandlerContext channelHandlerContext : channelHandlerContexts) {
|
||||||
sendMessage(channelHandlerContext, String.valueOf(jsonObject));
|
sendMessage(channelHandlerContext, String.valueOf(jsonObject));
|
||||||
}
|
}
|
||||||
|
|
||||||
log.info("发送房间创建确认消息:{}",jsonObject);
|
log.info("发送房间创建确认消息:{}", jsonObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,9 @@ public enum ChatRoomEnum {
|
|||||||
|
|
||||||
SAFE("101", "安全消息"),
|
SAFE("101", "安全消息"),
|
||||||
|
|
||||||
QUALITY("102", "质量消息");
|
QUALITY("102", "质量消息"),
|
||||||
|
|
||||||
|
VEHICLE("103", "车辆消息");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ID
|
* ID
|
||||||
|
|||||||
@ -2,6 +2,10 @@ package org.dromara.xzd.biddingManagement.biaoqianlixiang.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessTaskEvent;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
@ -10,6 +14,7 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import org.dromara.common.utils.BatchNumberGenerator;
|
import org.dromara.common.utils.BatchNumberGenerator;
|
||||||
import org.dromara.system.service.impl.SysOssServiceImpl;
|
import org.dromara.system.service.impl.SysOssServiceImpl;
|
||||||
import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.XzdBqlxProjectInfo;
|
import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.XzdBqlxProjectInfo;
|
||||||
|
import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.XzdProjectRiskAssessment;
|
||||||
import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.bo.XzdBqlxProjectInfoBo;
|
import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.bo.XzdBqlxProjectInfoBo;
|
||||||
import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.dto.BiddingManagementDto;
|
import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.dto.BiddingManagementDto;
|
||||||
import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.dto.QuerBiddingManagementDto;
|
import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.dto.QuerBiddingManagementDto;
|
||||||
@ -19,6 +24,7 @@ import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.vo.XzdBqlxProjec
|
|||||||
import org.dromara.xzd.biddingManagement.biaoqianlixiang.service.IXzdBqlxProjectInfoService;
|
import org.dromara.xzd.biddingManagement.biaoqianlixiang.service.IXzdBqlxProjectInfoService;
|
||||||
import org.dromara.xzd.utilS.AreaUtil;
|
import org.dromara.xzd.utilS.AreaUtil;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.context.event.EventListener;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.bo.XzdBidPreProjectBo;
|
import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.bo.XzdBidPreProjectBo;
|
||||||
import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.vo.XzdBidPreProjectVo;
|
import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.vo.XzdBidPreProjectVo;
|
||||||
@ -40,6 +46,7 @@ import java.util.stream.Collectors;
|
|||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class XzdBidPreProjectServiceImpl extends ServiceImpl<XzdBidPreProjectMapper, XzdBidPreProject> implements IXzdBidPreProjectService {
|
public class XzdBidPreProjectServiceImpl extends ServiceImpl<XzdBidPreProjectMapper, XzdBidPreProject> implements IXzdBidPreProjectService {
|
||||||
|
|
||||||
private final XzdBidPreProjectMapper baseMapper;
|
private final XzdBidPreProjectMapper baseMapper;
|
||||||
@ -246,6 +253,50 @@ public class XzdBidPreProjectServiceImpl extends ServiceImpl<XzdBidPreProjectMap
|
|||||||
|
|
||||||
return baseMapper.deleteByIds(ids) > 0;
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等)
|
||||||
|
* 正常使用只需#processEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processEvent 参数
|
||||||
|
*/
|
||||||
|
@org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('xzdbqlx')")
|
||||||
|
public void processPlansHandlErequipmentList(ProcessEvent processEvent) {
|
||||||
|
log.info("标前立项审核任务执行了{}", processEvent.toString());
|
||||||
|
String id = processEvent.getBusinessId();
|
||||||
|
XzdBidPreProject vo = baseMapper.selectById(Long.valueOf(id));
|
||||||
|
if (vo == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
vo.setAuditStatus(processEvent.getStatus());
|
||||||
|
this.updateById(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行任务创建监听
|
||||||
|
* 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断
|
||||||
|
* 在方法中判断流程节点key
|
||||||
|
* if ("xxx".equals(processTaskEvent.getNodeCode())) {
|
||||||
|
* //执行业务逻辑
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* @param processTaskEvent 参数
|
||||||
|
*/
|
||||||
|
@org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdbqlx')")
|
||||||
|
public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) {
|
||||||
|
log.info("标前立项审核任务创建了{}", processTaskEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监听删除流程事件
|
||||||
|
* 正常使用只需#processDeleteEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processDeleteEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdbqlx')")
|
||||||
|
public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) {
|
||||||
|
log.info("标前立项删除流程事件,标前立项审核任务执行了{}", processDeleteEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,10 @@
|
|||||||
package org.dromara.xzd.biddingManagement.biaoqianlixiang.service.impl;
|
package org.dromara.xzd.biddingManagement.biaoqianlixiang.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessTaskEvent;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
@ -20,7 +24,9 @@ import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.vo.XzdProjectRis
|
|||||||
import org.dromara.xzd.biddingManagement.biaoqianlixiang.mapper.XzdProjectRiskAssessmentMapper;
|
import org.dromara.xzd.biddingManagement.biaoqianlixiang.mapper.XzdProjectRiskAssessmentMapper;
|
||||||
import org.dromara.xzd.biddingManagement.biaoqianlixiang.service.IXzdBidPreProjectService;
|
import org.dromara.xzd.biddingManagement.biaoqianlixiang.service.IXzdBidPreProjectService;
|
||||||
import org.dromara.xzd.biddingManagement.biaoqianlixiang.service.IXzdProjectRiskAssessmentService;
|
import org.dromara.xzd.biddingManagement.biaoqianlixiang.service.IXzdProjectRiskAssessmentService;
|
||||||
|
import org.dromara.xzd.comprehensive.domain.XzdCsContractInformation;
|
||||||
import org.dromara.xzd.utilS.AreaUtil;
|
import org.dromara.xzd.utilS.AreaUtil;
|
||||||
|
import org.springframework.context.event.EventListener;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
|
||||||
@ -37,6 +43,7 @@ import java.util.stream.Collectors;
|
|||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class XzdProjectRiskAssessmentServiceImpl extends ServiceImpl<XzdProjectRiskAssessmentMapper, XzdProjectRiskAssessment> implements IXzdProjectRiskAssessmentService {
|
public class XzdProjectRiskAssessmentServiceImpl extends ServiceImpl<XzdProjectRiskAssessmentMapper, XzdProjectRiskAssessment> implements IXzdProjectRiskAssessmentService {
|
||||||
|
|
||||||
private final XzdProjectRiskAssessmentMapper baseMapper;
|
private final XzdProjectRiskAssessmentMapper baseMapper;
|
||||||
@ -216,4 +223,51 @@ public class XzdProjectRiskAssessmentServiceImpl extends ServiceImpl<XzdProjectR
|
|||||||
}
|
}
|
||||||
return baseMapper.deleteByIds(ids) > 0;
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等)
|
||||||
|
* 正常使用只需#processEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processEvent.flowCode.endsWith('xzdxmfxpg')")
|
||||||
|
public void processPlansHandlErequipmentList(ProcessEvent processEvent) {
|
||||||
|
log.info("项目风险评估签审意见审核任务执行了{}", processEvent.toString());
|
||||||
|
String id = processEvent.getBusinessId();
|
||||||
|
XzdProjectRiskAssessment vo = baseMapper.selectById(Long.valueOf(id));
|
||||||
|
if (vo == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
vo.setAuditStatus(processEvent.getStatus());
|
||||||
|
this.updateById(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行任务创建监听
|
||||||
|
* 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断
|
||||||
|
* 在方法中判断流程节点key
|
||||||
|
* if ("xxx".equals(processTaskEvent.getNodeCode())) {
|
||||||
|
* //执行业务逻辑
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* @param processTaskEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdxmfxpg')")
|
||||||
|
public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) {
|
||||||
|
log.info("项目风险评估签审意见审核任务创建了{}", processTaskEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监听删除流程事件
|
||||||
|
* 正常使用只需#processDeleteEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processDeleteEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdxmfxpg')")
|
||||||
|
public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) {
|
||||||
|
log.info("项目风险评估签审意见删除流程事件,项目风险评估签审意见审核任务执行了{}", processDeleteEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,10 @@
|
|||||||
package org.dromara.xzd.biddingManagement.biddingDocument.service.impl;
|
package org.dromara.xzd.biddingManagement.biddingDocument.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessTaskEvent;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
@ -11,10 +15,12 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.dromara.common.utils.BatchNumberGenerator;
|
import org.dromara.common.utils.BatchNumberGenerator;
|
||||||
import org.dromara.system.service.impl.SysOssServiceImpl;
|
import org.dromara.system.service.impl.SysOssServiceImpl;
|
||||||
|
import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.XzdProjectRiskAssessment;
|
||||||
import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.vo.QuerListXzdBidPreVo;
|
import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.vo.QuerListXzdBidPreVo;
|
||||||
import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.vo.XzdBidPreProjectVo;
|
import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.vo.XzdBidPreProjectVo;
|
||||||
import org.dromara.xzd.biddingManagement.biaoqianlixiang.service.IXzdBidPreProjectService;
|
import org.dromara.xzd.biddingManagement.biaoqianlixiang.service.IXzdBidPreProjectService;
|
||||||
import org.dromara.xzd.utilS.AreaUtil;
|
import org.dromara.xzd.utilS.AreaUtil;
|
||||||
|
import org.springframework.context.event.EventListener;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.dromara.xzd.biddingManagement.biddingDocument.domain.bo.XzdBiddingFileEstimateBo;
|
import org.dromara.xzd.biddingManagement.biddingDocument.domain.bo.XzdBiddingFileEstimateBo;
|
||||||
import org.dromara.xzd.biddingManagement.biddingDocument.domain.vo.XzdBiddingFileEstimateVo;
|
import org.dromara.xzd.biddingManagement.biddingDocument.domain.vo.XzdBiddingFileEstimateVo;
|
||||||
@ -38,6 +44,7 @@ import java.util.stream.Collectors;
|
|||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class XzdBiddingFileEstimateServiceImpl extends ServiceImpl<XzdBiddingFileEstimateMapper, XzdBiddingFileEstimate> implements IXzdBiddingFileEstimateService {
|
public class XzdBiddingFileEstimateServiceImpl extends ServiceImpl<XzdBiddingFileEstimateMapper, XzdBiddingFileEstimate> implements IXzdBiddingFileEstimateService {
|
||||||
|
|
||||||
private final XzdBiddingFileEstimateMapper baseMapper;
|
private final XzdBiddingFileEstimateMapper baseMapper;
|
||||||
@ -195,4 +202,52 @@ public class XzdBiddingFileEstimateServiceImpl extends ServiceImpl<XzdBiddingFil
|
|||||||
}
|
}
|
||||||
return baseMapper.deleteByIds(ids) > 0;
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等)
|
||||||
|
* 正常使用只需#processEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processEvent.flowCode.endsWith('xzdztbwj')")
|
||||||
|
public void processPlansHandlErequipmentList(ProcessEvent processEvent) {
|
||||||
|
log.info("招标文件审估审核任务执行了{}", processEvent.toString());
|
||||||
|
String id = processEvent.getBusinessId();
|
||||||
|
XzdBiddingFileEstimate vo = baseMapper.selectById(Long.valueOf(id));
|
||||||
|
if (vo == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
vo.setAuditStatus(processEvent.getStatus());
|
||||||
|
this.updateById(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行任务创建监听
|
||||||
|
* 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断
|
||||||
|
* 在方法中判断流程节点key
|
||||||
|
* if ("xxx".equals(processTaskEvent.getNodeCode())) {
|
||||||
|
* //执行业务逻辑
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* @param processTaskEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdztbwj')")
|
||||||
|
public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) {
|
||||||
|
log.info("招标文件审估审核任务创建了{}", processTaskEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监听删除流程事件
|
||||||
|
* 正常使用只需#processDeleteEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processDeleteEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdztbwj')")
|
||||||
|
public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) {
|
||||||
|
log.info("招标文件审估删除流程事件,招标文件审估审核任务执行了{}", processDeleteEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,6 +74,12 @@ public class XzdBiddingDocumentVo implements Serializable {
|
|||||||
@ExcelProperty(value = "项目类型ID")
|
@ExcelProperty(value = "项目类型ID")
|
||||||
private Long projectType;
|
private Long projectType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目类型ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "项目类型ID")
|
||||||
|
private String projectTypeName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 投标单位
|
* 投标单位
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1,6 +1,10 @@
|
|||||||
package org.dromara.xzd.biddingManagement.biddingDocumentList.service.impl;
|
package org.dromara.xzd.biddingManagement.biddingDocumentList.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessTaskEvent;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
@ -25,9 +29,13 @@ import org.dromara.xzd.biddingManagement.biddingDocumentList.service.IXzdBidding
|
|||||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.service.IXzdTbwjBusinessBidService;
|
import org.dromara.xzd.biddingManagement.biddingDocumentList.service.IXzdTbwjBusinessBidService;
|
||||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.service.IXzdTbwjTechnicalBidService;
|
import org.dromara.xzd.biddingManagement.biddingDocumentList.service.IXzdTbwjTechnicalBidService;
|
||||||
import org.dromara.xzd.biddingManagement.biddingDocumentList.service.IXzdTbwjZsyqService;
|
import org.dromara.xzd.biddingManagement.biddingDocumentList.service.IXzdTbwjZsyqService;
|
||||||
|
import org.dromara.xzd.biddingManagement.earnestMoneyWithdraw.domain.XzdBidDepositRecovery;
|
||||||
|
import org.dromara.xzd.domain.vo.XzdProjectTypeVo;
|
||||||
|
import org.dromara.xzd.service.IXzdProjectTypeService;
|
||||||
import org.dromara.xzd.utilS.AreaUtil;
|
import org.dromara.xzd.utilS.AreaUtil;
|
||||||
import org.locationtech.jts.edgegraph.HalfEdge;
|
import org.locationtech.jts.edgegraph.HalfEdge;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.context.event.EventListener;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
|
||||||
@ -45,6 +53,7 @@ import java.util.Collection;
|
|||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class XzdBiddingDocumentServiceImpl extends ServiceImpl<XzdBiddingDocumentMapper, XzdBiddingDocument> implements IXzdBiddingDocumentService {
|
public class XzdBiddingDocumentServiceImpl extends ServiceImpl<XzdBiddingDocumentMapper, XzdBiddingDocument> implements IXzdBiddingDocumentService {
|
||||||
|
|
||||||
private final XzdBiddingDocumentMapper baseMapper;
|
private final XzdBiddingDocumentMapper baseMapper;
|
||||||
@ -59,6 +68,8 @@ public class XzdBiddingDocumentServiceImpl extends ServiceImpl<XzdBiddingDocumen
|
|||||||
|
|
||||||
private final IXzdTbwjZsyqService iXzdTbwjZsyqService;
|
private final IXzdTbwjZsyqService iXzdTbwjZsyqService;
|
||||||
|
|
||||||
|
private final IXzdProjectTypeService xzdProjectTypeService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询投标文件
|
* 查询投标文件
|
||||||
*
|
*
|
||||||
@ -94,9 +105,25 @@ public class XzdBiddingDocumentServiceImpl extends ServiceImpl<XzdBiddingDocumen
|
|||||||
public TableDataInfo<XzdBiddingDocumentVo> queryPageList(XzdBiddingDocumentBo bo, PageQuery pageQuery) {
|
public TableDataInfo<XzdBiddingDocumentVo> queryPageList(XzdBiddingDocumentBo bo, PageQuery pageQuery) {
|
||||||
LambdaQueryWrapper<XzdBiddingDocument> lqw = buildQueryWrapper(bo);
|
LambdaQueryWrapper<XzdBiddingDocument> lqw = buildQueryWrapper(bo);
|
||||||
Page<XzdBiddingDocumentVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
Page<XzdBiddingDocumentVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
result.getRecords().forEach(this::getName);
|
||||||
|
|
||||||
return TableDataInfo.build(result);
|
return TableDataInfo.build(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void getName(XzdBiddingDocumentVo xzdBiddingDocumentVo) {
|
||||||
|
|
||||||
|
if (xzdBiddingDocumentVo != null){
|
||||||
|
Long projectType = xzdBiddingDocumentVo.getProjectType();
|
||||||
|
if (projectType != null){
|
||||||
|
XzdProjectTypeVo xzdProjectTypeVo = xzdProjectTypeService.queryById(projectType);
|
||||||
|
if (xzdProjectTypeVo != null){
|
||||||
|
xzdBiddingDocumentVo.setProjectTypeName(xzdProjectTypeVo.getTypeName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询符合条件的投标文件列表
|
* 查询符合条件的投标文件列表
|
||||||
*
|
*
|
||||||
@ -246,4 +273,56 @@ public class XzdBiddingDocumentServiceImpl extends ServiceImpl<XzdBiddingDocumen
|
|||||||
}
|
}
|
||||||
return baseMapper.deleteByIds(ids) > 0;
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等)
|
||||||
|
* 正常使用只需#processEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processEvent.flowCode.endsWith('xzdtbwj')")
|
||||||
|
public void processPlansHandlErequipmentList(ProcessEvent processEvent) {
|
||||||
|
log.info("投标文件审核任务执行了{}", processEvent.toString());
|
||||||
|
String id = processEvent.getBusinessId();
|
||||||
|
XzdBiddingDocument vo = baseMapper.selectById(Long.valueOf(id));
|
||||||
|
if (vo == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
vo.setAuditStatus(processEvent.getStatus());
|
||||||
|
this.updateById(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行任务创建监听
|
||||||
|
* 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断
|
||||||
|
* 在方法中判断流程节点key
|
||||||
|
* if ("xxx".equals(processTaskEvent.getNodeCode())) {
|
||||||
|
* //执行业务逻辑
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* @param processTaskEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdtbwj')")
|
||||||
|
public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) {
|
||||||
|
log.info("投标文件审核任务创建了{}", processTaskEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监听删除流程事件
|
||||||
|
* 正常使用只需#processDeleteEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processDeleteEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdtbwj')")
|
||||||
|
public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) {
|
||||||
|
log.info("投标文件删除流程事件,投标文件审核任务执行了{}", processDeleteEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,10 @@
|
|||||||
package org.dromara.xzd.biddingManagement.earnestMoney.service.impl;
|
package org.dromara.xzd.biddingManagement.earnestMoney.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessTaskEvent;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
@ -21,9 +25,11 @@ import org.dromara.xzd.biddingManagement.earnestMoney.domain.vo.XzdBidDepositPay
|
|||||||
import org.dromara.xzd.biddingManagement.earnestMoney.domain.vo.XzdBidDepositPaymentVo;
|
import org.dromara.xzd.biddingManagement.earnestMoney.domain.vo.XzdBidDepositPaymentVo;
|
||||||
import org.dromara.xzd.biddingManagement.earnestMoney.mapper.XzdBidDepositPaymentMapper;
|
import org.dromara.xzd.biddingManagement.earnestMoney.mapper.XzdBidDepositPaymentMapper;
|
||||||
import org.dromara.xzd.biddingManagement.earnestMoney.service.IXzdBidDepositPaymentService;
|
import org.dromara.xzd.biddingManagement.earnestMoney.service.IXzdBidDepositPaymentService;
|
||||||
|
import org.dromara.xzd.biddingManagement.paymentapplication.domain.XzdBiddingAgencyFeePayment;
|
||||||
import org.dromara.xzd.service.impl.XzdSupplierInfoServiceImpl;
|
import org.dromara.xzd.service.impl.XzdSupplierInfoServiceImpl;
|
||||||
import org.dromara.xzd.utilS.AreaUtil;
|
import org.dromara.xzd.utilS.AreaUtil;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.event.EventListener;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
@ -41,6 +47,7 @@ import java.util.stream.Collectors;
|
|||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class XzdBidDepositPaymentServiceImpl extends ServiceImpl<XzdBidDepositPaymentMapper, XzdBidDepositPayment> implements IXzdBidDepositPaymentService {
|
public class XzdBidDepositPaymentServiceImpl extends ServiceImpl<XzdBidDepositPaymentMapper, XzdBidDepositPayment> implements IXzdBidDepositPaymentService {
|
||||||
|
|
||||||
private final XzdBidDepositPaymentMapper baseMapper;
|
private final XzdBidDepositPaymentMapper baseMapper;
|
||||||
@ -208,4 +215,52 @@ public class XzdBidDepositPaymentServiceImpl extends ServiceImpl<XzdBidDepositPa
|
|||||||
}
|
}
|
||||||
return baseMapper.deleteByIds(ids) > 0;
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等)
|
||||||
|
* 正常使用只需#processEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processEvent.flowCode.endsWith('xzdtbbzjjn')")
|
||||||
|
public void processPlansHandlErequipmentList(ProcessEvent processEvent) {
|
||||||
|
log.info("投标保证金缴纳审核任务执行了{}", processEvent.toString());
|
||||||
|
String id = processEvent.getBusinessId();
|
||||||
|
XzdBidDepositPayment vo = baseMapper.selectById(Long.valueOf(id));
|
||||||
|
if (vo == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
vo.setAuditStatus(processEvent.getStatus());
|
||||||
|
this.updateById(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行任务创建监听
|
||||||
|
* 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断
|
||||||
|
* 在方法中判断流程节点key
|
||||||
|
* if ("xxx".equals(processTaskEvent.getNodeCode())) {
|
||||||
|
* //执行业务逻辑
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* @param processTaskEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdtbbzjjn')")
|
||||||
|
public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) {
|
||||||
|
log.info("投标保证金缴纳审核任务创建了{}", processTaskEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监听删除流程事件
|
||||||
|
* 正常使用只需#processDeleteEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processDeleteEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdtbbzjjn')")
|
||||||
|
public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) {
|
||||||
|
log.info("投标保证金缴纳删除流程事件,投标保证金缴纳审核任务执行了{}", processDeleteEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,10 @@
|
|||||||
package org.dromara.xzd.biddingManagement.earnestMoneyWithdraw.service.impl;
|
package org.dromara.xzd.biddingManagement.earnestMoneyWithdraw.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessTaskEvent;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
@ -11,6 +15,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.dromara.common.utils.BatchNumberGenerator;
|
import org.dromara.common.utils.BatchNumberGenerator;
|
||||||
import org.dromara.system.service.impl.SysOssServiceImpl;
|
import org.dromara.system.service.impl.SysOssServiceImpl;
|
||||||
|
import org.dromara.xzd.biddingManagement.earnestMoney.domain.XzdBidDepositPayment;
|
||||||
import org.dromara.xzd.biddingManagement.earnestMoney.domain.vo.XzdBidDepositPaymentByBqlx;
|
import org.dromara.xzd.biddingManagement.earnestMoney.domain.vo.XzdBidDepositPaymentByBqlx;
|
||||||
import org.dromara.xzd.biddingManagement.earnestMoney.service.IXzdBidDepositPaymentService;
|
import org.dromara.xzd.biddingManagement.earnestMoney.service.IXzdBidDepositPaymentService;
|
||||||
import org.dromara.xzd.biddingManagement.earnestMoneyWithdraw.domain.XzdBidDepositRecovery;
|
import org.dromara.xzd.biddingManagement.earnestMoneyWithdraw.domain.XzdBidDepositRecovery;
|
||||||
@ -22,6 +27,7 @@ import org.dromara.xzd.biddingManagement.earnestMoneyWithdraw.service.IXzdBidDep
|
|||||||
import org.dromara.xzd.domain.vo.XzdSupplierInfoVo;
|
import org.dromara.xzd.domain.vo.XzdSupplierInfoVo;
|
||||||
import org.dromara.xzd.service.IXzdSupplierInfoService;
|
import org.dromara.xzd.service.IXzdSupplierInfoService;
|
||||||
import org.dromara.xzd.utilS.AreaUtil;
|
import org.dromara.xzd.utilS.AreaUtil;
|
||||||
|
import org.springframework.context.event.EventListener;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@ -39,6 +45,7 @@ import java.util.stream.Collectors;
|
|||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class XzdBidDepositRecoveryServiceImpl extends ServiceImpl<XzdBidDepositRecoveryMapper, XzdBidDepositRecovery> implements IXzdBidDepositRecoveryService {
|
public class XzdBidDepositRecoveryServiceImpl extends ServiceImpl<XzdBidDepositRecoveryMapper, XzdBidDepositRecovery> implements IXzdBidDepositRecoveryService {
|
||||||
|
|
||||||
private final XzdBidDepositRecoveryMapper baseMapper;
|
private final XzdBidDepositRecoveryMapper baseMapper;
|
||||||
@ -220,4 +227,51 @@ public class XzdBidDepositRecoveryServiceImpl extends ServiceImpl<XzdBidDepositR
|
|||||||
}
|
}
|
||||||
return baseMapper.deleteByIds(ids) > 0;
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等)
|
||||||
|
* 正常使用只需#processEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processEvent.flowCode.endsWith('xzdtbbzjsh')")
|
||||||
|
public void processPlansHandlErequipmentList(ProcessEvent processEvent) {
|
||||||
|
log.info("投标保证金收回审核任务执行了{}", processEvent.toString());
|
||||||
|
String id = processEvent.getBusinessId();
|
||||||
|
XzdBidDepositRecovery vo = baseMapper.selectById(Long.valueOf(id));
|
||||||
|
if (vo == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
vo.setAuditStatus(processEvent.getStatus());
|
||||||
|
this.updateById(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行任务创建监听
|
||||||
|
* 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断
|
||||||
|
* 在方法中判断流程节点key
|
||||||
|
* if ("xxx".equals(processTaskEvent.getNodeCode())) {
|
||||||
|
* //执行业务逻辑
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* @param processTaskEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdtbbzjsh')")
|
||||||
|
public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) {
|
||||||
|
log.info("投标保证金收回审核任务创建了{}", processTaskEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监听删除流程事件
|
||||||
|
* 正常使用只需#processDeleteEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processDeleteEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdtbbzjsh')")
|
||||||
|
public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) {
|
||||||
|
log.info("投标保证金收回删除流程事件,投标保证金收回审核任务执行了{}", processDeleteEvent.toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,10 @@
|
|||||||
package org.dromara.xzd.biddingManagement.paymentapplication.service.impl;
|
package org.dromara.xzd.biddingManagement.paymentapplication.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessTaskEvent;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
@ -14,7 +18,9 @@ import org.dromara.system.service.impl.SysOssServiceImpl;
|
|||||||
import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.vo.QuerListXzdBidPreVo;
|
import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.vo.QuerListXzdBidPreVo;
|
||||||
import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.vo.XzdBidPreProjectVo;
|
import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.vo.XzdBidPreProjectVo;
|
||||||
import org.dromara.xzd.biddingManagement.biaoqianlixiang.service.IXzdBidPreProjectService;
|
import org.dromara.xzd.biddingManagement.biaoqianlixiang.service.IXzdBidPreProjectService;
|
||||||
|
import org.dromara.xzd.biddingManagement.biddingDocument.domain.XzdBiddingFileEstimate;
|
||||||
import org.dromara.xzd.utilS.AreaUtil;
|
import org.dromara.xzd.utilS.AreaUtil;
|
||||||
|
import org.springframework.context.event.EventListener;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.dromara.xzd.biddingManagement.paymentapplication.domain.bo.XzdBiddingAgencyFeePaymentBo;
|
import org.dromara.xzd.biddingManagement.paymentapplication.domain.bo.XzdBiddingAgencyFeePaymentBo;
|
||||||
import org.dromara.xzd.biddingManagement.paymentapplication.domain.vo.XzdBiddingAgencyFeePaymentVo;
|
import org.dromara.xzd.biddingManagement.paymentapplication.domain.vo.XzdBiddingAgencyFeePaymentVo;
|
||||||
@ -38,6 +44,7 @@ import java.util.stream.Collectors;
|
|||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class XzdBiddingAgencyFeePaymentServiceImpl extends ServiceImpl<XzdBiddingAgencyFeePaymentMapper, XzdBiddingAgencyFeePayment> implements IXzdBiddingAgencyFeePaymentService {
|
public class XzdBiddingAgencyFeePaymentServiceImpl extends ServiceImpl<XzdBiddingAgencyFeePaymentMapper, XzdBiddingAgencyFeePayment> implements IXzdBiddingAgencyFeePaymentService {
|
||||||
|
|
||||||
private final XzdBiddingAgencyFeePaymentMapper baseMapper;
|
private final XzdBiddingAgencyFeePaymentMapper baseMapper;
|
||||||
@ -188,4 +195,51 @@ public class XzdBiddingAgencyFeePaymentServiceImpl extends ServiceImpl<XzdBiddin
|
|||||||
}
|
}
|
||||||
return baseMapper.deleteByIds(ids) > 0;
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等)
|
||||||
|
* 正常使用只需#processEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processEvent.flowCode.endsWith('xzdzbdlfwfsq')")
|
||||||
|
public void processPlansHandlErequipmentList(ProcessEvent processEvent) {
|
||||||
|
log.info("招标代理服务费支付申请审核任务执行了{}", processEvent.toString());
|
||||||
|
String id = processEvent.getBusinessId();
|
||||||
|
XzdBiddingAgencyFeePayment vo = baseMapper.selectById(Long.valueOf(id));
|
||||||
|
if (vo == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
vo.setAuditStatus(processEvent.getStatus());
|
||||||
|
this.updateById(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行任务创建监听
|
||||||
|
* 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断
|
||||||
|
* 在方法中判断流程节点key
|
||||||
|
* if ("xxx".equals(processTaskEvent.getNodeCode())) {
|
||||||
|
* //执行业务逻辑
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* @param processTaskEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdzbdlfwfsq')")
|
||||||
|
public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) {
|
||||||
|
log.info("招标代理服务费支付申请审核任务创建了{}", processTaskEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监听删除流程事件
|
||||||
|
* 正常使用只需#processDeleteEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processDeleteEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdzbdlfwfsq')")
|
||||||
|
public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) {
|
||||||
|
log.info("招标代理服务费支付申请删除流程事件,招标代理服务费支付申请审核任务执行了{}", processDeleteEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.*;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
@ -44,7 +45,7 @@ public class XzdPostBidAnalysis extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 工程造价(万元)
|
* 工程造价(万元)
|
||||||
*/
|
*/
|
||||||
private Long projectCost;
|
private BigDecimal projectCost;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目类型
|
* 项目类型
|
||||||
@ -79,12 +80,12 @@ public class XzdPostBidAnalysis extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 招标控制价(万元)
|
* 招标控制价(万元)
|
||||||
*/
|
*/
|
||||||
private Long controlPrice;
|
private BigDecimal controlPrice;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 最终报价(万元)
|
* 最终报价(万元)
|
||||||
*/
|
*/
|
||||||
private Long finalQuote;
|
private BigDecimal finalQuote;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 投标结果
|
* 投标结果
|
||||||
@ -104,7 +105,7 @@ public class XzdPostBidAnalysis extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 最终报价(元)
|
* 最终报价(元)
|
||||||
*/
|
*/
|
||||||
private Long finalQuoteYuan;
|
private BigDecimal finalQuoteYuan;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 最终报价(大写)
|
* 最终报价(大写)
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import lombok.Data;
|
|||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import jakarta.validation.constraints.*;
|
import jakarta.validation.constraints.*;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -45,7 +46,7 @@ public class XzdPostBidAnalysisBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 工程造价(万元)
|
* 工程造价(万元)
|
||||||
*/
|
*/
|
||||||
private Long projectCost;
|
private BigDecimal projectCost;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目类型
|
* 项目类型
|
||||||
@ -80,12 +81,12 @@ public class XzdPostBidAnalysisBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 招标控制价(万元)
|
* 招标控制价(万元)
|
||||||
*/
|
*/
|
||||||
private Long controlPrice;
|
private BigDecimal controlPrice;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 最终报价(万元)
|
* 最终报价(万元)
|
||||||
*/
|
*/
|
||||||
private Long finalQuote;
|
private BigDecimal finalQuote;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 投标结果
|
* 投标结果
|
||||||
@ -106,7 +107,7 @@ public class XzdPostBidAnalysisBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 最终报价(元)
|
* 最终报价(元)
|
||||||
*/
|
*/
|
||||||
private Long finalQuoteYuan;
|
private BigDecimal finalQuoteYuan;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 最终报价(大写)
|
* 最终报价(大写)
|
||||||
|
|||||||
@ -1,7 +1,11 @@
|
|||||||
package org.dromara.xzd.biddingManagement.postAnalysis.domain.vo;
|
package org.dromara.xzd.biddingManagement.postAnalysis.domain.vo;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
@ -9,6 +13,8 @@ import org.dromara.common.excel.annotation.ExcelDictFormat;
|
|||||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||||
import io.github.linpeilie.annotations.AutoMapper;
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.dromara.common.translation.annotation.Translation;
|
||||||
|
import org.dromara.common.translation.constant.TransConstant;
|
||||||
import org.dromara.xzd.biddingManagement.postAnalysis.domain.XzdBhfxDwpm;
|
import org.dromara.xzd.biddingManagement.postAnalysis.domain.XzdBhfxDwpm;
|
||||||
import org.dromara.xzd.biddingManagement.postAnalysis.domain.XzdPostBidAnalysis;
|
import org.dromara.xzd.biddingManagement.postAnalysis.domain.XzdPostBidAnalysis;
|
||||||
|
|
||||||
@ -54,7 +60,7 @@ public class XzdPostBidAnalysisVo implements Serializable {
|
|||||||
* 工程造价(万元)
|
* 工程造价(万元)
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "工程造价(万元)")
|
@ExcelProperty(value = "工程造价(万元)")
|
||||||
private Long projectCost;
|
private BigDecimal projectCost;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目类型
|
* 项目类型
|
||||||
@ -96,13 +102,13 @@ public class XzdPostBidAnalysisVo implements Serializable {
|
|||||||
* 招标控制价(万元)
|
* 招标控制价(万元)
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "招标控制价(万元)")
|
@ExcelProperty(value = "招标控制价(万元)")
|
||||||
private Long controlPrice;
|
private BigDecimal controlPrice;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 最终报价(万元)
|
* 最终报价(万元)
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "最终报价(万元)")
|
@ExcelProperty(value = "最终报价(万元)")
|
||||||
private Long finalQuote;
|
private BigDecimal finalQuote;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 投标结果
|
* 投标结果
|
||||||
@ -127,7 +133,7 @@ public class XzdPostBidAnalysisVo implements Serializable {
|
|||||||
* 最终报价(元)
|
* 最终报价(元)
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "最终报价(元)")
|
@ExcelProperty(value = "最终报价(元)")
|
||||||
private Long finalQuoteYuan;
|
private BigDecimal finalQuoteYuan;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 最终报价(大写)
|
* 最终报价(大写)
|
||||||
@ -153,6 +159,24 @@ public class XzdPostBidAnalysisVo implements Serializable {
|
|||||||
@ExcelProperty(value = "审核状态")
|
@ExcelProperty(value = "审核状态")
|
||||||
private String auditStatus;
|
private String auditStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Long createBy;
|
||||||
|
|
||||||
|
|
||||||
|
@Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "createBy")
|
||||||
|
private String createByName;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
|
||||||
private List<XzdBhfxDwpmVo> pm;
|
private List<XzdBhfxDwpmVo> pm;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,10 @@
|
|||||||
package org.dromara.xzd.biddingManagement.postAnalysis.service.impl;
|
package org.dromara.xzd.biddingManagement.postAnalysis.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessTaskEvent;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
@ -10,6 +14,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.dromara.system.service.impl.SysOssServiceImpl;
|
import org.dromara.system.service.impl.SysOssServiceImpl;
|
||||||
|
import org.dromara.xzd.biddingManagement.biddingDocumentList.domain.XzdBiddingDocument;
|
||||||
import org.dromara.xzd.biddingManagement.postAnalysis.domain.XzdBhfxDwpm;
|
import org.dromara.xzd.biddingManagement.postAnalysis.domain.XzdBhfxDwpm;
|
||||||
import org.dromara.xzd.biddingManagement.postAnalysis.domain.XzdPostBidAnalysis;
|
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.XzdBhfxDwpmBo;
|
||||||
@ -21,6 +26,7 @@ import org.dromara.xzd.biddingManagement.postAnalysis.service.IXzdBhfxDwpmServic
|
|||||||
import org.dromara.xzd.biddingManagement.postAnalysis.service.IXzdPostBidAnalysisService;
|
import org.dromara.xzd.biddingManagement.postAnalysis.service.IXzdPostBidAnalysisService;
|
||||||
import org.dromara.xzd.settlement.domain.vo.XzdJsCgJungonVo;
|
import org.dromara.xzd.settlement.domain.vo.XzdJsCgJungonVo;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.event.EventListener;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
|
||||||
@ -34,6 +40,7 @@ import java.util.*;
|
|||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class XzdPostBidAnalysisServiceImpl extends ServiceImpl<XzdPostBidAnalysisMapper, XzdPostBidAnalysis> implements IXzdPostBidAnalysisService {
|
public class XzdPostBidAnalysisServiceImpl extends ServiceImpl<XzdPostBidAnalysisMapper, XzdPostBidAnalysis> implements IXzdPostBidAnalysisService {
|
||||||
|
|
||||||
private final XzdPostBidAnalysisMapper baseMapper;
|
private final XzdPostBidAnalysisMapper baseMapper;
|
||||||
@ -191,4 +198,53 @@ public class XzdPostBidAnalysisServiceImpl extends ServiceImpl<XzdPostBidAnalysi
|
|||||||
}
|
}
|
||||||
return baseMapper.deleteByIds(ids) > 0;
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等)
|
||||||
|
* 正常使用只需#processEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processEvent 参数
|
||||||
|
*/
|
||||||
|
@org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('xzdbhfx')")
|
||||||
|
public void processPlansHandlErequipmentList(ProcessEvent processEvent) {
|
||||||
|
log.info("标后分析审核任务执行了{}", processEvent.toString());
|
||||||
|
String id = processEvent.getBusinessId();
|
||||||
|
XzdPostBidAnalysis vo = baseMapper.selectById(Long.valueOf(id));
|
||||||
|
if (vo == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
vo.setAuditStatus(processEvent.getStatus());
|
||||||
|
this.updateById(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行任务创建监听
|
||||||
|
* 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断
|
||||||
|
* 在方法中判断流程节点key
|
||||||
|
* if ("xxx".equals(processTaskEvent.getNodeCode())) {
|
||||||
|
* //执行业务逻辑
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* @param processTaskEvent 参数
|
||||||
|
*/
|
||||||
|
@org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdbhfx')")
|
||||||
|
public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) {
|
||||||
|
log.info("标后分析审核任务创建了{}", processTaskEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监听删除流程事件
|
||||||
|
* 正常使用只需#processDeleteEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processDeleteEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdbhfx')")
|
||||||
|
public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) {
|
||||||
|
log.info("标后分析删除流程事件,标后分析审核任务执行了{}", processDeleteEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -61,7 +61,7 @@ public class XzdCsContractChangeController extends BaseController {
|
|||||||
*
|
*
|
||||||
* @param id 主键
|
* @param id 主键
|
||||||
*/
|
*/
|
||||||
// @SaCheckPermission("comprehensive:csContractChange:query")
|
@SaCheckPermission("comprehensive:csContractChange:query")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public R<XzdCsContractChangeVo> getInfo(@NotNull(message = "主键不能为空")
|
public R<XzdCsContractChangeVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long id) {
|
@PathVariable Long id) {
|
||||||
|
|||||||
@ -70,7 +70,7 @@ public class XzdCsContractInformationController extends BaseController {
|
|||||||
*
|
*
|
||||||
* @param id 主键
|
* @param id 主键
|
||||||
*/
|
*/
|
||||||
// @SaCheckPermission("comprehensive:csContractInformation:query")
|
@SaCheckPermission("comprehensive:csContractInformation:query")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public R<XzdCsContractInformationVo> getInfo(@NotNull(message = "主键不能为空")
|
public R<XzdCsContractInformationVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long id) {
|
@PathVariable Long id) {
|
||||||
|
|||||||
@ -61,7 +61,7 @@ public class XzdCsContractSuspendController extends BaseController {
|
|||||||
*
|
*
|
||||||
* @param id 主键
|
* @param id 主键
|
||||||
*/
|
*/
|
||||||
// @SaCheckPermission("comprehensive:csContractSuspend:query")
|
@SaCheckPermission("comprehensive:csContractSuspend:query")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public R<XzdCsContractSuspendVo> getInfo(@NotNull(message = "主键不能为空")
|
public R<XzdCsContractSuspendVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long id) {
|
@PathVariable Long id) {
|
||||||
|
|||||||
@ -213,4 +213,10 @@ public class XzdCsContractChange extends BaseEntity {
|
|||||||
private String fileId;
|
private String fileId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -242,6 +242,11 @@ public class XzdCsContractInformation extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String fileId;
|
private String fileId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门id
|
* 部门id
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -221,6 +221,12 @@ public class XzdCsContractChangeBo extends BaseEntity {
|
|||||||
private String fileId;
|
private String fileId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 扣款与奖励项
|
* 扣款与奖励项
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -265,6 +265,12 @@ public class XzdCsContractInformationBo extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String fileId;
|
private String fileId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 扣款与奖励项
|
* 扣款与奖励项
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -280,6 +280,12 @@ public class XzdCsContractChangeVo implements Serializable {
|
|||||||
@ExcelProperty(value = "文件id")
|
@ExcelProperty(value = "文件id")
|
||||||
private String fileId;
|
private String fileId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 扣款与奖励项
|
* 扣款与奖励项
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -329,6 +329,12 @@ public class XzdCsContractInformationVo implements Serializable {
|
|||||||
@ExcelProperty(value = "文件id")
|
@ExcelProperty(value = "文件id")
|
||||||
private String fileId;
|
private String fileId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 扣款与奖励项
|
* 扣款与奖励项
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1,7 +1,11 @@
|
|||||||
package org.dromara.xzd.comprehensive.service.impl;
|
package org.dromara.xzd.comprehensive.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.dromara.common.core.domain.R;
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessTaskEvent;
|
||||||
import org.dromara.common.core.exception.ServiceException;
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
@ -16,6 +20,7 @@ import org.dromara.system.service.ISysDeptService;
|
|||||||
import org.dromara.system.service.ISysUserService;
|
import org.dromara.system.service.ISysUserService;
|
||||||
import org.dromara.system.service.impl.SysDeptServiceImpl;
|
import org.dromara.system.service.impl.SysDeptServiceImpl;
|
||||||
import org.dromara.system.service.impl.SysOssServiceImpl;
|
import org.dromara.system.service.impl.SysOssServiceImpl;
|
||||||
|
import org.dromara.tender.domain.BusBLimitListVersions;
|
||||||
import org.dromara.xzd.comprehensive.domain.XzdCsContractInformation;
|
import org.dromara.xzd.comprehensive.domain.XzdCsContractInformation;
|
||||||
import org.dromara.xzd.comprehensive.domain.XzdCsContractSuspendZfkx;
|
import org.dromara.xzd.comprehensive.domain.XzdCsContractSuspendZfkx;
|
||||||
import org.dromara.xzd.comprehensive.domain.XzdHtglHtbgqd;
|
import org.dromara.xzd.comprehensive.domain.XzdHtglHtbgqd;
|
||||||
@ -32,6 +37,7 @@ import org.dromara.xzd.enums.XzdClassEnum;
|
|||||||
import org.dromara.xzd.service.IXzdCorrespondentList;
|
import org.dromara.xzd.service.IXzdCorrespondentList;
|
||||||
import org.dromara.xzd.service.impl.*;
|
import org.dromara.xzd.service.impl.*;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.event.EventListener;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.dromara.xzd.comprehensive.domain.bo.XzdCsContractChangeBo;
|
import org.dromara.xzd.comprehensive.domain.bo.XzdCsContractChangeBo;
|
||||||
import org.dromara.xzd.comprehensive.domain.vo.XzdCsContractChangeVo;
|
import org.dromara.xzd.comprehensive.domain.vo.XzdCsContractChangeVo;
|
||||||
@ -50,6 +56,7 @@ import java.util.*;
|
|||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class XzdCsContractChangeServiceImpl extends ServiceImpl<XzdCsContractChangeMapper, XzdCsContractChange> implements IXzdCsContractChangeService {
|
public class XzdCsContractChangeServiceImpl extends ServiceImpl<XzdCsContractChangeMapper, XzdCsContractChange> implements IXzdCsContractChangeService {
|
||||||
|
|
||||||
private final XzdCsContractChangeMapper baseMapper;
|
private final XzdCsContractChangeMapper baseMapper;
|
||||||
@ -112,6 +119,7 @@ public class XzdCsContractChangeServiceImpl extends ServiceImpl<XzdCsContractCha
|
|||||||
Map<String, Object> params = bo.getParams();
|
Map<String, Object> params = bo.getParams();
|
||||||
LambdaQueryWrapper<XzdCsContractChange> lqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<XzdCsContractChange> lqw = Wrappers.lambdaQuery();
|
||||||
lqw.orderByDesc(XzdCsContractChange::getId);
|
lqw.orderByDesc(XzdCsContractChange::getId);
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getAuditStatus()), XzdCsContractChange::getAuditStatus, bo.getAuditStatus());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getDocCode()), XzdCsContractChange::getDocCode, bo.getDocCode());
|
lqw.eq(StringUtils.isNotBlank(bo.getDocCode()), XzdCsContractChange::getDocCode, bo.getDocCode());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), XzdCsContractChange::getTitle, bo.getTitle());
|
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), XzdCsContractChange::getTitle, bo.getTitle());
|
||||||
lqw.eq(bo.getDocDate() != null, XzdCsContractChange::getDocDate, bo.getDocDate());
|
lqw.eq(bo.getDocDate() != null, XzdCsContractChange::getDocDate, bo.getDocDate());
|
||||||
@ -351,4 +359,49 @@ public class XzdCsContractChangeServiceImpl extends ServiceImpl<XzdCsContractCha
|
|||||||
List<XzdHtglHtbgqd> list4 = xzdHtglHtbgqdService.getBaseMapper().selectList(new LambdaQueryWrapper<XzdHtglHtbgqd>().eq(XzdHtglHtbgqd::getMainDocumentId, vo.getId()));
|
List<XzdHtglHtbgqd> list4 = xzdHtglHtbgqdService.getBaseMapper().selectList(new LambdaQueryWrapper<XzdHtglHtbgqd>().eq(XzdHtglHtbgqd::getMainDocumentId, vo.getId()));
|
||||||
vo.setHtbgqds(list4);
|
vo.setHtbgqds(list4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等)
|
||||||
|
* 正常使用只需#processEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processEvent 参数
|
||||||
|
*/
|
||||||
|
@org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('xzdCsContractChange')")
|
||||||
|
public void processPlansHandlErequipmentList(ProcessEvent processEvent) {
|
||||||
|
log.info("综合服务合同变更审核任务执行了{}", processEvent.toString());
|
||||||
|
String id = processEvent.getBusinessId();
|
||||||
|
XzdCsContractChange xzdCsContractChange = baseMapper.selectById(Long.valueOf(id));
|
||||||
|
if (xzdCsContractChange == null){return;}
|
||||||
|
xzdCsContractChange.setAuditStatus(processEvent.getStatus());
|
||||||
|
baseMapper.updateById(xzdCsContractChange);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行任务创建监听
|
||||||
|
* 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断
|
||||||
|
* 在方法中判断流程节点key
|
||||||
|
* if ("xxx".equals(processTaskEvent.getNodeCode())) {
|
||||||
|
* //执行业务逻辑
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* @param processTaskEvent 参数
|
||||||
|
*/
|
||||||
|
@org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdCsContractChange')")
|
||||||
|
public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) {
|
||||||
|
log.info("综合服务合同变更审核任务创建了{}", processTaskEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监听删除流程事件
|
||||||
|
* 正常使用只需#processDeleteEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processDeleteEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdCsContractChange')")
|
||||||
|
public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) {
|
||||||
|
log.info("综合服务合同变更计划删除流程事件,技术标准文件审核任务执行了{}", processDeleteEvent.toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,11 @@ import cn.hutool.core.util.ObjectUtil;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import io.github.linpeilie.annotations.AutoMapper;
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.dromara.common.core.domain.R;
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessTaskEvent;
|
||||||
import org.dromara.common.core.exception.ServiceException;
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
import org.dromara.common.core.service.XzdCsContractInformationService;
|
import org.dromara.common.core.service.XzdCsContractInformationService;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
@ -22,6 +26,7 @@ import org.dromara.system.domain.vo.SysDeptVo;
|
|||||||
import org.dromara.system.service.ISysUserService;
|
import org.dromara.system.service.ISysUserService;
|
||||||
import org.dromara.system.service.impl.SysDeptServiceImpl;
|
import org.dromara.system.service.impl.SysDeptServiceImpl;
|
||||||
import org.dromara.system.service.impl.SysOssServiceImpl;
|
import org.dromara.system.service.impl.SysOssServiceImpl;
|
||||||
|
import org.dromara.xzd.comprehensive.domain.XzdCsContractChange;
|
||||||
import org.dromara.xzd.comprehensive.domain.XzdCsContractSuspendZfkx;
|
import org.dromara.xzd.comprehensive.domain.XzdCsContractSuspendZfkx;
|
||||||
import org.dromara.xzd.comprehensive.domain.XzdHtglHtbgqd;
|
import org.dromara.xzd.comprehensive.domain.XzdHtglHtbgqd;
|
||||||
import org.dromara.xzd.comprehensive.service.IXzdCsContractSuspendZfkxService;
|
import org.dromara.xzd.comprehensive.service.IXzdCsContractSuspendZfkxService;
|
||||||
@ -39,6 +44,7 @@ import org.dromara.xzd.service.IXzdCorrespondentList;
|
|||||||
import org.dromara.xzd.service.impl.*;
|
import org.dromara.xzd.service.impl.*;
|
||||||
import org.dromara.xzd.settlement.domain.vo.XzdJsCgJungonVo;
|
import org.dromara.xzd.settlement.domain.vo.XzdJsCgJungonVo;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.event.EventListener;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.dromara.xzd.comprehensive.domain.bo.XzdCsContractInformationBo;
|
import org.dromara.xzd.comprehensive.domain.bo.XzdCsContractInformationBo;
|
||||||
import org.dromara.xzd.comprehensive.domain.vo.XzdCsContractInformationVo;
|
import org.dromara.xzd.comprehensive.domain.vo.XzdCsContractInformationVo;
|
||||||
@ -57,6 +63,7 @@ import java.util.*;
|
|||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class XzdCsContractInformationServiceImpl extends ServiceImpl<XzdCsContractInformationMapper, XzdCsContractInformation> implements IXzdCsContractInformationService, XzdCsContractInformationService {
|
public class XzdCsContractInformationServiceImpl extends ServiceImpl<XzdCsContractInformationMapper, XzdCsContractInformation> implements IXzdCsContractInformationService, XzdCsContractInformationService {
|
||||||
|
|
||||||
private final XzdCsContractInformationMapper baseMapper;
|
private final XzdCsContractInformationMapper baseMapper;
|
||||||
@ -147,6 +154,7 @@ public class XzdCsContractInformationServiceImpl extends ServiceImpl<XzdCsContra
|
|||||||
LambdaQueryWrapper<XzdCsContractInformation> lqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<XzdCsContractInformation> lqw = Wrappers.lambdaQuery();
|
||||||
lqw.orderByDesc(XzdCsContractInformation::getId);
|
lqw.orderByDesc(XzdCsContractInformation::getId);
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getContractCode()), XzdCsContractInformation::getContractCode, bo.getContractCode());
|
lqw.eq(StringUtils.isNotBlank(bo.getContractCode()), XzdCsContractInformation::getContractCode, bo.getContractCode());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getAuditStatus()), XzdCsContractInformation::getAuditStatus, bo.getAuditStatus());
|
||||||
lqw.like(StringUtils.isNotBlank(bo.getContractName()), XzdCsContractInformation::getContractName, bo.getContractName());
|
lqw.like(StringUtils.isNotBlank(bo.getContractName()), XzdCsContractInformation::getContractName, bo.getContractName());
|
||||||
lqw.eq(bo.getDocumentDate() != null, XzdCsContractInformation::getDocumentDate, bo.getDocumentDate());
|
lqw.eq(bo.getDocumentDate() != null, XzdCsContractInformation::getDocumentDate, bo.getDocumentDate());
|
||||||
lqw.eq(bo.getDeptId() != null, XzdCsContractInformation::getDeptId, bo.getDeptId());
|
lqw.eq(bo.getDeptId() != null, XzdCsContractInformation::getDeptId, bo.getDeptId());
|
||||||
@ -382,4 +390,50 @@ public class XzdCsContractInformationServiceImpl extends ServiceImpl<XzdCsContra
|
|||||||
}
|
}
|
||||||
return String.join(StringUtils.SEPARATOR, list);
|
return String.join(StringUtils.SEPARATOR, list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等)
|
||||||
|
* 正常使用只需#processEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processEvent 参数
|
||||||
|
*/
|
||||||
|
@org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('xzdCsContractInfo')")
|
||||||
|
public void processPlansHandlErequipmentList(ProcessEvent processEvent) {
|
||||||
|
log.info("综合服务合同信息审核任务执行了{}", processEvent.toString());
|
||||||
|
String id = processEvent.getBusinessId();
|
||||||
|
XzdCsContractInformation xzdCsContractInformation = baseMapper.selectById(Long.valueOf(id));
|
||||||
|
if (xzdCsContractInformation == null){return;}
|
||||||
|
xzdCsContractInformation.setAuditStatus(processEvent.getStatus());
|
||||||
|
baseMapper.updateById(xzdCsContractInformation);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行任务创建监听
|
||||||
|
* 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断
|
||||||
|
* 在方法中判断流程节点key
|
||||||
|
* if ("xxx".equals(processTaskEvent.getNodeCode())) {
|
||||||
|
* //执行业务逻辑
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* @param processTaskEvent 参数
|
||||||
|
*/
|
||||||
|
@org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdCsContractInfo')")
|
||||||
|
public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) {
|
||||||
|
log.info("综合服务合同信息审核任务创建了{}", processTaskEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监听删除流程事件
|
||||||
|
* 正常使用只需#processDeleteEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processDeleteEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdCsContractInfo')")
|
||||||
|
public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) {
|
||||||
|
log.info("综合服务合同信息计划删除流程事件,技术标准文件审核任务执行了{}", processDeleteEvent.toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,11 @@
|
|||||||
package org.dromara.xzd.comprehensive.service.impl;
|
package org.dromara.xzd.comprehensive.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.dromara.common.core.domain.R;
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessTaskEvent;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
@ -13,6 +17,7 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import org.dromara.system.domain.vo.SysDeptVo;
|
import org.dromara.system.domain.vo.SysDeptVo;
|
||||||
import org.dromara.system.service.impl.SysDeptServiceImpl;
|
import org.dromara.system.service.impl.SysDeptServiceImpl;
|
||||||
import org.dromara.system.service.impl.SysOssServiceImpl;
|
import org.dromara.system.service.impl.SysOssServiceImpl;
|
||||||
|
import org.dromara.xzd.comprehensive.domain.XzdCsContractInformation;
|
||||||
import org.dromara.xzd.comprehensive.domain.vo.XzdCsContractInformationVo;
|
import org.dromara.xzd.comprehensive.domain.vo.XzdCsContractInformationVo;
|
||||||
import org.dromara.xzd.domain.dto.QuerCorrespondentDto;
|
import org.dromara.xzd.domain.dto.QuerCorrespondentDto;
|
||||||
import org.dromara.xzd.domain.vo.XzdProjectVo;
|
import org.dromara.xzd.domain.vo.XzdProjectVo;
|
||||||
@ -20,6 +25,7 @@ import org.dromara.xzd.domain.vo.XzdSupplierInfoVo;
|
|||||||
import org.dromara.xzd.service.IXzdCorrespondentList;
|
import org.dromara.xzd.service.IXzdCorrespondentList;
|
||||||
import org.dromara.xzd.service.impl.*;
|
import org.dromara.xzd.service.impl.*;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.event.EventListener;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.dromara.xzd.comprehensive.domain.bo.XzdCsContractSuspendBo;
|
import org.dromara.xzd.comprehensive.domain.bo.XzdCsContractSuspendBo;
|
||||||
import org.dromara.xzd.comprehensive.domain.vo.XzdCsContractSuspendVo;
|
import org.dromara.xzd.comprehensive.domain.vo.XzdCsContractSuspendVo;
|
||||||
@ -38,6 +44,7 @@ import java.util.*;
|
|||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class XzdCsContractSuspendServiceImpl extends ServiceImpl<XzdCsContractSuspendMapper, XzdCsContractSuspend> implements IXzdCsContractSuspendService {
|
public class XzdCsContractSuspendServiceImpl extends ServiceImpl<XzdCsContractSuspendMapper, XzdCsContractSuspend> implements IXzdCsContractSuspendService {
|
||||||
|
|
||||||
private final XzdCsContractSuspendMapper baseMapper;
|
private final XzdCsContractSuspendMapper baseMapper;
|
||||||
@ -172,4 +179,50 @@ public class XzdCsContractSuspendServiceImpl extends ServiceImpl<XzdCsContractSu
|
|||||||
}
|
}
|
||||||
return baseMapper.deleteByIds(ids) > 0;
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等)
|
||||||
|
* 正常使用只需#processEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processEvent 参数
|
||||||
|
*/
|
||||||
|
@org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('xzdCsContractSuspend')")
|
||||||
|
public void processPlansHandlErequipmentList(ProcessEvent processEvent) {
|
||||||
|
log.info("综合服务合同终止审核任务执行了{}", processEvent.toString());
|
||||||
|
String id = processEvent.getBusinessId();
|
||||||
|
XzdCsContractSuspend xzdCsContractSuspend = baseMapper.selectById(Long.valueOf(id));
|
||||||
|
if (xzdCsContractSuspend == null){return;}
|
||||||
|
xzdCsContractSuspend.setAuditStatus(processEvent.getStatus());
|
||||||
|
baseMapper.updateById(xzdCsContractSuspend);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行任务创建监听
|
||||||
|
* 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断
|
||||||
|
* 在方法中判断流程节点key
|
||||||
|
* if ("xxx".equals(processTaskEvent.getNodeCode())) {
|
||||||
|
* //执行业务逻辑
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* @param processTaskEvent 参数
|
||||||
|
*/
|
||||||
|
@org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdCsContractSuspend')")
|
||||||
|
public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) {
|
||||||
|
log.info("综合服务合同终止审核任务创建了{}", processTaskEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监听删除流程事件
|
||||||
|
* 正常使用只需#processDeleteEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processDeleteEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdCsContractSuspend')")
|
||||||
|
public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) {
|
||||||
|
log.info("综合服务合同终止计划删除流程事件,技术标准文件审核任务执行了{}", processDeleteEvent.toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,11 @@
|
|||||||
package org.dromara.xzd.contractManagement.caigoucontractTermination.service.impl;
|
package org.dromara.xzd.contractManagement.caigoucontractTermination.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.dromara.common.core.domain.R;
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessTaskEvent;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
@ -13,6 +17,7 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import org.dromara.common.utils.BatchNumberGenerator;
|
import org.dromara.common.utils.BatchNumberGenerator;
|
||||||
import org.dromara.system.service.impl.SysOssServiceImpl;
|
import org.dromara.system.service.impl.SysOssServiceImpl;
|
||||||
import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.vo.XzdBidPreProjectVo;
|
import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.vo.XzdBidPreProjectVo;
|
||||||
|
import org.dromara.xzd.contractManagement.caigouhetongbiangeng.domain.XzdPurchaseContractAlteration;
|
||||||
import org.dromara.xzd.contractManagement.purchaseManagement.domain.XzdPurchaseContractInformation;
|
import org.dromara.xzd.contractManagement.purchaseManagement.domain.XzdPurchaseContractInformation;
|
||||||
import org.dromara.xzd.contractManagement.purchaseManagement.domain.vo.XzdPurchaseContractInformationVo;
|
import org.dromara.xzd.contractManagement.purchaseManagement.domain.vo.XzdPurchaseContractInformationVo;
|
||||||
import org.dromara.xzd.contractManagement.purchaseManagement.service.IXzdPurchaseContractInformationService;
|
import org.dromara.xzd.contractManagement.purchaseManagement.service.IXzdPurchaseContractInformationService;
|
||||||
@ -24,6 +29,7 @@ import org.dromara.xzd.service.impl.XzdSupplierInfoServiceImpl;
|
|||||||
import org.dromara.xzd.settlement.fenbaohetongjungong.domain.vo.SettlementOfSubcontractingCompletionVo;
|
import org.dromara.xzd.settlement.fenbaohetongjungong.domain.vo.SettlementOfSubcontractingCompletionVo;
|
||||||
import org.dromara.xzd.utilS.AreaUtil;
|
import org.dromara.xzd.utilS.AreaUtil;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.event.EventListener;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.dromara.xzd.contractManagement.caigoucontractTermination.domain.bo.XzdPurchaseContractSuspendBo;
|
import org.dromara.xzd.contractManagement.caigoucontractTermination.domain.bo.XzdPurchaseContractSuspendBo;
|
||||||
import org.dromara.xzd.contractManagement.caigoucontractTermination.domain.vo.XzdPurchaseContractSuspendVo;
|
import org.dromara.xzd.contractManagement.caigoucontractTermination.domain.vo.XzdPurchaseContractSuspendVo;
|
||||||
@ -46,6 +52,7 @@ import java.util.stream.Collectors;
|
|||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class XzdPurchaseContractSuspendServiceImpl extends ServiceImpl<XzdPurchaseContractSuspendMapper, XzdPurchaseContractSuspend> implements IXzdPurchaseContractSuspendService {
|
public class XzdPurchaseContractSuspendServiceImpl extends ServiceImpl<XzdPurchaseContractSuspendMapper, XzdPurchaseContractSuspend> implements IXzdPurchaseContractSuspendService {
|
||||||
|
|
||||||
private final XzdPurchaseContractSuspendMapper baseMapper;
|
private final XzdPurchaseContractSuspendMapper baseMapper;
|
||||||
@ -219,4 +226,56 @@ public class XzdPurchaseContractSuspendServiceImpl extends ServiceImpl<XzdPurcha
|
|||||||
|
|
||||||
return baseMapper.deleteByIds(ids) > 0;
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等)
|
||||||
|
* 正常使用只需#processEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processEvent 参数
|
||||||
|
*/
|
||||||
|
@org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('xzdcghtzz')")
|
||||||
|
public void processPlansHandlErequipmentList(ProcessEvent processEvent) {
|
||||||
|
log.info("采购合同终止审核任务执行了{}", processEvent.toString());
|
||||||
|
String id = processEvent.getBusinessId();
|
||||||
|
XzdPurchaseContractSuspend vo = baseMapper.selectById(Long.valueOf(id));
|
||||||
|
if (vo == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
vo.setAuditStatus(processEvent.getStatus());
|
||||||
|
this.updateById(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行任务创建监听
|
||||||
|
* 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断
|
||||||
|
* 在方法中判断流程节点key
|
||||||
|
* if ("xxx".equals(processTaskEvent.getNodeCode())) {
|
||||||
|
* //执行业务逻辑
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* @param processTaskEvent 参数
|
||||||
|
*/
|
||||||
|
@org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdcghtzz')")
|
||||||
|
public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) {
|
||||||
|
log.info("采购合同终止审核任务创建了{}", processTaskEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监听删除流程事件
|
||||||
|
* 正常使用只需#processDeleteEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processDeleteEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdcghtzz')")
|
||||||
|
public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) {
|
||||||
|
log.info("采购合同终止删除流程事件,采购合同终止审核任务执行了{}", processDeleteEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,11 @@
|
|||||||
package org.dromara.xzd.contractManagement.caigouhetongbiangeng.service.impl;
|
package org.dromara.xzd.contractManagement.caigouhetongbiangeng.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.dromara.common.core.domain.R;
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessTaskEvent;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
@ -16,6 +20,7 @@ import org.dromara.xzd.comprehensive.domain.XzdHtglHtbgqd;
|
|||||||
import org.dromara.xzd.comprehensive.domain.XzdHtglHthzsj;
|
import org.dromara.xzd.comprehensive.domain.XzdHtglHthzsj;
|
||||||
import org.dromara.xzd.comprehensive.service.IXzdHtglHtbgqdService;
|
import org.dromara.xzd.comprehensive.service.IXzdHtglHtbgqdService;
|
||||||
import org.dromara.xzd.comprehensive.service.IXzdHtglHthzsjService;
|
import org.dromara.xzd.comprehensive.service.IXzdHtglHthzsjService;
|
||||||
|
import org.dromara.xzd.contractManagement.purchaseManagement.domain.XzdPurchaseContractInformation;
|
||||||
import org.dromara.xzd.contractManagement.purchaseManagement.domain.vo.XzdPurchaseContractInformationVo;
|
import org.dromara.xzd.contractManagement.purchaseManagement.domain.vo.XzdPurchaseContractInformationVo;
|
||||||
import org.dromara.xzd.contractManagement.purchaseManagement.service.IXzdPurchaseContractInformationService;
|
import org.dromara.xzd.contractManagement.purchaseManagement.service.IXzdPurchaseContractInformationService;
|
||||||
import org.dromara.xzd.domain.*;
|
import org.dromara.xzd.domain.*;
|
||||||
@ -27,6 +32,7 @@ import org.dromara.xzd.service.IXzdCorrespondentList;
|
|||||||
import org.dromara.xzd.service.IXzdDeductionItemsService;
|
import org.dromara.xzd.service.IXzdDeductionItemsService;
|
||||||
import org.dromara.xzd.service.impl.*;
|
import org.dromara.xzd.service.impl.*;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.event.EventListener;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.dromara.xzd.contractManagement.caigouhetongbiangeng.domain.bo.XzdPurchaseContractAlterationBo;
|
import org.dromara.xzd.contractManagement.caigouhetongbiangeng.domain.bo.XzdPurchaseContractAlterationBo;
|
||||||
import org.dromara.xzd.contractManagement.caigouhetongbiangeng.domain.vo.XzdPurchaseContractAlterationVo;
|
import org.dromara.xzd.contractManagement.caigouhetongbiangeng.domain.vo.XzdPurchaseContractAlterationVo;
|
||||||
@ -44,6 +50,7 @@ import java.util.*;
|
|||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class XzdPurchaseContractAlterationServiceImpl extends ServiceImpl<XzdPurchaseContractAlterationMapper, XzdPurchaseContractAlteration> implements IXzdPurchaseContractAlterationService {
|
public class XzdPurchaseContractAlterationServiceImpl extends ServiceImpl<XzdPurchaseContractAlterationMapper, XzdPurchaseContractAlteration> implements IXzdPurchaseContractAlterationService {
|
||||||
|
|
||||||
private final XzdPurchaseContractAlterationMapper baseMapper;
|
private final XzdPurchaseContractAlterationMapper baseMapper;
|
||||||
@ -395,4 +402,54 @@ public class XzdPurchaseContractAlterationServiceImpl extends ServiceImpl<XzdPur
|
|||||||
}
|
}
|
||||||
return baseMapper.deleteByIds(ids) > 0;
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等)
|
||||||
|
* 正常使用只需#processEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processEvent 参数
|
||||||
|
*/
|
||||||
|
@org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('xzdcghtbg')")
|
||||||
|
public void processPlansHandlErequipmentList(ProcessEvent processEvent) {
|
||||||
|
log.info("采购合同变更审核任务执行了{}", processEvent.toString());
|
||||||
|
String id = processEvent.getBusinessId();
|
||||||
|
XzdPurchaseContractAlteration vo = baseMapper.selectById(Long.valueOf(id));
|
||||||
|
if (vo == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
vo.setAuditStatus(processEvent.getStatus());
|
||||||
|
this.updateById(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行任务创建监听
|
||||||
|
* 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断
|
||||||
|
* 在方法中判断流程节点key
|
||||||
|
* if ("xxx".equals(processTaskEvent.getNodeCode())) {
|
||||||
|
* //执行业务逻辑
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* @param processTaskEvent 参数
|
||||||
|
*/
|
||||||
|
@org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdcghtbg')")
|
||||||
|
public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) {
|
||||||
|
log.info("采购合同变更审核任务创建了{}", processTaskEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监听删除流程事件
|
||||||
|
* 正常使用只需#processDeleteEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processDeleteEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdcghtbg')")
|
||||||
|
public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) {
|
||||||
|
log.info("采购合同变更删除流程事件,采购合同变更审核任务执行了{}", processDeleteEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,6 +34,12 @@ public class XzdSubcontractChange extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String documentCode;
|
private String documentCode;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标题
|
* 标题
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -77,6 +77,12 @@ public class XzdSubcontractChangeBo extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String projectName;
|
private String projectName;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 经营模式
|
* 经营模式
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -69,6 +69,12 @@ public class XzdSubcontractChangeVo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String contractText;
|
private String contractText;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 合同编码
|
* 合同编码
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -2,6 +2,10 @@ package org.dromara.xzd.contractManagement.fenbaohetongbiangg.service.impl;
|
|||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessTaskEvent;
|
||||||
import org.dromara.common.core.exception.ServiceException;
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
@ -16,6 +20,7 @@ import org.dromara.system.service.impl.SysOssServiceImpl;
|
|||||||
import org.dromara.xzd.comprehensive.domain.XzdHtglHtbgqd;
|
import org.dromara.xzd.comprehensive.domain.XzdHtglHtbgqd;
|
||||||
import org.dromara.xzd.comprehensive.service.IXzdHtglHtbgqdService;
|
import org.dromara.xzd.comprehensive.service.IXzdHtglHtbgqdService;
|
||||||
import org.dromara.xzd.contractManagement.caigouhetongbiangeng.domain.vo.XzdPurchaseContractAlterationVo;
|
import org.dromara.xzd.contractManagement.caigouhetongbiangeng.domain.vo.XzdPurchaseContractAlterationVo;
|
||||||
|
import org.dromara.xzd.contractManagement.fenbaohetongxinxi.domain.XzdSubcontract;
|
||||||
import org.dromara.xzd.contractManagement.fenbaohetongxinxi.domain.vo.XzdSubcontractVo;
|
import org.dromara.xzd.contractManagement.fenbaohetongxinxi.domain.vo.XzdSubcontractVo;
|
||||||
import org.dromara.xzd.contractManagement.fenbaohetongxinxi.service.IXzdSubcontractService;
|
import org.dromara.xzd.contractManagement.fenbaohetongxinxi.service.IXzdSubcontractService;
|
||||||
import org.dromara.xzd.contractManagement.purchaseManagement.service.IXzdPurchaseContractInformationService;
|
import org.dromara.xzd.contractManagement.purchaseManagement.service.IXzdPurchaseContractInformationService;
|
||||||
@ -29,6 +34,7 @@ import org.dromara.xzd.service.impl.XzdContractClauseServiceImpl;
|
|||||||
import org.dromara.xzd.service.impl.XzdDeductionItemsServiceImpl;
|
import org.dromara.xzd.service.impl.XzdDeductionItemsServiceImpl;
|
||||||
import org.dromara.xzd.service.impl.XzdSettlementRulesServiceImpl;
|
import org.dromara.xzd.service.impl.XzdSettlementRulesServiceImpl;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.event.EventListener;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.dromara.xzd.contractManagement.fenbaohetongbiangg.domain.bo.XzdSubcontractChangeBo;
|
import org.dromara.xzd.contractManagement.fenbaohetongbiangg.domain.bo.XzdSubcontractChangeBo;
|
||||||
import org.dromara.xzd.contractManagement.fenbaohetongbiangg.domain.vo.XzdSubcontractChangeVo;
|
import org.dromara.xzd.contractManagement.fenbaohetongbiangg.domain.vo.XzdSubcontractChangeVo;
|
||||||
@ -46,6 +52,7 @@ import java.util.*;
|
|||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class XzdSubcontractChangeServiceImpl extends ServiceImpl<XzdSubcontractChangeMapper, XzdSubcontractChange> implements IXzdSubcontractChangeService {
|
public class XzdSubcontractChangeServiceImpl extends ServiceImpl<XzdSubcontractChangeMapper, XzdSubcontractChange> implements IXzdSubcontractChangeService {
|
||||||
|
|
||||||
private final XzdSubcontractChangeMapper baseMapper;
|
private final XzdSubcontractChangeMapper baseMapper;
|
||||||
@ -382,4 +389,55 @@ public class XzdSubcontractChangeServiceImpl extends ServiceImpl<XzdSubcontractC
|
|||||||
xzdHtglHtbgqdService.remove(new LambdaQueryWrapper<XzdHtglHtbgqd>().in(XzdHtglHtbgqd::getMainDocumentId,ids));
|
xzdHtglHtbgqdService.remove(new LambdaQueryWrapper<XzdHtglHtbgqd>().in(XzdHtglHtbgqd::getMainDocumentId,ids));
|
||||||
return baseMapper.deleteByIds(ids) > 0;
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等)
|
||||||
|
* 正常使用只需#processEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processEvent 参数
|
||||||
|
*/
|
||||||
|
@org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('xzdfbhtbg')")
|
||||||
|
public void processPlansHandlErequipmentList(ProcessEvent processEvent) {
|
||||||
|
log.info("分包合同变更审核任务执行了{}", processEvent.toString());
|
||||||
|
String id = processEvent.getBusinessId();
|
||||||
|
XzdSubcontractChange vo = baseMapper.selectById(Long.valueOf(id));
|
||||||
|
if (vo == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
vo.setAuditStatus(processEvent.getStatus());
|
||||||
|
this.updateById(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行任务创建监听
|
||||||
|
* 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断
|
||||||
|
* 在方法中判断流程节点key
|
||||||
|
* if ("xxx".equals(processTaskEvent.getNodeCode())) {
|
||||||
|
* //执行业务逻辑
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* @param processTaskEvent 参数
|
||||||
|
*/
|
||||||
|
@org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdfbhtbg')")
|
||||||
|
public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) {
|
||||||
|
log.info("分包合同变更审核任务创建了{}", processTaskEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监听删除流程事件
|
||||||
|
* 正常使用只需#processDeleteEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processDeleteEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdfbhtbg')")
|
||||||
|
public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) {
|
||||||
|
log.info("分包合同变更删除流程事件,分包合同变更审核任务执行了{}", processDeleteEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -61,7 +61,7 @@ public class XzdSubcontractController extends BaseController {
|
|||||||
*
|
*
|
||||||
* @param id 主键
|
* @param id 主键
|
||||||
*/
|
*/
|
||||||
// @SaCheckPermission("fenbaohetongxinxi:subcontract:query")
|
@SaCheckPermission("fenbaohetongxinxi:subcontract:query")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public R<XzdSubcontractVo> getInfo(@NotNull(message = "主键不能为空")
|
public R<XzdSubcontractVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long id) {
|
@PathVariable Long id) {
|
||||||
|
|||||||
@ -55,6 +55,10 @@ public class XzdSubcontract extends BaseEntity {
|
|||||||
|
|
||||||
private Long deptId;
|
private Long deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
private String auditStatus;
|
||||||
/**
|
/**
|
||||||
* 经营模式
|
* 经营模式
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -48,6 +48,11 @@ public class XzdSubcontractBo extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private LocalDate documentDate;
|
private LocalDate documentDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 合同类型
|
* 合同类型
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -69,6 +69,10 @@ public class XzdSubcontractVo implements Serializable {
|
|||||||
@ExcelProperty(value = "合同类型")
|
@ExcelProperty(value = "合同类型")
|
||||||
private String contractType;
|
private String contractType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
private String auditStatus;
|
||||||
/**
|
/**
|
||||||
* 合同文本
|
* 合同文本
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1,7 +1,11 @@
|
|||||||
package org.dromara.xzd.contractManagement.fenbaohetongxinxi.service.impl;
|
package org.dromara.xzd.contractManagement.fenbaohetongxinxi.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.dromara.common.core.domain.R;
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessTaskEvent;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
@ -27,6 +31,7 @@ import org.dromara.xzd.service.IXzdDeductionItemsService;
|
|||||||
import org.dromara.xzd.service.impl.*;
|
import org.dromara.xzd.service.impl.*;
|
||||||
import org.dromara.xzd.utilS.AreaUtil;
|
import org.dromara.xzd.utilS.AreaUtil;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.event.EventListener;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.dromara.xzd.contractManagement.fenbaohetongxinxi.domain.bo.XzdSubcontractBo;
|
import org.dromara.xzd.contractManagement.fenbaohetongxinxi.domain.bo.XzdSubcontractBo;
|
||||||
import org.dromara.xzd.contractManagement.fenbaohetongxinxi.domain.vo.XzdSubcontractVo;
|
import org.dromara.xzd.contractManagement.fenbaohetongxinxi.domain.vo.XzdSubcontractVo;
|
||||||
@ -47,6 +52,7 @@ import java.util.*;
|
|||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class XzdSubcontractServiceImpl extends ServiceImpl<XzdSubcontractMapper, XzdSubcontract> implements IXzdSubcontractService {
|
public class XzdSubcontractServiceImpl extends ServiceImpl<XzdSubcontractMapper, XzdSubcontract> implements IXzdSubcontractService {
|
||||||
|
|
||||||
private final XzdSubcontractMapper baseMapper;
|
private final XzdSubcontractMapper baseMapper;
|
||||||
@ -419,4 +425,56 @@ public class XzdSubcontractServiceImpl extends ServiceImpl<XzdSubcontractMapper,
|
|||||||
|
|
||||||
return baseMapper.deleteByIds(ids) > 0;
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等)
|
||||||
|
* 正常使用只需#processEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processEvent 参数
|
||||||
|
*/
|
||||||
|
@org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('xzdfbhtxx')")
|
||||||
|
public void processPlansHandlErequipmentList(ProcessEvent processEvent) {
|
||||||
|
log.info("分包合同信息审核任务执行了{}", processEvent.toString());
|
||||||
|
String id = processEvent.getBusinessId();
|
||||||
|
XzdSubcontract vo = baseMapper.selectById(Long.valueOf(id));
|
||||||
|
if (vo == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
vo.setAuditStatus(processEvent.getStatus());
|
||||||
|
this.updateById(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行任务创建监听
|
||||||
|
* 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断
|
||||||
|
* 在方法中判断流程节点key
|
||||||
|
* if ("xxx".equals(processTaskEvent.getNodeCode())) {
|
||||||
|
* //执行业务逻辑
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* @param processTaskEvent 参数
|
||||||
|
*/
|
||||||
|
@org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdfbhtxx')")
|
||||||
|
public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) {
|
||||||
|
log.info("分包合同信息审核任务创建了{}", processTaskEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监听删除流程事件
|
||||||
|
* 正常使用只需#processDeleteEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processDeleteEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdfbhtxx')")
|
||||||
|
public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) {
|
||||||
|
log.info("分包合同信息删除流程事件,分包合同信息审核任务执行了{}", processDeleteEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -90,6 +90,11 @@ public class XzdSubcontractTermination extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private BigDecimal cumulativeSettlementAmount;
|
private BigDecimal cumulativeSettlementAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 累计付款金额
|
* 累计付款金额
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -69,6 +69,11 @@ public class XzdSubcontractTerminationBo extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String partyAUnit;
|
private String partyAUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 乙方单位
|
* 乙方单位
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -97,6 +97,11 @@ public class XzdSubcontractTerminationVo implements Serializable {
|
|||||||
@ExcelProperty(value = "甲方单位")
|
@ExcelProperty(value = "甲方单位")
|
||||||
private String partyAUnit;
|
private String partyAUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 乙方单位
|
* 乙方单位
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1,6 +1,10 @@
|
|||||||
package org.dromara.xzd.contractManagement.fenbaohetongzhongzhi.service.impl;
|
package org.dromara.xzd.contractManagement.fenbaohetongzhongzhi.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessTaskEvent;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
@ -13,10 +17,12 @@ import org.dromara.common.utils.BatchNumberGenerator;
|
|||||||
import org.dromara.system.service.impl.SysOssServiceImpl;
|
import org.dromara.system.service.impl.SysOssServiceImpl;
|
||||||
import org.dromara.xzd.contractManagement.caigoucontractTermination.domain.XzdPurchaseContractSuspend;
|
import org.dromara.xzd.contractManagement.caigoucontractTermination.domain.XzdPurchaseContractSuspend;
|
||||||
import org.dromara.xzd.contractManagement.caigoucontractTermination.domain.vo.XzdPurchaseContractSuspendVo;
|
import org.dromara.xzd.contractManagement.caigoucontractTermination.domain.vo.XzdPurchaseContractSuspendVo;
|
||||||
|
import org.dromara.xzd.contractManagement.fenbaohetongbiangg.domain.XzdSubcontractChange;
|
||||||
import org.dromara.xzd.contractManagement.fenbaohetongxinxi.domain.vo.XzdSubcontractVo;
|
import org.dromara.xzd.contractManagement.fenbaohetongxinxi.domain.vo.XzdSubcontractVo;
|
||||||
import org.dromara.xzd.contractManagement.fenbaohetongxinxi.service.IXzdSubcontractService;
|
import org.dromara.xzd.contractManagement.fenbaohetongxinxi.service.IXzdSubcontractService;
|
||||||
import org.dromara.xzd.utilS.AreaUtil;
|
import org.dromara.xzd.utilS.AreaUtil;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.event.EventListener;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.dromara.xzd.contractManagement.fenbaohetongzhongzhi.domain.bo.XzdSubcontractTerminationBo;
|
import org.dromara.xzd.contractManagement.fenbaohetongzhongzhi.domain.bo.XzdSubcontractTerminationBo;
|
||||||
import org.dromara.xzd.contractManagement.fenbaohetongzhongzhi.domain.vo.XzdSubcontractTerminationVo;
|
import org.dromara.xzd.contractManagement.fenbaohetongzhongzhi.domain.vo.XzdSubcontractTerminationVo;
|
||||||
@ -39,6 +45,7 @@ import java.util.stream.Collectors;
|
|||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class XzdSubcontractTerminationServiceImpl extends ServiceImpl<XzdSubcontractTerminationMapper, XzdSubcontractTermination> implements IXzdSubcontractTerminationService {
|
public class XzdSubcontractTerminationServiceImpl extends ServiceImpl<XzdSubcontractTerminationMapper, XzdSubcontractTermination> implements IXzdSubcontractTerminationService {
|
||||||
|
|
||||||
private final XzdSubcontractTerminationMapper baseMapper;
|
private final XzdSubcontractTerminationMapper baseMapper;
|
||||||
@ -190,4 +197,56 @@ public class XzdSubcontractTerminationServiceImpl extends ServiceImpl<XzdSubcont
|
|||||||
}
|
}
|
||||||
return baseMapper.deleteByIds(ids) > 0;
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等)
|
||||||
|
* 正常使用只需#processEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processEvent 参数
|
||||||
|
*/
|
||||||
|
@org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('xzdfbhtzz')")
|
||||||
|
public void processPlansHandlErequipmentList(ProcessEvent processEvent) {
|
||||||
|
log.info("分包合同终止审核任务执行了{}", processEvent.toString());
|
||||||
|
String id = processEvent.getBusinessId();
|
||||||
|
XzdSubcontractTermination vo = baseMapper.selectById(Long.valueOf(id));
|
||||||
|
if (vo == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
vo.setAuditStatus(processEvent.getStatus());
|
||||||
|
this.updateById(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行任务创建监听
|
||||||
|
* 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断
|
||||||
|
* 在方法中判断流程节点key
|
||||||
|
* if ("xxx".equals(processTaskEvent.getNodeCode())) {
|
||||||
|
* //执行业务逻辑
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* @param processTaskEvent 参数
|
||||||
|
*/
|
||||||
|
@org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdfbhtzz')")
|
||||||
|
public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) {
|
||||||
|
log.info("分包合同终止审核任务创建了{}", processTaskEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监听删除流程事件
|
||||||
|
* 正常使用只需#processDeleteEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processDeleteEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdfbhtzz')")
|
||||||
|
public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) {
|
||||||
|
log.info("分包合同终止删除流程事件,分包合同终止审核任务执行了{}", processDeleteEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -62,7 +62,7 @@ public class XzdPurchaseContractInformationController extends BaseController {
|
|||||||
*
|
*
|
||||||
* @param id 主键
|
* @param id 主键
|
||||||
*/
|
*/
|
||||||
// @SaCheckPermission("contractManagement:purchaseContractInformation:query")
|
@SaCheckPermission("contractManagement:purchaseContractInformation:query")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public R<XzdPurchaseContractInformationVo> getInfo(@NotNull(message = "主键不能为空")
|
public R<XzdPurchaseContractInformationVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long id) {
|
@PathVariable Long id) {
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.*;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
@ -64,7 +65,7 @@ public class XzdPurchaseContractInformation extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 原合同造价
|
* 原合同造价
|
||||||
*/
|
*/
|
||||||
private Long originalContractCost;
|
private BigDecimal originalContractCost;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 签订日期
|
* 签订日期
|
||||||
@ -79,7 +80,7 @@ public class XzdPurchaseContractInformation extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 含税合同金额
|
* 含税合同金额
|
||||||
*/
|
*/
|
||||||
private Long taxInclusiveContractAmount;
|
private BigDecimal taxInclusiveContractAmount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 合同状态,例如:新增
|
* 合同状态,例如:新增
|
||||||
@ -89,7 +90,7 @@ public class XzdPurchaseContractInformation extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 累计变更金额
|
* 累计变更金额
|
||||||
*/
|
*/
|
||||||
private Long cumulativeChangeAmount;
|
private BigDecimal cumulativeChangeAmount;
|
||||||
|
|
||||||
|
|
||||||
private Long deptId;
|
private Long deptId;
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import lombok.Data;
|
|||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import jakarta.validation.constraints.*;
|
import jakarta.validation.constraints.*;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -68,7 +69,7 @@ public class XzdPurchaseContractInformationBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 原合同造价
|
* 原合同造价
|
||||||
*/
|
*/
|
||||||
private Long originalContractCost;
|
private BigDecimal originalContractCost;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 签订日期
|
* 签订日期
|
||||||
@ -85,7 +86,7 @@ public class XzdPurchaseContractInformationBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 含税合同金额
|
* 含税合同金额
|
||||||
*/
|
*/
|
||||||
private Long taxInclusiveContractAmount;
|
private BigDecimal taxInclusiveContractAmount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 合同状态,例如:新增
|
* 合同状态,例如:新增
|
||||||
@ -95,7 +96,7 @@ public class XzdPurchaseContractInformationBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 累计变更金额
|
* 累计变更金额
|
||||||
*/
|
*/
|
||||||
private Long cumulativeChangeAmount;
|
private BigDecimal cumulativeChangeAmount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 归档日期
|
* 归档日期
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package org.dromara.xzd.contractManagement.purchaseManagement.domain.vo;
|
package org.dromara.xzd.contractManagement.purchaseManagement.domain.vo;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@ -102,7 +103,7 @@ public class XzdPurchaseContractInformationVo implements Serializable {
|
|||||||
* 原合同造价
|
* 原合同造价
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "原合同造价")
|
@ExcelProperty(value = "原合同造价")
|
||||||
private Long originalContractCost;
|
private BigDecimal originalContractCost;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 签订日期
|
* 签订日期
|
||||||
@ -127,7 +128,7 @@ public class XzdPurchaseContractInformationVo implements Serializable {
|
|||||||
* 含税合同金额
|
* 含税合同金额
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "含税合同金额")
|
@ExcelProperty(value = "含税合同金额")
|
||||||
private Long taxInclusiveContractAmount;
|
private BigDecimal taxInclusiveContractAmount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 合同状态,例如:新增
|
* 合同状态,例如:新增
|
||||||
@ -139,7 +140,7 @@ public class XzdPurchaseContractInformationVo implements Serializable {
|
|||||||
* 累计变更金额
|
* 累计变更金额
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "累计变更金额")
|
@ExcelProperty(value = "累计变更金额")
|
||||||
private Long cumulativeChangeAmount;
|
private BigDecimal cumulativeChangeAmount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 归档日期
|
* 归档日期
|
||||||
|
|||||||
@ -5,7 +5,11 @@ import cn.hutool.core.util.ObjectUtil;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import io.github.linpeilie.annotations.AutoMapper;
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.dromara.common.core.domain.R;
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessEvent;
|
||||||
|
import org.dromara.common.core.domain.event.ProcessTaskEvent;
|
||||||
import org.dromara.common.core.service.XzdPurchaseContractInformationService;
|
import org.dromara.common.core.service.XzdPurchaseContractInformationService;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.core.utils.SpringUtils;
|
import org.dromara.common.core.utils.SpringUtils;
|
||||||
@ -23,6 +27,7 @@ import org.dromara.xzd.comprehensive.domain.XzdHtglHtbgqd;
|
|||||||
import org.dromara.xzd.comprehensive.domain.XzdHtglHthzsj;
|
import org.dromara.xzd.comprehensive.domain.XzdHtglHthzsj;
|
||||||
import org.dromara.xzd.comprehensive.service.IXzdHtglHtbgqdService;
|
import org.dromara.xzd.comprehensive.service.IXzdHtglHtbgqdService;
|
||||||
import org.dromara.xzd.comprehensive.service.IXzdHtglHthzsjService;
|
import org.dromara.xzd.comprehensive.service.IXzdHtglHthzsjService;
|
||||||
|
import org.dromara.xzd.contractManagement.fenbaohetongzhongzhi.domain.XzdSubcontractTermination;
|
||||||
import org.dromara.xzd.contractManagement.purchaseManagement.domain.XzdPurchaseContractInformation;
|
import org.dromara.xzd.contractManagement.purchaseManagement.domain.XzdPurchaseContractInformation;
|
||||||
import org.dromara.xzd.contractManagement.purchaseManagement.domain.bo.XzdPurchaseContractInformationBo;
|
import org.dromara.xzd.contractManagement.purchaseManagement.domain.bo.XzdPurchaseContractInformationBo;
|
||||||
import org.dromara.xzd.contractManagement.purchaseManagement.domain.vo.XzdPurchaseContractInformationVo;
|
import org.dromara.xzd.contractManagement.purchaseManagement.domain.vo.XzdPurchaseContractInformationVo;
|
||||||
@ -42,6 +47,7 @@ import org.dromara.xzd.service.IXzdDeductionItemsService;
|
|||||||
import org.dromara.xzd.service.impl.*;
|
import org.dromara.xzd.service.impl.*;
|
||||||
import org.dromara.xzd.utilS.AreaUtil;
|
import org.dromara.xzd.utilS.AreaUtil;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.event.EventListener;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
|
||||||
@ -56,6 +62,7 @@ import java.util.*;
|
|||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class XzdPurchaseContractInformationServiceImpl extends ServiceImpl<XzdPurchaseContractInformationMapper, XzdPurchaseContractInformation> implements IXzdPurchaseContractInformationService, XzdPurchaseContractInformationService {
|
public class XzdPurchaseContractInformationServiceImpl extends ServiceImpl<XzdPurchaseContractInformationMapper, XzdPurchaseContractInformation> implements IXzdPurchaseContractInformationService, XzdPurchaseContractInformationService {
|
||||||
|
|
||||||
private final XzdPurchaseContractInformationMapper baseMapper;
|
private final XzdPurchaseContractInformationMapper baseMapper;
|
||||||
@ -457,6 +464,60 @@ public class XzdPurchaseContractInformationServiceImpl extends ServiceImpl<XzdPu
|
|||||||
return String.join(StringUtils.SEPARATOR, list);
|
return String.join(StringUtils.SEPARATOR, list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等)
|
||||||
|
* 正常使用只需#processEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processEvent 参数
|
||||||
|
*/
|
||||||
|
@org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('xzdcghtxx')")
|
||||||
|
public void processPlansHandlErequipmentList(ProcessEvent processEvent) {
|
||||||
|
log.info("采购合同信息审核任务执行了{}", processEvent.toString());
|
||||||
|
String id = processEvent.getBusinessId();
|
||||||
|
XzdPurchaseContractInformation vo = baseMapper.selectById(Long.valueOf(id));
|
||||||
|
if (vo == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
vo.setAuditStatus(processEvent.getStatus());
|
||||||
|
this.updateById(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行任务创建监听
|
||||||
|
* 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断
|
||||||
|
* 在方法中判断流程节点key
|
||||||
|
* if ("xxx".equals(processTaskEvent.getNodeCode())) {
|
||||||
|
* //执行业务逻辑
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* @param processTaskEvent 参数
|
||||||
|
*/
|
||||||
|
@org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdcghtxx')")
|
||||||
|
public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) {
|
||||||
|
log.info("采购合同信息审核任务创建了{}", processTaskEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监听删除流程事件
|
||||||
|
* 正常使用只需#processDeleteEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
|
*
|
||||||
|
* @param processDeleteEvent 参数
|
||||||
|
*/
|
||||||
|
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdcghtxx')")
|
||||||
|
public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) {
|
||||||
|
log.info("采购合同信息删除流程事件,采购合同信息审核任务执行了{}", processDeleteEvent.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// @Override
|
// @Override
|
||||||
// public String selectCodeByIds(String ids) {
|
// public String selectCodeByIds(String ids) {
|
||||||
// List<String> list = new ArrayList<>();
|
// List<String> list = new ArrayList<>();
|
||||||
|
|||||||
@ -61,7 +61,7 @@ public class XzdContractChangeController extends BaseController {
|
|||||||
*
|
*
|
||||||
* @param id 主键
|
* @param id 主键
|
||||||
*/
|
*/
|
||||||
// @SaCheckPermission("xzd:contractChange:query")
|
@SaCheckPermission("xzd:contractChange:query")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public R<XzdContractChangeVo> getInfo(@NotNull(message = "主键不能为空")
|
public R<XzdContractChangeVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long id) {
|
@PathVariable Long id) {
|
||||||
|
|||||||
@ -95,6 +95,7 @@ public class XzdCorrespondentList {
|
|||||||
/**
|
/**
|
||||||
* 客户详情
|
* 客户详情
|
||||||
*/
|
*/
|
||||||
|
@SaCheckPermission("xzd:customertypeInfo:query")
|
||||||
@GetMapping("/getCustomerByid/{id}")
|
@GetMapping("/getCustomerByid/{id}")
|
||||||
public R<QuerCorrespondentDto> getCustomerByid(@PathVariable Long id) {
|
public R<QuerCorrespondentDto> getCustomerByid(@PathVariable Long id) {
|
||||||
return iXzdCorrespondentList.getCustomerByid(id);
|
return iXzdCorrespondentList.getCustomerByid(id);
|
||||||
|
|||||||
@ -111,4 +111,10 @@ public class XzdCbysJdcbfj extends BaseEntity {
|
|||||||
private String fileId;
|
private String fileId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -115,4 +115,10 @@ public class XzdCbysWgcbtb extends BaseEntity {
|
|||||||
private String fileId;
|
private String fileId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -151,4 +151,9 @@ public class XzdCbysZjhcb extends BaseEntity {
|
|||||||
private String fileId;
|
private String fileId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -155,4 +155,9 @@ public class XzdCbysZjhcbAlteration extends BaseEntity {
|
|||||||
private String fileId;
|
private String fileId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -115,6 +115,12 @@ public class XzdCbysJdcbfjBo extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String fileId;
|
private String fileId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 副表数据
|
* 副表数据
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -116,6 +116,12 @@ public class XzdCbysWgcbtbBo extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String fileId;
|
private String fileId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
private List<XzdCbysWgcbtbFubiao> xzdCbysWgcbtbFubiao;
|
private List<XzdCbysWgcbtbFubiao> xzdCbysWgcbtbFubiao;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -159,6 +159,13 @@ public class XzdCbysZjhcbAlterationBo extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String fileId;
|
private String fileId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 变更记录
|
* 变更记录
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -154,6 +154,12 @@ public class XzdCbysZjhcbBo extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String fileId;
|
private String fileId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 变更记录
|
* 变更记录
|
||||||
*/
|
*/
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user