服务指令镜像码
This commit is contained in:
parent
0622e64bee
commit
cfe4cd08d2
|
|
@ -2,6 +2,7 @@ package com.nu.modules.elder.elderTag.api;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
|
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
|
||||||
|
import com.nu.modules.directive.entity.DirectiveExportApiEntity;
|
||||||
import com.nu.modules.elder.api.ElderTagApi;
|
import com.nu.modules.elder.api.ElderTagApi;
|
||||||
import com.nu.entity.ElderTagExportEntity;
|
import com.nu.entity.ElderTagExportEntity;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
|
@ -38,4 +39,56 @@ public class ElderTagExportApi {
|
||||||
resultData.put("list", list);
|
resultData.put("list", list);
|
||||||
return Result.ok(resultData);
|
return Result.ok(resultData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/queryCompareDirectives")
|
||||||
|
public Result<JSONObject> queryCompareDirectives(@RequestParam("orgCode") String orgCode) {
|
||||||
|
//切换至业务数据源
|
||||||
|
DynamicDataSourceContextHolder.push(orgCode);
|
||||||
|
List<DirectiveExportApiEntity> list;
|
||||||
|
try {
|
||||||
|
// list = elderTagApi.queryCompareDirectives();
|
||||||
|
} finally {
|
||||||
|
//关闭数据源切换
|
||||||
|
DynamicDataSourceContextHolder.clear();
|
||||||
|
}
|
||||||
|
JSONObject resultData = new JSONObject();
|
||||||
|
// resultData.put("list", list);
|
||||||
|
return Result.ok(resultData);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成指令镜像码 需要机构编码
|
||||||
|
* @param orgCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/generateDirectiveSyncCode")
|
||||||
|
public Result<JSONObject> generateDirectiveSyncCode(@RequestParam("createBy") String createBy,@RequestParam("orgCode") String orgCode) {
|
||||||
|
JSONObject resultData = new JSONObject();
|
||||||
|
// resultData.put("directiveSyncCode", directiveSyncCodeApi.generateDirectiveSyncCode(createBy,orgCode));
|
||||||
|
return Result.ok(resultData);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据镜像码获取机构编码
|
||||||
|
* @param syncCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/getOrgCodeBySyncCode")
|
||||||
|
public Result<JSONObject> getOrgCodeBySyncCode(@RequestParam("syncCode") String syncCode) {
|
||||||
|
JSONObject resultData = new JSONObject();
|
||||||
|
// resultData.put("orgCode", directiveSyncCodeApi.getOrgCodeBySyncCode(syncCode));
|
||||||
|
return Result.ok(resultData);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据机构编码获取镜像码
|
||||||
|
* @param orgCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/getSyncCodeByOrgCode")
|
||||||
|
public Result<JSONObject> getSyncCodeByOrgCode(@RequestParam("orgCode") String orgCode) {
|
||||||
|
JSONObject resultData = new JSONObject();
|
||||||
|
// resultData.put("orgCode", directiveSyncCodeApi.getSyncCodeByOrgCode(orgCode));
|
||||||
|
return Result.ok(resultData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@ public class ShiroConfig {
|
||||||
filterChainDefinitionMap.put("/api/services/directive/getOrgCodeBySyncCode", "anon");//服务指令暴露接口
|
filterChainDefinitionMap.put("/api/services/directive/getOrgCodeBySyncCode", "anon");//服务指令暴露接口
|
||||||
filterChainDefinitionMap.put("/api/services/directive/getSyncCodeByOrgCode", "anon");//服务指令暴露接口
|
filterChainDefinitionMap.put("/api/services/directive/getSyncCodeByOrgCode", "anon");//服务指令暴露接口
|
||||||
|
|
||||||
filterChainDefinitionMap.put("/api/services/elderTag/queryCompareElderTag", "anon");//长者标签暴露接口
|
filterChainDefinitionMap.put("/api/services/elderTag/**", "anon");//长者标签暴露接口
|
||||||
|
|
||||||
//update-begin--Author:scott Date:20221116 for:排除静态资源后缀
|
//update-begin--Author:scott Date:20221116 for:排除静态资源后缀
|
||||||
filterChainDefinitionMap.put("/", "anon");
|
filterChainDefinitionMap.put("/", "anon");
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,180 @@
|
||||||
|
package com.nu.modules.eldertagsynccode.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.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.eldertagsynccode.entity.ElderTagSyncCode;
|
||||||
|
import com.nu.modules.eldertagsynccode.service.IElderTagSyncCodeService;
|
||||||
|
|
||||||
|
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: 2026-02-25
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="长者标签-机构-镜像码")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/eldertagsynccode/elderTagSyncCode")
|
||||||
|
@Slf4j
|
||||||
|
public class ElderTagSyncCodeController extends JeecgController<ElderTagSyncCode, IElderTagSyncCodeService> {
|
||||||
|
@Autowired
|
||||||
|
private IElderTagSyncCodeService elderTagSyncCodeService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param elderTagSyncCode
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "长者标签-机构-镜像码-分页列表查询")
|
||||||
|
@ApiOperation(value="长者标签-机构-镜像码-分页列表查询", notes="长者标签-机构-镜像码-分页列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<IPage<ElderTagSyncCode>> queryPageList(ElderTagSyncCode elderTagSyncCode,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<ElderTagSyncCode> queryWrapper = QueryGenerator.initQueryWrapper(elderTagSyncCode, req.getParameterMap());
|
||||||
|
Page<ElderTagSyncCode> page = new Page<ElderTagSyncCode>(pageNo, pageSize);
|
||||||
|
IPage<ElderTagSyncCode> pageList = elderTagSyncCodeService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param elderTagSyncCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "长者标签-机构-镜像码-添加")
|
||||||
|
@ApiOperation(value="长者标签-机构-镜像码-添加", notes="长者标签-机构-镜像码-添加")
|
||||||
|
@RequiresPermissions("eldertagsynccode:nu_config_elder_tag_sync_code:add")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<String> add(@RequestBody ElderTagSyncCode elderTagSyncCode) {
|
||||||
|
elderTagSyncCodeService.save(elderTagSyncCode);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param elderTagSyncCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "长者标签-机构-镜像码-编辑")
|
||||||
|
@ApiOperation(value="长者标签-机构-镜像码-编辑", notes="长者标签-机构-镜像码-编辑")
|
||||||
|
@RequiresPermissions("eldertagsynccode:nu_config_elder_tag_sync_code:edit")
|
||||||
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
|
public Result<String> edit(@RequestBody ElderTagSyncCode elderTagSyncCode) {
|
||||||
|
elderTagSyncCodeService.updateById(elderTagSyncCode);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "长者标签-机构-镜像码-通过id删除")
|
||||||
|
@ApiOperation(value="长者标签-机构-镜像码-通过id删除", notes="长者标签-机构-镜像码-通过id删除")
|
||||||
|
@RequiresPermissions("eldertagsynccode:nu_config_elder_tag_sync_code:delete")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
|
elderTagSyncCodeService.removeById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "长者标签-机构-镜像码-批量删除")
|
||||||
|
@ApiOperation(value="长者标签-机构-镜像码-批量删除", notes="长者标签-机构-镜像码-批量删除")
|
||||||
|
@RequiresPermissions("eldertagsynccode:nu_config_elder_tag_sync_code:deleteBatch")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
|
this.elderTagSyncCodeService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "长者标签-机构-镜像码-通过id查询")
|
||||||
|
@ApiOperation(value="长者标签-机构-镜像码-通过id查询", notes="长者标签-机构-镜像码-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<ElderTagSyncCode> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
|
ElderTagSyncCode elderTagSyncCode = elderTagSyncCodeService.getById(id);
|
||||||
|
if(elderTagSyncCode==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(elderTagSyncCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param elderTagSyncCode
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("eldertagsynccode:nu_config_elder_tag_sync_code:exportXls")
|
||||||
|
@RequestMapping(value = "/exportXls")
|
||||||
|
public ModelAndView exportXls(HttpServletRequest request, ElderTagSyncCode elderTagSyncCode) {
|
||||||
|
return super.exportXls(request, elderTagSyncCode, ElderTagSyncCode.class, "长者标签-机构-镜像码");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过excel导入数据
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("eldertagsynccode:nu_config_elder_tag_sync_code:importExcel")
|
||||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
return super.importExcel(request, response, ElderTagSyncCode.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
package com.nu.modules.eldertagsynccode.entity;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
|
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: 2026-02-25
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("nu_config_elder_tag_sync_code")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value="nu_config_elder_tag_sync_code对象", description="长者标签-机构-镜像码")
|
||||||
|
public class ElderTagSyncCode 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 = "机构编码")
|
||||||
|
private java.lang.String orgCode;
|
||||||
|
/**机构标签镜像码*/
|
||||||
|
@Excel(name = "机构标签镜像码", width = 15)
|
||||||
|
@ApiModelProperty(value = "机构标签镜像码")
|
||||||
|
private java.lang.String orgTagCode;
|
||||||
|
/**创建人*/
|
||||||
|
@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;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.nu.modules.eldertagsynccode.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import com.nu.modules.eldertagsynccode.entity.ElderTagSyncCode;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 长者标签-机构-镜像码
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2026-02-25
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface ElderTagSyncCodeMapper extends BaseMapper<ElderTagSyncCode> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -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.eldertagsynccode.mapper.ElderTagSyncCodeMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.nu.modules.eldertagsynccode.service;
|
||||||
|
|
||||||
|
import com.nu.modules.eldertagsynccode.entity.ElderTagSyncCode;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 长者标签-机构-镜像码
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2026-02-25
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface IElderTagSyncCodeService extends IService<ElderTagSyncCode> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
package com.nu.modules.eldertagsynccode.service.impl;
|
||||||
|
|
||||||
|
import com.nu.modules.eldertagsynccode.entity.ElderTagSyncCode;
|
||||||
|
import com.nu.modules.eldertagsynccode.mapper.ElderTagSyncCodeMapper;
|
||||||
|
import com.nu.modules.eldertagsynccode.service.IElderTagSyncCodeService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 长者标签-机构-镜像码
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2026-02-25
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ElderTagSyncCodeServiceImpl extends ServiceImpl<ElderTagSyncCodeMapper, ElderTagSyncCode> implements IElderTagSyncCodeService {
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue