parent
4019d59af3
commit
c724558cbb
|
@ -39,6 +39,10 @@ public class OrgAllInfo implements Serializable {
|
|||
* 是否标准指令库 0是1否
|
||||
*/
|
||||
private String izDirectiveMain;
|
||||
/**
|
||||
* 是否标准标签库 0是1否
|
||||
*/
|
||||
private String izElderTagMain;
|
||||
/**
|
||||
* 媒体资源访问地址
|
||||
*/
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -32,12 +32,18 @@ public class NuCommonApi {
|
|||
return Result.ok(sysBaseAPI.getOrgInfo(orgCode));
|
||||
}
|
||||
|
||||
//获取标准指令库信息
|
||||
//获取标准指令库机构信息
|
||||
@GetMapping("/getDMOrgInfo")
|
||||
public Result<JSONObject> getDMOrgInfo(){
|
||||
return Result.ok(sysBaseAPI.getDMOrgInfo());
|
||||
}
|
||||
|
||||
//获取长者标准标签库机构信息
|
||||
@GetMapping("/getETMOrgInfo")
|
||||
public Result<JSONObject> getETMOrgInfo(){
|
||||
return Result.ok(sysBaseAPI.getETMOrgInfo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据父id查询对应省、市、区/县 列表
|
||||
* @param id 父id
|
||||
|
|
|
@ -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;
|
||||
|
||||
}
|
|
@ -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<String> idList;
|
||||
|
||||
//同步主表id
|
||||
private String asyncId;
|
||||
//同步子表code
|
||||
private String code;
|
||||
|
||||
//指令集合
|
||||
private List<ElderTagAsyncMQDto> elderTagList;
|
||||
//是否同步指令资源
|
||||
private boolean izSyncMedia;
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nu-elder-api</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>nu-elder-local-api</artifactId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nursing-unit-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nu-system-local-api</artifactId>
|
||||
<version>2.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nursing-unit-elder</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>nu-elder-api</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
<module>nu-elder-local-api</module>
|
||||
</modules>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nursing-unit-base-core</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -0,0 +1,47 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nursing-unit-elder</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>nu-elder-biz</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nu-elder-local-api</artifactId>
|
||||
<version>${nursingunit.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>hibernate-re</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 企业微信/钉钉 api -->
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework</groupId>
|
||||
<artifactId>weixin4j</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nu-admin-biz</artifactId>
|
||||
<version>2.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nu-admin-biz</artifactId>
|
||||
<version>2.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -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<CanAddElderTag, ICanAddElderTagService> {
|
||||
@Autowired
|
||||
private ICanAddElderTagService canAddElderTagService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param canAddElderTag
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "可新增长者标签-分页列表查询")
|
||||
@ApiOperation(value = "可新增长者标签-分页列表查询", notes = "可新增长者标签-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<CanAddElderTag>> queryPageList(CanAddElderTag canAddElderTag,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<CanAddElderTag> queryWrapper = QueryGenerator.initQueryWrapper(canAddElderTag, req.getParameterMap());
|
||||
if (StringUtils.isNotBlank(canAddElderTag.getExistElderTagIds())) {
|
||||
queryWrapper.notIn("tag_id",canAddElderTag.getExistElderTagIds().split(","));
|
||||
}
|
||||
Page<CanAddElderTag> page = new Page<CanAddElderTag>(pageNo, pageSize);
|
||||
IPage<CanAddElderTag> pageList = canAddElderTagService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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<CanAddElderTag> {
|
||||
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nu.modules.canaddeldertag.mapper.CanAddElderTagMapper">
|
||||
|
||||
</mapper>
|
|
@ -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<CanAddElderTag> {
|
||||
|
||||
}
|
|
@ -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<CanAddElderTagMapper, CanAddElderTag> implements ICanAddElderTagService {
|
||||
|
||||
}
|
|
@ -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<ElderTag, IElderTagService> {
|
||||
@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<IPage<ElderTag>> 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<ElderTag>());
|
||||
}
|
||||
QueryWrapper<ElderTag> queryWrapper = QueryGenerator.initQueryWrapper(et, req.getParameterMap());
|
||||
if (StringUtils.isNotBlank(et.getExcludeIds())) {
|
||||
queryWrapper.notIn("id", et.getExcludeIds().split(","));
|
||||
}
|
||||
queryWrapper.orderByAsc("sort");
|
||||
Page<ElderTag> page = new Page<ElderTag>(pageNo, pageSize);
|
||||
IPage<ElderTag> list = elderTagService.page(page, queryWrapper);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询目标平台已有标签
|
||||
*
|
||||
* @param dataSourceCode
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/idListByDS")
|
||||
@DS("#dataSourceCode")
|
||||
public Result<IPage<ElderTag>> idListByDS(@RequestParam(name = "dataSourceCode") String dataSourceCode, ElderTag et) {
|
||||
if (StringUtils.isBlank(dataSourceCode)) {
|
||||
return Result.ok(new Page<>());
|
||||
}
|
||||
QueryWrapper<ElderTag> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select("id");
|
||||
if (StringUtils.isNotBlank(et.getExcludeIds())) {
|
||||
queryWrapper.notIn("id", et.getExcludeIds().split(","));
|
||||
}
|
||||
Page<ElderTag> page = new Page<>(1, -1);
|
||||
IPage<ElderTag> 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<ElderTag> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
ElderTag elderTag = elderTagService.getById(id);
|
||||
if (elderTag == null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(elderTag);
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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<ElderTag> {
|
||||
|
||||
List<ElderTag> allData();
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nu.modules.eldertag.mapper.ElderTagMapper">
|
||||
|
||||
<select id="allData" resultType="com.nu.modules.eldertag.entity.ElderTag">
|
||||
select id from nu_elder_tag
|
||||
</select>
|
||||
</mapper>
|
|
@ -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<ElderTag> {
|
||||
|
||||
|
||||
}
|
|
@ -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<ElderTagMapper, ElderTag> implements IElderTagService {
|
||||
|
||||
}
|
|
@ -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; // 根据实际业务调整
|
||||
}
|
||||
}
|
|
@ -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<InstructionTag> 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<ConfigServiceCategory> 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<ConfigServiceType> 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<DirectiveBodyTagRelation> 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<DirectiveBodyTag> 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<DirectiveEmotionTagRelation> 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<DirectiveEmotionTag> 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<AsyncStatus> 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);
|
||||
// }
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nursing-unit-parent</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</parent>
|
||||
<description>长者模块</description>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>nursing-unit-elder</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
<module>nu-elder-api</module>
|
||||
<module>nu-elder-biz</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
|
@ -629,6 +629,8 @@ public interface ISysBaseAPI extends CommonAPI {
|
|||
|
||||
JSONObject getDMOrgInfo();
|
||||
|
||||
JSONObject getETMOrgInfo();
|
||||
|
||||
JSONObject getDeptInfo();
|
||||
|
||||
String addOrg(SysDepartEntity sysDepart);
|
||||
|
|
|
@ -68,6 +68,10 @@ public class SysDepartEntity implements Serializable {
|
|||
* 是否标准指令库 0是1否
|
||||
*/
|
||||
private String izDirectiveMain;
|
||||
/**
|
||||
* 是否标准标签库 0是1否
|
||||
*/
|
||||
private String izElderTagMain;
|
||||
/**
|
||||
* 媒体资源访问地址
|
||||
*/
|
||||
|
|
|
@ -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<SysDepart> qw = new QueryWrapper<>();
|
||||
qw.eq("iz_directive_main","0");
|
||||
return Result.ok(sysDepartService.getOne(qw));
|
||||
}
|
||||
|
||||
@GetMapping(value = "/getElderTagMain")
|
||||
public Result<?> getElderTagMain() {
|
||||
QueryWrapper<SysDepart> qw = new QueryWrapper<>();
|
||||
qw.eq("iz_elder_tag_main","0");
|
||||
return Result.ok(sysDepartService.getOne(qw));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -241,4 +241,6 @@ public interface ISysDepartService extends IService<SysDepart>{
|
|||
void importSysDepart(List<SysDepartExportVo> listSysDeparts, List<String> errorMessageList);
|
||||
|
||||
void changeDirectiveMain(String orgCode);
|
||||
|
||||
void changeElderTagMain(String orgCode);
|
||||
}
|
||||
|
|
|
@ -1918,6 +1918,20 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject getETMOrgInfo() {
|
||||
QueryWrapper<SysDepart> 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<String,Object> 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);
|
||||
|
|
|
@ -1370,6 +1370,23 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
|
|||
baseMapper.update(sysDepart,uqw2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeElderTagMain(String orgCode) {
|
||||
SysDepart sysDepart = new SysDepart();
|
||||
|
||||
//将非当前机构变更为非指令库
|
||||
QueryWrapper<SysDepart> uqw1 = new QueryWrapper<>();
|
||||
uqw1.ne("org_code",orgCode);
|
||||
sysDepart.setIzElderTagMain("1");
|
||||
baseMapper.update(sysDepart,uqw1);
|
||||
|
||||
//将当前机构变更为指令库
|
||||
QueryWrapper<SysDepart> uqw2 = new QueryWrapper<>();
|
||||
uqw2.eq("org_code",orgCode);
|
||||
sysDepart.setIzElderTagMain("0");
|
||||
baseMapper.update(sysDepart,uqw2);
|
||||
}
|
||||
|
||||
/**
|
||||
* 寻找部门路径
|
||||
*
|
||||
|
|
|
@ -48,6 +48,12 @@
|
|||
<artifactId>nu-services-biz</artifactId>
|
||||
<version>${nursingunit.version}</version>
|
||||
</dependency>
|
||||
<!-- 长者 模块 -->
|
||||
<dependency>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nu-elder-biz</artifactId>
|
||||
<version>${nursingunit.version}</version>
|
||||
</dependency>
|
||||
<!-- 接口 模块 -->
|
||||
<dependency>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
|
|
Loading…
Reference in New Issue