服务指令bug
This commit is contained in:
parent
c2c78810b7
commit
e53fea5385
|
@ -109,6 +109,7 @@ public class InstructionTagController extends JeecgController<InstructionTag, II
|
|||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody InstructionTag instructionTag) {
|
||||
instructionTagService.updateById(instructionTag);
|
||||
//如果是
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
|
|
|
@ -173,4 +173,22 @@ public class ConfigServiceCategoryController extends JeecgController<ConfigServi
|
|||
return super.importExcel(request, response, ConfigServiceCategory.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用/停用分类标签下所有服务类别
|
||||
*
|
||||
* @param configServiceCategory
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "启用/停用分类标签下所有服务类别")
|
||||
@ApiOperation(value="服务类别-启用/停用分类标签下所有服务类别", notes="服务类别-启用/停用分类标签下所有服务类别")
|
||||
@RequestMapping(value = "/useOrStopCascade", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> useOrStopCascade(@RequestBody ConfigServiceCategory configServiceCategory) {
|
||||
QueryWrapper<ConfigServiceCategory> qw = new QueryWrapper<>();
|
||||
qw.eq("instruction_id",configServiceCategory.getInstructionId());
|
||||
ConfigServiceCategory e = new ConfigServiceCategory();
|
||||
e.setIzEnabled(configServiceCategory.getIzEnabled());
|
||||
configServiceCategoryService.update(e,qw);
|
||||
return Result.OK();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ import com.nu.enums.MQStatus;
|
|||
import com.nu.modules.servicedirective.entity.ConfigServiceDirective;
|
||||
import com.nu.modules.servicedirective.entity.TreeNode;
|
||||
import com.nu.modules.servicedirective.service.IConfigServiceDirectiveService;
|
||||
import com.nu.modules.servicetype.entity.ConfigServiceType;
|
||||
import com.nu.utils.RabbitMQUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
@ -372,4 +373,30 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
|
|||
//发送消息
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用/停用分类标签或服务类别或服务类型下所有服务指令
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "启用/停用分类标签或服务类别或服务类型下所有服务指令")
|
||||
@ApiOperation(value="服务类别-启用/停用分类标签或服务类别或服务类型下所有服务指令", notes="服务类别-启用/停用分类标签或服务类别或服务类型下所有服务指令")
|
||||
@RequestMapping(value = "/useOrStopCascade", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> useOrStopCascade(@RequestBody ConfigServiceDirective dto) {
|
||||
QueryWrapper<ConfigServiceDirective> qw = new QueryWrapper<>();
|
||||
if(StringUtils.isNotBlank(dto.getInstructionTagId())){
|
||||
qw.eq("instruction_tag_id",dto.getInstructionTagId());
|
||||
}
|
||||
if(StringUtils.isNotBlank(dto.getCategoryId())){
|
||||
qw.eq("category_id",dto.getCategoryId());
|
||||
}
|
||||
if(StringUtils.isNotBlank(dto.getTypeId())){
|
||||
qw.eq("type_id",dto.getTypeId());
|
||||
}
|
||||
ConfigServiceDirective e = new ConfigServiceDirective();
|
||||
e.setIzEnabled(dto.getIzEnabled());
|
||||
configServiceDirectiveService.update(e,qw);
|
||||
return Result.OK();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,11 +5,13 @@ import com.alibaba.fastjson.JSONObject;
|
|||
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.servicecategory.entity.ConfigServiceCategory;
|
||||
import com.nu.modules.servicetype.entity.ConfigServiceType;
|
||||
import com.nu.modules.servicetype.service.IConfigServiceTypeService;
|
||||
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.aspect.annotation.AutoLog;
|
||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||
|
@ -173,4 +175,26 @@ public class ConfigServiceTypeController extends JeecgController<ConfigServiceTy
|
|||
return super.importExcel(request, response, ConfigServiceType.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用/停用分类标签或服务类别下所有服务类型
|
||||
*
|
||||
* @param configServiceType
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "启用/停用分类标签或服务类别下所有服务类型")
|
||||
@ApiOperation(value="服务类别-启用/停用分类标签或服务类别下所有服务类型", notes="服务类别-启用/停用分类标签或服务类别下所有服务类型")
|
||||
@RequestMapping(value = "/useOrStopCascade", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> useOrStopCascade(@RequestBody ConfigServiceType configServiceType) {
|
||||
QueryWrapper<ConfigServiceType> qw = new QueryWrapper<>();
|
||||
if(StringUtils.isNotBlank(configServiceType.getInstructionId())){
|
||||
qw.eq("instruction_id",configServiceType.getInstructionId());
|
||||
}
|
||||
if(StringUtils.isNotBlank(configServiceType.getCategoryId())){
|
||||
qw.eq("category_id",configServiceType.getCategoryId());
|
||||
}
|
||||
ConfigServiceType e = new ConfigServiceType();
|
||||
e.setIzEnabled(configServiceType.getIzEnabled());
|
||||
configServiceTypeService.update(e,qw);
|
||||
return Result.OK();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,6 +35,12 @@
|
|||
<groupId>org.jeecgframework</groupId>
|
||||
<artifactId>weixin4j</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nu-admin-local-api</artifactId>
|
||||
<version>2.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
package org.jeecg.modules.api.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nu.modules.sysconfig.ISysConfigApi;
|
||||
import com.nu.utils.HttpRequestUtil;
|
||||
import org.jeecg.modules.system.service.ISysUserService;
|
||||
import org.jeecg.modules.system.service.impl.SysBaseApiImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
@ -16,6 +19,7 @@ import org.springframework.web.bind.annotation.*;
|
|||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
|
@ -33,6 +37,8 @@ public class SystemApiController {
|
|||
private SysBaseApiImpl sysBaseApi;
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
@Autowired
|
||||
private ISysConfigApi sysConfigApi;
|
||||
|
||||
/**
|
||||
* 通过用户账号查询部门集合
|
||||
|
@ -40,12 +46,12 @@ public class SystemApiController {
|
|||
* @return 部门 id
|
||||
*/
|
||||
@GetMapping("/getOrgInfo")
|
||||
Result<Map<String,String>> getOrgInfo() {
|
||||
Result<Map<String, String>> getOrgInfo() {
|
||||
JSONObject deptInfo = sysBaseApi.getDeptInfo();
|
||||
Map<String,String> result = Maps.newHashMap();
|
||||
result.put("orgCode",deptInfo.getString("code"));
|
||||
result.put("orgName",deptInfo.getString("name"));
|
||||
result.put("url",deptInfo.getString("url"));
|
||||
Map<String, String> result = Maps.newHashMap();
|
||||
result.put("orgCode", deptInfo.getString("code"));
|
||||
result.put("orgName", deptInfo.getString("name"));
|
||||
result.put("url", deptInfo.getString("url"));
|
||||
return Result.ok(result);
|
||||
}
|
||||
|
||||
|
@ -1067,4 +1073,60 @@ public class SystemApiController {
|
|||
return sysBaseApi.dictTableWhiteListCheckByDict(tableOrDictCode, fields);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取机构对应api地址
|
||||
*/
|
||||
@GetMapping("/getApiAddressByOrgCode")
|
||||
public Result<Map> getApiAddressByOrgCode(@RequestParam("orgCode") String orgCode) {
|
||||
Map<String, String> result = Maps.newHashMap();
|
||||
//查询源数据平台的接口api地址
|
||||
{
|
||||
//各平台api地址都存在管理系统中 管理系统api地址在系统参数配置中 “ope_open_url”
|
||||
JSONObject opeOpenUrl = sysConfigApi.getByKeyByDS("master", "ope_open_url");
|
||||
String opeApiAddress = opeOpenUrl.getString("configValue");
|
||||
if (opeApiAddress.endsWith("/")) {
|
||||
opeApiAddress = opeApiAddress.substring(0, opeApiAddress.length() - 1);
|
||||
}
|
||||
String bizApiAddress = opeApiAddress + "/api/baseInfo/getOrgApiAddress?orgCode=" + orgCode;
|
||||
|
||||
try {
|
||||
String res = HttpRequestUtil.doGet(bizApiAddress, HttpRequestUtil.createDefaultHeaders());
|
||||
JSONObject jsonResponse = JSON.parseObject(res);
|
||||
JSONObject result_ = jsonResponse.getJSONObject("result");
|
||||
result.put("url", result_.getString("url"));
|
||||
return Result.ok(result);
|
||||
} catch (Exception e) {
|
||||
return Result.ok(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取机构对应协议域名
|
||||
*/
|
||||
@GetMapping("/getOrgUrlByOrgCode")
|
||||
public Result<Map> getOrgUrlByOrgCode(@RequestParam("orgCode") String orgCode) {
|
||||
Map<String, String> result = Maps.newHashMap();
|
||||
//查询源数据平台的接口api地址
|
||||
{
|
||||
//各平台api地址都存在管理系统中 管理系统api地址在系统参数配置中 “ope_open_url”
|
||||
JSONObject opeOpenUrl = sysConfigApi.getByKeyByDS("master", "ope_open_url");
|
||||
String opeApiAddress = opeOpenUrl.getString("configValue");
|
||||
if (opeApiAddress.endsWith("/")) {
|
||||
opeApiAddress = opeApiAddress.substring(0, opeApiAddress.length() - 1);
|
||||
}
|
||||
String bizApiAddress = opeApiAddress + "/api/baseInfo/getOrgUrlByOrgCode?orgCode=" + orgCode;
|
||||
|
||||
try {
|
||||
String res = HttpRequestUtil.doGet(bizApiAddress, HttpRequestUtil.createDefaultHeaders());
|
||||
JSONObject jsonResponse = JSON.parseObject(res);
|
||||
JSONObject result_ = jsonResponse.getJSONObject("result");
|
||||
result.put("url", result_.getString("url"));
|
||||
return Result.ok(result);
|
||||
} catch (Exception e) {
|
||||
return Result.ok(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue