3.20优化
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
package com.ruoyi.web.controller.wgz.controller;
|
package com.ruoyi.web.controller.wgz.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.ruoyi.bgt.domain.BgtProjectRecruit;
|
import com.ruoyi.bgt.domain.BgtProjectRecruit;
|
||||||
import com.ruoyi.bgt.domain.BgtProjectRecruitApply;
|
import com.ruoyi.bgt.domain.BgtProjectRecruitApply;
|
||||||
import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService;
|
import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService;
|
||||||
@ -23,6 +24,7 @@
|
|||||||
import com.ruoyi.wgz.bo.rests.WgzAppUserAllRecruitmentTwo;
|
import com.ruoyi.wgz.bo.rests.WgzAppUserAllRecruitmentTwo;
|
||||||
import com.ruoyi.wgz.bo.rests.WgzAutonymAnnex;
|
import com.ruoyi.wgz.bo.rests.WgzAutonymAnnex;
|
||||||
import com.ruoyi.wgz.bo.req.*;
|
import com.ruoyi.wgz.bo.req.*;
|
||||||
|
import com.ruoyi.wgz.domain.WgzAttendance;
|
||||||
import com.ruoyi.wgz.domain.WgzPayCalculation;
|
import com.ruoyi.wgz.domain.WgzPayCalculation;
|
||||||
import com.ruoyi.wgz.domain.WgzQuestionsConfiguration;
|
import com.ruoyi.wgz.domain.WgzQuestionsConfiguration;
|
||||||
import com.ruoyi.wgz.service.*;
|
import com.ruoyi.wgz.service.*;
|
||||||
@ -420,19 +422,29 @@
|
|||||||
*/
|
*/
|
||||||
@ApiOperation("【首页】【项目进行中|已完成项目】 详情")
|
@ApiOperation("【首页】【项目进行中|已完成项目】 详情")
|
||||||
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userProjectInProgressDetails')")
|
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userProjectInProgressDetails')")
|
||||||
@GetMapping("/WgzAppUserProjectInProgressDetails/{id}")
|
@GetMapping("/WgzAppUserProjectInProgressDetails/{recruitApplyId}")
|
||||||
public AjaxResult<WgzApplyForPayrollSettlementAddRes> userProjectInProgressDetails(@NotNull(message = "主键不能为空") @PathVariable("id") Long id) {
|
public AjaxResult<WgzApplyForPayrollSettlementAddRes> userProjectInProgressDetails(@NotNull(message = "主键不能为空") @PathVariable("recruitApplyId") Long recruitApplyId) {
|
||||||
WgzApplyForPayrollSettlementAddRes res = new WgzApplyForPayrollSettlementAddRes();
|
WgzApplyForPayrollSettlementAddRes res = new WgzApplyForPayrollSettlementAddRes();
|
||||||
Long appUserId = SecurityUtils.getAppUserId();
|
Long appUserId = SecurityUtils.getAppUserId();
|
||||||
BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId);
|
// BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId);
|
||||||
BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getRecruitId());
|
BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.getById(recruitApplyId);
|
||||||
|
// BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getRecruitId());
|
||||||
//1、先获取项目详情基本信息
|
//1、先获取项目详情基本信息
|
||||||
WgzAppProjectDetailsRes wgzAppProjectDetailsRes = iBgtProjectRecruitService.userProjectDetails(id);
|
WgzAppProjectDetailsRes appById = iBgtProjectRecruitService.userProjectDetails(by.getRecruitId());
|
||||||
BeanUtils.copyProperties(wgzAppProjectDetailsRes, res);
|
BeanUtils.copyProperties(appById, res);
|
||||||
//2、获取当前人员的打卡天数*单天金额=实际总工资金额
|
//2、获取当前人员的打卡天数*单天金额=实际总工资金额
|
||||||
BigDecimal recruitAmount = appById.getRecruitAmount();
|
BigDecimal recruitAmount = appById.getRecruitAmount();
|
||||||
//查询实际考勤时间(只要有打卡就算出勤一条,异常也视为正常出勤,也就是说只要有上班or下班至少有一个有数据,那就证明出勤ok)
|
//查询实际考勤时间(只要有打卡就算出勤一条,异常也视为正常出勤,也就是说只要有上班or下班至少有一个有数据,那就证明出勤ok)
|
||||||
Integer i = iWgzAttendanceService.attendanceDetail(appUserId, appById.getId(), null);
|
int i = iWgzAttendanceService.count(
|
||||||
|
new LambdaQueryWrapper<WgzAttendance>().
|
||||||
|
eq(WgzAttendance::getUserId, appUserId).
|
||||||
|
eq(WgzAttendance::getRecruitId, appById.getId()).and(wrapper -> wrapper
|
||||||
|
.isNotNull(WgzAttendance::getClockInTime)
|
||||||
|
.or()
|
||||||
|
.isNotNull(WgzAttendance::getClockOutTime)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
// Integer i = iWgzAttendanceService.attendanceDetail(appUserId, appById.getId(), null);
|
||||||
if (i==0){
|
if (i==0){
|
||||||
res.setNum(0);
|
res.setNum(0);
|
||||||
res.setTotalAmount(BigDecimal.valueOf(0));
|
res.setTotalAmount(BigDecimal.valueOf(0));
|
||||||
@ -443,7 +455,7 @@
|
|||||||
}
|
}
|
||||||
res.setEntryTime(by.getEntryTime()).
|
res.setEntryTime(by.getEntryTime()).
|
||||||
setLeaveTime(by.getLeaveTime()).
|
setLeaveTime(by.getLeaveTime()).
|
||||||
setAmount(recruitAmount);
|
setAmount(appById.getRecruitAmount());
|
||||||
//3、查询当前进行中的项目是否有工资结算(多次追加)
|
//3、查询当前进行中的项目是否有工资结算(多次追加)
|
||||||
List<WgzPayCalculation> gzs = iWgzPayCalculationService.findByUserIdRecruitIdNewestData(appUserId, appById.getId());
|
List<WgzPayCalculation> gzs = iWgzPayCalculationService.findByUserIdRecruitIdNewestData(appUserId, appById.getId());
|
||||||
if (gzs.isEmpty()){
|
if (gzs.isEmpty()){
|
||||||
@ -482,7 +494,7 @@
|
|||||||
*/
|
*/
|
||||||
@ApiOperation("【首页】【项目进行中】 项目进行中·申请工资结算(列表)")
|
@ApiOperation("【首页】【项目进行中】 项目进行中·申请工资结算(列表)")
|
||||||
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userApplyForPayrollSettlementList')")
|
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userApplyForPayrollSettlementList')")
|
||||||
@GetMapping("/WgzAppUserApplyForPayrollSettlementList")
|
// @GetMapping("/WgzAppUserApplyForPayrollSettlementList")
|
||||||
public TableDataInfo<WgzAppApplyForPayrollSettlementListRes> userApplyForPayrollSettlementList(@Validated WgzAppApplyForPayrollSettlementListReq req) {
|
public TableDataInfo<WgzAppApplyForPayrollSettlementListRes> userApplyForPayrollSettlementList(@Validated WgzAppApplyForPayrollSettlementListReq req) {
|
||||||
return iWgzPayCalculationService.userApplyForPayrollSettlementList(req);
|
return iWgzPayCalculationService.userApplyForPayrollSettlementList(req);
|
||||||
}
|
}
|
||||||
@ -493,8 +505,7 @@
|
|||||||
*/
|
*/
|
||||||
@ApiOperation("【首页】【项目进行中|已完成项目】 申请工资结算(详情)")
|
@ApiOperation("【首页】【项目进行中|已完成项目】 申请工资结算(详情)")
|
||||||
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userApplyForPayrollSettlementDetails')")
|
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userApplyForPayrollSettlementDetails')")
|
||||||
@RepeatSubmit
|
@GetMapping("/WgzAppUserApplyForPayrollSettlementDetails/{id}")
|
||||||
@PostMapping("/WgzAppUserApplyForPayrollSettlementDetails/{messageId}")
|
|
||||||
public AjaxResult<WgzAppUserApplyForPayrollSettlementDetails> userApplyForPayrollSettlementDetails(@NotNull(message = "主键ID不能为空") @PathVariable("id") Long id) {
|
public AjaxResult<WgzAppUserApplyForPayrollSettlementDetails> userApplyForPayrollSettlementDetails(@NotNull(message = "主键ID不能为空") @PathVariable("id") Long id) {
|
||||||
return AjaxResult.success(iWgzPayCalculationService.userApplyForPayrollSettlementDetails(id));
|
return AjaxResult.success(iWgzPayCalculationService.userApplyForPayrollSettlementDetails(id));
|
||||||
}
|
}
|
||||||
|
@ -368,7 +368,7 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
|
|||||||
int insert = baseMapper.insert(bgtProjectRecruitApply);
|
int insert = baseMapper.insert(bgtProjectRecruitApply);
|
||||||
//4、发送消息
|
//4、发送消息
|
||||||
if (insert > 0) {
|
if (insert > 0) {
|
||||||
SysDictData typeOfWork = dictTypeService.selectDictDataByTypeAndData("type_of_work", byId.getTypeOfWork());
|
SysDictData typeOfWork = dictTypeService.selectDictDataByTypeAndData("type_of_work", appById.getTypeOfWork());
|
||||||
Map<String, String> mp = new HashMap<>();
|
Map<String, String> mp = new HashMap<>();
|
||||||
mp.put("projectName", appById.getRecruitName());
|
mp.put("projectName", appById.getRecruitName());
|
||||||
mp.put("userName", byId.getUsername());
|
mp.put("userName", byId.getUsername());
|
||||||
@ -634,9 +634,9 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
|
|||||||
BgtProjectRecruitApply apply = new BgtProjectRecruitApply();
|
BgtProjectRecruitApply apply = new BgtProjectRecruitApply();
|
||||||
apply.setId(req.getRecruitApplyId());
|
apply.setId(req.getRecruitApplyId());
|
||||||
apply.setStatus(req.getStatus());
|
apply.setStatus(req.getStatus());
|
||||||
if (req.getStatus().equals("3")){
|
// if (req.getStatus().equals("3")){
|
||||||
apply.setStatus("5");
|
// apply.setStatus("5");
|
||||||
}
|
// }
|
||||||
int up = baseMapper.updateById(apply);
|
int up = baseMapper.updateById(apply);
|
||||||
if (up == 0) {
|
if (up == 0) {
|
||||||
throw new RuntimeException("修改招工申请信息失败!");
|
throw new RuntimeException("修改招工申请信息失败!");
|
||||||
|
@ -138,7 +138,8 @@ public class AnnexServiceImpl extends ServicePlusImpl<AnnexMapper, Annex> implem
|
|||||||
Annex annex = baseMapper.selectById(id);
|
Annex annex = baseMapper.selectById(id);
|
||||||
//2、删除对应的数据,并删除相对应的资源
|
//2、删除对应的数据,并删除相对应的资源
|
||||||
if (baseMapper.deleteById(id)>0){
|
if (baseMapper.deleteById(id)>0){
|
||||||
boolean b = fileDeletionService.deleteFileByPath(annex.getAnnexUrl());
|
String s = annex.getAnnexUrl().replaceAll("/profile", "ruoyi/uploadPath");
|
||||||
|
boolean b = fileDeletionService.deleteFileByPath(s);
|
||||||
if(!b){
|
if(!b){
|
||||||
throw new RuntimeException("附件删除失败!");
|
throw new RuntimeException("附件删除失败!");
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ import lombok.Data;
|
|||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Min;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@ -14,6 +15,9 @@ import java.io.Serializable;
|
|||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@ApiModel("申请工资结算(列表)请求对象")
|
@ApiModel("申请工资结算(列表)请求对象")
|
||||||
public class WgzAppApplyForPayrollSettlementListReq extends PageReq {
|
public class WgzAppApplyForPayrollSettlementListReq extends PageReq {
|
||||||
@ApiModelProperty("0申请中 1已结算 2未通过 3未结算(申请中+未通过)")
|
@ApiModelProperty(value = "用户id",hidden = true)
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
@ApiModelProperty("0申请中 1已通过 2未通过 3全部")
|
||||||
private String auditorType;
|
private String auditorType;
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,10 @@ public class WgzAppDailyRecordReq extends PageReq {
|
|||||||
@ApiModelProperty(value = "0正常 1补卡 2全部 ")
|
@ApiModelProperty(value = "0正常 1补卡 2全部 ")
|
||||||
private String types;
|
private String types;
|
||||||
|
|
||||||
@ApiModelProperty(value = "日期(格式:年-月-日)")
|
@ApiModelProperty(value = "日期(格式:年-月-日),不填查全部")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
private LocalDate rq;
|
private LocalDate rq;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "招工ID,不填查全部")
|
||||||
|
private Long recruitId;
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,13 @@ package com.ruoyi.wgz.bo.req;
|
|||||||
|
|
||||||
import com.ruoyi.common.bo.PageReq;
|
import com.ruoyi.common.bo.PageReq;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@ -13,4 +17,13 @@ import lombok.experimental.Accessors;
|
|||||||
@ApiModel("请假·历史请假记录请求对象")
|
@ApiModel("请假·历史请假记录请求对象")
|
||||||
public class WgzAppLeaveHistoryListPageReq extends PageReq {
|
public class WgzAppLeaveHistoryListPageReq extends PageReq {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "当前用户ID",hidden = true)
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "招工ID,不填查全部")
|
||||||
|
private Long recruitId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "日期(格式:年-月-日),不填查全部")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private LocalDate rq;
|
||||||
}
|
}
|
||||||
|
@ -74,6 +74,7 @@ public class WgzAppRealNameAuthenticationReq implements Serializable {
|
|||||||
// private List<Annex> annex;
|
// private List<Annex> annex;
|
||||||
|
|
||||||
@ApiModelProperty("工种,多个逗号分隔")
|
@ApiModelProperty("工种,多个逗号分隔")
|
||||||
|
@NotBlank(message = "工种不能为空")
|
||||||
private String typeOfWork;
|
private String typeOfWork;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,9 @@ public class WgzAppUnderwayRes implements Serializable {
|
|||||||
@ApiModelProperty("项目ID")
|
@ApiModelProperty("项目ID")
|
||||||
private Long projectId;
|
private Long projectId;
|
||||||
|
|
||||||
|
@ApiModelProperty("招工申请ID")
|
||||||
|
private Long recruitApplyId;
|
||||||
|
|
||||||
@ApiModelProperty("招工名称")
|
@ApiModelProperty("招工名称")
|
||||||
private String recruitName;
|
private String recruitName;
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ public class WgzApplyForPayrollSettlementAddRes implements Serializable {
|
|||||||
private Integer num;
|
private Integer num;
|
||||||
|
|
||||||
@ApiModelProperty("总的金额")
|
@ApiModelProperty("总的金额")
|
||||||
private BigDecimal TotalAmount;
|
private BigDecimal totalAmount;
|
||||||
|
|
||||||
//---------
|
//---------
|
||||||
//---------
|
//---------
|
||||||
|
@ -28,7 +28,7 @@ public interface WgzLeaveMapper extends BaseMapperPlus<WgzLeave> {
|
|||||||
* @param page 分页对象
|
* @param page 分页对象
|
||||||
* @return 分页查询结果
|
* @return 分页查询结果
|
||||||
*/
|
*/
|
||||||
Page<WgzAppLeaveHistoryListPageRes> userLeaveHistoryListPage(@Param("page") Page<WgzAppLeaveHistoryListPageReq> page);
|
Page<WgzAppLeaveHistoryListPageRes> userLeaveHistoryListPage(@Param("page") Page<WgzAppLeaveHistoryListPageReq> page,@Param("req") WgzAppLeaveHistoryListPageReq req);
|
||||||
|
|
||||||
|
|
||||||
@Select("SELECT\n" +
|
@Select("SELECT\n" +
|
||||||
|
@ -19,7 +19,7 @@ import org.apache.ibatis.annotations.Param;
|
|||||||
// 如使需切换数据源 请勿使用缓存 会造成数据不一致现象
|
// 如使需切换数据源 请勿使用缓存 会造成数据不一致现象
|
||||||
@CacheNamespace(implementation = MybatisPlusRedisCache.class, eviction = MybatisPlusRedisCache.class)
|
@CacheNamespace(implementation = MybatisPlusRedisCache.class, eviction = MybatisPlusRedisCache.class)
|
||||||
public interface WgzPayCalculationMapper extends BaseMapperPlus<WgzPayCalculation> {
|
public interface WgzPayCalculationMapper extends BaseMapperPlus<WgzPayCalculation> {
|
||||||
Page<WgzAppApplyForPayrollSettlementListRes> userApplyForPayrollSettlementList (@Param("page") Page<WgzAppApplyForPayrollSettlementListReq> page);
|
Page<WgzAppApplyForPayrollSettlementListRes> userApplyForPayrollSettlementList (@Param("page") Page<WgzAppApplyForPayrollSettlementListReq> page,@Param("req") WgzAppApplyForPayrollSettlementListReq req);
|
||||||
|
|
||||||
Page<WgzAppApplyForPayrollSettlementListRes> appQueryPageList (@Param("page") Page<BgtPayCalculationListDTO> page, @Param("dto") BgtPayCalculationListDTO dto);
|
Page<WgzAppApplyForPayrollSettlementListRes> appQueryPageList (@Param("page") Page<BgtPayCalculationListDTO> page, @Param("dto") BgtPayCalculationListDTO dto);
|
||||||
}
|
}
|
||||||
|
@ -225,10 +225,11 @@ public class WgzLeaveServiceImpl extends ServicePlusImpl<WgzLeaveMapper, WgzLeav
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TableDataInfo<WgzAppLeaveHistoryListPageRes> userLeaveHistoryListPage(WgzAppLeaveHistoryListPageReq req) {
|
public TableDataInfo<WgzAppLeaveHistoryListPageRes> userLeaveHistoryListPage(WgzAppLeaveHistoryListPageReq req) {
|
||||||
|
req.setUserId(SecurityUtils.getAppUserId());
|
||||||
Page<WgzAppLeaveHistoryListPageReq> queryDTOPage = new Page<>();
|
Page<WgzAppLeaveHistoryListPageReq> queryDTOPage = new Page<>();
|
||||||
queryDTOPage.setCurrent(req.getPageNum());
|
queryDTOPage.setCurrent(req.getPageNum());
|
||||||
queryDTOPage.setSize(req.getPageSize());
|
queryDTOPage.setSize(req.getPageSize());
|
||||||
return PageUtils.buildDataInfo(baseMapper.userLeaveHistoryListPage(queryDTOPage));
|
return PageUtils.buildDataInfo(baseMapper.userLeaveHistoryListPage(queryDTOPage,req));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -3,6 +3,7 @@ package com.ruoyi.wgz.service.impl;
|
|||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.ruoyi.bgt.domain.BgtProjectRecruit;
|
||||||
import com.ruoyi.bgt.domain.BgtProjectRecruitApply;
|
import com.ruoyi.bgt.domain.BgtProjectRecruitApply;
|
||||||
import com.ruoyi.bgt.mapper.BgtProjectRecruitMapper;
|
import com.ruoyi.bgt.mapper.BgtProjectRecruitMapper;
|
||||||
import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService;
|
import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService;
|
||||||
@ -36,12 +37,11 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|||||||
import com.ruoyi.wgz.bo.WgzMessageQueryBo;
|
import com.ruoyi.wgz.bo.WgzMessageQueryBo;
|
||||||
import com.ruoyi.wgz.mapper.WgzMessageMapper;
|
import com.ruoyi.wgz.mapper.WgzMessageMapper;
|
||||||
import com.ruoyi.wgz.service.IWgzMessageService;
|
import com.ruoyi.wgz.service.IWgzMessageService;
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 消息Service业务层处理
|
* 消息Service业务层处理
|
||||||
*
|
*
|
||||||
@ -69,6 +69,9 @@ public class WgzMessageServiceImpl extends ServicePlusImpl<WgzMessageMapper, Wgz
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IBgtProjectRecruitApplyService iBgtProjectRecruitApplyService;
|
private IBgtProjectRecruitApplyService iBgtProjectRecruitApplyService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IBgtProjectRecruitService iBgtProjectRecruitService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WgzMessage queryById(Long id){
|
public WgzMessage queryById(Long id){
|
||||||
return getById(id);
|
return getById(id);
|
||||||
@ -147,13 +150,16 @@ public class WgzMessageServiceImpl extends ServicePlusImpl<WgzMessageMapper, Wgz
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WgzAppMessageTypeStatisticsRes userMessageTypeStatistics(Long id) {
|
public WgzAppMessageTypeStatisticsRes userMessageTypeStatistics(Long id) {
|
||||||
|
Long appUserId = SecurityUtils.getAppUserId();
|
||||||
|
BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId);
|
||||||
|
BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getRecruitId());
|
||||||
|
|
||||||
WgzAppMessageTypeStatisticsRes res = new WgzAppMessageTypeStatisticsRes();
|
WgzAppMessageTypeStatisticsRes res = new WgzAppMessageTypeStatisticsRes();
|
||||||
Map<String, Integer> mp = new HashMap<>();
|
Map<String, Integer> mp = new HashMap<>();
|
||||||
// List<WgzAppMessageTypeStatisticsTwo> list = new ArrayList<>();
|
|
||||||
//1、获取字典类型
|
//1、获取字典类型
|
||||||
List<SysDictData> data = dictTypeService.selectDictDataByType("message_large_type");
|
List<SysDictData> data = dictTypeService.selectDictDataByType("message_large_type");
|
||||||
for (SysDictData datum : data) {
|
for (SysDictData datum : data) {
|
||||||
//2、统计数据
|
//1-2、统计数据
|
||||||
LambdaQueryWrapper<WgzMessage> wp = new LambdaQueryWrapper<WgzMessage>().
|
LambdaQueryWrapper<WgzMessage> wp = new LambdaQueryWrapper<WgzMessage>().
|
||||||
eq(WgzMessage::getRecipientId, id).
|
eq(WgzMessage::getRecipientId, id).
|
||||||
eq(WgzMessage::getRecipientType, "1").
|
eq(WgzMessage::getRecipientType, "1").
|
||||||
@ -161,7 +167,17 @@ public class WgzMessageServiceImpl extends ServicePlusImpl<WgzMessageMapper, Wgz
|
|||||||
eq(WgzMessage::getMessageLargeType, datum.getDictValue());
|
eq(WgzMessage::getMessageLargeType, datum.getDictValue());
|
||||||
mp.put(datum.getDictValue(),baseMapper.selectCount(wp));
|
mp.put(datum.getDictValue(),baseMapper.selectCount(wp));
|
||||||
}
|
}
|
||||||
return res.setMp(mp);
|
//2、单独获取待办中的消息
|
||||||
|
Integer daiBanCount = baseMapper.selectCount(
|
||||||
|
new LambdaQueryWrapper<WgzMessage>().
|
||||||
|
eq(WgzMessage::getSenderType, USERTYPE_BGT).
|
||||||
|
eq(WgzMessage::getSenderId, appById.getUserId()).
|
||||||
|
eq(WgzMessage::getRecipientType, USERTYPE_WGZ).
|
||||||
|
eq(WgzMessage::getRecipientId, appUserId).
|
||||||
|
eq(WgzMessage::getIsOperation, "1")
|
||||||
|
);
|
||||||
|
mp.put("daiban",daiBanCount);
|
||||||
|
return res.setMp(mp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -172,6 +188,10 @@ public class WgzMessageServiceImpl extends ServicePlusImpl<WgzMessageMapper, Wgz
|
|||||||
Page<WgzAppGetMessageListReq> queryDTOPage = new Page<>();
|
Page<WgzAppGetMessageListReq> queryDTOPage = new Page<>();
|
||||||
queryDTOPage.setCurrent(req.getPageNum());
|
queryDTOPage.setCurrent(req.getPageNum());
|
||||||
queryDTOPage.setSize(req.getPageSize());
|
queryDTOPage.setSize(req.getPageSize());
|
||||||
|
//0、待办的查询
|
||||||
|
if (req.getLargeType().equals("daiban")){
|
||||||
|
|
||||||
|
}
|
||||||
//1、分页查询出所有的小类型,然后循环查询小类型对应标题数据
|
//1、分页查询出所有的小类型,然后循环查询小类型对应标题数据
|
||||||
if(req.getLargeType() !=null && req.getLargeType().equals("3") && req.getSmallType()==null){
|
if(req.getLargeType() !=null && req.getLargeType().equals("3") && req.getSmallType()==null){
|
||||||
Page<WgzAppGetMessageListRes> pe = baseMapper.pagingQueryTheMessageList(queryDTOPage, req);
|
Page<WgzAppGetMessageListRes> pe = baseMapper.pagingQueryTheMessageList(queryDTOPage, req);
|
||||||
|
@ -179,7 +179,7 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
|||||||
//1、获取当前人
|
//1、获取当前人
|
||||||
SysUser user = SecurityUtils.getLoginUser().getUser();
|
SysUser user = SecurityUtils.getLoginUser().getUser();
|
||||||
BgtProjectRecruitApply recruitApply = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(user.getUserId());
|
BgtProjectRecruitApply recruitApply = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(user.getUserId());
|
||||||
BgtProjectRecruit recruit = iBgtProjectRecruitService.getAppById(recruitApply.getId());
|
BgtProjectRecruit recruit = iBgtProjectRecruitService.getAppById(recruitApply.getRecruitId());
|
||||||
//2、查看当前申请结算的天数是否大于剩余天数
|
//2、查看当前申请结算的天数是否大于剩余天数
|
||||||
LambdaQueryWrapper<WgzAttendance> attWra = new LambdaQueryWrapper<WgzAttendance>().
|
LambdaQueryWrapper<WgzAttendance> attWra = new LambdaQueryWrapper<WgzAttendance>().
|
||||||
eq(WgzAttendance::getUserId, user.getUserId()).
|
eq(WgzAttendance::getUserId, user.getUserId()).
|
||||||
@ -219,13 +219,15 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
|||||||
if (!save) {
|
if (!save) {
|
||||||
throw new RuntimeException("结算新增失败!");
|
throw new RuntimeException("结算新增失败!");
|
||||||
}
|
}
|
||||||
|
List<WgzPayCalculationFiles> payCalculation = req.getPayCalculation();
|
||||||
req.getPayCalculation().forEach(data -> {
|
if(payCalculation!=null){
|
||||||
data.setCalculationId(wgzPayCalculation.getId());
|
req.getPayCalculation().forEach(data -> {
|
||||||
});
|
data.setCalculationId(wgzPayCalculation.getId());
|
||||||
boolean fjSave = iWgzPayCalculationFilesService.saveBatch(req.getPayCalculation());
|
});
|
||||||
if (!fjSave) {
|
boolean fjSave = iWgzPayCalculationFilesService.saveBatch(req.getPayCalculation());
|
||||||
throw new RuntimeException("附件新增失败!");
|
if (!fjSave) {
|
||||||
|
throw new RuntimeException("附件新增失败!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//5、将修改标识符的数据存放到中间表
|
//5、将修改标识符的数据存放到中间表
|
||||||
@ -354,10 +356,13 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TableDataInfo<WgzAppApplyForPayrollSettlementListRes> userApplyForPayrollSettlementList(WgzAppApplyForPayrollSettlementListReq req) {
|
public TableDataInfo<WgzAppApplyForPayrollSettlementListRes> userApplyForPayrollSettlementList(WgzAppApplyForPayrollSettlementListReq req) {
|
||||||
|
//1、获取当前人
|
||||||
|
Long appUserId = SecurityUtils.getAppUserId();
|
||||||
|
req.setUserId(appUserId);
|
||||||
Page<WgzAppApplyForPayrollSettlementListReq> pe = new Page<>();
|
Page<WgzAppApplyForPayrollSettlementListReq> pe = new Page<>();
|
||||||
pe.setCurrent(req.getPageNum());
|
pe.setCurrent(req.getPageNum());
|
||||||
pe.setSize(req.getPageSize());
|
pe.setSize(req.getPageSize());
|
||||||
return PageUtils.buildDataInfo(baseMapper.userApplyForPayrollSettlementList(pe));
|
return PageUtils.buildDataInfo(baseMapper.userApplyForPayrollSettlementList(pe,req));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -206,7 +206,15 @@ public class WgzUserServiceImpl extends ServicePlusImpl<WgzUserMapper, WgzUser>
|
|||||||
if(!ValidUtil.isValidBankCard(req.getCardNo())){
|
if(!ValidUtil.isValidBankCard(req.getCardNo())){
|
||||||
throw new RuntimeException("请检查银行卡!");
|
throw new RuntimeException("请检查银行卡!");
|
||||||
}
|
}
|
||||||
|
//0、查询当前用户是否实名了,如若已实名就无法再次实名
|
||||||
|
Integer count = baseMapper.selectCount(
|
||||||
|
new LambdaQueryWrapper<WgzUser>()
|
||||||
|
.eq(WgzUser::getUserId, req.getUserId())
|
||||||
|
.isNotNull(WgzUser::getIdentityCard)
|
||||||
|
);
|
||||||
|
if (count>0){
|
||||||
|
throw new RuntimeException("当前用户已实名!");
|
||||||
|
}
|
||||||
//1、对指定用户进行实名认证
|
//1、对指定用户进行实名认证
|
||||||
WgzUser user = new WgzUser();
|
WgzUser user = new WgzUser();
|
||||||
BeanUtils.copyProperties(req, user);
|
BeanUtils.copyProperties(req, user);
|
||||||
|
@ -143,6 +143,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
SELECT
|
SELECT
|
||||||
a.entry_time,
|
a.entry_time,
|
||||||
a.leave_time,
|
a.leave_time,
|
||||||
|
a.id as recruitApplyId,
|
||||||
b.*,
|
b.*,
|
||||||
c.task_name,
|
c.task_name,
|
||||||
c.task_address,
|
c.task_address,
|
||||||
|
@ -50,6 +50,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="req.types != 2">
|
<if test="req.types != 2">
|
||||||
a.status = #{req.types} and
|
a.status = #{req.types} and
|
||||||
</if>
|
</if>
|
||||||
|
<if test="req.recruitId != null and req.recruitId != 0">
|
||||||
|
a.recruit_id = #{req.recruitId} and
|
||||||
|
</if>
|
||||||
a.del_flag = 0
|
a.del_flag = 0
|
||||||
ORDER BY
|
ORDER BY
|
||||||
a.id DESC
|
a.id DESC
|
||||||
|
@ -34,8 +34,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
FROM
|
FROM
|
||||||
wgz_leave a
|
wgz_leave a
|
||||||
LEFT JOIN bgt_user b ON (a.auditor_user_id = b.user_id and b.del_flag = 0)
|
LEFT JOIN bgt_user b ON (a.auditor_user_id = b.user_id and b.del_flag = 0)
|
||||||
WHERE
|
<where>
|
||||||
a.del_flag = 0
|
a.user_id = #{req.userId}
|
||||||
|
and a.del_flag = 0
|
||||||
|
<if test="req.recruitId != null and req.recruitId != 0">
|
||||||
|
and a.recruit_id = #{req.recruitId}
|
||||||
|
</if>
|
||||||
|
<if test="req.rq != null">
|
||||||
|
and DATE_FORMAT(a.create_time,'%Y-%m-%d') = #{req.rq}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
ORDER BY
|
ORDER BY
|
||||||
a.id DESC
|
a.id DESC
|
||||||
</select>
|
</select>
|
||||||
|
@ -118,19 +118,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
wgz_pay_calculation_files f ON w.id = f.calculation_id
|
wgz_pay_calculation_files f ON w.id = f.calculation_id
|
||||||
<where>
|
<where>
|
||||||
<choose>
|
<choose>
|
||||||
<when test="page.auditorType != null and taskId != '' and auditorType == '0'">
|
<when test="req.auditorType != null and req.auditorType == 0">
|
||||||
AND w.auditor_type in ('0', '1') and
|
AND w.auditor_type in ('0', '1') and
|
||||||
</when>
|
</when>
|
||||||
<when test="page.auditorType != null and taskId != '' and auditorType == '1'">
|
<when test="req.auditorType != null and req.auditorType == 1">
|
||||||
AND w.auditor_type = '2' and
|
AND w.auditor_type = '2' and
|
||||||
</when>
|
</when>
|
||||||
<when test="page.auditorType != null and taskId != '' and auditorType == '2'">
|
<when test="req.auditorType != null and req.auditorType == 2">
|
||||||
AND w.auditor_type = '3' and
|
AND w.auditor_type = '3' and
|
||||||
</when>
|
</when>
|
||||||
<when test="page.auditorType != null and taskId != '' and auditorType == '2'">
|
|
||||||
AND w.auditor_type = in ('0', '1','3') and
|
|
||||||
</when>
|
|
||||||
</choose>
|
</choose>
|
||||||
|
w.user_id = #{req.userId} and
|
||||||
w.del_flag = 0
|
w.del_flag = 0
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
Reference in New Issue
Block a user