|
|
|
@ -2,6 +2,8 @@ package com.hyp.web.controller.manager;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
|
|
import cn.hutool.core.convert.Convert;
|
|
|
|
|
import com.hyp.common.core.domain.AjaxResult;
|
|
|
|
|
import com.hyp.common.core.domain.entity.SysDictData;
|
|
|
|
|
import com.hyp.common.core.domain.entity.SysUser;
|
|
|
|
|
import com.hyp.common.core.domain.model.LoginUser;
|
|
|
|
|
import com.hyp.common.enums.ApplyStatusEnum;
|
|
|
|
@ -14,11 +16,9 @@ import com.hyp.system.domain.dto.ApplyInfoListDTO;
|
|
|
|
|
import com.hyp.system.domain.dto.ApplyInfoListSaveDTO;
|
|
|
|
|
import com.hyp.system.domain.vo.ApplyInfoListVO;
|
|
|
|
|
import com.hyp.system.domain.vo.FileRelationVO;
|
|
|
|
|
import com.hyp.system.service.ISysDictDataService;
|
|
|
|
|
import com.hyp.system.service.RewApplyInfoListService;
|
|
|
|
|
import com.hyp.system.service.RewFileRelationService;
|
|
|
|
|
import com.hyp.system.service.RewScoreInfoService;
|
|
|
|
|
import com.hyp.system.service.*;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
@ -51,6 +51,11 @@ public class ApplyInfoListManager {
|
|
|
|
|
@Resource
|
|
|
|
|
private RewFileRelationService relationService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private ISysDictTypeService dictTypeService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* 奖项类型
|
|
|
|
@ -209,6 +214,30 @@ public class ApplyInfoListManager {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* 文件上传校验
|
|
|
|
|
* @param applyId
|
|
|
|
|
* @param applyType
|
|
|
|
|
* @return com.hyp.common.core.domain.AjaxResult
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
public AjaxResult checkUploadFile(String applyId,String applyType){
|
|
|
|
|
List<SysDictData> list = dictTypeService.selectDictDataByType(applyType);
|
|
|
|
|
if(CollUtil.isNotEmpty(list)){
|
|
|
|
|
for(SysDictData sysDictData : list){
|
|
|
|
|
List<RewFileRelation> fileRelations = relationService.lambdaQuery()
|
|
|
|
|
.eq(RewFileRelation::getApplyId, applyId)
|
|
|
|
|
.eq(RewFileRelation::getFileCode, sysDictData.getDictValue()).list();
|
|
|
|
|
if(CollUtil.isEmpty(fileRelations)){
|
|
|
|
|
return AjaxResult.error("《"+sysDictData.getDictLabel()+"》"+"材料存在未上传情况,请检查");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return AjaxResult.success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|