优化
This commit is contained in:
@ -4,6 +4,7 @@ import com.ruoyi.bgt.domain.BgtProjectRecruitApply;
|
||||
import com.ruoyi.bgt.domain.dto.BgtProjectRecruitApplyConsentDTO;
|
||||
import com.ruoyi.bgt.domain.dto.BgtProjectRecruitApplyQueryDTO;
|
||||
import com.ruoyi.bgt.domain.dto.BgtScoreDTO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyHtmlVO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyVO;
|
||||
import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
@ -12,6 +13,7 @@ import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.wgz.bo.req.WgzAppPersonalBasicInformationReq;
|
||||
import com.ruoyi.wgz.bo.res.WgzAppPersonalBasicInformationRes;
|
||||
import com.ruoyi.wgz.service.IWgzUserService;
|
||||
@ -63,7 +65,7 @@ public class AppBgtProjectRecruitApplyController extends BaseController {
|
||||
|
||||
@ApiOperation("HTML务工者列表")
|
||||
@GetMapping("/htmlList")
|
||||
public AjaxResult<List<BgtProjectRecruitApplyVO>> htmlList(Long recruitId,Boolean isNotUpload) {
|
||||
public AjaxResult<List<BgtProjectRecruitApplyHtmlVO>> htmlList(Long recruitId, Boolean isNotUpload) {
|
||||
return AjaxResult.success(iBgtProjectRecruitApplyService.htmlList(recruitId,isNotUpload));
|
||||
}
|
||||
|
||||
@ -141,6 +143,7 @@ public class AppBgtProjectRecruitApplyController extends BaseController {
|
||||
@RepeatSubmit
|
||||
@PutMapping("/score")
|
||||
public AjaxResult<Boolean> score(@Validated @RequestBody BgtScoreDTO dto) {
|
||||
dto.setScoreBy(SecurityUtils.getAppUserId());
|
||||
return AjaxResult.success(iBgtProjectRecruitApplyService.score(dto));
|
||||
}
|
||||
|
||||
|
@ -14,6 +14,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.FbsUser;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.exception.BaseException;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.fbs.domain.FbsProjectTask;
|
||||
import com.ruoyi.fbs.service.IFbsProjectTaskService;
|
||||
@ -77,6 +78,9 @@ public class AppBgtProjectTaskProgressController extends BaseController {
|
||||
|
||||
FbsProjectTask task = iFbsProjectTaskService.getById(dto.getTaskId());
|
||||
FbsUser fbsUser = iFbsUserService.selectUserByUserId(task.getCreateId());
|
||||
if (fbsUser == null) {
|
||||
throw new BaseException("获取不到分包商信息");
|
||||
}
|
||||
BgtProjectTaskProgress bgtProjectTaskProgress = BeanUtil.copyProperties(dto, BgtProjectTaskProgress.class);
|
||||
bgtProjectTaskProgress.setReviewerName(fbsUser.getUsername());
|
||||
bgtProjectTaskProgress.setReviewerId(fbsUser.getUserId());
|
||||
|
@ -28,7 +28,10 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.ruoyi.common.constant.Constants.BGT;
|
||||
import static com.ruoyi.common.constant.Constants.WGZ;
|
||||
@ -150,4 +153,24 @@ public class AnnexController extends BaseController {
|
||||
return AjaxResult.success(iAnnexService.list(wrapper));
|
||||
}
|
||||
|
||||
@ApiOperation("HTML查看务工者附件")
|
||||
@GetMapping("/getHtmlWgzAnnex")
|
||||
public AjaxResult<Map<String, List<Annex>>> getHtmlWgzAnnex(Long wgzUserId,Long recruitApplyId) {
|
||||
LambdaQueryWrapper<Annex> wrapper = Wrappers.<Annex>lambdaQuery()
|
||||
.eq(Annex::getUserId, wgzUserId)
|
||||
.eq(Annex::getUserType, WGZ)
|
||||
.eq(Annex::getRecruitApplyId, recruitApplyId)
|
||||
.in(Annex::getAnnexType, Arrays.asList("1","2"));
|
||||
List<Annex> list = iAnnexService.list(wrapper);
|
||||
Map<String, List<Annex>> stringListhashMap = new HashMap<>();
|
||||
//劳动合同
|
||||
List<Annex> contracts = list.stream().filter(vo -> "1".equals(vo.getAnnexType())).collect(Collectors.toList());
|
||||
stringListhashMap.put("1",contracts);
|
||||
//保单
|
||||
List<Annex> policyList = list.stream().filter(vo -> "2".equals(vo.getAnnexType())).collect(Collectors.toList());
|
||||
stringListhashMap.put("2",policyList);
|
||||
return AjaxResult.success(stringListhashMap);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -56,9 +56,9 @@ public class UploadZipController {
|
||||
private final IBgtUserService bgtUserService;
|
||||
private final IBgtProjectRecruitApplyService recruitApplyService;
|
||||
|
||||
private static final String TEMP_DIR = "ruoyi/uploadPath/temporaryZip";
|
||||
private static final String SAVE_DIR = "ruoyi/uploadPath/recruit";
|
||||
private static final String RECORD_DIR = "ruoyi/uploadPath/record";
|
||||
private static final String TEMP_DIR = "ruoyi/uploadPath/temporaryZip"; //临时解压
|
||||
private static final String SAVE_DIR = "ruoyi/uploadPath/recruit"; //保存目录
|
||||
private static final String RECORD_DIR = "ruoyi/uploadPath/record"; //记录目录
|
||||
|
||||
@ApiOperation("上传压缩文件")
|
||||
@PostMapping("/upload-zip")
|
||||
@ -233,7 +233,7 @@ public class UploadZipController {
|
||||
System.out.println("第二层文件夹名称: " + secondLevelFolderName);
|
||||
if (secondLevelFile.isDirectory()) {
|
||||
File[] thirdLevelFiles = secondLevelFile.listFiles();
|
||||
if (thirdLevelFiles != null) {
|
||||
if (thirdLevelFiles != null && thirdLevelFiles.length > 0) {
|
||||
// 删除数据库里的附件
|
||||
if ("保险".equals(secondLevelFolderName)) {
|
||||
insurance.add(wgzUser.getUserId());
|
||||
@ -271,11 +271,24 @@ public class UploadZipController {
|
||||
if (firstLevelFiles != null) {
|
||||
for (File firstLevelFile : firstLevelFiles) {
|
||||
if (firstLevelFile.isDirectory()) {
|
||||
String secondLevelName = firstLevelFile.getName();
|
||||
File secondLevelDestDir = new File(firstLevelDestDir, secondLevelName);
|
||||
if (secondLevelDestDir.exists()) {
|
||||
// 删除和解压出来的二级目录同名字的目录
|
||||
deleteFolder(secondLevelDestDir);
|
||||
|
||||
String firstLevelName = firstLevelFile.getName(); //解压目录
|
||||
File secondLevelDestDir = new File(firstLevelDestDir, firstLevelName); //保存目录
|
||||
|
||||
File[] secondLevelFiles = firstLevelFile.listFiles();
|
||||
if (secondLevelFiles != null) {
|
||||
for (File secondLevelfile : secondLevelFiles) {
|
||||
if (secondLevelfile.isDirectory()) {
|
||||
String secondLevelName = secondLevelfile.getName(); //解压目录
|
||||
File thirdLevelDestDir = new File(secondLevelDestDir, secondLevelName); //保存目录
|
||||
|
||||
File[] thirdLevelFiles = secondLevelfile.listFiles();
|
||||
if(thirdLevelFiles != null && thirdLevelFiles.length > 0){
|
||||
deleteFolder(thirdLevelDestDir);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
moveFilesRecursively(firstLevelFile, firstLevelDestDir, annexList, recruitId,username);
|
||||
}
|
||||
|
@ -105,5 +105,4 @@ public class AppFbsWageApplicationController extends BaseController {
|
||||
return AjaxResult.success(iBgtWageApplicationService.fbsAudit(bo));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,72 @@
|
||||
package com.ruoyi.web.controller.zbf;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.zbf.domain.ZbfMessage;
|
||||
import com.ruoyi.zbf.domain.dto.ZbfMessageDetailDTO;
|
||||
import com.ruoyi.zbf.domain.dto.ZbfMessageMyListDTO;
|
||||
import com.ruoyi.zbf.domain.vo.ZbfMessageCountVO;
|
||||
import com.ruoyi.zbf.domain.vo.ZbfMessageDetailVO;
|
||||
import com.ruoyi.zbf.domain.vo.ZbfMessageVO;
|
||||
import com.ruoyi.zbf.service.IZbfMessageService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 消息Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-31
|
||||
*/
|
||||
@Api(value = "App总包方消息控制器", tags = {"App总包方"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@RequestMapping("/app/zbf/message")
|
||||
public class AppZbfMessageController extends BaseController {
|
||||
|
||||
private final IZbfMessageService iZbfMessageService;
|
||||
|
||||
/**
|
||||
* 查询消息列表
|
||||
*/
|
||||
@ApiOperation("总包方未读消息统计")
|
||||
@GetMapping("/countUnread")
|
||||
public AjaxResult<ZbfMessageCountVO> count() {
|
||||
return AjaxResult.success(iZbfMessageService.countUnread());
|
||||
}
|
||||
|
||||
@ApiOperation("总包方消息列表")
|
||||
@GetMapping("/myList")
|
||||
public TableDataInfo<ZbfMessageVO> myList(ZbfMessageMyListDTO dto) {
|
||||
return iZbfMessageService.queryMyPageList(dto);
|
||||
}
|
||||
|
||||
@ApiOperation("总包方消息详情列表")
|
||||
@GetMapping("/detailList")
|
||||
public TableDataInfo<ZbfMessageDetailVO> otherList(ZbfMessageDetailDTO dto) {
|
||||
return iZbfMessageService.queryDetailPageList(dto);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("总包方消息已读")
|
||||
@PutMapping("/read/{id}")
|
||||
public AjaxResult<Boolean> read(@PathVariable(value = "id") Long id) {
|
||||
ZbfMessage zbfMessage = new ZbfMessage();
|
||||
zbfMessage.setId(id);
|
||||
zbfMessage.setReadStatus("1");
|
||||
return AjaxResult.success(iZbfMessageService.updateById(zbfMessage));
|
||||
}
|
||||
|
||||
@ApiOperation("总包方消息已操作")
|
||||
@PutMapping("/operation/{id}")
|
||||
public AjaxResult<Boolean> operation(@PathVariable(value = "id") Long id) {
|
||||
ZbfMessage zbfMessage = new ZbfMessage();
|
||||
zbfMessage.setId(id);
|
||||
zbfMessage.setIsOperation("2");
|
||||
return AjaxResult.success(iZbfMessageService.updateById(zbfMessage));
|
||||
}
|
||||
}
|
@ -7,8 +7,8 @@ import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.fbs.domain.FbsWageApplication;
|
||||
import com.ruoyi.fbs.domain.dto.FbsWageAuditDTO;
|
||||
import com.ruoyi.fbs.service.IFbsWageApplicationService;
|
||||
import com.ruoyi.zbf.domain.dto.ZbfWageAuditDTO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@ -43,7 +43,7 @@ public class AppZbfWageApplicationController extends BaseController {
|
||||
@Log(title = "总包方审核分包商工资申请", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit
|
||||
@PutMapping("/audit")
|
||||
public AjaxResult<Boolean> audit(@Validated @RequestBody FbsWageAuditDTO dto) {
|
||||
public AjaxResult<Boolean> audit(@Validated @RequestBody ZbfWageAuditDTO dto) {
|
||||
FbsWageApplication bo = iFbsWageApplicationService.getById(dto.getId());
|
||||
BeanUtil.copyProperties(dto, bo);
|
||||
return AjaxResult.success(iFbsWageApplicationService.zbfAudit(bo));
|
||||
|
Reference in New Issue
Block a user