Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@ -13,6 +13,7 @@ import org.springframework.web.socket.WebSocketHandler;
|
||||
import org.springframework.web.socket.config.annotation.EnableWebSocket;
|
||||
import org.springframework.web.socket.config.annotation.WebSocketConfigurer;
|
||||
import org.springframework.web.socket.server.HandshakeInterceptor;
|
||||
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
|
||||
|
||||
/**
|
||||
* WebSocket 配置
|
||||
|
||||
@ -19,11 +19,21 @@
|
||||
<dependencies>
|
||||
|
||||
<!-- Java WebSocket 标准API -->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>javax.websocket</groupId>-->
|
||||
<!-- <artifactId>javax.websocket-api</artifactId>-->
|
||||
<!-- <version>1.1</version>-->
|
||||
<!-- <scope>provided</scope>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>javax.websocket</groupId>
|
||||
<artifactId>javax.websocket-api</artifactId>
|
||||
<version>1.1</version>
|
||||
<scope>provided</scope>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-websocket</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency>-->
|
||||
|
||||
@ -1,153 +1,161 @@
|
||||
package org.dromara.mobileAttendanceMachine;
|
||||
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import jakarta.websocket.*;
|
||||
import jakarta.websocket.server.ServerEndpoint;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.websocket.*;
|
||||
import javax.websocket.server.ServerEndpoint;
|
||||
import java.io.IOException;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.http.WebSocket;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
/**
|
||||
* WebSocket服务端实现(对应Golang的HandleWebSocket逻辑)
|
||||
* ServerEndpoint注解指定WebSocket连接路径
|
||||
* WebSocket服务端(设备连接管理、消息处理)
|
||||
* 核心逻辑:通过状态标记区分设备注册阶段和正常通信阶段,避免多处理器冲突
|
||||
*/
|
||||
@ServerEndpoint("/ws/device")
|
||||
@ServerEndpoint("/custom-ws/device")
|
||||
@Component
|
||||
@Log4j2
|
||||
public class DeviceWebSocketServer {
|
||||
|
||||
// ------------------------------ 常量定义(对应Golang的const) ------------------------------
|
||||
public static class Constants {
|
||||
public static final String DECLARE = "declare"; // 设备初上线
|
||||
public static final String PING = "ping"; // 心跳
|
||||
public static final String TO_CLIENT = "to_client"; // 服务器消息下发到客户端的响应
|
||||
}
|
||||
// ------------------------------ 常量定义 ------------------------------
|
||||
public static final String DECLARE = "declare"; // 设备注册消息
|
||||
public static final String PING = "ping"; // 心跳消息
|
||||
public static final String TO_CLIENT = "to_client"; // 设备响应消息
|
||||
private static final int REGISTER_TIMEOUT = 10; // 注册超时时间(秒)
|
||||
|
||||
// JSON序列化/反序列化工具(单例)
|
||||
private static final ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
||||
// 1. 存储所有连接的设备信息(key: 设备SN,value: 设备信息)
|
||||
// ------------------------------ 全局静态存储 ------------------------------
|
||||
// JSON序列化工具(单例)
|
||||
private static final ObjectMapper objectMapper = new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);;
|
||||
// 设备连接池:key=设备SN,value=设备信息(含Session)
|
||||
private static final Map<String, KqjEntity.DeviceInfo> connectedDevices = new ConcurrentHashMap<>();
|
||||
// 2. 存储UUID对应的响应通道(key: UUID,value: 响应结果容器)
|
||||
private static final Map<String, ResponseHolder<KqjEntity.CommonResponse>> responseChannels = new ConcurrentHashMap<>();
|
||||
// 响应通道:key=UUID,value=响应结果容器
|
||||
private static final Map<String, ResponseHolder> responseChannels = new ConcurrentHashMap<>();
|
||||
// 设备-SN反向映射:key=设备SN,value=关联的UUID列表(用于连接关闭时清理)
|
||||
private static final Map<String, Set<String>> snToUuids = new ConcurrentHashMap<>();
|
||||
|
||||
// 当前连接的WebSocket会话
|
||||
private Session session;
|
||||
// 当前连接的设备SN(连接建立后从DECLARE消息中提取)
|
||||
private String currentDeviceSn;
|
||||
// ------------------------------ 每个连接的实例变量 ------------------------------
|
||||
private Session session; // 当前WebSocket会话
|
||||
private String currentDeviceSn; // 当前连接的设备SN(注册后赋值)
|
||||
private volatile boolean isRegistered; // 注册状态:false=未注册,true=已注册
|
||||
private CompletableFuture<Boolean> registerFuture; // 注册阶段的消息Future
|
||||
|
||||
// ------------------------------ 连接生命周期方法 ------------------------------
|
||||
|
||||
/**
|
||||
* 连接建立时触发(对应Golang中upgrader.Upgrade后的初始化逻辑)
|
||||
* 连接建立时触发(初始化状态)
|
||||
*/
|
||||
@OnOpen
|
||||
public void onOpen(Session session) {
|
||||
this.session = session;
|
||||
log.info("新的WebSocket连接建立,会话ID: {}", session.getId());
|
||||
this.isRegistered = false;
|
||||
this.registerFuture = new CompletableFuture<>(); // 初始化注册Future
|
||||
|
||||
log.info("新连接建立,会话ID: {},等待设备注册({}秒超时)...", session.getId(), REGISTER_TIMEOUT);
|
||||
|
||||
// 启动注册超时监听
|
||||
CompletableFuture.runAsync(() -> {
|
||||
try {
|
||||
// 等待注册消息,超时则关闭连接
|
||||
if (!registerFuture.get(REGISTER_TIMEOUT, TimeUnit.SECONDS)) {
|
||||
throw new TimeoutException("注册超时");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("设备注册超时/失败,会话ID: {}", session.getId(), e);
|
||||
try {
|
||||
if (session.isOpen()) {
|
||||
session.close(new CloseReason(CloseReason.CloseCodes.TRY_AGAIN_LATER, "注册超时(请发送DECLARE消息)"));
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
log.error("关闭超时连接失败", ex);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 接收消息时触发(所有消息统一处理,按状态区分)
|
||||
*/
|
||||
@OnMessage
|
||||
public void onMessage(String message, Session session) {
|
||||
if (message == null || message.isEmpty()) {
|
||||
log.warn("会话ID: {} 收到空消息,忽略", session.getId());
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
// 读取设备第一条消息(DECLARE消息),完成设备注册
|
||||
KqjEntity.DeclareMessage declareMsg = registerDevice();
|
||||
this.currentDeviceSn = declareMsg.getSn();
|
||||
log.info("设备注册成功,SN: {}, 设备信息: {}", currentDeviceSn, declareMsg);
|
||||
// 解析通用消息的CMD(所有消息必须包含CMD)
|
||||
KqjEntity.GenericMessage genericMsg = objectMapper.readValue(message, KqjEntity.GenericMessage.class);
|
||||
String cmd = genericMsg.getCmd();
|
||||
if (cmd == null) {
|
||||
log.warn("会话ID: {} 收到无CMD消息,关闭连接: {}", session.getId(), message);
|
||||
session.close(new CloseReason(CloseReason.CloseCodes.PROTOCOL_ERROR, "消息缺少cmd字段"));
|
||||
return;
|
||||
}
|
||||
|
||||
// 未注册状态:仅处理DECLARE注册消息
|
||||
if (!isRegistered) {
|
||||
handleRegisterStage(message, cmd);
|
||||
return;
|
||||
}
|
||||
|
||||
// 已注册状态:处理正常业务消息
|
||||
handleNormalStage(message, cmd);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("设备注册失败,关闭连接", e);
|
||||
log.error("会话ID: {} 处理消息失败: {}", session.getId(), message, e);
|
||||
try {
|
||||
session.close(new CloseReason(CloseReason.CloseCodes.PROTOCOL_ERROR, "设备注册失败"));
|
||||
if (session.isOpen()) {
|
||||
session.close(new CloseReason(CloseReason.CloseCodes.UNEXPECTED_CONDITION, "消息处理异常"));
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
log.error("关闭异常连接失败", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 接收客户端消息时触发(对应Golang的for循环读取消息逻辑)
|
||||
*/
|
||||
@OnMessage
|
||||
public void onMessage(String message, Session session) {
|
||||
if (message == null || message.isEmpty()) {
|
||||
log.warn("收到空消息,忽略处理");
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
// 先解析通用消息的CMD字段(对应Golang的GenericMessage)
|
||||
KqjEntity.GenericMessage genericMsg = objectMapper.readValue(message, KqjEntity.GenericMessage.class);
|
||||
String cmd = genericMsg.getCmd();
|
||||
if (cmd == null) {
|
||||
log.warn("收到无CMD字段的消息,忽略: {}", message);
|
||||
return;
|
||||
}
|
||||
|
||||
// 根据CMD类型处理不同逻辑(对应Golang的switch case)
|
||||
switch (cmd) {
|
||||
case Constants.DECLARE:
|
||||
log.info("设备在线心跳(DECLARE),SN: {}", currentDeviceSn);
|
||||
break;
|
||||
|
||||
case Constants.PING:
|
||||
handlePing(message);
|
||||
break;
|
||||
|
||||
case Constants.TO_CLIENT:
|
||||
handleToClientResponse(message);
|
||||
break;
|
||||
|
||||
default:
|
||||
log.warn("收到未知CMD消息,类型: {}, 内容: {}", cmd, message);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("处理消息失败,消息内容: {}", message, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 连接关闭时触发(对应Golang的defer conn.Close()和资源清理逻辑)
|
||||
* 连接关闭时触发(清理资源)
|
||||
*/
|
||||
@OnClose
|
||||
public void onClose(Session session, CloseReason closeReason) {
|
||||
log.info("WebSocket连接关闭,会话ID: {}, 原因: {}", session.getId(), closeReason);
|
||||
log.info("连接关闭,会话ID: {},原因: {}", session.getId(), closeReason);
|
||||
|
||||
// 1. 移除设备连接信息
|
||||
if (currentDeviceSn != null) {
|
||||
// 1. 移除设备连接(若已注册)
|
||||
if (currentDeviceSn != null && connectedDevices.containsKey(currentDeviceSn)) {
|
||||
connectedDevices.remove(currentDeviceSn);
|
||||
// 更新设备状态为离线(对应Golang的service.BusAttendanceMachine().Change)
|
||||
log.info("设备离线,SN: {},会话ID: {}", currentDeviceSn, session.getId());
|
||||
|
||||
// 2. 更新设备状态为离线(业务服务调用)
|
||||
updateDeviceStatus(currentDeviceSn, "0");
|
||||
|
||||
// 3. 清理该设备关联的响应通道
|
||||
cleanDeviceResponseChannels(currentDeviceSn);
|
||||
}
|
||||
|
||||
// 2. 清理当前设备对应的响应通道(避免内存泄漏)
|
||||
responseChannels.entrySet().removeIf(entry -> {
|
||||
if (entry.getValue().getSn().equals(currentDeviceSn)) {
|
||||
entry.getValue().getResultFuture().completeExceptionally(
|
||||
new Exception("设备连接已关闭,响应通道清理")
|
||||
);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
// 4. 重置实例变量
|
||||
this.session = null;
|
||||
this.currentDeviceSn = null;
|
||||
this.isRegistered = false;
|
||||
this.registerFuture = null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 连接异常时触发
|
||||
*/
|
||||
@OnError
|
||||
public void onError(Session session, Throwable throwable) {
|
||||
log.error("WebSocket连接异常,会话ID: {}", session.getId(), throwable);
|
||||
// 异常时主动关闭连接
|
||||
log.error("连接异常,会话ID: {},异常信息: {}", session.getId(), throwable.getMessage(), throwable);
|
||||
try {
|
||||
if (session.isOpen()) {
|
||||
session.close(new CloseReason(CloseReason.CloseCodes.UNEXPECTED_CONDITION, "连接异常"));
|
||||
@ -157,63 +165,175 @@ public class DeviceWebSocketServer {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------ 核心业务方法 ------------------------------
|
||||
// ------------------------------ 消息处理核心逻辑 ------------------------------
|
||||
|
||||
/**
|
||||
* 设备注册(对应Golang的addDevice函数)
|
||||
* 读取DECLARE消息,解析设备信息并存储
|
||||
* 处理注册阶段消息(仅接受DECLARE)
|
||||
*/
|
||||
private KqjEntity.DeclareMessage registerDevice() throws Exception {
|
||||
// 阻塞读取第一条消息(DECLARE消息)
|
||||
String firstMessage = readFirstMessage();
|
||||
KqjEntity.DeclareMessage declareMsg = objectMapper.readValue(firstMessage, KqjEntity.DeclareMessage.class);
|
||||
// private void handleRegisterStage(String message, String cmd) throws Exception {
|
||||
// // 非DECLARE消息直接拒绝
|
||||
// if (!DECLARE.equals(cmd)) {
|
||||
// log.warn("未注册设备发送非法消息,cmd: {},关闭连接", cmd);
|
||||
// session.close(new CloseReason(CloseReason.CloseCodes.PROTOCOL_ERROR, "请先发送注册消息(cmd=declare)"));
|
||||
// registerFuture.complete(false); // 标记注册失败
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// // 解析DECLARE消息并完成注册
|
||||
// KqjEntity.DeclareMessage declareMsg = objectMapper.readValue(message, KqjEntity.DeclareMessage.class);
|
||||
// String sn = declareMsg.getSn();
|
||||
// if (sn == null || sn.isEmpty()) {
|
||||
// log.warn("注册消息缺少SN,关闭连接");
|
||||
// session.close(new CloseReason(CloseReason.CloseCodes.PROTOCOL_ERROR, "注册消息缺少sn字段"));
|
||||
// registerFuture.complete(false);
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// // 存储设备信息(IP、端口、Session)
|
||||
// InetSocketAddress remoteAddr = (InetSocketAddress) session.getUserProperties().get("jakarta.websocket.endpoint.remoteAddress");
|
||||
// String ip = remoteAddr.getAddress().getHostAddress();
|
||||
// String port = String.valueOf(remoteAddr.getPort());
|
||||
//
|
||||
// KqjEntity.DeviceInfo deviceInfo = new KqjEntity.DeviceInfo();
|
||||
// deviceInfo.setIp(ip);
|
||||
// deviceInfo.setPort(port);
|
||||
// deviceInfo.setConn(session); // 直接存储Jakarta Session,无类型转换
|
||||
// connectedDevices.put(sn, deviceInfo);
|
||||
//
|
||||
// // 初始化设备-SN反向映射
|
||||
// snToUuids.computeIfAbsent(sn, k -> ConcurrentHashMap.newKeySet());
|
||||
//
|
||||
// // 调用业务服务完成注册
|
||||
// registerDeviceToService(sn);
|
||||
//
|
||||
// // 注册成功:更新状态
|
||||
// this.currentDeviceSn = sn;
|
||||
// this.isRegistered = true;
|
||||
// registerFuture.complete(true); // 标记注册成功
|
||||
// log.info("设备注册成功,SN: {},IP: {}:{},会话ID: {}", sn, ip, port, session.getId());
|
||||
// }
|
||||
|
||||
// 校验SN合法性
|
||||
String sn = declareMsg.getSn();
|
||||
if (sn == null || sn.isEmpty()) {
|
||||
throw new IllegalArgumentException("设备SN为空,注册失败");
|
||||
private void handleRegisterStage(String message, String cmd) throws Exception {
|
||||
// 非DECLARE消息直接拒绝
|
||||
if (!DECLARE.equals(cmd)) {
|
||||
log.warn("未注册设备发送非法消息,cmd: {},关闭连接", cmd);
|
||||
session.close(new CloseReason(CloseReason.CloseCodes.PROTOCOL_ERROR, "请先发送注册消息(cmd=declare)"));
|
||||
registerFuture.complete(false); // 标记注册失败
|
||||
return;
|
||||
}
|
||||
|
||||
// 解析客户端IP和端口(对应Golang的parseRemoteAddr)
|
||||
InetSocketAddress remoteAddr = (InetSocketAddress) session.getUserProperties().get("javax.websocket.endpoint.remoteAddress");
|
||||
String ip = remoteAddr.getAddress().getHostAddress();
|
||||
String port = String.valueOf(remoteAddr.getPort());
|
||||
// 解析DECLARE消息并完成注册
|
||||
KqjEntity.DeclareMessage declareMsg;
|
||||
try {
|
||||
declareMsg = objectMapper.readValue(message, KqjEntity.DeclareMessage.class);
|
||||
} catch (Exception e) {
|
||||
log.error("解析DECLARE消息失败,原始消息: {}", message, e);
|
||||
session.close(new CloseReason(CloseReason.CloseCodes.PROTOCOL_ERROR, "DECLARE消息格式错误"));
|
||||
registerFuture.complete(false);
|
||||
return;
|
||||
}
|
||||
|
||||
// 存储设备信息
|
||||
String sn = declareMsg.getSn();
|
||||
if (sn == null || sn.isEmpty()) {
|
||||
log.warn("注册消息缺少SN,关闭连接,消息内容: {}", message);
|
||||
session.close(new CloseReason(CloseReason.CloseCodes.PROTOCOL_ERROR, "注册消息缺少sn字段"));
|
||||
registerFuture.complete(false);
|
||||
return;
|
||||
}
|
||||
|
||||
// 存储设备信息(IP、端口、Session)- 核心优化:兼容多容器,避免空指针
|
||||
String ip = "unknown";
|
||||
String port = "unknown";
|
||||
InetSocketAddress remoteAddr = null;
|
||||
|
||||
// 尝试多种容器可能的键(优先级:Jakarta标准 -> Undertow专用 -> Javax兼容)
|
||||
Object addrObj = session.getUserProperties().get("jakarta.websocket.endpoint.remoteAddress");
|
||||
if (addrObj == null) {
|
||||
addrObj = session.getUserProperties().get("io.undertow.websocket.remoteAddress"); // Undertow专用
|
||||
}
|
||||
if (addrObj == null) {
|
||||
addrObj = session.getUserProperties().get("javax.websocket.endpoint.remoteAddress"); // 兼容旧版
|
||||
}
|
||||
|
||||
// 校验并解析IP和端口
|
||||
if (addrObj instanceof InetSocketAddress) {
|
||||
remoteAddr = (InetSocketAddress) addrObj;
|
||||
// 防止getAddress()返回null(极端情况)
|
||||
if (remoteAddr.getAddress() != null) {
|
||||
ip = remoteAddr.getAddress().getHostAddress();
|
||||
}
|
||||
port = String.valueOf(remoteAddr.getPort());
|
||||
log.info("解析设备地址成功,会话ID: {},IP: {},端口: {}", session.getId(), ip, port);
|
||||
} else {
|
||||
// 地址获取失败时,使用默认值,不中断注册流程
|
||||
log.warn("无法解析设备地址,会话ID: {},addrObj类型: {}",
|
||||
session.getId(), addrObj == null ? "null" : addrObj.getClass().getName());
|
||||
log.warn("继续注册流程,使用默认地址(unknown)");
|
||||
}
|
||||
|
||||
// 创建设备信息(即使IP获取失败,也正常注册)
|
||||
KqjEntity.DeviceInfo deviceInfo = new KqjEntity.DeviceInfo();
|
||||
deviceInfo.setIp(ip);
|
||||
deviceInfo.setPort(port);
|
||||
|
||||
// ======================== 添加类型检查 ========================
|
||||
// 检查session是否能转换为WebSocket,避免强转失败
|
||||
if (!(session instanceof WebSocket)) {
|
||||
throw new IllegalStateException("WebSocket容器不支持Session转WebSocket,无法注册设备,SN: " + sn);
|
||||
}
|
||||
// 强转并赋值
|
||||
deviceInfo.setConn((WebSocket) session); // 用Session替换Golang的*websocket.Conn
|
||||
// ============================================================
|
||||
|
||||
|
||||
deviceInfo.setConn(session);
|
||||
connectedDevices.put(sn, deviceInfo);
|
||||
|
||||
// 调用业务服务注册设备(对应Golang的service.BusAttendanceMachine().Register)
|
||||
// 初始化设备-SN反向映射
|
||||
snToUuids.computeIfAbsent(sn, k -> ConcurrentHashMap.newKeySet());
|
||||
|
||||
// 调用业务服务完成注册
|
||||
registerDeviceToService(sn);
|
||||
|
||||
return declareMsg;
|
||||
// 注册成功:更新状态
|
||||
this.currentDeviceSn = sn;
|
||||
this.isRegistered = true;
|
||||
registerFuture.complete(true); // 标记注册成功
|
||||
log.info("设备注册成功,SN: {},IP: {}:{},会话ID: {}", sn, ip, port, session.getId());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 处理PING消息(对应Golang的handlePing函数)
|
||||
* 处理正常通信阶段消息(PING、TO_CLIENT等)
|
||||
*/
|
||||
private void handleNormalStage(String message, String cmd) throws Exception {
|
||||
switch (cmd) {
|
||||
case DECLARE:
|
||||
// 已注册设备发送DECLARE视为在线心跳
|
||||
log.info("设备在线心跳,SN: {},会话ID: {}", currentDeviceSn, session.getId());
|
||||
break;
|
||||
|
||||
case PING:
|
||||
// 处理心跳:回复PONG
|
||||
handlePing(message);
|
||||
break;
|
||||
|
||||
case TO_CLIENT:
|
||||
// 处理设备响应消息
|
||||
handleToClientResponse(message);
|
||||
break;
|
||||
|
||||
default:
|
||||
log.warn("收到未知消息类型,SN: {},cmd: {},内容: {}", currentDeviceSn, cmd, message);
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------ 业务子逻辑 ------------------------------
|
||||
|
||||
/**
|
||||
* 处理PING心跳消息(回复PONG)
|
||||
*/
|
||||
private void handlePing(String message) throws Exception {
|
||||
// 解析PING消息中的SN(双重校验)
|
||||
KqjEntity.DeclareMessage pingMsg = objectMapper.readValue(message, KqjEntity.DeclareMessage.class);
|
||||
String sn = pingMsg.getSn();
|
||||
if (!currentDeviceSn.equals(sn)) {
|
||||
log.warn("心跳消息SN不匹配,当前SN: {},消息SN: {}", currentDeviceSn, sn);
|
||||
return;
|
||||
}
|
||||
|
||||
// 1. 回复PONG消息
|
||||
// 构造PONG响应
|
||||
KqjEntity.PongMessage pongMsg = new KqjEntity.PongMessage();
|
||||
pongMsg.setCmd(Constants.PING);
|
||||
pongMsg.setCmd("pong");
|
||||
pongMsg.setFrom("server");
|
||||
pongMsg.setTo(sn);
|
||||
|
||||
@ -223,247 +343,185 @@ public class DeviceWebSocketServer {
|
||||
|
||||
// 发送PONG消息
|
||||
session.getBasicRemote().sendText(objectMapper.writeValueAsString(pongMsg));
|
||||
log.info("发送PONG消息给设备,SN: {}", sn);
|
||||
log.info("发送PONG消息,SN: {},会话ID: {}", sn, session.getId());
|
||||
|
||||
// 2. 更新设备连接状态(对应Golang的connectedDevices[sn]重设)
|
||||
if (connectedDevices.containsKey(sn)) {
|
||||
KqjEntity.DeviceInfo deviceInfo = connectedDevices.get(sn);
|
||||
deviceInfo.setConn((WebSocket) session);
|
||||
connectedDevices.put(sn, deviceInfo);
|
||||
}
|
||||
|
||||
// 3. 调用业务服务更新设备状态(对应Golang的service.BusAttendanceMachine().Register)
|
||||
// 更新设备连接状态(业务服务调用)
|
||||
registerDeviceToService(sn);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 处理TO_CLIENT响应消息(对应Golang的requestResponse函数)
|
||||
* 处理TO_CLIENT响应消息(分发到对应的UUID通道)
|
||||
*/
|
||||
private void handleToClientResponse(String message) throws Exception {
|
||||
log.info("收到TO_CLIENT响应消息: {}", message);
|
||||
KqjEntity.CommonResponse commonResp = objectMapper.readValue(message, KqjEntity.CommonResponse.class);
|
||||
|
||||
// 根据UUID查找响应通道,传递响应结果
|
||||
String uuid = commonResp.getTo();
|
||||
ResponseHolder<KqjEntity.CommonResponse> holder = responseChannels.get(uuid);
|
||||
if (uuid == null || uuid.isEmpty()) {
|
||||
log.warn("响应消息缺少UUID(to字段),SN: {},内容: {}", currentDeviceSn, message);
|
||||
return;
|
||||
}
|
||||
|
||||
// 查找响应通道并分发结果
|
||||
ResponseHolder holder = responseChannels.get(uuid);
|
||||
if (holder != null) {
|
||||
holder.getResultFuture().complete(commonResp);
|
||||
responseChannels.remove(uuid); // 移除已完成的通道
|
||||
log.info("响应已分发到UUID: {}, 响应内容: {}", uuid, commonResp);
|
||||
responseChannels.remove(uuid);
|
||||
snToUuids.get(currentDeviceSn).remove(uuid); // 清理反向映射
|
||||
log.info("响应分发成功,UUID: {},SN: {}", uuid, currentDeviceSn);
|
||||
} else {
|
||||
log.warn("未找到UUID: {}对应的响应通道,响应丢弃", uuid);
|
||||
log.warn("未找到UUID对应的响应通道,UUID: {},SN: {}", uuid, currentDeviceSn);
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------ 业务服务调用(需替换为真实实现) ------------------------------
|
||||
|
||||
/**
|
||||
* 设备注册到业务服务(对应原Golang的service.BusAttendanceMachine().Register)
|
||||
*/
|
||||
private void registerDeviceToService(String sn) {
|
||||
try {
|
||||
// TODO: 替换为真实的业务服务调用(如Spring Bean注入后调用)
|
||||
log.info("【业务服务】设备注册,SN: {}", sn);
|
||||
// 示例:BusAttendanceMachineService.register(sn);
|
||||
} catch (Exception e) {
|
||||
log.error("【业务服务】设备注册失败,SN: {}", sn, e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新设备状态(对应原Golang的service.BusAttendanceMachine().Change)
|
||||
*/
|
||||
private void updateDeviceStatus(String sn, String status) {
|
||||
try {
|
||||
// TODO: 替换为真实的业务服务调用
|
||||
log.info("【业务服务】更新设备状态,SN: {},状态: {}", sn, status);
|
||||
// 示例:BusAttendanceMachineService.changeStatus(sn, status);
|
||||
} catch (Exception e) {
|
||||
log.error("【业务服务】更新设备状态失败,SN: {}", sn, e);
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------ 工具方法 ------------------------------
|
||||
|
||||
/**
|
||||
* 读取设备第一条消息(阻塞直到收到消息)
|
||||
*/
|
||||
private String readFirstMessage() throws Exception {
|
||||
// 使用CompletableFuture等待消息
|
||||
final java.util.concurrent.CompletableFuture<String> firstMsgFuture = new java.util.concurrent.CompletableFuture<>();
|
||||
// 使用AtomicReference包装临时处理器,解决未初始化问题
|
||||
final java.util.concurrent.atomic.AtomicReference<MessageHandler.Whole<String>> tempHandlerRef = new java.util.concurrent.atomic.AtomicReference<>();
|
||||
|
||||
// 定义临时消息处理器
|
||||
MessageHandler.Whole<String> tempHandler = msg -> {
|
||||
if (!firstMsgFuture.isDone()) {
|
||||
firstMsgFuture.complete(msg);
|
||||
// 从引用中获取处理器并移除
|
||||
session.removeMessageHandler(tempHandlerRef.get());
|
||||
}
|
||||
};
|
||||
// 将处理器存入引用
|
||||
tempHandlerRef.set(tempHandler);
|
||||
// 注册处理器
|
||||
session.addMessageHandler(tempHandler);
|
||||
|
||||
// 等待消息,超时10秒
|
||||
return firstMsgFuture.get(10, TimeUnit.SECONDS);
|
||||
// // 使用Java并发工具等待消息(模拟Golang的阻塞读取)
|
||||
// final java.util.concurrent.CompletableFuture<String> firstMsgFuture = new java.util.concurrent.CompletableFuture<>();
|
||||
//
|
||||
// // 临时注册消息处理器,读取第一条消息后移除
|
||||
// MessageHandler.Whole<String> tempHandler = msg -> {
|
||||
// if (!firstMsgFuture.isDone()) {
|
||||
// firstMsgFuture.complete(msg);
|
||||
// // 移除临时处理器(避免重复处理)
|
||||
// session.removeMessageHandler(tempHandler);
|
||||
// }
|
||||
// };
|
||||
// session.addMessageHandler(tempHandler);
|
||||
//
|
||||
// // 等待消息,超时10秒(防止设备一直不发消息)
|
||||
// return firstMsgFuture.get(10, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 发送消息给指定设备(对应Golang的sendMessageToDevice函数)
|
||||
* 发送消息给指定设备(对应原Golang的sendMessageToDevice)
|
||||
*/
|
||||
public static boolean sendMessageToDevice(String sn, String uuid, Object message) {
|
||||
// 1. 检查设备是否在线
|
||||
KqjEntity.DeviceInfo deviceInfo = connectedDevices.get(sn);
|
||||
if (deviceInfo == null) {
|
||||
log.warn("设备不存在,SN: {}", sn);
|
||||
log.warn("发送消息失败:设备不存在,SN: {}", sn);
|
||||
responseChannels.remove(uuid);
|
||||
return false;
|
||||
}
|
||||
|
||||
// 2. 将WebSocket转回Session(因为状态由Session管理)
|
||||
WebSocket webSocket = deviceInfo.getConn();
|
||||
if (!(webSocket instanceof Session)) {
|
||||
log.warn("设备连接类型错误,无法判断状态,SN: {}", sn);
|
||||
responseChannels.remove(uuid);
|
||||
return false;
|
||||
}
|
||||
Session session = (Session) webSocket;
|
||||
|
||||
// 3. 检查连接是否打开
|
||||
if (!session.isOpen()) {
|
||||
log.warn("设备连接已关闭,SN: {}", sn);
|
||||
connectedDevices.remove(sn); // 移除已关闭的设备
|
||||
// 2. 检查Session是否有效
|
||||
Session session = deviceInfo.getConn();
|
||||
if (session == null || !session.isOpen()) {
|
||||
log.warn("发送消息失败:设备连接已关闭,SN: {}", sn);
|
||||
connectedDevices.remove(sn);
|
||||
snToUuids.remove(sn);
|
||||
responseChannels.remove(uuid);
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
// 4. 序列化消息并发送
|
||||
// 3. 序列化并发送消息
|
||||
String msgJson = objectMapper.writeValueAsString(message);
|
||||
session.getBasicRemote().sendText(msgJson); // 通过Session发送消息
|
||||
log.info("发送消息给设备,SN: {}, UUID: {}, 消息: {}", sn, uuid, msgJson);
|
||||
session.getBasicRemote().sendText(msgJson);
|
||||
// 关联UUID和设备SN(用于后续清理)
|
||||
snToUuids.get(sn).add(uuid);
|
||||
log.info("发送消息成功,SN: {},UUID: {},消息: {}", sn, uuid, msgJson);
|
||||
return true;
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("发送消息失败,SN: {}, UUID: {}", sn, uuid, e);
|
||||
// 发送失败时移除设备(可能连接已异常)
|
||||
log.error("发送消息失败,SN: {},UUID: {}", sn, uuid, e);
|
||||
// 清理无效资源
|
||||
connectedDevices.remove(sn);
|
||||
snToUuids.remove(sn);
|
||||
responseChannels.remove(uuid);
|
||||
return false;
|
||||
}
|
||||
// // 1. 检查设备是否在线
|
||||
// KqjEntity.DeviceInfo deviceInfo = connectedDevices.get(sn);
|
||||
// if (deviceInfo == null || !deviceInfo.getSession().isOpen()) {
|
||||
// log.warn("设备不在线,SN: {}", sn);
|
||||
// // 清理无效的响应通道
|
||||
// responseChannels.remove(uuid);
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// try {
|
||||
// // 2. 序列化消息并发送
|
||||
// String msgJson = objectMapper.writeValueAsString(message);
|
||||
// deviceInfo.getSession().getBasicRemote().sendText(msgJson);
|
||||
// log.info("发送消息给设备,SN: {}, UUID: {}, 消息: {}", sn, uuid, msgJson);
|
||||
// return true;
|
||||
//
|
||||
// } catch (Exception e) {
|
||||
// log.error("发送消息失败,SN: {}, UUID: {}", sn, uuid, e);
|
||||
// // 清理异常的响应通道
|
||||
// responseChannels.remove(uuid);
|
||||
// return false;
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 发送请求并等待响应(对应Golang的SendRequestAndWaitResponse函数)
|
||||
* 发送请求并等待响应(对应原Golang的SendRequestAndWaitResponse)
|
||||
*/
|
||||
public static KqjEntity.CommonResponse sendRequestAndWaitResponse(String sn, String uuid, Object payload) throws Exception {
|
||||
// 1. 创建响应结果容器
|
||||
ResponseHolder<KqjEntity.CommonResponse> responseHolder = new ResponseHolder<>(sn);
|
||||
responseChannels.put(uuid, responseHolder);
|
||||
// 1. 创建响应容器并注册
|
||||
ResponseHolder holder = new ResponseHolder(sn);
|
||||
responseChannels.put(uuid, holder);
|
||||
|
||||
try {
|
||||
// 2. 发送请求
|
||||
boolean sendSuccess = sendMessageToDevice(sn, uuid, payload);
|
||||
if (!sendSuccess) {
|
||||
throw new Exception("发送请求失败,设备不在线或发送异常,SN: " + sn);
|
||||
throw new Exception("发送请求失败,设备不在线或连接异常,SN: " + sn);
|
||||
}
|
||||
|
||||
// 3. 等待响应,超时10秒
|
||||
return responseHolder.getResultFuture().get(10, TimeUnit.SECONDS);
|
||||
|
||||
} catch (java.util.concurrent.TimeoutException e) {
|
||||
log.error("等待响应超时,SN: {}, UUID: {}", sn, uuid);
|
||||
// 3. 等待响应(10秒超时)
|
||||
return holder.getResultFuture().get(10, TimeUnit.SECONDS);
|
||||
} catch (TimeoutException e) {
|
||||
log.error("等待响应超时,SN: {},UUID: {}", sn, uuid);
|
||||
responseChannels.remove(uuid);
|
||||
throw new Exception("等待响应超时(10秒)", e);
|
||||
|
||||
snToUuids.get(sn).remove(uuid);
|
||||
throw new Exception("等待响应超时(10秒),SN: " + sn, e);
|
||||
} finally {
|
||||
// 清理响应通道(防止内存泄漏)
|
||||
// 4. 清理响应通道(防止内存泄漏)
|
||||
responseChannels.remove(uuid);
|
||||
if (snToUuids.containsKey(sn)) {
|
||||
snToUuids.get(sn).remove(uuid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 生成带6位随机数的UUID(对应Golang的GenerateUUIDWithSixRandomDigits函数)
|
||||
* 生成带6位随机数的UUID(对应原Golang的GenerateUUIDWithSixRandomDigits)
|
||||
*/
|
||||
public static String generateUUIDWithSixRandomDigits() {
|
||||
// 生成标准UUID
|
||||
String uuidStr = UUID.randomUUID().toString().replace("-", "");
|
||||
// 生成6位随机数(100000-999999)
|
||||
Random random = new Random();
|
||||
int randomNum = random.nextInt(900000) + 100000;
|
||||
// 拼接返回
|
||||
int randomNum = random.nextInt(900000) + 100000; // 6位随机数(100000-999999)
|
||||
return uuidStr + "-" + randomNum;
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------ 业务服务调用(模拟Golang的service层) ------------------------------
|
||||
|
||||
/**
|
||||
* 注册设备到业务服务(对应Golang的service.BusAttendanceMachine().Register)
|
||||
* 实际项目中替换为真实的Service调用
|
||||
* 清理设备关联的所有响应通道(连接关闭时调用)
|
||||
*/
|
||||
private void registerDeviceToService(String sn) {
|
||||
try {
|
||||
// 模拟业务服务调用(如更新数据库设备状态为在线)
|
||||
log.info("调用业务服务注册设备,SN: {}", sn);
|
||||
// TODO: 替换为真实的Service代码(如Spring Bean调用)
|
||||
} catch (Exception e) {
|
||||
log.error("业务服务注册设备失败,SN: {}", sn, e);
|
||||
}
|
||||
private void cleanDeviceResponseChannels(String sn) {
|
||||
Set<String> uuids = snToUuids.remove(sn);
|
||||
if (uuids == null || uuids.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 更新设备状态(对应Golang的service.BusAttendanceMachine().Change)
|
||||
* 实际项目中替换为真实的Service调用
|
||||
*/
|
||||
private void updateDeviceStatus(String sn, String status) {
|
||||
try {
|
||||
log.info("调用业务服务更新设备状态,SN: {}, 状态: {}", sn, status);
|
||||
// TODO: 替换为真实的Service代码(如Spring Bean调用)
|
||||
} catch (Exception e) {
|
||||
log.error("业务服务更新设备状态失败,SN: {}", sn, e);
|
||||
for (String uuid : uuids) {
|
||||
ResponseHolder holder = responseChannels.remove(uuid);
|
||||
if (holder != null) {
|
||||
holder.getResultFuture().completeExceptionally(
|
||||
new Exception("设备已离线,响应通道已清理,SN: " + sn)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
log.info("清理设备响应通道,SN: {},共清理UUID数量: {}", sn, uuids.size());
|
||||
}
|
||||
|
||||
// ------------------------------ 内部辅助类 ------------------------------
|
||||
|
||||
/**
|
||||
* 响应结果容器(对应Golang的chan CommonResponse)
|
||||
* 用CompletableFuture实现异步结果等待
|
||||
* 响应结果容器(替代Golang的chan,用CompletableFuture实现异步等待)
|
||||
*/
|
||||
private static class ResponseHolder<T> {
|
||||
private static class ResponseHolder {
|
||||
private final String sn; // 关联的设备SN
|
||||
private final java.util.concurrent.CompletableFuture<T> resultFuture;
|
||||
private final CompletableFuture<KqjEntity.CommonResponse> resultFuture;
|
||||
|
||||
public ResponseHolder(String sn) {
|
||||
this.sn = sn;
|
||||
this.resultFuture = new java.util.concurrent.CompletableFuture<>();
|
||||
this.resultFuture = new CompletableFuture<>();
|
||||
}
|
||||
|
||||
public String getSn() {
|
||||
return sn;
|
||||
}
|
||||
|
||||
public java.util.concurrent.CompletableFuture<T> getResultFuture() {
|
||||
public CompletableFuture<KqjEntity.CommonResponse> getResultFuture() {
|
||||
return resultFuture;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,21 +1,20 @@
|
||||
package org.dromara.mobileAttendanceMachine;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import jakarta.websocket.Session;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
import java.net.http.WebSocket;
|
||||
|
||||
/**
|
||||
* @Author 铁憨憨
|
||||
* @Date 2025/10/14 14:47
|
||||
* @Version 1.0
|
||||
* 实体类:WebSocket消息结构和设备信息
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
public class KqjEntity {
|
||||
|
||||
/**
|
||||
* 设备连接信息(修正conn为Jakarta Session)
|
||||
*/
|
||||
@Data
|
||||
public static class DeviceInfo {
|
||||
@JsonProperty("ip")
|
||||
@ -25,14 +24,15 @@ public class KqjEntity {
|
||||
private String port;
|
||||
|
||||
@JsonProperty("conn")
|
||||
private WebSocket conn;
|
||||
private Session conn; // 关键修正:使用Jakarta WebSocket的Session
|
||||
}
|
||||
|
||||
// ------------------------------ 以下为原有实体类,保持不变 ------------------------------
|
||||
/**
|
||||
* 通用消息结构,用于解析初始的 cmd 字段
|
||||
*/
|
||||
@Data
|
||||
public class GenericMessage {
|
||||
public static class GenericMessage {
|
||||
@JsonProperty("cmd")
|
||||
private String cmd;
|
||||
}
|
||||
@ -41,7 +41,7 @@ public class KqjEntity {
|
||||
* 公共响应结构
|
||||
*/
|
||||
@Data
|
||||
public class CommonResponse {
|
||||
public static class CommonResponse {
|
||||
@JsonProperty("cmd")
|
||||
private String cmd;
|
||||
|
||||
@ -56,12 +56,12 @@ public class KqjEntity {
|
||||
}
|
||||
|
||||
@Data
|
||||
public class CommonResponseData {
|
||||
public static class CommonResponseData {
|
||||
@JsonProperty("cmd")
|
||||
private String cmd;
|
||||
|
||||
@JsonProperty("userIds")
|
||||
private String[] userIds; // 用户IDS
|
||||
private String[] userIds;
|
||||
|
||||
@JsonProperty("user_id")
|
||||
private String userId;
|
||||
@ -77,7 +77,7 @@ public class KqjEntity {
|
||||
}
|
||||
|
||||
@Data
|
||||
public class DelMultiUserData {
|
||||
public static class DelMultiUserData {
|
||||
@JsonProperty("user_id")
|
||||
private String userId;
|
||||
|
||||
@ -88,12 +88,11 @@ public class KqjEntity {
|
||||
private String msg;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 设备上线消息
|
||||
*/
|
||||
@Data
|
||||
public class DeclareMessage {
|
||||
public static class DeclareMessage {
|
||||
@JsonProperty("cmd")
|
||||
private String cmd;
|
||||
|
||||
@ -134,7 +133,6 @@ public class KqjEntity {
|
||||
private PongMessageData data;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 心跳回复消息结构
|
||||
*/
|
||||
@ -150,13 +148,13 @@ public class KqjEntity {
|
||||
@Data
|
||||
public class PeopleInformation {
|
||||
@JsonProperty("cmd")
|
||||
private String cmd; // 该接口固定为to_device
|
||||
private String cmd;
|
||||
|
||||
@JsonProperty("from")
|
||||
private String from; // 可不填写,填写uuid来做为发送请求或响应的标识
|
||||
private String from;
|
||||
|
||||
@JsonProperty("to")
|
||||
private String to; // 设备号(请查看公共设置中的设备号)
|
||||
private String to;
|
||||
|
||||
@JsonProperty("data")
|
||||
private PeopleInData data;
|
||||
@ -174,10 +172,10 @@ public class KqjEntity {
|
||||
private String name;
|
||||
|
||||
@JsonProperty("face_template")
|
||||
private String faceTemplate; // http 链接图
|
||||
private String faceTemplate;
|
||||
|
||||
@JsonProperty("id_valid")
|
||||
private String idValid; // 人员有效期(人员在这个时间点后,无法通行)格式:yyyy-MM-dd 或者 yyyy-MM-dd HH:mm,为 "" 则为永久
|
||||
private String idValid;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -207,7 +205,7 @@ public class KqjEntity {
|
||||
private String userId;
|
||||
|
||||
@JsonProperty("user_type")
|
||||
private int userType; // 删除的用户类型:0-人脸接口下发的数据 1-人证比对接口下发的数据
|
||||
private int userType;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -237,7 +235,7 @@ public class KqjEntity {
|
||||
private String[] userIds;
|
||||
|
||||
@JsonProperty("user_type")
|
||||
private int userType; // 删除的用户类型:0-人脸接口下发的数据 1-人证比对接口下发的数据
|
||||
private int userType;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -264,7 +262,7 @@ public class KqjEntity {
|
||||
private String cmd;
|
||||
|
||||
@JsonProperty("user_type")
|
||||
private int userType; // 删除的用户类型:0-人脸接口下发的数据 1-人证比对接口下发的数据
|
||||
private int userType;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -273,13 +271,13 @@ public class KqjEntity {
|
||||
@Data
|
||||
public class PersonnelInformationAcquisition {
|
||||
@JsonProperty("cmd")
|
||||
private String cmd; // 该接口固定为to_device
|
||||
private String cmd;
|
||||
|
||||
@JsonProperty("from")
|
||||
private String from; // 可不填写,填写uuid来做为发送请求或响应的标识
|
||||
private String from;
|
||||
|
||||
@JsonProperty("to")
|
||||
private String to; // 设备号(请查看公共设置中的设备号)
|
||||
private String to;
|
||||
|
||||
@JsonProperty("data")
|
||||
private PersonnelInformationAcquisitionTwo data;
|
||||
@ -293,5 +291,4 @@ public class KqjEntity {
|
||||
@JsonProperty("value")
|
||||
private int value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,22 +1,13 @@
|
||||
package org.dromara.mobileAttendanceMachine;
|
||||
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
|
||||
|
||||
/**
|
||||
* @Author 铁憨憨
|
||||
* @Date 2025/10/14 16:11
|
||||
* @Version 1.0
|
||||
*
|
||||
* 系统启动就会开启ws
|
||||
*/
|
||||
|
||||
@Configuration
|
||||
public class WebSocketConfig {
|
||||
|
||||
/**
|
||||
* 自动注册所有标注了@ServerEndpoint的WebSocket端点
|
||||
*/
|
||||
@Bean
|
||||
public ServerEndpointExporter serverEndpointExporter() {
|
||||
return new ServerEndpointExporter();
|
||||
|
||||
@ -0,0 +1,105 @@
|
||||
package org.dromara.xzd.comprehensive.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.xzd.comprehensive.domain.vo.XzdCsContractChangeVo;
|
||||
import org.dromara.xzd.comprehensive.domain.bo.XzdCsContractChangeBo;
|
||||
import org.dromara.xzd.comprehensive.service.IXzdCsContractChangeService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 综合服务合同变更
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/comprehensive/csContractChange")
|
||||
public class XzdCsContractChangeController extends BaseController {
|
||||
|
||||
private final IXzdCsContractChangeService xzdCsContractChangeService;
|
||||
|
||||
/**
|
||||
* 查询综合服务合同变更列表
|
||||
*/
|
||||
@SaCheckPermission("comprehensive:csContractChange:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<XzdCsContractChangeVo> list(XzdCsContractChangeBo bo, PageQuery pageQuery) {
|
||||
return xzdCsContractChangeService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出综合服务合同变更列表
|
||||
*/
|
||||
@SaCheckPermission("comprehensive:csContractChange:export")
|
||||
@Log(title = "综合服务合同变更", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(XzdCsContractChangeBo bo, HttpServletResponse response) {
|
||||
List<XzdCsContractChangeVo> list = xzdCsContractChangeService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "综合服务合同变更", XzdCsContractChangeVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取综合服务合同变更详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("comprehensive:csContractChange:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<XzdCsContractChangeVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(xzdCsContractChangeService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增综合服务合同变更
|
||||
*/
|
||||
@SaCheckPermission("comprehensive:csContractChange:add")
|
||||
@Log(title = "综合服务合同变更", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody XzdCsContractChangeBo bo) {
|
||||
return toAjax(xzdCsContractChangeService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改综合服务合同变更
|
||||
*/
|
||||
@SaCheckPermission("comprehensive:csContractChange:edit")
|
||||
@Log(title = "综合服务合同变更", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XzdCsContractChangeBo bo) {
|
||||
return toAjax(xzdCsContractChangeService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除综合服务合同变更
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("comprehensive:csContractChange:remove")
|
||||
@Log(title = "综合服务合同变更", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(xzdCsContractChangeService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,114 @@
|
||||
package org.dromara.xzd.comprehensive.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.xzd.comprehensive.domain.vo.XzdCsContractInformationVo;
|
||||
import org.dromara.xzd.comprehensive.domain.bo.XzdCsContractInformationBo;
|
||||
import org.dromara.xzd.comprehensive.service.IXzdCsContractInformationService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 综合服务合同信息
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/comprehensive/csContractInformation")
|
||||
public class XzdCsContractInformationController extends BaseController {
|
||||
|
||||
private final IXzdCsContractInformationService xzdCsContractInformationService;
|
||||
|
||||
/**
|
||||
* 查询综合服务合同信息列表
|
||||
*/
|
||||
@SaCheckPermission("comprehensive:csContractInformation:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<XzdCsContractInformationVo> list(XzdCsContractInformationBo bo, PageQuery pageQuery) {
|
||||
return xzdCsContractInformationService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询综合服务合同信息列表
|
||||
*/
|
||||
@SaCheckPermission("comprehensive:csContractInformation:getList")
|
||||
@GetMapping("/getList")
|
||||
public TableDataInfo<XzdCsContractInformationVo> getList(XzdCsContractInformationBo bo, PageQuery pageQuery) {
|
||||
return xzdCsContractInformationService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出综合服务合同信息列表
|
||||
*/
|
||||
@SaCheckPermission("comprehensive:csContractInformation:export")
|
||||
@Log(title = "综合服务合同信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(XzdCsContractInformationBo bo, HttpServletResponse response) {
|
||||
List<XzdCsContractInformationVo> list = xzdCsContractInformationService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "综合服务合同信息", XzdCsContractInformationVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取综合服务合同信息详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("comprehensive:csContractInformation:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<XzdCsContractInformationVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(xzdCsContractInformationService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增综合服务合同信息
|
||||
*/
|
||||
@SaCheckPermission("comprehensive:csContractInformation:add")
|
||||
@Log(title = "综合服务合同信息", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody XzdCsContractInformationBo bo) {
|
||||
return toAjax(xzdCsContractInformationService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改综合服务合同信息
|
||||
*/
|
||||
@SaCheckPermission("comprehensive:csContractInformation:edit")
|
||||
@Log(title = "综合服务合同信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XzdCsContractInformationBo bo) {
|
||||
return toAjax(xzdCsContractInformationService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除综合服务合同信息
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("comprehensive:csContractInformation:remove")
|
||||
@Log(title = "综合服务合同信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(xzdCsContractInformationService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
package org.dromara.xzd.comprehensive.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.xzd.comprehensive.domain.vo.XzdCsContractSuspendVo;
|
||||
import org.dromara.xzd.comprehensive.domain.bo.XzdCsContractSuspendBo;
|
||||
import org.dromara.xzd.comprehensive.service.IXzdCsContractSuspendService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 综合服务合同终止
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/comprehensive/csContractSuspend")
|
||||
public class XzdCsContractSuspendController extends BaseController {
|
||||
|
||||
private final IXzdCsContractSuspendService xzdCsContractSuspendService;
|
||||
|
||||
/**
|
||||
* 查询综合服务合同终止列表
|
||||
*/
|
||||
@SaCheckPermission("comprehensive:csContractSuspend:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<XzdCsContractSuspendVo> list(XzdCsContractSuspendBo bo, PageQuery pageQuery) {
|
||||
return xzdCsContractSuspendService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出综合服务合同终止列表
|
||||
*/
|
||||
@SaCheckPermission("comprehensive:csContractSuspend:export")
|
||||
@Log(title = "综合服务合同终止", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(XzdCsContractSuspendBo bo, HttpServletResponse response) {
|
||||
List<XzdCsContractSuspendVo> list = xzdCsContractSuspendService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "综合服务合同终止", XzdCsContractSuspendVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取综合服务合同终止详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("comprehensive:csContractSuspend:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<XzdCsContractSuspendVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(xzdCsContractSuspendService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增综合服务合同终止
|
||||
*/
|
||||
@SaCheckPermission("comprehensive:csContractSuspend:add")
|
||||
@Log(title = "综合服务合同终止", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody XzdCsContractSuspendBo bo) {
|
||||
return toAjax(xzdCsContractSuspendService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改综合服务合同终止
|
||||
*/
|
||||
@SaCheckPermission("comprehensive:csContractSuspend:edit")
|
||||
@Log(title = "综合服务合同终止", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XzdCsContractSuspendBo bo) {
|
||||
return toAjax(xzdCsContractSuspendService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除综合服务合同终止
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("comprehensive:csContractSuspend:remove")
|
||||
@Log(title = "综合服务合同终止", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(xzdCsContractSuspendService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,206 @@
|
||||
package org.dromara.xzd.comprehensive.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 综合服务合同变更对象 xzd_cs_contract_change
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xzd_cs_contract_change")
|
||||
public class XzdCsContractChange extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 单据编码
|
||||
*/
|
||||
private String docCode;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
private LocalDate docDate;
|
||||
|
||||
/**
|
||||
* 合同编码(关联合同表)
|
||||
*/
|
||||
private Long contractCode;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 合同类型
|
||||
*/
|
||||
private String contractType;
|
||||
|
||||
/**
|
||||
* 变更类型
|
||||
*/
|
||||
private Long changeType;
|
||||
|
||||
/**
|
||||
* 项目
|
||||
*/
|
||||
private Long project;
|
||||
|
||||
/**
|
||||
* 经营模式
|
||||
*/
|
||||
private String businessMode;
|
||||
|
||||
/**
|
||||
* 组织
|
||||
*/
|
||||
private Long organization;
|
||||
|
||||
/**
|
||||
* 甲方单位
|
||||
*/
|
||||
private Long partyA;
|
||||
|
||||
/**
|
||||
* 乙方单位
|
||||
*/
|
||||
private Long partyB;
|
||||
|
||||
/**
|
||||
* 原合同造价
|
||||
*/
|
||||
private BigDecimal originalContractAmount;
|
||||
|
||||
/**
|
||||
* 变更价税合计
|
||||
*/
|
||||
private BigDecimal changeTaxIncludedAmount;
|
||||
|
||||
/**
|
||||
* 变更后价税合计
|
||||
*/
|
||||
private BigDecimal afterChangeTaxIncludedAmount;
|
||||
|
||||
/**
|
||||
* 累计变更金额
|
||||
*/
|
||||
private BigDecimal cumulativeChangeAmount;
|
||||
|
||||
/**
|
||||
* 警示
|
||||
*/
|
||||
private String warning;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 支付条款
|
||||
*/
|
||||
private String paymentTerms;
|
||||
|
||||
/**
|
||||
* 是否用印(0:否,1:是)
|
||||
*/
|
||||
private Long isSealed;
|
||||
|
||||
/**
|
||||
* 变更后项目经理
|
||||
*/
|
||||
private Long afterChangeProjectManager;
|
||||
|
||||
/**
|
||||
* 变更后项目责任人
|
||||
*/
|
||||
private Long afterChangeProjectLeader;
|
||||
|
||||
/**
|
||||
* 变更后现场经理
|
||||
*/
|
||||
private Long afterChangeSiteManager;
|
||||
|
||||
/**
|
||||
* 变更后合同备注
|
||||
*/
|
||||
private String afterChangeContractRemark;
|
||||
|
||||
/**
|
||||
* 项目大类
|
||||
*/
|
||||
private String projectCategory;
|
||||
|
||||
/**
|
||||
* 项目类型
|
||||
*/
|
||||
private String projectType;
|
||||
|
||||
/**
|
||||
* 付款额不能超合同额(0:否,1:是)
|
||||
*/
|
||||
private Long paymentNotExceedContract;
|
||||
|
||||
/**
|
||||
* 付款额不超合同额支付比例(%)
|
||||
*/
|
||||
private BigDecimal paymentNotExceedRatio;
|
||||
|
||||
/**
|
||||
* 预结算/结算不能超合同额(0:否,1:是)
|
||||
*/
|
||||
private Long budgetNotExceedContract;
|
||||
|
||||
/**
|
||||
* 预结算/结算不超合同额比例(%)
|
||||
*/
|
||||
private BigDecimal budgetNotExceedRatio;
|
||||
|
||||
/**
|
||||
* 实时刷新(0:否,1:是)
|
||||
*/
|
||||
private Long realTimeUpdate;
|
||||
|
||||
/**
|
||||
* 合同累计变更金额
|
||||
*/
|
||||
private BigDecimal contractCumulativeChangeAmount;
|
||||
|
||||
/**
|
||||
* 单据引用
|
||||
*/
|
||||
private String documentReference;
|
||||
|
||||
/**
|
||||
* 文件id
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,241 @@
|
||||
package org.dromara.xzd.comprehensive.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 综合服务合同信息对象 xzd_cs_contract_information
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xzd_cs_contract_information")
|
||||
public class XzdCsContractInformation extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 合同编码
|
||||
*/
|
||||
private String contractCode;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
private LocalDate documentDate;
|
||||
|
||||
/**
|
||||
* 合同类型(如:租车合同)
|
||||
*/
|
||||
private String contractType;
|
||||
|
||||
/**
|
||||
* 项目ID(关联项目表)
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 经营模式
|
||||
*/
|
||||
private String businessMode;
|
||||
|
||||
/**
|
||||
* 签订日期
|
||||
*/
|
||||
private LocalDate signDate;
|
||||
|
||||
/**
|
||||
* 甲方单位
|
||||
*/
|
||||
private Long partyA;
|
||||
|
||||
/**
|
||||
* 含税合同金额
|
||||
*/
|
||||
private BigDecimal taxIncludedAmount;
|
||||
|
||||
/**
|
||||
* 合同状态(如:新增、生效)
|
||||
*/
|
||||
private String contractStatus;
|
||||
|
||||
/**
|
||||
* 乙方单位
|
||||
*/
|
||||
private Long partyB;
|
||||
|
||||
/**
|
||||
* 累计变更金额
|
||||
*/
|
||||
private BigDecimal cumulativeChangeAmount;
|
||||
|
||||
/**
|
||||
* 部门ID(关联部门表)
|
||||
*/
|
||||
private Long departmentId;
|
||||
|
||||
/**
|
||||
* 归档日期
|
||||
*/
|
||||
private LocalDate archivalDate;
|
||||
|
||||
/**
|
||||
* 是否研发类(0:否,1:是)
|
||||
*/
|
||||
private Long isRD;
|
||||
|
||||
/**
|
||||
* 开票单位
|
||||
*/
|
||||
private Long invoiceIssuer;
|
||||
|
||||
/**
|
||||
* 收票单位
|
||||
*/
|
||||
private Long invoiceReceiver;
|
||||
|
||||
/**
|
||||
* 有效期开始日期
|
||||
*/
|
||||
private LocalDate validStartDate;
|
||||
|
||||
/**
|
||||
* 有效期结束日期
|
||||
*/
|
||||
private LocalDate validEndDate;
|
||||
|
||||
/**
|
||||
* 是否用印(0:否,1:是)
|
||||
*/
|
||||
private Long isSealed;
|
||||
|
||||
/**
|
||||
* 大写合同价税合计
|
||||
*/
|
||||
private String taxIncludedAmountUpper;
|
||||
|
||||
/**
|
||||
* 警示
|
||||
*/
|
||||
private String warning;
|
||||
|
||||
/**
|
||||
* 支付条款
|
||||
*/
|
||||
private String paymentTerms;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 签约组织
|
||||
*/
|
||||
private Long signOrganization;
|
||||
|
||||
/**
|
||||
* 项目类型
|
||||
*/
|
||||
private String projectType;
|
||||
|
||||
/**
|
||||
* 项目大类
|
||||
*/
|
||||
private String projectCategory;
|
||||
|
||||
/**
|
||||
* 项目责任人
|
||||
*/
|
||||
private Long projectOwner;
|
||||
|
||||
/**
|
||||
* WBS编码
|
||||
*/
|
||||
private Long wbs;
|
||||
|
||||
/**
|
||||
* 备案状态(如:未备案、已备案)
|
||||
*/
|
||||
private String filingStatus;
|
||||
|
||||
/**
|
||||
* 备案时间
|
||||
*/
|
||||
private LocalDate filingTime;
|
||||
|
||||
/**
|
||||
* 是否需备案(0:否,1:是)
|
||||
*/
|
||||
private Long needFiling;
|
||||
|
||||
/**
|
||||
* 预算分类
|
||||
*/
|
||||
private Long budgetCategory;
|
||||
|
||||
/**
|
||||
* 是否固定单价合同(0:否,1:是)
|
||||
*/
|
||||
private Long isFixedUnitPrice;
|
||||
|
||||
/**
|
||||
* 是否总价包干合同(0:否,1:是)
|
||||
*/
|
||||
private Long isLumpSum;
|
||||
|
||||
/**
|
||||
* 付款额不能超合同额(0:否,1:是)
|
||||
*/
|
||||
private Long paymentNotExceedContract;
|
||||
|
||||
/**
|
||||
* 付款额不超合同额比例(%)
|
||||
*/
|
||||
private BigDecimal paymentNotExceedRatio;
|
||||
|
||||
/**
|
||||
* 预结算/结算不能超合同额(0:否,1:是)
|
||||
*/
|
||||
private Long budgetNotExceedContract;
|
||||
|
||||
/**
|
||||
* 预结算/结算不超合同额比例(%)
|
||||
*/
|
||||
private BigDecimal budgetNotExceedRatio;
|
||||
|
||||
/**
|
||||
* 单据引用
|
||||
*/
|
||||
private String documentReference;
|
||||
|
||||
/**
|
||||
* 文件id
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,122 @@
|
||||
package org.dromara.xzd.comprehensive.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 综合服务合同终止对象 xzd_cs_contract_suspend
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xzd_cs_contract_suspend")
|
||||
public class XzdCsContractSuspend extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 采购合同信息ID(合同编码)
|
||||
*/
|
||||
private Long contractInformationId;
|
||||
|
||||
/**
|
||||
* 单据编码
|
||||
*/
|
||||
private String receiptsCode;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
private LocalDate documentDate;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 终止日期
|
||||
*/
|
||||
private LocalDate terminationDate;
|
||||
|
||||
/**
|
||||
* 工程项目
|
||||
*/
|
||||
private Long project;
|
||||
|
||||
/**
|
||||
* 乙方单位
|
||||
*/
|
||||
private Long artyBUnit;
|
||||
|
||||
/**
|
||||
* 甲方单位
|
||||
*/
|
||||
private Long partyAUnit;
|
||||
|
||||
/**
|
||||
* 终止原因
|
||||
*/
|
||||
private String terminationCause;
|
||||
|
||||
/**
|
||||
* 项目大类
|
||||
*/
|
||||
private String projectCategory;
|
||||
|
||||
/**
|
||||
* 项目类型
|
||||
*/
|
||||
private String projectType;
|
||||
|
||||
|
||||
/**
|
||||
* 累计结算金额
|
||||
*/
|
||||
private BigDecimal cumulativeSettlementAmount;
|
||||
|
||||
/**
|
||||
* 累计付款金额
|
||||
*/
|
||||
private BigDecimal cumulativePaymentAmount;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String auditStatus;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,229 @@
|
||||
package org.dromara.xzd.comprehensive.domain.bo;
|
||||
|
||||
import org.dromara.xzd.comprehensive.domain.XzdCsContractChange;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.xzd.domain.XzdContractClause;
|
||||
import org.dromara.xzd.domain.XzdDeductionItems;
|
||||
import org.dromara.xzd.domain.XzdSettlementRules;
|
||||
|
||||
/**
|
||||
* 综合服务合同变更业务对象 xzd_cs_contract_change
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XzdCsContractChange.class, reverseConvertGenerate = false)
|
||||
public class XzdCsContractChangeBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 单据编码
|
||||
*/
|
||||
@NotBlank(message = "单据编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String docCode;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@NotBlank(message = "标题不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
@NotNull(message = "单据日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private LocalDate docDate;
|
||||
|
||||
/**
|
||||
* 合同编码(关联合同表)
|
||||
*/
|
||||
private Long contractCode;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 合同类型
|
||||
*/
|
||||
private String contractType;
|
||||
|
||||
/**
|
||||
* 变更类型
|
||||
*/
|
||||
private Long changeType;
|
||||
|
||||
/**
|
||||
* 项目
|
||||
*/
|
||||
private Long project;
|
||||
|
||||
/**
|
||||
* 经营模式
|
||||
*/
|
||||
private String businessMode;
|
||||
|
||||
/**
|
||||
* 组织
|
||||
*/
|
||||
private Long organization;
|
||||
|
||||
/**
|
||||
* 甲方单位
|
||||
*/
|
||||
private Long partyA;
|
||||
|
||||
/**
|
||||
* 乙方单位
|
||||
*/
|
||||
private Long partyB;
|
||||
|
||||
/**
|
||||
* 原合同造价
|
||||
*/
|
||||
private BigDecimal originalContractAmount;
|
||||
|
||||
/**
|
||||
* 变更价税合计
|
||||
*/
|
||||
private BigDecimal changeTaxIncludedAmount;
|
||||
|
||||
/**
|
||||
* 变更后价税合计
|
||||
*/
|
||||
private BigDecimal afterChangeTaxIncludedAmount;
|
||||
|
||||
/**
|
||||
* 累计变更金额
|
||||
*/
|
||||
private BigDecimal cumulativeChangeAmount;
|
||||
|
||||
/**
|
||||
* 警示
|
||||
*/
|
||||
private String warning;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 支付条款
|
||||
*/
|
||||
private String paymentTerms;
|
||||
|
||||
/**
|
||||
* 是否用印(0:否,1:是)
|
||||
*/
|
||||
private Long isSealed;
|
||||
|
||||
/**
|
||||
* 变更后项目经理
|
||||
*/
|
||||
private Long afterChangeProjectManager;
|
||||
|
||||
/**
|
||||
* 变更后项目责任人
|
||||
*/
|
||||
private Long afterChangeProjectLeader;
|
||||
|
||||
/**
|
||||
* 变更后现场经理
|
||||
*/
|
||||
private Long afterChangeSiteManager;
|
||||
|
||||
/**
|
||||
* 变更后合同备注
|
||||
*/
|
||||
private String afterChangeContractRemark;
|
||||
|
||||
/**
|
||||
* 项目大类
|
||||
*/
|
||||
private String projectCategory;
|
||||
|
||||
/**
|
||||
* 项目类型
|
||||
*/
|
||||
private String projectType;
|
||||
|
||||
/**
|
||||
* 付款额不能超合同额(0:否,1:是)
|
||||
*/
|
||||
private Long paymentNotExceedContract;
|
||||
|
||||
/**
|
||||
* 付款额不超合同额支付比例(%)
|
||||
*/
|
||||
private BigDecimal paymentNotExceedRatio;
|
||||
|
||||
/**
|
||||
* 预结算/结算不能超合同额(0:否,1:是)
|
||||
*/
|
||||
private Long budgetNotExceedContract;
|
||||
|
||||
/**
|
||||
* 预结算/结算不超合同额比例(%)
|
||||
*/
|
||||
private BigDecimal budgetNotExceedRatio;
|
||||
|
||||
/**
|
||||
* 实时刷新(0:否,1:是)
|
||||
*/
|
||||
private Long realTimeUpdate;
|
||||
|
||||
/**
|
||||
* 合同累计变更金额
|
||||
*/
|
||||
private BigDecimal contractCumulativeChangeAmount;
|
||||
|
||||
/**
|
||||
* 单据引用
|
||||
*/
|
||||
private String documentReference;
|
||||
|
||||
/**
|
||||
* 文件id
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
|
||||
/**
|
||||
* 扣款与奖励项
|
||||
*/
|
||||
private List<XzdDeductionItems> kkyjlx;
|
||||
|
||||
/**
|
||||
* 合同条款
|
||||
*/
|
||||
private List<XzdContractClause> httk;
|
||||
|
||||
/**
|
||||
* 支付条款
|
||||
*/
|
||||
private List<XzdSettlementRules> zftk;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,272 @@
|
||||
package org.dromara.xzd.comprehensive.domain.bo;
|
||||
|
||||
import org.dromara.xzd.comprehensive.domain.XzdCsContractInformation;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.xzd.domain.XzdContractClause;
|
||||
import org.dromara.xzd.domain.XzdDeductionItems;
|
||||
import org.dromara.xzd.domain.XzdSettlementRules;
|
||||
|
||||
/**
|
||||
* 综合服务合同信息业务对象 xzd_cs_contract_information
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XzdCsContractInformation.class, reverseConvertGenerate = false)
|
||||
public class XzdCsContractInformationBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 合同编码
|
||||
*/
|
||||
@NotBlank(message = "合同编码不能为空", groups = { EditGroup.class })
|
||||
private String contractCode;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
@NotBlank(message = "合同名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
@NotNull(message = "单据日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private LocalDate documentDate;
|
||||
|
||||
/**
|
||||
* 合同类型(如:租车合同)
|
||||
*/
|
||||
@NotBlank(message = "合同类型(如:租车合同)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String contractType;
|
||||
|
||||
/**
|
||||
* 项目ID(关联项目表)
|
||||
*/
|
||||
@NotNull(message = "项目ID(关联项目表)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 经营模式
|
||||
*/
|
||||
private String businessMode;
|
||||
|
||||
/**
|
||||
* 签订日期
|
||||
*/
|
||||
private LocalDate signDate;
|
||||
|
||||
/**
|
||||
* 甲方单位
|
||||
*/
|
||||
@NotNull(message = "甲方单位不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long partyA;
|
||||
|
||||
/**
|
||||
* 含税合同金额
|
||||
*/
|
||||
private BigDecimal taxIncludedAmount;
|
||||
|
||||
/**
|
||||
* 合同状态(如:新增、生效)
|
||||
*/
|
||||
private String contractStatus;
|
||||
|
||||
/**
|
||||
* 乙方单位
|
||||
*/
|
||||
@NotNull(message = "乙方单位不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long partyB;
|
||||
|
||||
/**
|
||||
* 累计变更金额
|
||||
*/
|
||||
private BigDecimal cumulativeChangeAmount;
|
||||
|
||||
/**
|
||||
* 部门ID(关联部门表)
|
||||
*/
|
||||
private Long departmentId;
|
||||
|
||||
/**
|
||||
* 归档日期
|
||||
*/
|
||||
private LocalDate archivalDate;
|
||||
|
||||
/**
|
||||
* 是否研发类(0:否,1:是)
|
||||
*/
|
||||
@NotNull(message = "是否研发类(0:否,1:是)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long isRD;
|
||||
|
||||
/**
|
||||
* 开票单位
|
||||
*/
|
||||
@NotNull(message = "开票单位不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long invoiceIssuer;
|
||||
|
||||
/**
|
||||
* 收票单位
|
||||
*/
|
||||
@NotNull(message = "收票单位不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long invoiceReceiver;
|
||||
|
||||
/**
|
||||
* 有效期开始日期
|
||||
*/
|
||||
private LocalDate validStartDate;
|
||||
|
||||
/**
|
||||
* 有效期结束日期
|
||||
*/
|
||||
private LocalDate validEndDate;
|
||||
|
||||
/**
|
||||
* 是否用印(0:否,1:是)
|
||||
*/
|
||||
private Long isSealed;
|
||||
|
||||
/**
|
||||
* 大写合同价税合计
|
||||
*/
|
||||
private String taxIncludedAmountUpper;
|
||||
|
||||
/**
|
||||
* 警示
|
||||
*/
|
||||
private String warning;
|
||||
|
||||
/**
|
||||
* 支付条款
|
||||
*/
|
||||
private String paymentTerms;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 签约组织
|
||||
*/
|
||||
@NotNull(message = "签约组织不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long signOrganization;
|
||||
|
||||
/**
|
||||
* 项目类型
|
||||
*/
|
||||
private String projectType;
|
||||
|
||||
/**
|
||||
* 项目大类
|
||||
*/
|
||||
private String projectCategory;
|
||||
|
||||
/**
|
||||
* 项目责任人
|
||||
*/
|
||||
private Long projectOwner;
|
||||
|
||||
/**
|
||||
* WBS编码
|
||||
*/
|
||||
private Long wbs;
|
||||
|
||||
/**
|
||||
* 备案状态(如:未备案、已备案)
|
||||
*/
|
||||
private String filingStatus;
|
||||
|
||||
/**
|
||||
* 备案时间
|
||||
*/
|
||||
private LocalDate filingTime;
|
||||
|
||||
/**
|
||||
* 是否需备案(0:否,1:是)
|
||||
*/
|
||||
private Long needFiling;
|
||||
|
||||
/**
|
||||
* 预算分类
|
||||
*/
|
||||
@NotNull(message = "预算分类不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long budgetCategory;
|
||||
|
||||
/**
|
||||
* 是否固定单价合同(0:否,1:是)
|
||||
*/
|
||||
private Long isFixedUnitPrice;
|
||||
|
||||
/**
|
||||
* 是否总价包干合同(0:否,1:是)
|
||||
*/
|
||||
private Long isLumpSum;
|
||||
|
||||
/**
|
||||
* 付款额不能超合同额(0:否,1:是)
|
||||
*/
|
||||
private Long paymentNotExceedContract;
|
||||
|
||||
/**
|
||||
* 付款额不超合同额比例(%)
|
||||
*/
|
||||
private BigDecimal paymentNotExceedRatio;
|
||||
|
||||
/**
|
||||
* 预结算/结算不能超合同额(0:否,1:是)
|
||||
*/
|
||||
private Long budgetNotExceedContract;
|
||||
|
||||
/**
|
||||
* 预结算/结算不超合同额比例(%)
|
||||
*/
|
||||
private BigDecimal budgetNotExceedRatio;
|
||||
|
||||
/**
|
||||
* 单据引用
|
||||
*/
|
||||
private String documentReference;
|
||||
|
||||
/**
|
||||
* 文件id
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 扣款与奖励项
|
||||
*/
|
||||
private List<XzdDeductionItems> kkyjlx;
|
||||
|
||||
/**
|
||||
* 合同条款
|
||||
*/
|
||||
private List<XzdContractClause> httk;
|
||||
|
||||
/**
|
||||
* 支付条款
|
||||
*/
|
||||
private List<XzdSettlementRules> zftk;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,131 @@
|
||||
package org.dromara.xzd.comprehensive.domain.bo;
|
||||
|
||||
import org.dromara.xzd.comprehensive.domain.XzdCsContractSuspend;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 综合服务合同终止业务对象 xzd_cs_contract_suspend
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XzdCsContractSuspend.class, reverseConvertGenerate = false)
|
||||
public class XzdCsContractSuspendBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 采购合同信息ID(合同编码)
|
||||
*/
|
||||
@NotNull(message = "采购合同信息ID(合同编码)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long contractInformationId;
|
||||
|
||||
/**
|
||||
* 单据编码
|
||||
*/
|
||||
@NotBlank(message = "单据编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String receiptsCode;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@NotBlank(message = "标题不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
@NotNull(message = "单据日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private LocalDate documentDate;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
@NotBlank(message = "合同名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 终止日期
|
||||
*/
|
||||
@NotNull(message = "终止日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private LocalDate terminationDate;
|
||||
|
||||
/**
|
||||
* 工程项目
|
||||
*/
|
||||
@NotNull(message = "工程项目不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long project;
|
||||
|
||||
/**
|
||||
* 乙方单位
|
||||
*/
|
||||
@NotNull(message = "乙方单位不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long artyBUnit;
|
||||
|
||||
/**
|
||||
* 甲方单位
|
||||
*/
|
||||
@NotNull(message = "甲方单位不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long partyAUnit;
|
||||
|
||||
/**
|
||||
* 终止原因
|
||||
*/
|
||||
// @NotBlank(message = "终止原因不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String terminationCause;
|
||||
|
||||
/**
|
||||
* 项目大类
|
||||
*/
|
||||
private String projectCategory;
|
||||
|
||||
/**
|
||||
* 项目类型
|
||||
*/
|
||||
private String projectType;
|
||||
|
||||
|
||||
/**
|
||||
* 累计结算金额
|
||||
*/
|
||||
private BigDecimal cumulativeSettlementAmount;
|
||||
|
||||
/**
|
||||
* 累计付款金额
|
||||
*/
|
||||
private BigDecimal cumulativePaymentAmount;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String auditStatus;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,275 @@
|
||||
package org.dromara.xzd.comprehensive.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.xzd.comprehensive.domain.XzdCsContractChange;
|
||||
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 org.dromara.xzd.domain.XzdContractClause;
|
||||
import org.dromara.xzd.domain.XzdDeductionItems;
|
||||
import org.dromara.xzd.domain.XzdSettlementRules;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 综合服务合同变更视图对象 xzd_cs_contract_change
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XzdCsContractChange.class)
|
||||
public class XzdCsContractChangeVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 单据编码
|
||||
*/
|
||||
@ExcelProperty(value = "单据编码")
|
||||
private String docCode;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@ExcelProperty(value = "标题")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
@ExcelProperty(value = "单据日期")
|
||||
private LocalDate docDate;
|
||||
|
||||
/**
|
||||
* 合同编码(关联合同表)
|
||||
*/
|
||||
@ExcelProperty(value = "合同编码", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "关=联合同表")
|
||||
private Long contractCode;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
@ExcelProperty(value = "合同名称")
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 合同类型
|
||||
*/
|
||||
@ExcelProperty(value = "合同类型")
|
||||
private String contractType;
|
||||
|
||||
/**
|
||||
* 变更类型
|
||||
*/
|
||||
@ExcelProperty(value = "变更类型")
|
||||
private Long changeType;
|
||||
|
||||
/**
|
||||
* 项目
|
||||
*/
|
||||
@ExcelProperty(value = "项目")
|
||||
private Long project;
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
* 经营模式
|
||||
*/
|
||||
@ExcelProperty(value = "经营模式")
|
||||
private String businessMode;
|
||||
|
||||
/**
|
||||
* 组织
|
||||
*/
|
||||
@ExcelProperty(value = "组织")
|
||||
private Long organization;
|
||||
private String organizationName;
|
||||
|
||||
/**
|
||||
* 甲方单位
|
||||
*/
|
||||
@ExcelProperty(value = "甲方单位")
|
||||
private Long partyA;
|
||||
private String partyAName;
|
||||
|
||||
/**
|
||||
* 乙方单位
|
||||
*/
|
||||
@ExcelProperty(value = "乙方单位")
|
||||
private Long partyB;
|
||||
private String partyBName;
|
||||
|
||||
/**
|
||||
* 原合同造价
|
||||
*/
|
||||
@ExcelProperty(value = "原合同造价")
|
||||
private BigDecimal originalContractAmount;
|
||||
|
||||
/**
|
||||
* 变更价税合计
|
||||
*/
|
||||
@ExcelProperty(value = "变更价税合计")
|
||||
private BigDecimal changeTaxIncludedAmount;
|
||||
|
||||
/**
|
||||
* 变更后价税合计
|
||||
*/
|
||||
@ExcelProperty(value = "变更后价税合计")
|
||||
private BigDecimal afterChangeTaxIncludedAmount;
|
||||
|
||||
/**
|
||||
* 累计变更金额
|
||||
*/
|
||||
@ExcelProperty(value = "累计变更金额")
|
||||
private BigDecimal cumulativeChangeAmount;
|
||||
|
||||
/**
|
||||
* 警示
|
||||
*/
|
||||
@ExcelProperty(value = "警示")
|
||||
private String warning;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 支付条款
|
||||
*/
|
||||
@ExcelProperty(value = "支付条款")
|
||||
private String paymentTerms;
|
||||
|
||||
/**
|
||||
* 是否用印(0:否,1:是)
|
||||
*/
|
||||
@ExcelProperty(value = "是否用印", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "0=:否,1:是")
|
||||
private Long isSealed;
|
||||
|
||||
/**
|
||||
* 变更后项目经理
|
||||
*/
|
||||
@ExcelProperty(value = "变更后项目经理")
|
||||
private Long afterChangeProjectManager;
|
||||
|
||||
/**
|
||||
* 变更后项目责任人
|
||||
*/
|
||||
@ExcelProperty(value = "变更后项目责任人")
|
||||
private Long afterChangeProjectLeader;
|
||||
|
||||
/**
|
||||
* 变更后现场经理
|
||||
*/
|
||||
@ExcelProperty(value = "变更后现场经理")
|
||||
private Long afterChangeSiteManager;
|
||||
|
||||
/**
|
||||
* 变更后合同备注
|
||||
*/
|
||||
@ExcelProperty(value = "变更后合同备注")
|
||||
private String afterChangeContractRemark;
|
||||
|
||||
/**
|
||||
* 项目大类
|
||||
*/
|
||||
@ExcelProperty(value = "项目大类")
|
||||
private String projectCategory;
|
||||
|
||||
/**
|
||||
* 项目类型
|
||||
*/
|
||||
@ExcelProperty(value = "项目类型")
|
||||
private String projectType;
|
||||
|
||||
/**
|
||||
* 付款额不能超合同额(0:否,1:是)
|
||||
*/
|
||||
@ExcelProperty(value = "付款额不能超合同额", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "0=:否,1:是")
|
||||
private Long paymentNotExceedContract;
|
||||
|
||||
/**
|
||||
* 付款额不超合同额支付比例(%)
|
||||
*/
|
||||
@ExcelProperty(value = "付款额不超合同额支付比例", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "%=")
|
||||
private BigDecimal paymentNotExceedRatio;
|
||||
|
||||
/**
|
||||
* 预结算/结算不能超合同额(0:否,1:是)
|
||||
*/
|
||||
@ExcelProperty(value = "预结算/结算不能超合同额", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "0=:否,1:是")
|
||||
private Long budgetNotExceedContract;
|
||||
|
||||
/**
|
||||
* 预结算/结算不超合同额比例(%)
|
||||
*/
|
||||
@ExcelProperty(value = "预结算/结算不超合同额比例", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "%=")
|
||||
private BigDecimal budgetNotExceedRatio;
|
||||
|
||||
/**
|
||||
* 实时刷新(0:否,1:是)
|
||||
*/
|
||||
@ExcelProperty(value = "实时刷新", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "0=:否,1:是")
|
||||
private Long realTimeUpdate;
|
||||
|
||||
/**
|
||||
* 合同累计变更金额
|
||||
*/
|
||||
@ExcelProperty(value = "合同累计变更金额")
|
||||
private BigDecimal contractCumulativeChangeAmount;
|
||||
|
||||
/**
|
||||
* 单据引用
|
||||
*/
|
||||
@ExcelProperty(value = "单据引用")
|
||||
private String documentReference;
|
||||
|
||||
/**
|
||||
* 文件id
|
||||
*/
|
||||
@ExcelProperty(value = "文件id")
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 扣款与奖励项
|
||||
*/
|
||||
private List<XzdDeductionItems> kkyjlx;
|
||||
|
||||
/**
|
||||
* 合同条款
|
||||
*/
|
||||
private List<XzdContractClause> httk;
|
||||
|
||||
/**
|
||||
* 支付条款
|
||||
*/
|
||||
private List<XzdSettlementRules> zftk;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,327 @@
|
||||
package org.dromara.xzd.comprehensive.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.xzd.comprehensive.domain.XzdCsContractInformation;
|
||||
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 org.dromara.xzd.domain.XzdContractClause;
|
||||
import org.dromara.xzd.domain.XzdDeductionItems;
|
||||
import org.dromara.xzd.domain.XzdSettlementRules;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 综合服务合同信息视图对象 xzd_cs_contract_information
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XzdCsContractInformation.class)
|
||||
public class XzdCsContractInformationVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 合同编码
|
||||
*/
|
||||
@ExcelProperty(value = "合同编码")
|
||||
private String contractCode;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
@ExcelProperty(value = "合同名称")
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
@ExcelProperty(value = "单据日期")
|
||||
private LocalDate documentDate;
|
||||
|
||||
/**
|
||||
* 合同类型(如:租车合同)
|
||||
*/
|
||||
@ExcelProperty(value = "合同类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "如=:租车合同")
|
||||
private String contractType;
|
||||
|
||||
/**
|
||||
* 项目ID(关联项目表)
|
||||
*/
|
||||
@ExcelProperty(value = "项目ID", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "关=联项目表")
|
||||
private Long projectId;
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
* 经营模式
|
||||
*/
|
||||
@ExcelProperty(value = "经营模式")
|
||||
private String businessMode;
|
||||
|
||||
/**
|
||||
* 签订日期
|
||||
*/
|
||||
@ExcelProperty(value = "签订日期")
|
||||
private LocalDate signDate;
|
||||
|
||||
/**
|
||||
* 甲方单位
|
||||
*/
|
||||
@ExcelProperty(value = "甲方单位")
|
||||
private Long partyA;
|
||||
private String partyAName;
|
||||
|
||||
/**
|
||||
* 含税合同金额
|
||||
*/
|
||||
@ExcelProperty(value = "含税合同金额")
|
||||
private BigDecimal taxIncludedAmount;
|
||||
|
||||
/**
|
||||
* 合同状态(如:新增、生效)
|
||||
*/
|
||||
@ExcelProperty(value = "合同状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "如=:新增、生效")
|
||||
private String contractStatus;
|
||||
|
||||
/**
|
||||
* 乙方单位
|
||||
*/
|
||||
@ExcelProperty(value = "乙方单位")
|
||||
private Long partyB;
|
||||
private String partyBName;
|
||||
|
||||
/**
|
||||
* 累计变更金额
|
||||
*/
|
||||
@ExcelProperty(value = "累计变更金额")
|
||||
private BigDecimal cumulativeChangeAmount;
|
||||
|
||||
/**
|
||||
* 部门ID(关联部门表)
|
||||
*/
|
||||
@ExcelProperty(value = "部门ID", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "关=联部门表")
|
||||
private Long departmentId;
|
||||
private String departmentName;
|
||||
|
||||
/**
|
||||
* 归档日期
|
||||
*/
|
||||
@ExcelProperty(value = "归档日期")
|
||||
private LocalDate archivalDate;
|
||||
|
||||
/**
|
||||
* 是否研发类(0:否,1:是)
|
||||
*/
|
||||
@ExcelProperty(value = "是否研发类", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "0=:否,1:是")
|
||||
private Long isRD;
|
||||
|
||||
/**
|
||||
* 开票单位
|
||||
*/
|
||||
@ExcelProperty(value = "开票单位")
|
||||
private Long invoiceIssuer;
|
||||
private String invoiceIssuerName;
|
||||
|
||||
/**
|
||||
* 收票单位
|
||||
*/
|
||||
@ExcelProperty(value = "收票单位")
|
||||
private Long invoiceReceiver;
|
||||
private String invoiceReceiverName;
|
||||
|
||||
/**
|
||||
* 有效期开始日期
|
||||
*/
|
||||
@ExcelProperty(value = "有效期开始日期")
|
||||
private LocalDate validStartDate;
|
||||
|
||||
/**
|
||||
* 有效期结束日期
|
||||
*/
|
||||
@ExcelProperty(value = "有效期结束日期")
|
||||
private LocalDate validEndDate;
|
||||
|
||||
/**
|
||||
* 是否用印(0:否,1:是)
|
||||
*/
|
||||
@ExcelProperty(value = "是否用印", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "0=:否,1:是")
|
||||
private Long isSealed;
|
||||
|
||||
/**
|
||||
* 大写合同价税合计
|
||||
*/
|
||||
@ExcelProperty(value = "大写合同价税合计")
|
||||
private String taxIncludedAmountUpper;
|
||||
|
||||
/**
|
||||
* 警示
|
||||
*/
|
||||
@ExcelProperty(value = "警示")
|
||||
private String warning;
|
||||
|
||||
/**
|
||||
* 支付条款
|
||||
*/
|
||||
@ExcelProperty(value = "支付条款")
|
||||
private String paymentTerms;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 签约组织
|
||||
*/
|
||||
@ExcelProperty(value = "签约组织")
|
||||
private Long signOrganization;
|
||||
private String signOrganizationName;
|
||||
|
||||
/**
|
||||
* 项目类型
|
||||
*/
|
||||
@ExcelProperty(value = "项目类型")
|
||||
private String projectType;
|
||||
|
||||
/**
|
||||
* 项目大类
|
||||
*/
|
||||
@ExcelProperty(value = "项目大类")
|
||||
private String projectCategory;
|
||||
|
||||
/**
|
||||
* 项目责任人
|
||||
*/
|
||||
@ExcelProperty(value = "项目责任人")
|
||||
private Long projectOwner;
|
||||
|
||||
/**
|
||||
* WBS编码
|
||||
*/
|
||||
@ExcelProperty(value = "WBS编码")
|
||||
private Long wbs;
|
||||
|
||||
/**
|
||||
* 备案状态(如:未备案、已备案)
|
||||
*/
|
||||
@ExcelProperty(value = "备案状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "如=:未备案、已备案")
|
||||
private String filingStatus;
|
||||
|
||||
/**
|
||||
* 备案时间
|
||||
*/
|
||||
@ExcelProperty(value = "备案时间")
|
||||
private LocalDate filingTime;
|
||||
|
||||
/**
|
||||
* 是否需备案(0:否,1:是)
|
||||
*/
|
||||
@ExcelProperty(value = "是否需备案", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "0=:否,1:是")
|
||||
private Long needFiling;
|
||||
|
||||
/**
|
||||
* 预算分类
|
||||
*/
|
||||
@ExcelProperty(value = "预算分类")
|
||||
private Long budgetCategory;
|
||||
|
||||
/**
|
||||
* 是否固定单价合同(0:否,1:是)
|
||||
*/
|
||||
@ExcelProperty(value = "是否固定单价合同", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "0=:否,1:是")
|
||||
private Long isFixedUnitPrice;
|
||||
|
||||
/**
|
||||
* 是否总价包干合同(0:否,1:是)
|
||||
*/
|
||||
@ExcelProperty(value = "是否总价包干合同", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "0=:否,1:是")
|
||||
private Long isLumpSum;
|
||||
|
||||
/**
|
||||
* 付款额不能超合同额(0:否,1:是)
|
||||
*/
|
||||
@ExcelProperty(value = "付款额不能超合同额", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "0=:否,1:是")
|
||||
private Long paymentNotExceedContract;
|
||||
|
||||
/**
|
||||
* 付款额不超合同额比例(%)
|
||||
*/
|
||||
@ExcelProperty(value = "付款额不超合同额比例", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "%=")
|
||||
private BigDecimal paymentNotExceedRatio;
|
||||
|
||||
/**
|
||||
* 预结算/结算不能超合同额(0:否,1:是)
|
||||
*/
|
||||
@ExcelProperty(value = "预结算/结算不能超合同额", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "0=:否,1:是")
|
||||
private Long budgetNotExceedContract;
|
||||
|
||||
/**
|
||||
* 预结算/结算不超合同额比例(%)
|
||||
*/
|
||||
@ExcelProperty(value = "预结算/结算不超合同额比例", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "%=")
|
||||
private BigDecimal budgetNotExceedRatio;
|
||||
|
||||
/**
|
||||
* 单据引用
|
||||
*/
|
||||
@ExcelProperty(value = "单据引用")
|
||||
private String documentReference;
|
||||
|
||||
/**
|
||||
* 文件id
|
||||
*/
|
||||
@ExcelProperty(value = "文件id")
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 扣款与奖励项
|
||||
*/
|
||||
private List<XzdDeductionItems> kkyjlx;
|
||||
|
||||
/**
|
||||
* 合同条款
|
||||
*/
|
||||
private List<XzdContractClause> httk;
|
||||
|
||||
/**
|
||||
* 支付条款
|
||||
*/
|
||||
private List<XzdSettlementRules> zftk;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,148 @@
|
||||
package org.dromara.xzd.comprehensive.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.xzd.comprehensive.domain.XzdCsContractSuspend;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 综合服务合同终止视图对象 xzd_cs_contract_suspend
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XzdCsContractSuspend.class)
|
||||
public class XzdCsContractSuspendVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 采购合同信息ID(合同编码)
|
||||
*/
|
||||
@ExcelProperty(value = "采购合同信息ID", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "合=同编码")
|
||||
private Long contractInformationId;
|
||||
|
||||
/**
|
||||
* 单据编码
|
||||
*/
|
||||
@ExcelProperty(value = "单据编码")
|
||||
private String receiptsCode;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@ExcelProperty(value = "标题")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
@ExcelProperty(value = "单据日期")
|
||||
private LocalDate documentDate;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
@ExcelProperty(value = "合同名称")
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 终止日期
|
||||
*/
|
||||
@ExcelProperty(value = "终止日期")
|
||||
private LocalDate terminationDate;
|
||||
|
||||
/**
|
||||
* 工程项目
|
||||
*/
|
||||
@ExcelProperty(value = "工程项目")
|
||||
private Long project;
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
* 乙方单位
|
||||
*/
|
||||
@ExcelProperty(value = "乙方单位")
|
||||
private Long artyBUnit;
|
||||
private String artyBUnitName;
|
||||
|
||||
/**
|
||||
* 甲方单位
|
||||
*/
|
||||
@ExcelProperty(value = "甲方单位")
|
||||
private Long partyAUnit;
|
||||
private String partyAUnitNamme;
|
||||
|
||||
/**
|
||||
* 终止原因
|
||||
*/
|
||||
@ExcelProperty(value = "终止原因")
|
||||
private String terminationCause;
|
||||
|
||||
/**
|
||||
* 项目大类
|
||||
*/
|
||||
@ExcelProperty(value = "项目大类")
|
||||
private String projectCategory;
|
||||
|
||||
/**
|
||||
* 项目类型
|
||||
*/
|
||||
@ExcelProperty(value = "项目类型")
|
||||
private String projectType;
|
||||
|
||||
/**
|
||||
* 累计结算金额
|
||||
*/
|
||||
@ExcelProperty(value = "累计结算金额")
|
||||
private BigDecimal cumulativeSettlementAmount;
|
||||
|
||||
/**
|
||||
* 累计付款金额
|
||||
*/
|
||||
@ExcelProperty(value = "累计付款金额")
|
||||
private BigDecimal cumulativePaymentAmount;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
@ExcelProperty(value = "文件ID")
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
@ExcelProperty(value = "审核状态")
|
||||
private String auditStatus;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package org.dromara.xzd.comprehensive.mapper;
|
||||
|
||||
import org.dromara.xzd.comprehensive.domain.XzdCsContractChange;
|
||||
import org.dromara.xzd.comprehensive.domain.vo.XzdCsContractChangeVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 综合服务合同变更Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
public interface XzdCsContractChangeMapper extends BaseMapperPlus<XzdCsContractChange, XzdCsContractChangeVo> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package org.dromara.xzd.comprehensive.mapper;
|
||||
|
||||
import org.dromara.xzd.comprehensive.domain.XzdCsContractInformation;
|
||||
import org.dromara.xzd.comprehensive.domain.vo.XzdCsContractInformationVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 综合服务合同信息Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
public interface XzdCsContractInformationMapper extends BaseMapperPlus<XzdCsContractInformation, XzdCsContractInformationVo> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package org.dromara.xzd.comprehensive.mapper;
|
||||
|
||||
import org.dromara.xzd.comprehensive.domain.XzdCsContractSuspend;
|
||||
import org.dromara.xzd.comprehensive.domain.vo.XzdCsContractSuspendVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 综合服务合同终止Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
public interface XzdCsContractSuspendMapper extends BaseMapperPlus<XzdCsContractSuspend, XzdCsContractSuspendVo> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package org.dromara.xzd.comprehensive.service;
|
||||
|
||||
import org.dromara.xzd.comprehensive.domain.vo.XzdCsContractChangeVo;
|
||||
import org.dromara.xzd.comprehensive.domain.bo.XzdCsContractChangeBo;
|
||||
import org.dromara.xzd.comprehensive.domain.XzdCsContractChange;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 综合服务合同变更Service接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
public interface IXzdCsContractChangeService extends IService<XzdCsContractChange>{
|
||||
|
||||
/**
|
||||
* 查询综合服务合同变更
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 综合服务合同变更
|
||||
*/
|
||||
XzdCsContractChangeVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询综合服务合同变更列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 综合服务合同变更分页列表
|
||||
*/
|
||||
TableDataInfo<XzdCsContractChangeVo> queryPageList(XzdCsContractChangeBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的综合服务合同变更列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 综合服务合同变更列表
|
||||
*/
|
||||
List<XzdCsContractChangeVo> queryList(XzdCsContractChangeBo bo);
|
||||
|
||||
/**
|
||||
* 新增综合服务合同变更
|
||||
*
|
||||
* @param bo 综合服务合同变更
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(XzdCsContractChangeBo bo);
|
||||
|
||||
/**
|
||||
* 修改综合服务合同变更
|
||||
*
|
||||
* @param bo 综合服务合同变更
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(XzdCsContractChangeBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除综合服务合同变更信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package org.dromara.xzd.comprehensive.service;
|
||||
|
||||
import org.dromara.xzd.comprehensive.domain.vo.XzdCsContractInformationVo;
|
||||
import org.dromara.xzd.comprehensive.domain.bo.XzdCsContractInformationBo;
|
||||
import org.dromara.xzd.comprehensive.domain.XzdCsContractInformation;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 综合服务合同信息Service接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
public interface IXzdCsContractInformationService extends IService<XzdCsContractInformation>{
|
||||
|
||||
/**
|
||||
* 查询综合服务合同信息
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 综合服务合同信息
|
||||
*/
|
||||
XzdCsContractInformationVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询综合服务合同信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 综合服务合同信息分页列表
|
||||
*/
|
||||
TableDataInfo<XzdCsContractInformationVo> queryPageList(XzdCsContractInformationBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的综合服务合同信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 综合服务合同信息列表
|
||||
*/
|
||||
List<XzdCsContractInformationVo> queryList(XzdCsContractInformationBo bo);
|
||||
|
||||
/**
|
||||
* 新增综合服务合同信息
|
||||
*
|
||||
* @param bo 综合服务合同信息
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(XzdCsContractInformationBo bo);
|
||||
|
||||
/**
|
||||
* 修改综合服务合同信息
|
||||
*
|
||||
* @param bo 综合服务合同信息
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(XzdCsContractInformationBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除综合服务合同信息信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package org.dromara.xzd.comprehensive.service;
|
||||
|
||||
import org.dromara.xzd.comprehensive.domain.vo.XzdCsContractSuspendVo;
|
||||
import org.dromara.xzd.comprehensive.domain.bo.XzdCsContractSuspendBo;
|
||||
import org.dromara.xzd.comprehensive.domain.XzdCsContractSuspend;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 综合服务合同终止Service接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
public interface IXzdCsContractSuspendService extends IService<XzdCsContractSuspend>{
|
||||
|
||||
/**
|
||||
* 查询综合服务合同终止
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 综合服务合同终止
|
||||
*/
|
||||
XzdCsContractSuspendVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询综合服务合同终止列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 综合服务合同终止分页列表
|
||||
*/
|
||||
TableDataInfo<XzdCsContractSuspendVo> queryPageList(XzdCsContractSuspendBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的综合服务合同终止列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 综合服务合同终止列表
|
||||
*/
|
||||
List<XzdCsContractSuspendVo> queryList(XzdCsContractSuspendBo bo);
|
||||
|
||||
/**
|
||||
* 新增综合服务合同终止
|
||||
*
|
||||
* @param bo 综合服务合同终止
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(XzdCsContractSuspendBo bo);
|
||||
|
||||
/**
|
||||
* 修改综合服务合同终止
|
||||
*
|
||||
* @param bo 综合服务合同终止
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(XzdCsContractSuspendBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除综合服务合同终止信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@ -0,0 +1,371 @@
|
||||
package org.dromara.xzd.comprehensive.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.system.domain.vo.SysDeptVo;
|
||||
import org.dromara.system.service.impl.SysDeptServiceImpl;
|
||||
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.domain.XzdContractClause;
|
||||
import org.dromara.xzd.domain.XzdDeductionItems;
|
||||
import org.dromara.xzd.domain.XzdSettlementRules;
|
||||
import org.dromara.xzd.domain.dto.QuerCorrespondentDto;
|
||||
import org.dromara.xzd.domain.vo.XzdProjectVo;
|
||||
import org.dromara.xzd.domain.vo.XzdSupplierInfoVo;
|
||||
import org.dromara.xzd.enums.XzdClassEnum;
|
||||
import org.dromara.xzd.service.IXzdCorrespondentList;
|
||||
import org.dromara.xzd.service.impl.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.xzd.comprehensive.domain.bo.XzdCsContractChangeBo;
|
||||
import org.dromara.xzd.comprehensive.domain.vo.XzdCsContractChangeVo;
|
||||
import org.dromara.xzd.comprehensive.domain.XzdCsContractChange;
|
||||
import org.dromara.xzd.comprehensive.mapper.XzdCsContractChangeMapper;
|
||||
import org.dromara.xzd.comprehensive.service.IXzdCsContractChangeService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 综合服务合同变更Service业务层处理
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XzdCsContractChangeServiceImpl extends ServiceImpl<XzdCsContractChangeMapper, XzdCsContractChange> implements IXzdCsContractChangeService {
|
||||
|
||||
private final XzdCsContractChangeMapper baseMapper;
|
||||
|
||||
@Autowired
|
||||
private XzdDeductionItemsServiceImpl xzdDeductionItemsService;
|
||||
@Autowired
|
||||
private XzdContractClauseServiceImpl xzdContractClauseService;
|
||||
@Autowired
|
||||
private XzdSettlementRulesServiceImpl xzdSettlementRulesService;
|
||||
@Autowired
|
||||
private SysOssServiceImpl sysOssService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private XzdProjectServiceImpl xzdProjectService;
|
||||
@Autowired
|
||||
private IXzdCorrespondentList iXzdCorrespondentList;
|
||||
@Autowired
|
||||
private XzdSupplierInfoServiceImpl xzdSupplierInfoService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询综合服务合同变更
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 综合服务合同变更
|
||||
*/
|
||||
@Override
|
||||
public XzdCsContractChangeVo queryById(Long id){
|
||||
XzdCsContractChangeVo xzdCsContractChangeVo = baseMapper.selectVoById(id);
|
||||
if (xzdCsContractChangeVo!=null){
|
||||
getName(xzdCsContractChangeVo);
|
||||
getHttk(xzdCsContractChangeVo);
|
||||
}
|
||||
return xzdCsContractChangeVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询综合服务合同变更列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 综合服务合同变更分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XzdCsContractChangeVo> queryPageList(XzdCsContractChangeBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XzdCsContractChange> lqw = buildQueryWrapper(bo);
|
||||
Page<XzdCsContractChangeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
result.getRecords().forEach(this::getName);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的综合服务合同变更列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 综合服务合同变更列表
|
||||
*/
|
||||
@Override
|
||||
public List<XzdCsContractChangeVo> queryList(XzdCsContractChangeBo bo) {
|
||||
LambdaQueryWrapper<XzdCsContractChange> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XzdCsContractChange> buildQueryWrapper(XzdCsContractChangeBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<XzdCsContractChange> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByDesc(XzdCsContractChange::getId);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDocCode()), XzdCsContractChange::getDocCode, bo.getDocCode());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), XzdCsContractChange::getTitle, bo.getTitle());
|
||||
lqw.eq(bo.getDocDate() != null, XzdCsContractChange::getDocDate, bo.getDocDate());
|
||||
lqw.eq(bo.getContractCode() != null, XzdCsContractChange::getContractCode, bo.getContractCode());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getContractName()), XzdCsContractChange::getContractName, bo.getContractName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getContractType()), XzdCsContractChange::getContractType, bo.getContractType());
|
||||
lqw.eq(bo.getChangeType() != null, XzdCsContractChange::getChangeType, bo.getChangeType());
|
||||
lqw.eq(bo.getProject() != null, XzdCsContractChange::getProject, bo.getProject());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getBusinessMode()), XzdCsContractChange::getBusinessMode, bo.getBusinessMode());
|
||||
lqw.eq(bo.getOrganization() !=null, XzdCsContractChange::getOrganization, bo.getOrganization());
|
||||
lqw.eq(bo.getPartyA() != null, XzdCsContractChange::getPartyA, bo.getPartyA());
|
||||
lqw.eq(bo.getPartyB() != null, XzdCsContractChange::getPartyB, bo.getPartyB());
|
||||
lqw.eq(bo.getOriginalContractAmount() != null, XzdCsContractChange::getOriginalContractAmount, bo.getOriginalContractAmount());
|
||||
lqw.eq(bo.getChangeTaxIncludedAmount() != null, XzdCsContractChange::getChangeTaxIncludedAmount, bo.getChangeTaxIncludedAmount());
|
||||
lqw.eq(bo.getAfterChangeTaxIncludedAmount() != null, XzdCsContractChange::getAfterChangeTaxIncludedAmount, bo.getAfterChangeTaxIncludedAmount());
|
||||
lqw.eq(bo.getCumulativeChangeAmount() != null, XzdCsContractChange::getCumulativeChangeAmount, bo.getCumulativeChangeAmount());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getWarning()), XzdCsContractChange::getWarning, bo.getWarning());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPaymentTerms()), XzdCsContractChange::getPaymentTerms, bo.getPaymentTerms());
|
||||
lqw.eq(bo.getIsSealed() != null, XzdCsContractChange::getIsSealed, bo.getIsSealed());
|
||||
lqw.eq(bo.getAfterChangeProjectManager() != null, XzdCsContractChange::getAfterChangeProjectManager, bo.getAfterChangeProjectManager());
|
||||
lqw.eq(bo.getAfterChangeProjectLeader() != null, XzdCsContractChange::getAfterChangeProjectLeader, bo.getAfterChangeProjectLeader());
|
||||
lqw.eq(bo.getAfterChangeSiteManager() != null, XzdCsContractChange::getAfterChangeSiteManager, bo.getAfterChangeSiteManager());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getAfterChangeContractRemark()), XzdCsContractChange::getAfterChangeContractRemark, bo.getAfterChangeContractRemark());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getProjectCategory()), XzdCsContractChange::getProjectCategory, bo.getProjectCategory());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getProjectType()), XzdCsContractChange::getProjectType, bo.getProjectType());
|
||||
lqw.eq(bo.getPaymentNotExceedContract() != null, XzdCsContractChange::getPaymentNotExceedContract, bo.getPaymentNotExceedContract());
|
||||
lqw.eq(bo.getPaymentNotExceedRatio() != null, XzdCsContractChange::getPaymentNotExceedRatio, bo.getPaymentNotExceedRatio());
|
||||
lqw.eq(bo.getBudgetNotExceedContract() != null, XzdCsContractChange::getBudgetNotExceedContract, bo.getBudgetNotExceedContract());
|
||||
lqw.eq(bo.getBudgetNotExceedRatio() != null, XzdCsContractChange::getBudgetNotExceedRatio, bo.getBudgetNotExceedRatio());
|
||||
lqw.eq(bo.getRealTimeUpdate() != null, XzdCsContractChange::getRealTimeUpdate, bo.getRealTimeUpdate());
|
||||
lqw.eq(bo.getContractCumulativeChangeAmount() != null, XzdCsContractChange::getContractCumulativeChangeAmount, bo.getContractCumulativeChangeAmount());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDocumentReference()), XzdCsContractChange::getDocumentReference, bo.getDocumentReference());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFileId()), XzdCsContractChange::getFileId, bo.getFileId());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增综合服务合同变更
|
||||
*
|
||||
* @param bo 综合服务合同变更
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean insertByBo(XzdCsContractChangeBo bo) {
|
||||
XzdCsContractChange add = MapstructUtils.convert(bo, XzdCsContractChange.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
addzixiang(bo,add);
|
||||
String tableName = XzdClassEnum.CS_CONTRACT_CHANGE.getClassName();
|
||||
if (bo.getKkyjlx() == null || bo.getKkyjlx().isEmpty()) {
|
||||
throw new ServiceException("扣款与奖励项不能为空");
|
||||
}
|
||||
//合同条款-扣款与奖励项
|
||||
for (XzdDeductionItems kkyjlx : bo.getKkyjlx()) {
|
||||
kkyjlx.setTableName(tableName);
|
||||
kkyjlx.setContractDetailsId(add.getId());
|
||||
}
|
||||
xzdDeductionItemsService.saveBatch(bo.getKkyjlx());
|
||||
if (bo.getHttk() == null || bo.getHttk().isEmpty()) {
|
||||
throw new ServiceException("合同条款不能为空");
|
||||
}
|
||||
//合同条款-合同条款
|
||||
for (XzdContractClause clause : bo.getHttk()) {
|
||||
clause.setTableName(tableName);
|
||||
clause.setContractDetailsId(add.getId());
|
||||
}
|
||||
xzdContractClauseService.saveBatch(bo.getHttk());
|
||||
if (bo.getZftk() == null || bo.getZftk().isEmpty()) {
|
||||
throw new ServiceException("支付条款不能为空");
|
||||
}
|
||||
//支付条款
|
||||
for (XzdSettlementRules clause : bo.getZftk()) {
|
||||
clause.setContractDetailsId(add.getId());
|
||||
}
|
||||
xzdSettlementRulesService.saveBatch(bo.getZftk());
|
||||
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改综合服务合同变更
|
||||
*
|
||||
* @param bo 综合服务合同变更
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean updateByBo(XzdCsContractChangeBo bo) {
|
||||
XzdCsContractChange update = MapstructUtils.convert(bo, XzdCsContractChange.class);
|
||||
validEntityBeforeSave(update);
|
||||
|
||||
XzdCsContractChange old = baseMapper.selectById(update.getId());
|
||||
if (old == null){
|
||||
throw new ServiceException("找不到要修改数据!!!");
|
||||
}
|
||||
//合同条款-合同条款
|
||||
LambdaQueryWrapper<XzdContractClause> lambdaQueryWrapper2 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper2.eq(XzdContractClause::getContractDetailsId, old.getId());
|
||||
xzdContractClauseService.remove(lambdaQueryWrapper2);
|
||||
|
||||
|
||||
//支付条款
|
||||
LambdaQueryWrapper<XzdSettlementRules> lambdaQueryWrapper3 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper3.eq(XzdSettlementRules::getContractDetailsId, old.getId());
|
||||
xzdSettlementRulesService.remove(lambdaQueryWrapper3);
|
||||
|
||||
|
||||
//合同条款-扣款与奖励项
|
||||
LambdaQueryWrapper<XzdDeductionItems> lambdaQueryWrapper4 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper4.eq(XzdDeductionItems::getContractDetailsId, old.getId());
|
||||
xzdDeductionItemsService.remove(lambdaQueryWrapper4);
|
||||
|
||||
addzixiang(bo, update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
private void addzixiang(XzdCsContractChangeBo bo, XzdCsContractChange update) {
|
||||
String tableName = XzdClassEnum.CS_CONTRACT_CHANGE.getClassName();
|
||||
if (bo.getKkyjlx() == null || bo.getKkyjlx().isEmpty()) {
|
||||
throw new ServiceException("扣款与奖励项不能为空");
|
||||
}
|
||||
//合同条款-扣款与奖励项
|
||||
for (XzdDeductionItems kkyjlx : bo.getKkyjlx()) {
|
||||
kkyjlx.setTableName(tableName);
|
||||
kkyjlx.setContractDetailsId(update.getId());
|
||||
}
|
||||
xzdDeductionItemsService.saveBatch(bo.getKkyjlx());
|
||||
if (bo.getHttk() == null || bo.getHttk().isEmpty()) {
|
||||
throw new ServiceException("合同条款不能为空");
|
||||
}
|
||||
//合同条款-合同条款
|
||||
for (XzdContractClause clause : bo.getHttk()) {
|
||||
clause.setTableName(tableName);
|
||||
clause.setContractDetailsId(update.getId());
|
||||
}
|
||||
xzdContractClauseService.saveBatch(bo.getHttk());
|
||||
if (bo.getZftk() == null || bo.getZftk().isEmpty()) {
|
||||
throw new ServiceException("支付条款不能为空");
|
||||
}
|
||||
//支付条款
|
||||
for (XzdSettlementRules clause : bo.getZftk()) {
|
||||
clause.setContractDetailsId(update.getId());
|
||||
}
|
||||
xzdSettlementRulesService.saveBatch(bo.getZftk());
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(XzdCsContractChange entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除综合服务合同变更信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
List<Long> deleteIds = new ArrayList<>();
|
||||
for (Long id : ids) {
|
||||
XzdCsContractChangeVo vo = baseMapper.selectVoById(id);
|
||||
if (vo != null){
|
||||
//删除附件
|
||||
if (vo.getFileId()!= null && !vo.getFileId().isEmpty()){
|
||||
List<Long> list = Arrays.stream(vo.getFileId().split(",")).map(Long::valueOf).toList();
|
||||
deleteIds.addAll(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!deleteIds.isEmpty()) {
|
||||
sysOssService.deleteWithValidByIds(deleteIds, false);
|
||||
}
|
||||
//合同条款-扣款与奖励项
|
||||
LambdaQueryWrapper<XzdDeductionItems> lambdaQueryWrapper1 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper1.in(XzdDeductionItems::getContractDetailsId, ids);
|
||||
xzdDeductionItemsService.remove(lambdaQueryWrapper1);
|
||||
|
||||
//合同条款-合同条款
|
||||
LambdaQueryWrapper<XzdContractClause> lambdaQueryWrapper2 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper2.in(XzdContractClause::getContractDetailsId, ids);
|
||||
xzdContractClauseService.remove(lambdaQueryWrapper2);
|
||||
|
||||
//支付条款
|
||||
LambdaQueryWrapper<XzdSettlementRules> lambdaQueryWrapper3 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper3.in(XzdSettlementRules::getContractDetailsId, ids);
|
||||
xzdSettlementRulesService.remove(lambdaQueryWrapper3);
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取部分字段名称
|
||||
* @param item
|
||||
*/
|
||||
private void getName(XzdCsContractChangeVo item) {
|
||||
//项目名称
|
||||
if (item.getProject() != null){
|
||||
String projectName = xzdProjectService.queryNameById(item.getProject());
|
||||
if (projectName != null){
|
||||
item.setProjectName(projectName);
|
||||
}
|
||||
}
|
||||
//签约组织(客户信息列表)
|
||||
String dtoR = iXzdCorrespondentList.queryNameById(item.getOrganization());
|
||||
if (dtoR!=null){
|
||||
item.setOrganizationName(dtoR);
|
||||
}
|
||||
|
||||
//甲方单位(客户信息列表)
|
||||
String byid = iXzdCorrespondentList.queryNameById(item.getPartyA());
|
||||
if (byid!=null){
|
||||
item.setPartyAName(byid);
|
||||
}
|
||||
//乙方单位(供应商信息列表)
|
||||
String xzdSupplierInfoVo = xzdSupplierInfoService.queryNameById(item.getPartyB());
|
||||
if (xzdSupplierInfoVo != null){
|
||||
item.setPartyBName(xzdSupplierInfoVo);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取合同条款内容
|
||||
* @param vo
|
||||
*/
|
||||
private void getHttk(XzdCsContractChangeVo vo) {
|
||||
//合同条款-扣款与奖励项
|
||||
LambdaQueryWrapper<XzdDeductionItems> lambdaQueryWrapper1 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper1.eq(XzdDeductionItems::getContractDetailsId, vo.getId());
|
||||
List<XzdDeductionItems> list = xzdDeductionItemsService.list(lambdaQueryWrapper1);
|
||||
vo.setKkyjlx(list);
|
||||
|
||||
//合同条款-合同条款
|
||||
LambdaQueryWrapper<XzdContractClause> lambdaQueryWrapper2 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper2.eq(XzdContractClause::getContractDetailsId, vo.getId());
|
||||
List<XzdContractClause> list1 = xzdContractClauseService.list(lambdaQueryWrapper2);
|
||||
vo.setHttk(list1);
|
||||
|
||||
//支付条款
|
||||
LambdaQueryWrapper<XzdSettlementRules> lambdaQueryWrapper3 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper3.eq(XzdSettlementRules::getContractDetailsId, vo.getId());
|
||||
List<XzdSettlementRules> list2 = xzdSettlementRulesService.list(lambdaQueryWrapper3);
|
||||
vo.setZftk(list2);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,408 @@
|
||||
package org.dromara.xzd.comprehensive.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.utils.BatchNumberGenerator;
|
||||
import org.dromara.system.domain.vo.SysDeptVo;
|
||||
import org.dromara.system.service.impl.SysDeptServiceImpl;
|
||||
import org.dromara.system.service.impl.SysOssServiceImpl;
|
||||
import org.dromara.xzd.domain.XzdContractAdvanceInfo;
|
||||
import org.dromara.xzd.domain.XzdContractClause;
|
||||
import org.dromara.xzd.domain.XzdDeductionItems;
|
||||
import org.dromara.xzd.domain.XzdSettlementRules;
|
||||
import org.dromara.xzd.domain.dto.QuerCorrespondentDto;
|
||||
import org.dromara.xzd.domain.vo.XzdContractDetailsVo;
|
||||
import org.dromara.xzd.domain.vo.XzdProjectVo;
|
||||
import org.dromara.xzd.domain.vo.XzdSupplierInfoVo;
|
||||
import org.dromara.xzd.enums.XzdClassEnum;
|
||||
import org.dromara.xzd.service.IXzdCorrespondentList;
|
||||
import org.dromara.xzd.service.impl.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.xzd.comprehensive.domain.bo.XzdCsContractInformationBo;
|
||||
import org.dromara.xzd.comprehensive.domain.vo.XzdCsContractInformationVo;
|
||||
import org.dromara.xzd.comprehensive.domain.XzdCsContractInformation;
|
||||
import org.dromara.xzd.comprehensive.mapper.XzdCsContractInformationMapper;
|
||||
import org.dromara.xzd.comprehensive.service.IXzdCsContractInformationService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 综合服务合同信息Service业务层处理
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XzdCsContractInformationServiceImpl extends ServiceImpl<XzdCsContractInformationMapper, XzdCsContractInformation> implements IXzdCsContractInformationService {
|
||||
|
||||
private final XzdCsContractInformationMapper baseMapper;
|
||||
|
||||
@Autowired
|
||||
private XzdDeductionItemsServiceImpl xzdDeductionItemsService;
|
||||
@Autowired
|
||||
private XzdContractClauseServiceImpl xzdContractClauseService;
|
||||
@Autowired
|
||||
private XzdSettlementRulesServiceImpl xzdSettlementRulesService;
|
||||
@Autowired
|
||||
private SysOssServiceImpl sysOssService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private SysDeptServiceImpl sysDeptService;
|
||||
@Autowired
|
||||
private XzdProjectServiceImpl xzdProjectService;
|
||||
@Autowired
|
||||
private IXzdCorrespondentList iXzdCorrespondentList;
|
||||
@Autowired
|
||||
private XzdSupplierInfoServiceImpl xzdSupplierInfoService;
|
||||
|
||||
/**
|
||||
* 查询综合服务合同信息
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 综合服务合同信息
|
||||
*/
|
||||
@Override
|
||||
public XzdCsContractInformationVo queryById(Long id){
|
||||
XzdCsContractInformationVo vo = baseMapper.selectVoById(id);
|
||||
if (vo!=null){
|
||||
getName(vo);
|
||||
getHttk(vo);
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取合同条款内容
|
||||
* @param vo
|
||||
*/
|
||||
private void getHttk(XzdCsContractInformationVo vo) {
|
||||
//合同条款-扣款与奖励项
|
||||
LambdaQueryWrapper<XzdDeductionItems> lambdaQueryWrapper1 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper1.eq(XzdDeductionItems::getContractDetailsId, vo.getId());
|
||||
List<XzdDeductionItems> list = xzdDeductionItemsService.list(lambdaQueryWrapper1);
|
||||
vo.setKkyjlx(list);
|
||||
|
||||
//合同条款-合同条款
|
||||
LambdaQueryWrapper<XzdContractClause> lambdaQueryWrapper2 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper2.eq(XzdContractClause::getContractDetailsId, vo.getId());
|
||||
List<XzdContractClause> list1 = xzdContractClauseService.list(lambdaQueryWrapper2);
|
||||
vo.setHttk(list1);
|
||||
|
||||
//支付条款
|
||||
LambdaQueryWrapper<XzdSettlementRules> lambdaQueryWrapper3 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper3.eq(XzdSettlementRules::getContractDetailsId, vo.getId());
|
||||
List<XzdSettlementRules> list2 = xzdSettlementRulesService.list(lambdaQueryWrapper3);
|
||||
vo.setZftk(list2);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询综合服务合同信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 综合服务合同信息分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XzdCsContractInformationVo> queryPageList(XzdCsContractInformationBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XzdCsContractInformation> lqw = buildQueryWrapper(bo);
|
||||
Page<XzdCsContractInformationVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
for (XzdCsContractInformationVo item : result.getRecords()) {
|
||||
getName(item);
|
||||
}
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取部分字段名称
|
||||
* @param item
|
||||
*/
|
||||
private void getName(XzdCsContractInformationVo item) {
|
||||
//部门名称
|
||||
if (item.getDepartmentId() != null){
|
||||
SysDeptVo sysDeptVo = sysDeptService.selectDeptById(item.getDepartmentId());
|
||||
if (sysDeptVo != null){
|
||||
item.setDepartmentName(sysDeptVo.getDeptName());
|
||||
}
|
||||
}
|
||||
//项目名称
|
||||
if (item.getProjectId() != null){
|
||||
String projectName = xzdProjectService.queryNameById(item.getProjectId());
|
||||
if (projectName != null){
|
||||
item.setProjectName(projectName);
|
||||
}
|
||||
}
|
||||
//签约组织(客户信息列表)
|
||||
|
||||
if (item.getSignOrganization() != null){
|
||||
String byid = iXzdCorrespondentList.queryNameById(item.getSignOrganization());
|
||||
if (byid!=null){
|
||||
item.setSignOrganizationName(byid);
|
||||
}
|
||||
}
|
||||
//甲方单位(客户信息列表)
|
||||
if (item.getPartyA() != null){
|
||||
String byid = iXzdCorrespondentList.queryNameById(item.getPartyA());
|
||||
if (byid!=null){
|
||||
item.setPartyAName(byid);
|
||||
}
|
||||
}
|
||||
//乙方单位(供应商信息列表)
|
||||
if (item.getPartyB() != null){
|
||||
String unitName = xzdSupplierInfoService.queryNameById(item.getPartyB());
|
||||
if (unitName != null){
|
||||
|
||||
item.setPartyBName(unitName);
|
||||
}
|
||||
}
|
||||
//开票单位名称(供应商名称)
|
||||
if (item.getInvoiceIssuer() != null){
|
||||
String unitName = xzdSupplierInfoService.queryNameById(item.getInvoiceIssuer());
|
||||
if (unitName != null){
|
||||
item.setInvoiceIssuerName(unitName);
|
||||
}
|
||||
}
|
||||
//收票单位名称(客户名称)
|
||||
if (item.getInvoiceReceiver()!= null){
|
||||
String byid = iXzdCorrespondentList.queryNameById(item.getInvoiceReceiver());
|
||||
if (byid!=null){
|
||||
item.setInvoiceReceiverName(byid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的综合服务合同信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 综合服务合同信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<XzdCsContractInformationVo> queryList(XzdCsContractInformationBo bo) {
|
||||
LambdaQueryWrapper<XzdCsContractInformation> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XzdCsContractInformation> buildQueryWrapper(XzdCsContractInformationBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<XzdCsContractInformation> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByDesc(XzdCsContractInformation::getId);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getContractCode()), XzdCsContractInformation::getContractCode, bo.getContractCode());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getContractName()), XzdCsContractInformation::getContractName, bo.getContractName());
|
||||
lqw.eq(bo.getDocumentDate() != null, XzdCsContractInformation::getDocumentDate, bo.getDocumentDate());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getContractType()), XzdCsContractInformation::getContractType, bo.getContractType());
|
||||
lqw.eq(bo.getProjectId() != null, XzdCsContractInformation::getProjectId, bo.getProjectId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getBusinessMode()), XzdCsContractInformation::getBusinessMode, bo.getBusinessMode());
|
||||
lqw.eq(bo.getSignDate() != null, XzdCsContractInformation::getSignDate, bo.getSignDate());
|
||||
lqw.eq(bo.getPartyA() != null, XzdCsContractInformation::getPartyA, bo.getPartyA());
|
||||
lqw.eq(bo.getTaxIncludedAmount() != null, XzdCsContractInformation::getTaxIncludedAmount, bo.getTaxIncludedAmount());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getContractStatus()), XzdCsContractInformation::getContractStatus, bo.getContractStatus());
|
||||
lqw.eq(bo.getPartyB() != null, XzdCsContractInformation::getPartyB, bo.getPartyB());
|
||||
lqw.eq(bo.getCumulativeChangeAmount() != null, XzdCsContractInformation::getCumulativeChangeAmount, bo.getCumulativeChangeAmount());
|
||||
lqw.eq(bo.getDepartmentId() != null, XzdCsContractInformation::getDepartmentId, bo.getDepartmentId());
|
||||
lqw.eq(bo.getArchivalDate() != null, XzdCsContractInformation::getArchivalDate, bo.getArchivalDate());
|
||||
lqw.eq(bo.getIsRD() != null, XzdCsContractInformation::getIsRD, bo.getIsRD());
|
||||
lqw.eq(bo.getInvoiceIssuer() != null, XzdCsContractInformation::getInvoiceIssuer, bo.getInvoiceIssuer());
|
||||
lqw.eq(bo.getInvoiceReceiver() != null, XzdCsContractInformation::getInvoiceReceiver, bo.getInvoiceReceiver());
|
||||
lqw.eq(bo.getValidStartDate() != null, XzdCsContractInformation::getValidStartDate, bo.getValidStartDate());
|
||||
lqw.eq(bo.getValidEndDate() != null, XzdCsContractInformation::getValidEndDate, bo.getValidEndDate());
|
||||
lqw.eq(bo.getIsSealed() != null, XzdCsContractInformation::getIsSealed, bo.getIsSealed());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTaxIncludedAmountUpper()), XzdCsContractInformation::getTaxIncludedAmountUpper, bo.getTaxIncludedAmountUpper());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getWarning()), XzdCsContractInformation::getWarning, bo.getWarning());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPaymentTerms()), XzdCsContractInformation::getPaymentTerms, bo.getPaymentTerms());
|
||||
lqw.eq(bo.getSignOrganization() != null, XzdCsContractInformation::getSignOrganization, bo.getSignOrganization());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getProjectType()), XzdCsContractInformation::getProjectType, bo.getProjectType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getProjectCategory()), XzdCsContractInformation::getProjectCategory, bo.getProjectCategory());
|
||||
lqw.eq(bo.getProjectOwner() != null, XzdCsContractInformation::getProjectOwner, bo.getProjectOwner());
|
||||
lqw.eq(bo.getWbs() != null, XzdCsContractInformation::getWbs, bo.getWbs());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFilingStatus()), XzdCsContractInformation::getFilingStatus, bo.getFilingStatus());
|
||||
lqw.eq(bo.getFilingTime() != null, XzdCsContractInformation::getFilingTime, bo.getFilingTime());
|
||||
lqw.eq(bo.getNeedFiling() != null, XzdCsContractInformation::getNeedFiling, bo.getNeedFiling());
|
||||
lqw.eq(bo.getBudgetCategory() != null, XzdCsContractInformation::getBudgetCategory, bo.getBudgetCategory());
|
||||
lqw.eq(bo.getIsFixedUnitPrice() != null, XzdCsContractInformation::getIsFixedUnitPrice, bo.getIsFixedUnitPrice());
|
||||
lqw.eq(bo.getIsLumpSum() != null, XzdCsContractInformation::getIsLumpSum, bo.getIsLumpSum());
|
||||
lqw.eq(bo.getPaymentNotExceedContract() != null, XzdCsContractInformation::getPaymentNotExceedContract, bo.getPaymentNotExceedContract());
|
||||
lqw.eq(bo.getPaymentNotExceedRatio() != null, XzdCsContractInformation::getPaymentNotExceedRatio, bo.getPaymentNotExceedRatio());
|
||||
lqw.eq(bo.getBudgetNotExceedContract() != null, XzdCsContractInformation::getBudgetNotExceedContract, bo.getBudgetNotExceedContract());
|
||||
lqw.eq(bo.getBudgetNotExceedRatio() != null, XzdCsContractInformation::getBudgetNotExceedRatio, bo.getBudgetNotExceedRatio());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDocumentReference()), XzdCsContractInformation::getDocumentReference, bo.getDocumentReference());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFileId()), XzdCsContractInformation::getFileId, bo.getFileId());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增综合服务合同信息
|
||||
*
|
||||
* @param bo 综合服务合同信息
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean insertByBo(XzdCsContractInformationBo bo) {
|
||||
XzdCsContractInformation add = MapstructUtils.convert(bo, XzdCsContractInformation.class);
|
||||
validEntityBeforeSave(add);
|
||||
String banBen = BatchNumberGenerator.generateBatchNumber("ZHFWHT-");
|
||||
add.setContractCode(banBen);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
String tableName = XzdClassEnum.CS_CONTRACT_INFORMATION.getClassName();
|
||||
if (bo.getKkyjlx() == null || bo.getKkyjlx().isEmpty()) {
|
||||
throw new ServiceException("扣款与奖励项不能为空");
|
||||
}
|
||||
//合同条款-扣款与奖励项
|
||||
for (XzdDeductionItems kkyjlx : bo.getKkyjlx()) {
|
||||
kkyjlx.setTableName(tableName);
|
||||
kkyjlx.setContractDetailsId(add.getId());
|
||||
}
|
||||
xzdDeductionItemsService.saveBatch(bo.getKkyjlx());
|
||||
if (bo.getHttk() == null || bo.getHttk().isEmpty()) {
|
||||
throw new ServiceException("合同条款不能为空");
|
||||
}
|
||||
//合同条款-合同条款
|
||||
for (XzdContractClause clause : bo.getHttk()) {
|
||||
clause.setTableName(tableName);
|
||||
clause.setContractDetailsId(add.getId());
|
||||
}
|
||||
xzdContractClauseService.saveBatch(bo.getHttk());
|
||||
if (bo.getZftk() == null || bo.getZftk().isEmpty()) {
|
||||
throw new ServiceException("支付条款不能为空");
|
||||
}
|
||||
//支付条款
|
||||
for (XzdSettlementRules clause : bo.getZftk()) {
|
||||
clause.setContractDetailsId(add.getId());
|
||||
}
|
||||
xzdSettlementRulesService.saveBatch(bo.getZftk());
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改综合服务合同信息
|
||||
*
|
||||
* @param bo 综合服务合同信息
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean updateByBo(XzdCsContractInformationBo bo) {
|
||||
XzdCsContractInformation update = MapstructUtils.convert(bo, XzdCsContractInformation.class);
|
||||
validEntityBeforeSave(update);
|
||||
XzdCsContractInformation old = baseMapper.selectById(update.getId());
|
||||
if (old == null){
|
||||
throw new ServiceException("找不到要修改数据!!!");
|
||||
}
|
||||
|
||||
//合同条款-合同条款
|
||||
LambdaQueryWrapper<XzdContractClause> lambdaQueryWrapper2 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper2.eq(XzdContractClause::getContractDetailsId, old.getId());
|
||||
xzdContractClauseService.remove(lambdaQueryWrapper2);
|
||||
|
||||
|
||||
//支付条款
|
||||
LambdaQueryWrapper<XzdSettlementRules> lambdaQueryWrapper3 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper3.eq(XzdSettlementRules::getContractDetailsId, old.getId());
|
||||
xzdSettlementRulesService.remove(lambdaQueryWrapper3);
|
||||
|
||||
|
||||
//合同条款-扣款与奖励项
|
||||
LambdaQueryWrapper<XzdDeductionItems> lambdaQueryWrapper4 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper4.eq(XzdDeductionItems::getContractDetailsId, old.getId());
|
||||
xzdDeductionItemsService.remove(lambdaQueryWrapper4);
|
||||
|
||||
String tableName = XzdClassEnum.CS_CONTRACT_INFORMATION.getClassName();
|
||||
if (bo.getKkyjlx() == null || bo.getKkyjlx().isEmpty()) {
|
||||
throw new ServiceException("扣款与奖励项不能为空");
|
||||
}
|
||||
//合同条款-扣款与奖励项
|
||||
for (XzdDeductionItems kkyjlx : bo.getKkyjlx()) {
|
||||
kkyjlx.setTableName(tableName);
|
||||
kkyjlx.setContractDetailsId(update.getId());
|
||||
}
|
||||
xzdDeductionItemsService.saveBatch(bo.getKkyjlx());
|
||||
if (bo.getHttk() == null || bo.getHttk().isEmpty()) {
|
||||
throw new ServiceException("合同条款不能为空");
|
||||
}
|
||||
//合同条款-合同条款
|
||||
for (XzdContractClause clause : bo.getHttk()) {
|
||||
clause.setTableName(tableName);
|
||||
clause.setContractDetailsId(update.getId());
|
||||
}
|
||||
xzdContractClauseService.saveBatch(bo.getHttk());
|
||||
if (bo.getZftk() == null || bo.getZftk().isEmpty()) {
|
||||
throw new ServiceException("支付条款不能为空");
|
||||
}
|
||||
//支付条款
|
||||
for (XzdSettlementRules clause : bo.getZftk()) {
|
||||
clause.setContractDetailsId(update.getId());
|
||||
}
|
||||
xzdSettlementRulesService.saveBatch(bo.getZftk());
|
||||
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(XzdCsContractInformation entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除综合服务合同信息信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
List<Long> deleteIds = new ArrayList<>();
|
||||
for (Long id : ids) {
|
||||
XzdCsContractInformationVo vo = baseMapper.selectVoById(id);
|
||||
if (vo != null){
|
||||
//删除附件
|
||||
if (vo.getFileId()!= null && !vo.getFileId().isEmpty()){
|
||||
List<Long> list = Arrays.stream(vo.getFileId().split(",")).map(Long::valueOf).toList();
|
||||
deleteIds.addAll(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!deleteIds.isEmpty()) {
|
||||
sysOssService.deleteWithValidByIds(deleteIds, false);
|
||||
}
|
||||
//合同条款-扣款与奖励项
|
||||
LambdaQueryWrapper<XzdDeductionItems> lambdaQueryWrapper1 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper1.in(XzdDeductionItems::getContractDetailsId, ids);
|
||||
xzdDeductionItemsService.remove(lambdaQueryWrapper1);
|
||||
|
||||
//合同条款-合同条款
|
||||
LambdaQueryWrapper<XzdContractClause> lambdaQueryWrapper2 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper2.in(XzdContractClause::getContractDetailsId, ids);
|
||||
xzdContractClauseService.remove(lambdaQueryWrapper2);
|
||||
|
||||
//支付条款
|
||||
LambdaQueryWrapper<XzdSettlementRules> lambdaQueryWrapper3 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper3.in(XzdSettlementRules::getContractDetailsId, ids);
|
||||
xzdSettlementRulesService.remove(lambdaQueryWrapper3);
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,210 @@
|
||||
package org.dromara.xzd.comprehensive.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.system.domain.vo.SysDeptVo;
|
||||
import org.dromara.system.service.impl.SysDeptServiceImpl;
|
||||
import org.dromara.system.service.impl.SysOssServiceImpl;
|
||||
import org.dromara.xzd.comprehensive.domain.vo.XzdCsContractInformationVo;
|
||||
import org.dromara.xzd.domain.dto.QuerCorrespondentDto;
|
||||
import org.dromara.xzd.domain.vo.XzdProjectVo;
|
||||
import org.dromara.xzd.domain.vo.XzdSupplierInfoVo;
|
||||
import org.dromara.xzd.service.IXzdCorrespondentList;
|
||||
import org.dromara.xzd.service.impl.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.xzd.comprehensive.domain.bo.XzdCsContractSuspendBo;
|
||||
import org.dromara.xzd.comprehensive.domain.vo.XzdCsContractSuspendVo;
|
||||
import org.dromara.xzd.comprehensive.domain.XzdCsContractSuspend;
|
||||
import org.dromara.xzd.comprehensive.mapper.XzdCsContractSuspendMapper;
|
||||
import org.dromara.xzd.comprehensive.service.IXzdCsContractSuspendService;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 综合服务合同终止Service业务层处理
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XzdCsContractSuspendServiceImpl extends ServiceImpl<XzdCsContractSuspendMapper, XzdCsContractSuspend> implements IXzdCsContractSuspendService {
|
||||
|
||||
private final XzdCsContractSuspendMapper baseMapper;
|
||||
|
||||
@Autowired
|
||||
private SysOssServiceImpl sysOssService;
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
private XzdProjectServiceImpl xzdProjectService;
|
||||
@Autowired
|
||||
private IXzdCorrespondentList iXzdCorrespondentList;
|
||||
@Autowired
|
||||
private XzdSupplierInfoServiceImpl xzdSupplierInfoService;
|
||||
|
||||
/**
|
||||
* 查询综合服务合同终止
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 综合服务合同终止
|
||||
*/
|
||||
@Override
|
||||
public XzdCsContractSuspendVo queryById(Long id){
|
||||
XzdCsContractSuspendVo vo = baseMapper.selectVoById(id);
|
||||
if (vo!=null){
|
||||
getName(vo);
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询综合服务合同终止列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 综合服务合同终止分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XzdCsContractSuspendVo> queryPageList(XzdCsContractSuspendBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XzdCsContractSuspend> lqw = buildQueryWrapper(bo);
|
||||
Page<XzdCsContractSuspendVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
result.getRecords().forEach(this::getName);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的综合服务合同终止列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 综合服务合同终止列表
|
||||
*/
|
||||
@Override
|
||||
public List<XzdCsContractSuspendVo> queryList(XzdCsContractSuspendBo bo) {
|
||||
LambdaQueryWrapper<XzdCsContractSuspend> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XzdCsContractSuspend> buildQueryWrapper(XzdCsContractSuspendBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<XzdCsContractSuspend> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByDesc(XzdCsContractSuspend::getId);
|
||||
lqw.eq(bo.getContractInformationId() != null, XzdCsContractSuspend::getContractInformationId, bo.getContractInformationId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getReceiptsCode()), XzdCsContractSuspend::getReceiptsCode, bo.getReceiptsCode());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), XzdCsContractSuspend::getTitle, bo.getTitle());
|
||||
lqw.eq(bo.getDocumentDate() != null, XzdCsContractSuspend::getDocumentDate, bo.getDocumentDate());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getContractName()), XzdCsContractSuspend::getContractName, bo.getContractName());
|
||||
lqw.eq(bo.getTerminationDate() != null, XzdCsContractSuspend::getTerminationDate, bo.getTerminationDate());
|
||||
lqw.eq(bo.getProject()!=null, XzdCsContractSuspend::getProject, bo.getProject());
|
||||
lqw.eq(bo.getArtyBUnit() != null, XzdCsContractSuspend::getArtyBUnit, bo.getArtyBUnit());
|
||||
lqw.eq(bo.getPartyAUnit() != null, XzdCsContractSuspend::getPartyAUnit, bo.getPartyAUnit());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTerminationCause()), XzdCsContractSuspend::getTerminationCause, bo.getTerminationCause());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getProjectCategory()), XzdCsContractSuspend::getProjectCategory, bo.getProjectCategory());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getProjectType()), XzdCsContractSuspend::getProjectType, bo.getProjectType());
|
||||
lqw.eq(bo.getCumulativeSettlementAmount() != null, XzdCsContractSuspend::getCumulativeSettlementAmount, bo.getCumulativeSettlementAmount());
|
||||
lqw.eq(bo.getCumulativePaymentAmount() != null, XzdCsContractSuspend::getCumulativePaymentAmount, bo.getCumulativePaymentAmount());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFileId()), XzdCsContractSuspend::getFileId, bo.getFileId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getAuditStatus()), XzdCsContractSuspend::getAuditStatus, bo.getAuditStatus());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增综合服务合同终止
|
||||
*
|
||||
* @param bo 综合服务合同终止
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(XzdCsContractSuspendBo bo) {
|
||||
XzdCsContractSuspend add = MapstructUtils.convert(bo, XzdCsContractSuspend.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改综合服务合同终止
|
||||
*
|
||||
* @param bo 综合服务合同终止
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(XzdCsContractSuspendBo bo) {
|
||||
XzdCsContractSuspend update = MapstructUtils.convert(bo, XzdCsContractSuspend.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(XzdCsContractSuspend entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除综合服务合同终止信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
List<Long> deleteIds = new ArrayList<>();
|
||||
for (Long id : ids) {
|
||||
XzdCsContractSuspendVo vo = baseMapper.selectVoById(id);
|
||||
if (vo != null){
|
||||
//删除附件
|
||||
if (vo.getFileId()!= null && !vo.getFileId().isEmpty()){
|
||||
List<Long> list = Arrays.stream(vo.getFileId().split(",")).map(Long::valueOf).toList();
|
||||
deleteIds.addAll(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!deleteIds.isEmpty()) {
|
||||
sysOssService.deleteWithValidByIds(deleteIds, false);
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取部分字段名称
|
||||
* @param item
|
||||
*/
|
||||
private void getName(XzdCsContractSuspendVo item) {
|
||||
//项目名称
|
||||
if (item.getProject() != null){
|
||||
String projectName = xzdProjectService.queryNameById(item.getProject());
|
||||
if (projectName != null){
|
||||
item.setProjectName(projectName);
|
||||
}
|
||||
}
|
||||
//甲方单位(客户信息列表)
|
||||
String byid = iXzdCorrespondentList.queryNameById(item.getPartyAUnit());
|
||||
if (byid!=null){
|
||||
item.setPartyAUnitNamme(byid);
|
||||
}
|
||||
//乙方单位(供应商信息列表)
|
||||
String xzdSupplierInfoVo = xzdSupplierInfoService.queryNameById(item.getArtyBUnit());
|
||||
if (xzdSupplierInfoVo != null){
|
||||
item.setArtyBUnitName(xzdSupplierInfoVo);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -7,7 +7,11 @@ public enum XzdClassEnum {
|
||||
|
||||
XZD_CONTRACT_CHANGE("xzd_contract_change"),
|
||||
|
||||
CS_CONTRACT_INFORMATION("xzd_cs_contract_information"),
|
||||
CS_CONTRACT_INFORMATION("xzd_cs_contract_information"), //综合服务合同信息
|
||||
CS_CONTRACT_CHANGE("xzd_cs_contract_change"), //综合服务合同变更
|
||||
JS_ZHFW_JINDU("xzd_js_zhfw_jindu"), //综合服务合同进度结算
|
||||
JS_CG_JUNGON("xzd_js_cg_jungon"), //采购合同竣工结算
|
||||
JS_CG_JINDU("xzd_js_cg_jindu"), //采购合同进度结算
|
||||
// 分包合同
|
||||
FENBAOHETONG_INFORMATION("xzd_subcontract"),
|
||||
// 采购变更合同
|
||||
|
||||
@ -24,4 +24,6 @@ public interface IXzdCorrespondentList {
|
||||
R<String> putCorrespondent(AddCorrespondentDto dto);
|
||||
|
||||
R<QuerCorrespondentDto> getCustomerByid(Long id);
|
||||
|
||||
String queryNameById(Long partyAUnit);
|
||||
}
|
||||
|
||||
@ -504,6 +504,12 @@ public class XzdCorrespondentListImp implements IXzdCorrespondentList {
|
||||
return R.ok(dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String queryNameById(Long id) {
|
||||
XzdCustomerinformation xzdCustomerinformation = xzdCustomerinformationMapper.selectById(id);
|
||||
return xzdCustomerinformation != null ? xzdCustomerinformation.getUnitName():null;
|
||||
}
|
||||
|
||||
public void delCorrespondentVoid(Long dto){
|
||||
|
||||
// 客户信息
|
||||
|
||||
@ -0,0 +1,105 @@
|
||||
package org.dromara.xzd.settlement.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.xzd.settlement.domain.vo.XzdJsCgJinduVo;
|
||||
import org.dromara.xzd.settlement.domain.bo.XzdJsCgJinduBo;
|
||||
import org.dromara.xzd.settlement.service.IXzdJsCgJinduService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 采购合同进度结算
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/settlement/jsCgJindu")
|
||||
public class XzdJsCgJinduController extends BaseController {
|
||||
|
||||
private final IXzdJsCgJinduService xzdJsCgJinduService;
|
||||
|
||||
/**
|
||||
* 查询采购合同进度结算列表
|
||||
*/
|
||||
@SaCheckPermission("settlement:jsCgJindu:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<XzdJsCgJinduVo> list(XzdJsCgJinduBo bo, PageQuery pageQuery) {
|
||||
return xzdJsCgJinduService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出采购合同进度结算列表
|
||||
*/
|
||||
@SaCheckPermission("settlement:jsCgJindu:export")
|
||||
@Log(title = "采购合同进度结算", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(XzdJsCgJinduBo bo, HttpServletResponse response) {
|
||||
List<XzdJsCgJinduVo> list = xzdJsCgJinduService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "采购合同进度结算", XzdJsCgJinduVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取采购合同进度结算详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("settlement:jsCgJindu:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<XzdJsCgJinduVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(xzdJsCgJinduService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增采购合同进度结算
|
||||
*/
|
||||
@SaCheckPermission("settlement:jsCgJindu:add")
|
||||
@Log(title = "采购合同进度结算", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody XzdJsCgJinduBo bo) {
|
||||
return toAjax(xzdJsCgJinduService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改采购合同进度结算
|
||||
*/
|
||||
@SaCheckPermission("settlement:jsCgJindu:edit")
|
||||
@Log(title = "采购合同进度结算", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XzdJsCgJinduBo bo) {
|
||||
return toAjax(xzdJsCgJinduService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除采购合同进度结算
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("settlement:jsCgJindu:remove")
|
||||
@Log(title = "采购合同进度结算", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(xzdJsCgJinduService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
package org.dromara.xzd.settlement.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.xzd.settlement.domain.vo.XzdJsCgJungonVo;
|
||||
import org.dromara.xzd.settlement.domain.bo.XzdJsCgJungonBo;
|
||||
import org.dromara.xzd.settlement.service.IXzdJsCgJungonService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 采购合同竣工结算
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/settlement/jsCgJungon")
|
||||
public class XzdJsCgJungonController extends BaseController {
|
||||
|
||||
private final IXzdJsCgJungonService xzdJsCgJungonService;
|
||||
|
||||
/**
|
||||
* 查询采购合同竣工结算列表
|
||||
*/
|
||||
@SaCheckPermission("settlement:jsCgJungon:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<XzdJsCgJungonVo> list(XzdJsCgJungonBo bo, PageQuery pageQuery) {
|
||||
return xzdJsCgJungonService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出采购合同竣工结算列表
|
||||
*/
|
||||
@SaCheckPermission("settlement:jsCgJungon:export")
|
||||
@Log(title = "采购合同竣工结算", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(XzdJsCgJungonBo bo, HttpServletResponse response) {
|
||||
List<XzdJsCgJungonVo> list = xzdJsCgJungonService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "采购合同竣工结算", XzdJsCgJungonVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取采购合同竣工结算详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("settlement:jsCgJungon:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<XzdJsCgJungonVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(xzdJsCgJungonService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增采购合同竣工结算
|
||||
*/
|
||||
@SaCheckPermission("settlement:jsCgJungon:add")
|
||||
@Log(title = "采购合同竣工结算", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody XzdJsCgJungonBo bo) {
|
||||
return toAjax(xzdJsCgJungonService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改采购合同竣工结算
|
||||
*/
|
||||
@SaCheckPermission("settlement:jsCgJungon:edit")
|
||||
@Log(title = "采购合同竣工结算", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XzdJsCgJungonBo bo) {
|
||||
return toAjax(xzdJsCgJungonService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除采购合同竣工结算
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("settlement:jsCgJungon:remove")
|
||||
@Log(title = "采购合同竣工结算", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(xzdJsCgJungonService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
package org.dromara.xzd.settlement.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.xzd.settlement.domain.vo.XzdJsCgJungonEditVo;
|
||||
import org.dromara.xzd.settlement.domain.bo.XzdJsCgJungonEditBo;
|
||||
import org.dromara.xzd.settlement.service.IXzdJsCgJungonEditService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 采购合同竣工结算调整
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/settlement/jsCgJungonEdit")
|
||||
public class XzdJsCgJungonEditController extends BaseController {
|
||||
|
||||
private final IXzdJsCgJungonEditService xzdJsCgJungonEditService;
|
||||
|
||||
/**
|
||||
* 查询采购合同竣工结算调整列表
|
||||
*/
|
||||
@SaCheckPermission("settlement:jsCgJungonEdit:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<XzdJsCgJungonEditVo> list(XzdJsCgJungonEditBo bo, PageQuery pageQuery) {
|
||||
return xzdJsCgJungonEditService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出采购合同竣工结算调整列表
|
||||
*/
|
||||
@SaCheckPermission("settlement:jsCgJungonEdit:export")
|
||||
@Log(title = "采购合同竣工结算调整", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(XzdJsCgJungonEditBo bo, HttpServletResponse response) {
|
||||
List<XzdJsCgJungonEditVo> list = xzdJsCgJungonEditService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "采购合同竣工结算调整", XzdJsCgJungonEditVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取采购合同竣工结算调整详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("settlement:jsCgJungonEdit:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<XzdJsCgJungonEditVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(xzdJsCgJungonEditService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增采购合同竣工结算调整
|
||||
*/
|
||||
@SaCheckPermission("settlement:jsCgJungonEdit:add")
|
||||
@Log(title = "采购合同竣工结算调整", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody XzdJsCgJungonEditBo bo) {
|
||||
return toAjax(xzdJsCgJungonEditService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改采购合同竣工结算调整
|
||||
*/
|
||||
@SaCheckPermission("settlement:jsCgJungonEdit:edit")
|
||||
@Log(title = "采购合同竣工结算调整", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XzdJsCgJungonEditBo bo) {
|
||||
return toAjax(xzdJsCgJungonEditService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除采购合同竣工结算调整
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("settlement:jsCgJungonEdit:remove")
|
||||
@Log(title = "采购合同竣工结算调整", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(xzdJsCgJungonEditService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
package org.dromara.xzd.settlement.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.xzd.settlement.domain.vo.XzdJsDeductionItemsVo;
|
||||
import org.dromara.xzd.settlement.domain.bo.XzdJsDeductionItemsBo;
|
||||
import org.dromara.xzd.settlement.service.IXzdJsDeductionItemsService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 结算-扣款与奖励项
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/settlement/jsDeductionItems")
|
||||
public class XzdJsDeductionItemsController extends BaseController {
|
||||
|
||||
private final IXzdJsDeductionItemsService xzdJsDeductionItemsService;
|
||||
|
||||
/**
|
||||
* 查询结算-扣款与奖励项列表
|
||||
*/
|
||||
@SaCheckPermission("settlement:jsDeductionItems:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<XzdJsDeductionItemsVo> list(XzdJsDeductionItemsBo bo, PageQuery pageQuery) {
|
||||
return xzdJsDeductionItemsService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出结算-扣款与奖励项列表
|
||||
*/
|
||||
@SaCheckPermission("settlement:jsDeductionItems:export")
|
||||
@Log(title = "结算-扣款与奖励项", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(XzdJsDeductionItemsBo bo, HttpServletResponse response) {
|
||||
List<XzdJsDeductionItemsVo> list = xzdJsDeductionItemsService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "结算-扣款与奖励项", XzdJsDeductionItemsVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取结算-扣款与奖励项详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("settlement:jsDeductionItems:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<XzdJsDeductionItemsVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(xzdJsDeductionItemsService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增结算-扣款与奖励项
|
||||
*/
|
||||
@SaCheckPermission("settlement:jsDeductionItems:add")
|
||||
@Log(title = "结算-扣款与奖励项", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody XzdJsDeductionItemsBo bo) {
|
||||
return toAjax(xzdJsDeductionItemsService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改结算-扣款与奖励项
|
||||
*/
|
||||
@SaCheckPermission("settlement:jsDeductionItems:edit")
|
||||
@Log(title = "结算-扣款与奖励项", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XzdJsDeductionItemsBo bo) {
|
||||
return toAjax(xzdJsDeductionItemsService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除结算-扣款与奖励项
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("settlement:jsDeductionItems:remove")
|
||||
@Log(title = "结算-扣款与奖励项", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(xzdJsDeductionItemsService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
package org.dromara.xzd.settlement.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.xzd.settlement.domain.vo.XzdJsZhfwJinduVo;
|
||||
import org.dromara.xzd.settlement.domain.bo.XzdJsZhfwJinduBo;
|
||||
import org.dromara.xzd.settlement.service.IXzdJsZhfwJinduService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 综合服务合同进度结算
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/settlement/jsZhfwJindu")
|
||||
public class XzdJsZhfwJinduController extends BaseController {
|
||||
|
||||
private final IXzdJsZhfwJinduService xzdJsZhfwJinduService;
|
||||
|
||||
/**
|
||||
* 查询综合服务合同进度结算列表
|
||||
*/
|
||||
@SaCheckPermission("settlement:jsZhfwJindu:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<XzdJsZhfwJinduVo> list(XzdJsZhfwJinduBo bo, PageQuery pageQuery) {
|
||||
return xzdJsZhfwJinduService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出综合服务合同进度结算列表
|
||||
*/
|
||||
@SaCheckPermission("settlement:jsZhfwJindu:export")
|
||||
@Log(title = "综合服务合同进度结算", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(XzdJsZhfwJinduBo bo, HttpServletResponse response) {
|
||||
List<XzdJsZhfwJinduVo> list = xzdJsZhfwJinduService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "综合服务合同进度结算", XzdJsZhfwJinduVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取综合服务合同进度结算详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("settlement:jsZhfwJindu:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<XzdJsZhfwJinduVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(xzdJsZhfwJinduService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增综合服务合同进度结算
|
||||
*/
|
||||
@SaCheckPermission("settlement:jsZhfwJindu:add")
|
||||
@Log(title = "综合服务合同进度结算", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody XzdJsZhfwJinduBo bo) {
|
||||
return toAjax(xzdJsZhfwJinduService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改综合服务合同进度结算
|
||||
*/
|
||||
@SaCheckPermission("settlement:jsZhfwJindu:edit")
|
||||
@Log(title = "综合服务合同进度结算", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XzdJsZhfwJinduBo bo) {
|
||||
return toAjax(xzdJsZhfwJinduService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除综合服务合同进度结算
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("settlement:jsZhfwJindu:remove")
|
||||
@Log(title = "综合服务合同进度结算", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(xzdJsZhfwJinduService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,163 @@
|
||||
package org.dromara.xzd.settlement.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 采购合同进度结算对象 xzd_js_cg_jindu
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xzd_js_cg_jindu")
|
||||
public class XzdJsCgJindu extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID,自增
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 单据编码(带*,必填)
|
||||
*/
|
||||
private String docCode;
|
||||
|
||||
/**
|
||||
* 标题(带*,必填)
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 单据日期(带*,必填)
|
||||
*/
|
||||
private LocalDate docDate;
|
||||
|
||||
/**
|
||||
* 合同编码(带查询,关联合同表)
|
||||
*/
|
||||
private Long contractCode;
|
||||
|
||||
/**
|
||||
* 合同名称(关联合同后显示)
|
||||
*/
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 统计周期(带*,必填,下拉选择)
|
||||
*/
|
||||
private String statCycle;
|
||||
|
||||
/**
|
||||
* 计量开始(带*,必填)
|
||||
*/
|
||||
private LocalDate measureStart;
|
||||
|
||||
/**
|
||||
* 项目(带*,必填)
|
||||
*/
|
||||
private Long project;
|
||||
|
||||
/**
|
||||
* 审批金额(默认0.00)
|
||||
*/
|
||||
private BigDecimal approveAmount;
|
||||
|
||||
/**
|
||||
* 计量结束(带*,必填)
|
||||
*/
|
||||
private LocalDate measureEnd;
|
||||
|
||||
/**
|
||||
* 结算单位(带查询,关联单位表)
|
||||
*/
|
||||
private Long settlementUnit;
|
||||
|
||||
/**
|
||||
* 合同金额(默认0.00)
|
||||
*/
|
||||
private BigDecimal contractAmount;
|
||||
|
||||
/**
|
||||
* 累计结算金额(不含本期)(默认0.00)
|
||||
*/
|
||||
private BigDecimal totalSettlementExcludeCurrent;
|
||||
|
||||
/**
|
||||
* 累计结算金额(含本期)(默认0.00)
|
||||
*/
|
||||
private BigDecimal totalSettlementIncludeCurrent;
|
||||
|
||||
/**
|
||||
* 本次结算比例(默认0.00%)
|
||||
*/
|
||||
private BigDecimal currentSettlementRatio;
|
||||
|
||||
/**
|
||||
* 已结算比例(不含本期)(默认0.00%)
|
||||
*/
|
||||
private BigDecimal settledRatioExcludeCurrent;
|
||||
|
||||
/**
|
||||
* 截止本期结算比例(默认0.00%)
|
||||
*/
|
||||
private BigDecimal settlementRatioUntilCurrent;
|
||||
|
||||
/**
|
||||
* 备注(长文本)
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 实时刷新(复选框,0=未勾选,1=勾选)
|
||||
*/
|
||||
private Long realTimeRefresh;
|
||||
|
||||
/**
|
||||
* 合同含税金额(默认0.00)
|
||||
*/
|
||||
private BigDecimal contractTaxInclAmount;
|
||||
|
||||
/**
|
||||
* 合同不含税金额(默认0.00)
|
||||
*/
|
||||
private BigDecimal contractTaxExclAmount;
|
||||
|
||||
/**
|
||||
* 累计结算金额(默认0.00)
|
||||
*/
|
||||
private BigDecimal totalSettledAmount;
|
||||
|
||||
/**
|
||||
* 本期扣款金额(默认0.00)
|
||||
*/
|
||||
private BigDecimal currentDeductionAmount;
|
||||
|
||||
/**
|
||||
* 本期奖励金额(默认0.00)
|
||||
*/
|
||||
private BigDecimal currentRewardAmount;
|
||||
|
||||
/**
|
||||
* 单据引用
|
||||
*/
|
||||
private String documentReference;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,143 @@
|
||||
package org.dromara.xzd.settlement.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 采购合同竣工结算对象 xzd_js_cg_jungon
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xzd_js_cg_jungon")
|
||||
public class XzdJsCgJungon extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID,自增
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 单据编号(带*,必填)
|
||||
*/
|
||||
private String docCode;
|
||||
|
||||
/**
|
||||
* 标题(带*,必填)
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 单据日期(带*,必填)
|
||||
*/
|
||||
private LocalDate docDate;
|
||||
|
||||
/**
|
||||
* 合同编号(带*,关联合同表)
|
||||
*/
|
||||
private Long contractCode;
|
||||
|
||||
/**
|
||||
* 合同名称(关联合同后显示)
|
||||
*/
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 决算金额
|
||||
*/
|
||||
private BigDecimal finalAmount;
|
||||
|
||||
/**
|
||||
* 本期决算总额
|
||||
*/
|
||||
private BigDecimal currentPeriodTotal;
|
||||
|
||||
/**
|
||||
* 本期扣款金额
|
||||
*/
|
||||
private BigDecimal currentDeduction;
|
||||
|
||||
/**
|
||||
* 本期奖励金额
|
||||
*/
|
||||
private BigDecimal currentReward;
|
||||
|
||||
/**
|
||||
* 审定日期
|
||||
*/
|
||||
private LocalDate approveDate;
|
||||
|
||||
/**
|
||||
* 工程项目(带*,关联项目表)
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 统计周期(下拉选择,如“2025年10月”)
|
||||
*/
|
||||
private String statCycle;
|
||||
|
||||
/**
|
||||
* 甲方单位
|
||||
*/
|
||||
private Long partyA;
|
||||
|
||||
/**
|
||||
* 乙方单位
|
||||
*/
|
||||
private Long partyB;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 集采模式
|
||||
*/
|
||||
private Long procurementMode;
|
||||
|
||||
/**
|
||||
* 业主单位(带查询,关联单位表)
|
||||
*/
|
||||
private Long ownerUnit;
|
||||
|
||||
/**
|
||||
* 监理单位(带查询,关联单位表)
|
||||
*/
|
||||
private Long supervisionUnit;
|
||||
|
||||
/**
|
||||
* 施工单位(带查询,关联单位表)
|
||||
*/
|
||||
private Long constructionUnit;
|
||||
|
||||
/**
|
||||
* 审核单位(带查询,关联单位表)
|
||||
*/
|
||||
private Long auditUnit;
|
||||
|
||||
/**
|
||||
* 单据引用
|
||||
*/
|
||||
private String documentReference;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
package org.dromara.xzd.settlement.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 采购合同竣工结算调整对象 xzd_js_cg_jungon_edit
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xzd_js_cg_jungon_edit")
|
||||
public class XzdJsCgJungonEdit extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID,自增
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 单据编号(带*,必填)
|
||||
*/
|
||||
private String docCode;
|
||||
|
||||
/**
|
||||
* 标题(带*,必填)
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 单据日期(带*,必填)
|
||||
*/
|
||||
private LocalDate docDate;
|
||||
|
||||
/**
|
||||
* 决算单号(带*,必填)
|
||||
*/
|
||||
private String finalAccountCode;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 合同编号
|
||||
*/
|
||||
private String contractCode;
|
||||
|
||||
/**
|
||||
* 调整后决算金额(带*,必填)
|
||||
*/
|
||||
private BigDecimal adjustedFinalAmount;
|
||||
|
||||
/**
|
||||
* 工程项目(带*,必填)
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 默认财务组织
|
||||
*/
|
||||
private Long defaultFinanceOrg;
|
||||
|
||||
/**
|
||||
* 调整说明
|
||||
*/
|
||||
private String adjustmentDescription;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 集采模式
|
||||
*/
|
||||
private String procurementMode;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,100 @@
|
||||
package org.dromara.xzd.settlement.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 结算-扣款与奖励项对象 xzd_js_deduction_items
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xzd_js_deduction_items")
|
||||
public class XzdJsDeductionItems extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 明细记录主键(自增)
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 表名
|
||||
*/
|
||||
private String tableName;
|
||||
|
||||
/**
|
||||
* 关联结算主表的ID(外键,指向结算单据表)
|
||||
*/
|
||||
private Long mainDocId;
|
||||
|
||||
/**
|
||||
* 明细类型:1=扣款,2=奖励
|
||||
*/
|
||||
private Long detailType;
|
||||
|
||||
/**
|
||||
* 款项类别(带*,必填)
|
||||
*/
|
||||
private String itemCategory;
|
||||
|
||||
/**
|
||||
* 本期金额(扣款/奖励金额)
|
||||
*/
|
||||
private BigDecimal currentPeriodAmount;
|
||||
|
||||
/**
|
||||
* 本期不含税金额
|
||||
*/
|
||||
private BigDecimal currentTaxExclAmount;
|
||||
/**
|
||||
* 税率
|
||||
*/
|
||||
private BigDecimal taxRate;
|
||||
/**
|
||||
* 税额
|
||||
*/
|
||||
private BigDecimal taxAmount;
|
||||
|
||||
/**
|
||||
* 累计金额(累计扣款/累计奖励)
|
||||
*/
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
/**
|
||||
* 申请扣除(仅“扣款”明细必填,1=是,0=否)
|
||||
*/
|
||||
private Long applyDeduction;
|
||||
|
||||
/**
|
||||
* 款项属性(带*,必填)
|
||||
*/
|
||||
private String itemProperty;
|
||||
|
||||
/**
|
||||
* WBS编码(项目工作分解结构编码)
|
||||
*/
|
||||
private String wbs;
|
||||
|
||||
/**
|
||||
* CBS编码(项目成本分解结构编码)
|
||||
*/
|
||||
private String cbs;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,158 @@
|
||||
package org.dromara.xzd.settlement.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 综合服务合同进度结算对象 xzd_js_zhfw_jindu
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xzd_js_zhfw_jindu")
|
||||
public class XzdJsZhfwJindu extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID,自增
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 单据编码(带*,必填)
|
||||
*/
|
||||
private String docCode;
|
||||
|
||||
/**
|
||||
* 标题(带*,必填)
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 单据日期(带*,必填)
|
||||
*/
|
||||
private LocalDate docDate;
|
||||
|
||||
/**
|
||||
* 合同编码
|
||||
*/
|
||||
private Long contractCode;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 统计周期(带*,必填)
|
||||
*/
|
||||
private String statCycle;
|
||||
|
||||
/**
|
||||
* 计量开始
|
||||
*/
|
||||
private LocalDate measureStart;
|
||||
|
||||
/**
|
||||
* 审批金额
|
||||
*/
|
||||
private BigDecimal approveAmount;
|
||||
|
||||
/**
|
||||
* 项目
|
||||
*/
|
||||
private Long project;
|
||||
|
||||
/**
|
||||
* 结算单位
|
||||
*/
|
||||
private Long settlementUnit;
|
||||
|
||||
/**
|
||||
* 合同金额
|
||||
*/
|
||||
private BigDecimal contractAmount;
|
||||
|
||||
/**
|
||||
* 累计结算金额(不含本期)
|
||||
*/
|
||||
private BigDecimal totalSettlementExclCurrent;
|
||||
|
||||
/**
|
||||
* 累计结算金额(含本期)
|
||||
*/
|
||||
private BigDecimal totalSettlementInclCurrent;
|
||||
|
||||
/**
|
||||
* 本次结算比例
|
||||
*/
|
||||
private BigDecimal currentSettlementRatio;
|
||||
|
||||
/**
|
||||
* 已结算比例(不含本期)
|
||||
*/
|
||||
private BigDecimal settledRatioExclCurrent;
|
||||
|
||||
/**
|
||||
* 截止本期结算比例
|
||||
*/
|
||||
private BigDecimal settlementRatioUntilCurrent;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 实时刷新(0=未勾选,1=勾选)
|
||||
*/
|
||||
private Long realTimeRefresh;
|
||||
|
||||
/**
|
||||
* 累计结算金额(统计及控制信息)
|
||||
*/
|
||||
private BigDecimal totalSettledAmount;
|
||||
|
||||
/**
|
||||
* 本期扣款金额
|
||||
*/
|
||||
private BigDecimal currentDeductionAmount;
|
||||
|
||||
/**
|
||||
* 本期奖励金额
|
||||
*/
|
||||
private BigDecimal currentRewardAmount;
|
||||
|
||||
/**
|
||||
* 合同含税金额
|
||||
*/
|
||||
private BigDecimal contractTaxInclAmount;
|
||||
|
||||
/**
|
||||
* 合同不含税金额
|
||||
*/
|
||||
private BigDecimal contractTaxExclAmount;
|
||||
|
||||
/**
|
||||
* 单据引用
|
||||
*/
|
||||
private String documentReference;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,175 @@
|
||||
package org.dromara.xzd.settlement.domain.bo;
|
||||
|
||||
import org.dromara.xzd.domain.XzdDeductionItems;
|
||||
import org.dromara.xzd.settlement.domain.XzdJsCgJindu;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import org.dromara.xzd.settlement.domain.XzdJsDeductionItems;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 采购合同进度结算业务对象 xzd_js_cg_jindu
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XzdJsCgJindu.class, reverseConvertGenerate = false)
|
||||
public class XzdJsCgJinduBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID,自增
|
||||
*/
|
||||
@NotNull(message = "主键ID,自增不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 单据编码(带*,必填)
|
||||
*/
|
||||
@NotBlank(message = "单据编码(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String docCode;
|
||||
|
||||
/**
|
||||
* 标题(带*,必填)
|
||||
*/
|
||||
@NotBlank(message = "标题(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 单据日期(带*,必填)
|
||||
*/
|
||||
@NotNull(message = "单据日期(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private LocalDate docDate;
|
||||
|
||||
/**
|
||||
* 合同编码(带查询,关联合同表)
|
||||
*/
|
||||
private Long contractCode;
|
||||
|
||||
/**
|
||||
* 合同名称(关联合同后显示)
|
||||
*/
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 统计周期(带*,必填,下拉选择)
|
||||
*/
|
||||
@NotBlank(message = "统计周期(带*,必填,下拉选择)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String statCycle;
|
||||
|
||||
/**
|
||||
* 计量开始(带*,必填)
|
||||
*/
|
||||
@NotNull(message = "计量开始(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private LocalDate measureStart;
|
||||
|
||||
/**
|
||||
* 项目(带*,必填)
|
||||
*/
|
||||
@NotBlank(message = "项目(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long project;
|
||||
|
||||
/**
|
||||
* 审批金额(默认0.00)
|
||||
*/
|
||||
private BigDecimal approveAmount;
|
||||
|
||||
/**
|
||||
* 计量结束(带*,必填)
|
||||
*/
|
||||
@NotNull(message = "计量结束(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private LocalDate measureEnd;
|
||||
|
||||
/**
|
||||
* 结算单位(带查询,关联单位表)
|
||||
*/
|
||||
private Long settlementUnit;
|
||||
|
||||
/**
|
||||
* 合同金额(默认0.00)
|
||||
*/
|
||||
private BigDecimal contractAmount;
|
||||
|
||||
/**
|
||||
* 累计结算金额(不含本期)(默认0.00)
|
||||
*/
|
||||
private BigDecimal totalSettlementExcludeCurrent;
|
||||
|
||||
/**
|
||||
* 累计结算金额(含本期)(默认0.00)
|
||||
*/
|
||||
private BigDecimal totalSettlementIncludeCurrent;
|
||||
|
||||
/**
|
||||
* 本次结算比例(默认0.00%)
|
||||
*/
|
||||
private BigDecimal currentSettlementRatio;
|
||||
|
||||
/**
|
||||
* 已结算比例(不含本期)(默认0.00%)
|
||||
*/
|
||||
private BigDecimal settledRatioExcludeCurrent;
|
||||
|
||||
/**
|
||||
* 截止本期结算比例(默认0.00%)
|
||||
*/
|
||||
private BigDecimal settlementRatioUntilCurrent;
|
||||
|
||||
/**
|
||||
* 备注(长文本)
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 实时刷新(复选框,0=未勾选,1=勾选)
|
||||
*/
|
||||
private Long realTimeRefresh;
|
||||
|
||||
/**
|
||||
* 合同含税金额(默认0.00)
|
||||
*/
|
||||
private BigDecimal contractTaxInclAmount;
|
||||
|
||||
/**
|
||||
* 合同不含税金额(默认0.00)
|
||||
*/
|
||||
private BigDecimal contractTaxExclAmount;
|
||||
|
||||
/**
|
||||
* 累计结算金额(默认0.00)
|
||||
*/
|
||||
private BigDecimal totalSettledAmount;
|
||||
|
||||
/**
|
||||
* 本期扣款金额(默认0.00)
|
||||
*/
|
||||
private BigDecimal currentDeductionAmount;
|
||||
|
||||
/**
|
||||
* 本期奖励金额(默认0.00)
|
||||
*/
|
||||
private BigDecimal currentRewardAmount;
|
||||
|
||||
/**
|
||||
* 单据引用
|
||||
*/
|
||||
private String documentReference;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
List<XzdJsDeductionItems> kkyjlx;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,146 @@
|
||||
package org.dromara.xzd.settlement.domain.bo;
|
||||
|
||||
import org.dromara.xzd.settlement.domain.XzdJsCgJungon;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 采购合同竣工结算业务对象 xzd_js_cg_jungon
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XzdJsCgJungon.class, reverseConvertGenerate = false)
|
||||
public class XzdJsCgJungonBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID,自增
|
||||
*/
|
||||
@NotNull(message = "主键ID,自增不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 单据编号(带*,必填)
|
||||
*/
|
||||
@NotBlank(message = "单据编号(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String docCode;
|
||||
|
||||
/**
|
||||
* 标题(带*,必填)
|
||||
*/
|
||||
@NotBlank(message = "标题(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 单据日期(带*,必填)
|
||||
*/
|
||||
@NotNull(message = "单据日期(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private LocalDate docDate;
|
||||
|
||||
/**
|
||||
* 合同编号(带*,关联合同表)
|
||||
*/
|
||||
private Long contractCode;
|
||||
|
||||
/**
|
||||
* 合同名称(关联合同后显示)
|
||||
*/
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 决算金额
|
||||
*/
|
||||
private BigDecimal finalAmount;
|
||||
|
||||
/**
|
||||
* 本期决算总额
|
||||
*/
|
||||
private BigDecimal currentPeriodTotal;
|
||||
|
||||
/**
|
||||
* 本期扣款金额
|
||||
*/
|
||||
private BigDecimal currentDeduction;
|
||||
|
||||
/**
|
||||
* 本期奖励金额
|
||||
*/
|
||||
private BigDecimal currentReward;
|
||||
|
||||
/**
|
||||
* 审定日期
|
||||
*/
|
||||
private LocalDate approveDate;
|
||||
|
||||
/**
|
||||
* 工程项目(带*,关联项目表)
|
||||
*/
|
||||
@NotNull(message = "工程项目(带*,关联项目表)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 统计周期(下拉选择,如“2025年10月”)
|
||||
*/
|
||||
private String statCycle;
|
||||
|
||||
/**
|
||||
* 甲方单位
|
||||
*/
|
||||
private Long partyA;
|
||||
|
||||
/**
|
||||
* 乙方单位
|
||||
*/
|
||||
private Long partyB;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 集采模式
|
||||
*/
|
||||
private Long procurementMode;
|
||||
|
||||
/**
|
||||
* 业主单位(带查询,关联单位表)
|
||||
*/
|
||||
private Long ownerUnit;
|
||||
|
||||
/**
|
||||
* 监理单位(带查询,关联单位表)
|
||||
*/
|
||||
private Long supervisionUnit;
|
||||
|
||||
/**
|
||||
* 施工单位(带查询,关联单位表)
|
||||
*/
|
||||
private Long constructionUnit;
|
||||
|
||||
/**
|
||||
* 审核单位(带查询,关联单位表)
|
||||
*/
|
||||
private Long auditUnit;
|
||||
|
||||
/**
|
||||
* 单据引用
|
||||
*/
|
||||
private String documentReference;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,98 @@
|
||||
package org.dromara.xzd.settlement.domain.bo;
|
||||
|
||||
import org.dromara.xzd.settlement.domain.XzdJsCgJungonEdit;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 采购合同竣工结算调整业务对象 xzd_js_cg_jungon_edit
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XzdJsCgJungonEdit.class, reverseConvertGenerate = false)
|
||||
public class XzdJsCgJungonEditBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID,自增
|
||||
*/
|
||||
@NotNull(message = "主键ID,自增不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 单据编号(带*,必填)
|
||||
*/
|
||||
@NotBlank(message = "单据编号(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String docCode;
|
||||
|
||||
/**
|
||||
* 标题(带*,必填)
|
||||
*/
|
||||
@NotBlank(message = "标题(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 单据日期(带*,必填)
|
||||
*/
|
||||
@NotNull(message = "单据日期(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private LocalDate docDate;
|
||||
|
||||
/**
|
||||
* 决算单号(带*,必填)
|
||||
*/
|
||||
@NotBlank(message = "决算单号(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String finalAccountCode;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 合同编号
|
||||
*/
|
||||
private String contractCode;
|
||||
|
||||
/**
|
||||
* 调整后决算金额(带*,必填)
|
||||
*/
|
||||
@NotNull(message = "调整后决算金额(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private BigDecimal adjustedFinalAmount;
|
||||
|
||||
/**
|
||||
* 工程项目(带*,必填)
|
||||
*/
|
||||
@NotNull(message = "工程项目(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 默认财务组织
|
||||
*/
|
||||
private Long defaultFinanceOrg;
|
||||
|
||||
/**
|
||||
* 调整说明
|
||||
*/
|
||||
private String adjustmentDescription;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 集采模式
|
||||
*/
|
||||
private String procurementMode;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,103 @@
|
||||
package org.dromara.xzd.settlement.domain.bo;
|
||||
|
||||
import org.dromara.xzd.settlement.domain.XzdJsDeductionItems;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 结算-扣款与奖励项业务对象 xzd_js_deduction_items
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XzdJsDeductionItems.class, reverseConvertGenerate = false)
|
||||
public class XzdJsDeductionItemsBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 明细记录主键(自增)
|
||||
*/
|
||||
@NotNull(message = "明细记录主键(自增)不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 表名
|
||||
*/
|
||||
private String tableName;
|
||||
|
||||
/**
|
||||
* 关联结算主表的ID(外键,指向结算单据表)
|
||||
*/
|
||||
@NotNull(message = "关联结算主表的ID(外键,指向结算单据表)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long mainDocId;
|
||||
|
||||
/**
|
||||
* 明细类型:1=扣款,2=奖励
|
||||
*/
|
||||
@NotNull(message = "明细类型:1=扣款,2=奖励不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long detailType;
|
||||
|
||||
/**
|
||||
* 款项类别(带*,必填)
|
||||
*/
|
||||
@NotBlank(message = "款项类别(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String itemCategory;
|
||||
|
||||
/**
|
||||
* 本期金额(扣款/奖励金额)
|
||||
*/
|
||||
private BigDecimal currentPeriodAmount;
|
||||
|
||||
/**
|
||||
* 本期不含税金额
|
||||
*/
|
||||
private BigDecimal currentTaxExclAmount;
|
||||
/**
|
||||
* 税率
|
||||
*/
|
||||
private BigDecimal taxRate;
|
||||
/**
|
||||
* 税额
|
||||
*/
|
||||
private BigDecimal taxAmount;
|
||||
|
||||
/**
|
||||
* 累计金额(累计扣款/累计奖励)
|
||||
*/
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
/**
|
||||
* 申请扣除(仅“扣款”明细必填,1=是,0=否)
|
||||
*/
|
||||
private Long applyDeduction;
|
||||
|
||||
/**
|
||||
* 款项属性(带*,必填)
|
||||
*/
|
||||
@NotBlank(message = "款项属性(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String itemProperty;
|
||||
|
||||
/**
|
||||
* WBS编码(项目工作分解结构编码)
|
||||
*/
|
||||
private String wbs;
|
||||
|
||||
/**
|
||||
* CBS编码(项目成本分解结构编码)
|
||||
*/
|
||||
private String cbs;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,161 @@
|
||||
package org.dromara.xzd.settlement.domain.bo;
|
||||
|
||||
import org.dromara.xzd.settlement.domain.XzdJsZhfwJindu;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 综合服务合同进度结算业务对象 xzd_js_zhfw_jindu
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XzdJsZhfwJindu.class, reverseConvertGenerate = false)
|
||||
public class XzdJsZhfwJinduBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID,自增
|
||||
*/
|
||||
@NotNull(message = "主键ID,自增不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 单据编码(带*,必填)
|
||||
*/
|
||||
@NotBlank(message = "单据编码(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String docCode;
|
||||
|
||||
/**
|
||||
* 标题(带*,必填)
|
||||
*/
|
||||
@NotBlank(message = "标题(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 单据日期(带*,必填)
|
||||
*/
|
||||
@NotNull(message = "单据日期(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private LocalDate docDate;
|
||||
|
||||
/**
|
||||
* 合同编码
|
||||
*/
|
||||
private Long contractCode;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 统计周期(带*,必填)
|
||||
*/
|
||||
@NotBlank(message = "统计周期(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String statCycle;
|
||||
|
||||
/**
|
||||
* 计量开始
|
||||
*/
|
||||
private LocalDate measureStart;
|
||||
|
||||
/**
|
||||
* 审批金额
|
||||
*/
|
||||
private BigDecimal approveAmount;
|
||||
|
||||
/**
|
||||
* 项目
|
||||
*/
|
||||
private Long project;
|
||||
|
||||
/**
|
||||
* 结算单位
|
||||
*/
|
||||
private Long settlementUnit;
|
||||
|
||||
/**
|
||||
* 合同金额
|
||||
*/
|
||||
private BigDecimal contractAmount;
|
||||
|
||||
/**
|
||||
* 累计结算金额(不含本期)
|
||||
*/
|
||||
private BigDecimal totalSettlementExclCurrent;
|
||||
|
||||
/**
|
||||
* 累计结算金额(含本期)
|
||||
*/
|
||||
private BigDecimal totalSettlementInclCurrent;
|
||||
|
||||
/**
|
||||
* 本次结算比例
|
||||
*/
|
||||
private BigDecimal currentSettlementRatio;
|
||||
|
||||
/**
|
||||
* 已结算比例(不含本期)
|
||||
*/
|
||||
private BigDecimal settledRatioExclCurrent;
|
||||
|
||||
/**
|
||||
* 截止本期结算比例
|
||||
*/
|
||||
private BigDecimal settlementRatioUntilCurrent;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 实时刷新(0=未勾选,1=勾选)
|
||||
*/
|
||||
private Long realTimeRefresh;
|
||||
|
||||
/**
|
||||
* 累计结算金额(统计及控制信息)
|
||||
*/
|
||||
private BigDecimal totalSettledAmount;
|
||||
|
||||
/**
|
||||
* 本期扣款金额
|
||||
*/
|
||||
private BigDecimal currentDeductionAmount;
|
||||
|
||||
/**
|
||||
* 本期奖励金额
|
||||
*/
|
||||
private BigDecimal currentRewardAmount;
|
||||
|
||||
/**
|
||||
* 合同含税金额
|
||||
*/
|
||||
private BigDecimal contractTaxInclAmount;
|
||||
|
||||
/**
|
||||
* 合同不含税金额
|
||||
*/
|
||||
private BigDecimal contractTaxExclAmount;
|
||||
|
||||
/**
|
||||
* 单据引用
|
||||
*/
|
||||
private String documentReference;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,222 @@
|
||||
package org.dromara.xzd.settlement.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import org.dromara.xzd.settlement.domain.XzdJsCgJindu;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 采购合同进度结算视图对象 xzd_js_cg_jindu
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XzdJsCgJindu.class)
|
||||
public class XzdJsCgJinduVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID,自增
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID,自增")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 单据编码(带*,必填)
|
||||
*/
|
||||
@ExcelProperty(value = "单据编码", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,必填")
|
||||
private String docCode;
|
||||
|
||||
/**
|
||||
* 标题(带*,必填)
|
||||
*/
|
||||
@ExcelProperty(value = "标题", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,必填")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 单据日期(带*,必填)
|
||||
*/
|
||||
@ExcelProperty(value = "单据日期", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,必填")
|
||||
private LocalDate docDate;
|
||||
|
||||
/**
|
||||
* 合同编码(带查询,关联合同表)
|
||||
*/
|
||||
@ExcelProperty(value = "合同编码", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=查询,关联合同表")
|
||||
private Long contractCode;
|
||||
|
||||
/**
|
||||
* 合同名称(关联合同后显示)
|
||||
*/
|
||||
@ExcelProperty(value = "合同名称", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "关=联合同后显示")
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 统计周期(带*,必填,下拉选择)
|
||||
*/
|
||||
@ExcelProperty(value = "统计周期", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,必填,下拉选择")
|
||||
private String statCycle;
|
||||
|
||||
/**
|
||||
* 计量开始(带*,必填)
|
||||
*/
|
||||
@ExcelProperty(value = "计量开始", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,必填")
|
||||
private LocalDate measureStart;
|
||||
|
||||
/**
|
||||
* 项目(带*,必填)
|
||||
*/
|
||||
@ExcelProperty(value = "项目", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,必填")
|
||||
private Long project;
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
* 审批金额(默认0.00)
|
||||
*/
|
||||
@ExcelProperty(value = "审批金额", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "默=认0.00")
|
||||
private BigDecimal approveAmount;
|
||||
|
||||
/**
|
||||
* 计量结束(带*,必填)
|
||||
*/
|
||||
@ExcelProperty(value = "计量结束", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,必填")
|
||||
private LocalDate measureEnd;
|
||||
|
||||
/**
|
||||
* 结算单位(带查询,关联单位表)
|
||||
*/
|
||||
@ExcelProperty(value = "结算单位", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=查询,关联单位表")
|
||||
private Long settlementUnit;
|
||||
private String settlementUnitName;
|
||||
|
||||
/**
|
||||
* 合同金额(默认0.00)
|
||||
*/
|
||||
@ExcelProperty(value = "合同金额", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "默=认0.00")
|
||||
private BigDecimal contractAmount;
|
||||
|
||||
/**
|
||||
* 累计结算金额(不含本期)(默认0.00)
|
||||
*/
|
||||
@ExcelProperty(value = "累计结算金额(不含本期)", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "默=认0.00")
|
||||
private BigDecimal totalSettlementExcludeCurrent;
|
||||
|
||||
/**
|
||||
* 累计结算金额(含本期)(默认0.00)
|
||||
*/
|
||||
@ExcelProperty(value = "累计结算金额(含本期)", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "默=认0.00")
|
||||
private BigDecimal totalSettlementIncludeCurrent;
|
||||
|
||||
/**
|
||||
* 本次结算比例(默认0.00%)
|
||||
*/
|
||||
@ExcelProperty(value = "本次结算比例", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "默=认0.00%")
|
||||
private BigDecimal currentSettlementRatio;
|
||||
|
||||
/**
|
||||
* 已结算比例(不含本期)(默认0.00%)
|
||||
*/
|
||||
@ExcelProperty(value = "已结算比例(不含本期)", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "默=认0.00%")
|
||||
private BigDecimal settledRatioExcludeCurrent;
|
||||
|
||||
/**
|
||||
* 截止本期结算比例(默认0.00%)
|
||||
*/
|
||||
@ExcelProperty(value = "截止本期结算比例", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "默=认0.00%")
|
||||
private BigDecimal settlementRatioUntilCurrent;
|
||||
|
||||
/**
|
||||
* 备注(长文本)
|
||||
*/
|
||||
@ExcelProperty(value = "备注", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "长=文本")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 实时刷新(复选框,0=未勾选,1=勾选)
|
||||
*/
|
||||
@ExcelProperty(value = "实时刷新", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "复=选框,0=未勾选,1=勾选")
|
||||
private Long realTimeRefresh;
|
||||
|
||||
/**
|
||||
* 合同含税金额(默认0.00)
|
||||
*/
|
||||
@ExcelProperty(value = "合同含税金额", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "默=认0.00")
|
||||
private BigDecimal contractTaxInclAmount;
|
||||
|
||||
/**
|
||||
* 合同不含税金额(默认0.00)
|
||||
*/
|
||||
@ExcelProperty(value = "合同不含税金额", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "默=认0.00")
|
||||
private BigDecimal contractTaxExclAmount;
|
||||
|
||||
/**
|
||||
* 累计结算金额(默认0.00)
|
||||
*/
|
||||
@ExcelProperty(value = "累计结算金额", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "默=认0.00")
|
||||
private BigDecimal totalSettledAmount;
|
||||
|
||||
/**
|
||||
* 本期扣款金额(默认0.00)
|
||||
*/
|
||||
@ExcelProperty(value = "本期扣款金额", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "默=认0.00")
|
||||
private BigDecimal currentDeductionAmount;
|
||||
|
||||
/**
|
||||
* 本期奖励金额(默认0.00)
|
||||
*/
|
||||
@ExcelProperty(value = "本期奖励金额", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "默=认0.00")
|
||||
private BigDecimal currentRewardAmount;
|
||||
|
||||
/**
|
||||
* 单据引用
|
||||
*/
|
||||
@ExcelProperty(value = "单据引用")
|
||||
private String documentReference;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
@ExcelProperty(value = "文件ID")
|
||||
private String fileId;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,118 @@
|
||||
package org.dromara.xzd.settlement.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import org.dromara.xzd.settlement.domain.XzdJsCgJungonEdit;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 采购合同竣工结算调整视图对象 xzd_js_cg_jungon_edit
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XzdJsCgJungonEdit.class)
|
||||
public class XzdJsCgJungonEditVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID,自增
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID,自增")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 单据编号(带*,必填)
|
||||
*/
|
||||
@ExcelProperty(value = "单据编号", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,必填")
|
||||
private String docCode;
|
||||
|
||||
/**
|
||||
* 标题(带*,必填)
|
||||
*/
|
||||
@ExcelProperty(value = "标题", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,必填")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 单据日期(带*,必填)
|
||||
*/
|
||||
@ExcelProperty(value = "单据日期", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,必填")
|
||||
private LocalDate docDate;
|
||||
|
||||
/**
|
||||
* 决算单号(带*,必填)
|
||||
*/
|
||||
@ExcelProperty(value = "决算单号", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,必填")
|
||||
private String finalAccountCode;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
@ExcelProperty(value = "合同名称")
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 合同编号
|
||||
*/
|
||||
@ExcelProperty(value = "合同编号")
|
||||
private String contractCode;
|
||||
|
||||
/**
|
||||
* 调整后决算金额(带*,必填)
|
||||
*/
|
||||
@ExcelProperty(value = "调整后决算金额", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,必填")
|
||||
private BigDecimal adjustedFinalAmount;
|
||||
|
||||
/**
|
||||
* 工程项目(带*,必填)
|
||||
*/
|
||||
@ExcelProperty(value = "工程项目", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,必填")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 默认财务组织
|
||||
*/
|
||||
@ExcelProperty(value = "默认财务组织")
|
||||
private Long defaultFinanceOrg;
|
||||
|
||||
/**
|
||||
* 调整说明
|
||||
*/
|
||||
@ExcelProperty(value = "调整说明")
|
||||
private String adjustmentDescription;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 集采模式
|
||||
*/
|
||||
@ExcelProperty(value = "集采模式")
|
||||
private String procurementMode;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,190 @@
|
||||
package org.dromara.xzd.settlement.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import org.dromara.xzd.settlement.domain.XzdJsCgJungon;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 采购合同竣工结算视图对象 xzd_js_cg_jungon
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XzdJsCgJungon.class)
|
||||
public class XzdJsCgJungonVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID,自增
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID,自增")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 单据编号(带*,必填)
|
||||
*/
|
||||
@ExcelProperty(value = "单据编号", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,必填")
|
||||
private String docCode;
|
||||
|
||||
/**
|
||||
* 标题(带*,必填)
|
||||
*/
|
||||
@ExcelProperty(value = "标题", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,必填")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 单据日期(带*,必填)
|
||||
*/
|
||||
@ExcelProperty(value = "单据日期", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,必填")
|
||||
private LocalDate docDate;
|
||||
|
||||
/**
|
||||
* 合同编号(带*,关联合同表)
|
||||
*/
|
||||
@ExcelProperty(value = "合同编号", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,关联合同表")
|
||||
private Long contractCode;
|
||||
|
||||
/**
|
||||
* 合同名称(关联合同后显示)
|
||||
*/
|
||||
@ExcelProperty(value = "合同名称", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "关=联合同后显示")
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 决算金额
|
||||
*/
|
||||
@ExcelProperty(value = "决算金额")
|
||||
private BigDecimal finalAmount;
|
||||
|
||||
/**
|
||||
* 本期决算总额
|
||||
*/
|
||||
@ExcelProperty(value = "本期决算总额")
|
||||
private BigDecimal currentPeriodTotal;
|
||||
|
||||
/**
|
||||
* 本期扣款金额
|
||||
*/
|
||||
@ExcelProperty(value = "本期扣款金额")
|
||||
private BigDecimal currentDeduction;
|
||||
|
||||
/**
|
||||
* 本期奖励金额
|
||||
*/
|
||||
@ExcelProperty(value = "本期奖励金额")
|
||||
private BigDecimal currentReward;
|
||||
|
||||
/**
|
||||
* 审定日期
|
||||
*/
|
||||
@ExcelProperty(value = "审定日期")
|
||||
private LocalDate approveDate;
|
||||
|
||||
/**
|
||||
* 工程项目(带*,关联项目表)
|
||||
*/
|
||||
@ExcelProperty(value = "工程项目", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,关联项目表")
|
||||
private Long projectId;
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
* 统计周期(下拉选择,如“2025年10月”)
|
||||
*/
|
||||
@ExcelProperty(value = "统计周期", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "下=拉选择,如“2025年10月”")
|
||||
private String statCycle;
|
||||
|
||||
/**
|
||||
* 甲方单位
|
||||
*/
|
||||
@ExcelProperty(value = "甲方单位")
|
||||
private Long partyA;
|
||||
private String partyAName;
|
||||
|
||||
/**
|
||||
* 乙方单位
|
||||
*/
|
||||
@ExcelProperty(value = "乙方单位")
|
||||
private Long partyB;
|
||||
private String partyBName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 集采模式
|
||||
*/
|
||||
@ExcelProperty(value = "集采模式")
|
||||
private Long procurementMode;
|
||||
|
||||
/**
|
||||
* 业主单位(带查询,关联单位表)
|
||||
*/
|
||||
@ExcelProperty(value = "业主单位", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=查询,关联单位表")
|
||||
private Long ownerUnit;
|
||||
private String ownerUnitName;
|
||||
|
||||
/**
|
||||
* 监理单位(带查询,关联单位表)
|
||||
*/
|
||||
@ExcelProperty(value = "监理单位", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=查询,关联单位表")
|
||||
private Long supervisionUnit;
|
||||
private String supervisionUnitName;
|
||||
|
||||
/**
|
||||
* 施工单位(带查询,关联单位表)
|
||||
*/
|
||||
@ExcelProperty(value = "施工单位", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=查询,关联单位表")
|
||||
private Long constructionUnit;
|
||||
private String constructionUnitName;
|
||||
|
||||
/**
|
||||
* 审核单位(带查询,关联单位表)
|
||||
*/
|
||||
@ExcelProperty(value = "审核单位", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=查询,关联单位表")
|
||||
private Long auditUnit;
|
||||
private String auditUnitName;
|
||||
|
||||
/**
|
||||
* 单据引用
|
||||
*/
|
||||
@ExcelProperty(value = "单据引用")
|
||||
private String documentReference;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
@ExcelProperty(value = "文件ID")
|
||||
private String fileId;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,126 @@
|
||||
package org.dromara.xzd.settlement.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import org.dromara.xzd.settlement.domain.XzdJsDeductionItems;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 结算-扣款与奖励项视图对象 xzd_js_deduction_items
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XzdJsDeductionItems.class)
|
||||
public class XzdJsDeductionItemsVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 明细记录主键(自增)
|
||||
*/
|
||||
@ExcelProperty(value = "明细记录主键", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "自=增")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 表名
|
||||
*/
|
||||
private String tableName;
|
||||
|
||||
/**
|
||||
* 关联结算主表的ID(外键,指向结算单据表)
|
||||
*/
|
||||
@ExcelProperty(value = "关联结算主表的ID", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "外=键,指向结算单据表")
|
||||
private Long mainDocId;
|
||||
|
||||
/**
|
||||
* 明细类型:1=扣款,2=奖励
|
||||
*/
|
||||
@ExcelProperty(value = "明细类型:1=扣款,2=奖励")
|
||||
private Long detailType;
|
||||
|
||||
/**
|
||||
* 款项类别(带*,必填)
|
||||
*/
|
||||
@ExcelProperty(value = "款项类别", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,必填")
|
||||
private String itemCategory;
|
||||
|
||||
/**
|
||||
* 本期金额(扣款/奖励金额)
|
||||
*/
|
||||
@ExcelProperty(value = "本期金额", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "扣=款/奖励金额")
|
||||
private BigDecimal currentPeriodAmount;
|
||||
|
||||
/**
|
||||
* 本期不含税金额
|
||||
*/
|
||||
private BigDecimal currentTaxExclAmount;
|
||||
/**
|
||||
* 税率
|
||||
*/
|
||||
private BigDecimal taxRate;
|
||||
/**
|
||||
* 税额
|
||||
*/
|
||||
private BigDecimal taxAmount;
|
||||
|
||||
/**
|
||||
* 累计金额(累计扣款/累计奖励)
|
||||
*/
|
||||
@ExcelProperty(value = "累计金额", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "累=计扣款/累计奖励")
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
/**
|
||||
* 申请扣除(仅“扣款”明细必填,1=是,0=否)
|
||||
*/
|
||||
@ExcelProperty(value = "申请扣除", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "仅=“扣款”明细必填,1=是,0=否")
|
||||
private Long applyDeduction;
|
||||
|
||||
/**
|
||||
* 款项属性(带*,必填)
|
||||
*/
|
||||
@ExcelProperty(value = "款项属性", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,必填")
|
||||
private String itemProperty;
|
||||
|
||||
/**
|
||||
* WBS编码(项目工作分解结构编码)
|
||||
*/
|
||||
@ExcelProperty(value = "WBS编码", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "项=目工作分解结构编码")
|
||||
private String wbs;
|
||||
|
||||
/**
|
||||
* CBS编码(项目成本分解结构编码)
|
||||
*/
|
||||
@ExcelProperty(value = "CBS编码", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "项=目成本分解结构编码")
|
||||
private String cbs;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,196 @@
|
||||
package org.dromara.xzd.settlement.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import org.dromara.xzd.settlement.domain.XzdJsZhfwJindu;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 综合服务合同进度结算视图对象 xzd_js_zhfw_jindu
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XzdJsZhfwJindu.class)
|
||||
public class XzdJsZhfwJinduVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID,自增
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID,自增")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 单据编码(带*,必填)
|
||||
*/
|
||||
@ExcelProperty(value = "单据编码", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,必填")
|
||||
private String docCode;
|
||||
|
||||
/**
|
||||
* 标题(带*,必填)
|
||||
*/
|
||||
@ExcelProperty(value = "标题", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,必填")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 单据日期(带*,必填)
|
||||
*/
|
||||
@ExcelProperty(value = "单据日期", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,必填")
|
||||
private LocalDate docDate;
|
||||
|
||||
/**
|
||||
* 合同编码
|
||||
*/
|
||||
@ExcelProperty(value = "合同编码")
|
||||
private Long contractCode;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
@ExcelProperty(value = "合同名称")
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 统计周期(带*,必填)
|
||||
*/
|
||||
@ExcelProperty(value = "统计周期", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "带=*,必填")
|
||||
private String statCycle;
|
||||
|
||||
/**
|
||||
* 计量开始
|
||||
*/
|
||||
@ExcelProperty(value = "计量开始")
|
||||
private LocalDate measureStart;
|
||||
|
||||
/**
|
||||
* 审批金额
|
||||
*/
|
||||
@ExcelProperty(value = "审批金额")
|
||||
private BigDecimal approveAmount;
|
||||
|
||||
/**
|
||||
* 项目
|
||||
*/
|
||||
@ExcelProperty(value = "项目")
|
||||
private Long project;
|
||||
|
||||
/**
|
||||
* 结算单位
|
||||
*/
|
||||
@ExcelProperty(value = "结算单位")
|
||||
private Long settlementUnit;
|
||||
|
||||
/**
|
||||
* 合同金额
|
||||
*/
|
||||
@ExcelProperty(value = "合同金额")
|
||||
private BigDecimal contractAmount;
|
||||
|
||||
/**
|
||||
* 累计结算金额(不含本期)
|
||||
*/
|
||||
@ExcelProperty(value = "累计结算金额(不含本期)")
|
||||
private BigDecimal totalSettlementExclCurrent;
|
||||
|
||||
/**
|
||||
* 累计结算金额(含本期)
|
||||
*/
|
||||
@ExcelProperty(value = "累计结算金额(含本期)")
|
||||
private BigDecimal totalSettlementInclCurrent;
|
||||
|
||||
/**
|
||||
* 本次结算比例
|
||||
*/
|
||||
@ExcelProperty(value = "本次结算比例")
|
||||
private BigDecimal currentSettlementRatio;
|
||||
|
||||
/**
|
||||
* 已结算比例(不含本期)
|
||||
*/
|
||||
@ExcelProperty(value = "已结算比例(不含本期)")
|
||||
private BigDecimal settledRatioExclCurrent;
|
||||
|
||||
/**
|
||||
* 截止本期结算比例
|
||||
*/
|
||||
@ExcelProperty(value = "截止本期结算比例")
|
||||
private BigDecimal settlementRatioUntilCurrent;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 实时刷新(0=未勾选,1=勾选)
|
||||
*/
|
||||
@ExcelProperty(value = "实时刷新", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "0==未勾选,1=勾选")
|
||||
private Long realTimeRefresh;
|
||||
|
||||
/**
|
||||
* 累计结算金额(统计及控制信息)
|
||||
*/
|
||||
@ExcelProperty(value = "累计结算金额", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "统=计及控制信息")
|
||||
private BigDecimal totalSettledAmount;
|
||||
|
||||
/**
|
||||
* 本期扣款金额
|
||||
*/
|
||||
@ExcelProperty(value = "本期扣款金额")
|
||||
private BigDecimal currentDeductionAmount;
|
||||
|
||||
/**
|
||||
* 本期奖励金额
|
||||
*/
|
||||
@ExcelProperty(value = "本期奖励金额")
|
||||
private BigDecimal currentRewardAmount;
|
||||
|
||||
/**
|
||||
* 合同含税金额
|
||||
*/
|
||||
@ExcelProperty(value = "合同含税金额")
|
||||
private BigDecimal contractTaxInclAmount;
|
||||
|
||||
/**
|
||||
* 合同不含税金额
|
||||
*/
|
||||
@ExcelProperty(value = "合同不含税金额")
|
||||
private BigDecimal contractTaxExclAmount;
|
||||
|
||||
/**
|
||||
* 单据引用
|
||||
*/
|
||||
@ExcelProperty(value = "单据引用")
|
||||
private String documentReference;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
@ExcelProperty(value = "文件ID")
|
||||
private String fileId;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package org.dromara.xzd.settlement.mapper;
|
||||
|
||||
import org.dromara.xzd.settlement.domain.XzdJsCgJindu;
|
||||
import org.dromara.xzd.settlement.domain.vo.XzdJsCgJinduVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 采购合同进度结算Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
public interface XzdJsCgJinduMapper extends BaseMapperPlus<XzdJsCgJindu, XzdJsCgJinduVo> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package org.dromara.xzd.settlement.mapper;
|
||||
|
||||
import org.dromara.xzd.settlement.domain.XzdJsCgJungonEdit;
|
||||
import org.dromara.xzd.settlement.domain.vo.XzdJsCgJungonEditVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 采购合同竣工结算调整Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
public interface XzdJsCgJungonEditMapper extends BaseMapperPlus<XzdJsCgJungonEdit, XzdJsCgJungonEditVo> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package org.dromara.xzd.settlement.mapper;
|
||||
|
||||
import org.dromara.xzd.settlement.domain.XzdJsCgJungon;
|
||||
import org.dromara.xzd.settlement.domain.vo.XzdJsCgJungonVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 采购合同竣工结算Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
public interface XzdJsCgJungonMapper extends BaseMapperPlus<XzdJsCgJungon, XzdJsCgJungonVo> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package org.dromara.xzd.settlement.mapper;
|
||||
|
||||
import org.dromara.xzd.settlement.domain.XzdJsDeductionItems;
|
||||
import org.dromara.xzd.settlement.domain.vo.XzdJsDeductionItemsVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 结算-扣款与奖励项Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
public interface XzdJsDeductionItemsMapper extends BaseMapperPlus<XzdJsDeductionItems, XzdJsDeductionItemsVo> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package org.dromara.xzd.settlement.mapper;
|
||||
|
||||
import org.dromara.xzd.settlement.domain.XzdJsZhfwJindu;
|
||||
import org.dromara.xzd.settlement.domain.vo.XzdJsZhfwJinduVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 综合服务合同进度结算Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
public interface XzdJsZhfwJinduMapper extends BaseMapperPlus<XzdJsZhfwJindu, XzdJsZhfwJinduVo> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package org.dromara.xzd.settlement.service;
|
||||
|
||||
import org.dromara.xzd.settlement.domain.vo.XzdJsCgJinduVo;
|
||||
import org.dromara.xzd.settlement.domain.bo.XzdJsCgJinduBo;
|
||||
import org.dromara.xzd.settlement.domain.XzdJsCgJindu;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 采购合同进度结算Service接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
public interface IXzdJsCgJinduService extends IService<XzdJsCgJindu>{
|
||||
|
||||
/**
|
||||
* 查询采购合同进度结算
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 采购合同进度结算
|
||||
*/
|
||||
XzdJsCgJinduVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询采购合同进度结算列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 采购合同进度结算分页列表
|
||||
*/
|
||||
TableDataInfo<XzdJsCgJinduVo> queryPageList(XzdJsCgJinduBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的采购合同进度结算列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 采购合同进度结算列表
|
||||
*/
|
||||
List<XzdJsCgJinduVo> queryList(XzdJsCgJinduBo bo);
|
||||
|
||||
/**
|
||||
* 新增采购合同进度结算
|
||||
*
|
||||
* @param bo 采购合同进度结算
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(XzdJsCgJinduBo bo);
|
||||
|
||||
/**
|
||||
* 修改采购合同进度结算
|
||||
*
|
||||
* @param bo 采购合同进度结算
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(XzdJsCgJinduBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除采购合同进度结算信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package org.dromara.xzd.settlement.service;
|
||||
|
||||
import org.dromara.xzd.settlement.domain.vo.XzdJsCgJungonEditVo;
|
||||
import org.dromara.xzd.settlement.domain.bo.XzdJsCgJungonEditBo;
|
||||
import org.dromara.xzd.settlement.domain.XzdJsCgJungonEdit;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 采购合同竣工结算调整Service接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
public interface IXzdJsCgJungonEditService extends IService<XzdJsCgJungonEdit>{
|
||||
|
||||
/**
|
||||
* 查询采购合同竣工结算调整
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 采购合同竣工结算调整
|
||||
*/
|
||||
XzdJsCgJungonEditVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询采购合同竣工结算调整列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 采购合同竣工结算调整分页列表
|
||||
*/
|
||||
TableDataInfo<XzdJsCgJungonEditVo> queryPageList(XzdJsCgJungonEditBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的采购合同竣工结算调整列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 采购合同竣工结算调整列表
|
||||
*/
|
||||
List<XzdJsCgJungonEditVo> queryList(XzdJsCgJungonEditBo bo);
|
||||
|
||||
/**
|
||||
* 新增采购合同竣工结算调整
|
||||
*
|
||||
* @param bo 采购合同竣工结算调整
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(XzdJsCgJungonEditBo bo);
|
||||
|
||||
/**
|
||||
* 修改采购合同竣工结算调整
|
||||
*
|
||||
* @param bo 采购合同竣工结算调整
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(XzdJsCgJungonEditBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除采购合同竣工结算调整信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package org.dromara.xzd.settlement.service;
|
||||
|
||||
import org.dromara.xzd.settlement.domain.vo.XzdJsCgJungonVo;
|
||||
import org.dromara.xzd.settlement.domain.bo.XzdJsCgJungonBo;
|
||||
import org.dromara.xzd.settlement.domain.XzdJsCgJungon;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 采购合同竣工结算Service接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
public interface IXzdJsCgJungonService extends IService<XzdJsCgJungon>{
|
||||
|
||||
/**
|
||||
* 查询采购合同竣工结算
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 采购合同竣工结算
|
||||
*/
|
||||
XzdJsCgJungonVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询采购合同竣工结算列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 采购合同竣工结算分页列表
|
||||
*/
|
||||
TableDataInfo<XzdJsCgJungonVo> queryPageList(XzdJsCgJungonBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的采购合同竣工结算列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 采购合同竣工结算列表
|
||||
*/
|
||||
List<XzdJsCgJungonVo> queryList(XzdJsCgJungonBo bo);
|
||||
|
||||
/**
|
||||
* 新增采购合同竣工结算
|
||||
*
|
||||
* @param bo 采购合同竣工结算
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(XzdJsCgJungonBo bo);
|
||||
|
||||
/**
|
||||
* 修改采购合同竣工结算
|
||||
*
|
||||
* @param bo 采购合同竣工结算
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(XzdJsCgJungonBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除采购合同竣工结算信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package org.dromara.xzd.settlement.service;
|
||||
|
||||
import org.dromara.xzd.settlement.domain.vo.XzdJsDeductionItemsVo;
|
||||
import org.dromara.xzd.settlement.domain.bo.XzdJsDeductionItemsBo;
|
||||
import org.dromara.xzd.settlement.domain.XzdJsDeductionItems;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 结算-扣款与奖励项Service接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
public interface IXzdJsDeductionItemsService extends IService<XzdJsDeductionItems>{
|
||||
|
||||
/**
|
||||
* 查询结算-扣款与奖励项
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 结算-扣款与奖励项
|
||||
*/
|
||||
XzdJsDeductionItemsVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询结算-扣款与奖励项列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 结算-扣款与奖励项分页列表
|
||||
*/
|
||||
TableDataInfo<XzdJsDeductionItemsVo> queryPageList(XzdJsDeductionItemsBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的结算-扣款与奖励项列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 结算-扣款与奖励项列表
|
||||
*/
|
||||
List<XzdJsDeductionItemsVo> queryList(XzdJsDeductionItemsBo bo);
|
||||
|
||||
/**
|
||||
* 新增结算-扣款与奖励项
|
||||
*
|
||||
* @param bo 结算-扣款与奖励项
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(XzdJsDeductionItemsBo bo);
|
||||
|
||||
/**
|
||||
* 修改结算-扣款与奖励项
|
||||
*
|
||||
* @param bo 结算-扣款与奖励项
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(XzdJsDeductionItemsBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除结算-扣款与奖励项信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package org.dromara.xzd.settlement.service;
|
||||
|
||||
import org.dromara.xzd.settlement.domain.vo.XzdJsZhfwJinduVo;
|
||||
import org.dromara.xzd.settlement.domain.bo.XzdJsZhfwJinduBo;
|
||||
import org.dromara.xzd.settlement.domain.XzdJsZhfwJindu;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 综合服务合同进度结算Service接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
public interface IXzdJsZhfwJinduService extends IService<XzdJsZhfwJindu>{
|
||||
|
||||
/**
|
||||
* 查询综合服务合同进度结算
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 综合服务合同进度结算
|
||||
*/
|
||||
XzdJsZhfwJinduVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询综合服务合同进度结算列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 综合服务合同进度结算分页列表
|
||||
*/
|
||||
TableDataInfo<XzdJsZhfwJinduVo> queryPageList(XzdJsZhfwJinduBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的综合服务合同进度结算列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 综合服务合同进度结算列表
|
||||
*/
|
||||
List<XzdJsZhfwJinduVo> queryList(XzdJsZhfwJinduBo bo);
|
||||
|
||||
/**
|
||||
* 新增综合服务合同进度结算
|
||||
*
|
||||
* @param bo 综合服务合同进度结算
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(XzdJsZhfwJinduBo bo);
|
||||
|
||||
/**
|
||||
* 修改综合服务合同进度结算
|
||||
*
|
||||
* @param bo 综合服务合同进度结算
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(XzdJsZhfwJinduBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除综合服务合同进度结算信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@ -0,0 +1,218 @@
|
||||
package org.dromara.xzd.settlement.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.utils.BatchNumberGenerator;
|
||||
import org.dromara.xzd.comprehensive.domain.vo.XzdCsContractChangeVo;
|
||||
import org.dromara.xzd.domain.XzdContractClause;
|
||||
import org.dromara.xzd.domain.XzdDeductionItems;
|
||||
import org.dromara.xzd.domain.XzdSettlementRules;
|
||||
import org.dromara.xzd.domain.dto.QuerCorrespondentDto;
|
||||
import org.dromara.xzd.enums.XzdClassEnum;
|
||||
import org.dromara.xzd.service.IXzdCorrespondentList;
|
||||
import org.dromara.xzd.service.impl.XzdProjectServiceImpl;
|
||||
import org.dromara.xzd.service.impl.XzdSupplierInfoServiceImpl;
|
||||
import org.dromara.xzd.settlement.domain.XzdJsDeductionItems;
|
||||
import org.dromara.xzd.settlement.domain.bo.XzdJsDeductionItemsBo;
|
||||
import org.dromara.xzd.settlement.service.IXzdJsDeductionItemsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.xzd.settlement.domain.bo.XzdJsCgJinduBo;
|
||||
import org.dromara.xzd.settlement.domain.vo.XzdJsCgJinduVo;
|
||||
import org.dromara.xzd.settlement.domain.XzdJsCgJindu;
|
||||
import org.dromara.xzd.settlement.mapper.XzdJsCgJinduMapper;
|
||||
import org.dromara.xzd.settlement.service.IXzdJsCgJinduService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 采购合同进度结算Service业务层处理
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XzdJsCgJinduServiceImpl extends ServiceImpl<XzdJsCgJinduMapper, XzdJsCgJindu> implements IXzdJsCgJinduService {
|
||||
|
||||
private final XzdJsCgJinduMapper baseMapper;
|
||||
|
||||
@Autowired
|
||||
private XzdProjectServiceImpl xzdProjectService;
|
||||
@Autowired
|
||||
private IXzdCorrespondentList iXzdCorrespondentList;
|
||||
|
||||
@Autowired
|
||||
private IXzdJsDeductionItemsService deductionItemsService;
|
||||
|
||||
/**
|
||||
* 查询采购合同进度结算
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 采购合同进度结算
|
||||
*/
|
||||
@Override
|
||||
public XzdJsCgJinduVo queryById(Long id){
|
||||
XzdJsCgJinduVo xzdJsCgJinduVo = baseMapper.selectVoById(id);
|
||||
getName(xzdJsCgJinduVo);
|
||||
return xzdJsCgJinduVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询采购合同进度结算列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 采购合同进度结算分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XzdJsCgJinduVo> queryPageList(XzdJsCgJinduBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XzdJsCgJindu> lqw = buildQueryWrapper(bo);
|
||||
Page<XzdJsCgJinduVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
result.getRecords().forEach(this::getName);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的采购合同进度结算列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 采购合同进度结算列表
|
||||
*/
|
||||
@Override
|
||||
public List<XzdJsCgJinduVo> queryList(XzdJsCgJinduBo bo) {
|
||||
LambdaQueryWrapper<XzdJsCgJindu> lqw = buildQueryWrapper(bo);
|
||||
List<XzdJsCgJinduVo> xzdJsCgJinduVos = baseMapper.selectVoList(lqw);
|
||||
xzdJsCgJinduVos.forEach(this::getName);
|
||||
return xzdJsCgJinduVos;
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XzdJsCgJindu> buildQueryWrapper(XzdJsCgJinduBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<XzdJsCgJindu> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByDesc(XzdJsCgJindu::getId);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDocCode()), XzdJsCgJindu::getDocCode, bo.getDocCode());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), XzdJsCgJindu::getTitle, bo.getTitle());
|
||||
lqw.eq(bo.getDocDate() != null, XzdJsCgJindu::getDocDate, bo.getDocDate());
|
||||
lqw.eq(bo.getContractCode() != null, XzdJsCgJindu::getContractCode, bo.getContractCode());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getContractName()), XzdJsCgJindu::getContractName, bo.getContractName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getStatCycle()), XzdJsCgJindu::getStatCycle, bo.getStatCycle());
|
||||
lqw.eq(bo.getMeasureStart() != null, XzdJsCgJindu::getMeasureStart, bo.getMeasureStart());
|
||||
lqw.eq(bo.getProject() != null, XzdJsCgJindu::getProject, bo.getProject());
|
||||
lqw.eq(bo.getApproveAmount() != null, XzdJsCgJindu::getApproveAmount, bo.getApproveAmount());
|
||||
lqw.eq(bo.getMeasureEnd() != null, XzdJsCgJindu::getMeasureEnd, bo.getMeasureEnd());
|
||||
lqw.eq(bo.getSettlementUnit() != null, XzdJsCgJindu::getSettlementUnit, bo.getSettlementUnit());
|
||||
lqw.eq(bo.getContractAmount() != null, XzdJsCgJindu::getContractAmount, bo.getContractAmount());
|
||||
lqw.eq(bo.getTotalSettlementExcludeCurrent() != null, XzdJsCgJindu::getTotalSettlementExcludeCurrent, bo.getTotalSettlementExcludeCurrent());
|
||||
lqw.eq(bo.getTotalSettlementIncludeCurrent() != null, XzdJsCgJindu::getTotalSettlementIncludeCurrent, bo.getTotalSettlementIncludeCurrent());
|
||||
lqw.eq(bo.getCurrentSettlementRatio() != null, XzdJsCgJindu::getCurrentSettlementRatio, bo.getCurrentSettlementRatio());
|
||||
lqw.eq(bo.getSettledRatioExcludeCurrent() != null, XzdJsCgJindu::getSettledRatioExcludeCurrent, bo.getSettledRatioExcludeCurrent());
|
||||
lqw.eq(bo.getSettlementRatioUntilCurrent() != null, XzdJsCgJindu::getSettlementRatioUntilCurrent, bo.getSettlementRatioUntilCurrent());
|
||||
lqw.eq(bo.getRealTimeRefresh() != null, XzdJsCgJindu::getRealTimeRefresh, bo.getRealTimeRefresh());
|
||||
lqw.eq(bo.getContractTaxInclAmount() != null, XzdJsCgJindu::getContractTaxInclAmount, bo.getContractTaxInclAmount());
|
||||
lqw.eq(bo.getContractTaxExclAmount() != null, XzdJsCgJindu::getContractTaxExclAmount, bo.getContractTaxExclAmount());
|
||||
lqw.eq(bo.getTotalSettledAmount() != null, XzdJsCgJindu::getTotalSettledAmount, bo.getTotalSettledAmount());
|
||||
lqw.eq(bo.getCurrentDeductionAmount() != null, XzdJsCgJindu::getCurrentDeductionAmount, bo.getCurrentDeductionAmount());
|
||||
lqw.eq(bo.getCurrentRewardAmount() != null, XzdJsCgJindu::getCurrentRewardAmount, bo.getCurrentRewardAmount());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDocumentReference()), XzdJsCgJindu::getDocumentReference, bo.getDocumentReference());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFileId()), XzdJsCgJindu::getFileId, bo.getFileId());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增采购合同进度结算
|
||||
*
|
||||
* @param bo 采购合同进度结算
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(XzdJsCgJinduBo bo) {
|
||||
XzdJsCgJindu add = MapstructUtils.convert(bo, XzdJsCgJindu.class);
|
||||
validEntityBeforeSave(add);
|
||||
String code = BatchNumberGenerator.generateBatchNumber("ZHFWHT-");
|
||||
add.setDocCode(code);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
|
||||
String tableName = XzdClassEnum.JS_CG_JINDU.getClassName();
|
||||
if (bo.getKkyjlx() == null || bo.getKkyjlx().isEmpty()) {
|
||||
throw new ServiceException("扣款与奖励项不能为空");
|
||||
}
|
||||
//合同条款-扣款与奖励项
|
||||
for (XzdJsDeductionItems kkyjlx : bo.getKkyjlx()) {
|
||||
kkyjlx.setTableName(tableName);
|
||||
kkyjlx.setMainDocId(add.getId());
|
||||
}
|
||||
deductionItemsService.saveBatch(bo.getKkyjlx());
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改采购合同进度结算
|
||||
*
|
||||
* @param bo 采购合同进度结算
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(XzdJsCgJinduBo bo) {
|
||||
XzdJsCgJindu update = MapstructUtils.convert(bo, XzdJsCgJindu.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(XzdJsCgJindu entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除采购合同进度结算信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取部分字段名称
|
||||
* @param item
|
||||
*/
|
||||
private void getName(XzdJsCgJinduVo item) {
|
||||
//项目名称
|
||||
if (item.getProject() != null){
|
||||
String projectName = xzdProjectService.queryNameById(item.getProject());
|
||||
if (projectName != null){
|
||||
item.setProjectName(projectName);
|
||||
}
|
||||
}
|
||||
//结算单位(客户信息列表)
|
||||
R<QuerCorrespondentDto> dtoR = iXzdCorrespondentList.getCustomerByid(item.getSettlementUnit());
|
||||
if (dtoR!=null){
|
||||
if (dtoR.getData().getXzdCustomerinformation() != null){
|
||||
item.setSettlementUnitName(dtoR.getData().getXzdCustomerinformation().getUnitName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,141 @@
|
||||
package org.dromara.xzd.settlement.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.xzd.settlement.domain.bo.XzdJsCgJungonEditBo;
|
||||
import org.dromara.xzd.settlement.domain.vo.XzdJsCgJungonEditVo;
|
||||
import org.dromara.xzd.settlement.domain.XzdJsCgJungonEdit;
|
||||
import org.dromara.xzd.settlement.mapper.XzdJsCgJungonEditMapper;
|
||||
import org.dromara.xzd.settlement.service.IXzdJsCgJungonEditService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 采购合同竣工结算调整Service业务层处理
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XzdJsCgJungonEditServiceImpl extends ServiceImpl<XzdJsCgJungonEditMapper, XzdJsCgJungonEdit> implements IXzdJsCgJungonEditService {
|
||||
|
||||
private final XzdJsCgJungonEditMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询采购合同竣工结算调整
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 采购合同竣工结算调整
|
||||
*/
|
||||
@Override
|
||||
public XzdJsCgJungonEditVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询采购合同竣工结算调整列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 采购合同竣工结算调整分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XzdJsCgJungonEditVo> queryPageList(XzdJsCgJungonEditBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XzdJsCgJungonEdit> lqw = buildQueryWrapper(bo);
|
||||
Page<XzdJsCgJungonEditVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的采购合同竣工结算调整列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 采购合同竣工结算调整列表
|
||||
*/
|
||||
@Override
|
||||
public List<XzdJsCgJungonEditVo> queryList(XzdJsCgJungonEditBo bo) {
|
||||
LambdaQueryWrapper<XzdJsCgJungonEdit> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XzdJsCgJungonEdit> buildQueryWrapper(XzdJsCgJungonEditBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<XzdJsCgJungonEdit> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByDesc(XzdJsCgJungonEdit::getId);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDocCode()), XzdJsCgJungonEdit::getDocCode, bo.getDocCode());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), XzdJsCgJungonEdit::getTitle, bo.getTitle());
|
||||
lqw.eq(bo.getDocDate() != null, XzdJsCgJungonEdit::getDocDate, bo.getDocDate());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFinalAccountCode()), XzdJsCgJungonEdit::getFinalAccountCode, bo.getFinalAccountCode());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getContractName()), XzdJsCgJungonEdit::getContractName, bo.getContractName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getContractCode()), XzdJsCgJungonEdit::getContractCode, bo.getContractCode());
|
||||
lqw.eq(bo.getAdjustedFinalAmount() != null, XzdJsCgJungonEdit::getAdjustedFinalAmount, bo.getAdjustedFinalAmount());
|
||||
lqw.eq(bo.getProjectId() != null, XzdJsCgJungonEdit::getProjectId, bo.getProjectId());
|
||||
lqw.eq(bo.getDefaultFinanceOrg() != null, XzdJsCgJungonEdit::getDefaultFinanceOrg, bo.getDefaultFinanceOrg());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getAdjustmentDescription()), XzdJsCgJungonEdit::getAdjustmentDescription, bo.getAdjustmentDescription());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getProcurementMode()), XzdJsCgJungonEdit::getProcurementMode, bo.getProcurementMode());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增采购合同竣工结算调整
|
||||
*
|
||||
* @param bo 采购合同竣工结算调整
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(XzdJsCgJungonEditBo bo) {
|
||||
XzdJsCgJungonEdit add = MapstructUtils.convert(bo, XzdJsCgJungonEdit.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改采购合同竣工结算调整
|
||||
*
|
||||
* @param bo 采购合同竣工结算调整
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(XzdJsCgJungonEditBo bo) {
|
||||
XzdJsCgJungonEdit update = MapstructUtils.convert(bo, XzdJsCgJungonEdit.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(XzdJsCgJungonEdit entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除采购合同竣工结算调整信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,151 @@
|
||||
package org.dromara.xzd.settlement.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.xzd.settlement.domain.bo.XzdJsCgJungonBo;
|
||||
import org.dromara.xzd.settlement.domain.vo.XzdJsCgJungonVo;
|
||||
import org.dromara.xzd.settlement.domain.XzdJsCgJungon;
|
||||
import org.dromara.xzd.settlement.mapper.XzdJsCgJungonMapper;
|
||||
import org.dromara.xzd.settlement.service.IXzdJsCgJungonService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 采购合同竣工结算Service业务层处理
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XzdJsCgJungonServiceImpl extends ServiceImpl<XzdJsCgJungonMapper, XzdJsCgJungon> implements IXzdJsCgJungonService {
|
||||
|
||||
private final XzdJsCgJungonMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询采购合同竣工结算
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 采购合同竣工结算
|
||||
*/
|
||||
@Override
|
||||
public XzdJsCgJungonVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询采购合同竣工结算列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 采购合同竣工结算分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XzdJsCgJungonVo> queryPageList(XzdJsCgJungonBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XzdJsCgJungon> lqw = buildQueryWrapper(bo);
|
||||
Page<XzdJsCgJungonVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的采购合同竣工结算列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 采购合同竣工结算列表
|
||||
*/
|
||||
@Override
|
||||
public List<XzdJsCgJungonVo> queryList(XzdJsCgJungonBo bo) {
|
||||
LambdaQueryWrapper<XzdJsCgJungon> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XzdJsCgJungon> buildQueryWrapper(XzdJsCgJungonBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<XzdJsCgJungon> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByDesc(XzdJsCgJungon::getId);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDocCode()), XzdJsCgJungon::getDocCode, bo.getDocCode());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), XzdJsCgJungon::getTitle, bo.getTitle());
|
||||
lqw.eq(bo.getDocDate() != null, XzdJsCgJungon::getDocDate, bo.getDocDate());
|
||||
lqw.eq(bo.getContractCode() != null, XzdJsCgJungon::getContractCode, bo.getContractCode());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getContractName()), XzdJsCgJungon::getContractName, bo.getContractName());
|
||||
lqw.eq(bo.getFinalAmount() != null, XzdJsCgJungon::getFinalAmount, bo.getFinalAmount());
|
||||
lqw.eq(bo.getCurrentPeriodTotal() != null, XzdJsCgJungon::getCurrentPeriodTotal, bo.getCurrentPeriodTotal());
|
||||
lqw.eq(bo.getCurrentDeduction() != null, XzdJsCgJungon::getCurrentDeduction, bo.getCurrentDeduction());
|
||||
lqw.eq(bo.getCurrentReward() != null, XzdJsCgJungon::getCurrentReward, bo.getCurrentReward());
|
||||
lqw.eq(bo.getApproveDate() != null, XzdJsCgJungon::getApproveDate, bo.getApproveDate());
|
||||
lqw.eq(bo.getProjectId() != null, XzdJsCgJungon::getProjectId, bo.getProjectId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getStatCycle()), XzdJsCgJungon::getStatCycle, bo.getStatCycle());
|
||||
lqw.eq(bo.getPartyA() != null, XzdJsCgJungon::getPartyA, bo.getPartyA());
|
||||
lqw.eq(bo.getPartyB() != null, XzdJsCgJungon::getPartyB, bo.getPartyB());
|
||||
lqw.eq(bo.getProcurementMode() != null, XzdJsCgJungon::getProcurementMode, bo.getProcurementMode());
|
||||
lqw.eq(bo.getOwnerUnit() != null, XzdJsCgJungon::getOwnerUnit, bo.getOwnerUnit());
|
||||
lqw.eq(bo.getSupervisionUnit() != null, XzdJsCgJungon::getSupervisionUnit, bo.getSupervisionUnit());
|
||||
lqw.eq(bo.getConstructionUnit() != null, XzdJsCgJungon::getConstructionUnit, bo.getConstructionUnit());
|
||||
lqw.eq(bo.getAuditUnit() != null, XzdJsCgJungon::getAuditUnit, bo.getAuditUnit());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDocumentReference()), XzdJsCgJungon::getDocumentReference, bo.getDocumentReference());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFileId()), XzdJsCgJungon::getFileId, bo.getFileId());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增采购合同竣工结算
|
||||
*
|
||||
* @param bo 采购合同竣工结算
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(XzdJsCgJungonBo bo) {
|
||||
XzdJsCgJungon add = MapstructUtils.convert(bo, XzdJsCgJungon.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改采购合同竣工结算
|
||||
*
|
||||
* @param bo 采购合同竣工结算
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(XzdJsCgJungonBo bo) {
|
||||
XzdJsCgJungon update = MapstructUtils.convert(bo, XzdJsCgJungon.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(XzdJsCgJungon entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除采购合同竣工结算信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,139 @@
|
||||
package org.dromara.xzd.settlement.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.xzd.settlement.domain.bo.XzdJsDeductionItemsBo;
|
||||
import org.dromara.xzd.settlement.domain.vo.XzdJsDeductionItemsVo;
|
||||
import org.dromara.xzd.settlement.domain.XzdJsDeductionItems;
|
||||
import org.dromara.xzd.settlement.mapper.XzdJsDeductionItemsMapper;
|
||||
import org.dromara.xzd.settlement.service.IXzdJsDeductionItemsService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 结算-扣款与奖励项Service业务层处理
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XzdJsDeductionItemsServiceImpl extends ServiceImpl<XzdJsDeductionItemsMapper, XzdJsDeductionItems> implements IXzdJsDeductionItemsService {
|
||||
|
||||
private final XzdJsDeductionItemsMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询结算-扣款与奖励项
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 结算-扣款与奖励项
|
||||
*/
|
||||
@Override
|
||||
public XzdJsDeductionItemsVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询结算-扣款与奖励项列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 结算-扣款与奖励项分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XzdJsDeductionItemsVo> queryPageList(XzdJsDeductionItemsBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XzdJsDeductionItems> lqw = buildQueryWrapper(bo);
|
||||
Page<XzdJsDeductionItemsVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的结算-扣款与奖励项列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 结算-扣款与奖励项列表
|
||||
*/
|
||||
@Override
|
||||
public List<XzdJsDeductionItemsVo> queryList(XzdJsDeductionItemsBo bo) {
|
||||
LambdaQueryWrapper<XzdJsDeductionItems> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XzdJsDeductionItems> buildQueryWrapper(XzdJsDeductionItemsBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<XzdJsDeductionItems> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByDesc(XzdJsDeductionItems::getId);
|
||||
lqw.eq(bo.getMainDocId() != null, XzdJsDeductionItems::getMainDocId, bo.getMainDocId());
|
||||
lqw.eq(bo.getDetailType() != null, XzdJsDeductionItems::getDetailType, bo.getDetailType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getItemCategory()), XzdJsDeductionItems::getItemCategory, bo.getItemCategory());
|
||||
lqw.eq(bo.getCurrentPeriodAmount() != null, XzdJsDeductionItems::getCurrentPeriodAmount, bo.getCurrentPeriodAmount());
|
||||
lqw.eq(bo.getTotalAmount() != null, XzdJsDeductionItems::getTotalAmount, bo.getTotalAmount());
|
||||
lqw.eq(bo.getApplyDeduction() != null, XzdJsDeductionItems::getApplyDeduction, bo.getApplyDeduction());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getItemProperty()), XzdJsDeductionItems::getItemProperty, bo.getItemProperty());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getWbs()), XzdJsDeductionItems::getWbs, bo.getWbs());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCbs()), XzdJsDeductionItems::getCbs, bo.getCbs());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增结算-扣款与奖励项
|
||||
*
|
||||
* @param bo 结算-扣款与奖励项
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(XzdJsDeductionItemsBo bo) {
|
||||
XzdJsDeductionItems add = MapstructUtils.convert(bo, XzdJsDeductionItems.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改结算-扣款与奖励项
|
||||
*
|
||||
* @param bo 结算-扣款与奖励项
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(XzdJsDeductionItemsBo bo) {
|
||||
XzdJsDeductionItems update = MapstructUtils.convert(bo, XzdJsDeductionItems.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(XzdJsDeductionItems entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除结算-扣款与奖励项信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,154 @@
|
||||
package org.dromara.xzd.settlement.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.xzd.settlement.domain.bo.XzdJsZhfwJinduBo;
|
||||
import org.dromara.xzd.settlement.domain.vo.XzdJsZhfwJinduVo;
|
||||
import org.dromara.xzd.settlement.domain.XzdJsZhfwJindu;
|
||||
import org.dromara.xzd.settlement.mapper.XzdJsZhfwJinduMapper;
|
||||
import org.dromara.xzd.settlement.service.IXzdJsZhfwJinduService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 综合服务合同进度结算Service业务层处理
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XzdJsZhfwJinduServiceImpl extends ServiceImpl<XzdJsZhfwJinduMapper, XzdJsZhfwJindu> implements IXzdJsZhfwJinduService {
|
||||
|
||||
private final XzdJsZhfwJinduMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询综合服务合同进度结算
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 综合服务合同进度结算
|
||||
*/
|
||||
@Override
|
||||
public XzdJsZhfwJinduVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询综合服务合同进度结算列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 综合服务合同进度结算分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XzdJsZhfwJinduVo> queryPageList(XzdJsZhfwJinduBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XzdJsZhfwJindu> lqw = buildQueryWrapper(bo);
|
||||
Page<XzdJsZhfwJinduVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的综合服务合同进度结算列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 综合服务合同进度结算列表
|
||||
*/
|
||||
@Override
|
||||
public List<XzdJsZhfwJinduVo> queryList(XzdJsZhfwJinduBo bo) {
|
||||
LambdaQueryWrapper<XzdJsZhfwJindu> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XzdJsZhfwJindu> buildQueryWrapper(XzdJsZhfwJinduBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<XzdJsZhfwJindu> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByDesc(XzdJsZhfwJindu::getId);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDocCode()), XzdJsZhfwJindu::getDocCode, bo.getDocCode());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), XzdJsZhfwJindu::getTitle, bo.getTitle());
|
||||
lqw.eq(bo.getDocDate() != null, XzdJsZhfwJindu::getDocDate, bo.getDocDate());
|
||||
lqw.eq(bo.getContractCode() != null, XzdJsZhfwJindu::getContractCode, bo.getContractCode());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getContractName()), XzdJsZhfwJindu::getContractName, bo.getContractName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getStatCycle()), XzdJsZhfwJindu::getStatCycle, bo.getStatCycle());
|
||||
lqw.eq(bo.getMeasureStart() != null, XzdJsZhfwJindu::getMeasureStart, bo.getMeasureStart());
|
||||
lqw.eq(bo.getApproveAmount() != null, XzdJsZhfwJindu::getApproveAmount, bo.getApproveAmount());
|
||||
lqw.eq(bo.getProject() != null, XzdJsZhfwJindu::getProject, bo.getProject());
|
||||
lqw.eq(bo.getSettlementUnit() != null, XzdJsZhfwJindu::getSettlementUnit, bo.getSettlementUnit());
|
||||
lqw.eq(bo.getContractAmount() != null, XzdJsZhfwJindu::getContractAmount, bo.getContractAmount());
|
||||
lqw.eq(bo.getTotalSettlementExclCurrent() != null, XzdJsZhfwJindu::getTotalSettlementExclCurrent, bo.getTotalSettlementExclCurrent());
|
||||
lqw.eq(bo.getTotalSettlementInclCurrent() != null, XzdJsZhfwJindu::getTotalSettlementInclCurrent, bo.getTotalSettlementInclCurrent());
|
||||
lqw.eq(bo.getCurrentSettlementRatio() != null, XzdJsZhfwJindu::getCurrentSettlementRatio, bo.getCurrentSettlementRatio());
|
||||
lqw.eq(bo.getSettledRatioExclCurrent() != null, XzdJsZhfwJindu::getSettledRatioExclCurrent, bo.getSettledRatioExclCurrent());
|
||||
lqw.eq(bo.getSettlementRatioUntilCurrent() != null, XzdJsZhfwJindu::getSettlementRatioUntilCurrent, bo.getSettlementRatioUntilCurrent());
|
||||
lqw.eq(bo.getRealTimeRefresh() != null, XzdJsZhfwJindu::getRealTimeRefresh, bo.getRealTimeRefresh());
|
||||
lqw.eq(bo.getTotalSettledAmount() != null, XzdJsZhfwJindu::getTotalSettledAmount, bo.getTotalSettledAmount());
|
||||
lqw.eq(bo.getCurrentDeductionAmount() != null, XzdJsZhfwJindu::getCurrentDeductionAmount, bo.getCurrentDeductionAmount());
|
||||
lqw.eq(bo.getCurrentRewardAmount() != null, XzdJsZhfwJindu::getCurrentRewardAmount, bo.getCurrentRewardAmount());
|
||||
lqw.eq(bo.getContractTaxInclAmount() != null, XzdJsZhfwJindu::getContractTaxInclAmount, bo.getContractTaxInclAmount());
|
||||
lqw.eq(bo.getContractTaxExclAmount() != null, XzdJsZhfwJindu::getContractTaxExclAmount, bo.getContractTaxExclAmount());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDocumentReference()), XzdJsZhfwJindu::getDocumentReference, bo.getDocumentReference());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFileId()), XzdJsZhfwJindu::getFileId, bo.getFileId());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增综合服务合同进度结算
|
||||
*
|
||||
* @param bo 综合服务合同进度结算
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(XzdJsZhfwJinduBo bo) {
|
||||
XzdJsZhfwJindu add = MapstructUtils.convert(bo, XzdJsZhfwJindu.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改综合服务合同进度结算
|
||||
*
|
||||
* @param bo 综合服务合同进度结算
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(XzdJsZhfwJinduBo bo) {
|
||||
XzdJsZhfwJindu update = MapstructUtils.convert(bo, XzdJsZhfwJindu.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(XzdJsZhfwJindu entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除综合服务合同进度结算信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.xzd.comprehensive.mapper.XzdCsContractChangeMapper">
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.xzd.comprehensive.mapper.XzdCsContractInformationMapper">
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.xzd.comprehensive.mapper.XzdCsContractSuspendMapper">
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.xzd.settlement.mapper.XzdJsCgJinduMapper">
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.xzd.settlement.mapper.XzdJsCgJungonEditMapper">
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.xzd.settlement.mapper.XzdJsCgJungonMapper">
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.xzd.settlement.mapper.XzdJsDeductionItemsMapper">
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.xzd.settlement.mapper.XzdJsZhfwJinduMapper">
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user