Browse Source

Merge branch 'dev_pingyiin_zqf' into dev

master
zhaoqifeng 3 years ago
parent
commit
81b444fea7
  1. 6
      epmet-module/data-aggregator/data-aggregator-server/pom.xml
  2. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenPyHistoryScoreServiceImpl.java
  3. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenPyWeightConfigurationServiceImpl.java
  4. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenPyHistoryScoreDao.xml

6
epmet-module/data-aggregator/data-aggregator-server/pom.xml

@ -245,6 +245,12 @@
<datasource.druid.evaluationIndex.username>epmet_evaluation_index_user</datasource.druid.evaluationIndex.username> <datasource.druid.evaluationIndex.username>epmet_evaluation_index_user</datasource.druid.evaluationIndex.username>
<datasource.druid.evaluationIndex.password>EpmEt-db-UsEr</datasource.druid.evaluationIndex.password> <datasource.druid.evaluationIndex.password>EpmEt-db-UsEr</datasource.druid.evaluationIndex.password>
<datasource.druid.evaluationIndex1.url>
<![CDATA[jdbc:mysql://192.168.1.140:3306/epmet_evaluation_index?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</datasource.druid.evaluationIndex1.url>
<datasource.druid.evaluationIndex1.username>root</datasource.druid.evaluationIndex1.username>
<datasource.druid.evaluationIndex1.password>root</datasource.druid.evaluationIndex1.password>
<datasource.druid.opercustomize.url> <datasource.druid.opercustomize.url>
<![CDATA[jdbc:mysql://192.168.1.140:3306/epmet_oper_customize?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]> <![CDATA[jdbc:mysql://192.168.1.140:3306/epmet_oper_customize?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</datasource.druid.opercustomize.url> </datasource.druid.opercustomize.url>

10
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenPyHistoryScoreServiceImpl.java

@ -3,10 +3,12 @@ package com.epmet.service.evaluationindex.indexcoll.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.DataSourceConstant; import com.epmet.constant.DataSourceConstant;
@ -70,6 +72,12 @@ public class ScreenPyHistoryScoreServiceImpl implements ScreenPyHistoryScoreServ
public PageData<HistoryScoreListResultDTO> list(HistoryScoreListFormDTO formDTO) { public PageData<HistoryScoreListResultDTO> list(HistoryScoreListFormDTO formDTO) {
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()); PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage());
List<HistoryScoreListResultDTO> list = screenPyHistoryScoreDao.selectHistoryScoreList(formDTO); List<HistoryScoreListResultDTO> list = screenPyHistoryScoreDao.selectHistoryScoreList(formDTO);
list.forEach(l->{
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), l.getUpdatedById());
if (null != staffInfo) {
l.setUpdatedBy(staffInfo.getRealName());
}
});
PageInfo<HistoryScoreListResultDTO> pageInfo = new PageInfo<>(list); PageInfo<HistoryScoreListResultDTO> pageInfo = new PageInfo<>(list);
return new PageData<>(list, pageInfo.getTotal()); return new PageData<>(list, pageInfo.getTotal());
} }
@ -136,7 +144,7 @@ public class ScreenPyHistoryScoreServiceImpl implements ScreenPyHistoryScoreServ
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "未查到相关信息", "未查到相关信息"); throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "未查到相关信息", "未查到相关信息");
} }
entity.setDelFlag("1"); entity.setDelFlag("1");
screenPyHistoryScoreDao.updateById(entity); screenPyHistoryScoreDao.deleteById(entity);
screenPyHistoryScoreDetailDao.delByHistoryScoreId(formDTO.getId(), formDTO.getUserId()); screenPyHistoryScoreDetailDao.delByHistoryScoreId(formDTO.getId(), formDTO.getUserId());
} }

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenPyWeightConfigurationServiceImpl.java

@ -67,7 +67,7 @@ public class ScreenPyWeightConfigurationServiceImpl extends BaseServiceImpl<Scre
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "未查到相关信息", "未查到相关信息"); throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "未查到相关信息", "未查到相关信息");
} }
entity.setDelFlag("1"); entity.setDelFlag("1");
baseDao.updateById(entity); baseDao.deleteById(entity);
} }

4
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenPyHistoryScoreDao.xml

@ -10,11 +10,9 @@
a.title, a.title,
CONCAT(DATE_FORMAT(a.start_time,'%Y年%m月%d日'),'-',DATE_FORMAT(a.end_time,'%Y年%m月%d日')) `time`, CONCAT(DATE_FORMAT(a.start_time,'%Y年%m月%d日'),'-',DATE_FORMAT(a.end_time,'%Y年%m月%d日')) `time`,
DATE_FORMAT(a.release_time,'%Y-%m-%d %H:%i') releaseTime, DATE_FORMAT(a.release_time,'%Y-%m-%d %H:%i') releaseTime,
a.updated_by updatedById, a.updated_by updatedById
b.real_name updatedBy
FROM FROM
screen_py_history_score a screen_py_history_score a
LEFT JOIN epmet_user.customer_staff b ON a.customer_id = b.customer_id AND a.updated_by = b.user_id
WHERE WHERE
a.del_flag = '0' a.del_flag = '0'
<if test="title != null and title != ''"> <if test="title != null and title != ''">

Loading…
Cancel
Save