Browse Source

Merge branch 'dev_data_fusion' into develop

master
sunyuchao 4 years ago
parent
commit
2ed055c6c6
  1. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/RootAgencyFormDTO.java
  2. 5
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/fact/FactIndexController.java
  3. 2
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java
  4. 2
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/fact/impl/FactIndexServiceImpl.java
  5. 1
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml
  6. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java

5
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/RootAgencyFormDTO.java

@ -21,4 +21,9 @@ public class RootAgencyFormDTO implements Serializable {
@NotBlank(message = "组织ID不能为空",groups = {RootAgencyFormDTO.AddUserInternalGroup.class})
private String agencyId;
/**
* token中客户Id
*/
private String customerId;
}

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

@ -1,5 +1,7 @@
package com.epmet.datareport.controller.fact;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.datareport.service.fact.FactIndexService;
@ -98,8 +100,9 @@ public class FactIndexController {
* @author sun
*/
@PostMapping("index/rootagency")
public Result<RootAgencyResultDTO> rootAgency(@RequestBody RootAgencyFormDTO formDTO) {
public Result<RootAgencyResultDTO> rootAgency(@LoginUser TokenDto tokenDto, @RequestBody RootAgencyFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, RootAgencyFormDTO.AddUserInternalGroup.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
return new Result<RootAgencyResultDTO>().ok(factIndexService.rootAgency(formDTO));
}

2
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java

@ -100,7 +100,7 @@ public interface ScreenCustomerAgencyDao {
* @Description 根据组织ID判断是否根组织
* @author sun
*/
int selectRootAgency(@Param("agencyId") String agencyId);
int selectRootAgency(@Param("agencyId") String agencyId, @Param("customerId") String customerId);
/**
* desc: 根据orgId获取组织信息

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

@ -486,7 +486,7 @@ public class FactIndexServiceImpl implements FactIndexService {
public RootAgencyResultDTO rootAgency(RootAgencyFormDTO formDTO) {
RootAgencyResultDTO resultDTO = new RootAgencyResultDTO();
//1.根据agencyId查询是否为根级组织
int num = screenCustomerAgencyDao.selectRootAgency(formDTO.getAgencyId());
int num = screenCustomerAgencyDao.selectRootAgency(formDTO.getAgencyId(), formDTO.getCustomerId());
if (num < NumConstant.ONE) {
resultDTO.setIsRoot(false);
}

1
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml

@ -116,6 +116,7 @@
del_flag = '0'
AND pid = '0'
AND agency_id = #{agencyId}
AND customer_id = #{customerId}
</select>
<select id="selectRootAgencyIdByBizType" resultType="com.epmet.evaluationindex.screen.dto.result.TreeResultDTO">

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

@ -893,7 +893,6 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService {
deleteNum = screenIndexDataYearlyDao.deleteIndexDataYearly(customerId, getYearStr(monthId));
} while (deleteNum > NumConstant.ZERO);
List<IndexDataYearlyFormDTO> entity = ConvertUtils.sourceToTarget(monthlyFormList, IndexDataYearlyFormDTO.class);
log.info("插入的entity:"+ JSON.toJSONString(entity));
screenIndexDataYearlyDao.batchInsertIndexDataYearly(entity, customerId);
}
}

Loading…
Cancel
Save