服务指令同步
This commit is contained in:
parent
6a28277197
commit
dac03cbfc4
|
|
@ -1,5 +1,7 @@
|
||||||
package com.nu.modules.directivetag.body.controller;
|
package com.nu.modules.directivetag.body.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
|
@ -10,6 +12,7 @@ import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
|
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||||
import org.jeecg.common.system.base.controller.JeecgController;
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
import org.jeecg.common.system.query.QueryGenerator;
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||||
|
|
@ -23,19 +26,21 @@ import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 体型标签
|
* @Description: 体型标签
|
||||||
* @Author: 张明远
|
* @Author: 张明远
|
||||||
* @Date: 2025-03-17
|
* @Date: 2025-03-17
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Api(tags="体型标签")
|
@Api(tags = "体型标签")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/services/directiveTag/bodyTag")
|
@RequestMapping("/services/directiveTag/bodyTag")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class DirectiveBodyTagController extends JeecgController<DirectiveBodyTag, IDirectiveBodyTagService> {
|
public class DirectiveBodyTagController extends JeecgController<DirectiveBodyTag, IDirectiveBodyTagService> {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IDirectiveBodyTagService directiveTagService;
|
private IDirectiveBodyTagService directiveTagService;
|
||||||
|
@Autowired
|
||||||
|
private ISysBaseAPI sysBaseAPI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
|
|
@ -47,17 +52,17 @@ public class DirectiveBodyTagController extends JeecgController<DirectiveBodyTag
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
//@AutoLog(value = "体型标签-分页列表查询")
|
//@AutoLog(value = "体型标签-分页列表查询")
|
||||||
@ApiOperation(value="体型标签-分页列表查询", notes="体型标签-分页列表查询")
|
@ApiOperation(value = "体型标签-分页列表查询", notes = "体型标签-分页列表查询")
|
||||||
@GetMapping(value = "/list")
|
@GetMapping(value = "/list")
|
||||||
public Result<IPage<DirectiveBodyTag>> queryPageList(DirectiveBodyTag directiveTag,
|
public Result<IPage<DirectiveBodyTag>> queryPageList(DirectiveBodyTag directiveTag,
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
HttpServletRequest req) {
|
HttpServletRequest req) {
|
||||||
// 自定义查询规则
|
// 自定义查询规则
|
||||||
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
|
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
|
||||||
// 自定义多选的查询规则为:LIKE_WITH_OR
|
// 自定义多选的查询规则为:LIKE_WITH_OR
|
||||||
customeRuleMap.put("izEnabled", QueryRuleEnum.LIKE_WITH_OR);
|
customeRuleMap.put("izEnabled", QueryRuleEnum.LIKE_WITH_OR);
|
||||||
QueryWrapper<DirectiveBodyTag> queryWrapper = QueryGenerator.initQueryWrapper(directiveTag, req.getParameterMap(),customeRuleMap);
|
QueryWrapper<DirectiveBodyTag> queryWrapper = QueryGenerator.initQueryWrapper(directiveTag, req.getParameterMap(), customeRuleMap);
|
||||||
Page<DirectiveBodyTag> page = new Page<DirectiveBodyTag>(pageNo, pageSize);
|
Page<DirectiveBodyTag> page = new Page<DirectiveBodyTag>(pageNo, pageSize);
|
||||||
IPage<DirectiveBodyTag> pageList = directiveTagService.page(page, queryWrapper);
|
IPage<DirectiveBodyTag> pageList = directiveTagService.page(page, queryWrapper);
|
||||||
return Result.OK(pageList);
|
return Result.OK(pageList);
|
||||||
|
|
@ -70,9 +75,12 @@ public class DirectiveBodyTagController extends JeecgController<DirectiveBodyTag
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "体型标签-添加")
|
@AutoLog(value = "体型标签-添加")
|
||||||
@ApiOperation(value="体型标签-添加", notes="体型标签-添加")
|
@ApiOperation(value = "体型标签-添加", notes = "体型标签-添加")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<String> add(@RequestBody DirectiveBodyTag directiveTag) {
|
public Result<String> add(@RequestBody DirectiveBodyTag directiveTag) {
|
||||||
|
JSONObject deptInfo = sysBaseAPI.getDeptInfo();
|
||||||
|
directiveTag.setId(deptInfo.getString("code") + IdUtil.simpleUUID());
|
||||||
|
directiveTag.setSysOrgCode(deptInfo.getString("code"));
|
||||||
directiveTagService.save(directiveTag);
|
directiveTagService.save(directiveTag);
|
||||||
return Result.OK("添加成功!");
|
return Result.OK("添加成功!");
|
||||||
}
|
}
|
||||||
|
|
@ -84,8 +92,8 @@ public class DirectiveBodyTagController extends JeecgController<DirectiveBodyTag
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "体型标签-编辑")
|
@AutoLog(value = "体型标签-编辑")
|
||||||
@ApiOperation(value="体型标签-编辑", notes="体型标签-编辑")
|
@ApiOperation(value = "体型标签-编辑", notes = "体型标签-编辑")
|
||||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
||||||
public Result<String> edit(@RequestBody DirectiveBodyTag directiveTag) {
|
public Result<String> edit(@RequestBody DirectiveBodyTag directiveTag) {
|
||||||
directiveTagService.updateById(directiveTag);
|
directiveTagService.updateById(directiveTag);
|
||||||
return Result.OK("编辑成功!");
|
return Result.OK("编辑成功!");
|
||||||
|
|
@ -98,10 +106,10 @@ public class DirectiveBodyTagController extends JeecgController<DirectiveBodyTag
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "体型标签-通过id删除")
|
@AutoLog(value = "体型标签-通过id删除")
|
||||||
@ApiOperation(value="体型标签-通过id删除", notes="体型标签-通过id删除")
|
@ApiOperation(value = "体型标签-通过id删除", notes = "体型标签-通过id删除")
|
||||||
@DeleteMapping(value = "/delete")
|
@DeleteMapping(value = "/delete")
|
||||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
|
||||||
if(directiveTagService.isUsed(id)){
|
if (directiveTagService.isUsed(id)) {
|
||||||
return Result.error("已被使用,无法删除!");
|
return Result.error("已被使用,无法删除!");
|
||||||
}
|
}
|
||||||
directiveTagService.removeById(id);
|
directiveTagService.removeById(id);
|
||||||
|
|
@ -115,10 +123,10 @@ public class DirectiveBodyTagController extends JeecgController<DirectiveBodyTag
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "体型标签-批量删除")
|
@AutoLog(value = "体型标签-批量删除")
|
||||||
@ApiOperation(value="体型标签-批量删除", notes="体型标签-批量删除")
|
@ApiOperation(value = "体型标签-批量删除", notes = "体型标签-批量删除")
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||||
if(directiveTagService.isUsed(ids)){
|
if (directiveTagService.isUsed(ids)) {
|
||||||
return Result.error("已被使用,无法删除!");
|
return Result.error("已被使用,无法删除!");
|
||||||
}
|
}
|
||||||
this.directiveTagService.removeByIds(Arrays.asList(ids.split(",")));
|
this.directiveTagService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
|
|
@ -132,11 +140,11 @@ public class DirectiveBodyTagController extends JeecgController<DirectiveBodyTag
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
//@AutoLog(value = "体型标签-通过id查询")
|
//@AutoLog(value = "体型标签-通过id查询")
|
||||||
@ApiOperation(value="体型标签-通过id查询", notes="体型标签-通过id查询")
|
@ApiOperation(value = "体型标签-通过id查询", notes = "体型标签-通过id查询")
|
||||||
@GetMapping(value = "/queryById")
|
@GetMapping(value = "/queryById")
|
||||||
public Result<DirectiveBodyTag> queryById(@RequestParam(name="id",required=true) String id) {
|
public Result<DirectiveBodyTag> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||||
DirectiveBodyTag directiveTag = directiveTagService.getById(id);
|
DirectiveBodyTag directiveTag = directiveTagService.getById(id);
|
||||||
if(directiveTag==null) {
|
if (directiveTag == null) {
|
||||||
return Result.error("未找到对应数据");
|
return Result.error("未找到对应数据");
|
||||||
}
|
}
|
||||||
return Result.OK(directiveTag);
|
return Result.OK(directiveTag);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
package com.nu.modules.directivetag.emotion.controller;
|
package com.nu.modules.directivetag.emotion.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
|
@ -10,6 +12,7 @@ import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
|
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||||
import org.jeecg.common.system.base.controller.JeecgController;
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
import org.jeecg.common.system.query.QueryGenerator;
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||||
|
|
@ -23,19 +26,21 @@ import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 情绪标签
|
* @Description: 情绪标签
|
||||||
* @Author: 张明远
|
* @Author: 张明远
|
||||||
* @Date: 2025-03-17
|
* @Date: 2025-03-17
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Api(tags="情绪标签")
|
@Api(tags = "情绪标签")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/services/directiveTag/emotionTag")
|
@RequestMapping("/services/directiveTag/emotionTag")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class DirectiveEmotionTagController extends JeecgController<DirectiveEmotionTag, IDirectiveEmotionTagService> {
|
public class DirectiveEmotionTagController extends JeecgController<DirectiveEmotionTag, IDirectiveEmotionTagService> {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IDirectiveEmotionTagService directiveTagService;
|
private IDirectiveEmotionTagService directiveTagService;
|
||||||
|
@Autowired
|
||||||
|
private ISysBaseAPI sysBaseAPI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
|
|
@ -47,17 +52,17 @@ public class DirectiveEmotionTagController extends JeecgController<DirectiveEmot
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
//@AutoLog(value = "情绪标签-分页列表查询")
|
//@AutoLog(value = "情绪标签-分页列表查询")
|
||||||
@ApiOperation(value="情绪标签-分页列表查询", notes="情绪标签-分页列表查询")
|
@ApiOperation(value = "情绪标签-分页列表查询", notes = "情绪标签-分页列表查询")
|
||||||
@GetMapping(value = "/list")
|
@GetMapping(value = "/list")
|
||||||
public Result<IPage<DirectiveEmotionTag>> queryPageList(DirectiveEmotionTag directiveTag,
|
public Result<IPage<DirectiveEmotionTag>> queryPageList(DirectiveEmotionTag directiveTag,
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
HttpServletRequest req) {
|
HttpServletRequest req) {
|
||||||
// 自定义查询规则
|
// 自定义查询规则
|
||||||
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
|
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
|
||||||
// 自定义多选的查询规则为:LIKE_WITH_OR
|
// 自定义多选的查询规则为:LIKE_WITH_OR
|
||||||
customeRuleMap.put("izEnabled", QueryRuleEnum.LIKE_WITH_OR);
|
customeRuleMap.put("izEnabled", QueryRuleEnum.LIKE_WITH_OR);
|
||||||
QueryWrapper<DirectiveEmotionTag> queryWrapper = QueryGenerator.initQueryWrapper(directiveTag, req.getParameterMap(),customeRuleMap);
|
QueryWrapper<DirectiveEmotionTag> queryWrapper = QueryGenerator.initQueryWrapper(directiveTag, req.getParameterMap(), customeRuleMap);
|
||||||
Page<DirectiveEmotionTag> page = new Page<DirectiveEmotionTag>(pageNo, pageSize);
|
Page<DirectiveEmotionTag> page = new Page<DirectiveEmotionTag>(pageNo, pageSize);
|
||||||
IPage<DirectiveEmotionTag> pageList = directiveTagService.page(page, queryWrapper);
|
IPage<DirectiveEmotionTag> pageList = directiveTagService.page(page, queryWrapper);
|
||||||
return Result.OK(pageList);
|
return Result.OK(pageList);
|
||||||
|
|
@ -70,9 +75,12 @@ public class DirectiveEmotionTagController extends JeecgController<DirectiveEmot
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "情绪标签-添加")
|
@AutoLog(value = "情绪标签-添加")
|
||||||
@ApiOperation(value="情绪标签-添加", notes="情绪标签-添加")
|
@ApiOperation(value = "情绪标签-添加", notes = "情绪标签-添加")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<String> add(@RequestBody DirectiveEmotionTag directiveTag) {
|
public Result<String> add(@RequestBody DirectiveEmotionTag directiveTag) {
|
||||||
|
JSONObject deptInfo = sysBaseAPI.getDeptInfo();
|
||||||
|
directiveTag.setId(deptInfo.getString("code") + IdUtil.simpleUUID());
|
||||||
|
directiveTag.setSysOrgCode(deptInfo.getString("code"));
|
||||||
directiveTagService.save(directiveTag);
|
directiveTagService.save(directiveTag);
|
||||||
return Result.OK("添加成功!");
|
return Result.OK("添加成功!");
|
||||||
}
|
}
|
||||||
|
|
@ -84,8 +92,8 @@ public class DirectiveEmotionTagController extends JeecgController<DirectiveEmot
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "情绪标签-编辑")
|
@AutoLog(value = "情绪标签-编辑")
|
||||||
@ApiOperation(value="情绪标签-编辑", notes="情绪标签-编辑")
|
@ApiOperation(value = "情绪标签-编辑", notes = "情绪标签-编辑")
|
||||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
||||||
public Result<String> edit(@RequestBody DirectiveEmotionTag directiveTag) {
|
public Result<String> edit(@RequestBody DirectiveEmotionTag directiveTag) {
|
||||||
directiveTagService.updateById(directiveTag);
|
directiveTagService.updateById(directiveTag);
|
||||||
return Result.OK("编辑成功!");
|
return Result.OK("编辑成功!");
|
||||||
|
|
@ -98,10 +106,10 @@ public class DirectiveEmotionTagController extends JeecgController<DirectiveEmot
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "情绪标签-通过id删除")
|
@AutoLog(value = "情绪标签-通过id删除")
|
||||||
@ApiOperation(value="情绪标签-通过id删除", notes="情绪标签-通过id删除")
|
@ApiOperation(value = "情绪标签-通过id删除", notes = "情绪标签-通过id删除")
|
||||||
@DeleteMapping(value = "/delete")
|
@DeleteMapping(value = "/delete")
|
||||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
|
||||||
if(directiveTagService.isUsed(id)){
|
if (directiveTagService.isUsed(id)) {
|
||||||
return Result.error("已被使用,无法删除!");
|
return Result.error("已被使用,无法删除!");
|
||||||
}
|
}
|
||||||
directiveTagService.removeById(id);
|
directiveTagService.removeById(id);
|
||||||
|
|
@ -115,10 +123,10 @@ public class DirectiveEmotionTagController extends JeecgController<DirectiveEmot
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "情绪标签-批量删除")
|
@AutoLog(value = "情绪标签-批量删除")
|
||||||
@ApiOperation(value="情绪标签-批量删除", notes="情绪标签-批量删除")
|
@ApiOperation(value = "情绪标签-批量删除", notes = "情绪标签-批量删除")
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||||
if(directiveTagService.isUsed(ids)){
|
if (directiveTagService.isUsed(ids)) {
|
||||||
return Result.error("已被使用,无法删除!");
|
return Result.error("已被使用,无法删除!");
|
||||||
}
|
}
|
||||||
this.directiveTagService.removeByIds(Arrays.asList(ids.split(",")));
|
this.directiveTagService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
|
|
@ -132,11 +140,11 @@ public class DirectiveEmotionTagController extends JeecgController<DirectiveEmot
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
//@AutoLog(value = "情绪标签-通过id查询")
|
//@AutoLog(value = "情绪标签-通过id查询")
|
||||||
@ApiOperation(value="情绪标签-通过id查询", notes="情绪标签-通过id查询")
|
@ApiOperation(value = "情绪标签-通过id查询", notes = "情绪标签-通过id查询")
|
||||||
@GetMapping(value = "/queryById")
|
@GetMapping(value = "/queryById")
|
||||||
public Result<DirectiveEmotionTag> queryById(@RequestParam(name="id",required=true) String id) {
|
public Result<DirectiveEmotionTag> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||||
DirectiveEmotionTag directiveTag = directiveTagService.getById(id);
|
DirectiveEmotionTag directiveTag = directiveTagService.getById(id);
|
||||||
if(directiveTag==null) {
|
if (directiveTag == null) {
|
||||||
return Result.error("未找到对应数据");
|
return Result.error("未找到对应数据");
|
||||||
}
|
}
|
||||||
return Result.OK(directiveTag);
|
return Result.OK(directiveTag);
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,11 @@ import java.io.UnsupportedEncodingException;
|
||||||
import java.net.URLDecoder;
|
import java.net.URLDecoder;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||||
import org.jeecg.common.system.query.QueryGenerator;
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||||
import org.jeecg.common.util.oConvertUtils;
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
|
|
@ -39,19 +43,21 @@ import io.swagger.annotations.ApiOperation;
|
||||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 服务指令-分类标签
|
* @Description: 服务指令-分类标签
|
||||||
* @Author: jeecg-boot
|
* @Author: jeecg-boot
|
||||||
* @Date: 2025-07-10
|
* @Date: 2025-07-10
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Api(tags="服务指令-分类标签")
|
@Api(tags = "服务指令-分类标签")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/services/instructionTag")
|
@RequestMapping("/services/instructionTag")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class InstructionTagController extends JeecgController<InstructionTag, IInstructionTagService> {
|
public class InstructionTagController extends JeecgController<InstructionTag, IInstructionTagService> {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IInstructionTagService instructionTagService;
|
private IInstructionTagService instructionTagService;
|
||||||
|
@Autowired
|
||||||
|
private ISysBaseAPI sysBaseAPI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
|
|
@ -63,11 +69,11 @@ public class InstructionTagController extends JeecgController<InstructionTag, II
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
//@AutoLog(value = "服务指令-分类标签-分页列表查询")
|
//@AutoLog(value = "服务指令-分类标签-分页列表查询")
|
||||||
@ApiOperation(value="服务指令-分类标签-分页列表查询", notes="服务指令-分类标签-分页列表查询")
|
@ApiOperation(value = "服务指令-分类标签-分页列表查询", notes = "服务指令-分类标签-分页列表查询")
|
||||||
@GetMapping(value = "/list")
|
@GetMapping(value = "/list")
|
||||||
public Result<IPage<InstructionTag>> queryPageList(InstructionTag instructionTag,
|
public Result<IPage<InstructionTag>> queryPageList(InstructionTag instructionTag,
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
HttpServletRequest req) {
|
HttpServletRequest req) {
|
||||||
QueryWrapper<InstructionTag> queryWrapper = QueryGenerator.initQueryWrapper(instructionTag, req.getParameterMap());
|
QueryWrapper<InstructionTag> queryWrapper = QueryGenerator.initQueryWrapper(instructionTag, req.getParameterMap());
|
||||||
Page<InstructionTag> page = new Page<InstructionTag>(pageNo, pageSize);
|
Page<InstructionTag> page = new Page<InstructionTag>(pageNo, pageSize);
|
||||||
|
|
@ -82,9 +88,12 @@ public class InstructionTagController extends JeecgController<InstructionTag, II
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "服务指令-分类标签-添加")
|
@AutoLog(value = "服务指令-分类标签-添加")
|
||||||
@ApiOperation(value="服务指令-分类标签-添加", notes="服务指令-分类标签-添加")
|
@ApiOperation(value = "服务指令-分类标签-添加", notes = "服务指令-分类标签-添加")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<String> add(@RequestBody InstructionTag instructionTag) {
|
public Result<String> add(@RequestBody InstructionTag instructionTag) {
|
||||||
|
JSONObject deptInfo = sysBaseAPI.getDeptInfo();
|
||||||
|
instructionTag.setId(deptInfo.getString("code") + IdUtil.simpleUUID());
|
||||||
|
instructionTag.setSysOrgCode(deptInfo.getString("code"));
|
||||||
instructionTagService.save(instructionTag);
|
instructionTagService.save(instructionTag);
|
||||||
return Result.OK("添加成功!");
|
return Result.OK("添加成功!");
|
||||||
}
|
}
|
||||||
|
|
@ -96,8 +105,8 @@ public class InstructionTagController extends JeecgController<InstructionTag, II
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "服务指令-分类标签-编辑")
|
@AutoLog(value = "服务指令-分类标签-编辑")
|
||||||
@ApiOperation(value="服务指令-分类标签-编辑", notes="服务指令-分类标签-编辑")
|
@ApiOperation(value = "服务指令-分类标签-编辑", notes = "服务指令-分类标签-编辑")
|
||||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
||||||
public Result<String> edit(@RequestBody InstructionTag instructionTag) {
|
public Result<String> edit(@RequestBody InstructionTag instructionTag) {
|
||||||
instructionTagService.updateById(instructionTag);
|
instructionTagService.updateById(instructionTag);
|
||||||
return Result.OK("编辑成功!");
|
return Result.OK("编辑成功!");
|
||||||
|
|
@ -110,9 +119,9 @@ public class InstructionTagController extends JeecgController<InstructionTag, II
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "服务指令-分类标签-通过id删除")
|
@AutoLog(value = "服务指令-分类标签-通过id删除")
|
||||||
@ApiOperation(value="服务指令-分类标签-通过id删除", notes="服务指令-分类标签-通过id删除")
|
@ApiOperation(value = "服务指令-分类标签-通过id删除", notes = "服务指令-分类标签-通过id删除")
|
||||||
@DeleteMapping(value = "/delete")
|
@DeleteMapping(value = "/delete")
|
||||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
|
||||||
instructionTagService.removeById(id);
|
instructionTagService.removeById(id);
|
||||||
return Result.OK("删除成功!");
|
return Result.OK("删除成功!");
|
||||||
}
|
}
|
||||||
|
|
@ -124,9 +133,9 @@ public class InstructionTagController extends JeecgController<InstructionTag, II
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "服务指令-分类标签-批量删除")
|
@AutoLog(value = "服务指令-分类标签-批量删除")
|
||||||
@ApiOperation(value="服务指令-分类标签-批量删除", notes="服务指令-分类标签-批量删除")
|
@ApiOperation(value = "服务指令-分类标签-批量删除", notes = "服务指令-分类标签-批量删除")
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||||
this.instructionTagService.removeByIds(Arrays.asList(ids.split(",")));
|
this.instructionTagService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
return Result.OK("批量删除成功!");
|
return Result.OK("批量删除成功!");
|
||||||
}
|
}
|
||||||
|
|
@ -138,11 +147,11 @@ public class InstructionTagController extends JeecgController<InstructionTag, II
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
//@AutoLog(value = "服务指令-分类标签-通过id查询")
|
//@AutoLog(value = "服务指令-分类标签-通过id查询")
|
||||||
@ApiOperation(value="服务指令-分类标签-通过id查询", notes="服务指令-分类标签-通过id查询")
|
@ApiOperation(value = "服务指令-分类标签-通过id查询", notes = "服务指令-分类标签-通过id查询")
|
||||||
@GetMapping(value = "/queryById")
|
@GetMapping(value = "/queryById")
|
||||||
public Result<InstructionTag> queryById(@RequestParam(name="id",required=true) String id) {
|
public Result<InstructionTag> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||||
InstructionTag instructionTag = instructionTagService.getById(id);
|
InstructionTag instructionTag = instructionTagService.getById(id);
|
||||||
if(instructionTag==null) {
|
if (instructionTag == null) {
|
||||||
return Result.error("未找到对应数据");
|
return Result.error("未找到对应数据");
|
||||||
}
|
}
|
||||||
return Result.OK(instructionTag);
|
return Result.OK(instructionTag);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
package com.nu.modules.servicecategory.controller;
|
package com.nu.modules.servicecategory.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
|
@ -10,6 +12,7 @@ import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
|
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||||
import org.jeecg.common.system.base.controller.JeecgController;
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
import org.jeecg.common.system.query.QueryGenerator;
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||||
|
|
@ -36,6 +39,8 @@ import java.util.Map;
|
||||||
public class ConfigServiceCategoryController extends JeecgController<ConfigServiceCategory, IConfigServiceCategoryService> {
|
public class ConfigServiceCategoryController extends JeecgController<ConfigServiceCategory, IConfigServiceCategoryService> {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IConfigServiceCategoryService configServiceCategoryService;
|
private IConfigServiceCategoryService configServiceCategoryService;
|
||||||
|
@Autowired
|
||||||
|
private ISysBaseAPI sysBaseAPI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
|
|
@ -73,6 +78,9 @@ public class ConfigServiceCategoryController extends JeecgController<ConfigServi
|
||||||
@ApiOperation(value="服务类别-添加", notes="服务类别-添加")
|
@ApiOperation(value="服务类别-添加", notes="服务类别-添加")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<String> add(@RequestBody ConfigServiceCategory configServiceCategory) {
|
public Result<String> add(@RequestBody ConfigServiceCategory configServiceCategory) {
|
||||||
|
JSONObject deptInfo = sysBaseAPI.getDeptInfo();
|
||||||
|
configServiceCategory.setId(deptInfo.getString("code") + IdUtil.simpleUUID());
|
||||||
|
configServiceCategory.setSysOrgCode(deptInfo.getString("code"));
|
||||||
configServiceCategoryService.save(configServiceCategory);
|
configServiceCategoryService.save(configServiceCategory);
|
||||||
return Result.OK("添加成功!");
|
return Result.OK("添加成功!");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,30 +1,25 @@
|
||||||
package com.nu.modules.servicedirective.controller;
|
package com.nu.modules.servicedirective.controller;
|
||||||
|
|
||||||
import cn.hutool.core.collection.ListUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.nu.dto.DirectiveAsyncMQDto;
|
|
||||||
import com.nu.modules.servicedirective.entity.ConfigServiceDirective;
|
import com.nu.modules.servicedirective.entity.ConfigServiceDirective;
|
||||||
import com.nu.modules.servicedirective.entity.TreeNode;
|
import com.nu.modules.servicedirective.entity.TreeNode;
|
||||||
import com.nu.modules.servicedirective.service.IConfigServiceDirectiveService;
|
import com.nu.modules.servicedirective.service.IConfigServiceDirectiveService;
|
||||||
import com.nu.modules.sysconfig.ISysConfigApi;
|
|
||||||
import com.nu.utils.RabbitMQUtil;
|
import com.nu.utils.RabbitMQUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.compress.utils.Lists;
|
import org.apache.commons.compress.utils.Lists;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||||
import org.jeecg.common.system.base.controller.JeecgController;
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
import org.jeecg.common.system.query.QueryGenerator;
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||||
import org.springframework.beans.BeanUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
@ -128,6 +123,7 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
|
||||||
public Result<String> add(@RequestBody ConfigServiceDirective configServiceDirective) {
|
public Result<String> add(@RequestBody ConfigServiceDirective configServiceDirective) {
|
||||||
//存储机构编码
|
//存储机构编码
|
||||||
JSONObject deptInfo = sysBaseAPI.getDeptInfo();
|
JSONObject deptInfo = sysBaseAPI.getDeptInfo();
|
||||||
|
configServiceDirective.setId(deptInfo.getString("code") + IdUtil.simpleUUID());
|
||||||
configServiceDirective.setSysOrgCode(deptInfo.getString("code"));
|
configServiceDirective.setSysOrgCode(deptInfo.getString("code"));
|
||||||
//设置为“未授权”
|
//设置为“未授权”
|
||||||
configServiceDirective.setStatus("1");
|
configServiceDirective.setStatus("1");
|
||||||
|
|
@ -146,11 +142,11 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
|
||||||
configServiceDirectiveService.removeEmotionTags(configServiceDirective);
|
configServiceDirectiveService.removeEmotionTags(configServiceDirective);
|
||||||
}
|
}
|
||||||
|
|
||||||
//同步给管理平台
|
//管理平台不存数据了,这个需求不要了! 同步给管理平台
|
||||||
{
|
{
|
||||||
DirectiveAsyncMQDto directiveAsyncMQDto = new DirectiveAsyncMQDto();
|
// DirectiveAsyncMQDto directiveAsyncMQDto = new DirectiveAsyncMQDto();
|
||||||
BeanUtils.copyProperties(configServiceDirective, directiveAsyncMQDto);
|
// BeanUtils.copyProperties(configServiceDirective, directiveAsyncMQDto);
|
||||||
rabbitMQUtil.sendToExchange("hldy.directive", "hldy.directive.audit", directiveAsyncMQDto);
|
// rabbitMQUtil.sendToExchange("hldy.directive", "hldy.directive.audit", directiveAsyncMQDto);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Result.OK("添加成功!");
|
return Result.OK("添加成功!");
|
||||||
|
|
@ -181,12 +177,12 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
|
||||||
configServiceDirectiveService.removeEmotionTags(configServiceDirective);
|
configServiceDirectiveService.removeEmotionTags(configServiceDirective);
|
||||||
}
|
}
|
||||||
|
|
||||||
//如果是未授权 则同步给管理平台进行更新
|
//管理平台不存数据了,这个需求不要了! 如果是未授权 则同步给管理平台进行更新
|
||||||
if ("1".equals(configServiceDirective.getStatus())) {
|
// if ("1".equals(configServiceDirective.getStatus())) {
|
||||||
DirectiveAsyncMQDto directiveAsyncMQDto = new DirectiveAsyncMQDto();
|
// DirectiveAsyncMQDto directiveAsyncMQDto = new DirectiveAsyncMQDto();
|
||||||
BeanUtils.copyProperties(configServiceDirective, directiveAsyncMQDto);
|
// BeanUtils.copyProperties(configServiceDirective, directiveAsyncMQDto);
|
||||||
rabbitMQUtil.sendToExchange("hldy.directive", "hldy.directive.audit", directiveAsyncMQDto);
|
// rabbitMQUtil.sendToExchange("hldy.directive", "hldy.directive.audit", directiveAsyncMQDto);
|
||||||
}
|
// }
|
||||||
|
|
||||||
return Result.OK("编辑成功!");
|
return Result.OK("编辑成功!");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@ import com.nu.utils.RabbitMQUtil;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||||
import org.jeecg.common.system.vo.DictModel;
|
import org.jeecg.common.system.vo.DictModel;
|
||||||
import org.springframework.beans.BeanUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
package com.nu.modules.servicetype.controller;
|
package com.nu.modules.servicetype.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
|
@ -10,6 +12,7 @@ import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
|
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||||
import org.jeecg.common.system.base.controller.JeecgController;
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
import org.jeecg.common.system.query.QueryGenerator;
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||||
|
|
@ -36,6 +39,8 @@ import java.util.Map;
|
||||||
public class ConfigServiceTypeController extends JeecgController<ConfigServiceType, IConfigServiceTypeService> {
|
public class ConfigServiceTypeController extends JeecgController<ConfigServiceType, IConfigServiceTypeService> {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IConfigServiceTypeService configServiceTypeService;
|
private IConfigServiceTypeService configServiceTypeService;
|
||||||
|
@Autowired
|
||||||
|
private ISysBaseAPI sysBaseAPI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
|
|
@ -73,6 +78,9 @@ public class ConfigServiceTypeController extends JeecgController<ConfigServiceTy
|
||||||
@ApiOperation(value = "服务类型-添加", notes = "服务类型-添加")
|
@ApiOperation(value = "服务类型-添加", notes = "服务类型-添加")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<String> add(@RequestBody ConfigServiceType configServiceType) {
|
public Result<String> add(@RequestBody ConfigServiceType configServiceType) {
|
||||||
|
JSONObject deptInfo = sysBaseAPI.getDeptInfo();
|
||||||
|
configServiceType.setId(deptInfo.getString("code") + IdUtil.simpleUUID());
|
||||||
|
configServiceType.setSysOrgCode(deptInfo.getString("code"));
|
||||||
configServiceTypeService.save(configServiceType);
|
configServiceTypeService.save(configServiceType);
|
||||||
return Result.OK("添加成功!");
|
return Result.OK("添加成功!");
|
||||||
}
|
}
|
||||||
|
|
@ -101,7 +109,7 @@ public class ConfigServiceTypeController extends JeecgController<ConfigServiceTy
|
||||||
@ApiOperation(value = "服务类型-通过id删除", notes = "服务类型-通过id删除")
|
@ApiOperation(value = "服务类型-通过id删除", notes = "服务类型-通过id删除")
|
||||||
@DeleteMapping(value = "/delete")
|
@DeleteMapping(value = "/delete")
|
||||||
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
|
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
|
||||||
if(configServiceTypeService.isUsed(id)){
|
if (configServiceTypeService.isUsed(id)) {
|
||||||
return Result.error("已被使用,无法删除!");
|
return Result.error("已被使用,无法删除!");
|
||||||
}
|
}
|
||||||
configServiceTypeService.removeById(id);
|
configServiceTypeService.removeById(id);
|
||||||
|
|
@ -118,7 +126,7 @@ public class ConfigServiceTypeController extends JeecgController<ConfigServiceTy
|
||||||
@ApiOperation(value = "服务类型-批量删除", notes = "服务类型-批量删除")
|
@ApiOperation(value = "服务类型-批量删除", notes = "服务类型-批量删除")
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||||
if(configServiceTypeService.isUsed(ids)){
|
if (configServiceTypeService.isUsed(ids)) {
|
||||||
return Result.error("已被使用,无法删除!");
|
return Result.error("已被使用,无法删除!");
|
||||||
}
|
}
|
||||||
this.configServiceTypeService.removeByIds(Arrays.asList(ids.split(",")));
|
this.configServiceTypeService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue