diff --git a/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/orgapplyinfo/entity/OrgAllInfo.java b/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/orgapplyinfo/entity/OrgAllInfo.java index fac0f4b..50647fe 100644 --- a/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/orgapplyinfo/entity/OrgAllInfo.java +++ b/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/orgapplyinfo/entity/OrgAllInfo.java @@ -39,6 +39,10 @@ public class OrgAllInfo implements Serializable { * 是否标准指令库 0是1否 */ private String izDirectiveMain; + /** + * 是否标准标签库 0是1否 + */ + private String izElderTagMain; /** * 媒体资源访问地址 */ diff --git a/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/orgapplyinfo/mapper/xml/OrgApplyInfoMapper.xml b/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/orgapplyinfo/mapper/xml/OrgApplyInfoMapper.xml index 39dca90..6be1d24 100644 --- a/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/orgapplyinfo/mapper/xml/OrgApplyInfoMapper.xml +++ b/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/orgapplyinfo/mapper/xml/OrgApplyInfoMapper.xml @@ -10,6 +10,7 @@ d.url, d.plat_type, d.iz_directive_main, + d.iz_elder_tag_main, d.media_url, o.open_id, o.wechat_name, diff --git a/nursing-unit-api/src/main/java/com/nu/modules/common/NuCommonApi.java b/nursing-unit-api/src/main/java/com/nu/modules/common/NuCommonApi.java index 2748c4f..586bb31 100644 --- a/nursing-unit-api/src/main/java/com/nu/modules/common/NuCommonApi.java +++ b/nursing-unit-api/src/main/java/com/nu/modules/common/NuCommonApi.java @@ -32,12 +32,18 @@ public class NuCommonApi { return Result.ok(sysBaseAPI.getOrgInfo(orgCode)); } - //获取标准指令库信息 + //获取标准指令库机构信息 @GetMapping("/getDMOrgInfo") public Result getDMOrgInfo(){ return Result.ok(sysBaseAPI.getDMOrgInfo()); } + //获取长者标准标签库机构信息 + @GetMapping("/getETMOrgInfo") + public Result getETMOrgInfo(){ + return Result.ok(sysBaseAPI.getETMOrgInfo()); + } + /** * 根据父id查询对应省、市、区/县 列表 * @param id 父id diff --git a/nursing-unit-common/src/main/java/com/nu/dto/ElderTagAsyncMQDto.java b/nursing-unit-common/src/main/java/com/nu/dto/ElderTagAsyncMQDto.java new file mode 100644 index 0000000..4e44062 --- /dev/null +++ b/nursing-unit-common/src/main/java/com/nu/dto/ElderTagAsyncMQDto.java @@ -0,0 +1,49 @@ +package com.nu.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * @Description: 长者标签 + * @Author: zmy + * @Date: 2025-08-13 + * @Version: V1.0 + */ +@Data +public class ElderTagAsyncMQDto implements Serializable { + + /**id*/ + private String id; + /**标签类型*/ + private String type; + /**标签名称*/ + private String tagName; + /**价格*/ + private BigDecimal price; + /**图标*/ + private String pic; + /**图标md5值*/ + private String picMd5; + /**排序*/ + private Integer sort; + /**是否启用*/ + private String izEnabled; + /**是否删除*/ + private String delFlag; + /**创建人*/ + private String createBy; + /**创建日期*/ + private Date createTime; + /**更新人*/ + private String updateBy; + /**更新日期*/ + private Date updateTime; + /**所属机构*/ + private String sysOrgCode; + /**资源请求接口域名+项目上下文路径 */ + private String api; + +} diff --git a/nursing-unit-common/src/main/java/com/nu/dto/ElderTagMQDto.java b/nursing-unit-common/src/main/java/com/nu/dto/ElderTagMQDto.java new file mode 100644 index 0000000..71ca09f --- /dev/null +++ b/nursing-unit-common/src/main/java/com/nu/dto/ElderTagMQDto.java @@ -0,0 +1,23 @@ +package com.nu.dto; + +import lombok.Data; + +import java.util.List; + +@Data +public class ElderTagMQDto { + private boolean izInc;//是否为增量 否则为全量 + private String orgCode;//机构编码 + private String idStr; + private List idList; + + //同步主表id + private String asyncId; + //同步子表code + private String code; + + //指令集合 + private List elderTagList; + //是否同步指令资源 + private boolean izSyncMedia; +} diff --git a/nursing-unit-elder/nu-elder-api/nu-elder-local-api/pom.xml b/nursing-unit-elder/nu-elder-api/nu-elder-local-api/pom.xml new file mode 100644 index 0000000..5ffb314 --- /dev/null +++ b/nursing-unit-elder/nu-elder-api/nu-elder-local-api/pom.xml @@ -0,0 +1,25 @@ + + + + com.nursingunit.boot + nu-elder-api + 2.0.0 + + 4.0.0 + nu-elder-local-api + + + com.nursingunit.boot + nursing-unit-common + + + com.nursingunit.boot + nu-system-local-api + 2.0.0 + compile + + + + diff --git a/nursing-unit-elder/nu-elder-api/pom.xml b/nursing-unit-elder/nu-elder-api/pom.xml new file mode 100644 index 0000000..f973df1 --- /dev/null +++ b/nursing-unit-elder/nu-elder-api/pom.xml @@ -0,0 +1,24 @@ + + + + com.nursingunit.boot + nursing-unit-elder + 2.0.0 + + 4.0.0 + nu-elder-api + pom + + + nu-elder-local-api + + + + + com.nursingunit.boot + nursing-unit-base-core + + + diff --git a/nursing-unit-elder/nu-elder-biz/pom.xml b/nursing-unit-elder/nu-elder-biz/pom.xml new file mode 100644 index 0000000..4e57946 --- /dev/null +++ b/nursing-unit-elder/nu-elder-biz/pom.xml @@ -0,0 +1,47 @@ + + + com.nursingunit.boot + nursing-unit-elder + 2.0.0 + + 4.0.0 + nu-elder-biz + + + + com.nursingunit.boot + nu-elder-local-api + ${nursingunit.version} + + + org.hibernate + hibernate-core + + + org.jeecgframework.boot + hibernate-re + + + + + org.jeecgframework + weixin4j + + + com.nursingunit.boot + nu-admin-biz + 2.0.0 + compile + + + com.nursingunit.boot + nu-admin-biz + 2.0.0 + compile + + + + + diff --git a/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/canaddeldertag/controller/CanAddElderTagController.java b/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/canaddeldertag/controller/CanAddElderTagController.java new file mode 100644 index 0000000..3c903fc --- /dev/null +++ b/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/canaddeldertag/controller/CanAddElderTagController.java @@ -0,0 +1,84 @@ +package com.nu.modules.canaddeldertag.controller; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.system.query.QueryRuleEnum; +import org.jeecg.common.util.oConvertUtils; +import com.nu.modules.canaddeldertag.entity.CanAddElderTag; +import com.nu.modules.canaddeldertag.service.ICanAddElderTagService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.apache.shiro.authz.annotation.RequiresPermissions; + +/** + * @Description: 可新增长者标签 + * @Author: jeecg-boot + * @Date: 2025-08-14 + * @Version: V1.0 + */ +@Api(tags = "可新增长者标签") +@RestController +@RequestMapping("/eldertag/canAddElderTag") +@Slf4j +public class CanAddElderTagController extends JeecgController { + @Autowired + private ICanAddElderTagService canAddElderTagService; + + /** + * 分页列表查询 + * + * @param canAddElderTag + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "可新增长者标签-分页列表查询") + @ApiOperation(value = "可新增长者标签-分页列表查询", notes = "可新增长者标签-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(CanAddElderTag canAddElderTag, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(canAddElderTag, req.getParameterMap()); + if (StringUtils.isNotBlank(canAddElderTag.getExistElderTagIds())) { + queryWrapper.notIn("tag_id",canAddElderTag.getExistElderTagIds().split(",")); + } + Page page = new Page(pageNo, pageSize); + IPage pageList = canAddElderTagService.page(page, queryWrapper); + return Result.OK(pageList); + } + + +} diff --git a/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/canaddeldertag/entity/CanAddElderTag.java b/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/canaddeldertag/entity/CanAddElderTag.java new file mode 100644 index 0000000..942d25a --- /dev/null +++ b/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/canaddeldertag/entity/CanAddElderTag.java @@ -0,0 +1,79 @@ +package com.nu.modules.canaddeldertag.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; + +import com.baomidou.mybatisplus.annotation.*; +import org.jeecg.common.constant.ProvinceCityArea; +import org.jeecg.common.util.SpringContextUtils; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: 可新增长者标签 + * @Author: jeecg-boot + * @Date: 2025-08-14 + * @Version: V1.0 + */ +@Data +@TableName("nu_can_add_elder_tag") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="nu_can_add_elder_tag对象", description="可新增长者标签") +public class CanAddElderTag implements Serializable { + private static final long serialVersionUID = 1L; + + /**id*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "id") + private java.lang.String id; + /**nu_elder_tag.id*/ + @Excel(name = "nu_elder_tag.id", width = 15) + @ApiModelProperty(value = "nu_elder_tag.id") + private java.lang.String tagId; + /**标签类型 tx体型标签 qx情绪标签*/ + @Excel(name = "标签类型 tx体型标签 qx情绪标签", width = 15) + @ApiModelProperty(value = "标签类型 tx体型标签 qx情绪标签") + @Dict(dicCode = "elder_tag_type") + private java.lang.String type; + /**标签名称*/ + @Excel(name = "标签名称", width = 15) + @ApiModelProperty(value = "标签名称") + private java.lang.String tagName; + /**价格*/ + @Excel(name = "价格", width = 15) + @ApiModelProperty(value = "价格") + private java.math.BigDecimal price; + /**图标*/ + @Excel(name = "图标", width = 15) + @ApiModelProperty(value = "图标") + private java.lang.String pic; + /**排序*/ + @Excel(name = "排序", width = 15) + @ApiModelProperty(value = "排序") + private java.lang.Integer sort; + /**创建日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**所属机构*/ + @ApiModelProperty(value = "所属机构") + @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "org_code") + private java.lang.String sysOrgCode; + + /** + * 已存在服务指令ids 逗号拼接 + */ + @TableField(exist = false) + private String existElderTagIds; +} diff --git a/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/canaddeldertag/mapper/CanAddElderTagMapper.java b/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/canaddeldertag/mapper/CanAddElderTagMapper.java new file mode 100644 index 0000000..a53ee5b --- /dev/null +++ b/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/canaddeldertag/mapper/CanAddElderTagMapper.java @@ -0,0 +1,17 @@ +package com.nu.modules.canaddeldertag.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import com.nu.modules.canaddeldertag.entity.CanAddElderTag; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 可新增长者标签 + * @Author: jeecg-boot + * @Date: 2025-08-14 + * @Version: V1.0 + */ +public interface CanAddElderTagMapper extends BaseMapper { + +} diff --git a/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/canaddeldertag/mapper/xml/CanAddElderTagMapper.xml b/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/canaddeldertag/mapper/xml/CanAddElderTagMapper.xml new file mode 100644 index 0000000..3ace3ea --- /dev/null +++ b/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/canaddeldertag/mapper/xml/CanAddElderTagMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/canaddeldertag/service/ICanAddElderTagService.java b/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/canaddeldertag/service/ICanAddElderTagService.java new file mode 100644 index 0000000..7113f97 --- /dev/null +++ b/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/canaddeldertag/service/ICanAddElderTagService.java @@ -0,0 +1,14 @@ +package com.nu.modules.canaddeldertag.service; + +import com.nu.modules.canaddeldertag.entity.CanAddElderTag; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 可新增长者标签 + * @Author: jeecg-boot + * @Date: 2025-08-14 + * @Version: V1.0 + */ +public interface ICanAddElderTagService extends IService { + +} diff --git a/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/canaddeldertag/service/impl/CanAddElderTagServiceImpl.java b/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/canaddeldertag/service/impl/CanAddElderTagServiceImpl.java new file mode 100644 index 0000000..2a4fa9f --- /dev/null +++ b/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/canaddeldertag/service/impl/CanAddElderTagServiceImpl.java @@ -0,0 +1,19 @@ +package com.nu.modules.canaddeldertag.service.impl; + +import com.nu.modules.canaddeldertag.entity.CanAddElderTag; +import com.nu.modules.canaddeldertag.mapper.CanAddElderTagMapper; +import com.nu.modules.canaddeldertag.service.ICanAddElderTagService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 可新增长者标签 + * @Author: jeecg-boot + * @Date: 2025-08-14 + * @Version: V1.0 + */ +@Service +public class CanAddElderTagServiceImpl extends ServiceImpl implements ICanAddElderTagService { + +} diff --git a/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/eldertag/controller/ElderTagController.java b/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/eldertag/controller/ElderTagController.java new file mode 100644 index 0000000..b992833 --- /dev/null +++ b/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/eldertag/controller/ElderTagController.java @@ -0,0 +1,105 @@ +package com.nu.modules.eldertag.controller; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.nu.modules.eldertag.entity.ElderTag; +import com.nu.modules.eldertag.service.IElderTagService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang.StringUtils; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.api.ISysBaseAPI; +import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.common.system.query.QueryGenerator; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import javax.servlet.http.HttpServletRequest; + +/** + * @Description: 长者标签 + * @Author: zmy + * @Date: 2025-08-13 + * @Version: V1.0 + */ +@Api(tags = "长者标签") +@RestController +@RequestMapping("/elder/elderTag") +@Slf4j +public class ElderTagController extends JeecgController { + @Autowired + private IElderTagService elderTagService; + @Autowired + private ISysBaseAPI sysBaseAPI; + + /** + * 分页列表查询-更换数据源 + * + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @ApiOperation(value = "长者标签-分页列表查询", notes = "长者标签-分页列表查询") + @GetMapping(value = "/listByDS") + @DS("#dataSourceCode") + public Result> queryPageListByDS(@RequestParam(name = "dataSourceCode") String dataSourceCode, ElderTag et, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { + if (StringUtils.isBlank(dataSourceCode)) { + return Result.ok(new Page()); + } + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(et, req.getParameterMap()); + if (StringUtils.isNotBlank(et.getExcludeIds())) { + queryWrapper.notIn("id", et.getExcludeIds().split(",")); + } + queryWrapper.orderByAsc("sort"); + Page page = new Page(pageNo, pageSize); + IPage list = elderTagService.page(page, queryWrapper); + return Result.OK(list); + } + + + /** + * 查询目标平台已有标签 + * + * @param dataSourceCode + * @return + */ + @GetMapping(value = "/idListByDS") + @DS("#dataSourceCode") + public Result> idListByDS(@RequestParam(name = "dataSourceCode") String dataSourceCode, ElderTag et) { + if (StringUtils.isBlank(dataSourceCode)) { + return Result.ok(new Page<>()); + } + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.select("id"); + if (StringUtils.isNotBlank(et.getExcludeIds())) { + queryWrapper.notIn("id", et.getExcludeIds().split(",")); + } + Page page = new Page<>(1, -1); + IPage list = elderTagService.page(page, queryWrapper); + return Result.OK(list); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "长者标签-通过id查询") + @ApiOperation(value = "长者标签-通过id查询", notes = "长者标签-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name = "id", required = true) String id) { + ElderTag elderTag = elderTagService.getById(id); + if (elderTag == null) { + return Result.error("未找到对应数据"); + } + return Result.OK(elderTag); + } +} diff --git a/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/eldertag/entity/ElderTag.java b/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/eldertag/entity/ElderTag.java new file mode 100644 index 0000000..d84c76d --- /dev/null +++ b/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/eldertag/entity/ElderTag.java @@ -0,0 +1,99 @@ +package com.nu.modules.eldertag.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; + +import com.baomidou.mybatisplus.annotation.*; +import org.jeecg.common.constant.ProvinceCityArea; +import org.jeecg.common.util.SpringContextUtils; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: 长者标签 + * @Author: zmy + * @Date: 2025-08-13 + * @Version: V1.0 + */ +@Data +@TableName("nu_elder_tag") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="nu_elder_tag对象", description="长者标签") +public class ElderTag implements Serializable { + private static final long serialVersionUID = 1L; + + /**id*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "id") + private java.lang.String id; + /**标签类型*/ + @Excel(name = "标签类型", width = 15) + @ApiModelProperty(value = "标签类型") + @Dict(dicCode = "elder_tag_type") + private java.lang.String type; + /**标签名称*/ + @Excel(name = "标签名称", width = 15) + @ApiModelProperty(value = "标签名称") + private java.lang.String tagName; + /**价格*/ + @Excel(name = "价格", width = 15) + @ApiModelProperty(value = "价格") + private java.math.BigDecimal price; + /**图标*/ + @Excel(name = "图标", width = 15) + @ApiModelProperty(value = "图标") + private java.lang.String pic; + /**图标md5值*/ + @ApiModelProperty(value = "图标md5值") + private java.lang.String picMd5; + /**排序*/ + @Excel(name = "排序", width = 15) + @ApiModelProperty(value = "排序") + private java.lang.Integer sort; + /**是否启用*/ + @Excel(name = "是否启用", width = 15) + @ApiModelProperty(value = "是否启用") + @Dict(dicCode = "iz_enabled") + private java.lang.String izEnabled; + /**是否删除*/ + @Excel(name = "是否删除", width = 15) + @ApiModelProperty(value = "是否删除") + @TableLogic + private java.lang.String delFlag; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**所属机构*/ + @ApiModelProperty(value = "所属机构") + private java.lang.String sysOrgCode; + + /**需要排除的id */ + @TableField(exist = false) + private String excludeIds; + /**需要同步的id */ + @TableField(exist = false) + private String SyncIds; +} diff --git a/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/eldertag/mapper/ElderTagMapper.java b/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/eldertag/mapper/ElderTagMapper.java new file mode 100644 index 0000000..630d601 --- /dev/null +++ b/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/eldertag/mapper/ElderTagMapper.java @@ -0,0 +1,17 @@ +package com.nu.modules.eldertag.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.nu.modules.eldertag.entity.ElderTag; + +import java.util.List; + +/** + * @Description: 长者标签 + * @Author: zmy + * @Date: 2025-08-13 + * @Version: V1.0 + */ +public interface ElderTagMapper extends BaseMapper { + + List allData(); +} diff --git a/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/eldertag/mapper/xml/ElderTagMapper.xml b/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/eldertag/mapper/xml/ElderTagMapper.xml new file mode 100644 index 0000000..c2ae65e --- /dev/null +++ b/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/eldertag/mapper/xml/ElderTagMapper.xml @@ -0,0 +1,8 @@ + + + + + + diff --git a/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/eldertag/service/IElderTagService.java b/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/eldertag/service/IElderTagService.java new file mode 100644 index 0000000..0c814e0 --- /dev/null +++ b/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/eldertag/service/IElderTagService.java @@ -0,0 +1,18 @@ +package com.nu.modules.eldertag.service; + +import com.nu.dto.ElderTagMQDto; +import com.nu.modules.eldertag.entity.ElderTag; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +/** + * @Description: 长者标签 + * @Author: zmy + * @Date: 2025-08-13 + * @Version: V1.0 + */ +public interface IElderTagService extends IService { + + +} diff --git a/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/eldertag/service/impl/ElderTagServiceImpl.java b/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/eldertag/service/impl/ElderTagServiceImpl.java new file mode 100644 index 0000000..a03f6f1 --- /dev/null +++ b/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/modules/eldertag/service/impl/ElderTagServiceImpl.java @@ -0,0 +1,31 @@ +package com.nu.modules.eldertag.service.impl; + +import cn.hutool.core.bean.BeanUtil; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.dynamic.datasource.annotation.DS; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.nu.dto.ElderTagAsyncMQDto; +import com.nu.dto.ElderTagMQDto; +import com.nu.modules.eldertag.entity.ElderTag; +import com.nu.modules.eldertag.mapper.ElderTagMapper; +import com.nu.modules.eldertag.service.IElderTagService; +import com.nu.modules.sysconfig.ISysConfigApi; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; + +/** + * @Description: 长者标签 + * @Author: zmy + * @Date: 2025-08-13 + * @Version: V1.0 + */ +@Service +public class ElderTagServiceImpl extends ServiceImpl implements IElderTagService { + +} diff --git a/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/mq/eldertag/exceptionhandler/ElderTagMQExceptionHandler.java b/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/mq/eldertag/exceptionhandler/ElderTagMQExceptionHandler.java new file mode 100644 index 0000000..2e01cb7 --- /dev/null +++ b/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/mq/eldertag/exceptionhandler/ElderTagMQExceptionHandler.java @@ -0,0 +1,37 @@ +package com.nu.mq.eldertag.exceptionhandler; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.amqp.AmqpRejectAndDontRequeueException; +import org.springframework.amqp.core.Message; +import org.springframework.amqp.rabbit.listener.api.RabbitListenerErrorHandler; +import org.springframework.amqp.rabbit.support.ListenerExecutionFailedException; +import org.springframework.stereotype.Component; + +@Slf4j +@Component("elderTaggMQErrorHandler") +public class ElderTagMQExceptionHandler implements RabbitListenerErrorHandler { + + @Override + public Object handleError(Message message, org.springframework.messaging.Message message1, ListenerExecutionFailedException e) { + log.error("MQ消息处理失败 | 消息体: {} | 异常原因: {}", new String(message.getBody()), e.getCause().getMessage()); + + // 根据异常类型选择处理策略 + if (isRetryable(e)) { + // 可重试异常:抛出异常触发重试 +// throw e; + // 不进行重试: + throw new AmqpRejectAndDontRequeueException("消息处理失败且禁止重试", e); + } else { + // 不可恢复异常:拒绝消息且不重新入队 + throw new AmqpRejectAndDontRequeueException("消息处理失败且禁止重试", e); + } + } + + /** + * 判断异常是否可重试 + */ + private boolean isRetryable(ListenerExecutionFailedException e) { + // 示例:网络异常、数据库临时锁超时可重试 + return e.getCause() instanceof RuntimeException; // 根据实际业务调整 + } +} diff --git a/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/mq/eldertag/listener/ElderTaggMQListener.java b/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/mq/eldertag/listener/ElderTaggMQListener.java new file mode 100644 index 0000000..7925eac --- /dev/null +++ b/nursing-unit-elder/nu-elder-biz/src/main/java/com/nu/mq/eldertag/listener/ElderTaggMQListener.java @@ -0,0 +1,209 @@ +package com.nu.mq.eldertag.listener; + +import com.nu.dto.ElderTagAsyncMQDto; +import com.nu.modules.async.service.IAsyncMainService; +import com.nu.modules.async.service.IAsyncStatusService; +import com.nu.modules.canaddeldertag.entity.CanAddElderTag; +import com.nu.modules.canaddeldertag.service.ICanAddElderTagService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.amqp.core.ExchangeTypes; +import org.springframework.amqp.rabbit.annotation.Exchange; +import org.springframework.amqp.rabbit.annotation.Queue; +import org.springframework.amqp.rabbit.annotation.QueueBinding; +import org.springframework.amqp.rabbit.annotation.RabbitListener; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.util.Date; + +@Slf4j +@Component +public class ElderTaggMQListener { + + @Autowired + private IAsyncMainService asyncMainService; + @Autowired + private IAsyncStatusService asyncStatusService; + @Autowired + private ICanAddElderTagService canAddElderTagService; + + /** + *其他平台新增指令 + */ + @RabbitListener(bindings = @QueueBinding(value = @Queue(name = "hldy.eldettag.newadd"), exchange = @Exchange(name = "hldy.eldettag", type = ExchangeTypes.DIRECT), key = "hldy.eldettag.newadd"), errorHandler = "elderTaggMQErrorHandler") + public void auditBizDirective(ElderTagAsyncMQDto dto) { + CanAddElderTag canAddElderTag = new CanAddElderTag(); + canAddElderTag.setTagId(dto.getId()); + canAddElderTag.setTagName(dto.getTagName()); + canAddElderTag.setPrice(dto.getPrice()); + canAddElderTag.setCreateTime(new Date()); + canAddElderTag.setSysOrgCode(dto.getSysOrgCode()); + canAddElderTag.setType(dto.getType()); + canAddElderTagService.save(canAddElderTag); + } + +// /** +// * 业务平台新增指令/编辑未授权指令 传给 管理平台进行审核 +// * +// * @param dto +// */ +//// @RabbitListener(bindings = @QueueBinding(value = @Queue(name = "hldy.eldettag.audit"), exchange = @Exchange(name = "hldy.eldettag", type = ExchangeTypes.DIRECT), key = "hldy.eldettag.audit"), errorHandler = "elderTaggMQErrorHandler") +// public void auditBizDirective2(DirectiveAsyncMQDto dto) { +// //先处理各字典项 只新增,不修改 +// String instructionTagId = dto.getInstructionTagId(); +// String categoryId = dto.getCategoryId(); +// String typeId = dto.getTypeId(); +// String orgCode = dto.getSysOrgCode(); +// //分类标签 +// { +// QueryWrapper instructionTagQW = new QueryWrapper<>(); +// instructionTagQW.eq("id", instructionTagId); +// InstructionTag instructionObj = instructionTagService.getOne(instructionTagQW); +// if (instructionObj == null) { +// //新增分类标签 +// InstructionTag instructionTag = new InstructionTag(); +// instructionTag.setId(instructionTagId); +// instructionTag.setInstructionName(dto.getInstructionName()); +// instructionTag.setSort(999); +// instructionTag.setStatus("1"); +// instructionTag.setIzEnabled("1"); +// instructionTag.setDelFlag("0"); +// instructionTag.setSysOrgCode(orgCode); +// instructionTagService.save(instructionTag); +// } +// } +// //服务类别 +// { +// QueryWrapper categoryQW = new QueryWrapper<>(); +// categoryQW.eq("id", categoryId); +// ConfigServiceCategory categoryObj = categoryService.getOne(categoryQW); +// if (categoryObj == null) { +// //新增服务类别 +// ConfigServiceCategory configServiceCategory = new ConfigServiceCategory(); +// configServiceCategory.setId(categoryId); +// configServiceCategory.setInstructionId(instructionTagId); +// configServiceCategory.setCategoryName(dto.getCategoryName()); +// configServiceCategory.setSort(999); +// configServiceCategory.setStatus("1"); +// configServiceCategory.setIzEnabled("1"); +// configServiceCategory.setDelFlag("0"); +// configServiceCategory.setSysOrgCode(orgCode); +// categoryService.save(configServiceCategory); +// } +// } +// //服务类型 +// { +// QueryWrapper typeQW = new QueryWrapper<>(); +// typeQW.eq("id", typeId); +// ConfigServiceType typeObj = typeService.getOne(typeQW); +// if (typeObj == null) { +// //新增服务类别 +// ConfigServiceType configServiceType = new ConfigServiceType(); +// configServiceType.setId(typeId); +// configServiceType.setInstructionId(instructionTagId); +// configServiceType.setCategoryId(categoryId); +// configServiceType.setTypeName(dto.getTypeName()); +// configServiceType.setSort(999); +// configServiceType.setStatus("1"); +// configServiceType.setIzEnabled("1"); +// configServiceType.setDelFlag("0"); +// configServiceType.setSysOrgCode(orgCode); +// typeService.save(configServiceType); +// } +// } +// //体型标签 +// { +// String bodyTagsObj = dto.getBodyTagsObj(); +// JSONArray jsonArray = JSON.parseArray(bodyTagsObj); +// //体型标签-服务指令中间表 +// bodyTagService.removeAllByDirectiveId(dto.getId()); +// List btrList = Lists.newArrayList(); +// for (int i = 0; i < jsonArray.size(); i++) { +// JSONObject item = jsonArray.getJSONObject(i); +// String bodyTagId = item.getString("id"); +// String bodyTagLabel = item.getString("label"); +// //处理每一个体型标签 +// { +// QueryWrapper bodyTagQW = new QueryWrapper<>(); +// bodyTagQW.eq("id", bodyTagId); +// DirectiveBodyTag bodyTagObj = bodyTagService.getOne(bodyTagQW); +// if (bodyTagObj == null) { +// DirectiveBodyTag directiveBodyTag = new DirectiveBodyTag(); +// directiveBodyTag.setId(bodyTagId); +// directiveBodyTag.setTagName(bodyTagLabel); +// directiveBodyTag.setSort(999); +// directiveBodyTag.setStatus("1"); +// directiveBodyTag.setIzEnabled("1"); +// directiveBodyTag.setDelFlag("0"); +// directiveBodyTag.setSysOrgCode(orgCode); +// //新增 +// bodyTagService.save(directiveBodyTag); +// } +// DirectiveBodyTagRelation btr = new DirectiveBodyTagRelation(); +// btr.setDirectiveId(dto.getId()); +// btr.setTagId(bodyTagId); +// btrList.add(btr); +// } +// } +// //中间关系表 +// bodyTagService.insertAllRelation(btrList); +// } +// //情绪标签 +// { +// String emotionTagsObj = dto.getEmotionTagsObj(); +// JSONArray jsonArray = JSON.parseArray(emotionTagsObj); +// //体型标签-服务指令中间表 +// emotionTagService.removeAllByDirectiveId(dto.getId()); +// List etrList = Lists.newArrayList(); +// for (int i = 0; i < jsonArray.size(); i++) { +// JSONObject item = jsonArray.getJSONObject(i); +// String emotionTagId = item.getString("id"); +// String emotionTagLabel = item.getString("label"); +// //处理每一个体型标签 +// { +// QueryWrapper emotionTagQW = new QueryWrapper<>(); +// emotionTagQW.eq("id", emotionTagId); +// DirectiveEmotionTag emotionTagObj = emotionTagService.getOne(emotionTagQW); +// if (emotionTagObj == null) { +// DirectiveEmotionTag directiveEmotionTag = new DirectiveEmotionTag(); +// directiveEmotionTag.setId(emotionTagId); +// directiveEmotionTag.setTagName(emotionTagLabel); +// directiveEmotionTag.setSort(999); +// directiveEmotionTag.setStatus("1"); +// directiveEmotionTag.setIzEnabled("1"); +// directiveEmotionTag.setDelFlag("0"); +// directiveEmotionTag.setSysOrgCode(orgCode); +// //新增 +// emotionTagService.save(directiveEmotionTag); +// } +// DirectiveEmotionTagRelation etr = new DirectiveEmotionTagRelation(); +// etr.setDirectiveId(dto.getId()); +// etr.setTagId(emotionTagId); +// etrList.add(etr); +// } +// } +// //中间关系表 +// emotionTagService.insertAllRelation(etrList); +// } +// +// //存储服务指令 +// ConfigServiceDirective directive = new ConfigServiceDirective(); +// BeanUtils.copyProperties(dto, directive); +// directiveService.save(directive); +// } +// +// @RabbitListener(bindings = @QueueBinding(value = @Queue(name = "fwzl.async.result"), exchange = @Exchange(name = "hldy.fwzl", type = ExchangeTypes.DIRECT), key = "fwzl.async.result"), errorHandler = "elderTaggMQErrorHandler") +// public void handleNu002AsyncMessageStatus(StatusMQDto dto) { +// LambdaQueryWrapper qw = new LambdaQueryWrapper<>(); +// qw.eq(AsyncStatus::getPkid, dto.getAsyncId()); +// qw.eq(AsyncStatus::getCode, dto.getCode()); +// AsyncStatus asyncStatus = asyncStatusService.getOne(qw); +// if (dto.getStatus() == MQStatus.SUCCESS.getCode()) { +// asyncStatus.setStatus(dto.getStatus() + ""); +// } else { +// asyncStatus.setStatus("500"); +// } +// asyncStatus.setMsg(dto.getMessage()); +// asyncStatusService.updateById(asyncStatus); +// } +} diff --git a/nursing-unit-elder/pom.xml b/nursing-unit-elder/pom.xml new file mode 100644 index 0000000..289847b --- /dev/null +++ b/nursing-unit-elder/pom.xml @@ -0,0 +1,20 @@ + + + + com.nursingunit.boot + nursing-unit-parent + 2.0.0 + + 长者模块 + 4.0.0 + nursing-unit-elder + pom + + + nu-elder-api + nu-elder-biz + + + diff --git a/nursing-unit-system/nu-system-api/nu-system-local-api/src/main/java/org/jeecg/common/system/api/ISysBaseAPI.java b/nursing-unit-system/nu-system-api/nu-system-local-api/src/main/java/org/jeecg/common/system/api/ISysBaseAPI.java index e43ecf9..53a00c9 100644 --- a/nursing-unit-system/nu-system-api/nu-system-local-api/src/main/java/org/jeecg/common/system/api/ISysBaseAPI.java +++ b/nursing-unit-system/nu-system-api/nu-system-local-api/src/main/java/org/jeecg/common/system/api/ISysBaseAPI.java @@ -629,6 +629,8 @@ public interface ISysBaseAPI extends CommonAPI { JSONObject getDMOrgInfo(); + JSONObject getETMOrgInfo(); + JSONObject getDeptInfo(); String addOrg(SysDepartEntity sysDepart); diff --git a/nursing-unit-system/nu-system-api/nu-system-local-api/src/main/java/org/jeecg/common/system/entity/SysDepartEntity.java b/nursing-unit-system/nu-system-api/nu-system-local-api/src/main/java/org/jeecg/common/system/entity/SysDepartEntity.java index 56c8c10..4013077 100644 --- a/nursing-unit-system/nu-system-api/nu-system-local-api/src/main/java/org/jeecg/common/system/entity/SysDepartEntity.java +++ b/nursing-unit-system/nu-system-api/nu-system-local-api/src/main/java/org/jeecg/common/system/entity/SysDepartEntity.java @@ -68,6 +68,10 @@ public class SysDepartEntity implements Serializable { * 是否标准指令库 0是1否 */ private String izDirectiveMain; + /** + * 是否标准标签库 0是1否 + */ + private String izElderTagMain; /** * 媒体资源访问地址 */ diff --git a/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/controller/SysDepartController.java b/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/controller/SysDepartController.java index 4b9a050..4ca0330 100644 --- a/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/controller/SysDepartController.java +++ b/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/controller/SysDepartController.java @@ -774,7 +774,7 @@ public class SysDepartController { return Result.ok(pageList); } - @AutoLog(value = "指令库变更") + @AutoLog(value = "标准指令库变更") @PostMapping(value = "/changeDirectiveMain") public Result changeDirectiveMain(@RequestParam(name = "orgCode") String orgCode) { sysDepartService.changeDirectiveMain(orgCode); @@ -793,10 +793,36 @@ public class SysDepartController { return Result.ok(); } + @AutoLog(value = "标准标签库变更") + @PostMapping(value = "/changeElderTagMain") + public Result changeElderTagMain(@RequestParam(name = "orgCode") String orgCode) { + sysDepartService.changeElderTagMain(orgCode); + + //发消息通知所有平台修改指令库主库编码 + SysConfigEntity config = new SysConfigEntity(); + config.setId("1944154379395543441"); + config.setName("长者标签标准指令库机构编码"); + config.setConfigKey("elder_tag_main_org_code"); + config.setConfigValue(orgCode); + config.setDescr("长者标签标准指令库机构编码"); + config.setIzEnabled("0"); + config.setDelFlag("0"); + sysConfigApi.asyncApi(config); + + return Result.ok(); + } + @GetMapping(value = "/getDirectiveMain") public Result getDirectiveMain() { QueryWrapper qw = new QueryWrapper<>(); qw.eq("iz_directive_main","0"); return Result.ok(sysDepartService.getOne(qw)); } + + @GetMapping(value = "/getElderTagMain") + public Result getElderTagMain() { + QueryWrapper qw = new QueryWrapper<>(); + qw.eq("iz_elder_tag_main","0"); + return Result.ok(sysDepartService.getOne(qw)); + } } diff --git a/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/entity/SysDepart.java b/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/entity/SysDepart.java index 23efd55..476ceec 100644 --- a/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/entity/SysDepart.java +++ b/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/entity/SysDepart.java @@ -88,6 +88,12 @@ public class SysDepart implements Serializable { * 是否标准指令库 0是1否 */ private String izDirectiveMain; + + /** + * 是否标准标签库 0是1否 + */ + private String izElderTagMain; + /** * 媒体资源访问地址 */ @@ -260,6 +266,7 @@ public class SysDepart implements Serializable { Objects.equals(url, depart.url) && Objects.equals(contextPath, depart.contextPath) && Objects.equals(izDirectiveMain, depart.izDirectiveMain) && + Objects.equals(izElderTagMain, depart.izElderTagMain) && Objects.equals(mediaUrl, depart.mediaUrl) && Objects.equals(province, depart.province) && Objects.equals(city, depart.city) && @@ -289,7 +296,7 @@ public class SysDepart implements Serializable { public int hashCode() { return Objects.hash(super.hashCode(), id, parentId, departName, departNameEn, departNameAbbr, departOrder, description, orgCategory, - orgType, orgCode, url, contextPath, izDirectiveMain,mediaUrl, province, city, district, operationStartTime, + orgType, orgCode, url, contextPath, izDirectiveMain,izElderTagMain, mediaUrl, province, city, district, operationStartTime, operationEndTime, contractStartTime, contractEndTime, mobile, fax, address, memo, status, delFlag, createBy, createTime, updateBy, updateTime, tenantId, payableAmount); } diff --git a/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/model/SysDepartTreeModel.java b/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/model/SysDepartTreeModel.java index e5a2e5d..a8d1bbd 100644 --- a/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/model/SysDepartTreeModel.java +++ b/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/model/SysDepartTreeModel.java @@ -71,6 +71,8 @@ public class SysDepartTreeModel implements Serializable { private String izDirectiveMain; + private String izElderTagMain; + private String mediaUrl; private String province; @@ -146,6 +148,7 @@ public class SysDepartTreeModel implements Serializable { this.url = sysDepart.getUrl(); this.contextPath = sysDepart.getContextPath(); this.izDirectiveMain = sysDepart.getIzDirectiveMain(); + this.izElderTagMain = sysDepart.getIzElderTagMain(); this.mediaUrl = sysDepart.getMediaUrl(); this.province = sysDepart.getProvince(); this.city = sysDepart.getCity(); @@ -519,6 +522,14 @@ public class SysDepartTreeModel implements Serializable { this.mediaUrl = mediaUrl; } + public String getIzElderTagMain() { + return izElderTagMain; + } + + public void setIzElderTagMain(String izElderTagMain) { + this.izElderTagMain = izElderTagMain; + } + /** * 重写equals方法 */ @@ -545,6 +556,7 @@ public class SysDepartTreeModel implements Serializable { Objects.equals(url, model.url) && Objects.equals(contextPath, model.contextPath) && Objects.equals(izDirectiveMain, model.izDirectiveMain) && + Objects.equals(izElderTagMain, model.izElderTagMain) && Objects.equals(mediaUrl, model.mediaUrl) && Objects.equals(province, model.province) && Objects.equals(city, model.city) && @@ -577,7 +589,7 @@ public class SysDepartTreeModel implements Serializable { return Objects.hash(id, parentId, platType, departName, departNameEn, departNameAbbr, departOrder, description, orgCategory, orgType, orgCode, url, contextPath, izDirectiveMain, province, city, district, - mediaUrl, operationStartTime, operationEndTime, contractStartTime, contractEndTime, + izElderTagMain, mediaUrl, operationStartTime, operationEndTime, contractStartTime, contractEndTime, mobile, fax, address, memo, status, delFlag, qywxIdentifier, createBy, createTime, updateBy, updateTime, children, directorUserIds, payableAmount); } diff --git a/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/service/ISysDepartService.java b/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/service/ISysDepartService.java index e12d400..9cbea2d 100644 --- a/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/service/ISysDepartService.java +++ b/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/service/ISysDepartService.java @@ -241,4 +241,6 @@ public interface ISysDepartService extends IService{ void importSysDepart(List listSysDeparts, List errorMessageList); void changeDirectiveMain(String orgCode); + + void changeElderTagMain(String orgCode); } diff --git a/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysBaseApiImpl.java b/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysBaseApiImpl.java index 619107c..9b6f7c2 100644 --- a/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysBaseApiImpl.java +++ b/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysBaseApiImpl.java @@ -1918,6 +1918,20 @@ public class SysBaseApiImpl implements ISysBaseAPI { } } + @Override + public JSONObject getETMOrgInfo() { + QueryWrapper qw = new QueryWrapper<>(); + qw.eq("iz_elder_tag_main", "0");//标准标签库 + qw.eq("org_category", "1");//机构类型 + qw.eq("del_flag", "0");//未删除数据 + SysDepart sysDepart = sysDepartService.getOne(qw); + if (sysDepart != null) { + return (JSONObject) JSONObject.toJSON(sysDepart); + } else { + return null; + } + } + @Override public JSONObject getDeptInfo() { Map map = Maps.newHashMap(); @@ -1933,6 +1947,7 @@ public class SysBaseApiImpl implements ISysBaseAPI { map.put("url",list.get(0).getUrl()); map.put("contextPath",list.get(0).getContextPath()); map.put("izDirectiveMain",list.get(0).getIzDirectiveMain()); + map.put("izElderTagMain",list.get(0).getIzElderTagMain()); map.put("mediaUrl",list.get(0).getMediaUrl()); } return new JSONObject(map); diff --git a/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysDepartServiceImpl.java b/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysDepartServiceImpl.java index 5b1c17f..5d5504c 100644 --- a/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysDepartServiceImpl.java +++ b/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysDepartServiceImpl.java @@ -1370,6 +1370,23 @@ public class SysDepartServiceImpl extends ServiceImpl uqw1 = new QueryWrapper<>(); + uqw1.ne("org_code",orgCode); + sysDepart.setIzElderTagMain("1"); + baseMapper.update(sysDepart,uqw1); + + //将当前机构变更为指令库 + QueryWrapper uqw2 = new QueryWrapper<>(); + uqw2.eq("org_code",orgCode); + sysDepart.setIzElderTagMain("0"); + baseMapper.update(sysDepart,uqw2); + } + /** * 寻找部门路径 * diff --git a/nursing-unit-system/nu-system-start/pom.xml b/nursing-unit-system/nu-system-start/pom.xml index 6e1b597..31da216 100644 --- a/nursing-unit-system/nu-system-start/pom.xml +++ b/nursing-unit-system/nu-system-start/pom.xml @@ -48,6 +48,12 @@ nu-services-biz ${nursingunit.version} + + + com.nursingunit.boot + nu-elder-biz + ${nursingunit.version} + com.nursingunit.boot diff --git a/pom.xml b/pom.xml index 562e1b8..1dfc2b6 100644 --- a/pom.xml +++ b/pom.xml @@ -81,6 +81,8 @@ nursing-unit-admin nursing-unit-services + + nursing-unit-elder nursing-unit-api