Browse Source

Merge branch 'dev_bugfix_ljj' into release_temp

dev
wangxianzhang 4 years ago
parent
commit
cc0aaf7116
  1. 5
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java
  2. 9
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenUserController.java
  3. 4
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml
  4. 36
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml

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

@ -1,6 +1,8 @@
package com.epmet.datareport.controller.screen; package com.epmet.datareport.controller.screen;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.enums.OrgTypeEnum; import com.epmet.commons.tools.enums.OrgTypeEnum;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.datareport.service.evaluationindex.screen.IndexService; import com.epmet.datareport.service.evaluationindex.screen.IndexService;
@ -146,8 +148,9 @@ public class IndexController {
* @author sun * @author sun
*/ */
@PostMapping("advancedbranchrank") @PostMapping("advancedbranchrank")
Result<List<IndexAdvanceBranchRankResultDTO>> advancedBranchRank(@RequestBody AdvancedBranchRankFormDTO formDTO){ Result<List<IndexAdvanceBranchRankResultDTO>> advancedBranchRank(@RequestBody AdvancedBranchRankFormDTO formDTO, @LoginUser TokenDto loginUser){
ValidatorUtils.validateEntity(formDTO, AdvancedBranchRankFormDTO.AddUserInternalGroup.class); ValidatorUtils.validateEntity(formDTO, AdvancedBranchRankFormDTO.AddUserInternalGroup.class);
formDTO.setCustomerId(loginUser.getCustomerId());
return new Result<List<IndexAdvanceBranchRankResultDTO>>().ok(indexService.advancedBranchRank(formDTO)); return new Result<List<IndexAdvanceBranchRankResultDTO>>().ok(indexService.advancedBranchRank(formDTO));
} }

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

@ -1,5 +1,7 @@
package com.epmet.datareport.controller.screen; package com.epmet.datareport.controller.screen;
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.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.datareport.service.evaluationindex.screen.ScreenUserService; import com.epmet.datareport.service.evaluationindex.screen.ScreenUserService;
@ -47,8 +49,10 @@ public class ScreenUserController {
* @author wxz * @author wxz
*/ */
@PostMapping("userpointrank/withoutpartymember") @PostMapping("userpointrank/withoutpartymember")
public Result<List<UserPointRankListResultDTO>> userPointRankWithoutPartyMem(@RequestBody UserPointRankFormDTO formDTO) { public Result<List<UserPointRankListResultDTO>> userPointRankWithoutPartyMem(@RequestBody UserPointRankFormDTO formDTO, @LoginUser TokenDto loginUser) {
ValidatorUtils.validateEntity(formDTO, UserPointRankFormDTO.AddUserInternalGroup.class); ValidatorUtils.validateEntity(formDTO, UserPointRankFormDTO.AddUserInternalGroup.class);
formDTO.setCustomerId(loginUser.getCustomerId());
return new Result<List<UserPointRankListResultDTO>>().ok(screenUserService.userPointRankWithoutPartyMem(formDTO)); return new Result<List<UserPointRankListResultDTO>>().ok(screenUserService.userPointRankWithoutPartyMem(formDTO));
} }
@ -70,8 +74,9 @@ public class ScreenUserController {
* @author wxz * @author wxz
*/ */
@PostMapping("partypointrank") @PostMapping("partypointrank")
public Result<List<PartyPointRankResultDTO>> partyPointRank(@RequestBody PartyPointRankFormDTO formDTO) { public Result<List<PartyPointRankResultDTO>> partyPointRank(@RequestBody PartyPointRankFormDTO formDTO, @LoginUser TokenDto loginUser) {
ValidatorUtils.validateEntity(formDTO, PartIndexScroeRankFormDTO.AddUserInternalGroup.class); ValidatorUtils.validateEntity(formDTO, PartIndexScroeRankFormDTO.AddUserInternalGroup.class);
formDTO.setCustomerId(loginUser.getCustomerId());
return new Result<List<PartyPointRankResultDTO>>().ok(screenUserService.partyPointRank(formDTO)); return new Result<List<PartyPointRankResultDTO>>().ok(screenUserService.partyPointRank(formDTO));
} }

4
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml

@ -240,7 +240,7 @@
<select id="selectRankList" resultType="com.epmet.evaluationindex.screen.dto.result.IndexAdvanceBranchRankResultDTO"> <select id="selectRankList" resultType="com.epmet.evaluationindex.screen.dto.result.IndexAdvanceBranchRankResultDTO">
SELECT SELECT
CONCAT( CONCAT(
(select agency_name from screen_customer_agency where agency_id = rd.parent_id), (select agency_name from screen_customer_agency where agency_id = rd.parent_id <if test="customerId != null and customerId != ''">AND org.CUSTOMER_ID = #{customerId}</if>),
'-', '-',
dm.org_name dm.org_name
)AS "name", )AS "name",
@ -252,7 +252,7 @@
rd.satisfaction_ratio AS "satisfactionRatio" rd.satisfaction_ratio AS "satisfactionRatio"
FROM FROM
screen_index_data_monthly dm screen_index_data_monthly dm
INNER JOIN screen_org_rank_data rd ON dm.org_id = rd.org_id INNER JOIN screen_org_rank_data rd ON dm.org_id = rd.org_id AND dm.CUSTOMER_ID = rd.CUSTOMER_ID
<!--查询的是网格的排行 下面条件是orgType = grid--> <!--查询的是网格的排行 下面条件是orgType = grid-->
INNER JOIN screen_customer_grid org ON org.CUSTOMER_ID = dm.CUSTOMER_ID AND org.GRID_ID = dm.ORG_ID AND org.DEL_FLAG = '0' INNER JOIN screen_customer_grid org ON org.CUSTOMER_ID = dm.CUSTOMER_ID AND org.GRID_ID = dm.ORG_ID AND org.DEL_FLAG = '0'

36
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml

@ -323,22 +323,8 @@
agency.ORGANIZATION_NAME AS agencyName, agency.ORGANIZATION_NAME AS agencyName,
agency.LEVEL AS level, agency.LEVEL AS level,
agency.CUSTOMER_ID as customerId, agency.CUSTOMER_ID as customerId,
( CASE WHEN agency.longitude is null THEN agency.longitude,
( SELECT longitude FROM customer_agency agency.latitude
WHERE del_flag = '0' AND customer_id = (SELECT customer_id FROM customer_agency WHERE id = agency.id)
ORDER BY pid ASC LIMIT 1
)
ELSE agency.longitude
END
) longitude,
( CASE WHEN agency.latitude is null THEN
( SELECT latitude FROM customer_agency
WHERE del_flag = '0' AND customer_id = (SELECT customer_id FROM customer_agency WHERE id = agency.id)
ORDER BY pid ASC LIMIT 1
)
ELSE agency.latitude
END
) latitude
FROM FROM
CUSTOMER_AGENCY agency CUSTOMER_AGENCY agency
WHERE WHERE
@ -423,22 +409,8 @@
ca.pids pids, ca.pids pids,
ca.pid pid, ca.pid pid,
ca.level level, ca.level level,
( CASE WHEN ca.longitude is null THEN ca.longitude,
( SELECT longitude FROM customer_agency ca.latitude
WHERE del_flag = '0' AND customer_id = (SELECT customer_id FROM customer_agency WHERE id = ca.id)
ORDER BY pid ASC LIMIT 1
)
ELSE ca.longitude
END
) longitude,
( CASE WHEN ca.latitude is null THEN
( SELECT latitude FROM customer_agency
WHERE del_flag = '0' AND customer_id = (SELECT customer_id FROM customer_agency WHERE id = ca.id)
ORDER BY pid ASC LIMIT 1
)
ELSE ca.latitude
END
) latitude
FROM FROM
customer_agency ca customer_agency ca
INNER JOIN customer_staff_agency csa ON ca.id = csa.agency_id INNER JOIN customer_staff_agency csa ON ca.id = csa.agency_id

Loading…
Cancel
Save