|
|
@ -29,6 +29,7 @@ import com.epmet.constant.ParameterKeyConstant; |
|
|
|
import com.epmet.constant.ProjectConstant; |
|
|
|
import com.epmet.dao.ProjectDao; |
|
|
|
import com.epmet.dto.CustomerProjectParameterDTO; |
|
|
|
import com.epmet.dto.CustomerStaffDTO; |
|
|
|
import com.epmet.dto.IssueDTO; |
|
|
|
import com.epmet.dto.ProjectDTO; |
|
|
|
import com.epmet.dto.ProjectStaffDTO; |
|
|
@ -38,6 +39,7 @@ import com.epmet.entity.ProjectEntity; |
|
|
|
import com.epmet.entity.ProjectProcessEntity; |
|
|
|
import com.epmet.entity.ProjectStaffEntity; |
|
|
|
import com.epmet.feign.CommonFeignClient; |
|
|
|
import com.epmet.feign.EpmetUserFeignClient; |
|
|
|
import com.epmet.feign.GovOrgFeignClient; |
|
|
|
import com.epmet.redis.ProjectRedis; |
|
|
|
import com.epmet.service.CustomerProjectParameterService; |
|
|
@ -73,6 +75,8 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit |
|
|
|
@Autowired |
|
|
|
private ProjectProcessService projectProcessService; |
|
|
|
@Autowired |
|
|
|
private EpmetUserFeignClient epmetUserFeignClient; |
|
|
|
@Autowired |
|
|
|
private GovOrgFeignClient govOrgFeignClient; |
|
|
|
|
|
|
|
private final static String ONE_DAY = "<1"; |
|
|
@ -206,7 +210,7 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit |
|
|
|
int pageIndex = (fromDTO.getPageNo() - NumConstant.ONE) * fromDTO.getPageSize(); |
|
|
|
fromDTO.setPageNo(pageIndex); |
|
|
|
|
|
|
|
List<ProjectDTO> projectList = baseDao.selectCreatedList(fromDTO); |
|
|
|
List<ProjectDTO> projectList = baseDao.selectInvolvedList(fromDTO); |
|
|
|
//获取客户定制的可滞留天数
|
|
|
|
Integer finalDays = getDays(fromDTO); |
|
|
|
projectList.forEach(p -> { |
|
|
@ -352,9 +356,12 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit |
|
|
|
* @date 2020/5/12 16:20 |
|
|
|
*/ |
|
|
|
private Integer getDays(ProjectListFromDTO fromDTO) { |
|
|
|
CustomerStaffDTO customerStaffDTO = new CustomerStaffDTO(); |
|
|
|
customerStaffDTO.setUserId(fromDTO.getUserId()); |
|
|
|
CustomerStaffDTO staffDTO = epmetUserFeignClient.getCustomerStaffInfoByUserId(customerStaffDTO).getData(); |
|
|
|
//获取客户定制的可滞留天数
|
|
|
|
CustomerProjectParameterDTO dto = new CustomerProjectParameterDTO(); |
|
|
|
dto.setCustomerId(fromDTO.getCustomerId()); |
|
|
|
dto.setCustomerId(staffDTO.getCustomerId()); |
|
|
|
dto.setParameterKey(ParameterKeyConstant.DETENTION_DAYS); |
|
|
|
String value = parameterService.getParameterValueByKey(dto); |
|
|
|
Integer days = 5; |
|
|
@ -380,6 +387,7 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit |
|
|
|
workDayFormDTO.setId(projectDTO.getId()); |
|
|
|
workDayFormDTO.setStartDate(format.format(projectDTO.getUpdatedTime())); |
|
|
|
workDayFormDTO.setEndDate(format.format(new Date())); |
|
|
|
list.add(workDayFormDTO); |
|
|
|
Result<List<WorkDayResultDTO>> detentionDays = commonFeignClient.detentionDays(list); |
|
|
|
return detentionDays.getData().get(0).getDetentionDays(); |
|
|
|
} |
|
|
|