From 75693df9b54a9ad0b8e0cb11ea14003b78895a04 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 27 Oct 2021 10:33:21 +0800 Subject: [PATCH] =?UTF-8?q?chaxun=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/IcFormItemDTO.java | 5 +- .../epmet/dto/result/ConditionResultDTO.java | 88 +++++++++++++++++++ .../epmet/controller/IcFormController.java | 20 +++++ .../java/com/epmet/dao/IcFormItemDao.java | 7 +- .../com/epmet/entity/IcFormItemEntity.java | 5 +- .../com/epmet/service/IcFormItemService.java | 12 +++ .../service/impl/IcFormItemServiceImpl.java | 16 ++++ .../main/resources/mapper/IcFormItemDao.xml | 46 ++++++++++ 8 files changed, 192 insertions(+), 7 deletions(-) create mode 100644 epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/ConditionResultDTO.java diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/IcFormItemDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/IcFormItemDTO.java index f670559b57..35133d48b6 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/IcFormItemDTO.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/IcFormItemDTO.java @@ -17,9 +17,10 @@ package com.epmet.dto; +import lombok.Data; + import java.io.Serializable; import java.util.Date; -import lombok.Data; /** @@ -74,7 +75,7 @@ public class IcFormItemDTO implements Serializable { private String itemType; /** - * 分组ID,'默认,NONE' + * 分组ID,'默认,0' */ private String itemGroupId; diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/ConditionResultDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/ConditionResultDTO.java new file mode 100644 index 0000000000..f88bdf2144 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/ConditionResultDTO.java @@ -0,0 +1,88 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Description 查询条件 + * @Author yinzuomei + * @Date 2021/10/27 9:09 上午 + */ +@Data +public class ConditionResultDTO implements Serializable { + private static final long serialVersionUID = -2021200288758478252L; + /** + * 父项ID + */ + private String itemId; + + /** + * 默认:ic_resi_user + */ + private String tableName; + + /** + * 父项ID + */ + private String parentItemId; + + /** + * 项标签 + */ + private String label; + + /** + * 控件类型,EG:INPUT;从字典获取 + */ + private String itemType; + + /** + * 分组ID,'默认,NONE' + */ + private String itemGroupId; + + /** + * 是否必填,1必填。0不必填 + */ + private Integer required; + + /** + * 手机号:mobile; 身份证:id_card + */ + private String validType; + + /** + * 默认值 + */ + private String defaultValue; + + /** + * 选项来源,REMOTE;LOCAL;如果是动态加载的下拉框或者CHECKBOX等的情况下使用。URL:接口获取(LABEL,VALUE);JSON:直接从JSON中取 + */ + private String optionSourceType; + + /** + * 来源地址,REMOTE才有,固定格式;如果OPTIONS_SOURCE是URL,则此处填写要调用的接口的URL相对路径,例如:/API/GOV/ORG/XXXX。此处不应设置参数,若需要参数应当完全由后端,通过TOKEN信息来获取 + */ + private String optionSourceValue; + + /** + * 排序 + */ + private Integer sort; + + /** + * 占位提示语 + */ + private String placeholder; + + /** + * 列名 + */ + private String columnName; + + private List options; +} + diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcFormController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcFormController.java index d89f303291..b66f95f083 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcFormController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcFormController.java @@ -29,8 +29,10 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcFormDTO; import com.epmet.dto.form.CustomerFormQueryDTO; +import com.epmet.dto.result.ConditionResultDTO; import com.epmet.dto.result.CustomerFormResultDTO; import com.epmet.excel.IcFormExcel; +import com.epmet.service.IcFormItemService; import com.epmet.service.IcFormService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -52,6 +54,8 @@ public class IcFormController { @Autowired private IcFormService icFormService; + @Autowired + private IcFormItemService icFormItemService; @GetMapping("page") public Result> page(@RequestParam Map params){ @@ -109,6 +113,22 @@ public class IcFormController { formDto.setCustomerId(tokenDto.getCustomerId()); ValidatorUtils.validateEntity(formDto,CustomerFormQueryDTO.AddUserInternalGroup.class); return new Result().ok(icFormService.getCustomerForm(formDto)); + } + + /** + * 获取居民信息的查询条件,组件列表 + * + * @param tokenDto + * @param formDto + * @return com.epmet.commons.tools.utils.Result> + * @author yinzuomei + * @date 2021/10/27 9:18 上午 + */ + @PostMapping("conditionlist") + public Result> queryConditionList(@LoginUser TokenDto tokenDto, @RequestBody CustomerFormQueryDTO formDto){ + formDto.setCustomerId(tokenDto.getCustomerId()); + ValidatorUtils.validateEntity(formDto,CustomerFormQueryDTO.AddUserInternalGroup.class); + return new Result>().ok(icFormItemService.queryConditionList(formDto)); } } \ No newline at end of file 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 44086df26f..ce99cb4927 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 @@ -18,8 +18,12 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.ConditionResultDTO; import com.epmet.entity.IcFormItemEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 表单项 @@ -29,5 +33,6 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcFormItemDao extends BaseDao { - + + List selectConditionList(@Param("customerId") String customerId, @Param("formCode") String formCode); } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcFormItemEntity.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcFormItemEntity.java index 78e0934311..c5c509ea25 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcFormItemEntity.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcFormItemEntity.java @@ -18,13 +18,10 @@ package com.epmet.entity; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; - /** * 表单项 * @@ -74,7 +71,7 @@ public class IcFormItemEntity extends BaseEpmetEntity { private String itemType; /** - * 分组ID,'默认,NONE' + * 分组ID,'默认,0' */ private String itemGroupId; 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 8a2aacd4bc..5fd14e3ef5 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 @@ -20,6 +20,8 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcFormItemDTO; +import com.epmet.dto.form.CustomerFormQueryDTO; +import com.epmet.dto.result.ConditionResultDTO; import com.epmet.entity.IcFormItemEntity; import java.util.List; @@ -92,4 +94,14 @@ public interface IcFormItemService extends BaseService { * @date 2021-10-26 */ void delete(String[] ids); + + /** + * 获取居民信息的查询条件,组件列表 + * + * @param formDto + * @return java.util.List + * @author yinzuomei + * @date 2021/10/27 9:19 上午 + */ + List queryConditionList(CustomerFormQueryDTO formDto); } \ No newline at end of file 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 2c312272af..40bec48d08 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 @@ -25,6 +25,8 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.dao.IcFormItemDao; import com.epmet.dto.IcFormItemDTO; +import com.epmet.dto.form.CustomerFormQueryDTO; +import com.epmet.dto.result.ConditionResultDTO; import com.epmet.entity.IcFormItemEntity; import com.epmet.service.IcFormItemService; import org.apache.commons.lang3.StringUtils; @@ -97,4 +99,18 @@ public class IcFormItemServiceImpl extends BaseServiceImpl + * @author yinzuomei + * @date 2021/10/27 9:19 上午 + */ + @Override + public List queryConditionList(CustomerFormQueryDTO formDto) { + List list=baseDao.selectConditionList(formDto.getCustomerId(),formDto.getFormCode()); + return list; + } + } \ No newline at end of file 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 0bb11f58bf..5c1a6ab869 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 @@ -4,5 +4,51 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file