[add] 工单回复添加分包方,施工进度计划 [update] 修改app识别、实名,进度
This commit is contained in:
@ -0,0 +1,24 @@
|
|||||||
|
package org.dromara.common.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-08-01 10:47
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum InspectionRectificationUnitType {
|
||||||
|
|
||||||
|
CONTRACTOR("分包方", "1"),
|
||||||
|
TEAM("班组", "2");
|
||||||
|
|
||||||
|
private final String text;
|
||||||
|
|
||||||
|
private final String value;
|
||||||
|
|
||||||
|
InspectionRectificationUnitType(String text, String value) {
|
||||||
|
this.text = text;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -2,7 +2,6 @@ package org.dromara.common.utils.baiduUtil.entity.ocr;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.dromara.system.domain.vo.SysOssVo;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author 铁憨憨
|
* @Author 铁憨憨
|
||||||
@ -38,8 +37,4 @@ public class BankData {
|
|||||||
@JSONField(name = "holder_name", label = "持卡人姓名,不能识别时为空")
|
@JSONField(name = "holder_name", label = "持卡人姓名,不能识别时为空")
|
||||||
private String holderName;
|
private String holderName;
|
||||||
|
|
||||||
/**
|
|
||||||
* 银行卡图片信息
|
|
||||||
*/
|
|
||||||
private SysOssVo image;
|
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,6 @@ package org.dromara.common.utils.baiduUtil.entity.ocr;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.dromara.system.domain.vo.SysOssVo;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author 铁憨憨
|
* @Author 铁憨憨
|
||||||
@ -31,8 +30,12 @@ public class WordsResult {
|
|||||||
@JSONField(name = "性别")
|
@JSONField(name = "性别")
|
||||||
private Field gender;
|
private Field gender;
|
||||||
|
|
||||||
/**
|
@JSONField(name = "失效日期")
|
||||||
* 身份证图片信息
|
private Field expiryDate;
|
||||||
*/
|
|
||||||
private SysOssVo image;
|
@JSONField(name = "签发机关")
|
||||||
|
private Field issuingAuthority;
|
||||||
|
|
||||||
|
@JSONField(name = "签发日期")
|
||||||
|
private Field issuingDate;
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@ import org.dromara.common.web.core.BaseController;
|
|||||||
import org.dromara.contractor.domain.dto.contractor.SubContractorCreateReq;
|
import org.dromara.contractor.domain.dto.contractor.SubContractorCreateReq;
|
||||||
import org.dromara.contractor.domain.dto.contractor.SubContractorQueryReq;
|
import org.dromara.contractor.domain.dto.contractor.SubContractorQueryReq;
|
||||||
import org.dromara.contractor.domain.dto.contractor.SubContractorUpdateReq;
|
import org.dromara.contractor.domain.dto.contractor.SubContractorUpdateReq;
|
||||||
|
import org.dromara.contractor.domain.vo.contractor.SubContractorManagerVo;
|
||||||
import org.dromara.contractor.domain.vo.contractor.SubContractorVo;
|
import org.dromara.contractor.domain.vo.contractor.SubContractorVo;
|
||||||
import org.dromara.contractor.service.ISubContractorService;
|
import org.dromara.contractor.service.ISubContractorService;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@ -58,6 +59,16 @@ public class SubContractorController extends BaseController {
|
|||||||
return contractorService.queryListNoDept(projectId);
|
return contractorService.queryListNoDept(projectId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据项目id查询分包方管理人员信息列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("contractor:contractor:listManager")
|
||||||
|
@GetMapping("/listManager/{projectId}")
|
||||||
|
public R<List<SubContractorManagerVo>> listManager(@NotNull(message = "项目id不能为空")
|
||||||
|
@PathVariable Long projectId) {
|
||||||
|
return R.ok(contractorService.queryManagerList(projectId));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出分包单位列表
|
* 导出分包单位列表
|
||||||
*/
|
*/
|
||||||
|
@ -5,10 +5,10 @@ import org.dromara.common.core.domain.R;
|
|||||||
import org.dromara.common.log.annotation.Log;
|
import org.dromara.common.log.annotation.Log;
|
||||||
import org.dromara.common.log.enums.BusinessType;
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
import org.dromara.common.satoken.utils.LoginHelper;
|
import org.dromara.common.satoken.utils.LoginHelper;
|
||||||
import org.dromara.common.utils.baiduUtil.entity.ocr.BankData;
|
|
||||||
import org.dromara.common.utils.baiduUtil.entity.ocr.WordsResult;
|
|
||||||
import org.dromara.contractor.domain.SubConstructionUser;
|
import org.dromara.contractor.domain.SubConstructionUser;
|
||||||
import org.dromara.contractor.domain.dto.constructionuser.SubConstructionUserAuthenticationReq;
|
import org.dromara.contractor.domain.dto.constructionuser.SubConstructionUserAuthenticationReq;
|
||||||
|
import org.dromara.contractor.domain.vo.constructionuser.SubConstructionUserOrcBankVo;
|
||||||
|
import org.dromara.contractor.domain.vo.constructionuser.SubConstructionUserOrcIdCardVo;
|
||||||
import org.dromara.contractor.domain.vo.constructionuser.SubConstructionUserVo;
|
import org.dromara.contractor.domain.vo.constructionuser.SubConstructionUserVo;
|
||||||
import org.dromara.contractor.service.ISubConstructionUserService;
|
import org.dromara.contractor.service.ISubConstructionUserService;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@ -43,7 +43,7 @@ public class SubConstructionUserAppController {
|
|||||||
*/
|
*/
|
||||||
@Log(title = "施工人员", businessType = BusinessType.OTHER)
|
@Log(title = "施工人员", businessType = BusinessType.OTHER)
|
||||||
@PostMapping("/idCard")
|
@PostMapping("/idCard")
|
||||||
public R<WordsResult> getIdCardMessage(@RequestParam("file") MultipartFile file, String idCardSide) {
|
public R<SubConstructionUserOrcIdCardVo> getIdCardMessage(@RequestParam("file") MultipartFile file, String idCardSide) {
|
||||||
return R.ok(constructionUserService.getIdCardMessageByPic(file, idCardSide));
|
return R.ok(constructionUserService.getIdCardMessageByPic(file, idCardSide));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ public class SubConstructionUserAppController {
|
|||||||
*/
|
*/
|
||||||
@Log(title = "施工人员", businessType = BusinessType.OTHER)
|
@Log(title = "施工人员", businessType = BusinessType.OTHER)
|
||||||
@PostMapping("/bankCard")
|
@PostMapping("/bankCard")
|
||||||
public R<BankData> getBankCardMessage(@RequestParam("file") MultipartFile file) {
|
public R<SubConstructionUserOrcBankVo> getBankCardMessage(@RequestParam("file") MultipartFile file) {
|
||||||
return R.ok(constructionUserService.getBankCardMessageByPic(file));
|
return R.ok(constructionUserService.getBankCardMessageByPic(file));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,8 +61,8 @@ public class SubConstructionUserAppController {
|
|||||||
*/
|
*/
|
||||||
@Log(title = "施工人员", businessType = BusinessType.INSERT)
|
@Log(title = "施工人员", businessType = BusinessType.INSERT)
|
||||||
@PostMapping("/authentication")
|
@PostMapping("/authentication")
|
||||||
public R<Long> insertByAuthentication(@RequestParam("file") MultipartFile file, @Validated SubConstructionUserAuthenticationReq req) {
|
public R<Long> insertByAuthentication(@Validated @RequestBody SubConstructionUserAuthenticationReq req) {
|
||||||
return R.ok(constructionUserService.insertByAuthentication(file, req));
|
return R.ok(constructionUserService.insertByAuthentication(req));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package org.dromara.contractor.domain.dto.constructionuser;
|
package org.dromara.contractor.domain.dto.constructionuser;
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import jakarta.validation.constraints.Pattern;
|
import jakarta.validation.constraints.Pattern;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.dromara.common.core.constant.RegexConstants;
|
import org.dromara.common.core.constant.RegexConstants;
|
||||||
@ -25,23 +24,9 @@ public class SubConstructionUserAuthenticationReq implements Serializable {
|
|||||||
@NotBlank(message = "人员姓名不能为空")
|
@NotBlank(message = "人员姓名不能为空")
|
||||||
private String userName;
|
private String userName;
|
||||||
|
|
||||||
/**
|
|
||||||
* 项目id
|
|
||||||
*/
|
|
||||||
@NotNull(message = "项目id不能为空")
|
|
||||||
private Long projectId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分包公司id
|
|
||||||
*/
|
|
||||||
@NotNull(message = "分包公司id不能为空")
|
|
||||||
private Long contractorId;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 联系电话
|
* 联系电话
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "联系电话不能为空")
|
|
||||||
@Pattern(regexp = RegexConstants.MOBILE, message = "手机号格式不正确")
|
|
||||||
private String phone;
|
private String phone;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -0,0 +1,50 @@
|
|||||||
|
package org.dromara.contractor.domain.vo.constructionuser;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.dromara.system.domain.vo.SysOssVo;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-08-01 18:42
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SubConstructionUserOrcBankVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 6307930658427321172L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 银行卡号
|
||||||
|
*/
|
||||||
|
private String bankCardNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 银行卡有效期
|
||||||
|
*/
|
||||||
|
private String validDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 银行卡类型
|
||||||
|
* 0:不能识别; 1:借记卡; 2:贷记卡(原信用卡大部分为贷记卡); 3:准贷记卡; 4:预付费卡
|
||||||
|
*/
|
||||||
|
private int bankCardType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 银行名称
|
||||||
|
*/
|
||||||
|
private String bankName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 银行卡的持卡人姓名
|
||||||
|
*/
|
||||||
|
private String holderName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 银行卡图片信息
|
||||||
|
*/
|
||||||
|
private SysOssVo image;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,68 @@
|
|||||||
|
package org.dromara.contractor.domain.vo.constructionuser;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.dromara.system.domain.vo.SysOssVo;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-08-01 18:35
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SubConstructionUserOrcIdCardVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = -569979905442550651L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 姓名
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 民族
|
||||||
|
*/
|
||||||
|
private String nation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 身份证号码
|
||||||
|
*/
|
||||||
|
private String citizenIdentification;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出生日期
|
||||||
|
*/
|
||||||
|
private String birth;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 性别
|
||||||
|
*/
|
||||||
|
private String gender;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 失效日期
|
||||||
|
*/
|
||||||
|
private String expiryDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签发机关
|
||||||
|
*/
|
||||||
|
private String issuingAuthority;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签发日期
|
||||||
|
*/
|
||||||
|
private String issuingDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 身份证图片信息
|
||||||
|
*/
|
||||||
|
private SysOssVo image;
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
package org.dromara.contractor.domain.vo.contractor;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-08-01 14:55
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SubContractorManagerVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = -7901062489097101251L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公司名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 管理人员列表
|
||||||
|
*/
|
||||||
|
private List<SubManagerVo> managerList;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package org.dromara.contractor.domain.vo.contractor;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-08-01 14:56
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SubManagerVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = -7929841464664698275L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 管理员id
|
||||||
|
*/
|
||||||
|
private Long managerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 管理员名称
|
||||||
|
*/
|
||||||
|
private String managerName;
|
||||||
|
}
|
@ -5,15 +5,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import org.dromara.common.utils.baiduUtil.entity.ocr.BankData;
|
|
||||||
import org.dromara.common.utils.baiduUtil.entity.ocr.WordsResult;
|
|
||||||
import org.dromara.contractor.domain.SubConstructionUser;
|
import org.dromara.contractor.domain.SubConstructionUser;
|
||||||
import org.dromara.contractor.domain.dto.constructionuser.*;
|
import org.dromara.contractor.domain.dto.constructionuser.*;
|
||||||
import org.dromara.contractor.domain.vo.constructionuser.SubConstructionUserVo;
|
|
||||||
import org.dromara.contractor.domain.exportvo.BusConstructionUserExportVo;
|
import org.dromara.contractor.domain.exportvo.BusConstructionUserExportVo;
|
||||||
import org.dromara.contractor.domain.vo.constructionuser.SubConstructionUserAttendanceMonthVo;
|
import org.dromara.contractor.domain.vo.constructionuser.*;
|
||||||
import org.dromara.contractor.domain.vo.constructionuser.SubConstructionUserAttendanceTotalVo;
|
|
||||||
import org.dromara.contractor.domain.vo.constructionuser.SubConstructionUserGisVo;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@ -182,7 +177,7 @@ public interface ISubConstructionUserService extends IService<SubConstructionUse
|
|||||||
* @param idCardSide 身份证正反面(front/back)
|
* @param idCardSide 身份证正反面(front/back)
|
||||||
* @return 身份证信息
|
* @return 身份证信息
|
||||||
*/
|
*/
|
||||||
WordsResult getIdCardMessageByPic(MultipartFile file, String idCardSide);
|
SubConstructionUserOrcIdCardVo getIdCardMessageByPic(MultipartFile file, String idCardSide);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -191,16 +186,15 @@ public interface ISubConstructionUserService extends IService<SubConstructionUse
|
|||||||
* @param file 图片文件
|
* @param file 图片文件
|
||||||
* @return 银行卡信息
|
* @return 银行卡信息
|
||||||
*/
|
*/
|
||||||
BankData getBankCardMessageByPic(MultipartFile file);
|
SubConstructionUserOrcBankVo getBankCardMessageByPic(MultipartFile file);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 实名认证
|
* 实名认证
|
||||||
*
|
*
|
||||||
* @param file 人脸图片
|
* @param req 身份信息认证对象
|
||||||
* @param req 身份信息认证对象
|
|
||||||
* @return 是否认证成功
|
* @return 是否认证成功
|
||||||
*/
|
*/
|
||||||
Long insertByAuthentication(MultipartFile file, SubConstructionUserAuthenticationReq req);
|
Long insertByAuthentication(SubConstructionUserAuthenticationReq req);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 人脸识别
|
* 人脸识别
|
||||||
|
@ -9,6 +9,7 @@ import org.dromara.contractor.domain.SubContractor;
|
|||||||
import org.dromara.contractor.domain.dto.contractor.SubContractorCreateReq;
|
import org.dromara.contractor.domain.dto.contractor.SubContractorCreateReq;
|
||||||
import org.dromara.contractor.domain.dto.contractor.SubContractorQueryReq;
|
import org.dromara.contractor.domain.dto.contractor.SubContractorQueryReq;
|
||||||
import org.dromara.contractor.domain.dto.contractor.SubContractorUpdateReq;
|
import org.dromara.contractor.domain.dto.contractor.SubContractorUpdateReq;
|
||||||
|
import org.dromara.contractor.domain.vo.contractor.SubContractorManagerVo;
|
||||||
import org.dromara.contractor.domain.vo.contractor.SubContractorVo;
|
import org.dromara.contractor.domain.vo.contractor.SubContractorVo;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@ -104,4 +105,11 @@ public interface ISubContractorService extends IService<SubContractor> {
|
|||||||
*/
|
*/
|
||||||
Page<SubContractorVo> getVoPage(Page<SubContractor> contractorPage);
|
Page<SubContractorVo> getVoPage(Page<SubContractor> contractorPage);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取分包公司管理员列表
|
||||||
|
*
|
||||||
|
* @param projectId 项目id
|
||||||
|
* @return 分包公司经理列表
|
||||||
|
*/
|
||||||
|
List<SubContractorManagerVo> queryManagerList(Long projectId);
|
||||||
}
|
}
|
||||||
|
@ -54,6 +54,7 @@ import org.dromara.project.service.*;
|
|||||||
import org.dromara.system.domain.vo.SysOssVo;
|
import org.dromara.system.domain.vo.SysOssVo;
|
||||||
import org.dromara.system.service.ISysDictTypeService;
|
import org.dromara.system.service.ISysDictTypeService;
|
||||||
import org.dromara.system.service.ISysOssService;
|
import org.dromara.system.service.ISysOssService;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -985,7 +986,7 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
* @return 身份证信息
|
* @return 身份证信息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public WordsResult getIdCardMessageByPic(MultipartFile file, String idCardSide) {
|
public SubConstructionUserOrcIdCardVo getIdCardMessageByPic(MultipartFile file, String idCardSide) {
|
||||||
if (file == null) {
|
if (file == null) {
|
||||||
throw new ServiceException("请上传图片", HttpStatus.BAD_REQUEST);
|
throw new ServiceException("请上传图片", HttpStatus.BAD_REQUEST);
|
||||||
}
|
}
|
||||||
@ -1013,8 +1014,27 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
}
|
}
|
||||||
// 获取数据成功,保存图片信息
|
// 获取数据成功,保存图片信息
|
||||||
SysOssVo upload = ossService.upload(file);
|
SysOssVo upload = ossService.upload(file);
|
||||||
wordsResult.setImage(upload);
|
return getSubConstructionUserOrcIdCardVo(idCardSide, wordsResult, upload);
|
||||||
return wordsResult;
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
private static SubConstructionUserOrcIdCardVo getSubConstructionUserOrcIdCardVo(String idCardSide, WordsResult wordsResult, SysOssVo upload) {
|
||||||
|
SubConstructionUserOrcIdCardVo vo = new SubConstructionUserOrcIdCardVo();
|
||||||
|
if (idCardSide.equals("front")) {
|
||||||
|
vo.setName(wordsResult.getName() != null ? wordsResult.getName().getWords() : "");
|
||||||
|
vo.setNation(wordsResult.getNation() != null ? wordsResult.getNation().getWords() : "");
|
||||||
|
vo.setAddress(wordsResult.getAddress() != null ? wordsResult.getAddress().getWords() : "");
|
||||||
|
vo.setCitizenIdentification(wordsResult.getCitizenIdentification() != null ? wordsResult.getCitizenIdentification().getWords() : "");
|
||||||
|
vo.setBirth(wordsResult.getBirth() != null ? wordsResult.getBirth().getWords() : "");
|
||||||
|
vo.setGender(wordsResult.getGender() != null ? wordsResult.getGender().getWords() : "");
|
||||||
|
vo.setImage(upload);
|
||||||
|
} else {
|
||||||
|
vo.setExpiryDate(wordsResult.getExpiryDate() != null ? wordsResult.getExpiryDate().getWords() : "");
|
||||||
|
vo.setIssuingAuthority(wordsResult.getIssuingAuthority() != null ? wordsResult.getIssuingAuthority().getWords() : "");
|
||||||
|
vo.setIssuingDate(wordsResult.getIssuingDate() != null ? wordsResult.getIssuingDate().getWords() : "");
|
||||||
|
vo.setImage(upload);
|
||||||
|
}
|
||||||
|
return vo;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1024,7 +1044,7 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
* @return 银行卡信息
|
* @return 银行卡信息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public BankData getBankCardMessageByPic(MultipartFile file) {
|
public SubConstructionUserOrcBankVo getBankCardMessageByPic(MultipartFile file) {
|
||||||
if (file == null) {
|
if (file == null) {
|
||||||
throw new ServiceException("请上传图片", HttpStatus.BAD_REQUEST);
|
throw new ServiceException("请上传图片", HttpStatus.BAD_REQUEST);
|
||||||
}
|
}
|
||||||
@ -1046,20 +1066,25 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
}
|
}
|
||||||
// 获取数据成功,保存图片信息
|
// 获取数据成功,保存图片信息
|
||||||
SysOssVo upload = ossService.upload(file);
|
SysOssVo upload = ossService.upload(file);
|
||||||
res.setImage(upload);
|
SubConstructionUserOrcBankVo vo = new SubConstructionUserOrcBankVo();
|
||||||
return res;
|
vo.setBankCardNumber(res.getBankCardNumber());
|
||||||
|
vo.setValidDate(res.getValidDate());
|
||||||
|
vo.setBankCardType(res.getBankCardType());
|
||||||
|
vo.setBankName(res.getBankName());
|
||||||
|
vo.setHolderName(res.getHolderName());
|
||||||
|
vo.setImage(upload);
|
||||||
|
return vo;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 实名认证
|
* 实名认证
|
||||||
*
|
*
|
||||||
* @param file 人脸图片
|
* @param req 身份信息认证对象
|
||||||
* @param req 身份信息认证对象
|
|
||||||
* @return 是否认证成功
|
* @return 是否认证成功
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Long insertByAuthentication(MultipartFile file, SubConstructionUserAuthenticationReq req) {
|
public Long insertByAuthentication(SubConstructionUserAuthenticationReq req) {
|
||||||
// 先进行人脸识别
|
/* // 先进行人脸识别
|
||||||
if (file == null) {
|
if (file == null) {
|
||||||
throw new ServiceException("请上传图片", HttpStatus.BAD_REQUEST);
|
throw new ServiceException("请上传图片", HttpStatus.BAD_REQUEST);
|
||||||
}
|
}
|
||||||
@ -1074,12 +1099,13 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
}
|
}
|
||||||
HumanFaceReq request = new HumanFaceReq();
|
HumanFaceReq request = new HumanFaceReq();
|
||||||
request.setImage(base64);
|
request.setImage(base64);
|
||||||
baiDuFace.humanFace(request);
|
baiDuFace.humanFace(request);*/
|
||||||
// 人脸识别成功,保存人脸数据
|
// 人脸识别成功,保存人脸数据
|
||||||
SubConstructionUser user = new SubConstructionUser();
|
SubConstructionUser user = new SubConstructionUser();
|
||||||
BeanUtils.copyProperties(req, user);
|
BeanUtils.copyProperties(req, user);
|
||||||
SysOssVo upload = ossService.upload(file);
|
// 对身份证号码进行加密
|
||||||
user.setFacePic(upload.getOssId().toString());
|
String encrypt = idCardEncryptorUtil.encrypt(req.getSfzNumber());
|
||||||
|
user.setSfzNumber(encrypt);
|
||||||
// 关联系统用户
|
// 关联系统用户
|
||||||
Long userId = LoginHelper.getUserId();
|
Long userId = LoginHelper.getUserId();
|
||||||
// 判断当前系统用户是否已关联
|
// 判断当前系统用户是否已关联
|
||||||
|
@ -20,6 +20,7 @@ import org.dromara.contractor.domain.SubContractor;
|
|||||||
import org.dromara.contractor.domain.dto.contractor.SubContractorCreateReq;
|
import org.dromara.contractor.domain.dto.contractor.SubContractorCreateReq;
|
||||||
import org.dromara.contractor.domain.dto.contractor.SubContractorQueryReq;
|
import org.dromara.contractor.domain.dto.contractor.SubContractorQueryReq;
|
||||||
import org.dromara.contractor.domain.dto.contractor.SubContractorUpdateReq;
|
import org.dromara.contractor.domain.dto.contractor.SubContractorUpdateReq;
|
||||||
|
import org.dromara.contractor.domain.vo.contractor.SubContractorManagerVo;
|
||||||
import org.dromara.contractor.domain.vo.contractor.SubContractorVo;
|
import org.dromara.contractor.domain.vo.contractor.SubContractorVo;
|
||||||
import org.dromara.contractor.mapper.SubContractorMapper;
|
import org.dromara.contractor.mapper.SubContractorMapper;
|
||||||
import org.dromara.contractor.service.ISubConstructionUserService;
|
import org.dromara.contractor.service.ISubConstructionUserService;
|
||||||
@ -363,4 +364,22 @@ public class SubContractorServiceImpl extends ServiceImpl<SubContractorMapper, S
|
|||||||
contractorVoPage.setRecords(contractorVoList);
|
contractorVoPage.setRecords(contractorVoList);
|
||||||
return contractorVoPage;
|
return contractorVoPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取分包公司管理员列表
|
||||||
|
*
|
||||||
|
* @param projectId 项目id
|
||||||
|
* @return 分包公司经理列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SubContractorManagerVo> queryManagerList(Long projectId) {
|
||||||
|
List<SubContractor> contractorList = this.lambdaQuery()
|
||||||
|
.eq(SubContractor::getProjectId, projectId)
|
||||||
|
.list();
|
||||||
|
if (CollUtil.isEmpty(contractorList)) {
|
||||||
|
return List.of();
|
||||||
|
}
|
||||||
|
Set<Long> contractorIds = contractorList.stream().map(SubContractor::getId).collect(Collectors.toSet());
|
||||||
|
return List.of();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
package org.dromara.out.service.impl;
|
package org.dromara.out.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.convert.Convert;
|
import cn.hutool.core.convert.Convert;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
||||||
import org.dromara.common.core.domain.event.ProcessEvent;
|
import org.dromara.common.core.domain.event.ProcessEvent;
|
||||||
@ -9,14 +13,15 @@ import org.dromara.common.core.domain.event.ProcessTaskEvent;
|
|||||||
import org.dromara.common.core.enums.BusinessStatusEnum;
|
import org.dromara.common.core.enums.BusinessStatusEnum;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.dromara.facility.domain.vo.matrix.FacMatrixVo;
|
import org.dromara.facility.domain.vo.matrix.FacMatrixVo;
|
||||||
import org.dromara.facility.service.IFacMatrixService;
|
import org.dromara.facility.service.IFacMatrixService;
|
||||||
|
import org.dromara.out.domain.OutConstructionValue;
|
||||||
|
import org.dromara.out.domain.bo.OutConstructionValueBo;
|
||||||
|
import org.dromara.out.domain.vo.OutConstructionValueVo;
|
||||||
|
import org.dromara.out.mapper.OutConstructionValueMapper;
|
||||||
|
import org.dromara.out.service.IOutConstructionValueService;
|
||||||
import org.dromara.progress.domain.PgsProgressCategory;
|
import org.dromara.progress.domain.PgsProgressCategory;
|
||||||
import org.dromara.progress.domain.vo.progresscategory.PgsProgressCategoryVo;
|
import org.dromara.progress.domain.vo.progresscategory.PgsProgressCategoryVo;
|
||||||
import org.dromara.progress.service.IPgsProgressCategoryService;
|
import org.dromara.progress.service.IPgsProgressCategoryService;
|
||||||
@ -24,16 +29,11 @@ import org.dromara.project.domain.vo.project.BusProjectVo;
|
|||||||
import org.dromara.project.service.IBusProjectService;
|
import org.dromara.project.service.IBusProjectService;
|
||||||
import org.springframework.context.event.EventListener;
|
import org.springframework.context.event.EventListener;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.dromara.out.domain.bo.OutConstructionValueBo;
|
|
||||||
import org.dromara.out.domain.vo.OutConstructionValueVo;
|
|
||||||
import org.dromara.out.domain.OutConstructionValue;
|
|
||||||
import org.dromara.out.mapper.OutConstructionValueMapper;
|
|
||||||
import org.dromara.out.service.IOutConstructionValueService;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 施工产值Service业务层处理
|
* 施工产值Service业务层处理
|
||||||
@ -61,7 +61,7 @@ public class OutConstructionValueServiceImpl extends ServiceImpl<OutConstruction
|
|||||||
* @return 施工产值
|
* @return 施工产值
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public OutConstructionValueVo queryById(Long id){
|
public OutConstructionValueVo queryById(Long id) {
|
||||||
return baseMapper.selectVoById(id);
|
return baseMapper.selectVoById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ public class OutConstructionValueServiceImpl extends ServiceImpl<OutConstruction
|
|||||||
LambdaQueryWrapper<OutConstructionValue> lqw = buildQueryWrapper(bo);
|
LambdaQueryWrapper<OutConstructionValue> lqw = buildQueryWrapper(bo);
|
||||||
List<OutConstructionValueVo> outConstructionValueVos = baseMapper.selectVoList(lqw);
|
List<OutConstructionValueVo> outConstructionValueVos = baseMapper.selectVoList(lqw);
|
||||||
supplementaryData(outConstructionValueVos);
|
supplementaryData(outConstructionValueVos);
|
||||||
return outConstructionValueVos;
|
return outConstructionValueVos;
|
||||||
}
|
}
|
||||||
|
|
||||||
private LambdaQueryWrapper<OutConstructionValue> buildQueryWrapper(OutConstructionValueBo bo) {
|
private LambdaQueryWrapper<OutConstructionValue> buildQueryWrapper(OutConstructionValueBo bo) {
|
||||||
@ -123,10 +123,10 @@ public class OutConstructionValueServiceImpl extends ServiceImpl<OutConstruction
|
|||||||
validEntityBeforeSave(add);
|
validEntityBeforeSave(add);
|
||||||
//计算产值
|
//计算产值
|
||||||
PgsProgressCategory progressCategory = pgsProgressCategoryService.getById(bo.getProgressCategoryId());
|
PgsProgressCategory progressCategory = pgsProgressCategoryService.getById(bo.getProgressCategoryId());
|
||||||
if(progressCategory != null ){
|
if (progressCategory != null) {
|
||||||
if("1".equals(progressCategory.getUnitType())){
|
if ("1".equals(progressCategory.getUnitType())) {
|
||||||
add.setOutValue(progressCategory.getUnitPrice().multiply(BigDecimal.valueOf(bo.getArtificialNum())));
|
add.setOutValue(progressCategory.getUnitPrice().multiply(BigDecimal.valueOf(bo.getArtificialNum())));
|
||||||
}else if("2".equals(progressCategory.getUnitType())){
|
} else if ("2".equals(progressCategory.getUnitType())) {
|
||||||
add.setOutValue(progressCategory.getUnitPrice().multiply(BigDecimal.valueOf(bo.getUavNum()).divide(new BigDecimal("100"))));
|
add.setOutValue(progressCategory.getUnitPrice().multiply(BigDecimal.valueOf(bo.getUavNum()).divide(new BigDecimal("100"))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -154,7 +154,7 @@ public class OutConstructionValueServiceImpl extends ServiceImpl<OutConstruction
|
|||||||
/**
|
/**
|
||||||
* 保存前的数据校验
|
* 保存前的数据校验
|
||||||
*/
|
*/
|
||||||
private void validEntityBeforeSave(OutConstructionValue entity){
|
private void validEntityBeforeSave(OutConstructionValue entity) {
|
||||||
//TODO 做一些数据校验,如唯一约束
|
//TODO 做一些数据校验,如唯一约束
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,7 +167,7 @@ public class OutConstructionValueServiceImpl extends ServiceImpl<OutConstruction
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
if(isValid){
|
if (isValid) {
|
||||||
//TODO 做一些业务上的校验,判断是否需要校验
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
}
|
}
|
||||||
return baseMapper.deleteByIds(ids) > 0;
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
@ -176,8 +176,8 @@ public class OutConstructionValueServiceImpl extends ServiceImpl<OutConstruction
|
|||||||
/**
|
/**
|
||||||
* 补充数据
|
* 补充数据
|
||||||
*/
|
*/
|
||||||
public void supplementaryData(List<OutConstructionValueVo> list){
|
public void supplementaryData(List<OutConstructionValueVo> list) {
|
||||||
for (OutConstructionValueVo vo : list){
|
for (OutConstructionValueVo vo : list) {
|
||||||
//查询项目
|
//查询项目
|
||||||
BusProjectVo busProjectVo = busProjectService.queryById(vo.getProjectId());
|
BusProjectVo busProjectVo = busProjectService.queryById(vo.getProjectId());
|
||||||
vo.setProjectName(busProjectVo.getProjectName());
|
vo.setProjectName(busProjectVo.getProjectName());
|
||||||
@ -194,7 +194,7 @@ public class OutConstructionValueServiceImpl extends ServiceImpl<OutConstruction
|
|||||||
PgsProgressCategoryVo pgsProgressCategoryVo = pgsProgressCategoryService.queryById(vo.getProgressCategoryId());
|
PgsProgressCategoryVo pgsProgressCategoryVo = pgsProgressCategoryService.queryById(vo.getProgressCategoryId());
|
||||||
vo.setProgressCategoryName(pgsProgressCategoryVo.getName());
|
vo.setProgressCategoryName(pgsProgressCategoryVo.getName());
|
||||||
|
|
||||||
PgsProgressCategoryVo pgsProgressCategoryVo1 = pgsProgressCategoryService.queryById(pgsProgressCategoryVo.getPid());
|
PgsProgressCategoryVo pgsProgressCategoryVo1 = pgsProgressCategoryService.queryById(pgsProgressCategoryVo.getParentId());
|
||||||
vo.setCategoryId(pgsProgressCategoryVo1.getId());
|
vo.setCategoryId(pgsProgressCategoryVo1.getId());
|
||||||
vo.setCategoryName(pgsProgressCategoryVo1.getName());
|
vo.setCategoryName(pgsProgressCategoryVo1.getName());
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,107 @@
|
|||||||
|
package org.dromara.progress.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.progress.domain.dto.constructionscheduleplan.PgsConstructionSchedulePlanCreateReq;
|
||||||
|
import org.dromara.progress.domain.dto.constructionscheduleplan.PgsConstructionSchedulePlanQueryReq;
|
||||||
|
import org.dromara.progress.domain.dto.constructionscheduleplan.PgsConstructionSchedulePlanUpdateReq;
|
||||||
|
import org.dromara.progress.domain.vo.constructionscheduleplan.PgsConstructionSchedulePlanVo;
|
||||||
|
import org.dromara.progress.service.IPgsConstructionSchedulePlanService;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工进度计划
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-08-01
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/progress/constructionSchedulePlan")
|
||||||
|
public class PgsConstructionSchedulePlanController extends BaseController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IPgsConstructionSchedulePlanService pgsConstructionSchedulePlanService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询施工进度计划列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("progress:constructionSchedulePlan:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public R<List<PgsConstructionSchedulePlanVo>> list(PgsConstructionSchedulePlanQueryReq req) {
|
||||||
|
List<PgsConstructionSchedulePlanVo> list = pgsConstructionSchedulePlanService.queryList(req);
|
||||||
|
return R.ok(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出施工进度计划列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("progress:constructionSchedulePlan:export")
|
||||||
|
@Log(title = "施工进度计划", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(PgsConstructionSchedulePlanQueryReq req, HttpServletResponse response) {
|
||||||
|
List<PgsConstructionSchedulePlanVo> list = pgsConstructionSchedulePlanService.queryList(req);
|
||||||
|
ExcelUtil.exportExcel(list, "施工进度计划", PgsConstructionSchedulePlanVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取施工进度计划详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("progress:constructionSchedulePlan:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<PgsConstructionSchedulePlanVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(pgsConstructionSchedulePlanService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增施工进度计划
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("progress:constructionSchedulePlan:add")
|
||||||
|
@Log(title = "施工进度计划", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<PgsConstructionSchedulePlanVo> add(@Validated(AddGroup.class) @RequestBody PgsConstructionSchedulePlanCreateReq req) {
|
||||||
|
return R.ok(pgsConstructionSchedulePlanService.insertByBo(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改施工进度计划
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("progress:constructionSchedulePlan:edit")
|
||||||
|
@Log(title = "施工进度计划", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody PgsConstructionSchedulePlanUpdateReq req) {
|
||||||
|
return toAjax(pgsConstructionSchedulePlanService.updateByBo(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除施工进度计划
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("progress:constructionSchedulePlan:remove")
|
||||||
|
@Log(title = "施工进度计划", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(pgsConstructionSchedulePlanService.deleteByIds(List.of(ids)));
|
||||||
|
}
|
||||||
|
}
|
@ -6,7 +6,6 @@ import jakarta.servlet.http.HttpServletResponse;
|
|||||||
import jakarta.validation.constraints.NotEmpty;
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import org.dromara.common.core.domain.R;
|
import org.dromara.common.core.domain.R;
|
||||||
import org.dromara.common.core.validate.EditGroup;
|
|
||||||
import org.dromara.common.excel.utils.ExcelUtil;
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
import org.dromara.common.log.annotation.Log;
|
import org.dromara.common.log.annotation.Log;
|
||||||
@ -111,7 +110,7 @@ public class PgsProgressCategoryController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 新增分项工程单价
|
* 新增分项工程单价
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("progress:progressCategory:add")
|
@SaCheckPermission("progress:progressCategory:price")
|
||||||
@Log(title = "进度类别", businessType = BusinessType.INSERT)
|
@Log(title = "进度类别", businessType = BusinessType.INSERT)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PostMapping("/price")
|
@PostMapping("/price")
|
||||||
@ -126,7 +125,7 @@ public class PgsProgressCategoryController extends BaseController {
|
|||||||
@Log(title = "进度类别", businessType = BusinessType.UPDATE)
|
@Log(title = "进度类别", businessType = BusinessType.UPDATE)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PutMapping()
|
@PutMapping()
|
||||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody PgsProgressCategoryUpdateReq req) {
|
public R<Void> edit(@Validated @RequestBody PgsProgressCategoryUpdateReq req) {
|
||||||
return toAjax(pgsProgressCategoryService.updateByBo(req));
|
return toAjax(pgsProgressCategoryService.updateByBo(req));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,82 @@
|
|||||||
|
package org.dromara.progress.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工进度计划对象 pgs_construction_schedule_plan
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-08-01
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("pgs_construction_schedule_plan")
|
||||||
|
public class PgsConstructionSchedulePlan extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父ID
|
||||||
|
*/
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点名称
|
||||||
|
*/
|
||||||
|
private String nodeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对应项目结构
|
||||||
|
*/
|
||||||
|
private Long projectStructure;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预计开始时间
|
||||||
|
*/
|
||||||
|
private Date planStartDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预计结束时间
|
||||||
|
*/
|
||||||
|
private Date planEndDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际开始时间
|
||||||
|
*/
|
||||||
|
private Date practicalStartDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际结束时间
|
||||||
|
*/
|
||||||
|
private Date practicalEndDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
@ -32,7 +32,7 @@ public class PgsProgressCategory extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 父类别id
|
* 父类别id
|
||||||
*/
|
*/
|
||||||
private Long pid;
|
private Long parentId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目id
|
* 项目id
|
||||||
@ -75,17 +75,17 @@ public class PgsProgressCategory extends BaseEntity {
|
|||||||
private BigDecimal outputValue;
|
private BigDecimal outputValue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 总数量/百分比
|
* 总数量
|
||||||
*/
|
*/
|
||||||
private BigDecimal total;
|
private BigDecimal total;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 已完成数量/百分比
|
* 已完成数量
|
||||||
*/
|
*/
|
||||||
private BigDecimal completed;
|
private BigDecimal completed;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计划总数量/百分比
|
* 计划总数量
|
||||||
*/
|
*/
|
||||||
private BigDecimal planTotal;
|
private BigDecimal planTotal;
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ public class PgsProgressCategoryTemplate implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 父类别id
|
* 父类别id
|
||||||
*/
|
*/
|
||||||
private Long pid;
|
private Long parentId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 类别名称
|
* 类别名称
|
||||||
|
@ -0,0 +1,77 @@
|
|||||||
|
package org.dromara.progress.domain.dto.constructionscheduleplan;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-08-01 14:05
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PgsConstructionSchedulePlanCreateReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 4060838737379600701L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "项目ID不能为空")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父ID
|
||||||
|
*/
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "节点名称不能为空")
|
||||||
|
private String nodeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对应项目结构
|
||||||
|
*/
|
||||||
|
private Long projectStructure;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预计开始时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
|
||||||
|
private Date planStartDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预计结束时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
|
||||||
|
private Date planEndDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际开始时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
|
||||||
|
private Date practicalStartDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际结束时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
|
||||||
|
private Date practicalEndDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
package org.dromara.progress.domain.dto.constructionscheduleplan;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-08-01 14:05
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PgsConstructionSchedulePlanQueryReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 9021370369055688811L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点名称
|
||||||
|
*/
|
||||||
|
private String nodeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
}
|
@ -0,0 +1,58 @@
|
|||||||
|
package org.dromara.progress.domain.dto.constructionscheduleplan;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-08-01 14:06
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PgsConstructionSchedulePlanUpdateReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 6955873817030428268L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点名称
|
||||||
|
*/
|
||||||
|
private String nodeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对应项目结构
|
||||||
|
*/
|
||||||
|
private Long projectStructure;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际开始时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
|
||||||
|
private Date practicalStartDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际结束时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
|
||||||
|
private Date practicalEndDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
@ -27,13 +27,8 @@ public class PgsProgressCategoryCreatePriceReq {
|
|||||||
private BigDecimal unitPrice;
|
private BigDecimal unitPrice;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 产值金额
|
* 总数量
|
||||||
*/
|
*/
|
||||||
private BigDecimal outputValue;
|
private BigDecimal total;
|
||||||
|
|
||||||
/**
|
|
||||||
* 备注
|
|
||||||
*/
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ public class PgsProgressCategoryUpdateReq {
|
|||||||
/**
|
/**
|
||||||
* 父类别id
|
* 父类别id
|
||||||
*/
|
*/
|
||||||
private Long pid;
|
private Long parentId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目id
|
* 项目id
|
||||||
|
@ -18,7 +18,7 @@ public class PgsProgressCategoryTemplateCreateReq implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 父类别id
|
* 父类别id
|
||||||
*/
|
*/
|
||||||
private Long pid;
|
private Long parentId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 类别名称
|
* 类别名称
|
||||||
|
@ -17,7 +17,7 @@ public class PgsProgressCategoryTemplateQueryReq implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 父类别id
|
* 父类别id
|
||||||
*/
|
*/
|
||||||
private Long pid;
|
private Long parentId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 类别名称
|
* 类别名称
|
||||||
|
@ -23,7 +23,7 @@ public class PgsProgressCategoryTemplateUpdateReq implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 父类别id
|
* 父类别id
|
||||||
*/
|
*/
|
||||||
private Long pid;
|
private Long parentId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 类别名称
|
* 类别名称
|
||||||
|
@ -0,0 +1,103 @@
|
|||||||
|
package org.dromara.progress.domain.vo.constructionscheduleplan;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||||
|
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||||
|
import org.dromara.progress.domain.PgsConstructionSchedulePlan;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工进度计划视图对象 pgs_construction_schedule_plan
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-08-01
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = PgsConstructionSchedulePlan.class)
|
||||||
|
public class PgsConstructionSchedulePlanVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "主键ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "项目ID")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "父ID")
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "节点名称")
|
||||||
|
private String nodeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对应项目结构
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "对应项目结构")
|
||||||
|
private Long projectStructure;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预计开始时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "预计开始时间")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Date planStartDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预计结束时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "预计结束时间")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Date planEndDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际开始时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "实际开始时间")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Date practicalStartDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际结束时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "实际结束时间")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Date practicalEndDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(dictType = "project_construction_status")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -39,7 +39,7 @@ public class PgsProgressCategoryVo implements Serializable {
|
|||||||
* 父类别id
|
* 父类别id
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "父类别id")
|
@ExcelProperty(value = "父类别id")
|
||||||
private Long pid;
|
private Long parentId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目id
|
* 项目id
|
||||||
|
@ -36,7 +36,7 @@ public class PgsProgressCategoryTemplateVo implements Serializable {
|
|||||||
* 父类别id
|
* 父类别id
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "父类别id")
|
@ExcelProperty(value = "父类别id")
|
||||||
private Long pid;
|
private Long parentId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 类别名称
|
* 类别名称
|
||||||
|
@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.progress.mapper;
|
||||||
|
|
||||||
|
import org.dromara.progress.domain.PgsConstructionSchedulePlan;
|
||||||
|
import org.dromara.progress.domain.vo.constructionscheduleplan.PgsConstructionSchedulePlanVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工进度计划Mapper接口
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-08-01
|
||||||
|
*/
|
||||||
|
public interface PgsConstructionSchedulePlanMapper extends BaseMapperPlus<PgsConstructionSchedulePlan, PgsConstructionSchedulePlanVo> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,85 @@
|
|||||||
|
package org.dromara.progress.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.dromara.progress.domain.PgsConstructionSchedulePlan;
|
||||||
|
import org.dromara.progress.domain.dto.constructionscheduleplan.PgsConstructionSchedulePlanCreateReq;
|
||||||
|
import org.dromara.progress.domain.dto.constructionscheduleplan.PgsConstructionSchedulePlanQueryReq;
|
||||||
|
import org.dromara.progress.domain.dto.constructionscheduleplan.PgsConstructionSchedulePlanUpdateReq;
|
||||||
|
import org.dromara.progress.domain.vo.constructionscheduleplan.PgsConstructionSchedulePlanVo;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工进度计划Service接口
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-08-01
|
||||||
|
*/
|
||||||
|
public interface IPgsConstructionSchedulePlanService extends IService<PgsConstructionSchedulePlan> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询施工进度计划
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 施工进度计划
|
||||||
|
*/
|
||||||
|
PgsConstructionSchedulePlanVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的施工进度计划列表
|
||||||
|
*
|
||||||
|
* @param req 查询条件
|
||||||
|
* @return 施工进度计划列表
|
||||||
|
*/
|
||||||
|
List<PgsConstructionSchedulePlanVo> queryList(PgsConstructionSchedulePlanQueryReq req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增施工进度计划
|
||||||
|
*
|
||||||
|
* @param req 施工进度计划
|
||||||
|
* @return 新增施工进度计划封装
|
||||||
|
*/
|
||||||
|
PgsConstructionSchedulePlanVo insertByBo(PgsConstructionSchedulePlanCreateReq req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改施工进度计划
|
||||||
|
*
|
||||||
|
* @param req 施工进度计划
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(PgsConstructionSchedulePlanUpdateReq req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除施工进度计划信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteByIds(Collection<Long> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取施工进度计划视图对象
|
||||||
|
*
|
||||||
|
* @param constructionSchedulePlan 施工进度计划对象
|
||||||
|
* @return 施工进度计划视图对象
|
||||||
|
*/
|
||||||
|
PgsConstructionSchedulePlanVo getVo(PgsConstructionSchedulePlan constructionSchedulePlan);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取施工进度计划查询条件封装
|
||||||
|
*
|
||||||
|
* @param req 查询条件
|
||||||
|
* @return 查询条件封装
|
||||||
|
*/
|
||||||
|
LambdaQueryWrapper<PgsConstructionSchedulePlan> buildQueryWrapper(PgsConstructionSchedulePlanQueryReq req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取施工进度计划分页对象视图
|
||||||
|
*
|
||||||
|
* @param constructionSchedulePlanList 施工进度计划分页对象
|
||||||
|
* @return 施工进度计划分页对象视图
|
||||||
|
*/
|
||||||
|
List<PgsConstructionSchedulePlanVo> getVoList(List<PgsConstructionSchedulePlan> constructionSchedulePlanList);
|
||||||
|
}
|
@ -0,0 +1,149 @@
|
|||||||
|
package org.dromara.progress.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.dromara.common.core.constant.HttpStatus;
|
||||||
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
|
import org.dromara.common.core.utils.ObjectUtils;
|
||||||
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
|
import org.dromara.progress.domain.PgsConstructionSchedulePlan;
|
||||||
|
import org.dromara.progress.domain.dto.constructionscheduleplan.PgsConstructionSchedulePlanCreateReq;
|
||||||
|
import org.dromara.progress.domain.dto.constructionscheduleplan.PgsConstructionSchedulePlanQueryReq;
|
||||||
|
import org.dromara.progress.domain.dto.constructionscheduleplan.PgsConstructionSchedulePlanUpdateReq;
|
||||||
|
import org.dromara.progress.domain.vo.constructionscheduleplan.PgsConstructionSchedulePlanVo;
|
||||||
|
import org.dromara.progress.mapper.PgsConstructionSchedulePlanMapper;
|
||||||
|
import org.dromara.progress.service.IPgsConstructionSchedulePlanService;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工进度计划Service业务层处理
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-08-01
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class PgsConstructionSchedulePlanServiceImpl extends ServiceImpl<PgsConstructionSchedulePlanMapper, PgsConstructionSchedulePlan> implements IPgsConstructionSchedulePlanService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询施工进度计划
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 施工进度计划
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public PgsConstructionSchedulePlanVo queryById(Long id) {
|
||||||
|
PgsConstructionSchedulePlan constructionSchedulePlan = this.getById(id);
|
||||||
|
if (constructionSchedulePlan == null) {
|
||||||
|
throw new ServiceException("施工进度计划信息不存在", HttpStatus.NOT_FOUND);
|
||||||
|
}
|
||||||
|
return this.getVo(constructionSchedulePlan);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的施工进度计划列表
|
||||||
|
*
|
||||||
|
* @param req 查询条件
|
||||||
|
* @return 施工进度计划列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<PgsConstructionSchedulePlanVo> queryList(PgsConstructionSchedulePlanQueryReq req) {
|
||||||
|
List<PgsConstructionSchedulePlan> result = this.list(this.buildQueryWrapper(req));
|
||||||
|
return this.getVoList(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增施工进度计划
|
||||||
|
*
|
||||||
|
* @param req 施工进度计划
|
||||||
|
* @return 新增施工进度计划封装
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public PgsConstructionSchedulePlanVo insertByBo(PgsConstructionSchedulePlanCreateReq req) {
|
||||||
|
PgsConstructionSchedulePlan constructionSchedulePlan = new PgsConstructionSchedulePlan();
|
||||||
|
BeanUtils.copyProperties(req, constructionSchedulePlan);
|
||||||
|
boolean save = this.save(constructionSchedulePlan);
|
||||||
|
if (!save) {
|
||||||
|
throw new ServiceException("新增施工进度计划信息异常", HttpStatus.ERROR);
|
||||||
|
}
|
||||||
|
PgsConstructionSchedulePlan newConstructionSchedulePlan = this.getById(constructionSchedulePlan.getId());
|
||||||
|
return this.getVo(newConstructionSchedulePlan);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改施工进度计划
|
||||||
|
*
|
||||||
|
* @param req 施工进度计划
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(PgsConstructionSchedulePlanUpdateReq req) {
|
||||||
|
PgsConstructionSchedulePlan constructionSchedulePlan = new PgsConstructionSchedulePlan();
|
||||||
|
BeanUtils.copyProperties(req, constructionSchedulePlan);
|
||||||
|
return this.updateById(constructionSchedulePlan);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除施工进度计划信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean deleteByIds(Collection<Long> ids) {
|
||||||
|
return this.removeBatchByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取施工进度计划视图对象
|
||||||
|
*
|
||||||
|
* @param constructionSchedulePlan 施工进度计划对象
|
||||||
|
* @return 施工进度计划视图对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public PgsConstructionSchedulePlanVo getVo(PgsConstructionSchedulePlan constructionSchedulePlan) {
|
||||||
|
PgsConstructionSchedulePlanVo vo = new PgsConstructionSchedulePlanVo();
|
||||||
|
if (constructionSchedulePlan == null) {
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
BeanUtils.copyProperties(constructionSchedulePlan, vo);
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取施工进度计划查询条件封装
|
||||||
|
*
|
||||||
|
* @param req 查询条件
|
||||||
|
* @return 查询条件封装
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public LambdaQueryWrapper<PgsConstructionSchedulePlan> buildQueryWrapper(PgsConstructionSchedulePlanQueryReq req) {
|
||||||
|
LambdaQueryWrapper<PgsConstructionSchedulePlan> lqw = new LambdaQueryWrapper<>();
|
||||||
|
if (req == null) {
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
Long projectId = req.getProjectId();
|
||||||
|
String nodeName = req.getNodeName();
|
||||||
|
String status = req.getStatus();
|
||||||
|
lqw.eq(ObjectUtils.isNotEmpty(projectId), PgsConstructionSchedulePlan::getProjectId, projectId);
|
||||||
|
lqw.like(StringUtils.isNotBlank(nodeName), PgsConstructionSchedulePlan::getNodeName, nodeName);
|
||||||
|
lqw.eq(StringUtils.isNotBlank(status), PgsConstructionSchedulePlan::getStatus, status);
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取施工进度计划分页对象视图
|
||||||
|
*
|
||||||
|
* @param constructionSchedulePlanList 施工进度计划分页对象
|
||||||
|
* @return 施工进度计划分页对象视图
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<PgsConstructionSchedulePlanVo> getVoList(List<PgsConstructionSchedulePlan> constructionSchedulePlanList) {
|
||||||
|
return constructionSchedulePlanList.stream().map(this::getVo).toList();
|
||||||
|
}
|
||||||
|
}
|
@ -168,11 +168,19 @@ public class PgsProgressCategoryServiceImpl extends ServiceImpl<PgsProgressCateg
|
|||||||
if (progressCategory == null) {
|
if (progressCategory == null) {
|
||||||
throw new ServiceException("该分项工程不存在", HttpStatus.BAD_REQUEST);
|
throw new ServiceException("该分项工程不存在", HttpStatus.BAD_REQUEST);
|
||||||
}
|
}
|
||||||
|
// 计算产值
|
||||||
|
BigDecimal unitPrice = req.getUnitPrice();
|
||||||
|
BigDecimal outputValue = BigDecimal.ZERO;
|
||||||
|
if (progressCategory.getUnitType().equals(PgsProgressUnitTypeEnum.PERCENTAGE.getValue())) {
|
||||||
|
progressCategory.setTotal(req.getTotal());
|
||||||
|
outputValue = req.getTotal().multiply(unitPrice);
|
||||||
|
} else if (progressCategory.getUnitType().equals(PgsProgressUnitTypeEnum.NUMBER.getValue())) {
|
||||||
|
outputValue = progressCategory.getTotal().multiply(unitPrice);
|
||||||
|
}
|
||||||
// 填入数据
|
// 填入数据
|
||||||
progressCategory.setUnit(req.getUnit());
|
progressCategory.setUnit(req.getUnit());
|
||||||
progressCategory.setUnitPrice(req.getUnitPrice());
|
progressCategory.setUnitPrice(unitPrice);
|
||||||
progressCategory.setOutputValue(req.getOutputValue());
|
progressCategory.setOutputValue(outputValue);
|
||||||
progressCategory.setRemark(req.getRemark());
|
|
||||||
// 写入数据库
|
// 写入数据库
|
||||||
return this.updateById(progressCategory);
|
return this.updateById(progressCategory);
|
||||||
}
|
}
|
||||||
@ -208,14 +216,14 @@ public class PgsProgressCategoryServiceImpl extends ServiceImpl<PgsProgressCateg
|
|||||||
private void validEntityBeforeSave(PgsProgressCategory entity) {
|
private void validEntityBeforeSave(PgsProgressCategory entity) {
|
||||||
// TODO 做一些数据校验,如唯一约束
|
// TODO 做一些数据校验,如唯一约束
|
||||||
Long projectId = entity.getProjectId();
|
Long projectId = entity.getProjectId();
|
||||||
Long pid = entity.getPid();
|
Long parentId = entity.getParentId();
|
||||||
if (projectId != null && projectId != 0) {
|
if (projectId != null && projectId != 0) {
|
||||||
if (this.getById(projectId) == null) {
|
if (projectService.getById(projectId) == null) {
|
||||||
throw new ServiceException("对应项目不存在", HttpStatus.NOT_FOUND);
|
throw new ServiceException("对应项目不存在", HttpStatus.NOT_FOUND);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pid != null && pid != 0) {
|
if (parentId != null && parentId != 0) {
|
||||||
if (this.getById(pid) == null) {
|
if (this.getById(parentId) == null) {
|
||||||
throw new ServiceException("对应进度类别不存在", HttpStatus.NOT_FOUND);
|
throw new ServiceException("对应进度类别不存在", HttpStatus.NOT_FOUND);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -225,8 +233,8 @@ public class PgsProgressCategoryServiceImpl extends ServiceImpl<PgsProgressCateg
|
|||||||
if (projectId != null && projectId != 0) {
|
if (projectId != null && projectId != 0) {
|
||||||
lqw.eq(PgsProgressCategory::getProjectId, entity.getProjectId());
|
lqw.eq(PgsProgressCategory::getProjectId, entity.getProjectId());
|
||||||
}
|
}
|
||||||
if (pid != null && pid != 0) {
|
if (parentId != null && parentId != 0) {
|
||||||
lqw.eq(PgsProgressCategory::getPid, entity.getPid());
|
lqw.eq(PgsProgressCategory::getParentId, entity.getParentId());
|
||||||
}
|
}
|
||||||
if (entity.getId() != null) {
|
if (entity.getId() != null) {
|
||||||
// 排除自身
|
// 排除自身
|
||||||
@ -300,14 +308,14 @@ public class PgsProgressCategoryServiceImpl extends ServiceImpl<PgsProgressCateg
|
|||||||
}
|
}
|
||||||
// 1. 构建 pid -> 子节点列表的映射
|
// 1. 构建 pid -> 子节点列表的映射
|
||||||
Map<Long, List<PgsProgressCategory>> parentIdToChildrenMap = progressCategoryList.stream()
|
Map<Long, List<PgsProgressCategory>> parentIdToChildrenMap = progressCategoryList.stream()
|
||||||
.filter(item -> item.getPid() != 0)
|
.filter(item -> item.getParentId() != 0)
|
||||||
.collect(Collectors.groupingBy(PgsProgressCategory::getPid));
|
.collect(Collectors.groupingBy(PgsProgressCategory::getParentId));
|
||||||
// 对象列表 => 封装对象列表
|
// 对象列表 => 封装对象列表
|
||||||
return progressCategoryList.stream().map(progressCategory -> {
|
return progressCategoryList.stream().map(progressCategory -> {
|
||||||
PgsProgressCategoryVo vo = new PgsProgressCategoryVo();
|
PgsProgressCategoryVo vo = new PgsProgressCategoryVo();
|
||||||
BeanUtils.copyProperties(progressCategory, vo);
|
BeanUtils.copyProperties(progressCategory, vo);
|
||||||
// 如果是父节点,计算其子节点的总和
|
// 如果是父节点,计算其子节点的总和
|
||||||
if (progressCategory.getPid() == 0) {
|
if (progressCategory.getParentId() == 0) {
|
||||||
List<PgsProgressCategory> children = parentIdToChildrenMap.getOrDefault(progressCategory.getId(), Collections.emptyList());
|
List<PgsProgressCategory> children = parentIdToChildrenMap.getOrDefault(progressCategory.getId(), Collections.emptyList());
|
||||||
// 获取父节点状态
|
// 获取父节点状态
|
||||||
String pidStatus = getPidStatus(children);
|
String pidStatus = getPidStatus(children);
|
||||||
@ -356,7 +364,7 @@ public class PgsProgressCategoryServiceImpl extends ServiceImpl<PgsProgressCateg
|
|||||||
oldMatrixIdList = oldMatrixList.stream().map(FacMatrix::getId).toList();
|
oldMatrixIdList = oldMatrixList.stream().map(FacMatrix::getId).toList();
|
||||||
List<PgsProgressCategory> oldPercentageCategoryList = this.lambdaQuery()
|
List<PgsProgressCategory> oldPercentageCategoryList = this.lambdaQuery()
|
||||||
.in(PgsProgressCategory::getMatrixId, oldMatrixIdList)
|
.in(PgsProgressCategory::getMatrixId, oldMatrixIdList)
|
||||||
.ne(PgsProgressCategory::getPid, PgsProgressCategoryConstant.TOP_PARENT_ID)
|
.ne(PgsProgressCategory::getParentId, PgsProgressCategoryConstant.TOP_PARENT_ID)
|
||||||
.eq(PgsProgressCategory::getUnitType, PgsProgressUnitTypeEnum.PERCENTAGE.getValue())
|
.eq(PgsProgressCategory::getUnitType, PgsProgressUnitTypeEnum.PERCENTAGE.getValue())
|
||||||
.list();
|
.list();
|
||||||
oldPercentageCategoryMap = oldPercentageCategoryList.stream()
|
oldPercentageCategoryMap = oldPercentageCategoryList.stream()
|
||||||
@ -404,10 +412,10 @@ public class PgsProgressCategoryServiceImpl extends ServiceImpl<PgsProgressCateg
|
|||||||
newCategory.setMatrixName(matrix.getMatrixName());
|
newCategory.setMatrixName(matrix.getMatrixName());
|
||||||
newCategory.setRemark(template.getRemark());
|
newCategory.setRemark(template.getRemark());
|
||||||
// 先临时设置旧 pid
|
// 先临时设置旧 pid
|
||||||
newCategory.setPid(template.getPid());
|
newCategory.setParentId(template.getParentId());
|
||||||
localList.add(newCategory);
|
localList.add(newCategory);
|
||||||
// 创建百分比设施
|
// 创建百分比设施
|
||||||
if (template.getPid() != 0 && template.getUnitType().equals(PgsProgressUnitTypeEnum.PERCENTAGE.getValue())) {
|
if (template.getParentId() != 0 && template.getUnitType().equals(PgsProgressUnitTypeEnum.PERCENTAGE.getValue())) {
|
||||||
String mapKey = matrix.getMatrixName() + "_" + template.getWorkType();
|
String mapKey = matrix.getMatrixName() + "_" + template.getWorkType();
|
||||||
// 填充数据
|
// 填充数据
|
||||||
if (CollUtil.isNotEmpty(oldPercentageCategoryMap) && oldPercentageCategoryMap.containsKey(mapKey)) {
|
if (CollUtil.isNotEmpty(oldPercentageCategoryMap) && oldPercentageCategoryMap.containsKey(mapKey)) {
|
||||||
@ -451,9 +459,9 @@ public class PgsProgressCategoryServiceImpl extends ServiceImpl<PgsProgressCateg
|
|||||||
}
|
}
|
||||||
// 修正本 matrix 的 pid
|
// 修正本 matrix 的 pid
|
||||||
for (PgsProgressCategory category : localList) {
|
for (PgsProgressCategory category : localList) {
|
||||||
Long oldPid = category.getPid();
|
Long oldPid = category.getParentId();
|
||||||
if (oldPid != 0) {
|
if (oldPid != 0) {
|
||||||
category.setPid(localIdMap.getOrDefault(oldPid, 0L));
|
category.setParentId(localIdMap.getOrDefault(oldPid, 0L));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
newList.addAll(localList);
|
newList.addAll(localList);
|
||||||
|
@ -128,7 +128,7 @@ public class PgsProgressCategoryTemplateServiceImpl extends ServiceImpl<PgsProgr
|
|||||||
private void validEntityBeforeSave(PgsProgressCategoryTemplate entity) {
|
private void validEntityBeforeSave(PgsProgressCategoryTemplate entity) {
|
||||||
// TODO 做一些数据校验,如唯一约束
|
// TODO 做一些数据校验,如唯一约束
|
||||||
Long projectId = entity.getProjectId();
|
Long projectId = entity.getProjectId();
|
||||||
Long pid = entity.getPid();
|
Long pid = entity.getParentId();
|
||||||
if (projectId != null && projectId != 0) {
|
if (projectId != null && projectId != 0) {
|
||||||
if (this.getById(projectId) == null) {
|
if (this.getById(projectId) == null) {
|
||||||
throw new ServiceException("对应项目不存在", HttpStatus.NOT_FOUND);
|
throw new ServiceException("对应项目不存在", HttpStatus.NOT_FOUND);
|
||||||
@ -146,7 +146,7 @@ public class PgsProgressCategoryTemplateServiceImpl extends ServiceImpl<PgsProgr
|
|||||||
lqw.eq(PgsProgressCategoryTemplate::getProjectId, entity.getProjectId());
|
lqw.eq(PgsProgressCategoryTemplate::getProjectId, entity.getProjectId());
|
||||||
}
|
}
|
||||||
if (pid != null && pid != 0) {
|
if (pid != null && pid != 0) {
|
||||||
lqw.eq(PgsProgressCategoryTemplate::getPid, entity.getPid());
|
lqw.eq(PgsProgressCategoryTemplate::getParentId, entity.getParentId());
|
||||||
}
|
}
|
||||||
if (entity.getId() != null) {
|
if (entity.getId() != null) {
|
||||||
// 排除自身
|
// 排除自身
|
||||||
@ -169,7 +169,7 @@ public class PgsProgressCategoryTemplateServiceImpl extends ServiceImpl<PgsProgr
|
|||||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
List<PgsProgressCategoryTemplate> categoryTemplateList = this.listByIds(ids);
|
List<PgsProgressCategoryTemplate> categoryTemplateList = this.listByIds(ids);
|
||||||
if (isValid) {
|
if (isValid) {
|
||||||
categoryTemplateList.forEach(template->{
|
categoryTemplateList.forEach(template -> {
|
||||||
Long projectId = template.getProjectId();
|
Long projectId = template.getProjectId();
|
||||||
if (projectId != null && projectId == 0) {
|
if (projectId != null && projectId == 0) {
|
||||||
throw new ServiceException("通用模版,无法删除", HttpStatus.CONFLICT);
|
throw new ServiceException("通用模版,无法删除", HttpStatus.CONFLICT);
|
||||||
@ -208,7 +208,7 @@ public class PgsProgressCategoryTemplateServiceImpl extends ServiceImpl<PgsProgr
|
|||||||
if (req == null) {
|
if (req == null) {
|
||||||
return lqw;
|
return lqw;
|
||||||
}
|
}
|
||||||
Long pid = req.getPid();
|
Long parentId = req.getParentId();
|
||||||
String name = req.getName();
|
String name = req.getName();
|
||||||
String unitType = req.getUnitType();
|
String unitType = req.getUnitType();
|
||||||
Long projectId = req.getProjectId();
|
Long projectId = req.getProjectId();
|
||||||
@ -217,7 +217,7 @@ public class PgsProgressCategoryTemplateServiceImpl extends ServiceImpl<PgsProgr
|
|||||||
// 精确查询
|
// 精确查询
|
||||||
lqw.in(ObjectUtils.isNotEmpty(projectId), PgsProgressCategoryTemplate::getProjectId, projectId, PgsProgressCategoryConstant.PUBLIC_PROJECT_ID);
|
lqw.in(ObjectUtils.isNotEmpty(projectId), PgsProgressCategoryTemplate::getProjectId, projectId, PgsProgressCategoryConstant.PUBLIC_PROJECT_ID);
|
||||||
lqw.eq(StringUtils.isNotBlank(unitType), PgsProgressCategoryTemplate::getUnitType, unitType);
|
lqw.eq(StringUtils.isNotBlank(unitType), PgsProgressCategoryTemplate::getUnitType, unitType);
|
||||||
lqw.eq(ObjectUtils.isNotEmpty(pid), PgsProgressCategoryTemplate::getPid, pid);
|
lqw.eq(ObjectUtils.isNotEmpty(parentId), PgsProgressCategoryTemplate::getParentId, parentId);
|
||||||
return lqw;
|
return lqw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,29 +15,28 @@ import org.dromara.common.mybatis.core.page.PageQuery;
|
|||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import org.dromara.common.satoken.utils.LoginHelper;
|
import org.dromara.common.satoken.utils.LoginHelper;
|
||||||
import org.dromara.contractor.domain.SubConstructionUser;
|
import org.dromara.contractor.domain.SubConstructionUser;
|
||||||
|
import org.dromara.contractor.service.ISubConstructionUserService;
|
||||||
import org.dromara.project.domain.BusProjectTeam;
|
import org.dromara.project.domain.BusProjectTeam;
|
||||||
import org.dromara.project.domain.BusProjectTeamMember;
|
import org.dromara.project.domain.BusProjectTeamMember;
|
||||||
import org.dromara.project.domain.enums.BusProjectTeamMemberPostEnum;
|
|
||||||
import org.dromara.project.domain.dto.projectteam.BusProjectTeamCreateReq;
|
import org.dromara.project.domain.dto.projectteam.BusProjectTeamCreateReq;
|
||||||
import org.dromara.project.domain.dto.projectteam.BusProjectTeamQueryReq;
|
import org.dromara.project.domain.dto.projectteam.BusProjectTeamQueryReq;
|
||||||
import org.dromara.project.domain.dto.projectteam.BusProjectTeamUpdateReq;
|
import org.dromara.project.domain.dto.projectteam.BusProjectTeamUpdateReq;
|
||||||
|
import org.dromara.project.domain.enums.BusProjectTeamMemberPostEnum;
|
||||||
import org.dromara.project.domain.vo.projectteam.BusForemanVo;
|
import org.dromara.project.domain.vo.projectteam.BusForemanVo;
|
||||||
import org.dromara.project.domain.vo.projectteam.BusProjectTeamForemanVo;
|
import org.dromara.project.domain.vo.projectteam.BusProjectTeamForemanVo;
|
||||||
import org.dromara.project.domain.vo.projectteam.BusProjectTeamVo;
|
import org.dromara.project.domain.vo.projectteam.BusProjectTeamVo;
|
||||||
import org.dromara.project.mapper.BusProjectTeamMapper;
|
import org.dromara.project.mapper.BusProjectTeamMapper;
|
||||||
import org.dromara.contractor.service.ISubConstructionUserService;
|
|
||||||
import org.dromara.project.service.IBusProjectService;
|
import org.dromara.project.service.IBusProjectService;
|
||||||
import org.dromara.project.service.IBusProjectTeamMemberService;
|
import org.dromara.project.service.IBusProjectTeamMemberService;
|
||||||
import org.dromara.project.service.IBusProjectTeamService;
|
import org.dromara.project.service.IBusProjectTeamService;
|
||||||
|
import org.dromara.system.domain.vo.SysUserVo;
|
||||||
|
import org.dromara.system.service.ISysUserService;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -50,6 +49,9 @@ import java.util.stream.Collectors;
|
|||||||
public class BusProjectTeamServiceImpl extends ServiceImpl<BusProjectTeamMapper, BusProjectTeam>
|
public class BusProjectTeamServiceImpl extends ServiceImpl<BusProjectTeamMapper, BusProjectTeam>
|
||||||
implements IBusProjectTeamService {
|
implements IBusProjectTeamService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ISysUserService userService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IBusProjectService projectService;
|
private IBusProjectService projectService;
|
||||||
|
|
||||||
@ -226,8 +228,14 @@ public class BusProjectTeamServiceImpl extends ServiceImpl<BusProjectTeamMapper,
|
|||||||
return List.of();
|
return List.of();
|
||||||
}
|
}
|
||||||
// 获取项目班组长信息
|
// 获取项目班组长信息
|
||||||
Map<Long, List<SubConstructionUser>> foremanMap = constructionUserService.listByIds(foremanIdList).stream()
|
List<SubConstructionUser> foremanList = constructionUserService.listByIds(foremanIdList);
|
||||||
|
Map<Long, List<SubConstructionUser>> foremanMap = foremanList.stream()
|
||||||
.collect(Collectors.groupingBy(SubConstructionUser::getTeamId));
|
.collect(Collectors.groupingBy(SubConstructionUser::getTeamId));
|
||||||
|
// 获取系统用户信息
|
||||||
|
List<Long> sysUserIds = foremanList.stream().map(SubConstructionUser::getSysUserId).filter(Objects::nonNull).distinct().toList();
|
||||||
|
List<SysUserVo> sysUserList = userService.selectUserByIds(sysUserIds, null);
|
||||||
|
Map<Long, String> sysUserMap = sysUserList.stream()
|
||||||
|
.collect(Collectors.toMap(SysUserVo::getUserId, SysUserVo::getNickName));
|
||||||
// 封装数据
|
// 封装数据
|
||||||
return projectTeamList.stream().map(projectTeam -> {
|
return projectTeamList.stream().map(projectTeam -> {
|
||||||
BusProjectTeamForemanVo projectTeamForemanResp = new BusProjectTeamForemanVo();
|
BusProjectTeamForemanVo projectTeamForemanResp = new BusProjectTeamForemanVo();
|
||||||
@ -237,7 +245,16 @@ public class BusProjectTeamServiceImpl extends ServiceImpl<BusProjectTeamMapper,
|
|||||||
if (foremanMap.containsKey(projectTeam.getId())) {
|
if (foremanMap.containsKey(projectTeam.getId())) {
|
||||||
List<SubConstructionUser> constructionUserList = foremanMap.get(projectTeam.getId());
|
List<SubConstructionUser> constructionUserList = foremanMap.get(projectTeam.getId());
|
||||||
List<BusForemanVo> foremanVoList = constructionUserList.stream()
|
List<BusForemanVo> foremanVoList = constructionUserList.stream()
|
||||||
.map(constructionUser -> new BusForemanVo(constructionUser.getId(), constructionUser.getUserName()))
|
.map(constructionUser -> {
|
||||||
|
BusForemanVo foremanVo = new BusForemanVo();
|
||||||
|
Long sysUserId = constructionUser.getSysUserId();
|
||||||
|
if (sysUserId != null) {
|
||||||
|
String userName = sysUserMap.get(sysUserId);
|
||||||
|
foremanVo.setForemanId(sysUserId);
|
||||||
|
foremanVo.setForemanName(userName);
|
||||||
|
}
|
||||||
|
return foremanVo;
|
||||||
|
})
|
||||||
.toList();
|
.toList();
|
||||||
projectTeamForemanResp.setForemanList(foremanVoList);
|
projectTeamForemanResp.setForemanList(foremanVoList);
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,6 @@ import jakarta.validation.constraints.NotEmpty;
|
|||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.dromara.common.core.domain.R;
|
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.excel.utils.ExcelUtil;
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
import org.dromara.common.log.annotation.Log;
|
import org.dromara.common.log.annotation.Log;
|
||||||
@ -19,8 +17,8 @@ import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionCrea
|
|||||||
import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionGisReq;
|
import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionGisReq;
|
||||||
import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionQueryReq;
|
import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionQueryReq;
|
||||||
import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionUpdateReq;
|
import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionUpdateReq;
|
||||||
import org.dromara.quality.domain.vo.qualityinspection.QltQualityInspectionVo;
|
|
||||||
import org.dromara.quality.domain.vo.qualityinspection.QltQualityInspectionListGisVo;
|
import org.dromara.quality.domain.vo.qualityinspection.QltQualityInspectionListGisVo;
|
||||||
|
import org.dromara.quality.domain.vo.qualityinspection.QltQualityInspectionVo;
|
||||||
import org.dromara.quality.service.IQltQualityInspectionService;
|
import org.dromara.quality.service.IQltQualityInspectionService;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@ -99,7 +97,7 @@ public class QltQualityInspectionController extends BaseController {
|
|||||||
@Log(title = "质量-检查工单", businessType = BusinessType.INSERT)
|
@Log(title = "质量-检查工单", businessType = BusinessType.INSERT)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PostMapping()
|
@PostMapping()
|
||||||
public R<Long> add(@Validated(AddGroup.class) @RequestBody QltQualityInspectionCreateReq req) {
|
public R<Long> add(@Validated @RequestBody QltQualityInspectionCreateReq req) {
|
||||||
return R.ok(qualityInspectionService.insertByBo(req));
|
return R.ok(qualityInspectionService.insertByBo(req));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,7 +108,7 @@ public class QltQualityInspectionController extends BaseController {
|
|||||||
@Log(title = "质量-检查工单", businessType = BusinessType.UPDATE)
|
@Log(title = "质量-检查工单", businessType = BusinessType.UPDATE)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PutMapping()
|
@PutMapping()
|
||||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody QltQualityInspectionUpdateReq req) {
|
public R<Void> edit(@Validated @RequestBody QltQualityInspectionUpdateReq req) {
|
||||||
return toAjax(qualityInspectionService.updateByBo(req));
|
return toAjax(qualityInspectionService.updateByBo(req));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,14 +60,19 @@ public class QltQualityInspection extends BaseEntity {
|
|||||||
private String inspectionFile;
|
private String inspectionFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 班组id
|
* 整改单位(1分包 2班组)
|
||||||
*/
|
*/
|
||||||
private Long teamId;
|
private String rectificationUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 整改人(班组长)
|
* 整改单位id
|
||||||
*/
|
*/
|
||||||
private Long corrector;
|
private Long rectificationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改人
|
||||||
|
*/
|
||||||
|
private Long correctorId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否回复(1回复 2不回复)
|
* 是否回复(1回复 2不回复)
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package org.dromara.quality.domain.dto.qualityinspection;
|
package org.dromara.quality.domain.dto.qualityinspection;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
@ -19,8 +21,15 @@ public class QltQualityInspectionCreateReq implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 项目id
|
* 项目id
|
||||||
*/
|
*/
|
||||||
|
@NotNull(message = "项目id不能为空")
|
||||||
private Long projectId;
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否回复(1回复 2不回复)
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "是否回复不能为空")
|
||||||
|
private String isReply;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 巡检类型
|
* 巡检类型
|
||||||
*/
|
*/
|
||||||
@ -29,6 +38,7 @@ public class QltQualityInspectionCreateReq implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 巡检标题
|
* 巡检标题
|
||||||
*/
|
*/
|
||||||
|
@NotBlank(message = "巡检标题不能为空")
|
||||||
private String inspectionHeadline;
|
private String inspectionHeadline;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -42,14 +52,19 @@ public class QltQualityInspectionCreateReq implements Serializable {
|
|||||||
private String inspectionFile;
|
private String inspectionFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 班组id
|
* 整改单位(1分包 2班组)
|
||||||
*/
|
*/
|
||||||
private Long teamId;
|
private String rectificationUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 整改人(班组长)
|
* 整改单位id
|
||||||
*/
|
*/
|
||||||
private Long corrector;
|
private Long rectificationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改人
|
||||||
|
*/
|
||||||
|
private Long corrector_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 回复期限日期
|
* 回复期限日期
|
||||||
|
@ -31,8 +31,13 @@ public class QltQualityInspectionQueryReq implements Serializable {
|
|||||||
private String inspectionStatus;
|
private String inspectionStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 班组id
|
* 整改单位(1分包 2班组)
|
||||||
*/
|
*/
|
||||||
private Long teamId;
|
private String rectificationUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改单位id
|
||||||
|
*/
|
||||||
|
private Long rectificationId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -76,14 +76,19 @@ public class QltQualityInspectionVo implements Serializable {
|
|||||||
private List<SysOssVo> inspectionFileList;
|
private List<SysOssVo> inspectionFileList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 班组id
|
* 整改单位(1分包 2班组)
|
||||||
*/
|
*/
|
||||||
private Long teamId;
|
private String rectificationUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 整改人(班组长)
|
* 整改单位id
|
||||||
*/
|
*/
|
||||||
private Long corrector;
|
private Long rectificationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改人
|
||||||
|
*/
|
||||||
|
private Long correctorId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 整改人姓名
|
* 整改人姓名
|
||||||
@ -145,7 +150,12 @@ public class QltQualityInspectionVo implements Serializable {
|
|||||||
* 创建者
|
* 创建者
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "创建者")
|
@ExcelProperty(value = "创建者")
|
||||||
private String createBy;
|
private Long createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者名称
|
||||||
|
*/
|
||||||
|
private String createByName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
|
@ -111,7 +111,6 @@ public interface IQltQualityInspectionService extends IService<QltQualityInspect
|
|||||||
* 导出质量-检查工单
|
* 导出质量-检查工单
|
||||||
*
|
*
|
||||||
* @param id 质量-检查工单id
|
* @param id 质量-检查工单id
|
||||||
* @param response HttpServletResponse
|
|
||||||
*/
|
*/
|
||||||
void exportWordById(Long id, HttpServletResponse response);
|
void exportWordById(Long id, HttpServletResponse response);
|
||||||
|
|
||||||
|
@ -21,18 +21,16 @@ import org.dromara.common.oss.core.OssClient;
|
|||||||
import org.dromara.common.oss.exception.OssException;
|
import org.dromara.common.oss.exception.OssException;
|
||||||
import org.dromara.common.oss.factory.OssFactory;
|
import org.dromara.common.oss.factory.OssFactory;
|
||||||
import org.dromara.common.satoken.utils.LoginHelper;
|
import org.dromara.common.satoken.utils.LoginHelper;
|
||||||
import org.dromara.contractor.domain.SubConstructionUser;
|
import org.dromara.common.utils.DocumentUtil;
|
||||||
import org.dromara.project.domain.BusProject;
|
|
||||||
import org.dromara.contractor.service.ISubConstructionUserService;
|
|
||||||
import org.dromara.project.service.IBusProjectService;
|
import org.dromara.project.service.IBusProjectService;
|
||||||
import org.dromara.quality.constant.QltQualityConstant;
|
import org.dromara.quality.constant.QltQualityConstant;
|
||||||
import org.dromara.quality.domain.QltQualityInspection;
|
import org.dromara.quality.domain.QltQualityInspection;
|
||||||
import org.dromara.quality.domain.enums.QltQualityInspectionStatusEnum;
|
|
||||||
import org.dromara.quality.domain.enums.QltQualityInspectionVerificationTypeEnum;
|
|
||||||
import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionCreateReq;
|
import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionCreateReq;
|
||||||
import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionGisReq;
|
import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionGisReq;
|
||||||
import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionQueryReq;
|
import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionQueryReq;
|
||||||
import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionUpdateReq;
|
import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionUpdateReq;
|
||||||
|
import org.dromara.quality.domain.enums.QltQualityInspectionStatusEnum;
|
||||||
|
import org.dromara.quality.domain.enums.QltQualityInspectionVerificationTypeEnum;
|
||||||
import org.dromara.quality.domain.vo.qualityinspection.QltQualityInspectionGis;
|
import org.dromara.quality.domain.vo.qualityinspection.QltQualityInspectionGis;
|
||||||
import org.dromara.quality.domain.vo.qualityinspection.QltQualityInspectionListGisVo;
|
import org.dromara.quality.domain.vo.qualityinspection.QltQualityInspectionListGisVo;
|
||||||
import org.dromara.quality.domain.vo.qualityinspection.QltQualityInspectionVo;
|
import org.dromara.quality.domain.vo.qualityinspection.QltQualityInspectionVo;
|
||||||
@ -45,7 +43,6 @@ import org.dromara.system.service.ISysDictDataService;
|
|||||||
import org.dromara.system.service.ISysDictTypeService;
|
import org.dromara.system.service.ISysDictTypeService;
|
||||||
import org.dromara.system.service.ISysOssService;
|
import org.dromara.system.service.ISysOssService;
|
||||||
import org.dromara.system.service.ISysUserService;
|
import org.dromara.system.service.ISysUserService;
|
||||||
import org.dromara.common.utils.DocumentUtil;
|
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -59,6 +56,7 @@ import java.nio.file.Path;
|
|||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
import java.util.zip.ZipOutputStream;
|
import java.util.zip.ZipOutputStream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -81,9 +79,6 @@ public class QltQualityInspectionServiceImpl extends ServiceImpl<QltQualityInspe
|
|||||||
@Resource
|
@Resource
|
||||||
private ISysOssService ossService;
|
private ISysOssService ossService;
|
||||||
|
|
||||||
@Resource
|
|
||||||
private ISubConstructionUserService constructionUserService;
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ISysDictDataService dictDataService;
|
private ISysDictDataService dictDataService;
|
||||||
|
|
||||||
@ -193,7 +188,7 @@ public class QltQualityInspectionServiceImpl extends ServiceImpl<QltQualityInspe
|
|||||||
QltQualityInspection qualityInspection = new QltQualityInspection();
|
QltQualityInspection qualityInspection = new QltQualityInspection();
|
||||||
BeanUtils.copyProperties(req, qualityInspection);
|
BeanUtils.copyProperties(req, qualityInspection);
|
||||||
// 数据校验
|
// 数据校验
|
||||||
validEntityBeforeSave(qualityInspection, true);
|
validEntityBeforeSave(qualityInspection);
|
||||||
// 填充默认值
|
// 填充默认值
|
||||||
qualityInspection.setInspectionStatus(QltQualityInspectionStatusEnum.INFORM.getValue());
|
qualityInspection.setInspectionStatus(QltQualityInspectionStatusEnum.INFORM.getValue());
|
||||||
// 写入数据库
|
// 写入数据库
|
||||||
@ -217,7 +212,7 @@ public class QltQualityInspectionServiceImpl extends ServiceImpl<QltQualityInspe
|
|||||||
QltQualityInspection qualityInspection = new QltQualityInspection();
|
QltQualityInspection qualityInspection = new QltQualityInspection();
|
||||||
BeanUtils.copyProperties(req, qualityInspection);
|
BeanUtils.copyProperties(req, qualityInspection);
|
||||||
// 数据校验
|
// 数据校验
|
||||||
validEntityBeforeSave(qualityInspection, false);
|
validEntityBeforeSave(qualityInspection);
|
||||||
// 判断是否存在
|
// 判断是否存在
|
||||||
QltQualityInspection oldQualityInspection = this.getById(qualityInspection.getId());
|
QltQualityInspection oldQualityInspection = this.getById(qualityInspection.getId());
|
||||||
if (oldQualityInspection == null) {
|
if (oldQualityInspection == null) {
|
||||||
@ -230,14 +225,9 @@ public class QltQualityInspectionServiceImpl extends ServiceImpl<QltQualityInspe
|
|||||||
/**
|
/**
|
||||||
* 保存前的数据校验
|
* 保存前的数据校验
|
||||||
*/
|
*/
|
||||||
private void validEntityBeforeSave(QltQualityInspection entity, Boolean create) {
|
private void validEntityBeforeSave(QltQualityInspection entity) {
|
||||||
// TODO 做一些数据校验,如唯一约束
|
// TODO 做一些数据校验,如唯一约束
|
||||||
Long projectId = entity.getProjectId();
|
Long projectId = entity.getProjectId();
|
||||||
if (create) {
|
|
||||||
if (projectId == null) {
|
|
||||||
throw new ServiceException("项目id不能为空", HttpStatus.BAD_REQUEST);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (projectId != null && projectService.getById(projectId) == null) {
|
if (projectId != null && projectService.getById(projectId) == null) {
|
||||||
throw new ServiceException("对应项目不存在", HttpStatus.NOT_FOUND);
|
throw new ServiceException("对应项目不存在", HttpStatus.NOT_FOUND);
|
||||||
}
|
}
|
||||||
@ -286,13 +276,13 @@ public class QltQualityInspectionServiceImpl extends ServiceImpl<QltQualityInspe
|
|||||||
Long createBy = qualityInspection.getCreateBy();
|
Long createBy = qualityInspection.getCreateBy();
|
||||||
if (createBy != null) {
|
if (createBy != null) {
|
||||||
SysUserVo sysUserVo = userService.selectUserById(createBy);
|
SysUserVo sysUserVo = userService.selectUserById(createBy);
|
||||||
qualityInspectionVo.setCreateBy(sysUserVo.getNickName());
|
qualityInspectionVo.setCreateByName(sysUserVo.getNickName());
|
||||||
}
|
}
|
||||||
// 关联整改人信息
|
// 关联整改人信息
|
||||||
Long corrector = qualityInspection.getCorrector();
|
Long correctorId = qualityInspection.getCorrectorId();
|
||||||
if (corrector != null) {
|
if (correctorId != null) {
|
||||||
String userName = constructionUserService.getById(corrector).getUserName();
|
SysUserVo user = userService.selectUserById(correctorId);
|
||||||
qualityInspectionVo.setCorrectorName(userName);
|
qualityInspectionVo.setCorrectorName(user.getNickName());
|
||||||
}
|
}
|
||||||
// 关联附件信息
|
// 关联附件信息
|
||||||
String inspectionFile = qualityInspection.getInspectionFile();
|
String inspectionFile = qualityInspection.getInspectionFile();
|
||||||
@ -325,12 +315,14 @@ public class QltQualityInspectionServiceImpl extends ServiceImpl<QltQualityInspe
|
|||||||
Long projectId = req.getProjectId();
|
Long projectId = req.getProjectId();
|
||||||
String inspectionType = req.getInspectionType();
|
String inspectionType = req.getInspectionType();
|
||||||
String inspectionStatus = req.getInspectionStatus();
|
String inspectionStatus = req.getInspectionStatus();
|
||||||
Long teamId = req.getTeamId();
|
String rectificationUnit = req.getRectificationUnit();
|
||||||
|
Long rectificationId = req.getRectificationId();
|
||||||
// 精确查询
|
// 精确查询
|
||||||
|
lqw.eq(StringUtils.isNotBlank(inspectionType), QltQualityInspection::getInspectionType, inspectionType);
|
||||||
|
lqw.eq(StringUtils.isNotBlank(inspectionStatus), QltQualityInspection::getInspectionStatus, inspectionStatus);
|
||||||
|
lqw.eq(StringUtils.isNotBlank(rectificationUnit), QltQualityInspection::getRectificationUnit, rectificationUnit);
|
||||||
lqw.eq(ObjectUtils.isNotEmpty(projectId), QltQualityInspection::getProjectId, projectId);
|
lqw.eq(ObjectUtils.isNotEmpty(projectId), QltQualityInspection::getProjectId, projectId);
|
||||||
lqw.eq(ObjectUtils.isNotEmpty(inspectionType), QltQualityInspection::getInspectionType, inspectionType);
|
lqw.eq(ObjectUtils.isNotEmpty(rectificationId), QltQualityInspection::getRectificationId, rectificationId);
|
||||||
lqw.eq(ObjectUtils.isNotEmpty(inspectionStatus), QltQualityInspection::getInspectionStatus, inspectionStatus);
|
|
||||||
lqw.eq(ObjectUtils.isNotEmpty(teamId), QltQualityInspection::getTeamId, teamId);
|
|
||||||
return lqw;
|
return lqw;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -352,22 +344,12 @@ public class QltQualityInspectionServiceImpl extends ServiceImpl<QltQualityInspe
|
|||||||
if (CollUtil.isEmpty(qualityInspectionList)) {
|
if (CollUtil.isEmpty(qualityInspectionList)) {
|
||||||
return qualityInspectionVoPage;
|
return qualityInspectionVoPage;
|
||||||
}
|
}
|
||||||
// 获取项目名称
|
// 获取整改人、创建用户信息
|
||||||
List<Long> projectIdList = qualityInspectionList.stream().map(QltQualityInspection::getProjectId).distinct().toList();
|
List<Long> userIdList = Stream.concat(
|
||||||
if (projectIdList.size() != 1) {
|
qualityInspectionList.stream().map(QltQualityInspection::getCorrectorId),
|
||||||
throw new ServiceException("仅能查询单个项目下的施工日志", HttpStatus.BAD_REQUEST);
|
qualityInspectionList.stream().map(QltQualityInspection::getCreateBy)
|
||||||
}
|
).distinct().toList();
|
||||||
BusProject project = projectService.getById(projectIdList.get(0));
|
List<SysUserVo> userVoList = userService.selectUserByIds(userIdList, null);
|
||||||
if (project == null) {
|
|
||||||
throw new ServiceException("项目不存在", HttpStatus.NOT_FOUND);
|
|
||||||
}
|
|
||||||
// 获取整改人信息
|
|
||||||
List<Long> correctorList = qualityInspectionList.stream().map(QltQualityInspection::getCorrector).distinct().toList();
|
|
||||||
Map<Long, String> correctorMap = constructionUserService.listByIds(correctorList)
|
|
||||||
.stream().collect(Collectors.toMap(SubConstructionUser::getId, SubConstructionUser::getUserName));
|
|
||||||
// 获取创建用户信息
|
|
||||||
List<Long> createByList = qualityInspectionList.stream().map(QltQualityInspection::getCreateBy).distinct().toList();
|
|
||||||
List<SysUserVo> userVoList = userService.selectUserByIds(createByList, null);
|
|
||||||
Map<Long, String> userMap = userVoList.stream().collect(Collectors.toMap(SysUserVo::getUserId, SysUserVo::getNickName));
|
Map<Long, String> userMap = userVoList.stream().collect(Collectors.toMap(SysUserVo::getUserId, SysUserVo::getNickName));
|
||||||
// 获取附件信息
|
// 获取附件信息
|
||||||
List<Long> ossInspectionFileIdList = qualityInspectionList.stream().map(QltQualityInspection::getInspectionFile).filter(StringUtils::isNotBlank)
|
List<Long> ossInspectionFileIdList = qualityInspectionList.stream().map(QltQualityInspection::getInspectionFile).filter(StringUtils::isNotBlank)
|
||||||
@ -382,12 +364,11 @@ public class QltQualityInspectionServiceImpl extends ServiceImpl<QltQualityInspe
|
|||||||
List<QltQualityInspectionVo> qualityInspectionVoList = qualityInspectionList.stream().map(qualityInspection -> {
|
List<QltQualityInspectionVo> qualityInspectionVoList = qualityInspectionList.stream().map(qualityInspection -> {
|
||||||
QltQualityInspectionVo qualityInspectionVo = new QltQualityInspectionVo();
|
QltQualityInspectionVo qualityInspectionVo = new QltQualityInspectionVo();
|
||||||
BeanUtils.copyProperties(qualityInspection, qualityInspectionVo);
|
BeanUtils.copyProperties(qualityInspection, qualityInspectionVo);
|
||||||
qualityInspectionVo.setProjectName(project.getProjectName());
|
|
||||||
// 关联整改人信息
|
// 关联整改人信息
|
||||||
Long corrector = qualityInspection.getCorrector();
|
Long correctorId = qualityInspection.getCorrectorId();
|
||||||
String correctorName = null;
|
String correctorName = null;
|
||||||
if (correctorMap.containsKey(corrector)) {
|
if (userMap.containsKey(correctorId)) {
|
||||||
correctorName = correctorMap.get(corrector);
|
correctorName = userMap.get(correctorId);
|
||||||
}
|
}
|
||||||
qualityInspectionVo.setCorrectorName(correctorName);
|
qualityInspectionVo.setCorrectorName(correctorName);
|
||||||
// 关联创建用户信息
|
// 关联创建用户信息
|
||||||
@ -396,7 +377,7 @@ public class QltQualityInspectionServiceImpl extends ServiceImpl<QltQualityInspe
|
|||||||
if (userMap.containsKey(createBy)) {
|
if (userMap.containsKey(createBy)) {
|
||||||
createByName = userMap.get(createBy);
|
createByName = userMap.get(createBy);
|
||||||
}
|
}
|
||||||
qualityInspectionVo.setCreateBy(createByName);
|
qualityInspectionVo.setCreateByName(createByName);
|
||||||
// 关联附件信息
|
// 关联附件信息
|
||||||
String inspectionFile = qualityInspection.getInspectionFile();
|
String inspectionFile = qualityInspection.getInspectionFile();
|
||||||
List<SysOssVo> inspectionFileList = new ArrayList<>();
|
List<SysOssVo> inspectionFileList = new ArrayList<>();
|
||||||
@ -404,7 +385,7 @@ public class QltQualityInspectionServiceImpl extends ServiceImpl<QltQualityInspe
|
|||||||
List<Long> inspectionFileIdList = Arrays.stream(inspectionFile.split(",")).map(Long::parseLong).toList();
|
List<Long> inspectionFileIdList = Arrays.stream(inspectionFile.split(",")).map(Long::parseLong).toList();
|
||||||
for (Long id : inspectionFileIdList) {
|
for (Long id : inspectionFileIdList) {
|
||||||
if (ossMap.containsKey(id)) {
|
if (ossMap.containsKey(id)) {
|
||||||
inspectionFileList.add(ossMap.get(id).get(0));
|
inspectionFileList.add(ossMap.get(id).getFirst());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -415,7 +396,7 @@ public class QltQualityInspectionServiceImpl extends ServiceImpl<QltQualityInspe
|
|||||||
List<Long> rectificationFileIdList = Arrays.stream(rectificationFile.split(",")).map(Long::parseLong).toList();
|
List<Long> rectificationFileIdList = Arrays.stream(rectificationFile.split(",")).map(Long::parseLong).toList();
|
||||||
for (Long id : rectificationFileIdList) {
|
for (Long id : rectificationFileIdList) {
|
||||||
if (ossMap.containsKey(id)) {
|
if (ossMap.containsKey(id)) {
|
||||||
rectificationFileList.add(ossMap.get(id).get(0));
|
rectificationFileList.add(ossMap.get(id).getFirst());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -429,8 +410,7 @@ public class QltQualityInspectionServiceImpl extends ServiceImpl<QltQualityInspe
|
|||||||
/**
|
/**
|
||||||
* 导出质量-检查工单
|
* 导出质量-检查工单
|
||||||
*
|
*
|
||||||
* @param id 质量-检查工单id
|
* @param id 质量-检查工单id
|
||||||
* @param response HttpServletResponse
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void exportWordById(Long id, HttpServletResponse response) {
|
public void exportWordById(Long id, HttpServletResponse response) {
|
||||||
@ -512,7 +492,7 @@ public class QltQualityInspectionServiceImpl extends ServiceImpl<QltQualityInspe
|
|||||||
String projectName = projectService.getById(qualityInspection.getProjectId()).getProjectName();
|
String projectName = projectService.getById(qualityInspection.getProjectId()).getProjectName();
|
||||||
replacementMap.put("${projectName}", projectName);
|
replacementMap.put("${projectName}", projectName);
|
||||||
replacementMap.put("${inspectionHeadline}", qualityInspection.getInspectionHeadline());
|
replacementMap.put("${inspectionHeadline}", qualityInspection.getInspectionHeadline());
|
||||||
String correctorName = constructionUserService.getById(qualityInspection.getCorrector()).getUserName();
|
String correctorName = userService.selectUserById(qualityInspection.getCorrectorId()).getNickName();
|
||||||
replacementMap.put("${correctorName}", correctorName);
|
replacementMap.put("${correctorName}", correctorName);
|
||||||
Date rectificationTime = qualityInspection.getRectificationTime();
|
Date rectificationTime = qualityInspection.getRectificationTime();
|
||||||
replacementMap.put("${rectificationTime}", rectificationTime != null ? DateUtils.formatDateTime(rectificationTime) : "");
|
replacementMap.put("${rectificationTime}", rectificationTime != null ? DateUtils.formatDateTime(rectificationTime) : "");
|
||||||
|
@ -6,8 +6,6 @@ import jakarta.validation.constraints.NotEmpty;
|
|||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.dromara.common.core.domain.R;
|
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.excel.utils.ExcelUtil;
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
import org.dromara.common.log.annotation.Log;
|
import org.dromara.common.log.annotation.Log;
|
||||||
@ -19,8 +17,8 @@ import org.dromara.safety.domain.dto.safetyinspection.HseSafetyInspectionCreateR
|
|||||||
import org.dromara.safety.domain.dto.safetyinspection.HseSafetyInspectionGisReq;
|
import org.dromara.safety.domain.dto.safetyinspection.HseSafetyInspectionGisReq;
|
||||||
import org.dromara.safety.domain.dto.safetyinspection.HseSafetyInspectionQueryReq;
|
import org.dromara.safety.domain.dto.safetyinspection.HseSafetyInspectionQueryReq;
|
||||||
import org.dromara.safety.domain.dto.safetyinspection.HseSafetyInspectionUpdateReq;
|
import org.dromara.safety.domain.dto.safetyinspection.HseSafetyInspectionUpdateReq;
|
||||||
import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionVo;
|
|
||||||
import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionListGisVo;
|
import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionListGisVo;
|
||||||
|
import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionVo;
|
||||||
import org.dromara.safety.service.IHseSafetyInspectionService;
|
import org.dromara.safety.service.IHseSafetyInspectionService;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@ -99,7 +97,7 @@ public class HseSafetyInspectionController extends BaseController {
|
|||||||
@Log(title = "安全巡检工单", businessType = BusinessType.INSERT)
|
@Log(title = "安全巡检工单", businessType = BusinessType.INSERT)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PostMapping()
|
@PostMapping()
|
||||||
public R<Long> add(@Validated(AddGroup.class) @RequestBody HseSafetyInspectionCreateReq req) {
|
public R<Long> add(@Validated @RequestBody HseSafetyInspectionCreateReq req) {
|
||||||
return R.ok(safetyInspectionService.insertByBo(req));
|
return R.ok(safetyInspectionService.insertByBo(req));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,7 +108,7 @@ public class HseSafetyInspectionController extends BaseController {
|
|||||||
@Log(title = "安全巡检工单", businessType = BusinessType.UPDATE)
|
@Log(title = "安全巡检工单", businessType = BusinessType.UPDATE)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PutMapping()
|
@PutMapping()
|
||||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody HseSafetyInspectionUpdateReq req) {
|
public R<Void> edit(@Validated @RequestBody HseSafetyInspectionUpdateReq req) {
|
||||||
return toAjax(safetyInspectionService.updateByBo(req));
|
return toAjax(safetyInspectionService.updateByBo(req));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,6 +122,6 @@ public class HseSafetyInspectionController extends BaseController {
|
|||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
@PathVariable Long[] ids) {
|
@PathVariable Long[] ids) {
|
||||||
return toAjax(safetyInspectionService.deleteWithValidByIds(List.of(ids), true));
|
return toAjax(safetyInspectionService.deleteByIds(List.of(ids)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,11 +29,6 @@ public class HseSafetyInspection extends BaseEntity {
|
|||||||
@TableId(value = "id")
|
@TableId(value = "id")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
|
||||||
* 父id(默认为0)
|
|
||||||
*/
|
|
||||||
private Long pid;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目ID
|
* 项目ID
|
||||||
*/
|
*/
|
||||||
@ -55,12 +50,22 @@ public class HseSafetyInspection extends BaseEntity {
|
|||||||
private String inspectionResult;
|
private String inspectionResult;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 整改班组id
|
* 是否回复(1回复 2不回复)
|
||||||
*/
|
*/
|
||||||
private Long teamId;
|
private String isReply;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 整改人(班组长)id
|
* 整改单位(1分包 2班组)
|
||||||
|
*/
|
||||||
|
private String rectificationUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改单位id
|
||||||
|
*/
|
||||||
|
private Long rectificationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改人
|
||||||
*/
|
*/
|
||||||
private Long correctorId;
|
private Long correctorId;
|
||||||
|
|
||||||
@ -69,11 +74,6 @@ public class HseSafetyInspection extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private Date rectificationDeadline;
|
private Date rectificationDeadline;
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否回复(1回复 2不回复)
|
|
||||||
*/
|
|
||||||
private String isReply;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 回复日期
|
* 回复日期
|
||||||
*/
|
*/
|
||||||
|
@ -55,9 +55,19 @@ public class HseViolationRecord extends BaseEntity {
|
|||||||
private Date violationTime;
|
private Date violationTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 违章处理人id
|
* 整改单位(1分包 2班组)
|
||||||
*/
|
*/
|
||||||
private Long handlerId;
|
private String rectificationUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改单位id
|
||||||
|
*/
|
||||||
|
private Long rectificationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改人id
|
||||||
|
*/
|
||||||
|
private Long correctorId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 处理期限
|
* 处理期限
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package org.dromara.safety.domain.dto.safetyinspection;
|
package org.dromara.safety.domain.dto.safetyinspection;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
@ -17,14 +19,10 @@ public class HseSafetyInspectionCreateReq implements Serializable {
|
|||||||
@Serial
|
@Serial
|
||||||
private static final long serialVersionUID = 5355703238184894846L;
|
private static final long serialVersionUID = 5355703238184894846L;
|
||||||
|
|
||||||
/**
|
|
||||||
* 父id(默认为0)
|
|
||||||
*/
|
|
||||||
private Long pid;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目ID
|
* 项目ID
|
||||||
*/
|
*/
|
||||||
|
@NotNull(message = "项目id不能为空")
|
||||||
private Long projectId;
|
private Long projectId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -43,12 +41,17 @@ public class HseSafetyInspectionCreateReq implements Serializable {
|
|||||||
private String inspectionResult;
|
private String inspectionResult;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 整改班组id
|
* 整改单位(1分包 2班组)
|
||||||
*/
|
*/
|
||||||
private Long teamId;
|
private String rectificationUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 整改人(班组长)id
|
* 整改单位id
|
||||||
|
*/
|
||||||
|
private Long rectificationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改人
|
||||||
*/
|
*/
|
||||||
private Long correctorId;
|
private Long correctorId;
|
||||||
|
|
||||||
@ -61,6 +64,7 @@ public class HseSafetyInspectionCreateReq implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 是否回复(1回复 2不回复)
|
* 是否回复(1回复 2不回复)
|
||||||
*/
|
*/
|
||||||
|
@NotBlank(message = "是否回复不能为空")
|
||||||
private String isReply;
|
private String isReply;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -78,21 +82,6 @@ public class HseSafetyInspectionCreateReq implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String hiddenDanger;
|
private String hiddenDanger;
|
||||||
|
|
||||||
/**
|
|
||||||
* 整改措施
|
|
||||||
*/
|
|
||||||
private String measure;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 复查情况
|
|
||||||
*/
|
|
||||||
private String review;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 复查状态(1通过 2未通过)
|
|
||||||
*/
|
|
||||||
private String reviewType;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查时间
|
* 检查时间
|
||||||
*/
|
*/
|
||||||
@ -103,21 +92,11 @@ public class HseSafetyInspectionCreateReq implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private Date rectificationTime;
|
private Date rectificationTime;
|
||||||
|
|
||||||
/**
|
|
||||||
* 复查时间
|
|
||||||
*/
|
|
||||||
private Date reviewTime;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查附件
|
* 检查附件
|
||||||
*/
|
*/
|
||||||
private String checkFile;
|
private String checkFile;
|
||||||
|
|
||||||
/**
|
|
||||||
* 整改附件
|
|
||||||
*/
|
|
||||||
private String rectificationFile;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
|
@ -15,11 +15,6 @@ public class HseSafetyInspectionQueryReq implements Serializable {
|
|||||||
@Serial
|
@Serial
|
||||||
private static final long serialVersionUID = 8880866939746311233L;
|
private static final long serialVersionUID = 8880866939746311233L;
|
||||||
|
|
||||||
/**
|
|
||||||
* 父id(默认为0)
|
|
||||||
*/
|
|
||||||
private Long pid;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目ID
|
* 项目ID
|
||||||
*/
|
*/
|
||||||
@ -36,14 +31,14 @@ public class HseSafetyInspectionQueryReq implements Serializable {
|
|||||||
private String violationType;
|
private String violationType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 整改班组id
|
* 整改单位(1分包 2班组)
|
||||||
*/
|
*/
|
||||||
private Long teamId;
|
private String rectificationUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 整改人(班组长)id
|
* 整改单位id
|
||||||
*/
|
*/
|
||||||
private Long correctorId;
|
private Long rectificationId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工单状态(1通知 2整改 3复查)
|
* 工单状态(1通知 2整改 3复查)
|
||||||
|
@ -2,6 +2,7 @@ package org.dromara.safety.domain.dto.violationrecord;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import jakarta.validation.constraints.Future;
|
import jakarta.validation.constraints.Future;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
@ -27,10 +28,21 @@ public class HseViolationRecordCreateHandlerReq implements Serializable {
|
|||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 违章处理人id
|
* 整改单位(1分包 2班组)
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "处理人不能为空")
|
@NotBlank(message = "整改单位为空")
|
||||||
private Long handlerId;
|
private String rectificationUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改单位id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "整改单位id不能为空")
|
||||||
|
private Long rectificationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改人id
|
||||||
|
*/
|
||||||
|
private Long correctorId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 处理期限
|
* 处理期限
|
||||||
|
@ -38,4 +38,14 @@ public class HseViolationRecordQueryReq implements Serializable {
|
|||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date violationTime;
|
private Date violationTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改单位(1分包 2班组)
|
||||||
|
*/
|
||||||
|
private String rectificationUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改单位id
|
||||||
|
*/
|
||||||
|
private Long rectificationId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
package org.dromara.safety.domain.vo.safetyinspection;
|
package org.dromara.safety.domain.vo.safetyinspection;
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
|
||||||
import io.github.linpeilie.annotations.AutoMapper;
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
|
||||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
|
||||||
import org.dromara.safety.domain.HseSafetyInspection;
|
import org.dromara.safety.domain.HseSafetyInspection;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
@ -20,7 +16,6 @@ import java.util.Date;
|
|||||||
* @date 2025-03-20
|
* @date 2025-03-20
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@ExcelIgnoreUnannotated
|
|
||||||
@AutoMapper(target = HseSafetyInspection.class)
|
@AutoMapper(target = HseSafetyInspection.class)
|
||||||
public class HseSafetyInspectionVo implements Serializable {
|
public class HseSafetyInspectionVo implements Serializable {
|
||||||
|
|
||||||
@ -30,154 +25,126 @@ public class HseSafetyInspectionVo implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 主键ID
|
* 主键ID
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "主键ID")
|
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
|
||||||
* 父id(默认为0)
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "父id")
|
|
||||||
private Long pid;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目ID
|
* 项目ID
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "项目ID")
|
|
||||||
private Long projectId;
|
private Long projectId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查类型
|
* 检查类型
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "检查类型", converter = ExcelDictConvert.class)
|
|
||||||
@ExcelDictFormat(dictType = "safety_inspection_check_type")
|
|
||||||
private String checkType;
|
private String checkType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 违章类型
|
* 违章类型
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "违章类型", converter = ExcelDictConvert.class)
|
|
||||||
@ExcelDictFormat(dictType = "safety_inspection_violation_type")
|
|
||||||
private String violationType;
|
private String violationType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 巡检结果
|
* 巡检结果
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "巡检结果")
|
|
||||||
private String inspectionResult;
|
private String inspectionResult;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 整改班组id
|
* 整改单位(1分包 2班组)
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "整改班组id")
|
private String rectificationUnit;
|
||||||
private Long teamId;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 整改班组名字
|
* 整改单位id
|
||||||
*/
|
*/
|
||||||
private String teamName;
|
private Long rectificationId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 整改人(班组长)id
|
* 整改单位名称
|
||||||
|
*/
|
||||||
|
private String rectificationName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改人
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "整改人")
|
|
||||||
private Long correctorId;
|
private Long correctorId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 整改人(班组长)名字
|
* 整改人名字
|
||||||
*/
|
*/
|
||||||
private String correctorName;
|
private String correctorName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 整改期限
|
* 整改期限
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "整改期限")
|
|
||||||
private Date rectificationDeadline;
|
private Date rectificationDeadline;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否回复(1回复 2不回复)
|
* 是否回复(1回复 2不回复)
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "是否回复", converter = ExcelDictConvert.class)
|
|
||||||
@ExcelDictFormat(dictType = "reply_type")
|
|
||||||
private String isReply;
|
private String isReply;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 回复日期
|
* 回复日期
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "回复日期")
|
|
||||||
private String replyDate;
|
private String replyDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工单状态(1通知 2整改 3复查)
|
* 工单状态(1通知 2整改 3复查)
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "工单状态", converter = ExcelDictConvert.class)
|
|
||||||
@ExcelDictFormat(dictType = "safety_inspection_type")
|
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 问题隐患
|
* 问题隐患
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "问题隐患")
|
|
||||||
private String hiddenDanger;
|
private String hiddenDanger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 整改措施
|
* 整改措施
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "整改措施")
|
|
||||||
private String measure;
|
private String measure;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 复查情况
|
* 复查情况
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "复查情况")
|
|
||||||
private String review;
|
private String review;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 复查状态(1通过 2未通过)
|
* 复查状态(1通过 2未通过)
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "复查状态", converter = ExcelDictConvert.class)
|
|
||||||
@ExcelDictFormat(dictType = "review_type")
|
|
||||||
private String reviewType;
|
private String reviewType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查时间
|
* 检查时间
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "检查时间")
|
|
||||||
private Date checkTime;
|
private Date checkTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 整改时间
|
* 整改时间
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "整改时间")
|
|
||||||
private Date rectificationTime;
|
private Date rectificationTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 复查时间
|
* 复查时间
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "复查时间")
|
|
||||||
private Date reviewTime;
|
private Date reviewTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查附件
|
* 检查附件
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "检查附件")
|
|
||||||
private String checkFile;
|
private String checkFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 整改附件
|
* 整改附件
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "整改附件")
|
|
||||||
private String rectificationFile;
|
private String rectificationFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "备注")
|
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "创建时间")
|
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -67,14 +67,24 @@ public class HseViolationRecordVo implements Serializable {
|
|||||||
private Date violationTime;
|
private Date violationTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 违章处理人id
|
* 整改单位(1分包 2班组)
|
||||||
*/
|
*/
|
||||||
private Long handlerId;
|
private String rectificationUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 违章处理人名称
|
* 整改单位id
|
||||||
*/
|
*/
|
||||||
private String handlerName;
|
private Long rectificationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改人id
|
||||||
|
*/
|
||||||
|
private Long correctorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改人名称
|
||||||
|
*/
|
||||||
|
private String correctorName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 处理期限
|
* 处理期限
|
||||||
|
@ -11,8 +11,8 @@ import org.dromara.safety.domain.dto.safetyinspection.HseSafetyInspectionCreateR
|
|||||||
import org.dromara.safety.domain.dto.safetyinspection.HseSafetyInspectionGisReq;
|
import org.dromara.safety.domain.dto.safetyinspection.HseSafetyInspectionGisReq;
|
||||||
import org.dromara.safety.domain.dto.safetyinspection.HseSafetyInspectionQueryReq;
|
import org.dromara.safety.domain.dto.safetyinspection.HseSafetyInspectionQueryReq;
|
||||||
import org.dromara.safety.domain.dto.safetyinspection.HseSafetyInspectionUpdateReq;
|
import org.dromara.safety.domain.dto.safetyinspection.HseSafetyInspectionUpdateReq;
|
||||||
import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionVo;
|
|
||||||
import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionListGisVo;
|
import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionListGisVo;
|
||||||
|
import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionVo;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -75,13 +75,12 @@ public interface IHseSafetyInspectionService extends IService<HseSafetyInspectio
|
|||||||
Boolean updateByBo(HseSafetyInspectionUpdateReq req);
|
Boolean updateByBo(HseSafetyInspectionUpdateReq req);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验并批量删除安全巡检工单信息
|
* 批量删除安全巡检工单信息
|
||||||
*
|
*
|
||||||
* @param ids 待删除的主键集合
|
* @param ids 待删除的主键集合
|
||||||
* @param isValid 是否进行有效性校验
|
|
||||||
* @return 是否删除成功
|
* @return 是否删除成功
|
||||||
*/
|
*/
|
||||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
Boolean deleteByIds(Collection<Long> ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取安全巡检工单视图对象
|
* 获取安全巡检工单视图对象
|
||||||
|
@ -16,25 +16,27 @@ import org.dromara.common.core.utils.DateUtils;
|
|||||||
import org.dromara.common.core.utils.ObjectUtils;
|
import org.dromara.common.core.utils.ObjectUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.core.utils.file.FileUtils;
|
import org.dromara.common.core.utils.file.FileUtils;
|
||||||
|
import org.dromara.common.enums.InspectionRectificationUnitType;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import org.dromara.common.oss.core.OssClient;
|
import org.dromara.common.oss.core.OssClient;
|
||||||
import org.dromara.common.oss.exception.OssException;
|
import org.dromara.common.oss.exception.OssException;
|
||||||
import org.dromara.common.oss.factory.OssFactory;
|
import org.dromara.common.oss.factory.OssFactory;
|
||||||
import org.dromara.contractor.domain.SubConstructionUser;
|
import org.dromara.common.utils.DocumentUtil;
|
||||||
|
import org.dromara.contractor.domain.SubContractor;
|
||||||
|
import org.dromara.contractor.service.ISubContractorService;
|
||||||
import org.dromara.project.domain.BusProjectTeam;
|
import org.dromara.project.domain.BusProjectTeam;
|
||||||
import org.dromara.contractor.service.ISubConstructionUserService;
|
|
||||||
import org.dromara.project.service.IBusProjectService;
|
import org.dromara.project.service.IBusProjectService;
|
||||||
import org.dromara.project.service.IBusProjectTeamService;
|
import org.dromara.project.service.IBusProjectTeamService;
|
||||||
import org.dromara.safety.constant.HseSafetyConstant;
|
import org.dromara.safety.constant.HseSafetyConstant;
|
||||||
import org.dromara.safety.domain.HseSafetyInspection;
|
import org.dromara.safety.domain.HseSafetyInspection;
|
||||||
import org.dromara.safety.domain.HseTeamMeeting;
|
import org.dromara.safety.domain.HseTeamMeeting;
|
||||||
import org.dromara.safety.domain.enums.HseSafetyInspectionReviewTypeEnum;
|
|
||||||
import org.dromara.safety.domain.enums.HseSafetyInspectionStatusEnum;
|
|
||||||
import org.dromara.safety.domain.dto.safetyinspection.HseSafetyInspectionCreateReq;
|
import org.dromara.safety.domain.dto.safetyinspection.HseSafetyInspectionCreateReq;
|
||||||
import org.dromara.safety.domain.dto.safetyinspection.HseSafetyInspectionGisReq;
|
import org.dromara.safety.domain.dto.safetyinspection.HseSafetyInspectionGisReq;
|
||||||
import org.dromara.safety.domain.dto.safetyinspection.HseSafetyInspectionQueryReq;
|
import org.dromara.safety.domain.dto.safetyinspection.HseSafetyInspectionQueryReq;
|
||||||
import org.dromara.safety.domain.dto.safetyinspection.HseSafetyInspectionUpdateReq;
|
import org.dromara.safety.domain.dto.safetyinspection.HseSafetyInspectionUpdateReq;
|
||||||
|
import org.dromara.safety.domain.enums.HseSafetyInspectionReviewTypeEnum;
|
||||||
|
import org.dromara.safety.domain.enums.HseSafetyInspectionStatusEnum;
|
||||||
import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionListGisVo;
|
import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionListGisVo;
|
||||||
import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionVo;
|
import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionVo;
|
||||||
import org.dromara.safety.domain.vo.teammeeting.HseTeamMeetingGis;
|
import org.dromara.safety.domain.vo.teammeeting.HseTeamMeetingGis;
|
||||||
@ -46,7 +48,6 @@ import org.dromara.system.domain.vo.SysUserVo;
|
|||||||
import org.dromara.system.service.ISysDictDataService;
|
import org.dromara.system.service.ISysDictDataService;
|
||||||
import org.dromara.system.service.ISysOssService;
|
import org.dromara.system.service.ISysOssService;
|
||||||
import org.dromara.system.service.ISysUserService;
|
import org.dromara.system.service.ISysUserService;
|
||||||
import org.dromara.common.utils.DocumentUtil;
|
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -60,6 +61,7 @@ import java.nio.file.Path;
|
|||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
import java.util.zip.ZipOutputStream;
|
import java.util.zip.ZipOutputStream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -74,10 +76,10 @@ public class HseSafetyInspectionServiceImpl extends ServiceImpl<HseSafetyInspect
|
|||||||
implements IHseSafetyInspectionService {
|
implements IHseSafetyInspectionService {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ISubConstructionUserService constructionUserService;
|
private IBusProjectTeamService projectTeamService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IBusProjectTeamService projectTeamService;
|
private ISubContractorService contractorService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IBusProjectService projectService;
|
private IBusProjectService projectService;
|
||||||
@ -150,7 +152,7 @@ public class HseSafetyInspectionServiceImpl extends ServiceImpl<HseSafetyInspect
|
|||||||
List<HseTeamMeeting> teamMeetings = teamMeetingService.lambdaQuery()
|
List<HseTeamMeeting> teamMeetings = teamMeetingService.lambdaQuery()
|
||||||
.eq(HseTeamMeeting::getProjectId, projectId)
|
.eq(HseTeamMeeting::getProjectId, projectId)
|
||||||
.list();
|
.list();
|
||||||
if (CollUtil.isEmpty(teamMeetings)){
|
if (CollUtil.isEmpty(teamMeetings)) {
|
||||||
return gisVo;
|
return gisVo;
|
||||||
}
|
}
|
||||||
// 获取最新的班组列表
|
// 获取最新的班组列表
|
||||||
@ -167,7 +169,7 @@ public class HseSafetyInspectionServiceImpl extends ServiceImpl<HseSafetyInspect
|
|||||||
BeanUtils.copyProperties(teamMeeting, gis);
|
BeanUtils.copyProperties(teamMeeting, gis);
|
||||||
gis.setName("站班会");
|
gis.setName("站班会");
|
||||||
if (teamMap.containsKey(teamMeeting.getTeamId())) {
|
if (teamMap.containsKey(teamMeeting.getTeamId())) {
|
||||||
gis.setTeamName(teamMap.get(teamMeeting.getTeamId()).get(0).getTeamName());
|
gis.setTeamName(teamMap.get(teamMeeting.getTeamId()).getFirst().getTeamName());
|
||||||
}
|
}
|
||||||
return gis;
|
return gis;
|
||||||
}).toList();
|
}).toList();
|
||||||
@ -260,28 +262,20 @@ public class HseSafetyInspectionServiceImpl extends ServiceImpl<HseSafetyInspect
|
|||||||
if (projectId != null && projectService.getById(projectId) == null) {
|
if (projectId != null && projectService.getById(projectId) == null) {
|
||||||
throw new ServiceException("对应项目不存在", HttpStatus.NOT_FOUND);
|
throw new ServiceException("对应项目不存在", HttpStatus.NOT_FOUND);
|
||||||
}
|
}
|
||||||
if (correctorId != null && constructionUserService.getById(correctorId) == null) {
|
if (correctorId != null && userService.selectUserById(correctorId) == null) {
|
||||||
throw new ServiceException("对应整改人不存在", HttpStatus.NOT_FOUND);
|
throw new ServiceException("对应整改人不存在", HttpStatus.NOT_FOUND);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验并批量删除安全巡检工单信息
|
* 批量删除安全巡检工单信息
|
||||||
*
|
*
|
||||||
* @param ids 待删除的主键集合
|
* @param ids 待删除的主键集合
|
||||||
* @param isValid 是否进行有效性校验
|
|
||||||
* @return 是否删除成功
|
* @return 是否删除成功
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
public Boolean deleteByIds(Collection<Long> ids) {
|
||||||
if (isValid) {
|
|
||||||
// TODO 做一些业务上的校验,判断是否需要校验
|
|
||||||
Long count = this.lambdaQuery().in(HseSafetyInspection::getPid, ids).count();
|
|
||||||
if (count > 0) {
|
|
||||||
throw new ServiceException("所选安全巡检工单包含子数据,不允许删除", HttpStatus.BAD_REQUEST);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return this.removeBatchByIds(ids);
|
return this.removeBatchByIds(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -299,24 +293,22 @@ public class HseSafetyInspectionServiceImpl extends ServiceImpl<HseSafetyInspect
|
|||||||
return safetyInspectionVo;
|
return safetyInspectionVo;
|
||||||
}
|
}
|
||||||
BeanUtils.copyProperties(safetyInspection, safetyInspectionVo);
|
BeanUtils.copyProperties(safetyInspection, safetyInspectionVo);
|
||||||
// 关联班组信息
|
// 关联整改单位信息
|
||||||
Long teamId = safetyInspection.getTeamId();
|
Long rectificationId = safetyInspection.getRectificationId();
|
||||||
if (teamId != null) {
|
String rectificationUnit = safetyInspection.getRectificationUnit();
|
||||||
LambdaQueryWrapper<BusProjectTeam> teamLambdaQueryWrapper = Wrappers.lambdaQuery(BusProjectTeam.class)
|
if (rectificationId != null && rectificationUnit != null) {
|
||||||
.select(BusProjectTeam::getId, BusProjectTeam::getTeamName)
|
if (rectificationUnit.equals(InspectionRectificationUnitType.CONTRACTOR.getValue())) {
|
||||||
.eq(BusProjectTeam::getId, teamId);
|
SubContractor contractor = contractorService.getById(rectificationId);
|
||||||
BusProjectTeam projectTeam = projectTeamService.getOne(teamLambdaQueryWrapper);
|
safetyInspectionVo.setRectificationName(contractor.getName());
|
||||||
safetyInspectionVo.setTeamId(projectTeam.getId());
|
} else if (rectificationUnit.equals(InspectionRectificationUnitType.TEAM.getValue())) {
|
||||||
safetyInspectionVo.setTeamName(projectTeam.getTeamName());
|
BusProjectTeam team = projectTeamService.getById(rectificationId);
|
||||||
|
safetyInspectionVo.setRectificationName(team.getTeamName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 关联整改人信息
|
// 关联整改人信息
|
||||||
Long correctorId = safetyInspection.getCorrectorId();
|
Long correctorId = safetyInspection.getCorrectorId();
|
||||||
if (correctorId != null) {
|
if (correctorId != null) {
|
||||||
LambdaQueryWrapper<SubConstructionUser> constructionUserLambdaQueryWrapper = Wrappers.lambdaQuery(SubConstructionUser.class)
|
SysUserVo constructionUser = userService.selectUserById(correctorId);
|
||||||
.select(SubConstructionUser::getId, SubConstructionUser::getUserName)
|
|
||||||
.eq(SubConstructionUser::getId, correctorId);
|
|
||||||
SubConstructionUser constructionUser = constructionUserService.getOne(constructionUserLambdaQueryWrapper);
|
|
||||||
safetyInspectionVo.setCorrectorId(constructionUser.getId());
|
|
||||||
safetyInspectionVo.setCorrectorName(constructionUser.getUserName());
|
safetyInspectionVo.setCorrectorName(constructionUser.getUserName());
|
||||||
}
|
}
|
||||||
// 关联创建用户信息
|
// 关联创建用户信息
|
||||||
@ -341,23 +333,21 @@ public class HseSafetyInspectionServiceImpl extends ServiceImpl<HseSafetyInspect
|
|||||||
if (req == null) {
|
if (req == null) {
|
||||||
return lqw;
|
return lqw;
|
||||||
}
|
}
|
||||||
Long pid = req.getPid();
|
|
||||||
Long projectId = req.getProjectId();
|
Long projectId = req.getProjectId();
|
||||||
String checkType = req.getCheckType();
|
String checkType = req.getCheckType();
|
||||||
String violationType = req.getViolationType();
|
String violationType = req.getViolationType();
|
||||||
Long teamId = req.getTeamId();
|
String rectificationUnit = req.getRectificationUnit();
|
||||||
Long correctorId = req.getCorrectorId();
|
Long rectificationId = req.getRectificationId();
|
||||||
String status = req.getStatus();
|
String status = req.getStatus();
|
||||||
String reviewType = req.getReviewType();
|
String reviewType = req.getReviewType();
|
||||||
// 精准查询
|
// 精准查询
|
||||||
lqw.eq(ObjectUtils.isNotEmpty(pid), HseSafetyInspection::getPid, pid);
|
|
||||||
lqw.eq(ObjectUtils.isNotEmpty(projectId), HseSafetyInspection::getProjectId, projectId);
|
lqw.eq(ObjectUtils.isNotEmpty(projectId), HseSafetyInspection::getProjectId, projectId);
|
||||||
lqw.eq(ObjectUtils.isNotEmpty(checkType), HseSafetyInspection::getCheckType, checkType);
|
lqw.eq(ObjectUtils.isNotEmpty(rectificationId), HseSafetyInspection::getRectificationId, rectificationId);
|
||||||
lqw.eq(ObjectUtils.isNotEmpty(violationType), HseSafetyInspection::getViolationType, violationType);
|
lqw.eq(StringUtils.isNotBlank(checkType), HseSafetyInspection::getCheckType, checkType);
|
||||||
lqw.eq(ObjectUtils.isNotEmpty(teamId), HseSafetyInspection::getTeamId, teamId);
|
lqw.eq(StringUtils.isNotBlank(violationType), HseSafetyInspection::getViolationType, violationType);
|
||||||
lqw.eq(ObjectUtils.isNotEmpty(correctorId), HseSafetyInspection::getCorrectorId, correctorId);
|
lqw.eq(StringUtils.isNotBlank(rectificationUnit), HseSafetyInspection::getRectificationUnit, rectificationUnit);
|
||||||
lqw.eq(ObjectUtils.isNotEmpty(status), HseSafetyInspection::getStatus, status);
|
lqw.eq(StringUtils.isNotBlank(status), HseSafetyInspection::getStatus, status);
|
||||||
lqw.eq(ObjectUtils.isNotEmpty(reviewType), HseSafetyInspection::getReviewType, reviewType);
|
lqw.eq(StringUtils.isNotBlank(reviewType), HseSafetyInspection::getReviewType, reviewType);
|
||||||
return lqw;
|
return lqw;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -379,8 +369,33 @@ public class HseSafetyInspectionServiceImpl extends ServiceImpl<HseSafetyInspect
|
|||||||
if (CollUtil.isEmpty(safetyInspectionList)) {
|
if (CollUtil.isEmpty(safetyInspectionList)) {
|
||||||
return safetyInspectionVoPage;
|
return safetyInspectionVoPage;
|
||||||
}
|
}
|
||||||
|
// 获取整改人、创建用户信息
|
||||||
|
List<Long> userIdList = Stream.concat(
|
||||||
|
safetyInspectionList.stream().map(HseSafetyInspection::getCorrectorId),
|
||||||
|
safetyInspectionList.stream().map(HseSafetyInspection::getCreateBy)
|
||||||
|
).distinct().toList();
|
||||||
|
List<SysUserVo> userVoList = userService.selectUserByIds(userIdList, null);
|
||||||
|
Map<Long, String> userMap = userVoList.stream().collect(Collectors.toMap(SysUserVo::getUserId, SysUserVo::getNickName));
|
||||||
// 对象列表 => 封装对象列表
|
// 对象列表 => 封装对象列表
|
||||||
List<HseSafetyInspectionVo> safetyInspectionVoList = safetyInspectionList.stream().map(this::getVo).toList();
|
List<HseSafetyInspectionVo> safetyInspectionVoList = safetyInspectionList.stream().map(inspection -> {
|
||||||
|
HseSafetyInspectionVo qualityInspectionVo = new HseSafetyInspectionVo();
|
||||||
|
BeanUtils.copyProperties(inspection, qualityInspectionVo);
|
||||||
|
// 关联整改人信息
|
||||||
|
Long correctorId = inspection.getCorrectorId();
|
||||||
|
String correctorName = null;
|
||||||
|
if (userMap.containsKey(correctorId)) {
|
||||||
|
correctorName = userMap.get(correctorId);
|
||||||
|
}
|
||||||
|
qualityInspectionVo.setCorrectorName(correctorName);
|
||||||
|
// 关联创建用户信息
|
||||||
|
Long createBy = inspection.getCreateBy();
|
||||||
|
String createByName = null;
|
||||||
|
if (userMap.containsKey(createBy)) {
|
||||||
|
createByName = userMap.get(createBy);
|
||||||
|
}
|
||||||
|
qualityInspectionVo.setCreatorName(createByName);
|
||||||
|
return qualityInspectionVo;
|
||||||
|
}).toList();
|
||||||
safetyInspectionVoPage.setRecords(safetyInspectionVoList);
|
safetyInspectionVoPage.setRecords(safetyInspectionVoList);
|
||||||
return safetyInspectionVoPage;
|
return safetyInspectionVoPage;
|
||||||
}
|
}
|
||||||
@ -476,15 +491,29 @@ public class HseSafetyInspectionServiceImpl extends ServiceImpl<HseSafetyInspect
|
|||||||
replacementMap.put("${violationType}", violationType);
|
replacementMap.put("${violationType}", violationType);
|
||||||
Date checkTime = safetyInspection.getCheckTime();
|
Date checkTime = safetyInspection.getCheckTime();
|
||||||
replacementMap.put("${checkTime}", checkTime != null ? DateUtils.formatDateTime(checkTime) : "");
|
replacementMap.put("${checkTime}", checkTime != null ? DateUtils.formatDateTime(checkTime) : "");
|
||||||
String correctorName = constructionUserService.getById(safetyInspection.getCorrectorId()).getUserName();
|
String correctorName = "";
|
||||||
|
if (safetyInspection.getCorrectorId() != null) {
|
||||||
|
correctorName = userService.selectUserById(safetyInspection.getCorrectorId()).getNickName();
|
||||||
|
}
|
||||||
replacementMap.put("${correctorName}", correctorName);
|
replacementMap.put("${correctorName}", correctorName);
|
||||||
replacementMap.put("${replyDate}", safetyInspection.getReplyDate());
|
replacementMap.put("${replyDate}", safetyInspection.getReplyDate());
|
||||||
replacementMap.put("${hiddenDanger}", safetyInspection.getHiddenDanger());
|
replacementMap.put("${hiddenDanger}", safetyInspection.getHiddenDanger());
|
||||||
replacementMap.put("${checkFile}", safetyInspection.getCheckFile());
|
replacementMap.put("${checkFile}", safetyInspection.getCheckFile());
|
||||||
String status = dictDataService.selectDictLabel(HseSafetyConstant.SAFETY_INSPECTION_TYPE, safetyInspection.getStatus());
|
String status = dictDataService.selectDictLabel(HseSafetyConstant.SAFETY_INSPECTION_TYPE, safetyInspection.getStatus());
|
||||||
replacementMap.put("${status}", status);
|
replacementMap.put("${status}", status);
|
||||||
String teamName = projectTeamService.getById(safetyInspection.getTeamId()).getTeamName();
|
String rectificationName = "";
|
||||||
replacementMap.put("${teamName}", teamName);
|
String rectificationUnit = safetyInspection.getRectificationUnit();
|
||||||
|
Long rectificationId = safetyInspection.getRectificationId();
|
||||||
|
if (rectificationUnit != null && rectificationId != null) {
|
||||||
|
if (rectificationUnit.equals(InspectionRectificationUnitType.CONTRACTOR.getValue())) {
|
||||||
|
SubContractor contractor = contractorService.getById(rectificationId);
|
||||||
|
rectificationName = contractor.getName();
|
||||||
|
} else if (rectificationUnit.equals(InspectionRectificationUnitType.TEAM.getValue())) {
|
||||||
|
BusProjectTeam team = projectTeamService.getById(rectificationId);
|
||||||
|
rectificationName = team.getTeamName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
replacementMap.put("${teamName}", rectificationName);
|
||||||
Date rectificationTime = safetyInspection.getRectificationTime();
|
Date rectificationTime = safetyInspection.getRectificationTime();
|
||||||
replacementMap.put("${rectificationTime}", rectificationTime != null ? DateUtils.formatDateTime(rectificationTime) : "");
|
replacementMap.put("${rectificationTime}", rectificationTime != null ? DateUtils.formatDateTime(rectificationTime) : "");
|
||||||
replacementMap.put("${measure}", safetyInspection.getMeasure());
|
replacementMap.put("${measure}", safetyInspection.getMeasure());
|
||||||
|
@ -213,14 +213,14 @@ public class HseViolationRecordServiceImpl extends ServiceImpl<HseViolationRecor
|
|||||||
if (oldViolationRecord == null) {
|
if (oldViolationRecord == null) {
|
||||||
throw new ServiceException("违规记录信息不存在", HttpStatus.NOT_FOUND);
|
throw new ServiceException("违规记录信息不存在", HttpStatus.NOT_FOUND);
|
||||||
}
|
}
|
||||||
Long handlerId = req.getHandlerId();
|
Long correctorId = req.getCorrectorId();
|
||||||
SysUserVo user = userService.selectUserById(handlerId);
|
SysUserVo user = userService.selectUserById(correctorId);
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
throw new ServiceException("处理人信息不存在", HttpStatus.NOT_FOUND);
|
throw new ServiceException("处理人信息不存在", HttpStatus.NOT_FOUND);
|
||||||
}
|
}
|
||||||
HseViolationRecord violationRecord = new HseViolationRecord();
|
HseViolationRecord violationRecord = new HseViolationRecord();
|
||||||
violationRecord.setId(id);
|
violationRecord.setId(id);
|
||||||
violationRecord.setHandlerId(handlerId);
|
violationRecord.setCorrectorId(correctorId);
|
||||||
violationRecord.setDisposeDeadline(req.getDisposeDeadline());
|
violationRecord.setDisposeDeadline(req.getDisposeDeadline());
|
||||||
violationRecord.setRemark(req.getRemark());
|
violationRecord.setRemark(req.getRemark());
|
||||||
boolean result = this.updateById(violationRecord);
|
boolean result = this.updateById(violationRecord);
|
||||||
@ -268,10 +268,10 @@ public class HseViolationRecordServiceImpl extends ServiceImpl<HseViolationRecor
|
|||||||
violationRecordVo.setRecognizeVo(recognizeRecordService.getVo(recognizeRecord));
|
violationRecordVo.setRecognizeVo(recognizeRecordService.getVo(recognizeRecord));
|
||||||
}
|
}
|
||||||
// 关联违章人信息
|
// 关联违章人信息
|
||||||
Long handlerId = violationRecord.getHandlerId();
|
Long correctorId = violationRecord.getCorrectorId();
|
||||||
if (ObjectUtils.isNotEmpty(handlerId)) {
|
if (ObjectUtils.isNotEmpty(correctorId)) {
|
||||||
SysUserVo handler = userService.selectUserById(handlerId);
|
SysUserVo userVo = userService.selectUserById(correctorId);
|
||||||
violationRecordVo.setHandlerName(handler.getNickName());
|
violationRecordVo.setCorrectorName(userVo.getNickName());
|
||||||
}
|
}
|
||||||
return violationRecordVo;
|
return violationRecordVo;
|
||||||
}
|
}
|
||||||
@ -335,8 +335,8 @@ public class HseViolationRecordServiceImpl extends ServiceImpl<HseViolationRecor
|
|||||||
Map<Long, HseRecognizeRecord> recognizeIdRecognizeMap = recognizeRecordService.listByIds(recognizeIds).stream()
|
Map<Long, HseRecognizeRecord> recognizeIdRecognizeMap = recognizeRecordService.listByIds(recognizeIds).stream()
|
||||||
.collect(Collectors.toMap(HseRecognizeRecord::getId, recognize -> recognize));
|
.collect(Collectors.toMap(HseRecognizeRecord::getId, recognize -> recognize));
|
||||||
// 关联违章人信息
|
// 关联违章人信息
|
||||||
List<Long> handlerIds = violationRecordList.stream().map(HseViolationRecord::getHandlerId).distinct().toList();
|
List<Long> correctorIds = violationRecordList.stream().map(HseViolationRecord::getCorrectorId).distinct().toList();
|
||||||
Map<Long, SysUserVo> handlerIdUserMap = userService.selectUserByIds(handlerIds, null).stream()
|
Map<Long, SysUserVo> correctorMap = userService.selectUserByIds(correctorIds, null).stream()
|
||||||
.collect(Collectors.toMap(SysUserVo::getUserId, user -> user));
|
.collect(Collectors.toMap(SysUserVo::getUserId, user -> user));
|
||||||
List<HseViolationRecordVo> violationRecordVoList = violationRecordList.stream().map(violationLevel -> {
|
List<HseViolationRecordVo> violationRecordVoList = violationRecordList.stream().map(violationLevel -> {
|
||||||
HseViolationRecordVo vo = new HseViolationRecordVo();
|
HseViolationRecordVo vo = new HseViolationRecordVo();
|
||||||
@ -350,8 +350,8 @@ public class HseViolationRecordServiceImpl extends ServiceImpl<HseViolationRecor
|
|||||||
vo.setRecognizeVo(recognizeRecordService.getVo(recognizeIdRecognizeMap.get(violationLevel.getRecognizeId())));
|
vo.setRecognizeVo(recognizeRecordService.getVo(recognizeIdRecognizeMap.get(violationLevel.getRecognizeId())));
|
||||||
}
|
}
|
||||||
// 违章人信息
|
// 违章人信息
|
||||||
if (CollUtil.isNotEmpty(handlerIdUserMap) && handlerIdUserMap.containsKey(violationLevel.getHandlerId())) {
|
if (CollUtil.isNotEmpty(correctorMap) && correctorMap.containsKey(violationLevel.getCorrectorId())) {
|
||||||
vo.setHandlerName(handlerIdUserMap.get(violationLevel.getHandlerId()).getNickName());
|
vo.setCorrectorName(correctorMap.get(violationLevel.getCorrectorId()).getNickName());
|
||||||
}
|
}
|
||||||
return vo;
|
return vo;
|
||||||
}).toList();
|
}).toList();
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.dromara.progress.mapper.PgsConstructionSchedulePlanMapper">
|
||||||
|
|
||||||
|
</mapper>
|
@ -1854,3 +1854,63 @@ values(1950489109817548805, '卷册文件查阅人删除', 1950489109817548801,
|
|||||||
|
|
||||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||||
values(1950489109817548806, '卷册文件查阅人导出', 1950489109817548801, '5', '#', '', 1, 0, 'F', '0', '0', 'design:volumeFileViewer:export', '#', 103, 1, sysdate(), null, null, '');
|
values(1950489109817548806, '卷册文件查阅人导出', 1950489109817548801, '5', '#', '', 1, 0, 'F', '0', '0', 'design:volumeFileViewer:export', '#', 103, 1, sysdate(), null, null, '');
|
||||||
|
|
||||||
|
-- 菜单 SQL
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values(1951130197151113217, '施工进度计划', '1913133014288699393', '1', 'constructionSchedulePlan', 'progress/constructionSchedulePlan/index', 1, 0, 'C', '0', '0', 'progress:constructionSchedulePlan:list', '#', 103, 1, sysdate(), null, null, '施工进度计划菜单');
|
||||||
|
|
||||||
|
-- 按钮 SQL
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values(1951130197151113218, '施工进度计划查询', 1951130197151113217, '1', '#', '', 1, 0, 'F', '0', '0', 'progress:constructionSchedulePlan:query', '#', 103, 1, sysdate(), null, null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values(1951130197151113219, '施工进度计划新增', 1951130197151113217, '2', '#', '', 1, 0, 'F', '0', '0', 'progress:constructionSchedulePlan:add', '#', 103, 1, sysdate(), null, null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values(1951130197151113220, '施工进度计划修改', 1951130197151113217, '3', '#', '', 1, 0, 'F', '0', '0', 'progress:constructionSchedulePlan:edit', '#', 103, 1, sysdate(), null, null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values(1951130197151113221, '施工进度计划删除', 1951130197151113217, '4', '#', '', 1, 0, 'F', '0', '0', 'progress:constructionSchedulePlan:remove', '#', 103, 1, sysdate(), null, null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values(1951130197151113222, '施工进度计划导出', 1951130197151113217, '5', '#', '', 1, 0, 'F', '0', '0', 'progress:constructionSchedulePlan:export', '#', 103, 1, sysdate(), null, null, '');
|
||||||
|
|
||||||
|
-- 菜单 SQL
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values(1951204439405707265, '分项工程单价', '1913133014288699393', '1', 'progressCategory', 'progress/progressCategory/index', 1, 0, 'C', '0', '0', 'progress:progressCategory:list', '#', 103, 1, sysdate(), null, null, '分项工程单价菜单');
|
||||||
|
|
||||||
|
-- 按钮 SQL
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values(1951204439405707266, '分项工程单价查询', 1951204439405707265, '1', '#', '', 1, 0, 'F', '0', '0', 'progress:progressCategory:query', '#', 103, 1, sysdate(), null, null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values(1951204439405707267, '分项工程单价新增', 1951204439405707265, '2', '#', '', 1, 0, 'F', '0', '0', 'progress:progressCategory:add', '#', 103, 1, sysdate(), null, null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values(1951204439405707268, '分项工程单价修改', 1951204439405707265, '3', '#', '', 1, 0, 'F', '0', '0', 'progress:progressCategory:edit', '#', 103, 1, sysdate(), null, null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values(1951204439405707269, '分项工程单价删除', 1951204439405707265, '4', '#', '', 1, 0, 'F', '0', '0', 'progress:progressCategory:remove', '#', 103, 1, sysdate(), null, null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values(1951204439405707270, '分项工程单价导出', 1951204439405707265, '5', '#', '', 1, 0, 'F', '0', '0', 'progress:progressCategory:export', '#', 103, 1, sysdate(), null, null, '');
|
||||||
|
|
||||||
|
-- 菜单 SQL
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values(1951230902137835522, '物资-材料设备', '3', '1', 'cailiaoshebei', 'cailiaoshebei/cailiaoshebei/index', 1, 0, 'C', '0', '0', 'cailiaoshebei:cailiaoshebei:list', '#', 103, 1, sysdate(), null, null, '物资-材料设备菜单');
|
||||||
|
|
||||||
|
-- 按钮 SQL
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values(1951230902137835523, '物资-材料设备查询', 1951230902137835522, '1', '#', '', 1, 0, 'F', '0', '0', 'cailiaoshebei:cailiaoshebei:query', '#', 103, 1, sysdate(), null, null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values(1951230902137835524, '物资-材料设备新增', 1951230902137835522, '2', '#', '', 1, 0, 'F', '0', '0', 'cailiaoshebei:cailiaoshebei:add', '#', 103, 1, sysdate(), null, null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values(1951230902137835525, '物资-材料设备修改', 1951230902137835522, '3', '#', '', 1, 0, 'F', '0', '0', 'cailiaoshebei:cailiaoshebei:edit', '#', 103, 1, sysdate(), null, null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values(1951230902137835526, '物资-材料设备删除', 1951230902137835522, '4', '#', '', 1, 0, 'F', '0', '0', 'cailiaoshebei:cailiaoshebei:remove', '#', 103, 1, sysdate(), null, null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values(1951230902137835527, '物资-材料设备导出', 1951230902137835522, '5', '#', '', 1, 0, 'F', '0', '0', 'cailiaoshebei:cailiaoshebei:export', '#', 103, 1, sysdate(), null, null, '');
|
||||||
|
@ -1695,3 +1695,26 @@ create table des_volume_file_Viewer
|
|||||||
primary key (`id`) using btree,
|
primary key (`id`) using btree,
|
||||||
unique index `uk_volume_user` (`volume_catalog_id`, `user_id`)
|
unique index `uk_volume_user` (`volume_catalog_id`, `user_id`)
|
||||||
) comment '卷册查阅人' collate = utf8mb4_unicode_ci;
|
) comment '卷册查阅人' collate = utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
drop table if exists pgs_construction_schedule_plan;
|
||||||
|
create table pgs_construction_schedule_plan
|
||||||
|
(
|
||||||
|
`id` bigint not null auto_increment comment '主键ID',
|
||||||
|
`project_id` bigint not null comment '项目ID',
|
||||||
|
`p_id` bigint default 0 not null comment '父ID',
|
||||||
|
`node_name` varchar(255) not null comment '节点名称',
|
||||||
|
`project_structure` bigint null comment '对应项目结构',
|
||||||
|
`plan_start_date` date not null comment '预计开始时间',
|
||||||
|
`plan_end_date` date not null comment '预计结束时间',
|
||||||
|
`practical_start_date` date null comment '实际开始时间',
|
||||||
|
`practical_end_date` date null comment '实际结束时间',
|
||||||
|
`status` varchar(64) null comment '状态',
|
||||||
|
`remark` varchar(255) null comment '备注',
|
||||||
|
`create_by` bigint null comment '创建者',
|
||||||
|
`update_by` bigint null comment '更新者',
|
||||||
|
`create_dept` bigint null comment '创建部门',
|
||||||
|
`create_time` datetime default CURRENT_TIMESTAMP null comment '创建时间',
|
||||||
|
`update_time` datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间',
|
||||||
|
primary key (`id`) using btree,
|
||||||
|
index `idx_project_id` (`project_id` asc) using btree comment '项目ID'
|
||||||
|
) comment '施工进度计划' collate = utf8mb4_unicode_ci;
|
||||||
|
Reference in New Issue
Block a user