Browse Source

Merge remote-tracking branch 'origin/dev_screen_data_2.0' into dev_temp

master
zxc 5 years ago
parent
commit
eac37ca7c1
  1. 28
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/fact/FactIndexController.java
  2. 4
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java
  3. 8
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenUserController.java
  4. 30
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/fact/impl/FactIndexServiceImpl.java
  5. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java
  6. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java
  7. 69
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java
  8. 17
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java
  9. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java
  10. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java
  11. 9
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml

28
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/fact/FactIndexController.java

@ -28,78 +28,78 @@ public class FactIndexController {
private FactIndexService factIndexService;
/**
* @param tokenDTO
* @param formDTO
* @Description 能力指数
* @author sun
*/
@PostMapping("index/ablityindex")
public Result<List<AblityIndexResultDTO>> ablityIndex(@LoginUser TokenDto tokenDTO, @RequestBody AblityIndexFormDTO formDTO) {
public Result<List<AblityIndexResultDTO>> ablityIndex(@RequestBody AblityIndexFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, AblityIndexFormDTO.AddUserInternalGroup.class);
return new Result<List<AblityIndexResultDTO>>().ok(factIndexService.ablityIndex(formDTO));
}
/**
* @param tokenDTO
* @param formDTO
* @Description 按月份查询各项能力分数
* @author sun
*/
@PostMapping("index/scorelist")
public Result<List<ScoreListResultDTO>> scoreList(@LoginUser TokenDto tokenDTO, @RequestBody ScoreListFormDTO formDTO) {
public Result<List<ScoreListResultDTO>> scoreList(@RequestBody ScoreListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, ScoreListFormDTO.AddUserInternalGroup.class);
return new Result<List<ScoreListResultDTO>>().ok(factIndexService.scoreList(formDTO));
}
/**
* @param tokenDTO
* @param formDTO
* @Description 按月份查询各项能力最近12个月得分
* @author sun
*/
@PostMapping("index/monthscorelist")
public Result<List<MonthScoreListResultDTO>> monthScoreList(@LoginUser TokenDto tokenDTO, @RequestBody MonthScoreListFormDTO formDTO) {
public Result<List<MonthScoreListResultDTO>> monthScoreList(@RequestBody MonthScoreListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, MonthScoreListFormDTO.AddUserInternalGroup.class);
return new Result<List<MonthScoreListResultDTO>>().ok(factIndexService.monthScoreList(formDTO));
}
/**
* @param tokenDTO
* @param formDTO
* @Description 按月查询各项指标数据
* @author sun
*/
@PostMapping("index/ablitylist")
public Result<List<AblityListResultDTO>> ablityList(@LoginUser TokenDto tokenDTO, @RequestBody AblityListFormDTO formDTO) {
public Result<List<AblityListResultDTO>> ablityList(@RequestBody AblityListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, AblityListFormDTO.AddUserInternalGroup.class);
return new Result<List<AblityListResultDTO>>().ok(factIndexService.ablityList(formDTO));
}
/**
* @param tokenDTO
* @param formDTO
* @Description 按月查询各项指标最近12个月数据
* @author sun
*/
@PostMapping("index/monthablitylist")
public Result<List<MonthAblityListResultDTO>> monthAblityList(@LoginUser TokenDto tokenDTO, @RequestBody MonthAblityListFormDTO formDTO) {
public Result<List<MonthAblityListResultDTO>> monthAblityList(@RequestBody MonthAblityListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, MonthAblityListFormDTO.AddUserInternalGroup.class);
return new Result<List<MonthAblityListResultDTO>>().ok(factIndexService.monthAblityList(formDTO));
}
/**
* @param tokenDTO
* @param formDTO
* @Description 同级对比各项数据查询
* @author sun
*/
@PostMapping("index/peercomparison")
public Result<List<PeerComparisonResultDTO>> peerComparison(@LoginUser TokenDto tokenDTO, @RequestBody PeerComparisonFormDTO formDTO) {
public Result<List<PeerComparisonResultDTO>> peerComparison(@RequestBody PeerComparisonFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, PeerComparisonFormDTO.AddUserInternalGroup.class);
return new Result<List<PeerComparisonResultDTO>>().ok(factIndexService.peerComparison(formDTO));
}
/**
* @param tokenDTO
* @param formDTO
* @Description 是否根组织
* @author sun
*/
@PostMapping("index/rootagency")
public Result<RootAgencyResultDTO> rootAgency(@LoginUser TokenDto tokenDTO, @RequestBody RootAgencyFormDTO formDTO) {
public Result<RootAgencyResultDTO> rootAgency(@RequestBody RootAgencyFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, RootAgencyFormDTO.AddUserInternalGroup.class);
return new Result<RootAgencyResultDTO>().ok(factIndexService.rootAgency(formDTO));
}

4
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java

@ -103,12 +103,12 @@ public class IndexController {
}
/**
* @param tokenDTO
* @param formDTO
* @Description 组织月度指数得分
* @author sun
*/
@PostMapping("month/indexscore")
public Result<IndexScoreResultDTO> indexScore(@LoginUser TokenDto tokenDTO, @RequestBody IndexScoreFormDTO formDTO) {
public Result<IndexScoreResultDTO> indexScore(@RequestBody IndexScoreFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, IndexScoreFormDTO.AddUserInternalGroup.class);
return new Result<IndexScoreResultDTO>().ok(indexService.indexScore(formDTO));
}

8
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenUserController.java

@ -30,23 +30,23 @@ public class ScreenUserController {
private ScreenUserService screenUserService;
/**
* @param tokenDTO
* @param formDTO
* @Description 热心市民积分排行列表
* @author sun
*/
@PostMapping("userpointrank")
public Result<List<UserPointRankListResultDTO>> userPointRank(@LoginUser TokenDto tokenDTO, @RequestBody UserPointRankFormDTO formDTO) {
public Result<List<UserPointRankListResultDTO>> userPointRank(@RequestBody UserPointRankFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, UserPointRankFormDTO.AddUserInternalGroup.class);
return new Result<List<UserPointRankListResultDTO>>().ok(screenUserService.userPointRank(formDTO));
}
/**
* @param tokenDTO
* @param formDTO
* @Description 党员指标得分排行
* @author sun
*/
@PostMapping("partindexscroerank")
public Result<List<PartIndexScroeRankResultDTO>> partIndexScroeRank(@LoginUser TokenDto tokenDTO, @RequestBody PartIndexScroeRankFormDTO formDTO) {
public Result<List<PartIndexScroeRankResultDTO>> partIndexScroeRank(@RequestBody PartIndexScroeRankFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, PartIndexScroeRankFormDTO.AddUserInternalGroup.class);
return new Result<List<PartIndexScroeRankResultDTO>>().ok(screenUserService.partIndexScroeRank(formDTO));
}

30
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/fact/impl/FactIndexServiceImpl.java

@ -19,6 +19,7 @@ import java.text.NumberFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.regex.Pattern;
/**
* 数据改版api
@ -447,6 +448,9 @@ public class FactIndexServiceImpl implements FactIndexService {
* @author sun
*/
public String getDate(String newDate) {
if (!validDateEffecitive(newDate)) {
throw new RenException(String.format("monthId格式错误,monthId:%s", newDate));
}
String date = "";
SimpleDateFormat sdf = new SimpleDateFormat("yyyymm");
try {
@ -460,6 +464,32 @@ public class FactIndexServiceImpl implements FactIndexService {
return date;
}
/**
* @param newDate
* @Description 校验日期格式是否正确
* @author sun
*/
public boolean validDateEffecitive(String newDate) {
//yyyy-MM-dd格式
//String DATE_REGEX = "^([1-9]\\d{3}-)(([0]{0,1}[1-9]-)|([1][0-2]-))(([0-3]{0,1}[0-9]))$";
//yyyymm格式
String DATE_REGEX = "^([1-9]\\d{3})(([0]{0,1}[1-9])|([1][0-2]))$";
boolean matches = Pattern.matches(DATE_REGEX, newDate);
if (!matches) {
return matches;
}
SimpleDateFormat sdf = new SimpleDateFormat("yyyymm");
//设置日期格式转的严谨性
sdf.setLenient(false);
try {
sdf.parse(newDate);
} catch (ParseException e) {
e.printStackTrace();
return false;
}
return matches;
}
/**
* @param formDTO
* @Description 同级对比各项数据查询

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java

@ -94,4 +94,13 @@ public interface ProjectDao extends BaseDao<ProjectEntity> {
* @return java.util.List<com.epmet.dto.project.ProjectInfoDTO>
*/
List<ProjectDTO> selectProjectInfo(@Param("customerId") String customerId, @Param("date") String date);
/**
* 获取用户可滞留天数
* @author zhaoqifeng
* @date 2020/9/28 10:16
* @param customerId
* @return java.lang.String
*/
String selectParameterValueByKey(@Param("customerId") String customerId);
}

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java

@ -14,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@ -52,7 +53,7 @@ public class IndexOriginExtractServiceImpl implements IndexOriginExtractService
String monthId = formDTO.getMonthId();
String customerId = formDTO.getCustomerId();
if (StringUtils.isBlank(monthId)) {
monthId = DimIdGenerator.getDateDimId(DateUtils.addDateMonths(new Date(), -1));
monthId = LocalDate.now().minusMonths(NumConstant.ONE).toString().replace("-","").substring(NumConstant.ZERO,NumConstant.SIX);
}
List<String> customerIds = new ArrayList<>();
if (StringUtils.isNotBlank(customerId)) {

69
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java

@ -1,6 +1,7 @@
package com.epmet.service.evaluationindex.extract.todata.impl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result;
@ -71,6 +72,8 @@ public class ProjectExtractServiceImpl implements ProjectExtractService {
@Autowired
private FactOriginProjectOrgPeriodDailyDao factOriginProjectOrgPeriodDailyDao;
private final static String ONE_DAY = "<1";
@Override
public void saveOriginProjectDaily(ExtractOriginFormDTO extractOriginFormDTO) {
String dateString = extractOriginFormDTO.getDateId();
@ -80,7 +83,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService {
List<ProjectProcessEntity> closedList = projectProcessService.getClosedProjectList(customerId, dateString);
List<FactOriginProjectMainDailyDTO> pendingList = factOriginProjectMainDailyService.getPendingList(customerId);
List<FinishOrgDTO> finishOrgList = projectProcessService.getFinishOrg(customerId, dateString);
if (null != closedList && !closedList.isEmpty()) {
if (CollectionUtils.isEmpty(closedList)) {
List<FactOriginProjectMainDailyEntity> closeProjects =
pendingList.stream().flatMap(pending -> closedList.stream().filter(closed -> pending.getId().equals(closed.getProjectId())).map(process -> {
FactOriginProjectMainDailyEntity entity = new FactOriginProjectMainDailyEntity();
@ -92,9 +95,9 @@ public class ProjectExtractServiceImpl implements ProjectExtractService {
return entity;
})).collect(Collectors.toList());
if (null != finishOrgList && !finishOrgList.isEmpty()) {
if (CollectionUtils.isEmpty(finishOrgList)) {
closeProjects.forEach(close -> finishOrgList.stream().filter(finish -> close.getId().equals(finish.getProjectId())).forEach(dto -> {
String[] orgIds = dto.getPIdPath().split(":");
String[] orgIds = dto.getPIdPath().split(StrConstant.COLON);
if (orgIds.length > NumConstant.ONE) {
close.setFinishOrgIds(orgIds[orgIds.length - 1]);
} else {
@ -109,7 +112,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService {
}
//获取项目信息
List<ProjectDTO> projectList = projectService.getProjectInfo(customerId, dateString);
if (null != projectList && !projectList.isEmpty()) {
if (CollectionUtils.isEmpty(projectList)) {
//提取议题ID
List<String> issueIds = projectList.stream().map(ProjectDTO::getOriginId).collect(Collectors.toList());
//获取议题信息
@ -139,7 +142,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService {
entity.setCreatedTime(project.getCreatedTime());
entity.setUpdatedTime(project.getUpdatedTime());
entity.setPids(project.getOrgIdPath());
String[] pIds = project.getOrgIdPath().split(":");
String[] pIds = project.getOrgIdPath().split(StrConstant.COLON);
if (pIds.length > 1) {
entity.setPid(pIds[pIds.length - 2]);
} else if(pIds.length == 1){
@ -163,7 +166,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService {
entity.setIsParty(NumConstant.ONE_STR);
}));
list.forEach(entity -> finishOrgList.stream().filter(finish -> entity.getId().equals(finish.getProjectId())).forEach(dto -> {
String[] orgIds = dto.getPIdPath().split(":");
String[] orgIds = dto.getPIdPath().split(StrConstant.COLON);
if (orgIds.length > NumConstant.ONE) {
entity.setFinishOrgIds(orgIds[orgIds.length - 1]);
} else {
@ -179,7 +182,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService {
final List<FactOriginProjectMainDailyEntity> mainList = list;
//节点发起人
List<ProcessInfoDTO> processList = projectProcessService.getProcessListByCustomer(customerId, dateString);
if (null != processList && !processList.isEmpty()) {
if (CollectionUtils.isEmpty(processList)) {
List<FactOriginProjectLogDailyEntity> logList = processList.stream().map(process -> {
//获取日期相关维度
DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(process.getCreatedTime());
@ -204,15 +207,15 @@ public class ProjectExtractServiceImpl implements ProjectExtractService {
entity.setOrgId(process.getGridId());
entity.setPid(process.getAgencyId());
}else{
if(!process.getPids().contains(":")){
if(!process.getPids().contains(StrConstant.COLON)){
entity.setPids("");
entity.setPid(NumConstant.ZERO_STR);
}else{
String[] orgArray = process.getPids().split(":");
if(null != orgArray && orgArray.length > NumConstant.ONE){
String[] orgArray = process.getPids().split(StrConstant.COLON);
if(orgArray.length > NumConstant.ONE){
entity.setPid(orgArray[orgArray.length - NumConstant.TWO]);
String path = process.getPids().replaceAll(process.getAgencyId(),"");
if(path.endsWith(":")){
if(path.endsWith(StrConstant.COLON)){
path =path.substring(NumConstant.ZERO,path.length() - NumConstant.ONE);
}
entity.setPids(path);
@ -283,15 +286,15 @@ public class ProjectExtractServiceImpl implements ProjectExtractService {
entity.setOrgId(process.getGridId());
entity.setPid(process.getAgencyId());
}else{
if(!process.getPids().contains(":")){
if(!process.getPids().contains(StrConstant.COLON)){
entity.setPids("");
entity.setPid(NumConstant.ZERO_STR);
}else{
String[] orgArray = process.getPids().split(":");
if(null != orgArray && orgArray.length > NumConstant.ONE){
String[] orgArray = process.getPids().split(StrConstant.COLON);
if(orgArray.length > NumConstant.ONE){
entity.setPid(orgArray[orgArray.length - NumConstant.TWO]);
String path = process.getPids().replaceAll(process.getAgencyId(),"");
if(path.endsWith(":")){
if(path.endsWith(StrConstant.COLON)){
path =path.substring(NumConstant.ZERO,path.length() - NumConstant.ONE);
}
entity.setPids(path);
@ -322,7 +325,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService {
@Override
public void extractProjectPeriodData(ExtractOriginFormDTO param) {
int trace = factOriginProjectOrgPeriodDailyDao.selectIfExisted(param.getCustomerId());
Boolean isFirst = trace <= NumConstant.ZERO ? true : false;
Boolean isFirst = trace <= NumConstant.ZERO;
if (StringUtils.isBlank(param.getDateId())) {
Date yesterday = new Date(System.currentTimeMillis() - 1000 * 60 * 60 * 24);
SimpleDateFormat format = new SimpleDateFormat(DateUtils.DATE_PATTERN_YYYYMMDD);
@ -345,23 +348,23 @@ public class ProjectExtractServiceImpl implements ProjectExtractService {
}else{
dest.setOrgType("agency");
dest.setPids("");
String[] array = original.getOrgIdPath().split(":");
if(null == array || array.length <= NumConstant.ZERO){
String[] array = original.getOrgIdPath().split(StrConstant.COLON);
if(array.length <= NumConstant.ZERO){
dest.setPid(NumConstant.ZERO_STR);
}
if(array[NumConstant.ZERO] == original.getOrgId() && array.length == NumConstant.ONE){
if(array[NumConstant.ZERO].equals(original.getOrgId()) && array.length == NumConstant.ONE){
dest.setPid(NumConstant.ZERO_STR);
}
if(array.length > NumConstant.ONE && original.getOrgId() == array[array.length - NumConstant.ONE]){
if(array.length > NumConstant.ONE && original.getOrgId().equals(array[array.length - NumConstant.ONE])){
dest.setPid(array[array.length - NumConstant.TWO]);
dest.setPids(original.getOrgIdPath().replace(original.getOrgId(),""));
}
if(StringUtils.isNotBlank(dest.getPids())){
while(dest.getPids().endsWith(":")){
while(dest.getPids().endsWith(StrConstant.COLON)){
dest.setPids(dest.getPids().substring(NumConstant.ZERO,dest.getPids().length() - NumConstant.ONE));
}
while(dest.getPids().startsWith(":")){
dest.setPids(dest.getPids().replaceFirst(":",""));
while(dest.getPids().startsWith(StrConstant.COLON)){
dest.setPids(dest.getPids().replaceFirst(StrConstant.COLON,""));
}
}
dest.setPids(dest.getPids().replaceAll(" ",""));
@ -400,13 +403,29 @@ public class ProjectExtractServiceImpl implements ProjectExtractService {
list.add(workDayFormDTO);
Result<List<WorkDayResultDTO>> detentionDays = epmetCommonServiceOpenFeignClient.detentionDays(list);
String days = detentionDays.getData().get(NumConstant.ZERO).getDetentionDays();
if (("<1").equals(days)) {
result = 1;
if (ONE_DAY.equals(days)) {
result = NumConstant.ONE;
} else {
result = Integer.parseInt(days);
}
return result;
}
/**
* 客户配置的可滞留时间没有的话默认5天
* @author zhaoqifeng
* @date 2020/9/28 10:27
* @param customerId
* @return java.lang.Integer
*/
private Integer getDays(String customerId) {
String value = projectService.getParameterValueByKey(customerId);
Integer days = NumConstant.FIVE;
if (StringUtils.isNotBlank(value)) {
days = Integer.valueOf(value);
}
return days;
}
}

17
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java

@ -4,10 +4,7 @@ import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.dto.extract.form.ExtractOriginFormDTO;
import com.epmet.dto.extract.form.ExtractScreenFormDTO;
import com.epmet.service.evaluationindex.extract.toscreen.PartyBaseInfoService;
import com.epmet.service.evaluationindex.extract.toscreen.PioneerDataExtractService;
import com.epmet.service.evaluationindex.extract.toscreen.PublicPartExtractService;
import com.epmet.service.evaluationindex.extract.toscreen.ScreenExtractService;
import com.epmet.service.evaluationindex.extract.toscreen.*;
import com.epmet.service.stats.DimCustomerService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
@ -35,6 +32,10 @@ public class ScreenExtractServiceImpl implements ScreenExtractService {
private PioneerDataExtractService pioneerDataExtractService;
@Autowired
private PublicPartExtractService publicPartExtractService;
@Autowired
private OrgRankExtractService orgRankExtractService;
@Autowired
private GovernRankDataExtractService governRankDataExtractService;
/**
* @param extractOriginFormDTO
@ -124,5 +125,13 @@ public class ScreenExtractServiceImpl implements ScreenExtractService {
formDTO.setMonthId(monthId);
publicPartExtractService.extractTotalDataMonthly(formDTO);
//治理能力排行
governRankDataExtractService.extractGridData(customerId, monthId);
governRankDataExtractService.extractCommunityData(customerId, monthId);
governRankDataExtractService.extractStreetData(customerId, monthId);
//先进排行
orgRankExtractService.extractGridData(customerId, monthId);
orgRankExtractService.extractCommunityData(customerId, monthId);
orgRankExtractService.extractStreetData(customerId, monthId);
}
}

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java

@ -90,4 +90,13 @@ public interface ProjectService extends BaseService<ProjectEntity> {
* @return java.util.List<com.epmet.dto.project.ProjectInfoDTO>
*/
List<ProjectDTO> getProjectInfo(String customerId, String date);
/**
* 获取用户可滞留天数
* @author zhaoqifeng
* @date 2020/9/28 10:15
* @param customerId
* @return java.lang.String
*/
String getParameterValueByKey(String customerId);
}

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java

@ -77,4 +77,9 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
return baseDao.selectProjectInfo(customerId, date);
}
@Override
public String getParameterValueByKey(String customerId) {
return baseDao.selectParameterValueByKey(customerId);
}
}

9
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml

@ -96,5 +96,14 @@
AND DATE_FORMAT(CREATED_TIME, '%Y%m%d') = #{date}
</if>
</select>
<select id="selectParameterValueByKey" resultType="java.lang.String">
select
PARAMETER_VALUE
from
customer_project_parameter
where DEL_FLAG = '0'
and CUSTOMER_ID = #{customerId}
and PARAMETER_KEY ='detention_days'
</select>
</mapper>
Loading…
Cancel
Save