优化
This commit is contained in:
@ -120,4 +120,6 @@ public class BgtMessage implements Serializable {
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("是否需要操作(0不需要 1需要 2已操作)")
|
||||
private String isOperation ;
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ public class BgtWageApplication implements Serializable {
|
||||
private Long projectId;
|
||||
|
||||
@ApiModelProperty("项目名")
|
||||
private Long projectName;
|
||||
private String projectName;
|
||||
|
||||
/** 标段ID */
|
||||
@Excel(name = "标段ID")
|
||||
|
@ -67,6 +67,12 @@ public class UserRealNameAuthenticationDTO {
|
||||
@NotBlank(message = "银行卡号不能为空")
|
||||
private String cardNo;
|
||||
|
||||
@ApiModelProperty("身份证正面图路径")
|
||||
private String frontPath;
|
||||
|
||||
@ApiModelProperty("身份证反面图路径")
|
||||
private String reverseSidePath;
|
||||
|
||||
@ApiModelProperty("资格证书")
|
||||
List<AnnexDTO> annexList;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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"; //大类型-其它
|
||||
|
@ -79,6 +79,9 @@ public class AppTaskDetailVO {
|
||||
@ApiModelProperty("任务状态(1进行中 2已完成)")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty("创建者ID")
|
||||
private Long createId;
|
||||
|
||||
/** 备注 */
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
@ -25,5 +25,7 @@ public class AppTaskDetailWageVO {
|
||||
@ApiModelProperty("最新一条收款申请")
|
||||
private BgtWageApplicationListVO wageApplication;
|
||||
|
||||
@ApiModelProperty("任务金额")
|
||||
private Integer taskAmount;
|
||||
|
||||
}
|
||||
|
@ -62,6 +62,9 @@ public class AppTaskVO {
|
||||
@ApiModelProperty("申请数量")
|
||||
private Integer applyNum;
|
||||
|
||||
@ApiModelProperty("判断标志")
|
||||
private Boolean myTask;
|
||||
|
||||
@ApiModelProperty("任务收款金额")
|
||||
private Integer taskReceiveAmount = 0;
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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 ;
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user