Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
2025-10-24 22:16:13 +08:00
105 changed files with 1493 additions and 56 deletions

View File

@ -1,9 +1,17 @@
package org.dromara.test;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import jakarta.annotation.Resource;
import org.dromara.common.core.utils.MapstructUtils;
import org.dromara.safety.domain.dto.violationrecord.HseViolationRecordCreateDto;
import org.dromara.safety.service.IHseViolationRecordService;
import org.dromara.system.domain.SysMenu;
import org.dromara.system.domain.vo.SysMenuVo;
import org.dromara.system.mapper.SysMenuMapper;
import org.dromara.system.service.ISysMenuService;
import org.hamcrest.core.Is;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import java.util.ArrayList;
@ -20,6 +28,9 @@ public class ViolationRecordTest {
@Resource
private IHseViolationRecordService violationRecordService;
@Autowired
private SysMenuMapper sysMenuMapper;
@Test
void test() {
List<HseViolationRecordCreateDto> list = new ArrayList<>();
@ -55,4 +66,26 @@ public class ViolationRecordTest {
list.add(dto5);
violationRecordService.insertByMonitor(list);
}
@Test
void contextLoads() {
SysMenuVo sysMenuVo = sysMenusByList(1972500768346673154L);
System.out.println(sysMenuVo.toString());
}
SysMenuVo sysMenusByList(Long id) {
SysMenuVo sysMenus = new SysMenuVo();
List<SysMenu> res = sysMenuMapper.selectList(new LambdaQueryWrapper<SysMenu>().eq(SysMenu::getParentId, id));
if (res != null && res.size() > 0 ) {
sysMenus.setChildren(MapstructUtils.convert(res, SysMenuVo.class));
res.forEach(sysMenu -> {
sysMenusByList(sysMenu.getMenuId());
});
}
return sysMenus;
}
}

View File

@ -1,12 +1,21 @@
package org.dromara.common.utils;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.dromara.common.core.utils.MessageUtils;
import org.dromara.common.sse.dto.SseMessageDto;
import org.dromara.common.sse.utils.SseMessageUtils;
import org.dromara.contractor.domain.SubConstructionUser;
import org.dromara.mobileAttendanceMachine.DeviceMessageSender;
import org.dromara.mobileAttendanceMachine.KqjEntity;
import org.dromara.project.domain.BusAttendanceMachine;
import org.dromara.project.service.IBusAttendanceMachineService;
import org.dromara.sms4j.api.SmsBlend;
import org.dromara.sms4j.api.entity.SmsResponse;
import org.dromara.sms4j.core.factory.SmsFactory;
import org.dromara.system.domain.vo.SysOssVo;
import org.dromara.system.service.ISysOssService;
import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
@ -17,6 +26,16 @@ import java.util.List;
@Slf4j
public class AsyncUtil {
@Resource
@Lazy
private DeviceMessageSender deviceMessageSender;
@Resource
@Lazy
private ISysOssService ossService;
@Resource
@Lazy
private IBusAttendanceMachineService attendanceMachineService;
//发送短信
@Async
public void sendSms(List<String> mobileList, String config) {
@ -39,4 +58,27 @@ public class AsyncUtil {
}
//下发考勤人员
@Async
public void sendPersonnel(Long teamId, SubConstructionUser constructionUser) {
SysOssVo byId = ossService.getById(Long.valueOf(constructionUser.getFacePic()));
List<BusAttendanceMachine> list = attendanceMachineService.lambdaQuery().apply("FIND_IN_SET({0}, teams)", teamId).list();
for (BusAttendanceMachine machine : list) {
deviceMessageSender.sendPersonnelInformation(machine.getSn(), constructionUser.getSysUserId().toString(), constructionUser.getUserName(), byId.getUrl());
}
}
//删除考勤人员
@Async
public void deletePersonnel(SubConstructionUser constructionUser) {
List<BusAttendanceMachine> list = attendanceMachineService.lambdaQuery().apply("FIND_IN_SET({0}, teams)", constructionUser.getTeamId()).list();
for (BusAttendanceMachine machine : list) {
try {
deviceMessageSender.deleteUser(machine.getSn(), constructionUser.getSysUserId().toString());
} catch (Exception e) {
log.error("删除考勤人员异常", e);
}
}
}
}

View File

@ -26,6 +26,7 @@ import org.dromara.common.oss.core.OssClient;
import org.dromara.common.oss.exception.OssException;
import org.dromara.common.oss.factory.OssFactory;
import org.dromara.common.satoken.utils.LoginHelper;
import org.dromara.common.utils.AsyncUtil;
import org.dromara.common.utils.IdCardEncryptorUtil;
import org.dromara.common.utils.baiduUtil.BaiDuFace;
import org.dromara.common.utils.baiduUtil.BaiDuOCR;
@ -46,6 +47,7 @@ import org.dromara.contractor.mapper.SubConstructionUserMapper;
import org.dromara.contractor.service.ISubConstructionUserFileService;
import org.dromara.contractor.service.ISubConstructionUserService;
import org.dromara.contractor.service.ISubContractorService;
import org.dromara.mobileAttendanceMachine.DeviceMessageSender;
import org.dromara.project.domain.*;
import org.dromara.project.domain.enums.BusAttendanceClockStatusEnum;
import org.dromara.project.domain.enums.BusAttendanceCommuterEnum;
@ -151,6 +153,11 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
@Resource
private ISysRoleService roleService;
@Resource
private AsyncUtil asyncUtil;
/**
* 查询施工人员
*
@ -290,6 +297,8 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
//强退
roleService.cleanOnlineUser(Collections.singletonList(constructionUser.getSysUserId()));
asyncUtil.sendPersonnel(dto.getTeamId(), constructionUser);
return i > 0;
}

View File

@ -2,10 +2,13 @@ package org.dromara.design.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import org.apache.poi.xwpf.usermodel.*;
import org.dromara.common.core.domain.R;
import org.dromara.common.excel.utils.ExcelUtil;
import org.dromara.common.idempotent.annotation.RepeatSubmit;
@ -13,18 +16,37 @@ import org.dromara.common.log.annotation.Log;
import org.dromara.common.log.enums.BusinessType;
import org.dromara.common.web.core.BaseController;
import org.dromara.design.domain.DesConstructionSchedulePlan;
import org.dromara.design.domain.DesUser;
import org.dromara.design.domain.dto.constructionscheduleplan.*;
import org.dromara.design.domain.vo.DesConstructionSchedulePlanVo;
import org.dromara.design.exportUtil.plan.AttachmentPersonnel;
import org.dromara.design.service.IDesConstructionSchedulePlanService;
import org.dromara.design.service.IDesUserService;
import org.dromara.system.domain.vo.SysDictDataVo;
import org.dromara.system.service.ISysDictDataService;
import org.dromara.system.service.ISysDictTypeService;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPPr;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTRow;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTcPr;
import org.springframework.core.io.ClassPathResource;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.util.List;
import java.io.*;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
/**
* 设计计划
*
@ -38,7 +60,10 @@ public class DesConstructionSchedulePlanController extends BaseController {
@Resource
private IDesConstructionSchedulePlanService desConstructionSchedulePlanService;
@Resource
private IDesUserService desUserService;
@Resource
private ISysDictTypeService dictTypeService;
/**
* 查询设计计划列表
*/
@ -150,4 +175,168 @@ public class DesConstructionSchedulePlanController extends BaseController {
desConstructionSchedulePlanService.exportSchedule(response,projectId);
}
private static final String TEMPLATE_RESOURCE_PATH = "template/CCCET-JL-CX-25设计计划表.docx";
// -------------------------- 2. 核心接口:修复单元格清空逻辑与数据填充 --------------------------
@PostMapping("/downloadWord")
public void fillCccetTemplate(Long projectId, HttpServletResponse response) {
// 1. 基础参数校验(避免空数据)
// 2. 读取resource中的模板+填充数据
try (
// 关键通过ClassPathResource读取resource/template下的模板
InputStream templateIs = new ClassPathResource(TEMPLATE_RESOURCE_PATH).getInputStream();
XWPFDocument doc = new XWPFDocument(templateIs); // 加载模板
OutputStream out = response.getOutputStream() // 响应流
) {
// --------------------------
// 步骤1填充第1页-主信息表索引0固定6列
// --------------------------
// XWPFTable mainTable = doc.getTables().get(0);
// // 工程名称第1行第0列
// if (mainTable.getRows().size() > 1 && mainTable.getRow(1).getCell(0) != null) {
// mainTable.getRow(1).getCell(0).setText(request.getProjectName() == null ? "" : request.getProjectName());
// }
// // 工程号第1行第1列
// if (mainTable.getRows().size() > 1 && mainTable.getRow(1).getCell(1) != null) {
// mainTable.getRow(1).getCell(1).setText(request.getProjectNo());
// }
// // 编制日期第2行第3列
// if (mainTable.getRows().size() > 2 && mainTable.getRow(2).getCell(3) != null) {
// mainTable.getRow(2).getCell(3).setText(request.getCompileDate() == null ? "" : request.getCompileDate());
// }
// // 编制人第3行第0列
// if (mainTable.getRows().size() > 3 && mainTable.getRow(3).getCell(0) != null) {
// mainTable.getRow(3).getCell(0).setText(request.getCompiler() == null ? "" : request.getCompiler());
// }
// // 批准人第3行第2列
// if (mainTable.getRows().size() > 3 && mainTable.getRow(3).getCell(2) != null) {
// mainTable.getRow(3).getCell(2).setText(request.getApprover() == null ? "" : request.getApprover());
// }
// // 设计阶段第3行第4列
// if (mainTable.getRows().size() > 3 && mainTable.getRow(3).getCell(4) != null) {
// mainTable.getRow(3).getCell(4).setText(request.getDesignStage() == null ? "" : request.getDesignStage());
// }
// // 设计规模第4行第0列
// if (mainTable.getRows().size() > 4 && mainTable.getRow(4).getCell(0) != null) {
// mainTable.getRow(4).getCell(0).setText(request.getDesignScale() == null ? "" : request.getDesignScale());
// }
// --------------------------
// 步骤2填充第3页-附件1人员配置表索引2固定11列
// --------------------------
XWPFTable staffTable = doc.getTables().get(2);
// 删除模板中附件1的空数据行保留第0行表头
while (staffTable.getRows().size() > 2) {
staffTable.removeRow(1);
}
List<AttachmentPersonnel> list = getPersonnelDataByProjectId(projectId);
for (AttachmentPersonnel staff : list) {
XWPFTableRow newRow = staffTable.createRow();
// 补全11列避免POI默认列数不足导致null
while (newRow.getTableCells().size() < 11) {
newRow.createCell();
}
// 按附件1列顺序填充
newRow.getCell(0).setText(staff.getProfessional() == null ? "" : staff.getProfessional());
newRow.getCell(1).setText(staff.getLeaderName() == null ? "" : staff.getLeaderName());
newRow.getCell(2).setText(staff.getLeaderTitle() == null ? "" : staff.getLeaderTitle());
newRow.getCell(3).setText(staff.getDesignerName() == null ? "" : staff.getDesignerName());
newRow.getCell(4).setText(staff.getDesignerTitle() == null ? "" : staff.getDesignerTitle());
newRow.getCell(5).setText(staff.getReviewerName() == null ? "" : staff.getReviewerName());
newRow.getCell(6).setText(staff.getReviewerTitle() == null ? "" : staff.getReviewerTitle());
newRow.getCell(7).setText(staff.getCheckerName() == null ? "" : staff.getCheckerName());
newRow.getCell(8).setText(staff.getCheckerTitle() == null ? "" : staff.getCheckerTitle());
newRow.getCell(9).setText(staff.getApproverName() == null ? "" : staff.getApproverName());
newRow.getCell(10).setText(staff.getApproverTitle() == null ? "" : staff.getApproverTitle());
}
// --------------------------
// 步骤3设置响应头触发前端下载
// --------------------------
response.setContentType("application/octet-stream");
// 文件名填充后_工程号_CCCET-JL-CX-25设计计划表.docx
String fileName = "CCCET-JL-CX-25设计计划表.docx";
response.setHeader("Content-Disposition",
"attachment;filename=" + URLEncoder.encode(fileName, StandardCharsets.UTF_8));
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); // 允许前端获取文件名
// --------------------------
// 步骤4写出文件到前端
// --------------------------
doc.write(out);
out.flush();
} catch (Exception e) {
// 异常封装(前端可捕获具体错误)
throw new RuntimeException("CCCET-JL-CX-25模板填充失败" + e.getMessage());
}
}
/**
* 根据projectId获取数据仅针对CCCET-JL-CX-25设计计划表.docx附件1
*/
private List<AttachmentPersonnel> getPersonnelDataByProjectId(Long projectId) {
// 模拟数据库查询实际项目替换为真实Service调用
List<DesUser> userList = desUserService.list(Wrappers.<DesUser>lambdaQuery()
.eq(DesUser::getProjectId, projectId)
);
if (userList.isEmpty()) {
return Collections.emptyList();
}
// 专业字典映射(编码→名称)
List<SysDictDataVo> majorDict = dictTypeService.selectDictDataByType("des_user_major");
Map<String, String> majorMap = majorDict.stream()
.collect(Collectors.toMap(SysDictDataVo::getDictValue, SysDictDataVo::getDictLabel));
// 按角色分组1-专业负责人2-设计人3-校审人4-审定人5-审核人)
DesUser leader = userList.stream().filter(u -> "1".equals(u.getUserType())).findFirst().orElse(null);
Map<String, List<DesUser>> designerMap = userList.stream()
.filter(u -> "2".equals(u.getUserType()))
.collect(Collectors.groupingBy(DesUser::getUserMajor));
Map<String, List<DesUser>> reviewerMap = userList.stream()
.filter(u -> "3".equals(u.getUserType()))
.collect(Collectors.groupingBy(DesUser::getUserMajor));
Map<String, List<DesUser>> checkerMap = userList.stream()
.filter(u -> "5".equals(u.getUserType()))
.collect(Collectors.groupingBy(DesUser::getUserMajor));
Map<String, List<DesUser>> approverMap = userList.stream()
.filter(u -> "4".equals(u.getUserType()))
.collect(Collectors.groupingBy(DesUser::getUserMajor));
// 构建附件1数据一个专业一行避免重复
List<AttachmentPersonnel> dataList = new ArrayList<>();
for (Map.Entry<String, List<DesUser>> entry : designerMap.entrySet()) {
String majorCode = entry.getKey();
String majorName = majorMap.getOrDefault(majorCode, majorCode);
List<DesUser> designers = entry.getValue();
// 获取对应专业的其他角色
DesUser reviewer = reviewerMap.getOrDefault(majorCode, Collections.emptyList()).stream().findFirst().orElse(null);
DesUser checker = checkerMap.getOrDefault(majorCode, Collections.emptyList()).stream().findFirst().orElse(null);
DesUser approver = approverMap.getOrDefault(majorCode, Collections.emptyList()).stream().findFirst().orElse(null);
// 封装数据(多个设计人用顿号分隔)
AttachmentPersonnel data = new AttachmentPersonnel();
data.setProfessional(majorName);
data.setLeaderName(leader != null ? leader.getUserName() : "");
//data.setLeadeTitle(leader != null ? leader.getUserTitle() : "");
data.setDesignerName(designers.stream().map(DesUser::getUserName).collect(Collectors.joining("")));
//data.setDesignerTitle(designers.stream().map(DesUser::getUserTitle).collect(Collectors.joining("、")));
data.setReviewerName(reviewer != null ? reviewer.getUserName() : "");
//data.setReviewerTitle(reviewer != null ? reviewer.getUserTitle() : "");
data.setCheckerName(checker != null ? checker.getUserName() : "");
//data.setCheckerTitle(checker != null ? checker.getUserTitle() : "");
data.setApproverName(approver != null ? approver.getUserName() : "");
//data.setApproverTitle(approver != null ? approver.getUserTitle() : "");
dataList.add(data);
}
return dataList;
}
}

