Browse Source

Merge remote-tracking branch 'origin/dev_policy_service' into dev_policy_service

master
wangxianzhang 3 years ago
parent
commit
e59f5b5d93
  1. 22
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/ResiByPolicyInfoResultDTO.java
  2. 6
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/IcUserController.java
  3. 4
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/ResiService.java
  4. 113
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/ResiServiceImpl.java
  5. 16
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/IcResiUserDao.xml
  6. 5
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceRecordV2DTO.java
  7. 3
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceRecordV2AddEditFormDTO.java
  8. 6
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceRecordV2ListFormDTO.java
  9. 4
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/policy/IcPolicyFormDTO.java
  10. 1
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceRecordV2Controller.java
  11. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceRecordV2Entity.java
  12. 16
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPolicyServiceImpl.java
  13. 12
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.24__ic_policy.sql
  14. 1
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.26__add_service_v2_category.sql
  15. 1
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceRecordV2Dao.xml
  16. 3
      epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.33__policy_flagbugfix.sql
  17. 8
      epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.34__policy_nianling.sql

22
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;
private Date birthday;
@ExcelIgnore
private String birthday;
}

6
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文件失败");
}

4
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<ResisByPolicyRulesFormDTO.ResiRule> resiRule,
List<ResisByPolicyRulesFormDTO.HouseRule> houseRule,
List<ResisByPolicyRulesFormDTO.StatRule> statRule,

113
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;
@ -41,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
@ -58,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<ResiByPolicyInfoResultDTO> listByPolicyRules(String orgId, String orgType, String neighborHoodId, String buildingId, String unitId,
String houseId, String idCard, String name, Integer pageNo, Integer pageSize,
@ -92,6 +98,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<String> houseIds = govOrgService.listHouseIdsByRules(customerId, orgIdPath, orgId, orgType, neighborHoodId, buildingId, unitId,
@ -102,30 +113,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<ResiByPolicyInfoResultDTO> 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);
@ -137,13 +150,15 @@ public class ResiServiceImpl implements ResiService, ResultDataResolver {
*/
private void specificRuleConvert(List<ResisByPolicyRulesFormDTO.ResiRule> 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")));
}
});
}
}
/**
@ -203,19 +218,25 @@ 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();
r.setAge(age);
}
} catch (DateTimeException e) {
throw new EpmetException("居民生日计算错误");
logger.error(r.getIcResiUserId() + "居民生日计算错误");
}
r.setAge(age);
}
});
}
@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<ResisByPolicyRulesFormDTO.ResiRule> resiRule,
List<ResisByPolicyRulesFormDTO.HouseRule> houseRule,
List<ResisByPolicyRulesFormDTO.StatRule> statRule,
@ -234,24 +255,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<ResiByPolicyInfoResultDTO> resis = this.listByPolicyRules(orgId, orgType, neighborHoodId, buildingId, unitId,
houseId, idCard, name, pageNo, pageSize, resiRule, houseRule, statRule);
List<ResiByPolicyInfoResultDTO> list = resis.getList();
List<ResisByPolicyExcel> 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<ResiByPolicyInfoResultDTO> resis = this.listByPolicyRules(orgId, orgType, neighborHoodId, buildingId, unitId,
houseId, idCard, name, pageNo, pageSize, resiRule, houseRule, statRule);
List<ResiByPolicyInfoResultDTO> list = resis.getList();
List<ResisByPolicyExcel> 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();
}
}
}

16
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/IcResiUserDao.xml

@ -141,18 +141,22 @@
ic_resi_user.`VILLAGE_ID` as neighborhoodId,
ic_resi_user.`BIRTHDAY`
from ic_resi_user
<foreach collection="resiRules" item="rule">
<if test="rule.colTable != 'ic_resi_user'"> inner join #{rule.colTable}</if>
</foreach>
<if test="resiRules != null and resiRules.size() > 0">
<foreach collection="resiRules" item="rule">
<if test="rule.colTable != 'ic_resi_user'"> inner join ${rule.colTable}</if>
</foreach>
</if>
<include refid="segmentForPolicyRules"></include>
</select>
<select id="getTotalByPolicyRules" resultType="int">
select count(1)
from ic_resi_user
<foreach collection="resiRules" item="rule">
<if test="rule.colTable != 'ic_resi_user'"> inner join #{rule.colTable}</if>
</foreach>
<if test="resiRules != null and resiRules.size() > 0">
<foreach collection="resiRules" item="rule">
<if test="rule.colTable != 'ic_resi_user'"> inner join ${rule.colTable}</if>
</foreach>
</if>
<include refid="segmentForPolicyRules"></include>
</select>

5
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;
}

3
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
*/

6
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
*/

4
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;
@ -95,5 +95,7 @@ public class IcPolicyFormDTO implements Serializable {
@Valid
@NotEmpty(message = "政策细则不能为空",groups =AddUserShowGroup.class )
private List<IcPolicyRuleFormDTO> ruleList;
private String agencyId;
}

1
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<PageData> serviceRecordV2List(@LoginUser TokenDto tokenDto, @RequestBody ServiceRecordV2ListFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, ServiceRecordV2ListFormDTO.ServiceRecordV2ListForm.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
return new Result<PageData>().ok(icServiceRecordV2Service.serviceRecordV2List(formDTO));

2
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;
}

16
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<IcPolicyDao, IcPolicyEn
@Transactional(rollbackFor = Exception.class)
@Override
public void addOrUpdatePolicy(IcPolicyFormDTO formDTO) {
// 校验参数
checkAddFormDTO(formDTO);
// 设置所属组织
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
if (null == staffInfo || StringUtils.isBlank(staffInfo.getAgencyId())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "工作人员缓存信息异常", "工作人员信息异常");
}
formDTO.setAgencyId(staffInfo.getAgencyId());
// 校验参数
checkAddFormDTO(formDTO);
IcPolicyEntity icPolicyEntity = ConvertUtils.sourceToTarget(formDTO, IcPolicyEntity.class);
icPolicyEntity.setOrgId(staffInfo.getAgencyId());
icPolicyEntity.setOrgIdPath(StringUtils.isNotBlank(staffInfo.getAgencyPIds()) ? staffInfo.getAgencyPIds().concat(StrConstant.COLON).concat(staffInfo.getAgencyId()) : staffInfo.getAgencyId());
@ -208,6 +207,15 @@ public class IcPolicyServiceImpl extends BaseServiceImpl<IcPolicyDao, IcPolicyEn
private void checkAddFormDTO(IcPolicyFormDTO formDTO) {
//同组织下,政策标题唯一
LambdaQueryWrapper<IcPolicyEntity> 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<IcPolicyRuleFormDTO> ruleList = formDTO.getRuleList();
for (IcPolicyRuleFormDTO rule : ruleList) {
if (CollectionUtils.isEmpty(rule.getResiRuleList())

12
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='政策找人规则组件表';
) 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');

1
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;

1
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}
<if test='serviceName != null and serviceName != ""'>

3
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';

8
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 = '年龄';
Loading…
Cancel
Save