优化
This commit is contained in:
@ -4,6 +4,7 @@ import com.ruoyi.bgt.domain.BgtProjectRecruitApply;
|
||||
import com.ruoyi.bgt.domain.dto.BgtProjectRecruitApplyConsentDTO;
|
||||
import com.ruoyi.bgt.domain.dto.BgtProjectRecruitApplyQueryDTO;
|
||||
import com.ruoyi.bgt.domain.dto.BgtScoreDTO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyHtmlVO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyVO;
|
||||
import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
@ -12,6 +13,7 @@ import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.wgz.bo.req.WgzAppPersonalBasicInformationReq;
|
||||
import com.ruoyi.wgz.bo.res.WgzAppPersonalBasicInformationRes;
|
||||
import com.ruoyi.wgz.service.IWgzUserService;
|
||||
@ -63,7 +65,7 @@ public class AppBgtProjectRecruitApplyController extends BaseController {
|
||||
|
||||
@ApiOperation("HTML务工者列表")
|
||||
@GetMapping("/htmlList")
|
||||
public AjaxResult<List<BgtProjectRecruitApplyVO>> htmlList(Long recruitId,Boolean isNotUpload) {
|
||||
public AjaxResult<List<BgtProjectRecruitApplyHtmlVO>> htmlList(Long recruitId, Boolean isNotUpload) {
|
||||
return AjaxResult.success(iBgtProjectRecruitApplyService.htmlList(recruitId,isNotUpload));
|
||||
}
|
||||
|
||||
@ -141,6 +143,7 @@ public class AppBgtProjectRecruitApplyController extends BaseController {
|
||||
@RepeatSubmit
|
||||
@PutMapping("/score")
|
||||
public AjaxResult<Boolean> score(@Validated @RequestBody BgtScoreDTO dto) {
|
||||
dto.setScoreBy(SecurityUtils.getAppUserId());
|
||||
return AjaxResult.success(iBgtProjectRecruitApplyService.score(dto));
|
||||
}
|
||||
|
||||
|
@ -14,6 +14,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.FbsUser;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.exception.BaseException;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.fbs.domain.FbsProjectTask;
|
||||
import com.ruoyi.fbs.service.IFbsProjectTaskService;
|
||||
@ -77,6 +78,9 @@ public class AppBgtProjectTaskProgressController extends BaseController {
|
||||
|
||||
FbsProjectTask task = iFbsProjectTaskService.getById(dto.getTaskId());
|
||||
FbsUser fbsUser = iFbsUserService.selectUserByUserId(task.getCreateId());
|
||||
if (fbsUser == null) {
|
||||
throw new BaseException("获取不到分包商信息");
|
||||
}
|
||||
BgtProjectTaskProgress bgtProjectTaskProgress = BeanUtil.copyProperties(dto, BgtProjectTaskProgress.class);
|
||||
bgtProjectTaskProgress.setReviewerName(fbsUser.getUsername());
|
||||
bgtProjectTaskProgress.setReviewerId(fbsUser.getUserId());
|
||||
|
@ -28,7 +28,10 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.ruoyi.common.constant.Constants.BGT;
|
||||
import static com.ruoyi.common.constant.Constants.WGZ;
|
||||
@ -150,4 +153,24 @@ public class AnnexController extends BaseController {
|
||||
return AjaxResult.success(iAnnexService.list(wrapper));
|
||||
}
|
||||
|
||||
@ApiOperation("HTML查看务工者附件")
|
||||
@GetMapping("/getHtmlWgzAnnex")
|
||||
public AjaxResult<Map<String, List<Annex>>> getHtmlWgzAnnex(Long wgzUserId,Long recruitApplyId) {
|
||||
LambdaQueryWrapper<Annex> wrapper = Wrappers.<Annex>lambdaQuery()
|
||||
.eq(Annex::getUserId, wgzUserId)
|
||||
.eq(Annex::getUserType, WGZ)
|
||||
.eq(Annex::getRecruitApplyId, recruitApplyId)
|
||||
.in(Annex::getAnnexType, Arrays.asList("1","2"));
|
||||
List<Annex> list = iAnnexService.list(wrapper);
|
||||
Map<String, List<Annex>> stringListhashMap = new HashMap<>();
|
||||
//劳动合同
|
||||
List<Annex> contracts = list.stream().filter(vo -> "1".equals(vo.getAnnexType())).collect(Collectors.toList());
|
||||
stringListhashMap.put("1",contracts);
|
||||
//保单
|
||||
List<Annex> policyList = list.stream().filter(vo -> "2".equals(vo.getAnnexType())).collect(Collectors.toList());
|
||||
stringListhashMap.put("2",policyList);
|
||||
return AjaxResult.success(stringListhashMap);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -56,9 +56,9 @@ public class UploadZipController {
|
||||
private final IBgtUserService bgtUserService;
|
||||
private final IBgtProjectRecruitApplyService recruitApplyService;
|
||||
|
||||
private static final String TEMP_DIR = "ruoyi/uploadPath/temporaryZip";
|
||||
private static final String SAVE_DIR = "ruoyi/uploadPath/recruit";
|
||||
private static final String RECORD_DIR = "ruoyi/uploadPath/record";
|
||||
private static final String TEMP_DIR = "ruoyi/uploadPath/temporaryZip"; //临时解压
|
||||
private static final String SAVE_DIR = "ruoyi/uploadPath/recruit"; //保存目录
|
||||
private static final String RECORD_DIR = "ruoyi/uploadPath/record"; //记录目录
|
||||
|
||||
@ApiOperation("上传压缩文件")
|
||||
@PostMapping("/upload-zip")
|
||||
@ -233,7 +233,7 @@ public class UploadZipController {
|
||||
System.out.println("第二层文件夹名称: " + secondLevelFolderName);
|
||||
if (secondLevelFile.isDirectory()) {
|
||||
File[] thirdLevelFiles = secondLevelFile.listFiles();
|
||||
if (thirdLevelFiles != null) {
|
||||
if (thirdLevelFiles != null && thirdLevelFiles.length > 0) {
|
||||
// 删除数据库里的附件
|
||||
if ("保险".equals(secondLevelFolderName)) {
|
||||
insurance.add(wgzUser.getUserId());
|
||||
@ -271,11 +271,24 @@ public class UploadZipController {
|
||||
if (firstLevelFiles != null) {
|
||||
for (File firstLevelFile : firstLevelFiles) {
|
||||
if (firstLevelFile.isDirectory()) {
|
||||
String secondLevelName = firstLevelFile.getName();
|
||||
File secondLevelDestDir = new File(firstLevelDestDir, secondLevelName);
|
||||
if (secondLevelDestDir.exists()) {
|
||||
// 删除和解压出来的二级目录同名字的目录
|
||||
deleteFolder(secondLevelDestDir);
|
||||
|
||||
String firstLevelName = firstLevelFile.getName(); //解压目录
|
||||
File secondLevelDestDir = new File(firstLevelDestDir, firstLevelName); //保存目录
|
||||
|
||||
File[] secondLevelFiles = firstLevelFile.listFiles();
|
||||
if (secondLevelFiles != null) {
|
||||
for (File secondLevelfile : secondLevelFiles) {
|
||||
if (secondLevelfile.isDirectory()) {
|
||||
String secondLevelName = secondLevelfile.getName(); //解压目录
|
||||
File thirdLevelDestDir = new File(secondLevelDestDir, secondLevelName); //保存目录
|
||||
|
||||
File[] thirdLevelFiles = secondLevelfile.listFiles();
|
||||
if(thirdLevelFiles != null && thirdLevelFiles.length > 0){
|
||||
deleteFolder(thirdLevelDestDir);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
moveFilesRecursively(firstLevelFile, firstLevelDestDir, annexList, recruitId,username);
|
||||
}
|
||||
|
@ -105,5 +105,4 @@ public class AppFbsWageApplicationController extends BaseController {
|
||||
return AjaxResult.success(iBgtWageApplicationService.fbsAudit(bo));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,72 @@
|
||||
package com.ruoyi.web.controller.zbf;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.zbf.domain.ZbfMessage;
|
||||
import com.ruoyi.zbf.domain.dto.ZbfMessageDetailDTO;
|
||||
import com.ruoyi.zbf.domain.dto.ZbfMessageMyListDTO;
|
||||
import com.ruoyi.zbf.domain.vo.ZbfMessageCountVO;
|
||||
import com.ruoyi.zbf.domain.vo.ZbfMessageDetailVO;
|
||||
import com.ruoyi.zbf.domain.vo.ZbfMessageVO;
|
||||
import com.ruoyi.zbf.service.IZbfMessageService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 消息Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-31
|
||||
*/
|
||||
@Api(value = "App总包方消息控制器", tags = {"App总包方"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@RequestMapping("/app/zbf/message")
|
||||
public class AppZbfMessageController extends BaseController {
|
||||
|
||||
private final IZbfMessageService iZbfMessageService;
|
||||
|
||||
/**
|
||||
* 查询消息列表
|
||||
*/
|
||||
@ApiOperation("总包方未读消息统计")
|
||||
@GetMapping("/countUnread")
|
||||
public AjaxResult<ZbfMessageCountVO> count() {
|
||||
return AjaxResult.success(iZbfMessageService.countUnread());
|
||||
}
|
||||
|
||||
@ApiOperation("总包方消息列表")
|
||||
@GetMapping("/myList")
|
||||
public TableDataInfo<ZbfMessageVO> myList(ZbfMessageMyListDTO dto) {
|
||||
return iZbfMessageService.queryMyPageList(dto);
|
||||
}
|
||||
|
||||
@ApiOperation("总包方消息详情列表")
|
||||
@GetMapping("/detailList")
|
||||
public TableDataInfo<ZbfMessageDetailVO> otherList(ZbfMessageDetailDTO dto) {
|
||||
return iZbfMessageService.queryDetailPageList(dto);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("总包方消息已读")
|
||||
@PutMapping("/read/{id}")
|
||||
public AjaxResult<Boolean> read(@PathVariable(value = "id") Long id) {
|
||||
ZbfMessage zbfMessage = new ZbfMessage();
|
||||
zbfMessage.setId(id);
|
||||
zbfMessage.setReadStatus("1");
|
||||
return AjaxResult.success(iZbfMessageService.updateById(zbfMessage));
|
||||
}
|
||||
|
||||
@ApiOperation("总包方消息已操作")
|
||||
@PutMapping("/operation/{id}")
|
||||
public AjaxResult<Boolean> operation(@PathVariable(value = "id") Long id) {
|
||||
ZbfMessage zbfMessage = new ZbfMessage();
|
||||
zbfMessage.setId(id);
|
||||
zbfMessage.setIsOperation("2");
|
||||
return AjaxResult.success(iZbfMessageService.updateById(zbfMessage));
|
||||
}
|
||||
}
|
@ -7,8 +7,8 @@ import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.fbs.domain.FbsWageApplication;
|
||||
import com.ruoyi.fbs.domain.dto.FbsWageAuditDTO;
|
||||
import com.ruoyi.fbs.service.IFbsWageApplicationService;
|
||||
import com.ruoyi.zbf.domain.dto.ZbfWageAuditDTO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@ -43,7 +43,7 @@ public class AppZbfWageApplicationController extends BaseController {
|
||||
@Log(title = "总包方审核分包商工资申请", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit
|
||||
@PutMapping("/audit")
|
||||
public AjaxResult<Boolean> audit(@Validated @RequestBody FbsWageAuditDTO dto) {
|
||||
public AjaxResult<Boolean> audit(@Validated @RequestBody ZbfWageAuditDTO dto) {
|
||||
FbsWageApplication bo = iFbsWageApplicationService.getById(dto.getId());
|
||||
BeanUtil.copyProperties(dto, bo);
|
||||
return AjaxResult.success(iFbsWageApplicationService.zbfAudit(bo));
|
||||
|
@ -17,6 +17,7 @@ public enum RecruitApplyStatus
|
||||
WGZ_REFUSE("4", "务工者拒绝"),
|
||||
WORKING("5", "进场"),
|
||||
OUT_WORK("6", "离场"),
|
||||
CANCEL("7", "取消"),
|
||||
;
|
||||
|
||||
private final String code;
|
||||
@ -57,4 +58,9 @@ public enum RecruitApplyStatus
|
||||
public static List<String> getFile(){
|
||||
return Arrays.asList(WORKING.getCode(), WGZ_PASS.getCode());
|
||||
}
|
||||
|
||||
//其他
|
||||
public static List<String> other(){
|
||||
return Arrays.asList(BGT_REFUSE.getCode(), WGZ_REFUSE.getCode(),CANCEL.getCode());
|
||||
}
|
||||
}
|
||||
|
@ -102,7 +102,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
|
||||
.authorizeRequests()
|
||||
// 对于登录login 验证码captchaImage 允许匿名访问
|
||||
.antMatchers("/login", "/app/login", "/captchaImage","/demo/tress/all").anonymous()
|
||||
.antMatchers("/app/login","/wgz/app/wgzRegister","/app/bgt/recruit/htmlList","/app/bgt/apply/htmlList"
|
||||
.antMatchers("/app/login","/wgz/app/wgzRegister",
|
||||
"/app/bgt/recruit/htmlList","/app/bgt/apply/htmlList","/common/annex/getHtmlWgzAnnex"
|
||||
,"/download-folders","/upload-zip").permitAll()
|
||||
.antMatchers(
|
||||
HttpMethod.GET,
|
||||
|
@ -83,7 +83,7 @@ public class BgtProjectTaskProgress implements Serializable {
|
||||
private String uploader;
|
||||
|
||||
@ApiModelProperty("上传时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
private LocalDateTime uploadTime;
|
||||
|
||||
/** 进度 */
|
||||
|
@ -117,6 +117,9 @@ public class BgtWageApplication implements Serializable {
|
||||
@ApiModelProperty("审核人名字")
|
||||
private String reviewerName;
|
||||
|
||||
@ApiModelProperty("审核意见")
|
||||
private String auditOpinion;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
@Excel(name = "删除标志" , readConverterExp = "0=代表存在,2=代表删除")
|
||||
@ApiModelProperty("删除标志(0代表存在 2代表删除)")
|
||||
|
@ -20,7 +20,7 @@ public class BgtProjectRecruitApplyUserDTO {
|
||||
@NotNull(message = "招工任务Id不能为空")
|
||||
private Long recruitId;
|
||||
|
||||
@ApiModelProperty("选择状态(0未选择 1已选择")
|
||||
@ApiModelProperty("选择状态(0未选择 1已选择 2其他")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("务工者名字")
|
||||
|
@ -30,4 +30,10 @@ public class BgtScoreDTO {
|
||||
/** 评分内容 */
|
||||
@ApiModelProperty("评分内容")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "创建者",hidden = true)
|
||||
private String createBy;
|
||||
|
||||
@ApiModelProperty(value = "更新者",hidden = true)
|
||||
private String updateBy;
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ public class BgtPayCalculationDetailBaseVO {
|
||||
@ApiModelProperty("已付工资")
|
||||
private BigDecimal payAmount;
|
||||
|
||||
@ApiModelProperty("剩余工资")
|
||||
@ApiModelProperty("申请中工资")
|
||||
private BigDecimal residueAmount;
|
||||
|
||||
@ApiModelProperty("身份证号")
|
||||
|
@ -25,6 +25,9 @@ public class BgtPayCalculationDetailListVO {
|
||||
@ApiModelProperty("出勤天数")
|
||||
private Long num;
|
||||
|
||||
@ApiModelProperty("申请人类型")
|
||||
private String operatorType;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
@ -0,0 +1,53 @@
|
||||
package com.ruoyi.bgt.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 包工头招工申请对象 bgt_project_recruit_apply
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-02-18
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("App包工头招工HTML务工者信息")
|
||||
public class BgtProjectRecruitApplyHtmlVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@ApiModelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("务工者用户ID")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty("联系电话")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("头像")
|
||||
private String avatarName;
|
||||
|
||||
@ApiModelProperty("招工ID")
|
||||
private Long recruitId;
|
||||
|
||||
@ApiModelProperty("招工主题")
|
||||
private String recruitName;
|
||||
|
||||
@ApiModelProperty("0报名 1包工同意 2包工头拒绝(截止时间)3务工者同意 4务工者拒绝 5进场 6离场")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty("上传状态(0,未上传 1-部分上传 2-已上传)")
|
||||
private String uploadType="0";
|
||||
}
|
@ -26,4 +26,7 @@ public class BgtProjectRecruitDetailWgzListVO {
|
||||
|
||||
@ApiModelProperty("未选择人数")
|
||||
private Integer notSelectNum;
|
||||
|
||||
@ApiModelProperty("其他人数")
|
||||
private Integer otherNum;
|
||||
}
|
||||
|
@ -28,12 +28,27 @@ public class BgtProjectTaskProgressDetailVO implements Serializable {
|
||||
@ApiModelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("项目ID")
|
||||
private Long projectId;
|
||||
|
||||
@ApiModelProperty("项目名")
|
||||
private String projectName;
|
||||
|
||||
@ApiModelProperty("标段ID")
|
||||
private Long sectionId;
|
||||
|
||||
@ApiModelProperty("分包ID")
|
||||
private Long subId;
|
||||
|
||||
@ApiModelProperty("任务ID")
|
||||
private Long taskId;
|
||||
|
||||
@ApiModelProperty("任务名")
|
||||
private String taskName;
|
||||
|
||||
@ApiModelProperty("用工数量")
|
||||
private Integer taskStaffNum;
|
||||
|
||||
@ApiModelProperty("任务地址")
|
||||
private String taskAddress;
|
||||
|
||||
@ -43,31 +58,41 @@ public class BgtProjectTaskProgressDetailVO implements Serializable {
|
||||
@ApiModelProperty("负责人")
|
||||
private String director;
|
||||
|
||||
@ApiModelProperty("上传人ID")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long uploaderId;
|
||||
|
||||
@ApiModelProperty("上传人")
|
||||
private String uploader;
|
||||
|
||||
@ApiModelProperty("上传时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty("进度")
|
||||
private Integer progress;
|
||||
|
||||
@ApiModelProperty("用工数量")
|
||||
private Integer taskStaffNum;
|
||||
|
||||
@ApiModelProperty("审核状态(1审核中 2已审核 3未审核)")
|
||||
private String auditStatus;
|
||||
|
||||
@ApiModelProperty("上传时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty("进度描述")
|
||||
private String progressDescribe;
|
||||
|
||||
@ApiModelProperty("进度附件")
|
||||
private String progressAnnex;
|
||||
|
||||
@ApiModelProperty("审核状态(1审核中 2已审核 3未审核)")
|
||||
private String auditStatus;
|
||||
|
||||
@ApiModelProperty("审核人Id")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long reviewerId;
|
||||
|
||||
@ApiModelProperty("审核人名字")
|
||||
private String reviewerName;
|
||||
|
||||
@ApiModelProperty("审核意见")
|
||||
private String auditOpinion;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -26,9 +26,21 @@ public class BgtWageApplicationDetailVO {
|
||||
@ApiModelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("项目ID")
|
||||
private Long projectId;
|
||||
|
||||
@ApiModelProperty("项目名")
|
||||
private String projectName;
|
||||
|
||||
@ApiModelProperty("标段ID")
|
||||
private Long sectionId;
|
||||
|
||||
@ApiModelProperty("分包ID")
|
||||
private Long subId;
|
||||
|
||||
@ApiModelProperty("任务ID")
|
||||
private Long taskId;
|
||||
|
||||
@ApiModelProperty("任务名")
|
||||
private String taskName;
|
||||
|
||||
@ -41,6 +53,10 @@ public class BgtWageApplicationDetailVO {
|
||||
@ApiModelProperty("申请金额")
|
||||
private BigDecimal applicantAmount;
|
||||
|
||||
@ApiModelProperty("申请人ID")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("申请人")
|
||||
private String username;
|
||||
|
||||
@ -72,4 +88,15 @@ public class BgtWageApplicationDetailVO {
|
||||
@ApiModelProperty("审核状态(1审核中 2已审核 3未审核)")
|
||||
private String auditStatus;
|
||||
|
||||
@ApiModelProperty("审核人Id")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long reviewerId;
|
||||
|
||||
@ApiModelProperty("审核人名字")
|
||||
private String reviewerName;
|
||||
|
||||
@ApiModelProperty("审核意见")
|
||||
private String auditOpinion;
|
||||
|
||||
|
||||
}
|
||||
|
@ -59,4 +59,7 @@ public class BgtWageApplicationVO {
|
||||
|
||||
@ApiModelProperty("审核状态(1审核中 2已审核 3未审核)")
|
||||
private String auditStatus;
|
||||
|
||||
@ApiModelProperty("审核意见")
|
||||
private String auditOpinion;
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import com.ruoyi.bgt.domain.dto.BgtAttendanceDayDTO;
|
||||
import com.ruoyi.bgt.domain.dto.BgtProjectRecruitApplyQueryDTO;
|
||||
import com.ruoyi.bgt.domain.dto.BgtProjectRecruitApplyUserDTO;
|
||||
import com.ruoyi.bgt.domain.dto.BgtProjectTaskUserDTO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyHtmlVO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyVO;
|
||||
import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache;
|
||||
import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
|
||||
@ -33,7 +34,7 @@ public interface BgtProjectRecruitApplyMapper extends BaseMapperPlus<BgtProjectR
|
||||
|
||||
List<BgtProjectRecruitApplyVO> appQueryList(@Param("dto") BgtProjectRecruitApplyQueryDTO dto);
|
||||
|
||||
List<BgtProjectRecruitApplyVO> htmlList(@Param("recruitId") Long recruitId,@Param("isNotUpload")Boolean isNotUpload);
|
||||
List<BgtProjectRecruitApplyHtmlVO> htmlList(@Param("recruitId") Long recruitId, @Param("isNotUpload")Boolean isNotUpload);
|
||||
|
||||
// Page<BgtProjectRecruitApplyVO> dayAttendanceList(@Param("page")Page<BgtAttendanceDayDTO> queryDTOPage,@Param("dto") BgtAttendanceDayDTO dto);
|
||||
|
||||
|
@ -3,6 +3,7 @@ package com.ruoyi.bgt.service;
|
||||
import com.ruoyi.bgt.bo.BgtProjectRecruitApplyQueryBo;
|
||||
import com.ruoyi.bgt.domain.BgtProjectRecruitApply;
|
||||
import com.ruoyi.bgt.domain.dto.*;
|
||||
import com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyHtmlVO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyVO;
|
||||
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
@ -96,7 +97,7 @@ public interface IBgtProjectRecruitApplyService extends IServicePlus<BgtProjectR
|
||||
*/
|
||||
List<BgtProjectRecruitApplyVO> appAllList(BgtProjectRecruitApplyQueryDTO dto);
|
||||
|
||||
List<BgtProjectRecruitApplyVO> htmlList(Long recruitId,Boolean isNotUpload);
|
||||
List<BgtProjectRecruitApplyHtmlVO> htmlList(Long recruitId, Boolean isNotUpload);
|
||||
|
||||
/**
|
||||
* LC-APP相关
|
||||
|
@ -12,6 +12,7 @@ import com.ruoyi.bgt.domain.BgtMessage;
|
||||
import com.ruoyi.bgt.domain.BgtProjectRecruit;
|
||||
import com.ruoyi.bgt.domain.BgtProjectRecruitApply;
|
||||
import com.ruoyi.bgt.domain.dto.*;
|
||||
import com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyHtmlVO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyVO;
|
||||
import com.ruoyi.bgt.mapper.BgtProjectRecruitApplyMapper;
|
||||
import com.ruoyi.bgt.service.IBgtMessageService;
|
||||
@ -20,6 +21,7 @@ import com.ruoyi.bgt.service.IBgtProjectRecruitService;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.domain.vo.AnnexUploadCountVO;
|
||||
import com.ruoyi.common.enums.RecruitApplyStatus;
|
||||
import com.ruoyi.common.enums.RecruitStatus;
|
||||
import com.ruoyi.common.exception.BaseException;
|
||||
@ -50,6 +52,7 @@ import java.time.LocalDate;
|
||||
import java.time.LocalTime;
|
||||
import java.time.temporal.TemporalAdjusters;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.ruoyi.common.constants.BgtMessageConstant.*;
|
||||
import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.*;
|
||||
@ -237,8 +240,22 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
|
||||
|
||||
|
||||
@Override
|
||||
public List<BgtProjectRecruitApplyVO> htmlList(Long recruitId,Boolean isNotUpload) {
|
||||
return baseMapper.htmlList(recruitId,isNotUpload);
|
||||
public List<BgtProjectRecruitApplyHtmlVO> htmlList(Long recruitId, Boolean isNotUpload) {
|
||||
List<BgtProjectRecruitApplyHtmlVO> bgtProjectRecruitApplyVOS = baseMapper.htmlList(recruitId, isNotUpload);
|
||||
List<AnnexUploadCountVO> annexUploadCountVOS = annexService.countByRecruitId(recruitId);
|
||||
Map<String, Integer> map = annexUploadCountVOS.stream().collect(Collectors.toMap(vo->vo.getUserId()+"-"+vo.getRecruitApplyId(), AnnexUploadCountVO::getNum));
|
||||
if(!isNotUpload){
|
||||
for (BgtProjectRecruitApplyHtmlVO vo : bgtProjectRecruitApplyVOS){
|
||||
Integer i = map.get(vo.getUserId()+"-"+vo.getId());
|
||||
if (i != null && i == 1) {
|
||||
vo.setUploadType("1");
|
||||
}
|
||||
if (i != null && i == 2) {
|
||||
vo.setUploadType("2");
|
||||
}
|
||||
}
|
||||
}
|
||||
return bgtProjectRecruitApplyVOS;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -613,7 +630,6 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean score(BgtScoreDTO dto) {
|
||||
dto.setScoreBy(SecurityUtils.getAppUserId());
|
||||
Boolean insert = scoreRecordService.insert(BeanUtil.copyProperties(dto, WgzScoreRecord.class));
|
||||
|
||||
List<WgzScoreRecord> wgzScoreRecords = scoreRecordService.getBaseMapper().selectList(Wrappers.<WgzScoreRecord>lambdaQuery()
|
||||
|
@ -229,12 +229,13 @@ public class BgtProjectRecruitServiceImpl extends ServicePlusImpl<BgtProjectRecr
|
||||
wrapper.eq(BgtProjectRecruitApply::getRecruitId, id);
|
||||
wrapper.orderByDesc(BgtProjectRecruitApply::getCreateTime);
|
||||
List<BgtProjectRecruitApply> list = bgtProjectRecruitApplyService.list(wrapper);
|
||||
List<BgtProjectRecruitApplyVO> bgtProjectRecruitApplyVOS = BeanUtil.copyToList(list, BgtProjectRecruitApplyVO.class);
|
||||
|
||||
int count = (int)bgtProjectRecruitApplyVOS.stream().filter(apply -> apply.getStatus().equals(RecruitApplyStatus.SIGN_UP.getCode())).count();
|
||||
vo.setTotalNum(bgtProjectRecruitApplyVOS.size());
|
||||
int count = (int)list.stream().filter(apply -> apply.getStatus().equals(RecruitApplyStatus.SIGN_UP.getCode())).count();
|
||||
int otherNum = (int)list.stream().filter(apply -> RecruitApplyStatus.other().contains(apply.getStatus())).count();
|
||||
vo.setTotalNum(list.size());
|
||||
vo.setNotSelectNum(count);
|
||||
vo.setPassNum(vo.getTotalNum()-count);
|
||||
vo.setOtherNum(otherNum);
|
||||
vo.setPassNum(vo.getTotalNum()-count-otherNum);
|
||||
return vo;
|
||||
}
|
||||
|
||||
|
@ -134,13 +134,32 @@ public class BgtProjectTaskProgressServiceImpl extends ServicePlusImpl<BgtProjec
|
||||
* @param entity 实体类数据
|
||||
*/
|
||||
private void validEntityBeforeSave(BgtProjectTaskProgress entity){
|
||||
Integer lastProgress = getLastProgress(entity.getTaskId());
|
||||
LambdaQueryWrapper<BgtProjectTaskProgress> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(BgtProjectTaskProgress::getTaskId, entity.getTaskId());
|
||||
wrapper.orderByDesc(BgtProjectTaskProgress::getProgress);
|
||||
List<BgtProjectTaskProgress> list = baseMapper.selectList(wrapper);
|
||||
int lastProgress =0;
|
||||
if(CollectionUtil.isNotEmpty(list)){
|
||||
boolean b = list.stream().anyMatch(vo -> AuditStatus.AUDIT.getCode().equals(vo.getAuditStatus()));
|
||||
if(b){
|
||||
throw new BaseException("存在未审核的进度,请等待审核完成之后再提交");
|
||||
}
|
||||
// 找到第一个审核状态为通过的数据
|
||||
BgtProjectTaskProgress firstApproved = list.stream()
|
||||
.filter(vo -> AuditStatus.PASS.getCode().equals(vo.getAuditStatus()))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
if (firstApproved != null) {
|
||||
lastProgress = firstApproved.getProgress();
|
||||
if (firstApproved.getProgress() == 100) {
|
||||
throw new BaseException("当前任务进度已满");
|
||||
}
|
||||
}
|
||||
}
|
||||
if(lastProgress>=entity.getProgress()){
|
||||
throw new BaseException("当前进度不能小于等于上一个进度");
|
||||
}
|
||||
if(lastProgress==100){
|
||||
throw new BaseException("进度已满");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -16,6 +16,7 @@ import com.ruoyi.bgt.domain.vo.BgtWageApplicationVO;
|
||||
import com.ruoyi.bgt.mapper.BgtWageApplicationMapper;
|
||||
import com.ruoyi.bgt.service.IBgtMessageService;
|
||||
import com.ruoyi.bgt.service.IBgtWageApplicationService;
|
||||
import com.ruoyi.common.core.domain.entity.FbsUser;
|
||||
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.AuditStatus;
|
||||
@ -27,6 +28,7 @@ import com.ruoyi.fbs.domain.FbsProjectTask;
|
||||
import com.ruoyi.fbs.domain.dto.FbsWageAuditListDTO;
|
||||
import com.ruoyi.fbs.service.IFbsMessageService;
|
||||
import com.ruoyi.fbs.service.IFbsProjectTaskService;
|
||||
import com.ruoyi.fbs.service.IFbsUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@ -59,6 +61,9 @@ public class BgtWageApplicationServiceImpl extends ServicePlusImpl<BgtWageApplic
|
||||
@Autowired
|
||||
private IFbsMessageService fbsMessageService;
|
||||
|
||||
@Autowired
|
||||
private IFbsUserService fbsUserService;
|
||||
|
||||
|
||||
@Override
|
||||
public BgtWageApplication queryById(Long id){
|
||||
@ -100,6 +105,12 @@ public class BgtWageApplicationServiceImpl extends ServicePlusImpl<BgtWageApplic
|
||||
List<BgtWageApplication> list = list(Wrappers.<BgtWageApplication>lambdaQuery().eq(BgtWageApplication::getTaskId, bo.getTaskId())
|
||||
.eq(BgtWageApplication::getUserId, SecurityUtils.getAppUserId())
|
||||
.in(BgtWageApplication::getAuditStatus, AuditStatus.getUse()));
|
||||
|
||||
boolean b = list.stream()
|
||||
.anyMatch(app -> AuditStatus.AUDIT.getCode().equals(app.getAuditStatus()));
|
||||
if(b){
|
||||
throw new BaseException("您还有未审核的申请,待审核完之后在进行申请");
|
||||
}
|
||||
//收款金额
|
||||
int taskUseAmount = list.stream()
|
||||
.map(BgtWageApplication::getApplicantAmount)
|
||||
@ -116,6 +127,11 @@ public class BgtWageApplicationServiceImpl extends ServicePlusImpl<BgtWageApplic
|
||||
}
|
||||
|
||||
BgtWageApplication add = BeanUtil.toBean(bo, BgtWageApplication.class);
|
||||
FbsUser fbsUser = fbsUserService.selectUserByUserId(add.getReviewerId());
|
||||
if (fbsUser == null) {
|
||||
throw new BaseException("获取不到分包商信息");
|
||||
}
|
||||
add.setReviewerName(fbsUser.getUsername());
|
||||
boolean save = save(add);
|
||||
//系统发消息到包工头
|
||||
// HashMap<String, String> mp = new HashMap<>();
|
||||
|
@ -49,7 +49,9 @@ public class BgtMessageConstant {
|
||||
//取消选择
|
||||
public static final String BGT_LEAVE_REPORT_MAKE_UP_HEADLINE = "您【%s】项目的日报补卡已审批!";
|
||||
public static final String BGT_LEAVE_REPORT_MAKE_UP_SUBHEADING_ONE = "您【%s】项目的日报补卡,审核人【%s】已%s";
|
||||
|
||||
//主动结算工资
|
||||
public static final String BGT_ACTIVE_PAY_HEADLINE = "您【%s】项目的工资已结算!";
|
||||
public static final String BGT_ACTIVE_PAY_SUBHEADING = "您【%s】项目的工资已由包工头【%s】主动结算!";
|
||||
|
||||
//包工头->务工者 消息类型
|
||||
public static final String BGT_TYPE_SIGN_UP = "1"; //务工者报名
|
||||
@ -58,7 +60,8 @@ public class BgtMessageConstant {
|
||||
public static final String BGT_TYPE_MAKE_UP = "4"; //补卡
|
||||
public static final String BGT_TYPE_EXIT = "5"; //退场
|
||||
public static final String BGT_TYPE_CANSEL = "11"; //取消选择
|
||||
public static final String BGT_TYPE_REPORT_MAKE_UP = "12"; //日报补卡
|
||||
public static final String BGT_TYPE_REPORT_MAKE_UP = "12";
|
||||
public static final String BGT_TYPE_ACTIVE_PAY = "14"; //主动结算工资
|
||||
|
||||
|
||||
/**
|
||||
@ -177,6 +180,10 @@ public class BgtMessageConstant {
|
||||
map.put(HEADLINE, String.format(BGT_TO_FBG_PROGRESS_HEADLINE,auditor, projectName));
|
||||
map.put(SUBHEADING, String.format(BGT_TO_FBG_PROGRESS_SUBHEADING, auditor,projectName));
|
||||
break;
|
||||
case "14":
|
||||
map.put(HEADLINE, String.format(BGT_ACTIVE_PAY_HEADLINE, projectName));
|
||||
map.put(SUBHEADING, String.format(BGT_ACTIVE_PAY_SUBHEADING, projectName,auditor));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -0,0 +1,22 @@
|
||||
package com.ruoyi.common.domain.vo;
|
||||
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("附件对象")
|
||||
public class AnnexUploadCountVO {
|
||||
|
||||
@ApiModelProperty("用户ID")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("申请ID")
|
||||
private Long recruitApplyId;
|
||||
|
||||
@ApiModelProperty("上传文件种类数量")
|
||||
private Integer num;
|
||||
}
|
@ -1,9 +1,13 @@
|
||||
package com.ruoyi.common.mapper;
|
||||
|
||||
import com.ruoyi.common.domain.Annex;
|
||||
import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
|
||||
import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache;
|
||||
import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
|
||||
import com.ruoyi.common.domain.Annex;
|
||||
import com.ruoyi.common.domain.vo.AnnexUploadCountVO;
|
||||
import org.apache.ibatis.annotations.CacheNamespace;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 附件Mapper接口
|
||||
@ -15,4 +19,7 @@ import org.apache.ibatis.annotations.CacheNamespace;
|
||||
@CacheNamespace(implementation = MybatisPlusRedisCache.class, eviction = MybatisPlusRedisCache.class)
|
||||
public interface AnnexMapper extends BaseMapperPlus<Annex> {
|
||||
|
||||
|
||||
List<AnnexUploadCountVO> countByRecruitId(@Param("recruitId")Long recruitId);
|
||||
|
||||
}
|
||||
|
@ -1,10 +1,11 @@
|
||||
package com.ruoyi.common.service;
|
||||
|
||||
import com.ruoyi.common.domain.Annex;
|
||||
import com.ruoyi.common.bo.AnnexQueryBo;
|
||||
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.domain.Annex;
|
||||
import com.ruoyi.common.domain.dto.AnnexDTO;
|
||||
import com.ruoyi.common.domain.vo.AnnexUploadCountVO;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
@ -90,4 +91,9 @@ public interface IAnnexService extends IServicePlus<Annex> {
|
||||
* 检查入场材料
|
||||
*/
|
||||
boolean checkEntry(Long userId,Long recruitId);
|
||||
|
||||
/**
|
||||
* 统计招工中的资料上传情况
|
||||
*/
|
||||
List<AnnexUploadCountVO> countByRecruitId(Long recruitId);
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.domain.Annex;
|
||||
import com.ruoyi.common.domain.dto.AnnexDTO;
|
||||
import com.ruoyi.common.domain.vo.AnnexUploadCountVO;
|
||||
import com.ruoyi.common.mapper.AnnexMapper;
|
||||
import com.ruoyi.common.service.IAnnexService;
|
||||
import com.ruoyi.common.tool.FileDeletionService;
|
||||
@ -183,4 +184,9 @@ public class AnnexServiceImpl extends ServicePlusImpl<AnnexMapper, Annex> implem
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AnnexUploadCountVO> countByRecruitId(Long recruitId) {
|
||||
return baseMapper.countByRecruitId(recruitId);
|
||||
}
|
||||
}
|
||||
|
@ -139,6 +139,9 @@ public class FbsWageApplication implements Serializable {
|
||||
@ApiModelProperty("审核人名字")
|
||||
private String reviewerName;
|
||||
|
||||
@ApiModelProperty("审核意见")
|
||||
private String auditOpinion;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
@Excel(name = "删除标志" , readConverterExp = "0=代表存在,2=代表删除")
|
||||
@ApiModelProperty("删除标志(0代表存在 2代表删除)")
|
||||
|
@ -17,6 +17,9 @@ public class FbsProjectListDTO {
|
||||
@ApiModelProperty("类型:0申请中,1已加入,2已竣工")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("项目名字")
|
||||
private String projectName;
|
||||
|
||||
@ApiModelProperty(value = "分包商Id",hidden = true)
|
||||
private Long fbsUserId;
|
||||
|
||||
|
@ -14,7 +14,7 @@ import javax.validation.constraints.NotNull;
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel("App包工头工资申请分页查询对象")
|
||||
@ApiModel("App分包商工资申请审核")
|
||||
public class FbsWageAuditDTO {
|
||||
|
||||
@ApiModelProperty("主键ID")
|
||||
@ -24,5 +24,8 @@ public class FbsWageAuditDTO {
|
||||
@ApiModelProperty("审核状态(1审核中 2已审核 3未通过)")
|
||||
private String auditStatus;
|
||||
|
||||
@ApiModelProperty("审核意见")
|
||||
private String auditOpinion;
|
||||
|
||||
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ public class FbsWageAuditListDTO {
|
||||
// @ApiModelProperty("审核状态(1审核中 2已审核 3未通过)")
|
||||
// private String auditStatus;
|
||||
|
||||
@ApiModelProperty("筛选(1申请中 2已结算)")
|
||||
@ApiModelProperty("筛选(1申请中 2已结算 3未通过)")
|
||||
private Integer type;
|
||||
|
||||
|
||||
|
@ -155,6 +155,8 @@ public class BusinessTask
|
||||
bgtScoreDTO.setUserId(bgtProjectRecruitApply.getUserId());
|
||||
bgtScoreDTO.setScoreBy(map.get(bgtProjectRecruitApply.getRecruitId()));
|
||||
bgtScoreDTO.setContent("默认评分");
|
||||
bgtScoreDTO.setCreateBy("系统");
|
||||
bgtScoreDTO.setUpdateBy("系统");
|
||||
iBgtProjectRecruitApplyService.score(bgtScoreDTO);
|
||||
}
|
||||
|
||||
|
@ -94,4 +94,6 @@ public class WgzAppApplyForPayrollSettlementListRes implements Serializable {
|
||||
@ApiModelProperty("附件实体数据")
|
||||
private List<WgzPayCalculationFiles> payCalculation;
|
||||
|
||||
@ApiModelProperty("申请人类型")
|
||||
private String operatorType;
|
||||
}
|
||||
|
@ -144,6 +144,11 @@ public interface IWgzPayCalculationService extends IServicePlus<WgzPayCalculatio
|
||||
*/
|
||||
BigDecimal getAlreadyPay(Long userId, Long recruitApplyId);
|
||||
|
||||
/**
|
||||
* 根据招工申请获取这一次申请中的工资
|
||||
*/
|
||||
BigDecimal getApplyPay(Long userId, Long recruitApplyId);
|
||||
|
||||
/**
|
||||
* 获取任务下已审核通过的数据
|
||||
*/
|
||||
|
@ -514,7 +514,10 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
||||
//获取个人已结算工资
|
||||
BigDecimal alreadyPay = getAlreadyPay(userId, recruitApplyId);
|
||||
vo.setPayAmount(alreadyPay);
|
||||
vo.setResidueAmount(vo.getAllAmount().subtract(vo.getPayAmount()));
|
||||
|
||||
//获取个人申请中的工资
|
||||
BigDecimal applyPay = getApplyPay(userId, recruitApplyId);
|
||||
vo.setResidueAmount(applyPay);
|
||||
|
||||
//未结算天数
|
||||
Integer days = attendanceService.unFinishCount(userId, recruitId, recruitApplyId);
|
||||
@ -540,7 +543,7 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean bgtAdd(BgtApplyForWgzPayAddDTO dto) {
|
||||
|
||||
//添加申请
|
||||
@ -570,16 +573,16 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
||||
iWgzPayCalculationMiddleService.saveBatch(middleList);
|
||||
|
||||
//修改其余未审批申请的状态
|
||||
List<WgzPayCalculation> payList = list(Wrappers.<WgzPayCalculation>lambdaQuery().eq(WgzPayCalculation::getAuditorType, AuditStatus.UNREAD.getCode())
|
||||
.eq(WgzPayCalculation::getRecruitId, dto.getRecruitId())
|
||||
.eq(WgzPayCalculation::getApplyKey, dto.getRecruitApplyId())
|
||||
.eq(WgzPayCalculation::getUserId, dto.getUserId()));
|
||||
if(CollectionUtil.isNotEmpty(payList)) {
|
||||
payList.forEach(pay -> {
|
||||
pay.setAuditorType(AuditStatus.REFUSE.getCode());
|
||||
});
|
||||
}
|
||||
updateBatchById(payList);
|
||||
// List<WgzPayCalculation> payList = list(Wrappers.<WgzPayCalculation>lambdaQuery().eq(WgzPayCalculation::getAuditorType, AuditStatus.UNREAD.getCode())
|
||||
// .eq(WgzPayCalculation::getRecruitId, dto.getRecruitId())
|
||||
// .eq(WgzPayCalculation::getApplyKey, dto.getRecruitApplyId())
|
||||
// .eq(WgzPayCalculation::getUserId, dto.getUserId()));
|
||||
// if(CollectionUtil.isNotEmpty(payList)) {
|
||||
// payList.forEach(pay -> {
|
||||
// pay.setAuditorType(AuditStatus.REFUSE.getCode());
|
||||
// });
|
||||
// }
|
||||
// updateBatchById(payList);
|
||||
|
||||
//存附件
|
||||
List<WgzPayCalculationFiles> files = dto.getPayCalculation();
|
||||
@ -589,6 +592,22 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
||||
});
|
||||
iWgzPayCalculationFilesService.saveBatch(files);
|
||||
}
|
||||
//发消息
|
||||
HashMap<String, String> mp = new HashMap<>();
|
||||
mp.put("projectName",iBgtProjectRecruitService.getById(payCalculation.getRecruitId()).getRecruitName());
|
||||
mp.put("auditor",SecurityUtils.getUsername());
|
||||
Map<String, String> map = bgtMessage(mp, BGT_TYPE_ACTIVE_PAY, true);
|
||||
WgzMessage wgzMessage = new WgzMessage()
|
||||
.setSenderType(USERTYPE_BGT)
|
||||
.setSenderId(SecurityUtils.getAppUserId())
|
||||
.setRecipientType(USERTYPE_WGZ)
|
||||
.setRecipientId(payCalculation.getUserId())
|
||||
.setHeadline(map.get(HEADLINE))
|
||||
.setSubheading(map.get(SUBHEADING))
|
||||
.setTableId(payCalculation.getId())
|
||||
.setTableName(SqlHelper.table(WgzPayCalculation.class).getTableName())
|
||||
.setMessageLargeType(LARGE_SALARY);
|
||||
wgzMessageService.sendAMessage(wgzMessage);
|
||||
return save;
|
||||
}
|
||||
|
||||
@ -647,7 +666,24 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
||||
LambdaQueryWrapper<WgzPayCalculation> eq = new LambdaQueryWrapper<WgzPayCalculation>().
|
||||
eq(WgzPayCalculation::getUserId, userId).
|
||||
eq(WgzPayCalculation::getApplyKey, recruitApplyId).
|
||||
eq(WgzPayCalculation::getAuditorType, "2");
|
||||
eq(WgzPayCalculation::getAuditorType, AuditStatus.PASS.getCode());
|
||||
List<WgzPayCalculation> gzs = baseMapper.selectList(eq);
|
||||
|
||||
BigDecimal addSum = new BigDecimal(0);
|
||||
for (WgzPayCalculation gz : gzs) {
|
||||
//金额*天数=实际工资
|
||||
BigDecimal multiply = gz.getRecruitAmount().multiply(BigDecimal.valueOf(gz.getNum()));
|
||||
addSum = addSum.add(multiply);
|
||||
}
|
||||
return addSum;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal getApplyPay(Long userId, Long recruitApplyId) {
|
||||
LambdaQueryWrapper<WgzPayCalculation> eq = new LambdaQueryWrapper<WgzPayCalculation>().
|
||||
eq(WgzPayCalculation::getUserId, userId).
|
||||
eq(WgzPayCalculation::getApplyKey, recruitApplyId).
|
||||
in(WgzPayCalculation::getAuditorType, AuditStatus.getToAudit());
|
||||
List<WgzPayCalculation> gzs = baseMapper.selectList(eq);
|
||||
|
||||
BigDecimal addSum = new BigDecimal(0);
|
||||
|
@ -0,0 +1,46 @@
|
||||
package com.ruoyi.zbf.domain.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 消息对象 bgt_message
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("总包方消息详情查询对象")
|
||||
public class ZbfMessageDetailDTO {
|
||||
|
||||
/** 分页大小 */
|
||||
@ApiModelProperty("分页大小")
|
||||
private Integer pageSize;
|
||||
/** 当前页数 */
|
||||
@ApiModelProperty("当前页数")
|
||||
private Integer pageNum;
|
||||
|
||||
@ApiModelProperty("日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate date;
|
||||
|
||||
@ApiModelProperty("大类型(字典fbs_message_large_type)")
|
||||
private String messageLargeType;
|
||||
|
||||
@ApiModelProperty("小类型(字典fbs_message_small_type)")
|
||||
private String messageSmallType;
|
||||
|
||||
@ApiModelProperty("是否待处理")
|
||||
private Boolean isHandle = false;
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.ruoyi.zbf.domain.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 消息对象 bgt_message
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("消息列表查询对象")
|
||||
public class ZbfMessageMyListDTO {
|
||||
|
||||
/** 分页大小 */
|
||||
@ApiModelProperty("分页大小")
|
||||
private Integer pageSize;
|
||||
/** 当前页数 */
|
||||
@ApiModelProperty("当前页数")
|
||||
private Integer pageNum;
|
||||
|
||||
}
|
@ -14,7 +14,7 @@ import javax.validation.constraints.NotNull;
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel("App包工头工资申请分页查询对象")
|
||||
@ApiModel("App总包方工资申请审核")
|
||||
public class ZbfWageAuditDTO {
|
||||
|
||||
@ApiModelProperty("主键ID")
|
||||
@ -24,5 +24,6 @@ public class ZbfWageAuditDTO {
|
||||
@ApiModelProperty("审核状态(1审核中 2已审核 3未通过)")
|
||||
private String auditStatus;
|
||||
|
||||
|
||||
@ApiModelProperty("审核意见")
|
||||
private String auditOpinion;
|
||||
}
|
||||
|
@ -0,0 +1,36 @@
|
||||
package com.ruoyi.zbf.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 消息对象 bgt_message
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("分包商未读消息统计视图对象")
|
||||
public class ZbfMessageCountVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@ApiModelProperty("项目消息")
|
||||
private Integer taskMessageCount;
|
||||
|
||||
@ApiModelProperty("结算消息")
|
||||
private Integer settlementMessageCount;
|
||||
|
||||
@ApiModelProperty("其他消息")
|
||||
private Integer otherMessageCount;
|
||||
|
||||
@ApiModelProperty("待处理消息")
|
||||
private Integer handleMessageCount;
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package com.ruoyi.zbf.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 消息对象 bgt_message
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("总包方消息列表详情视图对象")
|
||||
public class ZbfMessageDetailVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@ApiModelProperty("主键自增ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("发送人")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long senderId;
|
||||
|
||||
@ApiModelProperty("表ID")
|
||||
private Long tableId;
|
||||
|
||||
@ApiModelProperty("标题")
|
||||
private String headline;
|
||||
|
||||
@ApiModelProperty("副标题")
|
||||
private String subheading;
|
||||
|
||||
@ApiModelProperty("大类型(字典fbs_message_large_type)")
|
||||
private String messageLargeType;
|
||||
|
||||
@ApiModelProperty("小类型(字典fbs_message_small_type)")
|
||||
private String messageSmallType;
|
||||
|
||||
@ApiModelProperty("读状态(0未读 1已读)")
|
||||
private String readStatus;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty("是否需要操作(0不需要 1需要 2已操作)")
|
||||
private String isOperation ;
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package com.ruoyi.zbf.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 消息对象 bgt_message
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("总包方消息列表视图对象")
|
||||
public class ZbfMessageVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@ApiModelProperty("主键自增ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("表ID")
|
||||
private Long tableId;
|
||||
|
||||
@ApiModelProperty("发送人")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long senderId;
|
||||
|
||||
@ApiModelProperty("标题")
|
||||
private String headline;
|
||||
|
||||
@ApiModelProperty("副标题")
|
||||
private String subheading;
|
||||
|
||||
@ApiModelProperty("大类型(字典fbs_message_large_type)")
|
||||
private String messageLargeType;
|
||||
|
||||
@ApiModelProperty("小类型(字典fbs_message_small_type)")
|
||||
private String messageSmallType;
|
||||
|
||||
@ApiModelProperty("读状态(0未读 1已读)")
|
||||
private String readStatus;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -4,6 +4,11 @@ import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.zbf.bo.ZbfMessageQueryBo;
|
||||
import com.ruoyi.zbf.domain.ZbfMessage;
|
||||
import com.ruoyi.zbf.domain.dto.ZbfMessageDetailDTO;
|
||||
import com.ruoyi.zbf.domain.dto.ZbfMessageMyListDTO;
|
||||
import com.ruoyi.zbf.domain.vo.ZbfMessageCountVO;
|
||||
import com.ruoyi.zbf.domain.vo.ZbfMessageDetailVO;
|
||||
import com.ruoyi.zbf.domain.vo.ZbfMessageVO;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
@ -68,5 +73,18 @@ public interface IZbfMessageService extends IServicePlus<ZbfMessage> {
|
||||
*/
|
||||
void operationBatch(String recipientType,Long recipientId,List<Long> tableIds,String tableName);
|
||||
|
||||
/**
|
||||
* 总包方的未读消息统计
|
||||
*/
|
||||
ZbfMessageCountVO countUnread();
|
||||
|
||||
/**
|
||||
* 总包方消息列表
|
||||
*/
|
||||
TableDataInfo<ZbfMessageVO> queryMyPageList(ZbfMessageMyListDTO dto);
|
||||
|
||||
/**
|
||||
* 消息详情列表
|
||||
*/
|
||||
TableDataInfo<ZbfMessageDetailVO> queryDetailPageList(ZbfMessageDetailDTO dto);
|
||||
}
|
||||
|
@ -8,18 +8,28 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BgtMessageType;
|
||||
import com.ruoyi.common.utils.PageUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.zbf.bo.ZbfMessageQueryBo;
|
||||
import com.ruoyi.zbf.domain.ZbfMessage;
|
||||
import com.ruoyi.zbf.domain.dto.ZbfMessageDetailDTO;
|
||||
import com.ruoyi.zbf.domain.dto.ZbfMessageMyListDTO;
|
||||
import com.ruoyi.zbf.domain.vo.ZbfMessageCountVO;
|
||||
import com.ruoyi.zbf.domain.vo.ZbfMessageDetailVO;
|
||||
import com.ruoyi.zbf.domain.vo.ZbfMessageVO;
|
||||
import com.ruoyi.zbf.mapper.ZbfMessageMapper;
|
||||
import com.ruoyi.zbf.service.IZbfMessageService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalTime;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.OPERATION_ALREADY;
|
||||
import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.OPERATION_NEED;
|
||||
|
||||
/**
|
||||
* 消息Service业务层处理
|
||||
@ -124,4 +134,52 @@ public class ZbfMessageServiceImpl extends ServicePlusImpl<ZbfMessageMapper, Zbf
|
||||
update(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ZbfMessageCountVO countUnread() {
|
||||
List<ZbfMessage> zbfMessages = baseMapper.selectList(Wrappers.<ZbfMessage>lambdaQuery()
|
||||
.eq(ZbfMessage::getRecipientId, SecurityUtils.getAppUserId())
|
||||
.eq(ZbfMessage::getReadStatus, "0"));
|
||||
Map<String, Long> map = zbfMessages.stream().collect(Collectors.groupingBy(ZbfMessage::getMessageLargeType, Collectors.counting()));
|
||||
|
||||
ZbfMessageCountVO zbfMessageCountVO = new ZbfMessageCountVO();
|
||||
zbfMessageCountVO.setTaskMessageCount(map.getOrDefault(BgtMessageType.TASK.getCode(), 0L).intValue());
|
||||
zbfMessageCountVO.setSettlementMessageCount(map.getOrDefault(BgtMessageType.SETTLEMENT.getCode(), 0L).intValue());
|
||||
zbfMessageCountVO.setOtherMessageCount(map.getOrDefault(BgtMessageType.OTHER.getCode(), 0L).intValue());
|
||||
|
||||
Integer handle = baseMapper.selectCount(Wrappers.<ZbfMessage>lambdaQuery()
|
||||
.eq(ZbfMessage::getRecipientId, SecurityUtils.getAppUserId())
|
||||
.eq(ZbfMessage::getIsOperation, OPERATION_NEED));
|
||||
zbfMessageCountVO.setHandleMessageCount(handle);
|
||||
return zbfMessageCountVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<ZbfMessageVO> queryMyPageList(ZbfMessageMyListDTO dto) {
|
||||
LambdaQueryWrapper<ZbfMessage> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(ZbfMessage::getRecipientId, SecurityUtils.getAppUserId());
|
||||
wrapper.orderByDesc(ZbfMessage::getCreateTime);
|
||||
Page<ZbfMessage> result = page(PageUtils.buildPage(), wrapper);
|
||||
Page<ZbfMessageVO> page = new Page<>();
|
||||
page.setTotal(result.getTotal());
|
||||
page.setRecords(BeanUtil.copyToList(result.getRecords(), ZbfMessageVO.class));
|
||||
return PageUtils.buildDataInfo(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<ZbfMessageDetailVO> queryDetailPageList(ZbfMessageDetailDTO dto) {
|
||||
LambdaQueryWrapper<ZbfMessage> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(ZbfMessage::getRecipientId, SecurityUtils.getAppUserId());
|
||||
wrapper.eq(StrUtil.isNotBlank(dto.getMessageLargeType()), ZbfMessage::getMessageLargeType, dto.getMessageLargeType());
|
||||
wrapper.eq(StrUtil.isNotBlank(dto.getMessageSmallType()), ZbfMessage::getMessageSmallType, dto.getMessageSmallType());
|
||||
wrapper.eq(dto.getIsHandle(), ZbfMessage::getIsOperation,OPERATION_NEED);
|
||||
if(dto.getDate() != null) {
|
||||
wrapper.between(ZbfMessage::getCreateTime, dto.getDate().atStartOfDay(), dto.getDate().atStartOfDay().with(LocalTime.MAX));
|
||||
}
|
||||
wrapper.orderByDesc(ZbfMessage::getId);
|
||||
Page<ZbfMessage> result = page(PageUtils.buildPage(), wrapper);
|
||||
Page<ZbfMessageDetailVO> page = new Page<>();
|
||||
page.setTotal(result.getTotal());
|
||||
page.setRecords(BeanUtil.copyToList(result.getRecords(), ZbfMessageDetailVO.class));
|
||||
return PageUtils.buildDataInfo(page);
|
||||
}
|
||||
}
|
||||
|
@ -65,11 +65,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
|
||||
<select id="htmlList" resultType="com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyVO">
|
||||
<select id="htmlList" resultType="com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyHtmlVO">
|
||||
select
|
||||
distinct
|
||||
wu.user_id,
|
||||
wu.username
|
||||
wu.username,
|
||||
bpra.id
|
||||
from bgt_project_recruit_apply bpra
|
||||
left join wgz_user wu on bpra.user_id = wu.user_id
|
||||
where bpra.recruit_id = #{recruitId} and bpra.status in('3','5')
|
||||
@ -222,7 +222,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
AND bpra.status = '0'
|
||||
</if>
|
||||
<if test="dto.status != null and dto.status == 1">
|
||||
AND bpra.status != '0'
|
||||
AND bpra.status in('1','3','5','6')
|
||||
</if>
|
||||
<if test="dto.status != null and dto.status == 2">
|
||||
AND bpra.status in('2','4','7')
|
||||
</if>
|
||||
</where>
|
||||
order by wu.score desc,bpra.create_time desc
|
||||
@ -268,7 +271,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
AND bpra.status in ('1','3','5','6')
|
||||
</if>
|
||||
</where>
|
||||
order by bpra.create_time desc
|
||||
order by bpra.id desc
|
||||
</select>
|
||||
|
||||
<select id="fbsTaskUserList" resultType="com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyVO">
|
||||
|
@ -50,6 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
and bwa.audit_status = #{dto.auditStatus}
|
||||
</if>
|
||||
</where>
|
||||
order by bwa.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="appQueryList" resultType="com.ruoyi.bgt.domain.vo.BgtWageApplicationListVO">
|
||||
@ -85,7 +86,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
bwa.audit_status,
|
||||
bwa.employment_situation,
|
||||
bwa.completion_situation,
|
||||
bwa.task_situation
|
||||
bwa.task_situation,
|
||||
bwa.audit_opinion
|
||||
from bgt_wage_application bwa
|
||||
<where>
|
||||
<if test="dto.reviewerId != null ">
|
||||
@ -97,13 +99,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="dto.taskName != null and dto.taskName != ''">
|
||||
and bpr.task_name like concat('%', #{dto.taskName}, '%')
|
||||
</if>
|
||||
<if test="dto.type != null and dto.type == 1 ">
|
||||
and bwa.audit_status = '1'
|
||||
</if>
|
||||
<if test="dto.type != null and dto.type == 2 ">
|
||||
and bwa.audit_status in ('2','3')
|
||||
<if test="dto.type != null">
|
||||
and bwa.audit_status = #{dto.type}
|
||||
</if>
|
||||
</where>
|
||||
order by bwa.id desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
@ -18,5 +18,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="countByRecruitId" resultType="com.ruoyi.common.domain.vo.AnnexUploadCountVO">
|
||||
SELECT
|
||||
user_id,
|
||||
recruit_apply_id,
|
||||
COUNT(DISTINCT annex_type) AS num
|
||||
FROM common_annex ca
|
||||
WHERE ca.recruit_id = #{recruitId}
|
||||
AND ca.annex_type IN (1, 2)
|
||||
AND ca.user_type = 'wgz'
|
||||
GROUP BY user_id,recruit_apply_id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
@ -30,6 +30,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
project_img,
|
||||
project_status
|
||||
FROM zbf_project zp
|
||||
<where>
|
||||
<if test="dto.projectName != null and dto.projectName != ''">
|
||||
AND zp.project_name like concat('%', #{dto.projectName}, '%')
|
||||
</if>
|
||||
</where>
|
||||
order by zp.id desc
|
||||
</select>
|
||||
|
||||
|
@ -29,6 +29,29 @@
|
||||
gap: 12px;
|
||||
margin-top: 15px;
|
||||
}
|
||||
.checkbox-item {
|
||||
display: flex;
|
||||
width: 100%; /* 确保宽度占满父容器 */
|
||||
}
|
||||
.el-checkbox__label {
|
||||
display: flex;
|
||||
align-items: center; /* 垂直居中 */
|
||||
justify-content: space-between;
|
||||
width: 100%; /* 确保宽度占满父容器 */
|
||||
}
|
||||
/* 添加状态颜色样式 */
|
||||
.status-text.not-uploaded {
|
||||
color: rgb(255, 0, 0);
|
||||
}
|
||||
.status-text.partially-uploaded {
|
||||
color: rgb(255, 225, 7);
|
||||
}
|
||||
.status-text.uploaded {
|
||||
color: rgb(8, 224, 8);
|
||||
}
|
||||
.status-text {
|
||||
color: #999;
|
||||
}
|
||||
.action-bar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@ -56,6 +79,12 @@
|
||||
width: 100%;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.el-table--border {
|
||||
margin: 10px 0;
|
||||
}
|
||||
.el-table .cell {
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
@ -88,7 +117,7 @@
|
||||
</el-checkbox>
|
||||
<el-checkbox
|
||||
v-model="isFilter"
|
||||
:disabled="isListEmpty"
|
||||
:disabled="isFilterDisabled"
|
||||
@change="handleFilterChange"
|
||||
>
|
||||
筛选未上传的人员列表
|
||||
@ -113,7 +142,21 @@
|
||||
:label="item.userId"
|
||||
class="checkbox-item"
|
||||
>
|
||||
{{ item.username }}
|
||||
<span>{{ item.username }}</span>
|
||||
<!-- 添加状态显示 -->
|
||||
<span
|
||||
:class="['status-text', getUploadStatusClass(item.uploadType)]"
|
||||
>
|
||||
{{ getUploadStatus(item.uploadType) }}
|
||||
<el-button
|
||||
v-if="item.uploadType == '2'||item.uploadType == '1'"
|
||||
type="primary"
|
||||
@click="checkoutDetail(item)"
|
||||
size="small"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
</span>
|
||||
</el-checkbox>
|
||||
</template>
|
||||
<div v-else class="el-upload__tip">{{ listStatusText }}</div>
|
||||
@ -156,6 +199,23 @@
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 查看详情弹窗 -->
|
||||
<el-dialog v-model="dialogVisible" title="附件详情" width="80%">
|
||||
<el-table :data="tableData" style="width: 100%">
|
||||
<el-table-column prop="annexName" label="附件名称"></el-table-column>
|
||||
<el-table-column prop="annexUrl" label="附件路径">
|
||||
<template #default="scope"> {{ scope.row.annexUrl }} </template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="annexType" width="120" label="附件类型">
|
||||
<template #default="scope">
|
||||
<span
|
||||
>{{ scope.row.annexType == '1' ? "劳动合同" : "保单" }}</span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 如果需要更多字段,可继续添加 -->
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</body>
|
||||
<script src="./vue.global.js"></script>
|
||||
@ -174,17 +234,28 @@
|
||||
loading: false,
|
||||
uploadLoading: false,
|
||||
listStatusText: "请先选择主题",
|
||||
userId: "",
|
||||
userId: "1893247598219890699",
|
||||
checkAll: false,
|
||||
isIndeterminate: false,
|
||||
uploadFile: null,
|
||||
isFilter: false,
|
||||
dialogVisible: false,
|
||||
detailLoading: false,
|
||||
dialogData: {},
|
||||
tableData: [],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
isListEmpty() {
|
||||
return this.currentList.length === 0;
|
||||
},
|
||||
isFilterDisabled() {
|
||||
// 仅在未选择主题或原始列表为空时禁用
|
||||
return (
|
||||
!this.selectedTheme ||
|
||||
(this.currentList.length === 0 && !this.isFilter)
|
||||
);
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
const protocol = window.location.protocol;
|
||||
@ -239,11 +310,11 @@
|
||||
|
||||
// 筛选未上传文件的人员列表
|
||||
async handleFilterChange() {
|
||||
if (this.isListEmpty) {
|
||||
// 新增空列表判断
|
||||
this.isFilter = false;
|
||||
return;
|
||||
}
|
||||
// if (this.isListEmpty) {
|
||||
// // 新增空列表判断
|
||||
// this.isFilter = false;
|
||||
// return;
|
||||
// }
|
||||
this.loading = true;
|
||||
try {
|
||||
const response = await this.ajaxRequest({
|
||||
@ -345,6 +416,29 @@
|
||||
}
|
||||
},
|
||||
|
||||
// 详情请求方法
|
||||
async checkoutDetail(item) {
|
||||
console.log("点击详情", item);
|
||||
|
||||
try {
|
||||
this.detailLoading = true;
|
||||
const response = await this.ajaxRequest({
|
||||
url: `/ruoyi/common/annex/getHtmlWgzAnnex?recruitApplyId=${item.id}&wgzUserId=${item.userId}`,
|
||||
method: "GET",
|
||||
});
|
||||
// 转换数据结构
|
||||
this.dialogData = response.data;
|
||||
// 将后端返回的数据转换为适合表格展示的格式
|
||||
this.tableData = Object.values(this.dialogData).flat();
|
||||
this.dialogVisible = true;
|
||||
console.log("获取详情数据", this.tableData);
|
||||
} catch (error) {
|
||||
ElementPlus.ElMessage.error("获取详情失败");
|
||||
} finally {
|
||||
this.detailLoading = false;
|
||||
}
|
||||
},
|
||||
// 统一的 AJAX 请求方法
|
||||
async ajaxRequest(options) {
|
||||
const config = {
|
||||
method: options.method,
|
||||
@ -364,6 +458,32 @@
|
||||
|
||||
return options.isDownload ? response.arrayBuffer() : response.json();
|
||||
},
|
||||
// 根据uploadType返回状态文本
|
||||
getUploadStatus(uploadType) {
|
||||
switch (uploadType) {
|
||||
case "0":
|
||||
return "未上传";
|
||||
case "1":
|
||||
return "部分上传";
|
||||
case "2":
|
||||
return "已上传";
|
||||
default:
|
||||
return "未知状态";
|
||||
}
|
||||
},
|
||||
// 根据uploadType返回状态样式类名
|
||||
getUploadStatusClass(uploadType) {
|
||||
switch (uploadType) {
|
||||
case "0":
|
||||
return "not-uploaded";
|
||||
case "1":
|
||||
return "partially-uploaded";
|
||||
case "2":
|
||||
return "uploaded";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
userIds(newVal) {
|
||||
@ -371,11 +491,11 @@
|
||||
this.checkAll = newVal.length === total && total > 0;
|
||||
this.isIndeterminate = newVal.length > 0 && newVal.length < total;
|
||||
},
|
||||
currentList(newVal) {
|
||||
if (newVal.length === 0) {
|
||||
this.isFilter = false;
|
||||
}
|
||||
},
|
||||
// currentList(newVal) {
|
||||
// if (newVal.length === 0) {
|
||||
// this.isFilter = false;
|
||||
// }
|
||||
// },
|
||||
},
|
||||
});
|
||||
app.use(ElementPlus);
|
||||
|
Reference in New Issue
Block a user