View File

@ -2,6 +2,7 @@ package org.dromara.design.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.deepoove.poi.XWPFTemplate;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.constraints.NotEmpty;
@ -16,24 +17,36 @@ import org.dromara.common.log.enums.BusinessType;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.common.web.core.BaseController;
import org.dromara.design.domain.DesUser;
import org.dromara.design.domain.DesVolumeCatalog;
import org.dromara.design.domain.DesVolumeFile;
import org.dromara.design.domain.dto.designchange.DesDesignChangeCreateReq;
import org.dromara.design.domain.dto.designchange.DesDesignChangeQueryReq;
import org.dromara.design.domain.dto.designchange.DesDesignChangeUpdateReq;
import org.dromara.design.domain.dto.designchange.DesDesignExtendDetailDto;
import org.dromara.design.domain.dto.volumecatalog.DesVolumeCatalogQueryReq;
import org.dromara.design.domain.vo.designchange.DesDesignChangeVo;
import org.dromara.design.domain.vo.volumecatalog.DesVolumeCatalogVo;
import org.dromara.design.service.IDesDesignChangeService;
import org.dromara.design.service.IDesVolumeCatalogService;
import org.dromara.design.service.IDesVolumeFileService;
import org.dromara.project.domain.BusProject;
import org.dromara.system.domain.vo.SysOssVo;
import org.dromara.system.service.ISysDictDataService;
import org.dromara.system.service.ISysOssService;
import org.springframework.core.io.ClassPathResource;
import org.springframework.http.MediaType;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URLEncoder;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
@ -56,6 +69,9 @@ public class DesDesignChangeController extends BaseController {
@Resource
private IDesVolumeFileService desVolumeFileService;
@Resource
private ISysDictDataService dictDataService;
/**
* 查询设计变更管理列表
*/
@ -146,4 +162,92 @@ public class DesDesignChangeController extends BaseController {
return R.ok(list);
}
private static final String TEMPLATE_PATH = "template/设计更改通知单.docx";
@PostMapping("/downloadWord")
public void generateDesignLeaderDoc(Long id, HttpServletResponse response) {
OutputStream outputStream = null;
try {
// 1. 调用Service生成目标模板的Word字节流
byte[] docBytes = generateDocBytes(id);
// 2. 配置响应头:确保前端正确下载(避免中文乱码、指定文件类型)
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE); // 二进制流类型
// 下载文件名:格式为“[项目名]-设计负责人任命通知单.docx”此处用projectId拼接真实场景可从数据中获取项目名
String downloadFileName = URLEncoder.encode(
"设计更改通知单.docx",
"UTF-8"
);
response.setHeader("Content-Disposition", "attachment;filename=" + downloadFileName);
response.setContentLength(docBytes.length); // 设置响应体长度(优化下载体验)
// 3. 将Word字节流写入响应
outputStream = response.getOutputStream();
outputStream.write(docBytes);
outputStream.flush();
} catch (Exception e) {
e.printStackTrace();
// 异常处理返回500错误状态码
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
} finally {
// 关闭流,避免资源泄漏
if (outputStream != null) {
try {
outputStream.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
public byte[] generateDocBytes(Long id) throws Exception {
// -------------------------- 步骤1按projectId查询项目数据模拟真实业务 --------------------------
// 实际场景替换为数据库查询如调用DAO获取项目名称、负责人等
DesDesignChangeVo vo = desDesignChangeService.queryById(id);
DesDesignExtendDetailDto extendDetail = vo.getExtendDetail()==null?new DesDesignExtendDetailDto():vo.getExtendDetail();
Map<String, Object> placeholderData = new HashMap<>();
placeholderData.put("projectName", vo.getProjectName());
placeholderData.put("designPhase",extendDetail.getDesignPhase());
placeholderData.put("subName",extendDetail.getSubName());
String s = dictDataService.selectDictLabel("des_user_major", vo.getSpecialty());
placeholderData.put("specialty",s);
placeholderData.put("volumeNo",vo.getVolumeNo());
String changeReason = vo.getChangeReason();
List<String> reasons = Arrays.asList("设计漏项", "设计改进", "设计差错", "接口差错",
"业主要求", "施工承包商要求", "外部资料与最终情况不符", "材料代用或其他");
String reason = reasons.stream()
.map(item -> changeReason.contains(String.valueOf(reasons.indexOf(item) + 1)) ? "" + item : "" + item)
.collect(Collectors.joining());
placeholderData.put("changeReason", reason);
placeholderData.put("designDisposal1", "1".equals(extendDetail.getDesignDisposal())?"" : "");
placeholderData.put("designDisposal2", "2".equals(extendDetail.getDesignDisposal())?"" : "");
placeholderData.put("designDisposal3", "3".equals(extendDetail.getDesignDisposal())?"" : "");
placeholderData.put("changeContent",vo.getChangeContent());
placeholderData.put("changeCategory1", "1".equals(extendDetail.getChangeCategory())?"" : "");
placeholderData.put("changeCategory2", "2".equals(extendDetail.getChangeCategory())?"" : "");
placeholderData.put("involvingProfessions", extendDetail.getInvolvingProfessions());
// -------------------------- 步骤2用poi-tl加载目标模板并替换占位符 --------------------------
// 读取resources下的“设计项目负责人任命通知单.docx”模板
ClassPathResource templateResource = new ClassPathResource(TEMPLATE_PATH);
try (InputStream templateIs = templateResource.getInputStream();
ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) {
// 1. 加载模板 2. 注入替换数据 3. 渲染生成新文档
XWPFTemplate template = XWPFTemplate.compile(templateIs)
.render(placeholderData); // 自动匹配{{变量名}}占位符
// -------------------------- 步骤3将生成的文档写入字节流 --------------------------
template.write(outputStream);
template.close(); // 关闭模板资源
return outputStream.toByteArray();
}
}
}

View File

@ -1,16 +1,18 @@
package org.dromara.design.controller;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URLEncoder;
import java.rmi.ServerException;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.*;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.deepoove.poi.XWPFTemplate;
import lombok.RequiredArgsConstructor;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.constraints.*;
@ -22,8 +24,15 @@ import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
//import org.dromara.design.domain.DesUserExcelData;
import org.dromara.design.domain.DesUser;
import org.dromara.design.domain.DesUserExcelData;
import org.dromara.design.domain.dto.desUser.DesUserBatchDto;
import org.dromara.project.domain.BusProject;
import org.dromara.project.service.IBusProjectService;
import org.springframework.core.io.ClassPathResource;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.validation.annotation.Validated;
import org.dromara.common.idempotent.annotation.RepeatSubmit;
@ -54,6 +63,7 @@ import org.springframework.web.multipart.MultipartFile;
public class DesUserController extends BaseController {
private final IDesUserService desUserService;
private final IBusProjectService projectService;
/**
* 查询设计人员列表
@ -142,5 +152,75 @@ public class DesUserController extends BaseController {
return toAjax(desUserService.batchAddOrUpdate(dto));
}
private static final String TEMPLATE_PATH = "template/设计项目负责人任命通知单.docx";
@PostMapping("/downloadWord")
public void generateDesignLeaderDoc( Long projectId,
HttpServletResponse response
) {
OutputStream outputStream = null;
try {
// 1. 调用Service生成目标模板的Word字节流
byte[] docBytes = generateDocBytes(projectId);
// 2. 配置响应头:确保前端正确下载(避免中文乱码、指定文件类型)
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE); // 二进制流类型
// 下载文件名:格式为“[项目名]-设计负责人任命通知单.docx”此处用projectId拼接真实场景可从数据中获取项目名
String downloadFileName = URLEncoder.encode(
"设计负责人任命通知单.docx",
"UTF-8"
);
response.setHeader("Content-Disposition", "attachment;filename=" + downloadFileName);
response.setContentLength(docBytes.length); // 设置响应体长度(优化下载体验)
// 3. 将Word字节流写入响应
outputStream = response.getOutputStream();
outputStream.write(docBytes);
outputStream.flush();
} catch (Exception e) {
e.printStackTrace();
// 异常处理返回500错误状态码
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
} finally {
// 关闭流,避免资源泄漏
if (outputStream != null) {
try {
outputStream.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
public byte[] generateDocBytes(Long projectId) throws Exception {
// -------------------------- 步骤1按projectId查询项目数据模拟真实业务 --------------------------
// 实际场景替换为数据库查询如调用DAO获取项目名称、负责人等
BusProject byId = projectService.getById(projectId);
DesUser desUser = desUserService.lambdaQuery().eq(DesUser::getProjectId, projectId)
.eq(DesUser::getUserType, "1")
.last("limit 1").one();
Map<String, Object> placeholderData = new HashMap<>();
placeholderData.put("projectName", byId==null?"" :byId.getProjectName());
placeholderData.put("leaderName",desUser==null?"": desUser.getUserName());
// -------------------------- 步骤2用poi-tl加载目标模板并替换占位符 --------------------------
// 读取resources下的“设计项目负责人任命通知单.docx”模板
ClassPathResource templateResource = new ClassPathResource(TEMPLATE_PATH);
try (InputStream templateIs = templateResource.getInputStream();
ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) {
// 1. 加载模板 2. 注入替换数据 3. 渲染生成新文档
XWPFTemplate template = XWPFTemplate.compile(templateIs)
.render(placeholderData); // 自动匹配{{变量名}}占位符
// -------------------------- 步骤3将生成的文档写入字节流 --------------------------
template.write(outputStream);
template.close(); // 关闭模板资源
return outputStream.toByteArray();
}
}
}

View File

@ -0,0 +1,25 @@
package org.dromara.design.exportUtil.plan;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AttachmentPersonnel {
String professional; // 专业及人员分工
String leaderName; // 专业负责人姓名
String leaderTitle; // 专业负责人职称
String designerName; // 设计人姓名
String designerTitle; // 设计人职称
String reviewerName; // 校审人姓名
String reviewerTitle; // 校审人职称
String checkerName; // 审核人姓名
String checkerTitle; // 审核人职称
String approverName; // 审定人姓名
String approverTitle; // 审定人职称
}

View File

@ -61,7 +61,7 @@ public class GpsEquipmentSonController extends BaseController {
/**
* 查询GPS设备定位日期信息列表
*/
@SaCheckPermission("gps:equipmentSon:getRlList")
// @SaCheckPermission("gps:equipmentSon:getRlList")
@GetMapping("/getRlList")
public R<List<GpsStatusVo>> getRlList(GpsEquipmentSonBo bo) {
return R.ok(gpsEquipmentSonService.getRlList(bo));

View File

@ -81,31 +81,15 @@ public interface GpsEquipmentSonMapper extends BaseMapperPlus<GpsEquipmentSon, G
" rn = 1;")
List<GpsEquipmentSonVo> getUserListByProjectId(@Param("projectId") Long projectId, @Param("startTime") LocalDateTime startOfDay, @Param("endTime") LocalDateTime now);
@Select("WITH RECURSIVE date_range AS (\n" +
" -- 1. 初始化开始日期取startTime的“年月日”部分忽略时分秒\n" +
" SELECT DATE(#{bo.startTime}) AS stat_date\n" +
" UNION ALL\n" +
" -- 2. 递归生成后续日期直到不超过endTime的“年月日”\n" +
" SELECT DATE_ADD(stat_date, INTERVAL 1 DAY)\n" +
" FROM date_range\n" +
" WHERE stat_date < DATE(#{bo.endTime})\n" +
")\n" +
"\n" +
"SELECT \n" +
" dr.stat_date AS riqi, -- 统计日期格式YYYY-MM-DD\n" +
" COUNT(ges.id) AS count -- 当天符合条件的记录数\n" +
"FROM date_range dr\n" +
"LEFT JOIN (\n" +
" SELECT \n" +
" DATE(create_time) AS data_date, -- 提取创建时间的“年月日”\n" +
" id -- 仅需主键用于计数(减少数据传输)\n" +
" FROM gps_equipment_son\n" +
" WHERE \n" +
" project_id = #{bo.projectId} -- 匹配项目ID\n" +
" AND client_id =#{bo.clientId} -- 客户端ID为空\n" +
" AND create_time BETWEEN #{bo.startTime} AND #{bo.endTime} -- 时间范围\n" +
") ges ON dr.stat_date = ges.data_date -- 按日期关联\n" +
"GROUP BY dr.stat_date -- 按统计日期分组\n" +
"ORDER BY dr.stat_date; -- 按日期升序排列")
@Select("SELECT\n" +
" DATE(create_time) AS riqi,\n" +
" COUNT(id) AS count \n" +
"FROM\n" +
" gps_equipment_son\n" +
"WHERE\n" +
" project_id = #{bo.projectId}\n" +
" AND client_id = #{bo.clientId}\n" +
" AND create_time BETWEEN #{bo.startTime} AND #{bo.endTime}\n" +
" GROUP BY DATE(create_time)")
List<GpsStatusVo> getRlList(@Param("bo") GpsEquipmentSonBo bo);
}

View File

@ -91,4 +91,17 @@ public class BusAttendanceMachineController extends BaseController {
@PathVariable Long[] ids) {
return toAjax(busAttendanceMachineService.deleteWithValidByIds(List.of(ids), true));
}
/**
* 批量重新下发
*/
@SaCheckPermission("project:attendanceMachine:reissue")
@RepeatSubmit()
@PostMapping("/reissue/{ids}")
public R<Void> reissue(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] ids){
busAttendanceMachineService.reissue(List.of(ids));
return R.ok("已开始执行,请稍后刷新");
}
}

View File

@ -128,8 +128,8 @@ public class BusAttendanceAppController extends BaseController {
* 获取用户打卡异常记录
*/
@GetMapping("/getAbnormalAttendance/{projectId}")
public TableDataInfo<BusAttendanceVo> getAbnormalAttendance(@NotNull @PathVariable("projectId") Long projectId, PageQuery pageQuery){
return attendanceService.getAbnormalAttendance(projectId,pageQuery);
public TableDataInfo<BusAttendanceVo> getAbnormalAttendance(@NotNull @PathVariable("projectId") Long projectId,String handle, PageQuery pageQuery){
return attendanceService.getAbnormalAttendance(projectId,handle,pageQuery);
}
/**

View File

@ -1,12 +1,15 @@
package org.dromara.project.service;
import com.baomidou.mybatisplus.extension.service.IService;
import jakarta.validation.constraints.NotEmpty;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.project.domain.BusAttendanceMachine;
import org.dromara.project.domain.dto.attendancemachine.BusAttendanceMachineQueryReq;
import org.dromara.project.domain.dto.attendancemachine.BusAttendanceMachineUpdateReq;
import org.dromara.project.domain.vo.BusAttendanceMachineVo;
import org.springframework.scheduling.annotation.Async;
import org.springframework.web.bind.annotation.PathVariable;
import java.util.Collection;
import java.util.List;
@ -75,4 +78,7 @@ public interface IBusAttendanceMachineService extends IService<BusAttendanceMach
* @return 是否删除成功
*/
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
void reissue(Collection<Long> ids);
}

View File

@ -131,7 +131,7 @@ public interface IBusAttendanceService extends IService<BusAttendance>{
/**
* 获取用户打卡异常记录
*/
TableDataInfo<BusAttendanceVo> getAbnormalAttendance(@NotNull @PathVariable("projectId") Long projectId, PageQuery pageQuery);
TableDataInfo<BusAttendanceVo> getAbnormalAttendance(Long projectId,String handle, PageQuery pageQuery);
/**
* 统计指定日期的打卡人员

View File

@ -1,6 +1,7 @@
package org.dromara.project.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -28,13 +29,14 @@ import org.dromara.project.service.IBusAttendanceMachineService;
import org.dromara.project.service.IBusProjectService;
import org.dromara.project.service.IBusProjectTeamMemberService;
import org.dromara.project.service.IBusProjectTeamService;
import org.dromara.system.domain.vo.SysOssVo;
import org.dromara.system.service.ISysOssService;
import org.springframework.beans.BeanUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
@ -61,8 +63,14 @@ public class BusAttendanceMachineServiceImpl extends ServiceImpl<BusAttendanceMa
private DeviceMessageSender deviceMessageSender;
@Resource
@Lazy
private ISubConstructionUserService constructionUserService;
@Resource
@Lazy
private ISysOssService ossService;
/**
* 查询考勤机
*
@ -300,4 +308,57 @@ public class BusAttendanceMachineServiceImpl extends ServiceImpl<BusAttendanceMa
}
return baseMapper.deleteByIds(ids) > 0;
}
@Async
@Override
public void reissue(Collection<Long> ids) {
List<BusAttendanceMachine> busAttendanceMachines = baseMapper.selectByIds(ids);
for (BusAttendanceMachine machine : busAttendanceMachines) {
String sn = machine.getSn();
try {
deviceMessageSender.deleteAllUsers(sn);
} catch (Exception e) {
log.error("删除考勤人员异常", e);
}
String teams = machine.getTeams();
if (StrUtil.isBlank(teams)) {
continue;
}
List<Long> oldTeamIds = Arrays.stream(teams.split(","))
.map(Long::parseLong)
.distinct()
.toList();
List<Long> userIds = projectTeamMemberService.lambdaQuery()
.select(BusProjectTeamMember::getMemberId)
.in(BusProjectTeamMember::getTeamId, oldTeamIds)
.list()
.stream().map(BusProjectTeamMember::getMemberId)
.toList();
if (CollUtil.isEmpty(userIds)) {
continue;
}
List<SubConstructionUser> users = constructionUserService.lambdaQuery()
.in(SubConstructionUser::getSysUserId, userIds)
.list();
Map<Long, String> faceMap = new HashMap<>();
List<String> list = users.stream().map(SubConstructionUser::getFacePic).filter(StrUtil::isNotBlank).toList();
if (CollUtil.isNotEmpty(list)) {
//转成Long的集合
List<Long> list1 = list.stream().map(Long::parseLong).toList();
List<SysOssVo> sysOssVos = ossService.listByIds(list1);
faceMap = sysOssVos.stream().collect(Collectors.toMap(SysOssVo::getOssId, SysOssVo::getUrl));
}
for (SubConstructionUser user : users) {
String facePic = StrUtil.isBlank(user.getFacePic()) ? "" : faceMap.get(Long.valueOf(user.getFacePic()));
deviceMessageSender.sendPersonnelInformation(sn, user.getSysUserId().toString()
, user.getUserName(), facePic);
}
}
}
}

View File

@ -792,7 +792,7 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
@Override
public TableDataInfo<BusAttendanceVo> getAbnormalAttendance(Long projectId, PageQuery pageQuery) {
public TableDataInfo<BusAttendanceVo> getAbnormalAttendance(Long projectId,String handle, PageQuery pageQuery) {
List<String> abnormalList = Arrays.asList(BusAttendanceClockStatusEnum.LATE.getValue(),
BusAttendanceClockStatusEnum.LEAVEEARLY.getValue(),
@ -809,6 +809,7 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
IPage<BusAttendanceVo> busAttendanceVoIPage = baseMapper.selectVoPage(pageQuery.build(), Wrappers.lambdaQuery(BusAttendance.class)
.eq(BusAttendance::getUserId, userId)
.eq(StrUtil.isNotBlank(handle), BusAttendance::getHandle, handle)
.eq(b, BusAttendance::getProjectId, projectId)
.in(BusAttendance::getClockStatus, abnormalList)
.ge(BusAttendance::getClockDate, LocalDate.now().minusDays(29))

View File

@ -17,6 +17,7 @@ import org.dromara.common.enums.AppUserTypeEnum;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.common.satoken.utils.LoginHelper;
import org.dromara.common.utils.AsyncUtil;
import org.dromara.common.utils.IdCardEncryptorUtil;
import org.dromara.contractor.domain.SubConstructionUser;
import org.dromara.contractor.service.ISubConstructionUserService;
@ -90,6 +91,8 @@ public class BusProjectTeamMemberServiceImpl extends ServiceImpl<BusProjectTeamM
@Resource
private ISysOssService ossService;
@Resource
private AsyncUtil asyncUtil;
/**
* 查询项目班组下的成员
@ -219,6 +222,8 @@ public class BusProjectTeamMemberServiceImpl extends ServiceImpl<BusProjectTeamM
userService.updateFb(constructionUser.getSysUserId(),req.getContractorId(),false);
}
asyncUtil.sendPersonnel(req.getTeamId(), constructionUser);
return projectTeamMember.getId();
}
@ -356,6 +361,8 @@ public class BusProjectTeamMemberServiceImpl extends ServiceImpl<BusProjectTeamM
.set(SubConstructionUser::getTeamId, null)
.set(SubConstructionUser::getLeaveDate, new Date());
constructionUserService.update(constructionUserLuw);
asyncUtil.deletePersonnel(constructionUser);
return true;
}

View File

@ -127,4 +127,7 @@ public class XzdBiddingFileEstimate extends BaseEntity {
private String auditStatus;
private Long deptId;
}

View File

@ -123,5 +123,7 @@ public class XzdBiddingFileEstimateBo extends BaseEntity {
*/
private String auditStatus;
private Long deptId;
}

View File

@ -176,6 +176,9 @@ public class XzdBiddingFileEstimateVo implements Serializable {
@TableField(fill = FieldFill.INSERT)
private Date createTime;
private Long deptId;
}

View File

@ -108,6 +108,7 @@ public class XzdBiddingFileEstimateServiceImpl extends ServiceImpl<XzdBiddingFil
lqw.orderByDesc(XzdBiddingFileEstimate::getId);
lqw.eq(StringUtils.isNotBlank(bo.getDocumentCode()), XzdBiddingFileEstimate::getDocumentCode, bo.getDocumentCode());
lqw.eq(bo.getDocumentDate() != null, XzdBiddingFileEstimate::getDocumentDate, bo.getDocumentDate());
lqw.eq(bo.getDeptId() != null, XzdBiddingFileEstimate::getDeptId, bo.getDeptId());
lqw.like(bo.getProjectName() !=null, XzdBiddingFileEstimate::getProjectName, bo.getProjectName());
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), XzdBiddingFileEstimate::getTitle, bo.getTitle());
lqw.eq(StringUtils.isNotBlank(bo.getProjectLocation()), XzdBiddingFileEstimate::getProjectLocation, bo.getProjectLocation());

