This commit is contained in:
zt
2025-02-28 17:15:33 +08:00
parent b32a787f5f
commit 23bf1f46ee
19 changed files with 175 additions and 90 deletions

View File

@ -81,5 +81,16 @@ public class AppBgtProjectRecruitController extends BaseController {
return AjaxResult.success(iBgtProjectRecruitService.insert(bo));
}
/**
* 修改包工头招工
*/
@ApiOperation("编辑招工信息")
@Log(title = "编辑招工信息", businessType = BusinessType.UPDATE)
@RepeatSubmit
@PutMapping()
public AjaxResult<Boolean> edit(@Validated @RequestBody BgtProjectRecruit bo) {
return AjaxResult.success(iBgtProjectRecruitService.update(bo));
}
}

View File

@ -1,8 +1,40 @@
Application Version: ${ruoyi-vue-plus.version}
Spring Boot Version: ${spring-boot.version}
__________ _____.___.__ ____ ____ __________.__
\______ \__ __ ____\__ | |__| \ \ / /_ __ ____ \______ \ | __ __ ______
| _/ | \/ _ \/ | | | ______ \ Y / | \_/ __ \ ______ | ___/ | | | \/ ___/
| | \ | ( <_> )____ | | /_____/ \ /| | /\ ___/ /_____/ | | | |_| | /\___ \
|____|_ /____/ \____// ______|__| \___/ |____/ \___ > |____| |____/____//____ >
\/ \/ \/ \/
,--"""",--.__,---[],-------._
," __,' \ \--""""""==;-
," _,-" "/---.___ \ ___\ ,-'',"
/,-' / ;. ,.--'-.__\ _,-"" ,| `,' /
/``""""-._/,-|:\ []\,' ```-/:;-. `. /
` ;::: || /:,; `-.\
=.,'__,---||-.____',.=
=(:\_ ||__ ):)=
,"::::`----||::`--':::"._
,':::::::::::||::::::::::::'.
.__ ;:::.-.:::::__||___:::::.-.:::\ __,
"""-;:::( O )::::>_|| _<::::( O )::::-"""
=======;:::::`-`:::::::||':::::::`-`:::::\=======
,--"";:::_____________||______________::::""----. , ,
; ::`._( | ||| | )_,'::::\_,,,,,,,,,,____/,'_,
,; :::`--._|____[]|_____|_.-'::::::::::::::::::::::::);_
;/ / :::::::::,||,:::::::::::::::::::::::::::::::::::/
/; ``''''----------/,'/,__,,,,,____:::::::::::::::::::::,"
;/ :);/|_;| ,--.. . ```-.:::::::::::::_,"
/; :::):__,'//""\\. ,--.. \:::,:::::_,"
;/ :::::/ . . . . . . //""\\. \::":__,"
;/ :::::::,' . . . . . . . . . . .:`::\
'; :::::::__,'. ,--.. . .,--. . . . . .:`::`
'; __,..--'''-. . //""\\. .//""\\ . ,--.. :`:::`
; / \\ .//""\\ . . . . . . . . . //""\\. :`::`
; / . . . . . . . . . . . . . . . . .:`::`
; ( . . . . . . . . . . . . . . . ;:::`
,: ;, . . . . . . . . . . . . . ;':::`
,: ;, . . . . . . . . . . . . .;`:::
,: ;, . . . . . . . . . . . . ;`::;`
,: ; . . . . . . . . . . . . ;':::;`
: ; . . . . . . . . . . . ,':::;
: '. . . . . . . . .. . . .,':::;`
: `. . . . . . . . . . . . ;::::;`
'. `-. . . . . . . . . . . ,-'::::;
`:_ ``--..___________..--'':::::;'`
`._::,.:,.:,:_ctr_:,:,.::,.:_;'`
________________`"\/"\/\/'""""`\/"\/""\/"___________

View File

@ -1,5 +1,6 @@
package com.ruoyi.common.utils;
import cn.hutool.core.util.StrUtil;
import org.apache.commons.lang3.time.DateFormatUtils;
import java.lang.management.ManagementFactory;
@ -163,6 +164,9 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
public static LocalDate str2Localdate(String time,String format){
// 定义日期格式
if(StrUtil.isBlank(time)){
return null;
}
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(format);
LocalDate localDate = null;
try {

View File

@ -120,4 +120,6 @@ public class BgtMessage implements Serializable {
@ApiModelProperty("备注")
private String remark;
@ApiModelProperty("是否需要操作0不需要 1需要 2已操作")
private String isOperation ;
}

View File

@ -40,7 +40,7 @@ public class BgtWageApplication implements Serializable {
private Long projectId;
@ApiModelProperty("项目名")
private Long projectName;
private String projectName;
/** 标段ID */
@Excel(name = "标段ID")

View File

@ -67,6 +67,12 @@ public class UserRealNameAuthenticationDTO {
@NotBlank(message = "银行卡号不能为空")
private String cardNo;
@ApiModelProperty("身份证正面图路径")
private String frontPath;
@ApiModelProperty("身份证反面图路径")
private String reverseSidePath;
@ApiModelProperty("资格证书")
List<AnnexDTO> annexList;
}

View File

@ -67,10 +67,14 @@ public class BgtMessageDetailVO implements Serializable {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime endTime;
//请假 补卡
//请假 补卡 共用
@ApiModelProperty("申请人")
private String username;
@ApiModelProperty("补卡/请假理由")
private String reason;
//任务 结算共用
@ApiModelProperty("任务名称")
private String taskName;
}

View File

@ -23,6 +23,8 @@ 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.fbs.domain.FbsProjectTask;
import com.ruoyi.fbs.service.IFbsProjectTaskService;
import com.ruoyi.wgz.domain.WgzLeave;
import com.ruoyi.wgz.domain.WgzPayCalculation;
import com.ruoyi.wgz.domain.WgzReissueacard;
@ -69,6 +71,9 @@ public class BgtMessageServiceImpl extends ServicePlusImpl<BgtMessageMapper, Bgt
@Autowired
private IWgzReissueacardService reissueacardService;
@Autowired
private IFbsProjectTaskService taskService;
@Override
public BgtMessage queryById(Long id) {
return getById(id);
@ -186,11 +191,12 @@ public class BgtMessageServiceImpl extends ServicePlusImpl<BgtMessageMapper, Bgt
for (BgtMessage message : result.getRecords()) {
BgtMessageDetailVO bgtMessageDetailVO = BeanUtil.copyProperties(message, BgtMessageDetailVO.class);
if (BGT_LARGE_TASK.equals(message.getMessageLargeType())) {
// todo
FbsProjectTask task = taskService.getById(message.getTableId());
bgtMessageDetailVO.setTaskName(task.getTaskName());
} else if (BGT_LARGE_SETTLEMENT.equals(message.getMessageLargeType())) {
// todo
FbsProjectTask task = taskService.getById(message.getTableId());
bgtMessageDetailVO.setTaskName(task.getTaskName());
} else if (BGT_LARGE_OTHER.equals(message.getMessageLargeType())) {
switch (message.getMessageSmallType()) {
case BGT_SMALL_SIGN_UP:
BgtProjectRecruitApply recruitApply = recruitApplyService.getById(message.getTableId());
@ -210,10 +216,10 @@ public class BgtMessageServiceImpl extends ServicePlusImpl<BgtMessageMapper, Bgt
bgtMessageDetailVO.setEndTime(wgzLeave.getEndTime());
break;
case BGT_SMALL_MAKE_UP:
WgzReissueacard reissueacard = reissueacardService.getById(message.getTableId());
bgtMessageDetailVO.setReason(reissueacard.getReason());
bgtMessageDetailVO.setUsername(wgzUserService.getById(reissueacard.getUserId()).getUsername());
bgtMessageDetailVO.setNowTime(reissueacard.getNowTime());
WgzReissueacard reissueCard = reissueacardService.getById(message.getTableId());
bgtMessageDetailVO.setReason(reissueCard.getReason());
bgtMessageDetailVO.setUsername(wgzUserService.getById(reissueCard.getUserId()).getUsername());
bgtMessageDetailVO.setNowTime(reissueCard.getNowTime());
break;
default:
break;

View File

@ -198,7 +198,8 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
.setSubheading(map.get(SUBHEADING))
.setTableId(recruitApply.getId())
.setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName())
.setMessageLargeType(LARGE_APPLY);
.setMessageLargeType(LARGE_APPLY)
.setIsOperation(OPERATION_NEED);
iWgzMessageService.sendAMessage(wgzMessage);
return updateById(recruitApply);
}

View File

@ -19,6 +19,7 @@ import com.ruoyi.bgt.service.IBgtProjectRecruitService;
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.RecruitApplyStatus;
import com.ruoyi.common.exception.BaseException;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.fbs.domain.FbsProjectTask;
@ -34,6 +35,7 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalDate;
import java.util.*;
import java.util.stream.Collectors;
@ -113,7 +115,13 @@ public class BgtProjectRecruitServiceImpl extends ServicePlusImpl<BgtProjectRecr
* @param entity 实体类数据
*/
private void validEntityBeforeSave(BgtProjectRecruit entity){
//TODO 做一些数据校验,如唯一约束
if(entity.getId()!=null){
BgtProjectRecruit recruit = getById(entity.getId());
LocalDate recruitEndTime = recruit.getRecruitEndTime();
if(recruitEndTime.isBefore(LocalDate.now())) {
throw new BaseException("已过报名截止时间,无法修改");
}
}
}
@Override

View File

@ -17,6 +17,7 @@ import com.ruoyi.bgt.service.IBgtProjectTaskProgressService;
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.ProjectTaskStatus;
import com.ruoyi.common.exception.BaseException;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.fbs.domain.FbsProjectTask;
@ -106,7 +107,10 @@ public class BgtProjectTaskProgressServiceImpl extends ServicePlusImpl<BgtProjec
* @param entity 实体类数据
*/
private void validEntityBeforeSave(BgtProjectTaskProgress entity){
//TODO 做一些数据校验,如唯一约束
Integer lastProgress = getLastProgress(entity.getTaskId());
if(lastProgress>entity.getProgress()){
throw new BaseException("当前进度不能小于上一个进度");
}
}
@Override

View File

@ -21,7 +21,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Map;
@ -124,8 +123,6 @@ public class BgtUserServiceImpl extends ServicePlusImpl<BgtUserMapper, BgtUser>
@Transactional(rollbackFor = Exception.class)
public Boolean realNameAuthentication(UserRealNameAuthenticationDTO dto) {
BgtUser bgtUser = BeanUtil.copyProperties(dto, BgtUser.class);
//todo: 资格证书附件类型
annexService.deleteByTypes(Arrays.asList("1"));
annexService.insertBatch(dto.getAnnexList());
return baseMapper.updateById(bgtUser)>0;
}

View File

@ -9,6 +9,13 @@ public class WgzAndBgtMessageConstant {
public static final String USERTYPE_BGT = "2"; //包工头
public static final String USERTYPE_FBS = "3"; //分包商
public static final String OPERATION_NO = "0"; //不需要操作
public static final String OPERATION_NEED = "1"; //需要操作
public static final String OPERATION_ALREADY = "2"; //已操作
public static final String LARGE_APPLY = "0"; //大类型-报名
public static final String LARGE_SALARY = "1"; //大类型-工资
public static final String LARGE_OTHER = "2"; //大类型-其它

View File

@ -79,6 +79,9 @@ public class AppTaskDetailVO {
@ApiModelProperty("任务状态1进行中 2已完成")
private String status;
@ApiModelProperty("创建者ID")
private Long createId;
/** 备注 */
@ApiModelProperty("备注")
private String remark;

View File

@ -25,5 +25,7 @@ public class AppTaskDetailWageVO {
@ApiModelProperty("最新一条收款申请")
private BgtWageApplicationListVO wageApplication;
@ApiModelProperty("任务金额")
private Integer taskAmount;
}

View File

@ -62,6 +62,9 @@ public class AppTaskVO {
@ApiModelProperty("申请数量")
private Integer applyNum;
@ApiModelProperty("判断标志")
private Boolean myTask;
@ApiModelProperty("任务收款金额")
private Integer taskReceiveAmount = 0;
}

View File

@ -144,21 +144,8 @@ public class FbsProjectTaskServiceImpl extends ServicePlusImpl<FbsProjectTaskMap
Page<AppTaskDTO> appTaskDTOPage = new Page<>();
appTaskDTOPage.setCurrent(dto.getPageNum());
appTaskDTOPage.setSize(dto.getPageSize());
List<Long> taskIds = new ArrayList<>();
if(ProjectTaskStatus.APPLY.getCode().equals(dto.getStatus())){
taskIds = taskApplyService.getTaskIdsByUserId(SecurityUtils.getAppUserId());
dto.setTaskIds(taskIds);
}
if(dto.getMyTask() && !ProjectTaskStatus.APPLY.getCode().equals(dto.getStatus())){
dto.setUserId(SecurityUtils.getAppUserId());
}
dto.setUserId(SecurityUtils.getAppUserId());
Page<AppTaskVO> appTaskVOPage = baseMapper.appQueryPageList(appTaskDTOPage, dto);
if(dto.getMyTask() && ProjectTaskStatus.APPLY.getCode().equals(dto.getStatus())
&&CollectionUtil.isEmpty(taskIds)){
appTaskVOPage.setRecords(new ArrayList<>());
appTaskVOPage.setTotal(0);
}
return PageUtils.buildDataInfo(appTaskVOPage);
}
@ -250,8 +237,10 @@ public class FbsProjectTaskServiceImpl extends ServicePlusImpl<FbsProjectTaskMap
@Override
public AppTaskDetailWageVO wage(Long id) {
FbsProjectTask task = getById(id);
AppTaskDetailWageVO appTaskDetailVO = new AppTaskDetailWageVO();
appTaskDetailVO.setId(id);
appTaskDetailVO.setTaskAmount(task.getTaskAmount());
//结算情况
//收款申请列表
BgtWageApplicationQueryDTO wageDTO = new BgtWageApplicationQueryDTO();

View File

@ -1,20 +1,15 @@
package com.ruoyi.wgz.domain;
import com.baomidou.mybatisplus.annotation.*;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.LocalDate;
/**
* 消息对象 wgz_message
@ -126,4 +121,7 @@ public class WgzMessage implements Serializable {
@ApiModelProperty("备注")
private String remark;
@ApiModelProperty("是否需要操作0不需要 1需要 2已操作")
private String isOperation ;
}

View File

@ -30,56 +30,64 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="appQueryPageList" resultType="com.ruoyi.fbs.domain.vo.AppTaskVO">
select fpt.id,
fpt.project_id,
fpt.section_id,
fpt.sub_id,
fpt.task_name,
fpt.task_staff_num,
fpt.task_amount,
fpt.task_begin_time,
fpt.task_end_time,
zp.project_name,
fpt.task_describe,
fpt.task_address,
fpt.create_time,
(select count(task_id) from fbs_project_task_apply where task_id = fpt.id) as applyNum,
(select sum(applicant_amount) from bgt_wage_application where audit_status = '2'and task_id = fpt.id) as taskReceiveAmount
from fbs_project_task fpt
left join zbf_project zp on fpt.project_id = zp.id
SELECT
fpt.id,
fpt.project_id,
fpt.section_id,
fpt.sub_id,
fpt.task_name,
fpt.task_staff_num,
fpt.task_amount,
fpt.task_begin_time,
fpt.task_end_time,
zp.project_name,
fpt.task_describe,
fpt.task_address,
fpt.create_time,
#{dto.myTask} as myTask,
COALESCE(apply.applyNum, 0) as applyNum,
COALESCE(wage.taskReceiveAmount, 0) as taskReceiveAmount
FROM fbs_project_task fpt
LEFT JOIN zbf_project zp ON fpt.project_id = zp.id
LEFT JOIN (
SELECT task_id, COUNT(*) as applyNum
FROM fbs_project_task_apply
GROUP BY task_id
) apply ON fpt.id = apply.task_id
LEFT JOIN (
SELECT task_id, SUM(applicant_amount) as taskReceiveAmount
FROM bgt_wage_application
WHERE audit_status = '2'
GROUP BY task_id
) wage ON fpt.id = wage.task_id
<where>
<choose>
<when test="dto.myTask">
<if test="dto.taskIds != null and dto.taskIds.size() > 0">
and fpt.id IN
<foreach item="item" index="index" collection="dto.taskIds"
open="(" separator="," close=")">
#{item}
</foreach>
</if>
</when>
<otherwise>
<if test="dto.taskIds != null and dto.taskIds.size() > 0">
and fpt.id not IN
<foreach item="item" index="index" collection="dto.taskIds"
open="(" separator="," close=")">
#{item}
</foreach>
</if>
</otherwise>
</choose>
<if test="dto.taskName != null and dto.taskName != '' ">
and fpt.task_name like concat('%', #{dto.taskName}, '%')
</if>
<if test="dto.userId != null ">
and fpt.user_id = #{dto.userId}
</if>
<if test="dto.status != null and dto.status != '' ">
and fpt.status = #{dto.status}
</if>
<if test='!dto.myTask and dto.status != null and dto.status == "0"'>
AND NOT EXISTS (
SELECT 1
FROM fbs_project_task_apply
WHERE task_id = fpt.id
AND user_id = #{dto.userId}
)
</if>
<if test='dto.myTask and dto.status != null and dto.status == "0"'>
AND EXISTS (
SELECT 1
FROM fbs_project_task_apply
WHERE task_id = fpt.id
AND user_id = #{dto.userId}
)
</if>
<if test="dto.taskName != null and dto.taskName != '' ">
AND fpt.task_name LIKE CONCAT('%', #{dto.taskName}, '%')
</if>
<if test='dto.myTask and dto.status != null and dto.status != "0"'>
AND fpt.user_id = #{dto.userId}
</if>
<if test="dto.status != null and dto.status != '' ">
AND fpt.status = #{dto.status}
</if>
</where>
order by fpt.create_time desc
ORDER BY fpt.create_time DESC
</select>
</mapper>