点击流程状态查看流程详情(平台件)
This commit is contained in:
+13
@@ -561,4 +561,17 @@ public class PhoneProjectLawsInventoryEOController extends JeroController<Projec
|
||||
public Result<?> finalizationVerify(@RequestParam Map<String,Object> params){
|
||||
return this.projectLawsInventoryEOService.finalizationVerify(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 点击流程状态查看流程详情(平台件)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "点击流程状态查看流程详情(平台件)")
|
||||
@ApiOperation(value="点击流程状态查看流程详情(平台件)", notes="点击流程状态查看流程详情(平台件)")
|
||||
@GetMapping(value = "/queryPlatformList")
|
||||
public Result<List<ProjectLawsInventoryEO>> queryPlatformList(String lawsInventoryId,String flowFlag,String cut) {
|
||||
List<ProjectLawsInventoryEO> list = projectLawsInventoryEOService.queryPlatformList(lawsInventoryId,flowFlag,cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.itextpdf.text.DocumentException;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.common.system.vo.DictModel;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
||||
@@ -323,4 +322,6 @@ public interface IProjectLawsInventoryEOService extends IService<ProjectLawsInve
|
||||
*/
|
||||
void replacementUser(JSONObject json);
|
||||
int checkUserRole(String projectLibraryId, String currentUserId, String lawsInventoryId);
|
||||
|
||||
List<ProjectLawsInventoryEO> queryPlatformList(String lawsInventoryId,String flowFlag,String cut);
|
||||
}
|
||||
|
||||
+128
@@ -12176,4 +12176,132 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<ProjectLawsInventoryEO> queryPlatformList(String lawsInventoryId,String flowFlag,String cut){
|
||||
if(StringUtils.isBlank(lawsInventoryId) || StringUtils.isBlank(flowFlag)){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<SysDictItem> sysDictItems = this.sysDictItemServiceImpl.selectItemsAll();
|
||||
List<SysCategory> categoryList = sysCategoryService.list();
|
||||
|
||||
LambdaQueryWrapper<LawsInventoryPlatformEO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(LawsInventoryPlatformEO::getLawsInventoryId,lawsInventoryId);
|
||||
List<LawsInventoryPlatformEO> lawsInventoryPlatformEOS = lawsInventoryPlatformEOService.list(wrapper);
|
||||
List<String> idList = new ArrayList<>();
|
||||
List<ProjectLawsInventoryEO> projectLawsInventoryEOList = new ArrayList<>();
|
||||
if(ObjectUtils.isNotEmpty(lawsInventoryPlatformEOS)){
|
||||
idList = lawsInventoryPlatformEOS.stream().map(LawsInventoryPlatformEO::getPlatformLawsInventoryId).collect(Collectors.toList());
|
||||
projectLawsInventoryEOList = this.listByIds(idList);
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
List<String> collect1 = projectLawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getDesignDutyId).distinct().collect(Collectors.toList());
|
||||
List<String> collect2 = projectLawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getVerifyDutyId).distinct().collect(Collectors.toList());
|
||||
if(ObjectUtils.isNotEmpty(collect1)){
|
||||
userIdList.addAll(collect1);
|
||||
}
|
||||
if(ObjectUtils.isNotEmpty(collect2)){
|
||||
userIdList.addAll(collect2);
|
||||
}
|
||||
|
||||
List<String> fileIdList = new ArrayList<>();
|
||||
List<String> collect3 = projectLawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getDesignDeliverableTemplate).distinct().collect(Collectors.toList());
|
||||
List<String> collect4 = projectLawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getVerifyDeliverableTemplate).distinct().collect(Collectors.toList());
|
||||
if(ObjectUtils.isNotEmpty(collect3)){
|
||||
fileIdList.addAll(collect3);
|
||||
}
|
||||
if(ObjectUtils.isNotEmpty(collect4)){
|
||||
fileIdList.addAll(collect4);
|
||||
}
|
||||
|
||||
List<SysUser> sysUsers = new ArrayList<>();
|
||||
if (CollectionUtils.isNotEmpty(userIdList)) {
|
||||
userIdList = userIdList.stream().distinct().collect(Collectors.toList());
|
||||
QueryWrapper<SysUser> sysUserQueryWrapper = new QueryWrapper<>();
|
||||
sysUserQueryWrapper.lambda().in(SysUser::getId, userIdList);
|
||||
sysUsers = sysUserMapper.selectList(sysUserQueryWrapper);
|
||||
}
|
||||
|
||||
List<OSSFile> fileInfos = new ArrayList<>();
|
||||
if (fileIdList.size() != 0) {
|
||||
fileInfos = iOSSFileService.getFileInfos(StringUtils.join(fileIdList, ","));
|
||||
}
|
||||
|
||||
for (ProjectLawsInventoryEO projectLawsInventoryEO : projectLawsInventoryEOList) {
|
||||
//流程状态
|
||||
String flowStatus = "";
|
||||
if("design".equals(flowFlag)){
|
||||
flowStatus = projectLawsInventoryEO.getDesignFlowStatus();
|
||||
}else{
|
||||
flowStatus = projectLawsInventoryEO.getVerifyFlowStatus();
|
||||
}
|
||||
if (StringUtils.isNotEmpty(flowStatus)) {
|
||||
String designFlowStatusName = ComplianceFlowStatusEnum.getTextByValue(flowStatus, cut);
|
||||
projectLawsInventoryEO.setDesignFlowStatusName(designFlowStatusName);
|
||||
}
|
||||
|
||||
//发起人.
|
||||
// if("design".equals(flowFlag)){
|
||||
// projectLawsInventoryEO.get
|
||||
// }else{
|
||||
//
|
||||
// }
|
||||
//责任人
|
||||
String dutyId = "";
|
||||
if("design".equals(flowFlag)){
|
||||
dutyId = projectLawsInventoryEO.getDesignDutyId();
|
||||
}else{
|
||||
dutyId = projectLawsInventoryEO.getVerifyDutyId();
|
||||
}
|
||||
if (StringUtils.isNotEmpty(dutyId)) {
|
||||
String finalDutyId = dutyId;
|
||||
String designDutyName = sysUsers.stream().filter(e -> finalDutyId.equals(e.getId())).
|
||||
map(SysUser::getUsername).collect(Collectors.joining(","));
|
||||
projectLawsInventoryEO.setDesignDutyIdName(designDutyName);
|
||||
} else {
|
||||
projectLawsInventoryEO.setDesignDutyIdName("");
|
||||
}
|
||||
|
||||
//交付物模板
|
||||
String deliverableTemplate = "";
|
||||
if("design".equals(flowFlag)){
|
||||
deliverableTemplate = projectLawsInventoryEO.getDesignDeliverableTemplate();
|
||||
}else{
|
||||
deliverableTemplate = projectLawsInventoryEO.getVerifyDeliverableTemplate();
|
||||
}
|
||||
if (StringUtils.isNotBlank(projectLawsInventoryEO.getDesignDeliverableTemplate())) {
|
||||
String fileName = this.editService.getFileName(projectLawsInventoryEO, fileInfos, projectLawsInventoryEO.getDesignDeliverableTemplate());
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(fileName)) {
|
||||
projectLawsInventoryEO.setDesignDeliverableTemplateName(fileName);
|
||||
}
|
||||
}
|
||||
//交付物类型
|
||||
String deliverableType = "";
|
||||
if("design".equals(flowFlag)){
|
||||
deliverableType = projectLawsInventoryEO.getDesignDeliverableType();
|
||||
}else{
|
||||
deliverableType = projectLawsInventoryEO.getVerifyDeliverableType();
|
||||
}
|
||||
if (StringUtils.isNotBlank(deliverableType)) {
|
||||
List<String> designDeliverableTypeList = Arrays.asList(deliverableType.split(","));
|
||||
String name = getTreeName(cut, categoryList, designDeliverableTypeList);
|
||||
projectLawsInventoryEO.setDesignDeliverableTypeName(name);
|
||||
}
|
||||
|
||||
//责任领域
|
||||
String dutyTerritory = projectLawsInventoryEO.getDutyTerritory();
|
||||
if (StringUtils.isNotEmpty(dutyTerritory)) {
|
||||
String dutyTerritory_dictText = disposeShowDictItemValue(sysDictItems, dutyTerritory, cut, ProjectInventoryFieldEnum.DUTY_TERRITORY.getValue());
|
||||
projectLawsInventoryEO.setDutyTerritory_dictText(dutyTerritory_dictText);
|
||||
}
|
||||
//交付物说明
|
||||
String remark = "";
|
||||
if("design".equals(flowFlag)){
|
||||
remark = projectLawsInventoryEO.getDesignRemark();
|
||||
}else{
|
||||
remark = projectLawsInventoryEO.getVerifyRemark();
|
||||
}
|
||||
}
|
||||
}
|
||||
return projectLawsInventoryEOList;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user