优化
This commit is contained in:
@ -74,8 +74,8 @@ public class AppBgtPayCalculationController extends BaseController {
|
||||
}
|
||||
|
||||
@ApiOperation("总体考勤情况-工资结算-结算记录")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult<List<BgtPayCalculationDetailListVO>> getInfo(Long id, Long recruitId) {
|
||||
@GetMapping("/record")
|
||||
public AjaxResult<List<BgtPayCalculationDetailListVO>> record(Long id, Long recruitId) {
|
||||
return AjaxResult.success(iWgzPayCalculationService.record(id,recruitId));
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.bgt.domain.BgtProjectRecruitApply;
|
||||
import com.ruoyi.bgt.domain.dto.BgtAttendanceDayDTO;
|
||||
import com.ruoyi.bgt.domain.dto.BgtProjectRecruitApplyQueryDTO;
|
||||
import com.ruoyi.bgt.domain.dto.BgtProjectTaskProgressQueryDTO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyVO;
|
||||
import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache;
|
||||
import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
|
||||
@ -25,7 +24,7 @@ import java.util.List;
|
||||
@CacheNamespace(implementation = MybatisPlusRedisCache.class, eviction = MybatisPlusRedisCache.class)
|
||||
public interface BgtProjectRecruitApplyMapper extends BaseMapperPlus<BgtProjectRecruitApply> {
|
||||
|
||||
Page<BgtProjectRecruitApplyVO> appQueryList(@Param("page")Page<BgtProjectTaskProgressQueryDTO> queryDTOPage,@Param("dto") BgtProjectRecruitApplyQueryDTO dto);
|
||||
Page<BgtProjectRecruitApplyVO> appQueryList(@Param("page")Page<BgtProjectRecruitApplyQueryDTO> queryDTOPage,@Param("dto") BgtProjectRecruitApplyQueryDTO dto);
|
||||
|
||||
List<BgtProjectRecruitApplyVO> appQueryList(@Param("dto") BgtProjectRecruitApplyQueryDTO dto);
|
||||
|
||||
|
@ -124,7 +124,7 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
|
||||
|
||||
@Override
|
||||
public TableDataInfo<BgtProjectRecruitApplyVO> appQueryPageList(BgtProjectRecruitApplyQueryDTO dto) {
|
||||
Page<BgtProjectTaskProgressQueryDTO> queryDTOPage = new Page<>();
|
||||
Page<BgtProjectRecruitApplyQueryDTO> queryDTOPage = new Page<>();
|
||||
queryDTOPage.setCurrent(dto.getPageNum());
|
||||
queryDTOPage.setSize(dto.getPageSize());
|
||||
Page<BgtProjectRecruitApplyVO> queryVOPage = baseMapper.appQueryList(queryDTOPage, dto);
|
||||
|
@ -54,10 +54,15 @@ public class WgzAndBgtMessageConstant {
|
||||
//模板
|
||||
public static final String BGT_SIGN_UP_APPLY_HEADLINE = "您申请的【%s】项目,已得到回复!";
|
||||
public static final String BGT_SIGN_UP_APPLY_SUBHEADING = "您申请的【%s】项目,审核人【%s】已%s!";
|
||||
public static final String BGT_PAY_APPLY_HEADLINE = "【%s】项目工资已审批!";
|
||||
public static final String BGT_PAY_APPLY_HEADLINE = "您【%s】项目工资申请已审批!";
|
||||
public static final String BGT_PAY_APPLY_SUBHEADING = "您申请的【%s】项目工资,审核人【%s】已%s!";
|
||||
public static final String BGT_LEAVE_APPLY_HEADLINE = "您【%s】项目的请假申请,审核人【%s】已%s!";
|
||||
public static final String BGT_LEAVE_APPLY_HEADLINE = "您【%s】项目的请假申请已审批!";
|
||||
public static final String BGT_LEAVE_APPLY_SUBHEADING = "您【%s】项目的请假申请,审核人【%s】已%s!";
|
||||
public static final String BGT_LEAVE_MAKE_UP_HEADLINE = "您【%s】项目的补卡申请已审批!";
|
||||
public static final String BGT_LEAVE_MAKE_UP_SUBHEADING = "您【%s】项目的补卡申请,审核人【%s】已%s!";
|
||||
public static final String BGT_LEAVE_EXIT_HEADLINE = "您已从【%s】项目退场!";
|
||||
public static final String BGT_LEAVE_EXIT_SUBHEADING_ONE = "您已被【%s】指定从【%s】项目退场!";
|
||||
public static final String BGT_LEAVE_EXIT_SUBHEADING_TWO = "【%s】项目已完结,自动退场!";
|
||||
|
||||
//主副标志
|
||||
public static final String HEADLINE = "headline"; //主标题
|
||||
@ -74,19 +79,33 @@ public class WgzAndBgtMessageConstant {
|
||||
public static Map<String,String> bgtMessage(Map<String, String> mp, String type,Boolean isPass) {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
String pass = isPass ? "通过" : "拒绝";
|
||||
String projectName = mp.get("projectName");
|
||||
String auditor = mp.get("auditor");
|
||||
switch (type){
|
||||
case "1":
|
||||
map.put(HEADLINE, String.format(BGT_SIGN_UP_APPLY_HEADLINE, mp.get("projectName")));
|
||||
map.put(SUBHEADING, String.format(BGT_SIGN_UP_APPLY_SUBHEADING, mp.get("projectName"),mp.get("auditor"),pass));
|
||||
map.put(HEADLINE, String.format(BGT_SIGN_UP_APPLY_HEADLINE, projectName));
|
||||
map.put(SUBHEADING, String.format(BGT_SIGN_UP_APPLY_SUBHEADING, projectName,auditor,pass));
|
||||
break;
|
||||
case "2":
|
||||
map.put(HEADLINE, String.format(BGT_PAY_APPLY_HEADLINE, mp.get("projectName")));
|
||||
map.put(SUBHEADING, String.format(BGT_PAY_APPLY_SUBHEADING, mp.get("projectName"),mp.get("auditor"),pass));
|
||||
map.put(HEADLINE, String.format(BGT_PAY_APPLY_HEADLINE, projectName));
|
||||
map.put(SUBHEADING, String.format(BGT_PAY_APPLY_SUBHEADING, projectName,auditor,pass));
|
||||
break;
|
||||
case "3":
|
||||
map.put(HEADLINE, String.format(BGT_LEAVE_APPLY_HEADLINE, projectName));
|
||||
map.put(SUBHEADING, String.format(BGT_LEAVE_APPLY_SUBHEADING, projectName,auditor,pass));
|
||||
break;
|
||||
case "4":
|
||||
map.put(HEADLINE, String.format(BGT_LEAVE_MAKE_UP_HEADLINE, projectName));
|
||||
map.put(SUBHEADING, String.format(BGT_LEAVE_MAKE_UP_SUBHEADING, projectName,auditor,pass));
|
||||
break;
|
||||
case "5":
|
||||
map.put(HEADLINE, String.format(BGT_LEAVE_EXIT_HEADLINE, projectName));
|
||||
if(isPass){
|
||||
map.put(SUBHEADING, String.format(BGT_LEAVE_EXIT_SUBHEADING_ONE, auditor,projectName));
|
||||
}else {
|
||||
map.put(SUBHEADING, String.format(BGT_LEAVE_EXIT_SUBHEADING_TWO, projectName));
|
||||
}
|
||||
break;
|
||||
// case "3":
|
||||
// return String.format(BGT_PAY_APPLY, mp.get("projectName"),mp.get("auditor"));
|
||||
// case "4":
|
||||
// return String.format(BGT_LEAVE_APPLY, mp.get("projectName"),mp.get("auditor"));
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package com.ruoyi.common.util;
|
||||
import com.ruoyi.bgt.domain.vo.BgtAttendanceCountVO;
|
||||
|
||||
import java.time.*;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
|
||||
public class DataUtil {
|
||||
@ -90,4 +91,19 @@ public class DataUtil {
|
||||
long minutes = duration.toMinutes();
|
||||
return (int) minutes;
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算年龄
|
||||
*/
|
||||
public static int calculateAge(String birthdate) {
|
||||
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
// 将字符串解析为 LocalDate 对象
|
||||
LocalDate birth = LocalDate.parse(birthdate, dateTimeFormatter);
|
||||
// 获取当前日期
|
||||
LocalDate now = LocalDate.now();
|
||||
|
||||
// 计算年龄
|
||||
Period period = Period.between(birth, now);
|
||||
return period.getYears();
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
package com.ruoyi.wgz.bo.res;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -34,6 +33,9 @@ public class WgzAppPersonalBasicInformationRes implements Serializable {
|
||||
@ApiModelProperty("出生日期")
|
||||
private String birthdate;
|
||||
|
||||
@ApiModelProperty("年龄")
|
||||
private Integer age;
|
||||
|
||||
@ApiModelProperty("身份证号码")
|
||||
private String identityCard;
|
||||
|
||||
@ -69,4 +71,7 @@ public class WgzAppPersonalBasicInformationRes implements Serializable {
|
||||
|
||||
@ApiModelProperty("工种,多个逗号分隔")
|
||||
private String typeOfWork;
|
||||
|
||||
@ApiModelProperty("工种名")
|
||||
private String typeOfWorkName;
|
||||
}
|
||||
|
@ -5,18 +5,21 @@ import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.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.Annex;
|
||||
import com.ruoyi.common.domain.dto.AnnexDTO;
|
||||
import com.ruoyi.common.service.IAnnexService;
|
||||
import com.ruoyi.common.util.DataUtil;
|
||||
import com.ruoyi.common.utils.PageUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.system.service.ISysDictTypeService;
|
||||
import com.ruoyi.wgz.bo.WgzUserQueryBo;
|
||||
import com.ruoyi.wgz.bo.req.WgzAppModifyingUserProfilePictureReq;
|
||||
import com.ruoyi.wgz.bo.req.WgzAppPersonalBasicInformationReq;
|
||||
import com.ruoyi.wgz.bo.req.WgzAppRegisterReq;
|
||||
import com.ruoyi.wgz.bo.req.WgzAppRealNameAuthenticationReq;
|
||||
import com.ruoyi.wgz.bo.req.WgzAppRegisterReq;
|
||||
import com.ruoyi.wgz.bo.res.WgzAppPersonalBasicInformationRes;
|
||||
import com.ruoyi.wgz.common.SnowflakeIdUtil;
|
||||
import com.ruoyi.wgz.domain.WgzUser;
|
||||
@ -27,11 +30,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
@ -46,6 +46,9 @@ public class WgzUserServiceImpl extends ServicePlusImpl<WgzUserMapper, WgzUser>
|
||||
@Autowired
|
||||
private IAnnexService iAnnexService;
|
||||
|
||||
@Autowired
|
||||
private ISysDictTypeService dictTypeService;
|
||||
|
||||
@Override
|
||||
public WgzUser queryById(String id){
|
||||
return getById(id);
|
||||
@ -168,7 +171,13 @@ public class WgzUserServiceImpl extends ServicePlusImpl<WgzUserMapper, WgzUser>
|
||||
//2、copy数据返回
|
||||
WgzAppPersonalBasicInformationRes wgzAppPersonalBasicInformationRes = new WgzAppPersonalBasicInformationRes();
|
||||
BeanUtils.copyProperties(wgzUser,wgzAppPersonalBasicInformationRes);
|
||||
return wgzAppPersonalBasicInformationRes;
|
||||
wgzAppPersonalBasicInformationRes.setAge(DataUtil.calculateAge(wgzAppPersonalBasicInformationRes.getBirthdate()));
|
||||
List<SysDictData> typeOfWork = dictTypeService.selectDictDataByType("type_of_work");
|
||||
List<String> split = Arrays.asList(wgzAppPersonalBasicInformationRes.getTypeOfWork().split(","));
|
||||
String typeOfWorkName = typeOfWork.stream().filter(dictData -> split.contains(dictData.getDictValue())).map(SysDictData::getDictLabel)
|
||||
.collect(Collectors.joining(","));
|
||||
wgzAppPersonalBasicInformationRes.setTypeOfWorkName(typeOfWorkName);
|
||||
return wgzAppPersonalBasicInformationRes;
|
||||
}
|
||||
|
||||
//实名认证
|
||||
|
Reference in New Issue
Block a user