View File

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
@ -60,12 +61,12 @@ public class XzdBidDepositRecovery extends BaseEntity {
/**
* 工程造价
*/
private Long projectCost;
private BigDecimal projectCost;
/**
* 收回金额
*/
private Long recoveryAmount;
private BigDecimal recoveryAmount;
/**
* 收回金额大写
@ -75,7 +76,7 @@ public class XzdBidDepositRecovery extends BaseEntity {
/**
* 资料费
*/
private Long dataFee;
private BigDecimal dataFee;
/**
* 资料费大写
@ -85,7 +86,7 @@ public class XzdBidDepositRecovery extends BaseEntity {
/**
* 退款金额
*/
private Long refundAmount;
private BigDecimal refundAmount;
/**
* 收回日期
@ -97,10 +98,13 @@ public class XzdBidDepositRecovery extends BaseEntity {
*/
private String depositStatus;
private Long deptId;
/**
* 保证金金额
*/
private Long depositAmount;
private BigDecimal depositAmount;
/**
* 保证金金额大写

View File

@ -8,6 +8,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
@ -60,12 +61,12 @@ public class XzdBidDepositRecoveryBo extends BaseEntity {
/**
* 工程造价
*/
private Long projectCost;
private BigDecimal projectCost;
/**
* 收回金额
*/
private Long recoveryAmount;
private BigDecimal recoveryAmount;
/**
* 收回金额大写
@ -75,7 +76,7 @@ public class XzdBidDepositRecoveryBo extends BaseEntity {
/**
* 资料费
*/
private Long dataFee;
private BigDecimal dataFee;
/**
* 资料费大写
@ -85,7 +86,7 @@ public class XzdBidDepositRecoveryBo extends BaseEntity {
/**
* 退款金额
*/
private Long refundAmount;
private BigDecimal refundAmount;
/**
* 收回日期
@ -100,7 +101,7 @@ public class XzdBidDepositRecoveryBo extends BaseEntity {
/**
* 保证金金额
*/
private Long depositAmount;
private BigDecimal depositAmount;
/**
* 保证金金额大写
@ -183,6 +184,8 @@ public class XzdBidDepositRecoveryBo extends BaseEntity {
*/
private Integer gatheringNumber;
private Long deptId;
/**
* 收款单位(供应商信息)
*/

View File

@ -1,5 +1,6 @@
package org.dromara.xzd.biddingManagement.earnestMoneyWithdraw.domain.vo;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
@ -77,7 +78,7 @@ public class XzdBidDepositRecoveryVo implements Serializable {
* 工程造价
*/
@ExcelProperty(value = "工程造价")
private Long projectCost;
private BigDecimal projectCost;
/**
* 收回金额
@ -95,7 +96,7 @@ public class XzdBidDepositRecoveryVo implements Serializable {
* 资料费
*/
@ExcelProperty(value = "资料费")
private Long dataFee;
private BigDecimal dataFee;
/**
* 资料费大写
@ -107,7 +108,7 @@ public class XzdBidDepositRecoveryVo implements Serializable {
* 退款金额
*/
@ExcelProperty(value = "退款金额")
private Long refundAmount;
private BigDecimal refundAmount;
/**
* 收回日期
@ -125,7 +126,7 @@ public class XzdBidDepositRecoveryVo implements Serializable {
* 保证金金额
*/
@ExcelProperty(value = "保证金金额")
private Long depositAmount;
private BigDecimal depositAmount;
/**
* 保证金金额大写
@ -269,5 +270,7 @@ public class XzdBidDepositRecoveryVo implements Serializable {
*/
private String xmbm;
private Long deptId;
}

View File

@ -131,6 +131,7 @@ public class XzdBidDepositRecoveryServiceImpl extends ServiceImpl<XzdBidDepositR
lqw.eq(bo.getProjectType() != null, XzdBidDepositRecovery::getProjectType, bo.getProjectType());
lqw.eq(StringUtils.isNotBlank(bo.getBusinessMode()), XzdBidDepositRecovery::getBusinessMode, bo.getBusinessMode());
lqw.eq(bo.getProjectCost() != null, XzdBidDepositRecovery::getProjectCost, bo.getProjectCost());
lqw.eq(bo.getDeptId() != null, XzdBidDepositRecovery::getDeptId, bo.getDeptId());
lqw.eq(bo.getRecoveryAmount() != null, XzdBidDepositRecovery::getRecoveryAmount, bo.getRecoveryAmount());
lqw.eq(StringUtils.isNotBlank(bo.getRecoveryAmountCapital()), XzdBidDepositRecovery::getRecoveryAmountCapital, bo.getRecoveryAmountCapital());
lqw.eq(bo.getDataFee() != null, XzdBidDepositRecovery::getDataFee, bo.getDataFee());

View File

@ -60,6 +60,8 @@ public class XzdPurchaseContractSuspend extends BaseEntity {
*/
private LocalDate terminationDate;
private Long deptId;
/**
* 项目名称
*/

View File

@ -73,6 +73,7 @@ public class XzdPurchaseContractSuspendBo extends BaseEntity {
*/
private Long partyAUnit;
private Long deptId;
/**
* 终止原因
*/

View File

@ -76,6 +76,8 @@ public class XzdPurchaseContractSuspendVo implements Serializable {
@ExcelProperty(value = "合同名称")
private String contractName;
private Long deptId;
/**
* 终止日期
*/

View File

@ -150,6 +150,7 @@ public class XzdPurchaseContractSuspendServiceImpl extends ServiceImpl<XzdPurcha
lqw.eq(StringUtils.isNotBlank(bo.getReceiptsCode()), XzdPurchaseContractSuspend::getReceiptsCode, bo.getReceiptsCode());
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), XzdPurchaseContractSuspend::getTitle, bo.getTitle());
lqw.eq(bo.getDocumentDate() != null, XzdPurchaseContractSuspend::getDocumentDate, bo.getDocumentDate());
lqw.eq(bo.getDeptId() != null, XzdPurchaseContractSuspend::getDeptId, bo.getDeptId());
lqw.ge(bo.getStartDate() != null, XzdPurchaseContractSuspend::getDocumentDate, bo.getStartDate());
lqw.le(bo.getEndDate() != null, XzdPurchaseContractSuspend::getDocumentDate, bo.getEndDate());

View File

@ -106,6 +106,8 @@ public class XzdPurchaseContractAlteration extends BaseEntity {
*/
private String warning;
private Long deptId;
/**
* 累计变更金额
*/

View File

@ -66,6 +66,8 @@ public class XzdPurchaseContractAlterationBo extends BaseEntity {
*/
private String contractType;
private Long deptId;
/**
* 变更类型
*/

View File

@ -96,6 +96,8 @@ public class XzdPurchaseContractAlterationVo implements Serializable {
@ExcelProperty(value = "变更类型")
private String alterationType;
private Long deptId;
/**
* 项目名称
*/

View File

@ -194,6 +194,7 @@ public class XzdPurchaseContractAlterationServiceImpl extends ServiceImpl<XzdPur
lqw.eq(StringUtils.isNotBlank(bo.getReceiptsCode()), XzdPurchaseContractAlteration::getReceiptsCode, bo.getReceiptsCode());
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), XzdPurchaseContractAlteration::getTitle, bo.getTitle());
lqw.eq(bo.getDocumentDate() != null, XzdPurchaseContractAlteration::getDocumentDate, bo.getDocumentDate());
lqw.eq(bo.getDeptId() != null, XzdPurchaseContractAlteration::getDeptId, bo.getDeptId());
lqw.ge(bo.getStartDate() != null, XzdPurchaseContractAlteration::getDocumentDate, bo.getStartDate());
lqw.le(bo.getEndDate() != null, XzdPurchaseContractAlteration::getDocumentDate, bo.getEndDate());

View File

@ -84,6 +84,8 @@ public class XzdSubcontractChange extends BaseEntity {
*/
private String organizationName;
private Long deptId;
/**
* 甲方单位
*/

View File

@ -82,6 +82,8 @@ public class XzdSubcontractChangeBo extends BaseEntity {
*/
private String businessModel;
private Long deptId;
/**
* 组织
*/

View File

@ -125,6 +125,9 @@ public class XzdSubcontractChangeVo implements Serializable {
@ExcelProperty(value = "甲方单位")
private String partyAUnitName;
private Long deptId;
/**
* 乙方单位
*/

View File

@ -170,6 +170,7 @@ public class XzdSubcontractChangeServiceImpl extends ServiceImpl<XzdSubcontractC
lqw.eq(StringUtils.isNotBlank(bo.getDocumentCode()), XzdSubcontractChange::getDocumentCode, bo.getDocumentCode());
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), XzdSubcontractChange::getTitle, bo.getTitle());
lqw.eq(bo.getDocumentDate() != null, XzdSubcontractChange::getDocumentDate, bo.getDocumentDate());
lqw.eq(bo.getDeptId() != null, XzdSubcontractChange::getDeptId, bo.getDeptId());
lqw.ge(bo.getStartTime() != null, XzdSubcontractChange::getDocumentDate, bo.getStartTime());
lqw.le(bo.getEndTime() != null, XzdSubcontractChange::getDocumentDate, bo.getEndTime());

View File

@ -53,6 +53,8 @@ public class XzdSubcontract extends BaseEntity {
*/
private Long project;
private Long deptId;
/**
* 经营模式
*/

View File

@ -68,6 +68,8 @@ public class XzdSubcontractBo extends BaseEntity {
*/
private String businessModel;
private Long deptId;
/**
* 原合同造价
*/

View File

@ -80,6 +80,8 @@ public class XzdSubcontractVo implements Serializable {
@ExcelProperty(value = "项目")
private Long project;
private Long deptId;
/**
* 项目名称
*/

View File

@ -215,6 +215,7 @@ public class XzdSubcontractServiceImpl extends ServiceImpl<XzdSubcontractMapper,
lqw.eq(StringUtils.isNotBlank(bo.getContractCode()), XzdSubcontract::getContractCode, bo.getContractCode());
lqw.like(StringUtils.isNotBlank(bo.getContractName()), XzdSubcontract::getContractName, bo.getContractName());
lqw.eq(bo.getDocumentDate() != null, XzdSubcontract::getDocumentDate, bo.getDocumentDate());
lqw.eq(bo.getDeptId() != null, XzdSubcontract::getDeptId, bo.getDeptId());
lqw.ge(bo.getStartDate() != null, XzdSubcontract::getDocumentDate, bo.getStartDate());
lqw.le(bo.getEndDate() != null, XzdSubcontract::getDocumentDate, bo.getEndDate());

View File

@ -54,6 +54,7 @@ public class XzdSubcontractTermination extends BaseEntity {
*/
private String contractName;
private Long deptId;
/**
* 终止日期
*/

View File

@ -57,6 +57,8 @@ public class XzdSubcontractTerminationBo extends BaseEntity {
*/
private LocalDate terminationDate;
private Long deptId;
/**
* 工程项目
*/

View File

@ -71,6 +71,8 @@ public class XzdSubcontractTerminationVo implements Serializable {
@ExcelProperty(value = "合同编码")
private String contractNumberName;
private Long deptId;
/**
* 合同名称
*/

View File

@ -108,6 +108,7 @@ public class XzdSubcontractTerminationServiceImpl extends ServiceImpl<XzdSubcont
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), XzdSubcontractTermination::getTitle, bo.getTitle());
lqw.eq(bo.getDocumentDate() != null, XzdSubcontractTermination::getDocumentDate, bo.getDocumentDate());
lqw.eq(bo.getContractNumber() != null, XzdSubcontractTermination::getContractNumber, bo.getContractNumber());
lqw.eq(bo.getDeptId() != null, XzdSubcontractTermination::getDeptId, bo.getDeptId());
lqw.like(StringUtils.isNotBlank(bo.getContractName()), XzdSubcontractTermination::getContractName, bo.getContractName());
lqw.eq(bo.getTerminationDate() != null, XzdSubcontractTermination::getTerminationDate, bo.getTerminationDate());
lqw.eq(StringUtils.isNotBlank(bo.getEngineeringProject()), XzdSubcontractTermination::getEngineeringProject, bo.getEngineeringProject());

View File

@ -91,6 +91,8 @@ public class XzdPurchaseContractInformation extends BaseEntity {
*/
private Long cumulativeChangeAmount;
private Long deptId;
/**
* 归档日期
*/

View File

@ -80,6 +80,8 @@ public class XzdPurchaseContractInformationBo extends BaseEntity {
*/
private Long partyAUnit;
private Long deptId;
/**
* 含税合同金额
*/

View File

@ -63,6 +63,8 @@ public class XzdPurchaseContractInformationVo implements Serializable {
*/
private String contractText;
private Long deptId;
/**
* 单据日期
*/

View File

@ -152,6 +152,7 @@ public class XzdPurchaseContractInformationServiceImpl extends ServiceImpl<XzdPu
lqw.eq(StringUtils.isNotBlank(bo.getContractCode()), XzdPurchaseContractInformation::getContractCode, bo.getContractCode());
lqw.like(StringUtils.isNotBlank(bo.getContractName()), XzdPurchaseContractInformation::getContractName, bo.getContractName());
lqw.eq(bo.getDocumentDate() != null, XzdPurchaseContractInformation::getDocumentDate, bo.getDocumentDate());
lqw.eq(bo.getDeptId() != null, XzdPurchaseContractInformation::getDeptId, bo.getDeptId());
lqw.ge(bo.getStartDate() != null, XzdPurchaseContractInformation::getDocumentDate, bo.getStartDate());
lqw.le(bo.getEndDate() != null, XzdPurchaseContractInformation::getDocumentDate, bo.getEndDate());

View File

@ -228,4 +228,6 @@ public class XzdGuaranteeChangeInfo extends BaseEntity {
private String fileId;
private Long deptId;
}

View File

@ -245,5 +245,7 @@ public class XzdGuaranteeChangeInfoBo extends BaseEntity {
private LocalDate endTime;
private Long deptId;
}

View File

@ -305,5 +305,7 @@ public class XzdGuaranteeChangeInfoVo implements Serializable {
@Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "createBy")
private String createByName;
private Long deptId;
}

View File

@ -95,6 +95,7 @@ public class XzdGuaranteeChangeInfoServiceImpl extends ServiceImpl<XzdGuaranteeC
LambdaQueryWrapper<XzdGuaranteeChangeInfo> lqw = Wrappers.lambdaQuery();
lqw.orderByDesc(XzdGuaranteeChangeInfo::getId);
lqw.eq(bo.getDanjuId() != null, XzdGuaranteeChangeInfo::getDanjuId, bo.getDanjuId());
lqw.eq(bo.getDeptId() != null, XzdGuaranteeChangeInfo::getDeptId, bo.getDeptId());
lqw.eq(StringUtils.isNotBlank(bo.getDocumentNumber()), XzdGuaranteeChangeInfo::getDocumentNumber, bo.getDocumentNumber());
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), XzdGuaranteeChangeInfo::getTitle, bo.getTitle());
lqw.eq(bo.getDocumentDate() != null, XzdGuaranteeChangeInfo::getDocumentDate, bo.getDocumentDate());

View File

@ -93,6 +93,7 @@ public class XzdGuaranteeInfo extends BaseEntity {
*/
private Long partyAUnit;
private Long deptId;
/**
* 乙方单位
*/

View File

@ -62,6 +62,8 @@ public class XzdGuaranteeInfoBo extends BaseEntity {
*/
private String contractNumber;
private Long deptId;
/**
* 合同名称
*/

View File

@ -70,6 +70,7 @@ public class XzdGuaranteeInfoVo implements Serializable {
@ExcelProperty(value = "单据日期")
private LocalDate documentDate;
private Long deptId;
/**
* 合同编号
*/

View File

@ -137,6 +137,7 @@ public class XzdGuaranteeInfoServiceImpl extends ServiceImpl<XzdGuaranteeInfoMap
lqw.eq(StringUtils.isNotBlank(bo.getContractType()), XzdGuaranteeInfo::getContractType, bo.getContractType());
lqw.eq(StringUtils.isNotBlank(bo.getDocumentNumber()), XzdGuaranteeInfo::getDocumentNumber, bo.getDocumentNumber());
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), XzdGuaranteeInfo::getTitle, bo.getTitle());
lqw.eq(bo.getDeptId() != null, XzdGuaranteeInfo::getDeptId, bo.getDeptId());
lqw.eq(bo.getDocumentDate() != null, XzdGuaranteeInfo::getDocumentDate, bo.getDocumentDate());
lqw.ge(bo.getStartDate() != null, XzdGuaranteeInfo::getDocumentDate,bo.getStartDate());
lqw.le(bo.getEndDate() != null, XzdGuaranteeInfo::getDocumentDate,bo.getEndDate());

View File

@ -73,6 +73,8 @@ public class XzdDepositApplication extends BaseEntity {
*/
private Long paymentMethod;
private Long deptId;
/**
* 保证金类型(字典)
*/

View File

@ -41,6 +41,8 @@ public class XzdDepositApplicationBo extends BaseEntity {
*/
private String documentSerialNumber;
private Long deptId;
/**
* 申请人所属组织
*/

View File

@ -61,6 +61,8 @@ public class XzdDepositApplicationVo implements Serializable {
@ExcelProperty(value = "申请人所属组织")
private Long applicantOrganization;
private Long deptId;
/**
* 申请人所属组织名称
*/
@ -130,6 +132,13 @@ public class XzdDepositApplicationVo implements Serializable {
@ExcelProperty(value = "收取保证金单位")
private String depositReceivingUnit;
/**
* 收取保证金单位
*/
@ExcelProperty(value = "收取保证金单位")
@Translation(type = TransConstant.XZD_GYSXX_ID_TO_NAME, mapper = "depositReceivingUnit")
private String depositReceivingUnitName;
/**
* 账号
*/

View File

@ -86,6 +86,7 @@ public class XzdDepositApplicationServiceImpl extends ServiceImpl<XzdDepositAppl
LambdaQueryWrapper<XzdDepositApplication> lqw = Wrappers.lambdaQuery();
lqw.orderByDesc(XzdDepositApplication::getId);
lqw.eq(bo.getApplicationTime() != null, XzdDepositApplication::getApplicationTime, bo.getApplicationTime());
lqw.eq(bo.getDeptId() != null, XzdDepositApplication::getDeptId, bo.getDeptId());
lqw.eq(StringUtils.isNotBlank(bo.getDocumentSerialNumber()), XzdDepositApplication::getDocumentSerialNumber, bo.getDocumentSerialNumber());
lqw.eq(bo.getApplicantOrganization() != null, XzdDepositApplication::getApplicantOrganization, bo.getApplicantOrganization());
lqw.eq(bo.getApplicantDepartment() != null, XzdDepositApplication::getApplicantDepartment, bo.getApplicantDepartment());

View File

@ -63,6 +63,8 @@ public class XzdFbhtzbjth extends BaseEntity {
*/
private String contractName;
private Long deptId;
/**
* 合同金额
*/

View File

@ -58,6 +58,8 @@ public class XzdFbhtzbjthBo extends BaseEntity {
*/
private String contractCode;
private Long deptId;
/**
* 合同名称
*/

View File

@ -80,6 +80,8 @@ public class XzdFbhtzbjthVo implements Serializable {
@ExcelProperty(value = "合同名称")
private String contractName;
private Long deptId;
/**
* 合同金额
*/
@ -116,6 +118,13 @@ public class XzdFbhtzbjthVo implements Serializable {
@ExcelProperty(value = "项目")
private String project;
/**
* 项目
*/
@ExcelProperty(value = "项目")
@Translation(type = TransConstant.XZD_PROJECT_ID_TO_NAME, mapper = "project")
private String projectName;
/**
* 质保金比例(%)
*/
@ -128,6 +137,13 @@ public class XzdFbhtzbjthVo implements Serializable {
@ExcelProperty(value = "申请单位")
private String applicationUnit;
/**
* 申请单位
*/
@ExcelProperty(value = "申请单位")
@Translation(type = TransConstant.XZD_GYSXX_ID_TO_NAME, mapper = "applicationUnit")
private String applicationUnitName;
/**
* 供应商负责人
*/

View File

@ -98,6 +98,7 @@ public class XzdFbhtzbjthServiceImpl extends ServiceImpl<XzdFbhtzbjthMapper, Xzd
LambdaQueryWrapper<XzdFbhtzbjth> lqw = Wrappers.lambdaQuery();
lqw.orderByDesc(XzdFbhtzbjth::getId);
lqw.eq(bo.getDanjuId() != null, XzdFbhtzbjth::getDanjuId, bo.getDanjuId());
lqw.eq(bo.getDeptId() != null, XzdFbhtzbjth::getDeptId, bo.getDeptId());
lqw.eq(StringUtils.isNotBlank(bo.getDocumentCode()), XzdFbhtzbjth::getDocumentCode, bo.getDocumentCode());
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), XzdFbhtzbjth::getTitle, bo.getTitle());
lqw.eq(bo.getDocumentDate() != null, XzdFbhtzbjth::getDocumentDate, bo.getDocumentDate());

View File

@ -0,0 +1,41 @@
package org.dromara.xzd.domain;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
/**
* 供应商-客户中间对象 xzd_customer_supplier
*
* @author Lion Li
* @date 2025-10-24
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("xzd_customer_supplier")
public class XzdCustomerSupplier extends BaseEntity {
@Serial
private static final long serialVersionUID = 1L;
/**
*
*/
@TableId(value = "id")
private Long id;
/**
* 类型1、供应商2、客户
*/
private String type;
/**
* 供应商-客户id
*/
private Long cSId;
}

View File

@ -0,0 +1,46 @@
package org.dromara.xzd.domain;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
/**
* 供应商-客户中间对象 xzd_customer_supplier_yyb
*
* @author Lion Li
* @date 2025-10-24
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("xzd_customer_supplier_yyb")
public class XzdCustomerSupplierYyb extends BaseEntity {
@Serial
private static final long serialVersionUID = 1L;
/**
*
*/
@TableId(value = "id")
private Long id;
/**
* 供应商-客户id
*/
private Long cSId;
/**
* 主表id
*/
private Long mainTableId;
/**
* 接口地址
*/
private String uri;
}

View File

@ -0,0 +1,42 @@
package org.dromara.xzd.domain.bo;
import org.dromara.xzd.domain.XzdCustomerSupplier;
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.*;
/**
* 供应商-客户中间业务对象 xzd_customer_supplier
*
* @author Lion Li
* @date 2025-10-24
*/
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = XzdCustomerSupplier.class, reverseConvertGenerate = false)
public class XzdCustomerSupplierBo extends BaseEntity {
/**
*
*/
@NotNull(message = "不能为空", groups = { EditGroup.class })
private Long id;
/**
* 类型1、供应商2、客户
*/
@NotBlank(message = "类型1、供应商2、客户不能为空", groups = { AddGroup.class, EditGroup.class })
private String type;
/**
* 供应商-客户id
*/
@NotNull(message = "供应商-客户id不能为空", groups = { AddGroup.class, EditGroup.class })
private Long cSId;
}

View File

@ -0,0 +1,48 @@
package org.dromara.xzd.domain.bo;
import org.dromara.xzd.domain.XzdCustomerSupplierYyb;
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.*;
/**
* 供应商-客户中间业务对象 xzd_customer_supplier_yyb
*
* @author Lion Li
* @date 2025-10-24
*/
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = XzdCustomerSupplierYyb.class, reverseConvertGenerate = false)
public class XzdCustomerSupplierYybBo extends BaseEntity {
/**
*
*/
@NotNull(message = "不能为空", groups = { EditGroup.class })
private Long id;
/**
* 供应商-客户id
*/
@NotNull(message = "供应商-客户id不能为空", groups = { AddGroup.class, EditGroup.class })
private Long cSId;
/**
* 主表id
*/
@NotNull(message = "主表id不能为空", groups = { AddGroup.class, EditGroup.class })
private Long mainTableId;
/**
* 接口地址
*/
@NotBlank(message = "接口地址不能为空", groups = { AddGroup.class, EditGroup.class })
private String uri;
}

View File

@ -0,0 +1,51 @@
package org.dromara.xzd.domain.vo;
import org.dromara.xzd.domain.XzdCustomerSupplier;
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_customer_supplier
*
* @author Lion Li
* @date 2025-10-24
*/
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = XzdCustomerSupplier.class)
public class XzdCustomerSupplierVo implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
*
*/
@ExcelProperty(value = "")
private Long id;
/**
* 类型1、供应商2、客户
*/
@ExcelProperty(value = "类型", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "1=、供应商2、客户")
private String type;
/**
* 供应商-客户id
*/
@ExcelProperty(value = "供应商-客户id")
private Long cSId;
}

View File

@ -0,0 +1,56 @@
package org.dromara.xzd.domain.vo;
import org.dromara.xzd.domain.XzdCustomerSupplierYyb;
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_customer_supplier_yyb
*
* @author Lion Li
* @date 2025-10-24
*/
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = XzdCustomerSupplierYyb.class)
public class XzdCustomerSupplierYybVo implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
*
*/
@ExcelProperty(value = "")
private Long id;
/**
* 供应商-客户id
*/
@ExcelProperty(value = "供应商-客户id")
private Long cSId;
/**
* 主表id
*/
@ExcelProperty(value = "主表id")
private Long mainTableId;
/**
* 接口地址
*/
@ExcelProperty(value = "接口地址")
private String uri;
}

View File

@ -76,6 +76,8 @@ public class AppreciationInvoice extends BaseEntity {
*/
private Long organization;
private Long deptId;
/**
* 经办人
*/

View File

@ -52,6 +52,8 @@ public class AppreciationInvoiceBo extends BaseEntity {
*/
private LocalDate entryDate;
private Long deptId;
/**
* 年度
*/

View File

@ -54,6 +54,8 @@ public class AppreciationInvoiceVo implements Serializable {
@ExcelProperty(value = "项目")
private Long project;
private Long deptId;
/**
* 项目名称
*/

View File

@ -155,6 +155,7 @@ public class AppreciationInvoiceServiceImpl extends ServiceImpl<AppreciationInvo
lqw.eq(bo.getContractNo() != null, AppreciationInvoice::getContractNo, bo.getContractNo());
lqw.eq(bo.getEntryDate() != null, AppreciationInvoice::getEntryDate, bo.getEntryDate());
lqw.eq(bo.getYear() != null, AppreciationInvoice::getYear, bo.getYear());
lqw.eq(bo.getDeptId() != null, AppreciationInvoice::getDeptId, bo.getDeptId());
lqw.eq(bo.getAccountingPeriod() != null, AppreciationInvoice::getAccountingPeriod, bo.getAccountingPeriod());
lqw.eq(StringUtils.isNotBlank(bo.getTaxType()), AppreciationInvoice::getTaxType, bo.getTaxType());
lqw.eq(bo.getTaxItem() != null, AppreciationInvoice::getTaxItem, bo.getTaxItem());

View File

@ -0,0 +1,15 @@
package org.dromara.xzd.mapper;
import org.dromara.xzd.domain.XzdCustomerSupplier;
import org.dromara.xzd.domain.vo.XzdCustomerSupplierVo;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
/**
* 供应商-客户中间Mapper接口
*
* @author Lion Li
* @date 2025-10-24
*/
public interface XzdCustomerSupplierMapper extends BaseMapperPlus<XzdCustomerSupplier, XzdCustomerSupplierVo> {
}

View File

@ -0,0 +1,15 @@
package org.dromara.xzd.mapper;
import org.dromara.xzd.domain.XzdCustomerSupplierYyb;
import org.dromara.xzd.domain.vo.XzdCustomerSupplierYybVo;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
/**
* 供应商-客户中间Mapper接口
*
* @author Lion Li
* @date 2025-10-24
*/
public interface XzdCustomerSupplierYybMapper extends BaseMapperPlus<XzdCustomerSupplierYyb, XzdCustomerSupplierYybVo> {
}

View File

@ -0,0 +1,70 @@
package org.dromara.xzd.service;
import org.dromara.xzd.domain.vo.XzdCustomerSupplierVo;
import org.dromara.xzd.domain.bo.XzdCustomerSupplierBo;
import org.dromara.xzd.domain.XzdCustomerSupplier;
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-24
*/
public interface IXzdCustomerSupplierService extends IService<XzdCustomerSupplier>{
/**
* 查询供应商-客户中间
*
* @param id 主键
* @return 供应商-客户中间
*/
XzdCustomerSupplierVo queryById(Long id);
/**
* 分页查询供应商-客户中间列表
*
* @param bo 查询条件
* @param pageQuery 分页参数
* @return 供应商-客户中间分页列表
*/
TableDataInfo<XzdCustomerSupplierVo> queryPageList(XzdCustomerSupplierBo bo, PageQuery pageQuery);
/**
* 查询符合条件的供应商-客户中间列表
*
* @param bo 查询条件
* @return 供应商-客户中间列表
*/
List<XzdCustomerSupplierVo> queryList(XzdCustomerSupplierBo bo);
/**
* 新增供应商-客户中间
*
* @param bo 供应商-客户中间
* @return 是否新增成功
*/
Boolean insertByBo(XzdCustomerSupplierBo bo);
/**
* 修改供应商-客户中间
*
* @param bo 供应商-客户中间
* @return 是否修改成功
*/
Boolean updateByBo(XzdCustomerSupplierBo bo);
/**
* 校验并批量删除供应商-客户中间信息
*
* @param ids 待删除的主键集合
* @param isValid 是否进行有效性校验
* @return 是否删除成功
*/
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
}

View File

@ -0,0 +1,70 @@
package org.dromara.xzd.service;
import org.dromara.xzd.domain.vo.XzdCustomerSupplierYybVo;
import org.dromara.xzd.domain.bo.XzdCustomerSupplierYybBo;
import org.dromara.xzd.domain.XzdCustomerSupplierYyb;
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-24
*/
public interface IXzdCustomerSupplierYybService extends IService<XzdCustomerSupplierYyb>{
/**
* 查询供应商-客户中间
*
* @param id 主键
* @return 供应商-客户中间
*/
XzdCustomerSupplierYybVo queryById(Long id);
/**
* 分页查询供应商-客户中间列表
*
* @param bo 查询条件
* @param pageQuery 分页参数
* @return 供应商-客户中间分页列表
*/
TableDataInfo<XzdCustomerSupplierYybVo> queryPageList(XzdCustomerSupplierYybBo bo, PageQuery pageQuery);
/**
* 查询符合条件的供应商-客户中间列表
*
* @param bo 查询条件
* @return 供应商-客户中间列表
*/
List<XzdCustomerSupplierYybVo> queryList(XzdCustomerSupplierYybBo bo);
/**
* 新增供应商-客户中间
*
* @param bo 供应商-客户中间
* @return 是否新增成功
*/
Boolean insertByBo(XzdCustomerSupplierYybBo bo);
/**
* 修改供应商-客户中间
*
* @param bo 供应商-客户中间
* @return 是否修改成功
*/
Boolean updateByBo(XzdCustomerSupplierYybBo bo);
/**
* 校验并批量删除供应商-客户中间信息
*
* @param ids 待删除的主键集合
* @param isValid 是否进行有效性校验
* @return 是否删除成功
*/
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
}

View File

@ -0,0 +1,132 @@
package org.dromara.xzd.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.domain.bo.XzdCustomerSupplierBo;
import org.dromara.xzd.domain.vo.XzdCustomerSupplierVo;
import org.dromara.xzd.domain.XzdCustomerSupplier;
import org.dromara.xzd.mapper.XzdCustomerSupplierMapper;
import org.dromara.xzd.service.IXzdCustomerSupplierService;
import java.util.List;
import java.util.Map;
import java.util.Collection;
/**
* 供应商-客户中间Service业务层处理
*
* @author Lion Li
* @date 2025-10-24
*/
@RequiredArgsConstructor
@Service
public class XzdCustomerSupplierServiceImpl extends ServiceImpl<XzdCustomerSupplierMapper, XzdCustomerSupplier> implements IXzdCustomerSupplierService {
private final XzdCustomerSupplierMapper baseMapper;
/**
* 查询供应商-客户中间
*
* @param id 主键
* @return 供应商-客户中间
*/
@Override
public XzdCustomerSupplierVo queryById(Long id){
return baseMapper.selectVoById(id);
}
/**
* 分页查询供应商-客户中间列表
*
* @param bo 查询条件
* @param pageQuery 分页参数
* @return 供应商-客户中间分页列表
*/
@Override
public TableDataInfo<XzdCustomerSupplierVo> queryPageList(XzdCustomerSupplierBo bo, PageQuery pageQuery) {
LambdaQueryWrapper<XzdCustomerSupplier> lqw = buildQueryWrapper(bo);
Page<XzdCustomerSupplierVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
return TableDataInfo.build(result);
}
/**
* 查询符合条件的供应商-客户中间列表
*
* @param bo 查询条件
* @return 供应商-客户中间列表
*/
@Override
public List<XzdCustomerSupplierVo> queryList(XzdCustomerSupplierBo bo) {
LambdaQueryWrapper<XzdCustomerSupplier> lqw = buildQueryWrapper(bo);
return baseMapper.selectVoList(lqw);
}
private LambdaQueryWrapper<XzdCustomerSupplier> buildQueryWrapper(XzdCustomerSupplierBo bo) {
Map<String, Object> params = bo.getParams();
LambdaQueryWrapper<XzdCustomerSupplier> lqw = Wrappers.lambdaQuery();
lqw.orderByDesc(XzdCustomerSupplier::getId);
lqw.eq(StringUtils.isNotBlank(bo.getType()), XzdCustomerSupplier::getType, bo.getType());
lqw.eq(bo.getCSId() != null, XzdCustomerSupplier::getCSId, bo.getCSId());
return lqw;
}
/**
* 新增供应商-客户中间
*
* @param bo 供应商-客户中间
* @return 是否新增成功
*/
@Override
public Boolean insertByBo(XzdCustomerSupplierBo bo) {
XzdCustomerSupplier add = MapstructUtils.convert(bo, XzdCustomerSupplier.class);
validEntityBeforeSave(add);
boolean flag = baseMapper.insert(add) > 0;
if (flag) {
bo.setId(add.getId());
}
return flag;
}
/**
* 修改供应商-客户中间
*
* @param bo 供应商-客户中间
* @return 是否修改成功
*/
@Override
public Boolean updateByBo(XzdCustomerSupplierBo bo) {
XzdCustomerSupplier update = MapstructUtils.convert(bo, XzdCustomerSupplier.class);
validEntityBeforeSave(update);
return baseMapper.updateById(update) > 0;
}
/**
* 保存前的数据校验
*/
private void validEntityBeforeSave(XzdCustomerSupplier entity){
//TODO 做一些数据校验,如唯一约束
}
/**
* 校验并批量删除供应商-客户中间信息
*
* @param ids 待删除的主键集合
* @param isValid 是否进行有效性校验
* @return 是否删除成功
*/
@Override
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
if(isValid){
//TODO 做一些业务上的校验,判断是否需要校验
}
return baseMapper.deleteByIds(ids) > 0;
}
}

View File

@ -0,0 +1,133 @@
package org.dromara.xzd.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.domain.bo.XzdCustomerSupplierYybBo;
import org.dromara.xzd.domain.vo.XzdCustomerSupplierYybVo;
import org.dromara.xzd.domain.XzdCustomerSupplierYyb;
import org.dromara.xzd.mapper.XzdCustomerSupplierYybMapper;
import org.dromara.xzd.service.IXzdCustomerSupplierYybService;
import java.util.List;
import java.util.Map;
import java.util.Collection;
/**
* 供应商-客户中间Service业务层处理
*
* @author Lion Li
* @date 2025-10-24
*/
@RequiredArgsConstructor
@Service
public class XzdCustomerSupplierYybServiceImpl extends ServiceImpl<XzdCustomerSupplierYybMapper, XzdCustomerSupplierYyb> implements IXzdCustomerSupplierYybService {
private final XzdCustomerSupplierYybMapper baseMapper;
/**
* 查询供应商-客户中间
*
* @param id 主键
* @return 供应商-客户中间
*/
@Override
public XzdCustomerSupplierYybVo queryById(Long id){
return baseMapper.selectVoById(id);
}
/**
* 分页查询供应商-客户中间列表
*
* @param bo 查询条件
* @param pageQuery 分页参数
* @return 供应商-客户中间分页列表
*/
@Override
public TableDataInfo<XzdCustomerSupplierYybVo> queryPageList(XzdCustomerSupplierYybBo bo, PageQuery pageQuery) {
LambdaQueryWrapper<XzdCustomerSupplierYyb> lqw = buildQueryWrapper(bo);
Page<XzdCustomerSupplierYybVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
return TableDataInfo.build(result);
}
/**
* 查询符合条件的供应商-客户中间列表
*
* @param bo 查询条件
* @return 供应商-客户中间列表
*/
@Override
public List<XzdCustomerSupplierYybVo> queryList(XzdCustomerSupplierYybBo bo) {
LambdaQueryWrapper<XzdCustomerSupplierYyb> lqw = buildQueryWrapper(bo);
return baseMapper.selectVoList(lqw);
}
private LambdaQueryWrapper<XzdCustomerSupplierYyb> buildQueryWrapper(XzdCustomerSupplierYybBo bo) {
Map<String, Object> params = bo.getParams();
LambdaQueryWrapper<XzdCustomerSupplierYyb> lqw = Wrappers.lambdaQuery();
lqw.orderByDesc(XzdCustomerSupplierYyb::getId);
lqw.eq(bo.getCSId() != null, XzdCustomerSupplierYyb::getCSId, bo.getCSId());
lqw.eq(bo.getMainTableId() != null, XzdCustomerSupplierYyb::getMainTableId, bo.getMainTableId());
lqw.eq(StringUtils.isNotBlank(bo.getUri()), XzdCustomerSupplierYyb::getUri, bo.getUri());
return lqw;
}
/**
* 新增供应商-客户中间
*
* @param bo 供应商-客户中间
* @return 是否新增成功
*/
@Override
public Boolean insertByBo(XzdCustomerSupplierYybBo bo) {
XzdCustomerSupplierYyb add = MapstructUtils.convert(bo, XzdCustomerSupplierYyb.class);
validEntityBeforeSave(add);
boolean flag = baseMapper.insert(add) > 0;
if (flag) {
bo.setId(add.getId());
}
return flag;
}
/**
* 修改供应商-客户中间
*
* @param bo 供应商-客户中间
* @return 是否修改成功
*/
@Override
public Boolean updateByBo(XzdCustomerSupplierYybBo bo) {
XzdCustomerSupplierYyb update = MapstructUtils.convert(bo, XzdCustomerSupplierYyb.class);
validEntityBeforeSave(update);
return baseMapper.updateById(update) > 0;
}
/**
* 保存前的数据校验
*/
private void validEntityBeforeSave(XzdCustomerSupplierYyb entity){
//TODO 做一些数据校验,如唯一约束
}
/**
* 校验并批量删除供应商-客户中间信息
*
* @param ids 待删除的主键集合
* @param isValid 是否进行有效性校验
* @return 是否删除成功
*/
@Override
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
if(isValid){
//TODO 做一些业务上的校验,判断是否需要校验
}
return baseMapper.deleteByIds(ids) > 0;
}
}

View File

@ -54,6 +54,8 @@ public class SettlementOfSubcontractingContract extends BaseEntity {
*/
private String contractName;
private Long deptId;
/**
* 统计周期
*/

View File

@ -66,6 +66,8 @@ public class SettlementOfSubcontractingContractBo extends BaseEntity {
*/
private LocalDate measurementStart;
private Long deptId;
/**
* 项目
*/

View File

@ -61,6 +61,8 @@ public class SettlementOfSubcontractingContractVo implements Serializable {
@ExcelProperty(value = "单据日期")
private LocalDate documentDate;
private Long deptId;
/**
* 合同编码
*/

View File

@ -185,6 +185,7 @@ public class SettlementOfSubcontractingContractServiceImpl extends ServiceImpl<S
lqw.eq(StringUtils.isNotBlank(bo.getDocumentCode()), SettlementOfSubcontractingContract::getDocumentCode, bo.getDocumentCode());
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), SettlementOfSubcontractingContract::getTitle, bo.getTitle());
lqw.eq(bo.getDocumentDate() != null, SettlementOfSubcontractingContract::getDocumentDate, bo.getDocumentDate());
lqw.eq(bo.getDeptId() != null, SettlementOfSubcontractingContract::getDeptId, bo.getDeptId());
lqw.ge(bo.getStartDate() != null, SettlementOfSubcontractingContract::getDocumentDate, bo.getStartDate());
lqw.le(bo.getEndDate() != null, SettlementOfSubcontractingContract::getDocumentDate, bo.getEndDate());

View File

@ -59,6 +59,8 @@ public class SettlementOfSubcontractingCompletion extends BaseEntity {
*/
private Long approvedTotalPrice;
private Long deptId;
/**
* 审定日期
*/

View File

@ -59,6 +59,8 @@ public class SettlementOfSubcontractingCompletionBo extends BaseEntity {
*/
private String contractName;
private Long deptId;
/**
* 审定总价
*/

View File

@ -75,6 +75,8 @@ public class SettlementOfSubcontractingCompletionVo implements Serializable {
@ExcelProperty(value = "合同名称")
private String contractName;
private Long deptId;
/**
* 审定总价
*/

View File

@ -221,6 +221,7 @@ public class SettlementOfSubcontractingCompletionServiceImpl extends ServiceImpl
lqw.eq(StringUtils.isNotBlank(bo.getDocumentCode()), SettlementOfSubcontractingCompletion::getDocumentCode, bo.getDocumentCode());
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), SettlementOfSubcontractingCompletion::getTitle, bo.getTitle());
lqw.eq(bo.getDocumentDate() != null, SettlementOfSubcontractingCompletion::getDocumentDate, bo.getDocumentDate());
lqw.eq(bo.getDeptId() != null, SettlementOfSubcontractingCompletion::getDeptId, bo.getDeptId());
lqw.ge(bo.getStartTime() != null, SettlementOfSubcontractingCompletion::getDocumentDate, bo.getStartTime());
lqw.le(bo.getEndTime() != null, SettlementOfSubcontractingCompletion::getDocumentDate, bo.getEndTime());

View File

@ -84,6 +84,8 @@ public class SettlementOfSubcontractingAdjustment extends BaseEntity {
*/
private String fileId;
private Long deptId;
/**
* 备注
*/

View File

@ -45,6 +45,8 @@ public class SettlementOfSubcontractingAdjustmentBo extends BaseEntity {
*/
private LocalDate documentDate;
private Long deptId;
/**
* 决算单编号
*/

View File

@ -64,6 +64,7 @@ public class SettlementOfSubcontractingAdjustmentVo implements Serializable {
@ExcelProperty(value = "决算单编号")
private Long finalAccountNo;
private Long deptId;
/**
* 决算单编号名称

View File

@ -129,6 +129,8 @@ public class SettlementOfSubcontractingAdjustmentServiceImpl extends ServiceImpl
lqw.eq(StringUtils.isNotBlank(bo.getDocumentNo()), SettlementOfSubcontractingAdjustment::getDocumentNo, bo.getDocumentNo());
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), SettlementOfSubcontractingAdjustment::getTitle, bo.getTitle());
lqw.eq(bo.getDocumentDate() != null, SettlementOfSubcontractingAdjustment::getDocumentDate, bo.getDocumentDate());
lqw.eq(bo.getDeptId() != null, SettlementOfSubcontractingAdjustment::getDeptId, bo.getDeptId());
lqw.eq(bo.getFinalAccountNo() != null, SettlementOfSubcontractingAdjustment::getFinalAccountNo, bo.getFinalAccountNo());
lqw.like(StringUtils.isNotBlank(bo.getContractName()), SettlementOfSubcontractingAdjustment::getContractName, bo.getContractName());
lqw.eq(StringUtils.isNotBlank(bo.getContractNo()), SettlementOfSubcontractingAdjustment::getContractNo, bo.getContractNo());

View File

@ -44,6 +44,8 @@ public class FinancialRevenuePlanAlteration extends BaseEntity {
*/
private Long project;
private Long deptId;
/**
* 计划类型
*/

View File

@ -74,6 +74,8 @@ public class FinancialRevenuePlanAlterationBo extends BaseEntity {
*/
private BigDecimal expenseTotal;
private Long deptId;
/**
* 收入总额
*/

View File

@ -67,6 +67,8 @@ public class FinancialRevenuePlanAlterationVo implements Serializable {
@ExcelProperty(value = "项目")
private String projectName;
private Long deptId;
/**
* 计划类型
*/

View File

@ -201,6 +201,7 @@ public class FinancialRevenuePlanAlterationServiceImpl extends ServiceImpl<Finan
lqw.eq(StringUtils.isNotBlank(bo.getWorkCycle()), FinancialRevenuePlanAlteration::getWorkCycle, bo.getWorkCycle());
lqw.eq(bo.getStartDate() != null, FinancialRevenuePlanAlteration::getStartDate, bo.getStartDate());
lqw.eq(bo.getEndDate() != null, FinancialRevenuePlanAlteration::getEndDate, bo.getEndDate());
lqw.eq(bo.getDeptId() != null, FinancialRevenuePlanAlteration::getDeptId, bo.getDeptId());
lqw.eq(bo.getExpenseTotal() != null, FinancialRevenuePlanAlteration::getExpenseTotal, bo.getExpenseTotal());
lqw.eq(bo.getIncomeTotal() != null, FinancialRevenuePlanAlteration::getIncomeTotal, bo.getIncomeTotal());
lqw.eq(StringUtils.isNotBlank(bo.getIsTemporaryPlan()), FinancialRevenuePlanAlteration::getIsTemporaryPlan, bo.getIsTemporaryPlan());

View File

@ -94,6 +94,8 @@ public class FinancialRevenueExpenditurePlan extends BaseEntity {
*/
private BigDecimal projectAvailableBalance;
private Long deptId;
/**
* 累计收款金额
*/

Some files were not shown because too many files have changed in this diff Show More