diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/IcFormItemGroupLisFormDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/IcFormItemGroupLisFormDTO.java index 49624a71d1..15b26e7f7d 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/IcFormItemGroupLisFormDTO.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/IcFormItemGroupLisFormDTO.java @@ -81,4 +81,10 @@ public class IcFormItemGroupLisFormDTO extends PageFormDTO { * 1展示,0不展示,默认1 */ private Boolean display; + + /** + * 1:政策招人 + * 0:居民信息导出 + */ + private String policyFlag; } diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/IcFormItemQueryDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/IcFormItemQueryDTO.java new file mode 100644 index 0000000000..bdb67e2d52 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/IcFormItemQueryDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 查询分组下的组件;前端再政策招人那个界面,传入分组id,policyFlag查询 + * @Author yzm + * @Date 2022/7/19 9:24 + */ +@Data +public class IcFormItemQueryDTO implements Serializable { + public interface AddUserInternalGroup { + } + + @NotBlank(message = "客户Id不能为空", groups = AddUserInternalGroup.class) + private String customerId; + + private String groupId; + /** + * 政策人员信息组件;1:展示;0:不展示;默认0 + */ + private String policyFlag; +} + diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/FormItemBaseResult.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/FormItemBaseResult.java index c8707fcbc1..fb8d1412a7 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/FormItemBaseResult.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/FormItemBaseResult.java @@ -3,6 +3,7 @@ package com.epmet.dto.result; import lombok.Data; import java.io.Serializable; +import java.util.List; /** * @Description 基础表单项 @@ -59,6 +60,12 @@ public class FormItemBaseResult implements Serializable { * 是否支持添加(即多对一,eg:需求列表) */ private boolean supportAdd; + /** + * 控件类型,EG:INPUT;从字典获取 + */ + private String itemType; + private String customerId; + private List options; } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcFormItemController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcFormItemController.java index 0d6070e7f6..9d1c814eb6 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcFormItemController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcFormItemController.java @@ -20,6 +20,7 @@ package com.epmet.controller; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.EditIFormItemFormDTO; +import com.epmet.dto.form.IcFormItemQueryDTO; import com.epmet.dto.result.ColumnTableNameResultDTO; import com.epmet.dto.result.FormItemBaseResult; import com.epmet.dto.result.ResiCategoryItemResultDTO; @@ -99,4 +100,16 @@ public class IcFormItemController { List list = icFormItemService.getItemListByGroupId(customerId,groupId); return new Result().ok(list); } + + /** + * 根据分组id 获取分组下的item + * @return + */ + @PostMapping("getItemListV2") + public Result> getItemListByGroupId(@RequestHeader String customerId, @RequestBody IcFormItemQueryDTO formDto){ + formDto.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDto,IcFormItemQueryDTO.AddUserInternalGroup.class); + List list = icFormItemService.getItemListByGroupIdV2(customerId,formDto.getGroupId(),formDto.getPolicyFlag()); + return new Result().ok(list); + } } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcFormItemDao.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcFormItemDao.java index fda1c91afc..9737ddb90f 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcFormItemDao.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcFormItemDao.java @@ -96,4 +96,5 @@ public interface IcFormItemDao extends BaseDao { * @return */ List getItemListByGroupId(@Param("customerId") String customerId, @Param("groupId") String groupId); + List getItemListByGroupIdV2(@Param("customerId") String customerId, @Param("groupId") String groupId,@Param("policyFlag")String policyFlag); } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcFormItemGroupEntity.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcFormItemGroupEntity.java index 29e5cec078..af11e9b05c 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcFormItemGroupEntity.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcFormItemGroupEntity.java @@ -75,4 +75,8 @@ public class IcFormItemGroupEntity extends BaseEpmetEntity { */ private Boolean display; + /** + * 政策人员信息组件;1:展示;0:不展示;默认0 + */ + private String policyFlag; } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcFormItemService.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcFormItemService.java index b60e178ea2..435e703e33 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcFormItemService.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcFormItemService.java @@ -91,4 +91,5 @@ public interface IcFormItemService extends BaseService { * @return */ List getItemListByGroupId(String customerId, String groupId); + List getItemListByGroupIdV2(String customerId, String groupId,String policyFlag); } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormItemGroupServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormItemGroupServiceImpl.java index 7eee10c186..0241c9e9ba 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormItemGroupServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormItemGroupServiceImpl.java @@ -25,6 +25,7 @@ import com.epmet.dto.IcFormItemGroupDTO; import com.epmet.dto.form.IcFormItemGroupLisFormDTO; import com.epmet.entity.IcFormItemGroupEntity; import com.epmet.service.IcFormItemGroupService; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -45,7 +46,8 @@ public class IcFormItemGroupServiceImpl extends BaseServiceImpl list(IcFormItemGroupLisFormDTO params) { LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); wrapper.eq(IcFormItemGroupEntity::getCustomerId, params.getCustomerId()) - .orderByAsc(IcFormItemGroupEntity::getSort); + .eq(StringUtils.isNotBlank(params.getPolicyFlag()), IcFormItemGroupEntity::getPolicyFlag, params.getPolicyFlag()) + .orderByAsc(IcFormItemGroupEntity::getSort); List entityList = baseDao.selectList(wrapper); return ConvertUtils.sourceToTarget(entityList, IcFormItemGroupDTO.class); diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormItemServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormItemServiceImpl.java index 06c8c1ed14..c3b2e35991 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormItemServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormItemServiceImpl.java @@ -269,6 +269,10 @@ public class IcFormItemServiceImpl extends BaseServiceImpl getItemListByGroupIdV2(String customerId, String groupId,String policyFlag) { + return baseDao.getItemListByGroupIdV2(customerId,groupId,policyFlag); + } private String queryType(String itemType) { /*switch (itemType) { diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcFormItemDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcFormItemDao.xml index 20974d2afa..689a90a30a 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcFormItemDao.xml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcFormItemDao.xml @@ -257,9 +257,58 @@ CONCAT(ifi.COLUMN_NAME, if(ifi.COLUMN_NUM = 0, '', ifi.COLUMN_NUM)) columnName FROM ic_form_item ifi - LEFT JOIN ic_form_item_group ifig ON ifi.ITEM_GROUP_ID = ifig.ID + LEFT JOIN ic_form_item_group ifig ON ifi.ITEM_GROUP_ID = ifig.ID WHERE ITEM_GROUP_ID = #{groupId} and ifi.CUSTOMER_ID = #{customerId} + and ifi.del_flag='0' + AND LENGTH(ifi.COLUMN_NAME)>0 + ORDER BY ifi.SORT + + + + + + + + + + + + + + + + + + + + +