From 3954edae0b059d3474ebb88d43a48c38790dd4a0 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 22 Jul 2022 09:29:00 +0800 Subject: [PATCH 01/13] =?UTF-8?q?ic=5Fpolicy=5Fitem=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/db/migration/V0.0.24__ic_policy.sql | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.24__ic_policy.sql b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.24__ic_policy.sql index 86d1472abb..ebf16c860c 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.24__ic_policy.sql +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.24__ic_policy.sql @@ -99,4 +99,14 @@ CREATE TABLE `ic_policy_item` ( `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', PRIMARY KEY (`ID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='政策找人规则组件表'; \ No newline at end of file +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='政策找人规则组件表'; + + + +INSERT INTO `epmet_heart`.`ic_policy_item` (`ID`, `CUSTOMER_ID`, `GROUP_TYPE`, `LABEL`, `COL_KEY`, `ITEM_TYPE`, `TABLE_NAME`, `SORT`, `REMARK`, `OPTION_SOURCE_TYPE`, `OPTION_SOURCE_URL`, `OPTION_SOURCE_PARAM`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1', 'default', 'house', '房屋类型', 'HOUSE_TYPE', 'select', 'ic_house', 1, '从字典表获取', 'remote', '/sys/dict/data/dictlist', '{\"dictType\":\"house_type\"}', '0', 0, 'APP_USER', '2022-07-19 10:01:39', 'APP_USER', '2022-07-19 10:01:42'); +INSERT INTO `epmet_heart`.`ic_policy_item` (`ID`, `CUSTOMER_ID`, `GROUP_TYPE`, `LABEL`, `COL_KEY`, `ITEM_TYPE`, `TABLE_NAME`, `SORT`, `REMARK`, `OPTION_SOURCE_TYPE`, `OPTION_SOURCE_URL`, `OPTION_SOURCE_PARAM`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('2', 'default', 'house', '房屋用途', 'PURPOSE', 'select', 'ic_house', 2, '从字典表获取', 'remote', '/sys/dict/data/dictlist', '{\"dictType\":\"house_purpose\"}', '0', 0, 'APP_USER', '2022-07-19 10:02:54', 'APP_USER', '2022-07-19 10:03:01'); +INSERT INTO `epmet_heart`.`ic_policy_item` (`ID`, `CUSTOMER_ID`, `GROUP_TYPE`, `LABEL`, `COL_KEY`, `ITEM_TYPE`, `TABLE_NAME`, `SORT`, `REMARK`, `OPTION_SOURCE_TYPE`, `OPTION_SOURCE_URL`, `OPTION_SOURCE_PARAM`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3', 'default', 'house', '房屋状态', 'RENT_FLAG', 'select', 'ic_house', 3, '从字典表获取', 'remote', '/sys/dict/data/dictlist', '{\"dictType\":\"house_status\"}', '0', 0, 'APP_USER', '2022-07-19 10:02:54', 'APP_USER', '2022-07-19 10:03:01'); +INSERT INTO `epmet_heart`.`ic_policy_item` (`ID`, `CUSTOMER_ID`, `GROUP_TYPE`, `LABEL`, `COL_KEY`, `ITEM_TYPE`, `TABLE_NAME`, `SORT`, `REMARK`, `OPTION_SOURCE_TYPE`, `OPTION_SOURCE_URL`, `OPTION_SOURCE_PARAM`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('4', 'default', 'house', '创建时间', 'CREATED_TIME', 'date', 'ic_house', 4, '日期格式', NULL, NULL, NULL, '0', 0, 'APP_USER', '2022-07-19 10:02:54', 'APP_USER', '2022-07-19 10:03:01'); +INSERT INTO `epmet_heart`.`ic_policy_item` (`ID`, `CUSTOMER_ID`, `GROUP_TYPE`, `LABEL`, `COL_KEY`, `ITEM_TYPE`, `TABLE_NAME`, `SORT`, `REMARK`, `OPTION_SOURCE_TYPE`, `OPTION_SOURCE_URL`, `OPTION_SOURCE_PARAM`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5', 'default', 'house', '备注', 'REMARK', 'input', 'ic_house', 5, '文本域', NULL, NULL, NULL, '0', 0, 'APP_USER', '2022-07-19 10:02:54', 'APP_USER', '2022-07-19 10:03:01'); +INSERT INTO `epmet_heart`.`ic_policy_item` (`ID`, `CUSTOMER_ID`, `GROUP_TYPE`, `LABEL`, `COL_KEY`, `ITEM_TYPE`, `TABLE_NAME`, `SORT`, `REMARK`, `OPTION_SOURCE_TYPE`, `OPTION_SOURCE_URL`, `OPTION_SOURCE_PARAM`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('6', 'default', 'stat', '人均收入', 'AVG_YSR', 'inputNum', '', 1, '只能输入数字,可以是小数', NULL, NULL, NULL, '0', 0, 'APP_USER', '2022-07-19 10:02:54', 'APP_USER', '2022-07-19 10:03:01'); +INSERT INTO `epmet_heart`.`ic_policy_item` (`ID`, `CUSTOMER_ID`, `GROUP_TYPE`, `LABEL`, `COL_KEY`, `ITEM_TYPE`, `TABLE_NAME`, `SORT`, `REMARK`, `OPTION_SOURCE_TYPE`, `OPTION_SOURCE_URL`, `OPTION_SOURCE_PARAM`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('7', 'default', 'stat', '家庭人数', 'RESI_NUMBER', 'inputNum', '', 2, '只能输入数字', NULL, NULL, NULL, '0', 0, 'APP_USER', '2022-07-19 10:02:54', 'APP_USER', '2022-07-19 10:03:01'); From f138207a7a6bf7c124ba85b7b6ecf215a9ea341d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 22 Jul 2022 15:49:24 +0800 Subject: [PATCH 02/13] bugfix --- .../main/resources/db/migration/V0.0.33__policy_flagbugfix.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.33__policy_flagbugfix.sql diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.33__policy_flagbugfix.sql b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.33__policy_flagbugfix.sql new file mode 100644 index 0000000000..ea437f22b7 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.33__policy_flagbugfix.sql @@ -0,0 +1,3 @@ +update ic_form_item i set i.UPDATED_TIME=NOW(),i.POLICY_FLAG='0' +where i.DEL_FLAG='0' + and i.DYNAMIC='0'; \ No newline at end of file From 77d203048cb352efb3d85c56a397e6a2fbeef3ad Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 22 Jul 2022 16:07:06 +0800 Subject: [PATCH 03/13] =?UTF-8?q?=E5=86=85=E5=AE=B9=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/form/policy/IcPolicyFormDTO.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/policy/IcPolicyFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/policy/IcPolicyFormDTO.java index 3ebd110fad..c96aa65540 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/policy/IcPolicyFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/policy/IcPolicyFormDTO.java @@ -83,7 +83,7 @@ public class IcPolicyFormDTO implements Serializable { /** * 政策内容 */ - @NotBlank(message = "政策内容不能为空", groups = AddUserShowGroup.class) + // @NotBlank(message = "政策内容不能为空", groups = AddUserShowGroup.class) @Length(max = 2000, groups = AddUserShowGroup.class, message = "政策内容最多输入2000字") private String content; From a640cd0c3b52054dd7a6eb95508737ddb44f7044 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Mon, 25 Jul 2022 10:28:22 +0800 Subject: [PATCH 04/13] =?UTF-8?q?=E3=80=90=E6=94=BF=E7=AD=96=E3=80=91?= =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/ResiByPolicyInfoResultDTO.java | 20 ++++++++ .../controller/IcUserController.java | 6 +-- .../epmet/dataaggre/service/ResiService.java | 4 +- .../service/impl/ResiServiceImpl.java | 48 ++++++++++++------- 4 files changed, 54 insertions(+), 24 deletions(-) diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/ResiByPolicyInfoResultDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/ResiByPolicyInfoResultDTO.java index e739baca1d..da425762d7 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/ResiByPolicyInfoResultDTO.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/ResiByPolicyInfoResultDTO.java @@ -1,5 +1,8 @@ package com.epmet.dataaggre.dto.epmetuser.result; +import com.alibaba.excel.annotation.ExcelIgnore; +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @@ -11,16 +14,33 @@ import java.util.Date; @AllArgsConstructor public class ResiByPolicyInfoResultDTO { + @ExcelIgnore private String icResiUserId; + + @ExcelProperty(value = "姓名") + @ColumnWidth(10) private String name; + + @ExcelProperty("手机号") + @ColumnWidth(20) private String mobile; + + @ExcelProperty("身份证号") + @ColumnWidth(30) private String idCard; /** * 小区全名,包含小区前面的属性,比如网格等 */ + @ExcelIgnore private String gridId; + @ExcelIgnore private String neighborhoodId; + @ExcelProperty("小区名称") + @ColumnWidth(30) private String neighborHoodName; + @ExcelProperty("年龄") + @ColumnWidth(10) private Integer age; + @ExcelIgnore private Date birthday; } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/IcUserController.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/IcUserController.java index 1216c2b193..63d686260c 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/IcUserController.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/IcUserController.java @@ -114,13 +114,13 @@ public class IcUserController implements ResultDataResolver { * 导出政策查找到的居民 * @param input */ - @PostMapping("exportByPolicy") + @PostMapping("exportByPolicyRules") public void exportResisByPolicy(@RequestBody ResisByPolicyRulesFormDTO input, HttpServletResponse response) { try { icResiService.exportResisByPolicy( input.getOrgId(), input.getOrgType(), input.getNeighborHoodId(), input.getBuildingId(), input.getUnitId(), - input.getHouseId(), input.getIdCard(), input.getName(), input.getPageNo(), input.getPageSize(), - input.getRuleId(), input.getRuleList().getResiRuleList(), input.getRuleList().getHouseRuleList(), input.getRuleList().getStatRuleList(), response); + input.getHouseId(), input.getIdCard(), input.getName(), input.getRuleId(), input.getRuleList().getResiRuleList(), + input.getRuleList().getHouseRuleList(), input.getRuleList().getStatRuleList(), response); } catch (IOException e) { throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "导出Excel文件失败", "导出Excel文件失败"); } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/ResiService.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/ResiService.java index f160f4a8f3..a77e94ceb7 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/ResiService.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/ResiService.java @@ -39,12 +39,10 @@ public interface ResiService { * @param houseId * @param idCard * @param name - * @param pageNo - * @param pageSize * @param ruleId */ void exportResisByPolicy(String orgId, String orgType, String neighborHoodId, String buildingId, String unitId, - String houseId, String idCard, String name, Integer pageNo, Integer pageSize, + String houseId, String idCard, String name, String ruleId, List resiRule, List houseRule, List statRule, diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/ResiServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/ResiServiceImpl.java index 32cc0cbfa1..9c613b2c56 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/ResiServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/ResiServiceImpl.java @@ -5,6 +5,7 @@ import com.alibaba.excel.EasyExcel; import com.alibaba.excel.ExcelWriter; import com.alibaba.excel.support.ExcelTypeEnum; import com.alibaba.excel.write.builder.ExcelWriterSheetBuilder; +import com.alibaba.excel.write.metadata.WriteSheet; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; @@ -12,6 +13,7 @@ import com.epmet.commons.tools.feign.ResultDataResolver; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.EpmetRequestHolder; +import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dataaggre.dto.epmetuser.form.ResisByPolicyRulesFormDTO; import com.epmet.dataaggre.dto.epmetuser.result.ResiByPolicyInfoResultDTO; @@ -215,7 +217,7 @@ public class ResiServiceImpl implements ResiService, ResultDataResolver { @Override public void exportResisByPolicy(String orgId, String orgType, String neighborHoodId, String buildingId, String unitId, - String houseId, String idCard, String name, Integer pageNo, Integer pageSize, + String houseId, String idCard, String name, String ruleId, List resiRule, List houseRule, List statRule, @@ -234,24 +236,34 @@ public class ResiServiceImpl implements ResiService, ResultDataResolver { statRule = ConvertUtils.sourceToTarget(ruleList.getStatRuleList(), ResisByPolicyRulesFormDTO.StatRule.class); } - ServletOutputStream ostream = response.getOutputStream(); - ExcelWriterSheetBuilder sheetBuilder = EasyExcel.write(ostream, ResisByPolicyExcel.class).sheet("居民列表"); - - // 循环填充数据 - do { - PageData resis = this.listByPolicyRules(orgId, orgType, neighborHoodId, buildingId, unitId, - houseId, idCard, name, pageNo, pageSize, resiRule, houseRule, statRule); - List list = resis.getList(); - List excelDatas = ConvertUtils.sourceToTarget(list, ResisByPolicyExcel.class); - if (CollectionUtils.isEmpty(excelDatas)) { - break; - } - //sheetBuilder.write(excelDatas); - } while (true); - - + // 模板导出 + ExcelWriter writer = EasyExcel.write(ExcelUtils.getOutputStreamForExcel("政策人员预览信息导出.xlsx", response)) + //.withTemplate(inputStream) + .build(); + + WriteSheet writeSheet = EasyExcel.writerSheet("政策人员列表") + .head(ResiByPolicyInfoResultDTO.class) + .build(); + + Integer pageSize = 500; + Integer pageNo = 1; + + try { + do { + PageData resis = this.listByPolicyRules(orgId, orgType, neighborHoodId, buildingId, unitId, + houseId, idCard, name, pageNo, pageSize, resiRule, houseRule, statRule); + List list = resis.getList(); + List excelDatas = ConvertUtils.sourceToTarget(list, ResisByPolicyExcel.class); + if (CollectionUtils.isEmpty(excelDatas)) { + break; + } - System.out.println(666); + writer.write(resis.getList(), writeSheet); + pageNo++; + } while (true); + } finally { + writer.finish(); + } } } From 57eaea76885a5d0554fdac70bf88c03f2cdaa5a4 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 25 Jul 2022 17:41:40 +0800 Subject: [PATCH 05/13] =?UTF-8?q?=E6=96=B0=E5=A2=9EserviceCategoryKey?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=EF=BC=8C=E5=8F=91=E8=B5=B7=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9=EF=BC=8C=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/IcServiceRecordV2DTO.java | 5 ++++- .../com/epmet/dto/form/IcServiceRecordV2AddEditFormDTO.java | 3 +++ .../java/com/epmet/dto/form/ServiceRecordV2ListFormDTO.java | 6 ++++++ .../com/epmet/controller/IcServiceRecordV2Controller.java | 1 + .../main/java/com/epmet/entity/IcServiceRecordV2Entity.java | 2 ++ .../db/migration/V0.0.26__add_service_v2_category.sql | 1 + .../src/main/resources/mapper/IcServiceRecordV2Dao.xml | 1 + 7 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.26__add_service_v2_category.sql diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceRecordV2DTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceRecordV2DTO.java index d86138657e..be41f030b1 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceRecordV2DTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceRecordV2DTO.java @@ -1,8 +1,9 @@ package com.epmet.dto; +import lombok.Data; + import java.io.Serializable; import java.util.Date; -import lombok.Data; /** @@ -109,4 +110,6 @@ public class IcServiceRecordV2DTO implements Serializable { */ private String policyId; + private String serviceCategoryKey; + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceRecordV2AddEditFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceRecordV2AddEditFormDTO.java index fff02eb997..0de6bc737f 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceRecordV2AddEditFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceRecordV2AddEditFormDTO.java @@ -37,6 +37,9 @@ public class IcServiceRecordV2AddEditFormDTO implements Serializable { */ @NotBlank(message = "服务名称不能为空", groups = {AddGroup.class}) private String serviceOrgType; + + @NotBlank(message = "serviceCategoryKey不能为空", groups = {AddGroup.class}) + private String serviceCategoryKey; /** * 服务组织Id */ diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceRecordV2ListFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceRecordV2ListFormDTO.java index 675bd575b4..a9eea1aa2b 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceRecordV2ListFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceRecordV2ListFormDTO.java @@ -3,6 +3,7 @@ package com.epmet.dto.form; import com.epmet.commons.tools.dto.form.PageFormDTO; import lombok.Data; +import javax.validation.constraints.NotBlank; import java.io.Serializable; /** @@ -15,11 +16,16 @@ public class ServiceRecordV2ListFormDTO extends PageFormDTO implements Serializa private static final long serialVersionUID = 88592831607216246L; + public interface ServiceRecordV2ListForm{} + /** * 服务名称 */ private String serviceName; + @NotBlank(message = "serviceCategoryKey不能为空",groups = ServiceRecordV2ListForm.class) + private String serviceCategoryKey; + /** * 服务组织ID */ diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceRecordV2Controller.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceRecordV2Controller.java index f451fafc81..9449689fc2 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceRecordV2Controller.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceRecordV2Controller.java @@ -92,6 +92,7 @@ public class IcServiceRecordV2Controller { */ @PostMapping("list") public Result serviceRecordV2List(@LoginUser TokenDto tokenDto, @RequestBody ServiceRecordV2ListFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, ServiceRecordV2ListFormDTO.ServiceRecordV2ListForm.class); formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setUserId(tokenDto.getUserId()); return new Result().ok(icServiceRecordV2Service.serviceRecordV2List(formDTO)); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceRecordV2Entity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceRecordV2Entity.java index e18eda964e..7f32333f2e 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceRecordV2Entity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceRecordV2Entity.java @@ -79,4 +79,6 @@ public class IcServiceRecordV2Entity extends BaseEpmetEntity { */ private String policyId; + private String serviceCategoryKey; + } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.26__add_service_v2_category.sql b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.26__add_service_v2_category.sql new file mode 100644 index 0000000000..d09a7eca73 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.26__add_service_v2_category.sql @@ -0,0 +1 @@ +alter table ic_service_record_v2 add COLUMN SERVICE_CATEGORY_KEY VARCHAR(64) comment '服务类别KEY' AFTER remark; \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceRecordV2Dao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceRecordV2Dao.xml index 7a7b4f1a68..89f8764a30 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceRecordV2Dao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceRecordV2Dao.xml @@ -19,6 +19,7 @@ left JOIN ic_service_feedback_v2 sf ON sf.SERVICE_RECORD_ID = sr.ID AND sf.DEL_FLAG = 0 INNER JOIN ic_service_scope_v2 ss ON ss.SERVICE_RECORD_ID = sr.ID AND ss.DEL_FLAG = '0' WHERE sr.DEL_FLAG = '0' + AND sr.SERVICE_CATEGORY_KEY = #{serviceCategoryKey} AND ss.OBJECT_ID_PATH LIKE concat('%',#{orgId},'%') AND sr.CUSTOMER_ID = #{customerId} From fa150c76dce247396938ac05c1a7df96b7908a30 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 25 Jul 2022 17:54:00 +0800 Subject: [PATCH 06/13] weiyi --- .../epmet/dto/form/policy/IcPolicyFormDTO.java | 2 ++ .../epmet/service/impl/IcPolicyServiceImpl.java | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/policy/IcPolicyFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/policy/IcPolicyFormDTO.java index c96aa65540..2e1f6896a0 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/policy/IcPolicyFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/policy/IcPolicyFormDTO.java @@ -95,5 +95,7 @@ public class IcPolicyFormDTO implements Serializable { @Valid @NotEmpty(message = "政策细则不能为空",groups =AddUserShowGroup.class ) private List ruleList; + + private String agencyId; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPolicyServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPolicyServiceImpl.java index 194b9561b2..424af6e5ae 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPolicyServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPolicyServiceImpl.java @@ -13,7 +13,6 @@ import com.epmet.commons.tools.feign.ResultDataResolver; 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.EpmetRequestHolder; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dao.*; @@ -27,7 +26,6 @@ import com.epmet.dto.form.policy.IcPolicyFormDTO; import com.epmet.dto.form.policy.IcPolicyPageFormDTO; import com.epmet.dto.form.policy.IcPolicyRuleDetailDTO; import com.epmet.dto.form.policy.IcPolicyRuleFormDTO; -import com.epmet.dto.result.resi.ResiByPolicyInfoResultDTO; import com.epmet.entity.*; import com.epmet.feign.EpmetAdminOpenFeignClient; import com.epmet.service.IcPolicyService; @@ -98,13 +96,14 @@ public class IcPolicyServiceImpl extends BaseServiceImpl policyEntityLambdaQueryWrapper=new LambdaQueryWrapper<>(); + policyEntityLambdaQueryWrapper.eq(IcPolicyEntity::getTitle,formDTO.getTitle()) + .eq(IcPolicyEntity::getOrgId,formDTO.getAgencyId()); + policyEntityLambdaQueryWrapper.ne(StringUtils.isNotBlank(formDTO.getPolicyId()),IcPolicyEntity::getId,formDTO.getPolicyId()); + int count=baseDao.selectCount(policyEntityLambdaQueryWrapper); + if(count>0){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"当前组织内已经存在相同标题的政策","当前组织内已经存在相同标题的政策"); + } List ruleList = formDTO.getRuleList(); for (IcPolicyRuleFormDTO rule : ruleList) { if (CollectionUtils.isEmpty(rule.getResiRuleList()) From c0176da35c570b00f5e3c0937475c775285f5fda Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Tue, 26 Jul 2022 15:44:06 +0800 Subject: [PATCH 07/13] =?UTF-8?q?=E3=80=90=E6=94=BF=E7=AD=96=E3=80=91?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=86=E9=A1=B5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ResiServiceImpl.java | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/ResiServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/ResiServiceImpl.java index 9c613b2c56..acc29d12f1 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/ResiServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/ResiServiceImpl.java @@ -94,6 +94,11 @@ public class ResiServiceImpl implements ResiService, ResultDataResolver { // 2.用户至少配置了house和stat规则的一个,那么就先查询房屋出来,然后根据房屋去找居民 int housePageNo = 1; int total = 0; + + // 只能手动分页了 + int start = (pageNo - 1) * pageSize; + int end = pageNo * pageSize; // 不包含 + do { // 拿到房屋id列表,去查询居民列表 List houseIds = govOrgService.listHouseIdsByRules(customerId, orgIdPath, orgId, orgType, neighborHoodId, buildingId, unitId, @@ -104,30 +109,32 @@ public class ResiServiceImpl implements ResiService, ResultDataResolver { break; } + // 查询居民数量 + Integer count = epmetUserService.getTotalByPolicyRules( + customerId, orgIdPath, orgId, orgType, neighborHoodId, buildingId, unitId, + houseId, idCard, name, resiRule, houseIds); + + total += count; + // 查询居民,满了20个,不再查询数据,只查询数量 - if (resultResis.size() < pageSize) { + if (resultResis.size() < end) { List resis = epmetUserService.listByPolicyRules( customerId, orgIdPath, orgId, orgType, neighborHoodId, buildingId, unitId, - houseId, idCard, name, pageNo, pageSize, resiRule, houseIds); + houseId, idCard, name, 1, end, resiRule, houseIds); resultResis.addAll(resis); } - // 查询数量 - Integer count = epmetUserService.getTotalByPolicyRules( - customerId, orgIdPath, orgId, orgType, neighborHoodId, buildingId, unitId, - houseId, idCard, name, resiRule, houseIds); - - total += count; - housePageNo ++; } while (true); - // 够了20个,那就截取前20个,否则直接返回 - if (resultResis.size() > 20) { - resultResis = resultResis.subList(0, 20); + // 查出来所有的数据都没够到这一页的起始条数,返回空 + if (resultResis.size() < start) { + return new PageData<>(new ArrayList<>(), total); } + resultResis = resultResis.subList(start, Math.min(end, resultResis.size())); + // 补充额外信息 fillResisExtraInfoForPolicy(resultResis); return new PageData<>(resultResis, total); From 05b6a6b6114c609bdf46b7190e01f962e829656c Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Tue, 26 Jul 2022 16:27:36 +0800 Subject: [PATCH 08/13] =?UTF-8?q?=E3=80=90=E6=94=BF=E7=AD=96=E3=80=91?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=86=E9=A1=B5varchar=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E7=9A=84birthday=E6=8E=A5=E6=94=B6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/ResiByPolicyInfoResultDTO.java | 2 +- .../dataaggre/service/impl/ResiServiceImpl.java | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/ResiByPolicyInfoResultDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/ResiByPolicyInfoResultDTO.java index da425762d7..822b444390 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/ResiByPolicyInfoResultDTO.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/ResiByPolicyInfoResultDTO.java @@ -42,5 +42,5 @@ public class ResiByPolicyInfoResultDTO { @ColumnWidth(10) private Integer age; @ExcelIgnore - private Date birthday; + private String birthday; } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/ResiServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/ResiServiceImpl.java index acc29d12f1..1b87efe324 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/ResiServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/ResiServiceImpl.java @@ -43,6 +43,8 @@ import java.time.format.DateTimeFormatter; import java.time.temporal.ChronoUnit; import java.time.temporal.TemporalUnit; import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import java.util.stream.Collectors; @Service @@ -60,6 +62,8 @@ public class ResiServiceImpl implements ResiService, ResultDataResolver { @Autowired private EpmetUserOpenFeignClient userOpenFeignClient; + public static final Pattern REG_DATE = Pattern.compile("^(\\d{4})-(\\d{2})-(\\d{2})"); + @Override public PageData listByPolicyRules(String orgId, String orgType, String neighborHoodId, String buildingId, String unitId, String houseId, String idCard, String name, Integer pageNo, Integer pageSize, @@ -212,8 +216,14 @@ public class ResiServiceImpl implements ResiService, ResultDataResolver { if (r.getBirthday() != null) { Integer age = null; try { - LocalDate birthdayLocalDate = LocalDateTime.ofInstant(r.getBirthday().toInstant(), ZoneId.systemDefault()).toLocalDate(); - age = Period.between(birthdayLocalDate, LocalDate.now()).getYears(); + Matcher matcher = REG_DATE.matcher(r.getBirthday()); + if (matcher.matches()) { + String year = matcher.group(1); + String month = matcher.group(2); + String day = matcher.group(3); + LocalDate birthdayLocalDate = LocalDate.of(Integer.parseInt(year), Integer.parseInt(month), Integer.parseInt(day)); + age = Period.between(birthdayLocalDate, LocalDate.now()).getYears(); + } } catch (DateTimeException e) { throw new EpmetException("居民生日计算错误"); } From c7d77cffcf43ca52f93870bee2f016bfb7ec5fe7 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Tue, 26 Jul 2022 16:38:46 +0800 Subject: [PATCH 09/13] =?UTF-8?q?=E3=80=90=E6=94=BF=E7=AD=96=E3=80=91?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=86=E9=A1=B5varchar=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E7=9A=84birthday=E6=8E=A5=E6=94=B6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dataaggre/service/impl/ResiServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/ResiServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/ResiServiceImpl.java index 1b87efe324..35d364e4c5 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/ResiServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/ResiServiceImpl.java @@ -223,11 +223,11 @@ public class ResiServiceImpl implements ResiService, ResultDataResolver { String day = matcher.group(3); LocalDate birthdayLocalDate = LocalDate.of(Integer.parseInt(year), Integer.parseInt(month), Integer.parseInt(day)); age = Period.between(birthdayLocalDate, LocalDate.now()).getYears(); + r.setAge(age); } } catch (DateTimeException e) { - throw new EpmetException("居民生日计算错误"); + logger.error(r.getIcResiUserId() + "居民生日计算错误"); } - r.setAge(age); } }); } From 09b3ee4ca08b6492017a331622df79b58a55b897 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Tue, 26 Jul 2022 16:49:51 +0800 Subject: [PATCH 10/13] =?UTF-8?q?=E3=80=90=E6=94=BF=E7=AD=96=E3=80=91?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataaggre/service/impl/ResiServiceImpl.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/ResiServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/ResiServiceImpl.java index 35d364e4c5..a74ee4eb2f 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/ResiServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/ResiServiceImpl.java @@ -150,13 +150,15 @@ public class ResiServiceImpl implements ResiService, ResultDataResolver { */ private void specificRuleConvert(List resiRule) { // 使用年龄计算出生日期 - resiRule.stream().forEach((r) -> { - if ("BIRTHDAY".equals(r.getColKey())) { - LocalDate birthday = LocalDate.now().minus(Long.valueOf(r.getColVal()), ChronoUnit.YEARS); - r.setQueryType(revertQueryType(r.getQueryType())); - r.setColVal(birthday.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); - } - }); + if (resiRule != null) { + resiRule.stream().forEach((r) -> { + if ("BIRTHDAY".equals(r.getColKey())) { + LocalDate birthday = LocalDate.now().minus(Long.valueOf(r.getColVal()), ChronoUnit.YEARS); + r.setQueryType(revertQueryType(r.getQueryType())); + r.setColVal(birthday.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); + } + }); + } } /** From 7b159e8d6b066e1a0817fd231ec24ce0c3019fe3 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Tue, 26 Jul 2022 17:06:10 +0800 Subject: [PATCH 11/13] =?UTF-8?q?=E3=80=90=E6=94=BF=E7=AD=96=E3=80=91?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/epmetuser/IcResiUserDao.xml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/IcResiUserDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/IcResiUserDao.xml index 703bcc2bfa..ffe08008ac 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/IcResiUserDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/IcResiUserDao.xml @@ -132,18 +132,22 @@ ic_resi_user.`VILLAGE_ID` as neighborhoodId, ic_resi_user.`BIRTHDAY` from ic_resi_user - - inner join #{rule.colTable} - + + + inner join #{rule.colTable} + + From 41c95f982372e47dcc21d89658d8998bc971f552 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Tue, 26 Jul 2022 17:39:00 +0800 Subject: [PATCH 12/13] =?UTF-8?q?=E3=80=90=E6=94=BF=E7=AD=96=E3=80=91?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/epmetuser/IcResiUserDao.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/IcResiUserDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/IcResiUserDao.xml index ffe08008ac..58fc07506f 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/IcResiUserDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/IcResiUserDao.xml @@ -134,7 +134,7 @@ from ic_resi_user - inner join #{rule.colTable} + inner join ${rule.colTable} @@ -145,7 +145,7 @@ from ic_resi_user - inner join #{rule.colTable} + inner join ${rule.colTable} From dcf0103853925c18e6ee2ad796d5f67ff6fa2766 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 27 Jul 2022 17:01:59 +0800 Subject: [PATCH 13/13] =?UTF-8?q?=E6=81=A2=E5=A4=8D=E5=B9=B4=E9=BE=84?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/db/migration/V0.0.34__policy_nianling.sql | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.34__policy_nianling.sql diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.34__policy_nianling.sql b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.34__policy_nianling.sql new file mode 100644 index 0000000000..b2792374e8 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.34__policy_nianling.sql @@ -0,0 +1,8 @@ +-- 恢复年龄组件 +UPDATE ic_form_item i +SET i.DEL_FLAG = '0', + i.COLUMN_NAME = 'BIRTHDAY', + i.POLICY_FLAG='1', + i.UPDATED_TIME = NOW() +WHERE + i.LABEL = '年龄'; \ No newline at end of file