优化
This commit is contained in:
@ -61,6 +61,12 @@ public class AppBgtProjectRecruitApplyController extends BaseController {
|
||||
return AjaxResult.success(iBgtProjectRecruitApplyService.appAllList(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("HTML务工者列表")
|
||||
@GetMapping("/htmlList")
|
||||
public AjaxResult<List<BgtProjectRecruitApplyVO>> htmlList(Long recruitId) {
|
||||
return AjaxResult.success(iBgtProjectRecruitApplyService.htmlList(recruitId));
|
||||
}
|
||||
|
||||
@ApiOperation("App务工者个人详情")
|
||||
@GetMapping()
|
||||
public AjaxResult<WgzAppPersonalBasicInformationRes> userPersonalBasicInformation(@Validated WgzAppPersonalBasicInformationReq req) {
|
||||
@ -100,6 +106,14 @@ public class AppBgtProjectRecruitApplyController extends BaseController {
|
||||
return AjaxResult.success(iBgtProjectRecruitApplyService.check(id));
|
||||
}
|
||||
|
||||
@ApiOperation("App务工者退场判定")
|
||||
@GetMapping("/quitCheck/{id}")
|
||||
public AjaxResult<Boolean> quitCheck(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(iBgtProjectRecruitApplyService.quitCheck(id));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ApiOperation("App务工者退场")
|
||||
@Log(title = "App务工者退场", businessType = BusinessType.UPDATE)
|
||||
@ -110,6 +124,9 @@ public class AppBgtProjectRecruitApplyController extends BaseController {
|
||||
return AjaxResult.success(iBgtProjectRecruitApplyService.quit(id));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ApiOperation("取消务工者选择")
|
||||
@Log(title = "取消务工者选择", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit
|
||||
|
@ -62,6 +62,11 @@ public class AppBgtProjectRecruitController extends BaseController {
|
||||
return AjaxResult.success(iBgtProjectRecruitService.appQueryList());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "HTML招工列表",notes = "1.查询包工头招工列表 状态为通过(1)和报名(0)")
|
||||
@GetMapping("/htmlList")
|
||||
public AjaxResult<List<BgtProjectRecruit>> htmlList(Long userId) {
|
||||
return AjaxResult.success(iBgtProjectRecruitService.htmlList(userId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取包工头招工详细信息
|
||||
|
@ -144,10 +144,13 @@ public class TemplateDownloadController {
|
||||
|
||||
public static void zipFolder(File folder, File zipFile) throws IOException {
|
||||
try (ZipOutputStream zipOut = new ZipOutputStream(new FileOutputStream(zipFile))) {
|
||||
// 添加根文件夹
|
||||
zipOut.putNextEntry(new ZipEntry(folder.getName() + "/"));
|
||||
zipOut.closeEntry();
|
||||
zipFilesInFolder(folder, folder.getName(), zipOut);
|
||||
// 去掉添加根文件夹这一步
|
||||
File[] subFiles = folder.listFiles();
|
||||
if (subFiles != null) {
|
||||
for (File subFile : subFiles) {
|
||||
zipFilesInFolder(subFile, subFile.getName(), zipOut);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,8 @@ public enum RecruitStatus
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getCode()
|
||||
{
|
||||
return code;
|
||||
|
@ -102,7 +102,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
|
||||
.authorizeRequests()
|
||||
// 对于登录login 验证码captchaImage 允许匿名访问
|
||||
.antMatchers("/login", "/app/login", "/captchaImage","/demo/tress/all").anonymous()
|
||||
.antMatchers("/app/login","/wgz/app/wgzRegister").permitAll()
|
||||
.antMatchers("/app/login","/wgz/app/wgzRegister","/app/bgt/recruit/htmlList","/app/bgt/apply/htmlList").permitAll()
|
||||
.antMatchers(
|
||||
HttpMethod.GET,
|
||||
"/*.html",
|
||||
|
@ -4,15 +4,11 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("总体考勤情况-工资结算-基础信息")
|
||||
public class BgtPayCalculationDetailBaseVO {
|
||||
|
||||
@ -58,4 +54,7 @@ public class BgtPayCalculationDetailBaseVO {
|
||||
@ApiModelProperty("务工者Id")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("是否能结算")
|
||||
private Boolean isPay;
|
||||
}
|
||||
|
@ -31,6 +31,8 @@ public interface BgtProjectRecruitApplyMapper extends BaseMapperPlus<BgtProjectR
|
||||
|
||||
List<BgtProjectRecruitApplyVO> appQueryList(@Param("dto") BgtProjectRecruitApplyQueryDTO dto);
|
||||
|
||||
List<BgtProjectRecruitApplyVO> htmlList(@Param("recruitId") Long recruitId);
|
||||
|
||||
// Page<BgtProjectRecruitApplyVO> dayAttendanceList(@Param("page")Page<BgtAttendanceDayDTO> queryDTOPage,@Param("dto") BgtAttendanceDayDTO dto);
|
||||
|
||||
// 总体考勤情况-人员出勤情况
|
||||
|
@ -81,6 +81,8 @@ public interface IBgtProjectRecruitApplyService extends IServicePlus<BgtProjectR
|
||||
*/
|
||||
List<BgtProjectRecruitApplyVO> appAllList(BgtProjectRecruitApplyQueryDTO dto);
|
||||
|
||||
List<BgtProjectRecruitApplyVO> htmlList(Long recruitId);
|
||||
|
||||
/**
|
||||
* LC-APP相关
|
||||
* =================================================================================================================
|
||||
@ -118,6 +120,11 @@ public interface IBgtProjectRecruitApplyService extends IServicePlus<BgtProjectR
|
||||
*/
|
||||
Boolean check(Long id);
|
||||
|
||||
/**
|
||||
* 退场检查
|
||||
*/
|
||||
Boolean quitCheck(Long id);
|
||||
|
||||
/**
|
||||
* 指定日期所有人员出勤情况
|
||||
*/
|
||||
|
@ -76,6 +76,11 @@ public interface IBgtProjectRecruitService extends IServicePlus<BgtProjectRecrui
|
||||
*/
|
||||
List<BgtProjectRecruit> appQueryList();
|
||||
|
||||
/**
|
||||
* 查询我发布的所有招工
|
||||
*/
|
||||
List<BgtProjectRecruit> htmlList(Long userId);
|
||||
|
||||
/**
|
||||
* 查询单个
|
||||
*/
|
||||
|
@ -212,6 +212,12 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
|
||||
return baseMapper.appQueryList(dto);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<BgtProjectRecruitApplyVO> htmlList(Long recruitId) {
|
||||
return baseMapper.htmlList(recruitId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgzAppUserAllRecruitmentTwo> userAllRecruitment(Long userId,String type) {
|
||||
List<WgzAppUserAllRecruitmentTwo> res = baseMapper.userAllRecruitment(userId,type);
|
||||
@ -312,6 +318,17 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
|
||||
return annexService.checkEntry(recruitApply.getUserId(), recruitApply.getRecruitId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean quitCheck(Long id) {
|
||||
BgtProjectRecruitApply recruitApply = getById(id);
|
||||
//检查是否还有申请未审批
|
||||
Boolean reissueacard = wgzReissueacardService.isThereAnyApplicationsInReview(recruitApply.getRecruitId(), recruitApply.getUserId());
|
||||
Boolean leave = wgzLeaveService.isThereAnyApplicationsInReview(recruitApply.getRecruitId(), recruitApply.getUserId());
|
||||
Boolean dailyClock = dailyClockService.isThereAnyApplicationsInReview(recruitApply.getRecruitId(), recruitApply.getUserId());
|
||||
Boolean payCalculation = payCalculationService.isThereAnyApplicationsInReview(recruitApply.getRecruitId(), recruitApply.getUserId());
|
||||
return reissueacard || leave || dailyClock || payCalculation;
|
||||
}
|
||||
|
||||
/**
|
||||
* LC-APP相关
|
||||
* =================================================================================================================
|
||||
@ -454,13 +471,8 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
|
||||
recruit.setStatus(RecruitStatus.PROGRESS.getCode());
|
||||
iBgtProjectRecruitService.updateById(recruit);
|
||||
}
|
||||
//检查是否还有申请未审批
|
||||
Boolean reissueacard = wgzReissueacardService.isThereAnyApplicationsInReview(recruitApply.getRecruitId(), recruitApply.getUserId());
|
||||
Boolean leave = wgzLeaveService.isThereAnyApplicationsInReview(recruitApply.getRecruitId(), recruitApply.getUserId());
|
||||
Boolean dailyClock = dailyClockService.isThereAnyApplicationsInReview(recruitApply.getRecruitId(), recruitApply.getUserId());
|
||||
Boolean payCalculation = payCalculationService.isThereAnyApplicationsInReview(recruitApply.getRecruitId(), recruitApply.getUserId());
|
||||
|
||||
if(reissueacard || leave || dailyClock || payCalculation){
|
||||
if(quitCheck(id)){
|
||||
throw new BaseException("当前用户还有未审批的申请,无法退场!");
|
||||
}
|
||||
|
||||
|
@ -196,12 +196,28 @@ public class BgtProjectRecruitServiceImpl extends ServicePlusImpl<BgtProjectRecr
|
||||
.orderByDesc(BgtProjectRecruit::getCreateTime));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BgtProjectRecruit> htmlList(Long userId) {
|
||||
return list(Wrappers.<BgtProjectRecruit>lambdaQuery()
|
||||
.eq(BgtProjectRecruit::getUserId, userId)
|
||||
.ne(BgtProjectRecruit::getStatus, RecruitStatus.OVERDUE.getCode())
|
||||
.orderByDesc(BgtProjectRecruit::getCreateTime));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BgtProjectRecruitDetailVO appQueryById(Long id) {
|
||||
BgtProjectRecruit recruit = getById(id);
|
||||
BgtProjectRecruitDetailVO vo = BeanUtil.toBean(recruit, BgtProjectRecruitDetailVO.class);
|
||||
FbsProjectTask task = fbsProjectTaskService.getById(vo.getTaskId());
|
||||
vo.setTaskName(task.getTaskName());
|
||||
|
||||
// int count = bgtProjectRecruitApplyService.count(Wrappers.<BgtProjectRecruitApply>lambdaQuery()
|
||||
// .eq(BgtProjectRecruitApply::getRecruitId, vo.getId())
|
||||
// .in(BgtProjectRecruitApply::getStatus, RecruitApplyStatus.getFull()));
|
||||
// if(count >= vo.getRecruitStaffNum()){
|
||||
// vo.setStatus(RecruitStatus.FULL.getCode());
|
||||
// }
|
||||
|
||||
return vo;
|
||||
}
|
||||
|
||||
|
@ -510,8 +510,11 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
||||
addSum = addSum.add(multiply);
|
||||
}
|
||||
vo.setPayAmount(addSum);
|
||||
|
||||
vo.setResidueAmount(vo.getAllAmount().subtract(vo.getPayAmount()));
|
||||
|
||||
//未结算天数
|
||||
Integer days = attendanceService.attendanceDetail(userId, recruitId, null);
|
||||
vo.setIsPay(days>0);
|
||||
return vo;
|
||||
}
|
||||
|
||||
@ -604,17 +607,9 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
||||
vo.setWorkingState(recruitApply.getStatus().equals("5")?"1":"2");
|
||||
|
||||
//出勤天数
|
||||
//总天数
|
||||
//未结算天数
|
||||
Integer i = attendanceService.attendanceDetail(userId, recruitId, null);
|
||||
//已结算天数
|
||||
List<WgzPayCalculation> list = list(Wrappers.<WgzPayCalculation>lambdaQuery()
|
||||
.eq(WgzPayCalculation::getUserId, userId)
|
||||
.eq(WgzPayCalculation::getRecruitId, recruitId)
|
||||
.eq(WgzPayCalculation::getAuditorType, AuditStatus.PASS.getCode()));
|
||||
if(CollectionUtil.isNotEmpty(list)) {
|
||||
int sum = list.stream().mapToInt(WgzPayCalculation::getNum).sum();
|
||||
i = i - sum;
|
||||
}
|
||||
|
||||
if(i<=0){
|
||||
throw new BaseException("工资已全部结算完毕");
|
||||
}
|
||||
|
@ -64,6 +64,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
order by bpra.create_time desc,bpra.status asc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="htmlList" resultType="com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyVO">
|
||||
select
|
||||
wu.user_id,
|
||||
wu.username
|
||||
from bgt_project_recruit_apply bpra
|
||||
left join wgz_user wu on bpra.user_id = wu.user_id
|
||||
where bpra.recruit_id = #{recruitId}
|
||||
order by bpra.create_time desc,bpra.status asc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="dayAttendanceList" resultType="com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyVO">
|
||||
select bpra.id,
|
||||
bpra.entry_time,
|
||||
|
Reference in New Issue
Block a user