From e87cbce77a590cd11e2526e7dadfdec19681c5f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E6=88=90?= <2847920761@qq.com> Date: Tue, 14 Oct 2025 23:21:23 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=A7=A3=E5=86=B3ws=E4=B8=8D=E5=85=BC?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../websocket/config/WebSocketConfig.java | 1 + .../ruoyi-modules/ruoyi-system/pom.xml | 12 +- .../DeviceWebSocketServer.java | 618 ++++++++++-------- .../mobileAttendanceMachine/KqjEntity.java | 51 +- .../WebSocketConfig.java | 13 +- 5 files changed, 373 insertions(+), 322 deletions(-) diff --git a/xinnengyuan/ruoyi-common/ruoyi-common-websocket/src/main/java/org/dromara/common/websocket/config/WebSocketConfig.java b/xinnengyuan/ruoyi-common/ruoyi-common-websocket/src/main/java/org/dromara/common/websocket/config/WebSocketConfig.java index ef5cfc96..d6bb9112 100644 --- a/xinnengyuan/ruoyi-common/ruoyi-common-websocket/src/main/java/org/dromara/common/websocket/config/WebSocketConfig.java +++ b/xinnengyuan/ruoyi-common/ruoyi-common-websocket/src/main/java/org/dromara/common/websocket/config/WebSocketConfig.java @@ -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 配置 diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/pom.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/pom.xml index ce758e5f..cb857252 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/pom.xml +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/pom.xml @@ -19,11 +19,15 @@ + + + + + + - javax.websocket - javax.websocket-api - 1.1 - provided + org.springframework.boot + spring-boot-starter-websocket diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mobileAttendanceMachine/DeviceWebSocketServer.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mobileAttendanceMachine/DeviceWebSocketServer.java index 33532311..01fb3f48 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mobileAttendanceMachine/DeviceWebSocketServer.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mobileAttendanceMachine/DeviceWebSocketServer.java @@ -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 connectedDevices = new ConcurrentHashMap<>(); - // 2. 存储UUID对应的响应通道(key: UUID,value: 响应结果容器) - private static final Map> responseChannels = new ConcurrentHashMap<>(); + // 响应通道:key=UUID,value=响应结果容器 + private static final Map responseChannels = new ConcurrentHashMap<>(); + // 设备-SN反向映射:key=设备SN,value=关联的UUID列表(用于连接关闭时清理) + private static final Map> 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 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 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 firstMsgFuture = new java.util.concurrent.CompletableFuture<>(); - // 使用AtomicReference包装临时处理器,解决未初始化问题 - final java.util.concurrent.atomic.AtomicReference> tempHandlerRef = new java.util.concurrent.atomic.AtomicReference<>(); - - // 定义临时消息处理器 - MessageHandler.Whole 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 firstMsgFuture = new java.util.concurrent.CompletableFuture<>(); -// -// // 临时注册消息处理器,读取第一条消息后移除 -// MessageHandler.Whole 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 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 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 { + private static class ResponseHolder { private final String sn; // 关联的设备SN - private final java.util.concurrent.CompletableFuture resultFuture; + private final CompletableFuture 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 getResultFuture() { + public CompletableFuture getResultFuture() { return resultFuture; } } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mobileAttendanceMachine/KqjEntity.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mobileAttendanceMachine/KqjEntity.java index e505dd7a..d4a09145 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mobileAttendanceMachine/KqjEntity.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mobileAttendanceMachine/KqjEntity.java @@ -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; } - } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mobileAttendanceMachine/WebSocketConfig.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mobileAttendanceMachine/WebSocketConfig.java index 7f2f5d36..d44992e9 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mobileAttendanceMachine/WebSocketConfig.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mobileAttendanceMachine/WebSocketConfig.java @@ -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(); From 9604cab4d6beee2d5414f37004c358053cca22c5 Mon Sep 17 00:00:00 2001 From: dfdg <2710245601@qq.com> Date: Wed, 15 Oct 2025 10:30:54 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E7=BB=BC=E5=90=88=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=AF=B9=E5=BA=94=E6=8E=A5=E5=8F=A3=E5=92=8C=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E9=87=87=E8=B4=AD=E5=90=88=E5=90=8C=E5=AF=B9=E5=BA=94=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../XzdCsContractChangeController.java | 105 +++++ .../XzdCsContractInformationController.java | 114 +++++ .../XzdCsContractSuspendController.java | 105 +++++ .../domain/XzdCsContractChange.java | 206 +++++++++ .../domain/XzdCsContractInformation.java | 241 +++++++++++ .../domain/XzdCsContractSuspend.java | 122 ++++++ .../domain/bo/XzdCsContractChangeBo.java | 229 ++++++++++ .../domain/bo/XzdCsContractInformationBo.java | 272 ++++++++++++ .../domain/bo/XzdCsContractSuspendBo.java | 131 ++++++ .../domain/vo/XzdCsContractChangeVo.java | 275 ++++++++++++ .../domain/vo/XzdCsContractInformationVo.java | 327 ++++++++++++++ .../domain/vo/XzdCsContractSuspendVo.java | 148 +++++++ .../mapper/XzdCsContractChangeMapper.java | 15 + .../XzdCsContractInformationMapper.java | 15 + .../mapper/XzdCsContractSuspendMapper.java | 15 + .../service/IXzdCsContractChangeService.java | 70 +++ .../IXzdCsContractInformationService.java | 70 +++ .../service/IXzdCsContractSuspendService.java | 70 +++ .../impl/XzdCsContractChangeServiceImpl.java | 371 ++++++++++++++++ .../XzdCsContractInformationServiceImpl.java | 408 ++++++++++++++++++ .../impl/XzdCsContractSuspendServiceImpl.java | 210 +++++++++ .../xzd/domain/XzdSettlementRules.java | 2 +- .../org/dromara/xzd/enums/XzdClassEnum.java | 6 +- .../xzd/service/IXzdCorrespondentList.java | 2 + .../service/impl/XzdCorrespondentListImp.java | 6 + .../controller/XzdJsCgJinduController.java | 105 +++++ .../controller/XzdJsCgJungonController.java | 105 +++++ .../XzdJsCgJungonEditController.java | 105 +++++ .../XzdJsDeductionItemsController.java | 105 +++++ .../controller/XzdJsZhfwJinduController.java | 105 +++++ .../xzd/settlement/domain/XzdJsCgJindu.java | 163 +++++++ .../xzd/settlement/domain/XzdJsCgJungon.java | 143 ++++++ .../settlement/domain/XzdJsCgJungonEdit.java | 93 ++++ .../domain/XzdJsDeductionItems.java | 100 +++++ .../xzd/settlement/domain/XzdJsZhfwJindu.java | 158 +++++++ .../settlement/domain/bo/XzdJsCgJinduBo.java | 175 ++++++++ .../settlement/domain/bo/XzdJsCgJungonBo.java | 146 +++++++ .../domain/bo/XzdJsCgJungonEditBo.java | 98 +++++ .../domain/bo/XzdJsDeductionItemsBo.java | 103 +++++ .../domain/bo/XzdJsZhfwJinduBo.java | 161 +++++++ .../settlement/domain/vo/XzdJsCgJinduVo.java | 222 ++++++++++ .../domain/vo/XzdJsCgJungonEditVo.java | 118 +++++ .../settlement/domain/vo/XzdJsCgJungonVo.java | 190 ++++++++ .../domain/vo/XzdJsDeductionItemsVo.java | 126 ++++++ .../domain/vo/XzdJsZhfwJinduVo.java | 196 +++++++++ .../settlement/mapper/XzdJsCgJinduMapper.java | 15 + .../mapper/XzdJsCgJungonEditMapper.java | 15 + .../mapper/XzdJsCgJungonMapper.java | 15 + .../mapper/XzdJsDeductionItemsMapper.java | 15 + .../mapper/XzdJsZhfwJinduMapper.java | 15 + .../service/IXzdJsCgJinduService.java | 70 +++ .../service/IXzdJsCgJungonEditService.java | 70 +++ .../service/IXzdJsCgJungonService.java | 70 +++ .../service/IXzdJsDeductionItemsService.java | 70 +++ .../service/IXzdJsZhfwJinduService.java | 70 +++ .../service/impl/XzdJsCgJinduServiceImpl.java | 218 ++++++++++ .../impl/XzdJsCgJungonEditServiceImpl.java | 141 ++++++ .../impl/XzdJsCgJungonServiceImpl.java | 151 +++++++ .../impl/XzdJsDeductionItemsServiceImpl.java | 139 ++++++ .../impl/XzdJsZhfwJinduServiceImpl.java | 154 +++++++ .../XzdCsContractChangeMapper.xml | 7 + .../XzdCsContractInformationMapper.xml | 7 + .../XzdCsContractSuspendMapper.xml | 7 + .../xzd/settlement/XzdJsCgJinduMapper.xml | 7 + .../settlement/XzdJsCgJungonEditMapper.xml | 7 + .../xzd/settlement/XzdJsCgJungonMapper.xml | 7 + .../settlement/XzdJsDeductionItemsMapper.xml | 7 + .../xzd/settlement/XzdJsZhfwJinduMapper.xml | 7 + 68 files changed, 7534 insertions(+), 2 deletions(-) create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/controller/XzdCsContractChangeController.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/controller/XzdCsContractInformationController.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/controller/XzdCsContractSuspendController.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/XzdCsContractChange.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/XzdCsContractInformation.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/XzdCsContractSuspend.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/bo/XzdCsContractChangeBo.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/bo/XzdCsContractInformationBo.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/bo/XzdCsContractSuspendBo.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdCsContractChangeVo.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdCsContractInformationVo.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdCsContractSuspendVo.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/mapper/XzdCsContractChangeMapper.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/mapper/XzdCsContractInformationMapper.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/mapper/XzdCsContractSuspendMapper.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/IXzdCsContractChangeService.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/IXzdCsContractInformationService.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/IXzdCsContractSuspendService.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/impl/XzdCsContractChangeServiceImpl.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/impl/XzdCsContractInformationServiceImpl.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/impl/XzdCsContractSuspendServiceImpl.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsCgJinduController.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsCgJungonController.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsCgJungonEditController.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsDeductionItemsController.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsZhfwJinduController.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsCgJindu.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsCgJungon.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsCgJungonEdit.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsDeductionItems.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsZhfwJindu.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsCgJinduBo.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsCgJungonBo.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsCgJungonEditBo.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsDeductionItemsBo.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsZhfwJinduBo.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsCgJinduVo.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsCgJungonEditVo.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsCgJungonVo.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsDeductionItemsVo.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsZhfwJinduVo.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/mapper/XzdJsCgJinduMapper.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/mapper/XzdJsCgJungonEditMapper.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/mapper/XzdJsCgJungonMapper.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/mapper/XzdJsDeductionItemsMapper.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/mapper/XzdJsZhfwJinduMapper.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/IXzdJsCgJinduService.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/IXzdJsCgJungonEditService.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/IXzdJsCgJungonService.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/IXzdJsDeductionItemsService.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/IXzdJsZhfwJinduService.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsCgJinduServiceImpl.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsCgJungonEditServiceImpl.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsCgJungonServiceImpl.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsDeductionItemsServiceImpl.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsZhfwJinduServiceImpl.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/comprehensive/XzdCsContractChangeMapper.xml create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/comprehensive/XzdCsContractInformationMapper.xml create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/comprehensive/XzdCsContractSuspendMapper.xml create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/settlement/XzdJsCgJinduMapper.xml create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/settlement/XzdJsCgJungonEditMapper.xml create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/settlement/XzdJsCgJungonMapper.xml create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/settlement/XzdJsDeductionItemsMapper.xml create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/settlement/XzdJsZhfwJinduMapper.xml diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/controller/XzdCsContractChangeController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/controller/XzdCsContractChangeController.java new file mode 100644 index 00000000..07028f51 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/controller/XzdCsContractChangeController.java @@ -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 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 list = xzdCsContractChangeService.queryList(bo); + ExcelUtil.exportExcel(list, "综合服务合同变更", XzdCsContractChangeVo.class, response); + } + + /** + * 获取综合服务合同变更详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("comprehensive:csContractChange:query") + @GetMapping("/{id}") + public R 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 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 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 remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(xzdCsContractChangeService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/controller/XzdCsContractInformationController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/controller/XzdCsContractInformationController.java new file mode 100644 index 00000000..fb5e1584 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/controller/XzdCsContractInformationController.java @@ -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 list(XzdCsContractInformationBo bo, PageQuery pageQuery) { + return xzdCsContractInformationService.queryPageList(bo, pageQuery); + } + + /** + * 查询综合服务合同信息列表 + */ + @SaCheckPermission("comprehensive:csContractInformation:getList") + @GetMapping("/getList") + public TableDataInfo 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 list = xzdCsContractInformationService.queryList(bo); + ExcelUtil.exportExcel(list, "综合服务合同信息", XzdCsContractInformationVo.class, response); + } + + /** + * 获取综合服务合同信息详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("comprehensive:csContractInformation:query") + @GetMapping("/{id}") + public R 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 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 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 remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(xzdCsContractInformationService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/controller/XzdCsContractSuspendController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/controller/XzdCsContractSuspendController.java new file mode 100644 index 00000000..7acb3cbc --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/controller/XzdCsContractSuspendController.java @@ -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 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 list = xzdCsContractSuspendService.queryList(bo); + ExcelUtil.exportExcel(list, "综合服务合同终止", XzdCsContractSuspendVo.class, response); + } + + /** + * 获取综合服务合同终止详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("comprehensive:csContractSuspend:query") + @GetMapping("/{id}") + public R 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 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 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 remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(xzdCsContractSuspendService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/XzdCsContractChange.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/XzdCsContractChange.java new file mode 100644 index 00000000..1172fe96 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/XzdCsContractChange.java @@ -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; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/XzdCsContractInformation.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/XzdCsContractInformation.java new file mode 100644 index 00000000..66b528e6 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/XzdCsContractInformation.java @@ -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; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/XzdCsContractSuspend.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/XzdCsContractSuspend.java new file mode 100644 index 00000000..d5e03f06 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/XzdCsContractSuspend.java @@ -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; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/bo/XzdCsContractChangeBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/bo/XzdCsContractChangeBo.java new file mode 100644 index 00000000..470ec51d --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/bo/XzdCsContractChangeBo.java @@ -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 kkyjlx; + + /** + * 合同条款 + */ + private List httk; + + /** + * 支付条款 + */ + private List zftk; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/bo/XzdCsContractInformationBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/bo/XzdCsContractInformationBo.java new file mode 100644 index 00000000..84c25f2b --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/bo/XzdCsContractInformationBo.java @@ -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 kkyjlx; + + /** + * 合同条款 + */ + private List httk; + + /** + * 支付条款 + */ + private List zftk; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/bo/XzdCsContractSuspendBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/bo/XzdCsContractSuspendBo.java new file mode 100644 index 00000000..55607b5f --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/bo/XzdCsContractSuspendBo.java @@ -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; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdCsContractChangeVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdCsContractChangeVo.java new file mode 100644 index 00000000..9c24fdb6 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdCsContractChangeVo.java @@ -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 kkyjlx; + + /** + * 合同条款 + */ + private List httk; + + /** + * 支付条款 + */ + private List zftk; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdCsContractInformationVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdCsContractInformationVo.java new file mode 100644 index 00000000..854e9ef7 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdCsContractInformationVo.java @@ -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 kkyjlx; + + /** + * 合同条款 + */ + private List httk; + + /** + * 支付条款 + */ + private List zftk; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdCsContractSuspendVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdCsContractSuspendVo.java new file mode 100644 index 00000000..6de4b5ec --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdCsContractSuspendVo.java @@ -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; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/mapper/XzdCsContractChangeMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/mapper/XzdCsContractChangeMapper.java new file mode 100644 index 00000000..fa9cf236 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/mapper/XzdCsContractChangeMapper.java @@ -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 { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/mapper/XzdCsContractInformationMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/mapper/XzdCsContractInformationMapper.java new file mode 100644 index 00000000..29186e08 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/mapper/XzdCsContractInformationMapper.java @@ -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 { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/mapper/XzdCsContractSuspendMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/mapper/XzdCsContractSuspendMapper.java new file mode 100644 index 00000000..8c1af2c4 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/mapper/XzdCsContractSuspendMapper.java @@ -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 { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/IXzdCsContractChangeService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/IXzdCsContractChangeService.java new file mode 100644 index 00000000..38c382f9 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/IXzdCsContractChangeService.java @@ -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{ + + /** + * 查询综合服务合同变更 + * + * @param id 主键 + * @return 综合服务合同变更 + */ + XzdCsContractChangeVo queryById(Long id); + + /** + * 分页查询综合服务合同变更列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 综合服务合同变更分页列表 + */ + TableDataInfo queryPageList(XzdCsContractChangeBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的综合服务合同变更列表 + * + * @param bo 查询条件 + * @return 综合服务合同变更列表 + */ + List 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 ids, Boolean isValid); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/IXzdCsContractInformationService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/IXzdCsContractInformationService.java new file mode 100644 index 00000000..92f39a31 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/IXzdCsContractInformationService.java @@ -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{ + + /** + * 查询综合服务合同信息 + * + * @param id 主键 + * @return 综合服务合同信息 + */ + XzdCsContractInformationVo queryById(Long id); + + /** + * 分页查询综合服务合同信息列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 综合服务合同信息分页列表 + */ + TableDataInfo queryPageList(XzdCsContractInformationBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的综合服务合同信息列表 + * + * @param bo 查询条件 + * @return 综合服务合同信息列表 + */ + List 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 ids, Boolean isValid); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/IXzdCsContractSuspendService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/IXzdCsContractSuspendService.java new file mode 100644 index 00000000..cc27dfe9 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/IXzdCsContractSuspendService.java @@ -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{ + + /** + * 查询综合服务合同终止 + * + * @param id 主键 + * @return 综合服务合同终止 + */ + XzdCsContractSuspendVo queryById(Long id); + + /** + * 分页查询综合服务合同终止列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 综合服务合同终止分页列表 + */ + TableDataInfo queryPageList(XzdCsContractSuspendBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的综合服务合同终止列表 + * + * @param bo 查询条件 + * @return 综合服务合同终止列表 + */ + List 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 ids, Boolean isValid); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/impl/XzdCsContractChangeServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/impl/XzdCsContractChangeServiceImpl.java new file mode 100644 index 00000000..5ee34a13 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/impl/XzdCsContractChangeServiceImpl.java @@ -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 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 queryPageList(XzdCsContractChangeBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + result.getRecords().forEach(this::getName); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的综合服务合同变更列表 + * + * @param bo 查询条件 + * @return 综合服务合同变更列表 + */ + @Override + public List queryList(XzdCsContractChangeBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(XzdCsContractChangeBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper 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 lambdaQueryWrapper2 = new LambdaQueryWrapper<>(); + lambdaQueryWrapper2.eq(XzdContractClause::getContractDetailsId, old.getId()); + xzdContractClauseService.remove(lambdaQueryWrapper2); + + + //支付条款 + LambdaQueryWrapper lambdaQueryWrapper3 = new LambdaQueryWrapper<>(); + lambdaQueryWrapper3.eq(XzdSettlementRules::getContractDetailsId, old.getId()); + xzdSettlementRulesService.remove(lambdaQueryWrapper3); + + + //合同条款-扣款与奖励项 + LambdaQueryWrapper 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 ids, Boolean isValid) { + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + List deleteIds = new ArrayList<>(); + for (Long id : ids) { + XzdCsContractChangeVo vo = baseMapper.selectVoById(id); + if (vo != null){ + //删除附件 + if (vo.getFileId()!= null && !vo.getFileId().isEmpty()){ + List list = Arrays.stream(vo.getFileId().split(",")).map(Long::valueOf).toList(); + deleteIds.addAll(list); + } + } + } + if (!deleteIds.isEmpty()) { + sysOssService.deleteWithValidByIds(deleteIds, false); + } + //合同条款-扣款与奖励项 + LambdaQueryWrapper lambdaQueryWrapper1 = new LambdaQueryWrapper<>(); + lambdaQueryWrapper1.in(XzdDeductionItems::getContractDetailsId, ids); + xzdDeductionItemsService.remove(lambdaQueryWrapper1); + + //合同条款-合同条款 + LambdaQueryWrapper lambdaQueryWrapper2 = new LambdaQueryWrapper<>(); + lambdaQueryWrapper2.in(XzdContractClause::getContractDetailsId, ids); + xzdContractClauseService.remove(lambdaQueryWrapper2); + + //支付条款 + LambdaQueryWrapper 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 lambdaQueryWrapper1 = new LambdaQueryWrapper<>(); + lambdaQueryWrapper1.eq(XzdDeductionItems::getContractDetailsId, vo.getId()); + List list = xzdDeductionItemsService.list(lambdaQueryWrapper1); + vo.setKkyjlx(list); + + //合同条款-合同条款 + LambdaQueryWrapper lambdaQueryWrapper2 = new LambdaQueryWrapper<>(); + lambdaQueryWrapper2.eq(XzdContractClause::getContractDetailsId, vo.getId()); + List list1 = xzdContractClauseService.list(lambdaQueryWrapper2); + vo.setHttk(list1); + + //支付条款 + LambdaQueryWrapper lambdaQueryWrapper3 = new LambdaQueryWrapper<>(); + lambdaQueryWrapper3.eq(XzdSettlementRules::getContractDetailsId, vo.getId()); + List list2 = xzdSettlementRulesService.list(lambdaQueryWrapper3); + vo.setZftk(list2); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/impl/XzdCsContractInformationServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/impl/XzdCsContractInformationServiceImpl.java new file mode 100644 index 00000000..f03b074d --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/impl/XzdCsContractInformationServiceImpl.java @@ -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 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 lambdaQueryWrapper1 = new LambdaQueryWrapper<>(); + lambdaQueryWrapper1.eq(XzdDeductionItems::getContractDetailsId, vo.getId()); + List list = xzdDeductionItemsService.list(lambdaQueryWrapper1); + vo.setKkyjlx(list); + + //合同条款-合同条款 + LambdaQueryWrapper lambdaQueryWrapper2 = new LambdaQueryWrapper<>(); + lambdaQueryWrapper2.eq(XzdContractClause::getContractDetailsId, vo.getId()); + List list1 = xzdContractClauseService.list(lambdaQueryWrapper2); + vo.setHttk(list1); + + //支付条款 + LambdaQueryWrapper lambdaQueryWrapper3 = new LambdaQueryWrapper<>(); + lambdaQueryWrapper3.eq(XzdSettlementRules::getContractDetailsId, vo.getId()); + List list2 = xzdSettlementRulesService.list(lambdaQueryWrapper3); + vo.setZftk(list2); + } + + /** + * 分页查询综合服务合同信息列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 综合服务合同信息分页列表 + */ + @Override + public TableDataInfo queryPageList(XzdCsContractInformationBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page 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 queryList(XzdCsContractInformationBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(XzdCsContractInformationBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper 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 lambdaQueryWrapper2 = new LambdaQueryWrapper<>(); + lambdaQueryWrapper2.eq(XzdContractClause::getContractDetailsId, old.getId()); + xzdContractClauseService.remove(lambdaQueryWrapper2); + + + //支付条款 + LambdaQueryWrapper lambdaQueryWrapper3 = new LambdaQueryWrapper<>(); + lambdaQueryWrapper3.eq(XzdSettlementRules::getContractDetailsId, old.getId()); + xzdSettlementRulesService.remove(lambdaQueryWrapper3); + + + //合同条款-扣款与奖励项 + LambdaQueryWrapper 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 ids, Boolean isValid) { + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + List deleteIds = new ArrayList<>(); + for (Long id : ids) { + XzdCsContractInformationVo vo = baseMapper.selectVoById(id); + if (vo != null){ + //删除附件 + if (vo.getFileId()!= null && !vo.getFileId().isEmpty()){ + List list = Arrays.stream(vo.getFileId().split(",")).map(Long::valueOf).toList(); + deleteIds.addAll(list); + } + } + } + if (!deleteIds.isEmpty()) { + sysOssService.deleteWithValidByIds(deleteIds, false); + } + //合同条款-扣款与奖励项 + LambdaQueryWrapper lambdaQueryWrapper1 = new LambdaQueryWrapper<>(); + lambdaQueryWrapper1.in(XzdDeductionItems::getContractDetailsId, ids); + xzdDeductionItemsService.remove(lambdaQueryWrapper1); + + //合同条款-合同条款 + LambdaQueryWrapper lambdaQueryWrapper2 = new LambdaQueryWrapper<>(); + lambdaQueryWrapper2.in(XzdContractClause::getContractDetailsId, ids); + xzdContractClauseService.remove(lambdaQueryWrapper2); + + //支付条款 + LambdaQueryWrapper lambdaQueryWrapper3 = new LambdaQueryWrapper<>(); + lambdaQueryWrapper3.in(XzdSettlementRules::getContractDetailsId, ids); + xzdSettlementRulesService.remove(lambdaQueryWrapper3); + return baseMapper.deleteByIds(ids) > 0; + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/impl/XzdCsContractSuspendServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/impl/XzdCsContractSuspendServiceImpl.java new file mode 100644 index 00000000..832b5f7a --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/impl/XzdCsContractSuspendServiceImpl.java @@ -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 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 queryPageList(XzdCsContractSuspendBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + result.getRecords().forEach(this::getName); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的综合服务合同终止列表 + * + * @param bo 查询条件 + * @return 综合服务合同终止列表 + */ + @Override + public List queryList(XzdCsContractSuspendBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(XzdCsContractSuspendBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper 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 ids, Boolean isValid) { + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + List deleteIds = new ArrayList<>(); + for (Long id : ids) { + XzdCsContractSuspendVo vo = baseMapper.selectVoById(id); + if (vo != null){ + //删除附件 + if (vo.getFileId()!= null && !vo.getFileId().isEmpty()){ + List 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); + } + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdSettlementRules.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdSettlementRules.java index c7d15738..25309776 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdSettlementRules.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdSettlementRules.java @@ -22,7 +22,7 @@ public class XzdSettlementRules extends BaseEntity { private static final long serialVersionUID = 1L; /** - * + * */ @TableId(value = "id") private Long id; diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/enums/XzdClassEnum.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/enums/XzdClassEnum.java index 98308b5b..0f10ab65 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/enums/XzdClassEnum.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/enums/XzdClassEnum.java @@ -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"), // 采购变更合同 diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/IXzdCorrespondentList.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/IXzdCorrespondentList.java index 50ddb835..4064b1fb 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/IXzdCorrespondentList.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/IXzdCorrespondentList.java @@ -24,4 +24,6 @@ public interface IXzdCorrespondentList { R putCorrespondent(AddCorrespondentDto dto); R getCustomerByid(Long id); + + String queryNameById(Long partyAUnit); } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/impl/XzdCorrespondentListImp.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/impl/XzdCorrespondentListImp.java index d7b5d75f..c28bc35e 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/impl/XzdCorrespondentListImp.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/impl/XzdCorrespondentListImp.java @@ -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){ // 客户信息 diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsCgJinduController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsCgJinduController.java new file mode 100644 index 00000000..c3e34322 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsCgJinduController.java @@ -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 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 list = xzdJsCgJinduService.queryList(bo); + ExcelUtil.exportExcel(list, "采购合同进度结算", XzdJsCgJinduVo.class, response); + } + + /** + * 获取采购合同进度结算详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("settlement:jsCgJindu:query") + @GetMapping("/{id}") + public R 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 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 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 remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(xzdJsCgJinduService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsCgJungonController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsCgJungonController.java new file mode 100644 index 00000000..3b8a98fa --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsCgJungonController.java @@ -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 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 list = xzdJsCgJungonService.queryList(bo); + ExcelUtil.exportExcel(list, "采购合同竣工结算", XzdJsCgJungonVo.class, response); + } + + /** + * 获取采购合同竣工结算详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("settlement:jsCgJungon:query") + @GetMapping("/{id}") + public R 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 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 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 remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(xzdJsCgJungonService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsCgJungonEditController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsCgJungonEditController.java new file mode 100644 index 00000000..2bd5a708 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsCgJungonEditController.java @@ -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 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 list = xzdJsCgJungonEditService.queryList(bo); + ExcelUtil.exportExcel(list, "采购合同竣工结算调整", XzdJsCgJungonEditVo.class, response); + } + + /** + * 获取采购合同竣工结算调整详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("settlement:jsCgJungonEdit:query") + @GetMapping("/{id}") + public R 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 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 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 remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(xzdJsCgJungonEditService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsDeductionItemsController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsDeductionItemsController.java new file mode 100644 index 00000000..cfe5c41a --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsDeductionItemsController.java @@ -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 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 list = xzdJsDeductionItemsService.queryList(bo); + ExcelUtil.exportExcel(list, "结算-扣款与奖励项", XzdJsDeductionItemsVo.class, response); + } + + /** + * 获取结算-扣款与奖励项详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("settlement:jsDeductionItems:query") + @GetMapping("/{id}") + public R 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 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 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 remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(xzdJsDeductionItemsService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsZhfwJinduController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsZhfwJinduController.java new file mode 100644 index 00000000..120ea8bf --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsZhfwJinduController.java @@ -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 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 list = xzdJsZhfwJinduService.queryList(bo); + ExcelUtil.exportExcel(list, "综合服务合同进度结算", XzdJsZhfwJinduVo.class, response); + } + + /** + * 获取综合服务合同进度结算详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("settlement:jsZhfwJindu:query") + @GetMapping("/{id}") + public R 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 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 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 remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(xzdJsZhfwJinduService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsCgJindu.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsCgJindu.java new file mode 100644 index 00000000..72a89838 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsCgJindu.java @@ -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; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsCgJungon.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsCgJungon.java new file mode 100644 index 00000000..594cbe9a --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsCgJungon.java @@ -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; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsCgJungonEdit.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsCgJungonEdit.java new file mode 100644 index 00000000..5a08b92d --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsCgJungonEdit.java @@ -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; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsDeductionItems.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsDeductionItems.java new file mode 100644 index 00000000..ca0efcbc --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsDeductionItems.java @@ -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; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsZhfwJindu.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsZhfwJindu.java new file mode 100644 index 00000000..4ef772f3 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsZhfwJindu.java @@ -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; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsCgJinduBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsCgJinduBo.java new file mode 100644 index 00000000..4a028a1b --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsCgJinduBo.java @@ -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 kkyjlx; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsCgJungonBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsCgJungonBo.java new file mode 100644 index 00000000..b092d629 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsCgJungonBo.java @@ -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; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsCgJungonEditBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsCgJungonEditBo.java new file mode 100644 index 00000000..595eca8d --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsCgJungonEditBo.java @@ -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; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsDeductionItemsBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsDeductionItemsBo.java new file mode 100644 index 00000000..7a7a2832 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsDeductionItemsBo.java @@ -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; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsZhfwJinduBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsZhfwJinduBo.java new file mode 100644 index 00000000..5be284fc --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsZhfwJinduBo.java @@ -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; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsCgJinduVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsCgJinduVo.java new file mode 100644 index 00000000..0e0a1712 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsCgJinduVo.java @@ -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; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsCgJungonEditVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsCgJungonEditVo.java new file mode 100644 index 00000000..c15d1b93 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsCgJungonEditVo.java @@ -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; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsCgJungonVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsCgJungonVo.java new file mode 100644 index 00000000..03c74884 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsCgJungonVo.java @@ -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; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsDeductionItemsVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsDeductionItemsVo.java new file mode 100644 index 00000000..377590e1 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsDeductionItemsVo.java @@ -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; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsZhfwJinduVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsZhfwJinduVo.java new file mode 100644 index 00000000..dce075ff --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsZhfwJinduVo.java @@ -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; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/mapper/XzdJsCgJinduMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/mapper/XzdJsCgJinduMapper.java new file mode 100644 index 00000000..ca8cfc19 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/mapper/XzdJsCgJinduMapper.java @@ -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 { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/mapper/XzdJsCgJungonEditMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/mapper/XzdJsCgJungonEditMapper.java new file mode 100644 index 00000000..c15d5cb7 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/mapper/XzdJsCgJungonEditMapper.java @@ -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 { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/mapper/XzdJsCgJungonMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/mapper/XzdJsCgJungonMapper.java new file mode 100644 index 00000000..10b63c6d --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/mapper/XzdJsCgJungonMapper.java @@ -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 { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/mapper/XzdJsDeductionItemsMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/mapper/XzdJsDeductionItemsMapper.java new file mode 100644 index 00000000..2188aecb --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/mapper/XzdJsDeductionItemsMapper.java @@ -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 { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/mapper/XzdJsZhfwJinduMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/mapper/XzdJsZhfwJinduMapper.java new file mode 100644 index 00000000..9914ca48 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/mapper/XzdJsZhfwJinduMapper.java @@ -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 { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/IXzdJsCgJinduService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/IXzdJsCgJinduService.java new file mode 100644 index 00000000..8e8f64d1 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/IXzdJsCgJinduService.java @@ -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{ + + /** + * 查询采购合同进度结算 + * + * @param id 主键 + * @return 采购合同进度结算 + */ + XzdJsCgJinduVo queryById(Long id); + + /** + * 分页查询采购合同进度结算列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 采购合同进度结算分页列表 + */ + TableDataInfo queryPageList(XzdJsCgJinduBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的采购合同进度结算列表 + * + * @param bo 查询条件 + * @return 采购合同进度结算列表 + */ + List 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 ids, Boolean isValid); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/IXzdJsCgJungonEditService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/IXzdJsCgJungonEditService.java new file mode 100644 index 00000000..3ca418e1 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/IXzdJsCgJungonEditService.java @@ -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{ + + /** + * 查询采购合同竣工结算调整 + * + * @param id 主键 + * @return 采购合同竣工结算调整 + */ + XzdJsCgJungonEditVo queryById(Long id); + + /** + * 分页查询采购合同竣工结算调整列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 采购合同竣工结算调整分页列表 + */ + TableDataInfo queryPageList(XzdJsCgJungonEditBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的采购合同竣工结算调整列表 + * + * @param bo 查询条件 + * @return 采购合同竣工结算调整列表 + */ + List 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 ids, Boolean isValid); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/IXzdJsCgJungonService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/IXzdJsCgJungonService.java new file mode 100644 index 00000000..fc1b0214 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/IXzdJsCgJungonService.java @@ -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{ + + /** + * 查询采购合同竣工结算 + * + * @param id 主键 + * @return 采购合同竣工结算 + */ + XzdJsCgJungonVo queryById(Long id); + + /** + * 分页查询采购合同竣工结算列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 采购合同竣工结算分页列表 + */ + TableDataInfo queryPageList(XzdJsCgJungonBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的采购合同竣工结算列表 + * + * @param bo 查询条件 + * @return 采购合同竣工结算列表 + */ + List 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 ids, Boolean isValid); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/IXzdJsDeductionItemsService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/IXzdJsDeductionItemsService.java new file mode 100644 index 00000000..208aa2fa --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/IXzdJsDeductionItemsService.java @@ -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{ + + /** + * 查询结算-扣款与奖励项 + * + * @param id 主键 + * @return 结算-扣款与奖励项 + */ + XzdJsDeductionItemsVo queryById(Long id); + + /** + * 分页查询结算-扣款与奖励项列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 结算-扣款与奖励项分页列表 + */ + TableDataInfo queryPageList(XzdJsDeductionItemsBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的结算-扣款与奖励项列表 + * + * @param bo 查询条件 + * @return 结算-扣款与奖励项列表 + */ + List 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 ids, Boolean isValid); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/IXzdJsZhfwJinduService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/IXzdJsZhfwJinduService.java new file mode 100644 index 00000000..0b1313b5 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/IXzdJsZhfwJinduService.java @@ -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{ + + /** + * 查询综合服务合同进度结算 + * + * @param id 主键 + * @return 综合服务合同进度结算 + */ + XzdJsZhfwJinduVo queryById(Long id); + + /** + * 分页查询综合服务合同进度结算列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 综合服务合同进度结算分页列表 + */ + TableDataInfo queryPageList(XzdJsZhfwJinduBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的综合服务合同进度结算列表 + * + * @param bo 查询条件 + * @return 综合服务合同进度结算列表 + */ + List 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 ids, Boolean isValid); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsCgJinduServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsCgJinduServiceImpl.java new file mode 100644 index 00000000..fa55e401 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsCgJinduServiceImpl.java @@ -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 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 queryPageList(XzdJsCgJinduBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + result.getRecords().forEach(this::getName); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的采购合同进度结算列表 + * + * @param bo 查询条件 + * @return 采购合同进度结算列表 + */ + @Override + public List queryList(XzdJsCgJinduBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + List xzdJsCgJinduVos = baseMapper.selectVoList(lqw); + xzdJsCgJinduVos.forEach(this::getName); + return xzdJsCgJinduVos; + } + + private LambdaQueryWrapper buildQueryWrapper(XzdJsCgJinduBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper 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 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 dtoR = iXzdCorrespondentList.getCustomerByid(item.getSettlementUnit()); + if (dtoR!=null){ + if (dtoR.getData().getXzdCustomerinformation() != null){ + item.setSettlementUnitName(dtoR.getData().getXzdCustomerinformation().getUnitName()); + } + } + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsCgJungonEditServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsCgJungonEditServiceImpl.java new file mode 100644 index 00000000..c0a1d14c --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsCgJungonEditServiceImpl.java @@ -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 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 queryPageList(XzdJsCgJungonEditBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的采购合同竣工结算调整列表 + * + * @param bo 查询条件 + * @return 采购合同竣工结算调整列表 + */ + @Override + public List queryList(XzdJsCgJungonEditBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(XzdJsCgJungonEditBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper 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 ids, Boolean isValid) { + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsCgJungonServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsCgJungonServiceImpl.java new file mode 100644 index 00000000..71360c22 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsCgJungonServiceImpl.java @@ -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 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 queryPageList(XzdJsCgJungonBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的采购合同竣工结算列表 + * + * @param bo 查询条件 + * @return 采购合同竣工结算列表 + */ + @Override + public List queryList(XzdJsCgJungonBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(XzdJsCgJungonBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper 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 ids, Boolean isValid) { + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsDeductionItemsServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsDeductionItemsServiceImpl.java new file mode 100644 index 00000000..0148c7d7 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsDeductionItemsServiceImpl.java @@ -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 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 queryPageList(XzdJsDeductionItemsBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的结算-扣款与奖励项列表 + * + * @param bo 查询条件 + * @return 结算-扣款与奖励项列表 + */ + @Override + public List queryList(XzdJsDeductionItemsBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(XzdJsDeductionItemsBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper 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 ids, Boolean isValid) { + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsZhfwJinduServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsZhfwJinduServiceImpl.java new file mode 100644 index 00000000..168fdd5b --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsZhfwJinduServiceImpl.java @@ -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 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 queryPageList(XzdJsZhfwJinduBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的综合服务合同进度结算列表 + * + * @param bo 查询条件 + * @return 综合服务合同进度结算列表 + */ + @Override + public List queryList(XzdJsZhfwJinduBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(XzdJsZhfwJinduBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper 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 ids, Boolean isValid) { + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/comprehensive/XzdCsContractChangeMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/comprehensive/XzdCsContractChangeMapper.xml new file mode 100644 index 00000000..014b2360 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/comprehensive/XzdCsContractChangeMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/comprehensive/XzdCsContractInformationMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/comprehensive/XzdCsContractInformationMapper.xml new file mode 100644 index 00000000..66fd2450 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/comprehensive/XzdCsContractInformationMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/comprehensive/XzdCsContractSuspendMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/comprehensive/XzdCsContractSuspendMapper.xml new file mode 100644 index 00000000..5768b88f --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/comprehensive/XzdCsContractSuspendMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/settlement/XzdJsCgJinduMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/settlement/XzdJsCgJinduMapper.xml new file mode 100644 index 00000000..d8048367 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/settlement/XzdJsCgJinduMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/settlement/XzdJsCgJungonEditMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/settlement/XzdJsCgJungonEditMapper.xml new file mode 100644 index 00000000..55823737 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/settlement/XzdJsCgJungonEditMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/settlement/XzdJsCgJungonMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/settlement/XzdJsCgJungonMapper.xml new file mode 100644 index 00000000..1c87be4f --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/settlement/XzdJsCgJungonMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/settlement/XzdJsDeductionItemsMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/settlement/XzdJsDeductionItemsMapper.xml new file mode 100644 index 00000000..726b1e19 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/settlement/XzdJsDeductionItemsMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/settlement/XzdJsZhfwJinduMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/settlement/XzdJsZhfwJinduMapper.xml new file mode 100644 index 00000000..aa97b566 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/settlement/XzdJsZhfwJinduMapper.xml @@ -0,0 +1,7 @@ + + + + + From db3af72d5fad9a85424562d49649e2752df49eba Mon Sep 17 00:00:00 2001 From: zt Date: Wed, 15 Oct 2025 10:49:45 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xinnengyuan/ruoyi-modules/ruoyi-system/pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/pom.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/pom.xml index cb857252..19bd2db8 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/pom.xml +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/pom.xml @@ -28,6 +28,12 @@ org.springframework.boot spring-boot-starter-websocket + + + org.springframework.boot + spring-boot-starter-tomcat + +