优化
This commit is contained in:
@ -81,5 +81,16 @@ public class AppBgtProjectRecruitController extends BaseController {
|
|||||||
return AjaxResult.success(iBgtProjectRecruitService.insert(bo));
|
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));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,40 @@
|
|||||||
Application Version: ${ruoyi-vue-plus.version}
|
Application Version: ${ruoyi-vue-plus.version}
|
||||||
Spring Boot Version: ${spring-boot.version}
|
Spring Boot Version: ${spring-boot.version}
|
||||||
__________ _____.___.__ ____ ____ __________.__
|
,--"""",--.__,---[],-------._
|
||||||
\______ \__ __ ____\__ | |__| \ \ / /_ __ ____ \______ \ | __ __ ______
|
," __,' \ \--""""""==;-
|
||||||
| _/ | \/ _ \/ | | | ______ \ Y / | \_/ __ \ ______ | ___/ | | | \/ ___/
|
," _,-" "/---.___ \ ___\ ,-'',"
|
||||||
| | \ | ( <_> )____ | | /_____/ \ /| | /\ ___/ /_____/ | | | |_| | /\___ \
|
/,-' / ;. ,.--'-.__\ _,-"" ,| `,' /
|
||||||
|____|_ /____/ \____// ______|__| \___/ |____/ \___ > |____| |____/____//____ >
|
/``""""-._/,-|:\ []\,' ```-/:;-. `. /
|
||||||
\/ \/ \/ \/
|
` ;::: || /:,; `-.\
|
||||||
|
=.,'__,---||-.____',.=
|
||||||
|
=(:\_ ||__ ):)=
|
||||||
|
,"::::`----||::`--':::"._
|
||||||
|
,':::::::::::||::::::::::::'.
|
||||||
|
.__ ;:::.-.:::::__||___:::::.-.:::\ __,
|
||||||
|
"""-;:::( O )::::>_|| _<::::( O )::::-"""
|
||||||
|
=======;:::::`-`:::::::||':::::::`-`:::::\=======
|
||||||
|
,--"";:::_____________||______________::::""----. , ,
|
||||||
|
; ::`._( | ||| | )_,'::::\_,,,,,,,,,,____/,'_,
|
||||||
|
,; :::`--._|____[]|_____|_.-'::::::::::::::::::::::::);_
|
||||||
|
;/ / :::::::::,||,:::::::::::::::::::::::::::::::::::/
|
||||||
|
/; ``''''----------/,'/,__,,,,,____:::::::::::::::::::::,"
|
||||||
|
;/ :);/|_;| ,--.. . ```-.:::::::::::::_,"
|
||||||
|
/; :::):__,'//""\\. ,--.. \:::,:::::_,"
|
||||||
|
;/ :::::/ . . . . . . //""\\. \::":__,"
|
||||||
|
;/ :::::::,' . . . . . . . . . . .:`::\
|
||||||
|
'; :::::::__,'. ,--.. . .,--. . . . . .:`::`
|
||||||
|
'; __,..--'''-. . //""\\. .//""\\ . ,--.. :`:::`
|
||||||
|
; / \\ .//""\\ . . . . . . . . . //""\\. :`::`
|
||||||
|
; / . . . . . . . . . . . . . . . . .:`::`
|
||||||
|
; ( . . . . . . . . . . . . . . . ;:::`
|
||||||
|
,: ;, . . . . . . . . . . . . . ;':::`
|
||||||
|
,: ;, . . . . . . . . . . . . .;`:::
|
||||||
|
,: ;, . . . . . . . . . . . . ;`::;`
|
||||||
|
,: ; . . . . . . . . . . . . ;':::;`
|
||||||
|
: ; . . . . . . . . . . . ,':::;
|
||||||
|
: '. . . . . . . . .. . . .,':::;`
|
||||||
|
: `. . . . . . . . . . . . ;::::;`
|
||||||
|
'. `-. . . . . . . . . . . ,-'::::;
|
||||||
|
`:_ ``--..___________..--'':::::;'`
|
||||||
|
`._::,.:,.:,:_ctr_:,:,.::,.:_;'`
|
||||||
|
________________`"\/"\/\/'""""`\/"\/""\/"___________
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.ruoyi.common.utils;
|
package com.ruoyi.common.utils;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import org.apache.commons.lang3.time.DateFormatUtils;
|
import org.apache.commons.lang3.time.DateFormatUtils;
|
||||||
|
|
||||||
import java.lang.management.ManagementFactory;
|
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){
|
public static LocalDate str2Localdate(String time,String format){
|
||||||
// 定义日期格式
|
// 定义日期格式
|
||||||
|
if(StrUtil.isBlank(time)){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(format);
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(format);
|
||||||
LocalDate localDate = null;
|
LocalDate localDate = null;
|
||||||
try {
|
try {
|
||||||
|
@ -120,4 +120,6 @@ public class BgtMessage implements Serializable {
|
|||||||
@ApiModelProperty("备注")
|
@ApiModelProperty("备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
@ApiModelProperty("是否需要操作(0不需要 1需要 2已操作)")
|
||||||
|
private String isOperation ;
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ public class BgtWageApplication implements Serializable {
|
|||||||
private Long projectId;
|
private Long projectId;
|
||||||
|
|
||||||
@ApiModelProperty("项目名")
|
@ApiModelProperty("项目名")
|
||||||
private Long projectName;
|
private String projectName;
|
||||||
|
|
||||||
/** 标段ID */
|
/** 标段ID */
|
||||||
@Excel(name = "标段ID")
|
@Excel(name = "标段ID")
|
||||||
|
@ -67,6 +67,12 @@ public class UserRealNameAuthenticationDTO {
|
|||||||
@NotBlank(message = "银行卡号不能为空")
|
@NotBlank(message = "银行卡号不能为空")
|
||||||
private String cardNo;
|
private String cardNo;
|
||||||
|
|
||||||
|
@ApiModelProperty("身份证正面图路径")
|
||||||
|
private String frontPath;
|
||||||
|
|
||||||
|
@ApiModelProperty("身份证反面图路径")
|
||||||
|
private String reverseSidePath;
|
||||||
|
|
||||||
@ApiModelProperty("资格证书")
|
@ApiModelProperty("资格证书")
|
||||||
List<AnnexDTO> annexList;
|
List<AnnexDTO> annexList;
|
||||||
}
|
}
|
||||||
|
@ -67,10 +67,14 @@ public class BgtMessageDetailVO implements Serializable {
|
|||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||||
private LocalDateTime endTime;
|
private LocalDateTime endTime;
|
||||||
|
|
||||||
//请假 补卡
|
//请假 补卡 共用
|
||||||
@ApiModelProperty("申请人")
|
@ApiModelProperty("申请人")
|
||||||
private String username;
|
private String username;
|
||||||
|
|
||||||
@ApiModelProperty("补卡/请假理由")
|
@ApiModelProperty("补卡/请假理由")
|
||||||
private String reason;
|
private String reason;
|
||||||
|
|
||||||
|
//任务 结算共用
|
||||||
|
@ApiModelProperty("任务名称")
|
||||||
|
private String taskName;
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,8 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
|||||||
import com.ruoyi.common.enums.BgtMessageType;
|
import com.ruoyi.common.enums.BgtMessageType;
|
||||||
import com.ruoyi.common.utils.PageUtils;
|
import com.ruoyi.common.utils.PageUtils;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
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.WgzLeave;
|
||||||
import com.ruoyi.wgz.domain.WgzPayCalculation;
|
import com.ruoyi.wgz.domain.WgzPayCalculation;
|
||||||
import com.ruoyi.wgz.domain.WgzReissueacard;
|
import com.ruoyi.wgz.domain.WgzReissueacard;
|
||||||
@ -69,6 +71,9 @@ public class BgtMessageServiceImpl extends ServicePlusImpl<BgtMessageMapper, Bgt
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IWgzReissueacardService reissueacardService;
|
private IWgzReissueacardService reissueacardService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IFbsProjectTaskService taskService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BgtMessage queryById(Long id) {
|
public BgtMessage queryById(Long id) {
|
||||||
return getById(id);
|
return getById(id);
|
||||||
@ -186,11 +191,12 @@ public class BgtMessageServiceImpl extends ServicePlusImpl<BgtMessageMapper, Bgt
|
|||||||
for (BgtMessage message : result.getRecords()) {
|
for (BgtMessage message : result.getRecords()) {
|
||||||
BgtMessageDetailVO bgtMessageDetailVO = BeanUtil.copyProperties(message, BgtMessageDetailVO.class);
|
BgtMessageDetailVO bgtMessageDetailVO = BeanUtil.copyProperties(message, BgtMessageDetailVO.class);
|
||||||
if (BGT_LARGE_TASK.equals(message.getMessageLargeType())) {
|
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())) {
|
} 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())) {
|
} else if (BGT_LARGE_OTHER.equals(message.getMessageLargeType())) {
|
||||||
|
|
||||||
switch (message.getMessageSmallType()) {
|
switch (message.getMessageSmallType()) {
|
||||||
case BGT_SMALL_SIGN_UP:
|
case BGT_SMALL_SIGN_UP:
|
||||||
BgtProjectRecruitApply recruitApply = recruitApplyService.getById(message.getTableId());
|
BgtProjectRecruitApply recruitApply = recruitApplyService.getById(message.getTableId());
|
||||||
@ -210,10 +216,10 @@ public class BgtMessageServiceImpl extends ServicePlusImpl<BgtMessageMapper, Bgt
|
|||||||
bgtMessageDetailVO.setEndTime(wgzLeave.getEndTime());
|
bgtMessageDetailVO.setEndTime(wgzLeave.getEndTime());
|
||||||
break;
|
break;
|
||||||
case BGT_SMALL_MAKE_UP:
|
case BGT_SMALL_MAKE_UP:
|
||||||
WgzReissueacard reissueacard = reissueacardService.getById(message.getTableId());
|
WgzReissueacard reissueCard = reissueacardService.getById(message.getTableId());
|
||||||
bgtMessageDetailVO.setReason(reissueacard.getReason());
|
bgtMessageDetailVO.setReason(reissueCard.getReason());
|
||||||
bgtMessageDetailVO.setUsername(wgzUserService.getById(reissueacard.getUserId()).getUsername());
|
bgtMessageDetailVO.setUsername(wgzUserService.getById(reissueCard.getUserId()).getUsername());
|
||||||
bgtMessageDetailVO.setNowTime(reissueacard.getNowTime());
|
bgtMessageDetailVO.setNowTime(reissueCard.getNowTime());
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -198,7 +198,8 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
|
|||||||
.setSubheading(map.get(SUBHEADING))
|
.setSubheading(map.get(SUBHEADING))
|
||||||
.setTableId(recruitApply.getId())
|
.setTableId(recruitApply.getId())
|
||||||
.setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName())
|
.setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName())
|
||||||
.setMessageLargeType(LARGE_APPLY);
|
.setMessageLargeType(LARGE_APPLY)
|
||||||
|
.setIsOperation(OPERATION_NEED);
|
||||||
iWgzMessageService.sendAMessage(wgzMessage);
|
iWgzMessageService.sendAMessage(wgzMessage);
|
||||||
return updateById(recruitApply);
|
return updateById(recruitApply);
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@ import com.ruoyi.bgt.service.IBgtProjectRecruitService;
|
|||||||
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.enums.RecruitApplyStatus;
|
import com.ruoyi.common.enums.RecruitApplyStatus;
|
||||||
|
import com.ruoyi.common.exception.BaseException;
|
||||||
import com.ruoyi.common.utils.PageUtils;
|
import com.ruoyi.common.utils.PageUtils;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.fbs.domain.FbsProjectTask;
|
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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -113,7 +115,13 @@ public class BgtProjectRecruitServiceImpl extends ServicePlusImpl<BgtProjectRecr
|
|||||||
* @param entity 实体类数据
|
* @param entity 实体类数据
|
||||||
*/
|
*/
|
||||||
private void validEntityBeforeSave(BgtProjectRecruit 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
|
@Override
|
||||||
|
@ -17,6 +17,7 @@ import com.ruoyi.bgt.service.IBgtProjectTaskProgressService;
|
|||||||
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.enums.ProjectTaskStatus;
|
import com.ruoyi.common.enums.ProjectTaskStatus;
|
||||||
|
import com.ruoyi.common.exception.BaseException;
|
||||||
import com.ruoyi.common.utils.PageUtils;
|
import com.ruoyi.common.utils.PageUtils;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.fbs.domain.FbsProjectTask;
|
import com.ruoyi.fbs.domain.FbsProjectTask;
|
||||||
@ -106,7 +107,10 @@ public class BgtProjectTaskProgressServiceImpl extends ServicePlusImpl<BgtProjec
|
|||||||
* @param entity 实体类数据
|
* @param entity 实体类数据
|
||||||
*/
|
*/
|
||||||
private void validEntityBeforeSave(BgtProjectTaskProgress entity){
|
private void validEntityBeforeSave(BgtProjectTaskProgress entity){
|
||||||
//TODO 做一些数据校验,如唯一约束
|
Integer lastProgress = getLastProgress(entity.getTaskId());
|
||||||
|
if(lastProgress>entity.getProgress()){
|
||||||
|
throw new BaseException("当前进度不能小于上一个进度");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -21,7 +21,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
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.Arrays;
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -124,8 +123,6 @@ public class BgtUserServiceImpl extends ServicePlusImpl<BgtUserMapper, BgtUser>
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean realNameAuthentication(UserRealNameAuthenticationDTO dto) {
|
public Boolean realNameAuthentication(UserRealNameAuthenticationDTO dto) {
|
||||||
BgtUser bgtUser = BeanUtil.copyProperties(dto, BgtUser.class);
|
BgtUser bgtUser = BeanUtil.copyProperties(dto, BgtUser.class);
|
||||||
//todo: 资格证书附件类型
|
|
||||||
annexService.deleteByTypes(Arrays.asList("1"));
|
|
||||||
annexService.insertBatch(dto.getAnnexList());
|
annexService.insertBatch(dto.getAnnexList());
|
||||||
return baseMapper.updateById(bgtUser)>0;
|
return baseMapper.updateById(bgtUser)>0;
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,13 @@ public class WgzAndBgtMessageConstant {
|
|||||||
public static final String USERTYPE_BGT = "2"; //包工头
|
public static final String USERTYPE_BGT = "2"; //包工头
|
||||||
public static final String USERTYPE_FBS = "3"; //分包商
|
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_APPLY = "0"; //大类型-报名
|
||||||
public static final String LARGE_SALARY = "1"; //大类型-工资
|
public static final String LARGE_SALARY = "1"; //大类型-工资
|
||||||
public static final String LARGE_OTHER = "2"; //大类型-其它
|
public static final String LARGE_OTHER = "2"; //大类型-其它
|
||||||
|
@ -79,6 +79,9 @@ public class AppTaskDetailVO {
|
|||||||
@ApiModelProperty("任务状态(1进行中 2已完成)")
|
@ApiModelProperty("任务状态(1进行中 2已完成)")
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
|
@ApiModelProperty("创建者ID")
|
||||||
|
private Long createId;
|
||||||
|
|
||||||
/** 备注 */
|
/** 备注 */
|
||||||
@ApiModelProperty("备注")
|
@ApiModelProperty("备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
@ -25,5 +25,7 @@ public class AppTaskDetailWageVO {
|
|||||||
@ApiModelProperty("最新一条收款申请")
|
@ApiModelProperty("最新一条收款申请")
|
||||||
private BgtWageApplicationListVO wageApplication;
|
private BgtWageApplicationListVO wageApplication;
|
||||||
|
|
||||||
|
@ApiModelProperty("任务金额")
|
||||||
|
private Integer taskAmount;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -62,6 +62,9 @@ public class AppTaskVO {
|
|||||||
@ApiModelProperty("申请数量")
|
@ApiModelProperty("申请数量")
|
||||||
private Integer applyNum;
|
private Integer applyNum;
|
||||||
|
|
||||||
|
@ApiModelProperty("判断标志")
|
||||||
|
private Boolean myTask;
|
||||||
|
|
||||||
@ApiModelProperty("任务收款金额")
|
@ApiModelProperty("任务收款金额")
|
||||||
private Integer taskReceiveAmount = 0;
|
private Integer taskReceiveAmount = 0;
|
||||||
}
|
}
|
||||||
|
@ -144,21 +144,8 @@ public class FbsProjectTaskServiceImpl extends ServicePlusImpl<FbsProjectTaskMap
|
|||||||
Page<AppTaskDTO> appTaskDTOPage = new Page<>();
|
Page<AppTaskDTO> appTaskDTOPage = new Page<>();
|
||||||
appTaskDTOPage.setCurrent(dto.getPageNum());
|
appTaskDTOPage.setCurrent(dto.getPageNum());
|
||||||
appTaskDTOPage.setSize(dto.getPageSize());
|
appTaskDTOPage.setSize(dto.getPageSize());
|
||||||
List<Long> taskIds = new ArrayList<>();
|
dto.setUserId(SecurityUtils.getAppUserId());
|
||||||
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());
|
|
||||||
}
|
|
||||||
|
|
||||||
Page<AppTaskVO> appTaskVOPage = baseMapper.appQueryPageList(appTaskDTOPage, dto);
|
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);
|
return PageUtils.buildDataInfo(appTaskVOPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -250,8 +237,10 @@ public class FbsProjectTaskServiceImpl extends ServicePlusImpl<FbsProjectTaskMap
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AppTaskDetailWageVO wage(Long id) {
|
public AppTaskDetailWageVO wage(Long id) {
|
||||||
|
FbsProjectTask task = getById(id);
|
||||||
AppTaskDetailWageVO appTaskDetailVO = new AppTaskDetailWageVO();
|
AppTaskDetailWageVO appTaskDetailVO = new AppTaskDetailWageVO();
|
||||||
appTaskDetailVO.setId(id);
|
appTaskDetailVO.setId(id);
|
||||||
|
appTaskDetailVO.setTaskAmount(task.getTaskAmount());
|
||||||
//结算情况
|
//结算情况
|
||||||
//收款申请列表
|
//收款申请列表
|
||||||
BgtWageApplicationQueryDTO wageDTO = new BgtWageApplicationQueryDTO();
|
BgtWageApplicationQueryDTO wageDTO = new BgtWageApplicationQueryDTO();
|
||||||
|
@ -1,20 +1,15 @@
|
|||||||
package com.ruoyi.wgz.domain;
|
package com.ruoyi.wgz.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import com.ruoyi.common.annotation.Excel;
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
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.LocalDateTime;
|
||||||
import java.time.LocalTime;
|
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 消息对象 wgz_message
|
* 消息对象 wgz_message
|
||||||
@ -126,4 +121,7 @@ public class WgzMessage implements Serializable {
|
|||||||
@ApiModelProperty("备注")
|
@ApiModelProperty("备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
@ApiModelProperty("是否需要操作(0不需要 1需要 2已操作)")
|
||||||
|
private String isOperation ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -30,56 +30,64 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
|
|
||||||
<select id="appQueryPageList" resultType="com.ruoyi.fbs.domain.vo.AppTaskVO">
|
<select id="appQueryPageList" resultType="com.ruoyi.fbs.domain.vo.AppTaskVO">
|
||||||
select fpt.id,
|
SELECT
|
||||||
fpt.project_id,
|
fpt.id,
|
||||||
fpt.section_id,
|
fpt.project_id,
|
||||||
fpt.sub_id,
|
fpt.section_id,
|
||||||
fpt.task_name,
|
fpt.sub_id,
|
||||||
fpt.task_staff_num,
|
fpt.task_name,
|
||||||
fpt.task_amount,
|
fpt.task_staff_num,
|
||||||
fpt.task_begin_time,
|
fpt.task_amount,
|
||||||
fpt.task_end_time,
|
fpt.task_begin_time,
|
||||||
zp.project_name,
|
fpt.task_end_time,
|
||||||
fpt.task_describe,
|
zp.project_name,
|
||||||
fpt.task_address,
|
fpt.task_describe,
|
||||||
fpt.create_time,
|
fpt.task_address,
|
||||||
(select count(task_id) from fbs_project_task_apply where task_id = fpt.id) as applyNum,
|
fpt.create_time,
|
||||||
(select sum(applicant_amount) from bgt_wage_application where audit_status = '2'and task_id = fpt.id) as taskReceiveAmount
|
#{dto.myTask} as myTask,
|
||||||
from fbs_project_task fpt
|
COALESCE(apply.applyNum, 0) as applyNum,
|
||||||
left join zbf_project zp on fpt.project_id = zp.id
|
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>
|
<where>
|
||||||
<choose>
|
<if test='!dto.myTask and dto.status != null and dto.status == "0"'>
|
||||||
<when test="dto.myTask">
|
AND NOT EXISTS (
|
||||||
<if test="dto.taskIds != null and dto.taskIds.size() > 0">
|
SELECT 1
|
||||||
and fpt.id IN
|
FROM fbs_project_task_apply
|
||||||
<foreach item="item" index="index" collection="dto.taskIds"
|
WHERE task_id = fpt.id
|
||||||
open="(" separator="," close=")">
|
AND user_id = #{dto.userId}
|
||||||
#{item}
|
)
|
||||||
</foreach>
|
</if>
|
||||||
</if>
|
<if test='dto.myTask and dto.status != null and dto.status == "0"'>
|
||||||
</when>
|
AND EXISTS (
|
||||||
<otherwise>
|
SELECT 1
|
||||||
<if test="dto.taskIds != null and dto.taskIds.size() > 0">
|
FROM fbs_project_task_apply
|
||||||
and fpt.id not IN
|
WHERE task_id = fpt.id
|
||||||
<foreach item="item" index="index" collection="dto.taskIds"
|
AND user_id = #{dto.userId}
|
||||||
open="(" separator="," close=")">
|
)
|
||||||
#{item}
|
</if>
|
||||||
</foreach>
|
<if test="dto.taskName != null and dto.taskName != '' ">
|
||||||
</if>
|
AND fpt.task_name LIKE CONCAT('%', #{dto.taskName}, '%')
|
||||||
</otherwise>
|
</if>
|
||||||
</choose>
|
<if test='dto.myTask and dto.status != null and dto.status != "0"'>
|
||||||
|
AND fpt.user_id = #{dto.userId}
|
||||||
<if test="dto.taskName != null and dto.taskName != '' ">
|
</if>
|
||||||
and fpt.task_name like concat('%', #{dto.taskName}, '%')
|
<if test="dto.status != null and dto.status != '' ">
|
||||||
</if>
|
AND fpt.status = #{dto.status}
|
||||||
<if test="dto.userId != null ">
|
</if>
|
||||||
and fpt.user_id = #{dto.userId}
|
|
||||||
</if>
|
|
||||||
<if test="dto.status != null and dto.status != '' ">
|
|
||||||
and fpt.status = #{dto.status}
|
|
||||||
</if>
|
|
||||||
</where>
|
</where>
|
||||||
order by fpt.create_time desc
|
ORDER BY fpt.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
Reference in New Issue
Block a user