From a01c5945f7a2be3ffdf1fcf7075e2bf995d02be2 Mon Sep 17 00:00:00 2001 From: chenrui <1950717904@qq.com> Date: Thu, 24 Oct 2024 14:43:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=AD=97=E5=85=B8API=20servi?= =?UTF-8?q?ce?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../emergencyDictServiceApi/pom.xml | 19 ++ .../com/zdxt/dict/dto/BasDutyDictBean.java | 218 +++++++++++++++ .../zdxt/dict/dto/BasDutyDictItemBean.java | 253 ++++++++++++++++++ .../java/com/zdxt/dict/feign/BasDictApi.java | 45 ++++ .../com/zdxt/dict/feign/BasDictItemApi.java | 48 ++++ lib/EmergencyServiceApi/pom.xml | 1 + 6 files changed, 584 insertions(+) create mode 100644 lib/EmergencyServiceApi/emergencyDictServiceApi/pom.xml create mode 100644 lib/EmergencyServiceApi/emergencyDictServiceApi/src/main/java/com/zdxt/dict/dto/BasDutyDictBean.java create mode 100644 lib/EmergencyServiceApi/emergencyDictServiceApi/src/main/java/com/zdxt/dict/dto/BasDutyDictItemBean.java create mode 100644 lib/EmergencyServiceApi/emergencyDictServiceApi/src/main/java/com/zdxt/dict/feign/BasDictApi.java create mode 100644 lib/EmergencyServiceApi/emergencyDictServiceApi/src/main/java/com/zdxt/dict/feign/BasDictItemApi.java diff --git a/lib/EmergencyServiceApi/emergencyDictServiceApi/pom.xml b/lib/EmergencyServiceApi/emergencyDictServiceApi/pom.xml new file mode 100644 index 00000000..33060f58 --- /dev/null +++ b/lib/EmergencyServiceApi/emergencyDictServiceApi/pom.xml @@ -0,0 +1,19 @@ + + + + EmergencyServiceApi + EmergencyServiceApi + 1.0 + + 4.0.0 + + emergencyDictServiceApi + + + 8 + 8 + + + \ No newline at end of file diff --git a/lib/EmergencyServiceApi/emergencyDictServiceApi/src/main/java/com/zdxt/dict/dto/BasDutyDictBean.java b/lib/EmergencyServiceApi/emergencyDictServiceApi/src/main/java/com/zdxt/dict/dto/BasDutyDictBean.java new file mode 100644 index 00000000..df8d12bf --- /dev/null +++ b/lib/EmergencyServiceApi/emergencyDictServiceApi/src/main/java/com/zdxt/dict/dto/BasDutyDictBean.java @@ -0,0 +1,218 @@ +package com.zdxt.dict.dto; + +/** + * Created with IntelliJ IDEA. + * Description: + * User: huangJialin + * Date: 2020-04-11 + * Time: 14:08 + */ +public class BasDutyDictBean { + /** + * 字典id + */ + private String dataDictId; + + /** + * 字典名称 + */ + private String dataDictName; + + /** + * 字典值 + */ + private String dataDictValue; + + /** + * 字典描述 + */ + private String dataDictDesc; + + /** + * 父字典id + */ + private String parentId; + + /** + * 父链 + */ + private String parentIdList; + + /** + * 字典的类型:1-系统字典(不显示),2-业务字典(显示能修改、不能删除),3-用户定义字典(能执行任何操作) + */ + private Long dictType; + + /** + * 拥有的孩子的个数 + */ + private Long childCount; + + /** + * 共享类型 + */ + private Long shareType; + + /** + * 排序号 + */ + private Integer orderId; + + /** + * 租户id + */ + private String sassId; + + /** + * 预留字段1 + */ + private String expand1; + + /** + * 预留字段2 + */ + private String expand2; + + /** + * 预留字段3 + */ + private String expand3; + + /** + * 预留字段4 + */ + private String expand4; + + /** + * 预留字段5 + */ + private String expand5; + + public String getDataDictId() { + return dataDictId; + } + + public void setDataDictId(String dataDictId) { + this.dataDictId = dataDictId; + } + + public String getDataDictName() { + return dataDictName; + } + + public void setDataDictName(String dataDictName) { + this.dataDictName = dataDictName; + } + + public String getDataDictValue() { + return dataDictValue; + } + + public void setDataDictValue(String dataDictValue) { + this.dataDictValue = dataDictValue; + } + + public String getDataDictDesc() { + return dataDictDesc; + } + + public void setDataDictDesc(String dataDictDesc) { + this.dataDictDesc = dataDictDesc; + } + + public String getParentId() { + return parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public String getParentIdList() { + return parentIdList; + } + + public void setParentIdList(String parentIdList) { + this.parentIdList = parentIdList; + } + + public Long getDictType() { + return dictType; + } + + public void setDictType(Long dictType) { + this.dictType = dictType; + } + + public Long getChildCount() { + return childCount; + } + + public void setChildCount(Long childCount) { + this.childCount = childCount; + } + + public Long getShareType() { + return shareType; + } + + public void setShareType(Long shareType) { + this.shareType = shareType; + } + + public Integer getOrderId() { + return orderId; + } + + public void setOrderId(Integer orderId) { + this.orderId = orderId; + } + + public String getSassId() { + return sassId; + } + + public void setSassId(String sassId) { + this.sassId = sassId; + } + + public String getExpand1() { + return expand1; + } + + public void setExpand1(String expand1) { + this.expand1 = expand1; + } + + public String getExpand2() { + return expand2; + } + + public void setExpand2(String expand2) { + this.expand2 = expand2; + } + + public String getExpand3() { + return expand3; + } + + public void setExpand3(String expand3) { + this.expand3 = expand3; + } + + public String getExpand4() { + return expand4; + } + + public void setExpand4(String expand4) { + this.expand4 = expand4; + } + + public String getExpand5() { + return expand5; + } + + public void setExpand5(String expand5) { + this.expand5 = expand5; + } +} diff --git a/lib/EmergencyServiceApi/emergencyDictServiceApi/src/main/java/com/zdxt/dict/dto/BasDutyDictItemBean.java b/lib/EmergencyServiceApi/emergencyDictServiceApi/src/main/java/com/zdxt/dict/dto/BasDutyDictItemBean.java new file mode 100644 index 00000000..6863de82 --- /dev/null +++ b/lib/EmergencyServiceApi/emergencyDictServiceApi/src/main/java/com/zdxt/dict/dto/BasDutyDictItemBean.java @@ -0,0 +1,253 @@ +package com.zdxt.dict.dto; + +import java.util.Date; + +/** + * Created with IntelliJ IDEA. + * Description: + * User: huangJialin + * Date: 2020-04-11 + * Time: 14:44 + */ +public class BasDutyDictItemBean { + /** 字典项id */ + private String paramItemId; + + /** 字典id */ + private String dataDictId; + + /** 字典项名称 */ + private String paramValue; + + /** 字典项值,可以用于对同一个字典下的字典项进行排序、比较大小操作等 */ + private String paramId; + + /** 描述 */ + + private String paramDesc; + + /** 字典的类型:1-系统字典(不显示),2-业务字典(显示能修改),3-用户定义字典(能执行任何操作) */ + private Integer paramType; + + /** 参数状态【1:有效 0:无效/未启用 2:删除】 */ + private Integer paramState; + + /** 参数使用次数 */ + private Integer times; + + /** 加密类型 */ + private String encryptType; + + /** 是否需要缓存 */ + private Integer isNeedCache; + + /** 是否需要自动更新 */ + private Integer isNeedAutoRefresh; + + /** 参数产生时间 */ + private Date activeTime; + + /** 参数销毁时间 */ + private Date deactiveTime; + + /** 参数修改时间 */ + private Date lastUpdateTime; + + /** 更新人 */ + private String updateOperator; + + /** 参数名称 -拓展用【可用于从第三方系统导入使用】 */ + private String paramExternValue; + + /** 参数值 -拓展用【可用于从第三方系统导入使用】 */ + private Integer paramExternId; + + /** 共享类型 */ + private Integer shareType; + + /** 排序号 */ + private Integer orderId; + + /** 租户id */ + private String sassId; + + private String expand1; + + private String expand2; + + public String getParamItemId() { + return paramItemId; + } + + public void setParamItemId(String paramItemId) { + this.paramItemId = paramItemId; + } + + public String getDataDictId() { + return dataDictId; + } + + public void setDataDictId(String dataDictId) { + this.dataDictId = dataDictId; + } + + public String getParamValue() { + return paramValue; + } + + public void setParamValue(String paramValue) { + this.paramValue = paramValue; + } + + public String getParamId() { + return paramId; + } + + public void setParamId(String paramId) { + this.paramId = paramId; + } + + public String getParamDesc() { + return paramDesc; + } + + public void setParamDesc(String paramDesc) { + this.paramDesc = paramDesc; + } + + public Integer getParamType() { + return paramType; + } + + public void setParamType(Integer paramType) { + this.paramType = paramType; + } + + public Integer getParamState() { + return paramState; + } + + public void setParamState(Integer paramState) { + this.paramState = paramState; + } + + public Integer getTimes() { + return times; + } + + public void setTimes(Integer times) { + this.times = times; + } + + public String getEncryptType() { + return encryptType; + } + + public void setEncryptType(String encryptType) { + this.encryptType = encryptType; + } + + public Integer getIsNeedCache() { + return isNeedCache; + } + + public void setIsNeedCache(Integer isNeedCache) { + this.isNeedCache = isNeedCache; + } + + public Integer getIsNeedAutoRefresh() { + return isNeedAutoRefresh; + } + + public void setIsNeedAutoRefresh(Integer isNeedAutoRefresh) { + this.isNeedAutoRefresh = isNeedAutoRefresh; + } + + public Date getActiveTime() { + return activeTime; + } + + public void setActiveTime(Date activeTime) { + this.activeTime = activeTime; + } + + public Date getDeactiveTime() { + return deactiveTime; + } + + public void setDeactiveTime(Date deactiveTime) { + this.deactiveTime = deactiveTime; + } + + public Date getLastUpdateTime() { + return lastUpdateTime; + } + + public void setLastUpdateTime(Date lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getUpdateOperator() { + return updateOperator; + } + + public void setUpdateOperator(String updateOperator) { + this.updateOperator = updateOperator; + } + + public String getParamExternValue() { + return paramExternValue; + } + + public void setParamExternValue(String paramExternValue) { + this.paramExternValue = paramExternValue; + } + + public Integer getParamExternId() { + return paramExternId; + } + + public void setParamExternId(Integer paramExternId) { + this.paramExternId = paramExternId; + } + + public Integer getShareType() { + return shareType; + } + + public void setShareType(Integer shareType) { + this.shareType = shareType; + } + + public Integer getOrderId() { + return orderId; + } + + public void setOrderId(Integer orderId) { + this.orderId = orderId; + } + + public String getSassId() { + return sassId; + } + + public void setSassId(String sassId) { + this.sassId = sassId; + } + + public String getExpand1() { + return expand1; + } + + public void setExpand1(String expand1) { + this.expand1 = expand1; + } + + public String getExpand2() { + return expand2; + } + + public void setExpand2(String expand2) { + this.expand2 = expand2; + } +} diff --git a/lib/EmergencyServiceApi/emergencyDictServiceApi/src/main/java/com/zdxt/dict/feign/BasDictApi.java b/lib/EmergencyServiceApi/emergencyDictServiceApi/src/main/java/com/zdxt/dict/feign/BasDictApi.java new file mode 100644 index 00000000..1a6318f6 --- /dev/null +++ b/lib/EmergencyServiceApi/emergencyDictServiceApi/src/main/java/com/zdxt/dict/feign/BasDictApi.java @@ -0,0 +1,45 @@ +package com.zdxt.dict.feign; + +import com.zdxt.common.Ztree; +import com.zdxt.dict.dto.BasDutyDictBean; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +/** + * Created with IntelliJ IDEA. + * Description: + * User: huangJialin + * Date: 2020-04-11 + * Time: 14:06 + */ +@Api(tags={"事件类型API2"}) +@RestController +@RequestMapping("/api/basDict") +public interface BasDictApi { + /** + * 根据字典值查询左侧id内容 + * @param + * @return + */ + @GetMapping("/getDutyDictList") + @ApiOperation("默认查询突发事件大类型") + List getDutyDictList(); + + @GetMapping("/getDutyDictData") + @ApiOperation("查询应急值守左侧字典值") + List getDutyDictData(BasDutyDictBean bean); + + @GetMapping("/getDutyDictValue") + @ApiOperation("根据字典值查询左侧字典值") + List getDutyDictValue(String dictValue); + + @GetMapping("/getDictAndItemZtreeByDictValue") + @ApiOperation("通过数据字典值,获取包含字典项的ztree数据") + List getDictAndItemZtreeByDictValue(String dataDictValue); + +} diff --git a/lib/EmergencyServiceApi/emergencyDictServiceApi/src/main/java/com/zdxt/dict/feign/BasDictItemApi.java b/lib/EmergencyServiceApi/emergencyDictServiceApi/src/main/java/com/zdxt/dict/feign/BasDictItemApi.java new file mode 100644 index 00000000..f9b75d84 --- /dev/null +++ b/lib/EmergencyServiceApi/emergencyDictServiceApi/src/main/java/com/zdxt/dict/feign/BasDictItemApi.java @@ -0,0 +1,48 @@ +package com.zdxt.dict.feign; + +import com.zdxt.dict.dto.BasDutyDictItemBean; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +/** + * Created with IntelliJ IDEA. + * Description: + * User: huangJialin + * Date: 2020-04-11 + * Time: 14:07 + */ +@Api(tags={"字典API"}) +@RestController +@RequestMapping("/api/basDictItem") +public interface BasDictItemApi { + /** + * 根据字典值查询左侧id内容 + * @param basDutyDictBean + * @return + */ + @GetMapping("/getDutyDictList") + @ApiOperation("根据字典值查询右侧字典") + List getDutyDictItemList(String dataDictValue); + + @GetMapping("/getDutyDictValueItem") + @ApiOperation("根据字典值和字典名称查询字典") + List getDutyDictValueItem(String dataDictValue, String dictName); + + @GetMapping("/getDutyDictItemById") + @ApiOperation("根据字典值和字典名称查询字典") + BasDutyDictItemBean getDutyDictItemById(String type); + + @GetMapping("/getDutyDictItemByDictValueAndParamId") + @ApiOperation("根据字典类型和字典值查询字典") + BasDutyDictItemBean getDutyDictItemByDictValueAndParamId(String dictValue, String paramId); + + @GetMapping("/getSelect2DataByDataDictValue") + @ApiOperation("通过数据字典值,获取select2下拉框形式的数据") + String getSelect2DataByDataDictValue(String dataDictValue, String echoData); + +} diff --git a/lib/EmergencyServiceApi/pom.xml b/lib/EmergencyServiceApi/pom.xml index 28c5b01c..d4db27cf 100644 --- a/lib/EmergencyServiceApi/pom.xml +++ b/lib/EmergencyServiceApi/pom.xml @@ -16,6 +16,7 @@ EmergencyAuthServiceApi emergencyCommonServiceApi emergencyExcelServiceApi + emergencyDictServiceApi