3.19优化

This commit is contained in:
2025-03-19 16:29:27 +08:00
parent cecbe4252e
commit 5f42460bee
13 changed files with 203 additions and 28 deletions

View File

@ -13,18 +13,21 @@
import com.ruoyi.common.core.domain.entity.SysDictData;
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.utils.SecurityUtils;
import com.ruoyi.system.service.ISysDictTypeService;
import com.ruoyi.wgz.bo.res.*;
import com.ruoyi.wgz.bo.rests.WgzAppGetTestPaperThree;
import com.ruoyi.wgz.bo.rests.WgzAppGetTestPaperTwo;
import com.ruoyi.wgz.bo.rests.WgzAppUserAllRecruitmentTwo;
import com.ruoyi.wgz.bo.rests.WgzAutonymAnnex;
import com.ruoyi.wgz.bo.req.*;
import com.ruoyi.wgz.domain.WgzPayCalculation;
import com.ruoyi.wgz.domain.WgzQuestionsConfiguration;
import com.ruoyi.wgz.service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.BeanUtils;
@ -567,9 +570,9 @@
if (req.getType()==1){
BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId);
recruitId = by.getRecruitId();
if (!appUserId.equals(recruitId)){
throw new RuntimeException("当前用户不是该招工的申请人");
}
// if (!appUserId.equals(recruitId)){
// throw new RuntimeException("当前用户不是该招工的申请人");
// }
} else {
recruitId = 0L;
}
@ -609,6 +612,39 @@
return AjaxResult.success(wgzAppAttachmentAcquisitionRes.setWgzAutonymAnnex(resData));
}
/**
* 【通用】删除附件
*/
@ApiOperation("【通用】新增附件")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userDeleteAttachmentAdd')")
@PostMapping("/WgzUserDeleteAttachmentAdd")
public AjaxResult<Boolean> userDeleteAttachmentAdd(@Validated @RequestBody WgzAppUserDeleteAttachmentAdd req) {
//获取当前用户
Long appUserId = SecurityUtils.getAppUserId();
List<Annex> annex = req.getAnnex();
List<AnnexDTO> annexDTOS = new ArrayList<>();
for (Annex data : annex) {
AnnexDTO dto = new AnnexDTO();
BeanUtils.copyProperties(data, dto);
dto.setUserId(appUserId).setUserType(WGZ);
annexDTOS.add(dto);
}
return AjaxResult.success(iAnnexService.insertBatchLc(annexDTOS));
}
/**
* 【通用】删除附件
*/
@ApiOperation("【通用】删除附件")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userDeleteAttachment')")
@DeleteMapping("/WgzUserDeleteAttachment/{attachmentId}")
public AjaxResult<Boolean> userDeleteAttachment(@NotEmpty(message = "主键不能为空") @PathVariable Long attachmentId) {
return AjaxResult.success(iAnnexService.deleteByIds(attachmentId));
}
/**
* 【我的】【请假】 获取上下班时间
* 【考勤打卡】【打卡】 获取上下班时间
@ -659,6 +695,18 @@
);
}
/**
* 【获取当前用户的所有招工】-有退场且进行中的项目|招工
*/
@ApiOperation("【通用】获取当前用户的所有招工")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userAllRecruitment')")
@GetMapping("/WgzAppUserAllRecruitment")
public AjaxResult<WgzAppUserAllRecruitmentRes> userAllRecruitment() {
WgzAppUserAllRecruitmentRes res = new WgzAppUserAllRecruitmentRes();
res.setList(iBgtProjectRecruitApplyService.userAllRecruitment());
return AjaxResult.success(res);
}
/**
@ -684,15 +732,7 @@
return section;
}
// /**
// * 【我的】【实名认证】实名认证·删除附件
// */
// @ApiOperation("APP务工者-实名认证·删除附件")
// //@PreAuthorize("@ss.hasPermi('wgzApp:user:userDeleteAttachment')")
// @DeleteMapping("/WgzUserDeleteAttachment/{attachmentId}")
// public AjaxResult<Boolean> userDeleteAttachment(@NotEmpty(message = "主键不能为空") @PathVariable Long attachmentId) {
// return AjaxResult.success(iAnnexService.deleteByIds(attachmentId));
// }
// /**