From f6f9bded04d8e563b4531100f792b22a54bee3f4 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 26 Aug 2020 12:51:11 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=9C=80=E5=A4=A7=E5=80=BC=E6=9C=80?= =?UTF-8?q?=E5=B0=8F=E5=80=BC=E9=80=9A=E7=94=A8dto,=E5=AE=A2=E6=88=B7id+mo?= =?UTF-8?q?nthId=E9=80=9A=E7=94=A8dto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/indexcal/CalculateCommonFormDTO.java | 29 +++++++++++++++++++ .../dto/indexcal/ExtremeValueCommonDTO.java | 26 +++++++++++++++++ .../indexcal/GridCorreLationService.java | 21 ++++++++++++++ .../impl/GridCorreLationServiceImpl.java | 27 +++++++++++++++++ .../impl/IndexCalculateServiceImpl.java | 7 ++++- 5 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/ExtremeValueCommonDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java new file mode 100644 index 0000000000..1d56dd17b1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java @@ -0,0 +1,29 @@ +package com.epmet.dto.indexcal; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 指标计算通用入参DTO + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/26 10:49 + */ +@Data +public class CalculateCommonFormDTO implements Serializable { + /** + * 月份id: yyyyMM + */ + private String monthId; + + /** + * 客户id + */ + private String customerId; + + public CalculateCommonFormDTO(String customerId, String monthId) { + this.monthId=monthId; + this.customerId=customerId; + } +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/ExtremeValueCommonDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/ExtremeValueCommonDTO.java new file mode 100644 index 0000000000..63dbb58262 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/ExtremeValueCommonDTO.java @@ -0,0 +1,26 @@ +package com.epmet.dto.indexcal; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 最值通用DTO + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/26 10:39 + */ +@Data +public class ExtremeValueCommonDTO implements Serializable { + + /** + * 最小值 + */ + private BigDecimal minValue; + + /** + * 最小值 + */ + private BigDecimal maxValue; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java new file mode 100644 index 0000000000..89001f5d4f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java @@ -0,0 +1,21 @@ +package com.epmet.service.indexcal; + +import com.epmet.dto.indexcal.CalculateCommonFormDTO; + +/** + * 网格相关指标计算 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/26 10:34 + */ +public interface GridCorreLationService { + + /** + * @return java.lang.Boolean + * @param formDTO + * @author yinzuomei + * @description 网格相关,分值计算 + * @Date 2020/8/26 10:51 + **/ + Boolean calculateGridCorreLation(CalculateCommonFormDTO formDTO); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java new file mode 100644 index 0000000000..70a6a9222b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java @@ -0,0 +1,27 @@ +package com.epmet.service.indexcal.impl; + +import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.service.indexcal.GridCorreLationService; +import org.springframework.stereotype.Service; + +/** + * 网格相关service + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/26 10:35 + */ +@Service +public class GridCorreLationServiceImpl implements GridCorreLationService { + + /** + * @param formDTO + * @return java.lang.Boolean + * @author yinzuomei + * @description 网格相关,分值计算 + * @Date 2020/8/26 10:51 + **/ + @Override + public Boolean calculateGridCorreLation(CalculateCommonFormDTO formDTO) { + return null; + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateServiceImpl.java index 4558c87927..54a368044b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateServiceImpl.java @@ -3,9 +3,11 @@ package com.epmet.service.screen.impl; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dao.indexcoll.FactIndexPartyAblityCpcMonthlyDao; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.screen.form.IndexCalculateForm; import com.epmet.entity.indexcoll.FactIndexPartyAblityCpcMonthlyEntity; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; +import com.epmet.service.indexcal.GridCorreLationService; import com.epmet.service.screen.IndexCalculateService; import com.epmet.util.DimIdGenerator; import lombok.extern.slf4j.Slf4j; @@ -27,6 +29,8 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { private EpmetCommonServiceOpenFeignClient epmetCommonServiceOpenFeignClient; @Autowired private FactIndexPartyAblityCpcMonthlyDao factIndexPartyAblityCpcMonthlyDao; + @Autowired + private GridCorreLationService gridCorreLationService; @Override public Boolean indexCalculate(IndexCalculateForm formDTO) { @@ -44,6 +48,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { formDTO.setCustomerIds(externalCustomerIdsResult.getData()); } formDTO.getCustomerIds().forEach(customerId -> { + CalculateCommonFormDTO calculateCommonFormDTO=new CalculateCommonFormDTO(customerId, formDTO.getMonthId()); //计算党员 try { List list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(customerId, formDTO.getMonthId()); @@ -53,7 +58,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { //计算网格 //TODO - + gridCorreLationService.calculateGridCorreLation(calculateCommonFormDTO); //计算社区 //TODO From 8a8876eb7daa8fd7b6135572879d9e324d779bed Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 26 Aug 2020 12:55:00 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=8C=87=E6=A0=87=E5=88=86=E7=BB=84?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-statistical-server/pom.xml | 5 + .../epmet/entity/screen/IndexGroupEntity.java | 5 + .../screen/IndexGroupTemplateEntity.java | 5 + .../epmet/model/IndexExcelDataListener.java | 5 + .../java/com/epmet/util/Pinyin4jUtil.java | 170 ++++++++++++++++++ .../src/main/resources/bootstrap.yml | 4 + .../mapper/screen/IndexGroupTemplateDao.xml | 2 +- 7 files changed, 195 insertions(+), 1 deletion(-) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/Pinyin4jUtil.java diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml index aca19d6a19..61af3816fc 100644 --- a/epmet-module/data-statistical/data-statistical-server/pom.xml +++ b/epmet-module/data-statistical/data-statistical-server/pom.xml @@ -93,6 +93,11 @@ easyexcel 2.2.6 + + io.github.wnjustdoit + pinyin4j + 2.6.0 + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java index 24df1ef18a..dcd8c63648 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java @@ -45,6 +45,11 @@ public class IndexGroupEntity extends BaseEpmetEntity { */ private String indexId; + /** + * 指标code + */ + private String indexCode; + /** * 是否启用:启用:enable 禁用:disabled */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java index 3348ebdeda..6a6408f7a1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java @@ -40,6 +40,11 @@ public class IndexGroupTemplateEntity extends BaseEpmetEntity { */ private String indexId; + /** + * 指标code + */ + private String indexCode; + /** * 是否启用:启用:enable 禁用:disabled */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java index 76f0897890..931b9afd55 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java @@ -10,6 +10,7 @@ import com.epmet.entity.screen.IndexGroupTemplateEntity; import com.epmet.service.screen.IndexDictService; import com.epmet.service.screen.IndexGroupDetailTemplateService; import com.epmet.service.screen.IndexGroupTemplateService; +import com.epmet.util.Pinyin4jUtil; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -118,6 +119,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { group1.setIndexId(indexDictEntity.getId()); group1.setParentIndexGroupId("0"); group1.setId(level1GroupId); + group1.setIndexCode(Pinyin4jUtil.getFirstSpellPinYin(indexDictEntity.getIndexName(),true)); indexGroupMap.put(index.getLevel1Index(), group1); } @@ -132,6 +134,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { group2.setIndexId(indexDictEntity.getId()); group2.setParentIndexGroupId(level1GroupId); group2.setId(level2GroupId); + group2.setIndexCode(Pinyin4jUtil.getFirstSpellPinYin(indexDictEntity.getIndexName(),true)); indexGroupMap.put(level4Index, group2); //构建 分组明细 templateEntity = indexGroupDetailMap.get(level4Index); @@ -156,6 +159,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { group1.setIndexId(indexDictEntity.getId()); group1.setParentIndexGroupId("0"); group1.setId(level1GroupId); + group1.setIndexCode(Pinyin4jUtil.getFirstSpellPinYin(indexDictEntity.getIndexName(),true)); indexGroupMap.put(index.getLevel1Index(), group1); } @@ -170,6 +174,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { group2.setIndexId(indexDictEntity.getId()); group2.setParentIndexGroupId(level1GroupId); group2.setId(level2GroupId); + group2.setIndexCode(Pinyin4jUtil.getFirstSpellPinYin(indexDictEntity.getIndexName(),true)); indexGroupMap.put(level2Index, group2); //构建 分组明细 templateEntity = indexGroupDetailMap.get(level2Index); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/Pinyin4jUtil.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/Pinyin4jUtil.java new file mode 100644 index 0000000000..5ea9d4b828 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/Pinyin4jUtil.java @@ -0,0 +1,170 @@ +package com.epmet.util; + +import net.sourceforge.pinyin4j.PinyinHelper; +import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType; +import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat; +import net.sourceforge.pinyin4j.format.HanyuPinyinToneType; +import net.sourceforge.pinyin4j.format.HanyuPinyinVCharType; +import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + + +/** + * @author liujianjun + */ +public class Pinyin4jUtil { + private static Map duoyinMap; + static { + duoyinMap = new HashMap<>(); + duoyinMap.put('区',new String[]{"qu"}); + duoyinMap.put('系',new String[]{"xi"}); + } + + /** + * getFirstSpellPinYin:(多音字的时候获取第一个).
+ * + * @param src 传入的拼音字符串,以逗号隔开 + * @param isFullSpell 是否全拼,true:全拼,false:第一个汉字全拼(其它汉字取首字母) + * @return 第一个拼音 + */ + public static String getFirstSpellPinYin(String src, boolean isFullSpell) { + String targetStr = Pinyin4jUtil.makeStringByStringSet(Pinyin4jUtil.getPinyin(src, isFullSpell)); + System.out.println(targetStr); + String[] split = targetStr.split(","); + if (split.length > 1) { + targetStr = split[0]; + } + return targetStr; + } + + /** + * makeStringByStringSet:(拼音字符串集合转换字符串(逗号分隔)).
+ * + * @param stringSet 拼音集合 + * @return 带逗号字符串 + */ + public static String makeStringByStringSet(Set stringSet) { + StringBuilder str = new StringBuilder(); + int i = 0; + if (stringSet.size() > 0) { + for (String s : stringSet) { + if (i == stringSet.size() - 1) { + str.append(s); + } else { + str.append(s + ","); + } + i++; + } + } + return str.toString().toLowerCase(); + } + + /** + * getPinyin:(获取汉字拼音).
+ * + * @param src 汉字 + * @param isFullSpell 是否全拼,如果为true:全拼,false:首字全拼 + * @return + */ + public static Set getPinyin(String src, boolean isFullSpell) { + if (src != null && !src.trim().equalsIgnoreCase("")) { + char[] srcChar; + srcChar = src.toCharArray(); + // 汉语拼音格式输出类 + HanyuPinyinOutputFormat hanYuPinOutputFormat = new HanyuPinyinOutputFormat(); + + // 输出设置,大小写,音标方式等 + hanYuPinOutputFormat.setCaseType(HanyuPinyinCaseType.LOWERCASE); + hanYuPinOutputFormat.setToneType(HanyuPinyinToneType.WITHOUT_TONE); + hanYuPinOutputFormat.setVCharType(HanyuPinyinVCharType.WITH_V); + + String[][] temp = new String[src.length()][]; + for (int i = 0; i < srcChar.length; i++) { + char c = srcChar[i]; + if (String.valueOf(c).matches("[\\u4E00-\\u9FA5]+")) {//中文 + try { + String[] py = duoyinMap.get(c); + if (py != null){ + temp[i] = py; + }else{ + temp[i] = PinyinHelper.toHanyuPinyinStringArray(srcChar[i], hanYuPinOutputFormat); + } + + if (!isFullSpell) { + if (i == 0) { + temp[i] = temp[i]; + } else { + String[] tTemps = new String[temp[i].length]; + for (int j = 0; j < temp[i].length; j++) { + char t = temp[i][j].charAt(0); + tTemps[j] = Character.toString(t); + } + temp[i] = tTemps; + } + } + } catch (BadHanyuPinyinOutputFormatCombination e) { + e.printStackTrace(); + } + } else if (((int) c >= 65 && (int) c <= 90) + || ((int) c >= 97 && (int) c <= 122)) {//英文 + temp[i] = new String[]{String.valueOf(srcChar[i])}; + } else { + temp[i] = new String[]{""}; + } + } + String[] pingyinArray = exchange(temp); + Set pinyinSet = new HashSet(); + for (int i = 0; i < pingyinArray.length; i++) { + pinyinSet.add(pingyinArray[i]); + } + return pinyinSet; + } + return null; + } + + /** + * 递归 + * + * @param strJaggedArray + * @return + */ + public static String[] exchange(String[][] strJaggedArray) { + String[][] temp = doExchange(strJaggedArray); + return temp[0]; + } + + /** + * 递归 + * + * @param strJaggedArray + * @return + */ + private static String[][] doExchange(String[][] strJaggedArray) { + int len = strJaggedArray.length; + if (len >= 2) { + int len1 = strJaggedArray[0].length; + int len2 = strJaggedArray[1].length; + int newlen = len1 * len2; + String[] temp = new String[newlen]; + int Index = 0; + for (int i = 0; i < len1; i++) { + for (int j = 0; j < len2; j++) { + temp[Index] = strJaggedArray[0][i] + strJaggedArray[1][j]; + Index++; + } + } + String[][] newArray = new String[len - 1][]; + for (int i = 2; i < len; i++) { + newArray[i - 1] = strJaggedArray[i]; + } + newArray[0] = temp; + return doExchange(newArray); + } else { + return strJaggedArray; + } + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml index 709e17ab36..ce995b962e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml @@ -174,3 +174,7 @@ thread: queueCapacity: @thread.pool.queue-capacity@ keepAlive: @thread.pool.keep-alive@ +dingTalk: + robot: + webHook: @dingTalk.robot.webHook@ + secret: @dingTalk.robot.secret@ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupTemplateDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupTemplateDao.xml index 6adfa4474b..29ff0c7e17 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupTemplateDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupTemplateDao.xml @@ -7,7 +7,7 @@ \ No newline at end of file From 8a680c0cf6704a3fa44fc15e484c5a52798eb591 Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 26 Aug 2020 13:36:10 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=9E=9A=E4=B8=BE=E7=B1=BBcode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/eum/IndexCodeEnum.java | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java new file mode 100644 index 0000000000..29766018d8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java @@ -0,0 +1,56 @@ +package com.epmet.eum; + +/** + * 需要计算指标code枚举类 + * + * @author jianjun liu + * @date 2020-08-26 11:14 + **/ +public enum IndexCodeEnum { + DANG_YUAN_XIANG_GUAN("dangyuanxiangguan", "党员相关", 1), + WANG_GE_XIANG_GUAN("wangggexiangguan", "网格相关", 1), + SHE_QU_XIANG_GUAN("shequxiangguan", "社区相关", 1), + JIE_DAO_XIANG_GUAN("jiedaoxiangguan", "街道相关", 1), + QU_ZHI_BU_MEN("quzhibumen", "区直部门", 1), + QUAN_QU_XIANG_GUAN("quanquxiangguan", "全区相关", 1), + + DANG_JIAN_NENG_LI("dangjiannengli", "党建能力", 2), + ZHI_LI_NENG_LI("zhilinengli", "治理能力", 2), + FU_WU_NENG_LI("fuwunengli", "服务能力", 2), + + CAN_YU_YI_SHI("canyuyishi", "参与议事", 4), + DANG_WU_HUO_DONG("dangwuhuodong", "党务活动", 4), + LIAN_XI_QUN_ZHONG("lianxiqunzhong", "联系群众", 4), + + ; + + private String code; + private String name; + private Integer level; + + + IndexCodeEnum(String code, String name, Integer level) { + this.code = code; + this.name = name; + this.level = level; + } + + public static IndexCodeEnum getEnum(String code) { + IndexCodeEnum[] values = IndexCodeEnum.values(); + for (IndexCodeEnum value : values) { + if (code != null && value.getCode().equals(code)) { + return value; + } + } + return null; + } + + + public String getCode() { + return code; + } + + public String getName() { + return name; + } +} From 60b2c2ed7ddc3cf10cd1d29e317b372e45fb4d41 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 26 Aug 2020 14:45:22 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E7=BB=84=E7=BB=87=E6=A0=91=20=E5=86=99?= =?UTF-8?q?=E6=AD=BBcustomerId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datareport/service/screen/impl/AgencyServiceImpl.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/AgencyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/AgencyServiceImpl.java index 612239fc8d..0e1d557215 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/AgencyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/AgencyServiceImpl.java @@ -41,7 +41,13 @@ public class AgencyServiceImpl implements AgencyService { @Override public TreeResultDTO tree(ExternalAppRequestParam externalAppRequestParam) { // 1. 查询客户根组织ID - String customerId = externalAppRequestParam.getCustomerId(); +// String customerId = externalAppRequestParam.getCustomerId(); + + + // 验签关闭,customerId无法获取,暂时写死 + String customerId = "b09527201c4409e19d1dbc5e3c3429a1"; + + TreeResultDTO rootAgency = screenCustomerAgencyDao.selectRootAgencyId(customerId); if (null == rootAgency){ return new TreeResultDTO(); From 7acab40223d73184e6c9c9358d29ff48ac4c3382 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 26 Aug 2020 15:19:37 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E5=85=9A=E6=94=AF=E9=83=A8=E3=80=81?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6sql=E4=BF=AE=E6=94=B9=EF=BC=8C=E5=85=9A?= =?UTF-8?q?=E5=91=98=E5=88=86=E5=B8=83=E3=80=81=E7=94=A8=E6=88=B7=E5=88=86?= =?UTF-8?q?=E5=B8=83=E9=9A=90=E8=97=8F=E5=AD=97=E6=AE=B5areaMarks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/screen/dto/result/ParymemberResultDTO.java | 1 + .../src/main/java/com/epmet/screen/dto/result/UserResultDTO.java | 1 + .../src/main/resources/mapper/screen/ScreenCustomerGridDao.xml | 1 + .../src/main/resources/mapper/screen/ScreenEventDataDao.xml | 1 + 4 files changed, 4 insertions(+) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberResultDTO.java index 18bc33df48..710ce303aa 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberResultDTO.java @@ -29,6 +29,7 @@ public class ParymemberResultDTO implements Serializable { /** * 当前所选组织的坐标区域 */ + @JsonIgnore private String areaMarks = ""; /** diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java index 179aa5bec2..cea3d4b7ad 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java @@ -29,6 +29,7 @@ public class UserResultDTO implements Serializable { /** * 当前所选组织的坐标区域 */ + @JsonIgnore private String areaMarks = ""; /** diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml index 988e0b17cd..1e45902a79 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml @@ -29,6 +29,7 @@ WHERE del_flag = 0 AND parent_agency_id = #{agencyId} + AND all_parent_ids LIKE concat('%', #{agencyId}, '%') diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml index 63cadbbd5e..0b2e8698e2 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml @@ -32,5 +32,6 @@ WHERE del_flag = '0' AND event_id = #{projectId} + AND all_parent_ids LIKE concat('%', #{agencyId}, '%') \ No newline at end of file