parent
7e345e67ec
commit
bdd5fede35
|
@ -39,8 +39,8 @@ public class ConfigServiceType implements Serializable {
|
||||||
@ApiModelProperty(value = "id")
|
@ApiModelProperty(value = "id")
|
||||||
private java.lang.String id;
|
private java.lang.String id;
|
||||||
/**服务类别id*/
|
/**服务类别id*/
|
||||||
@Excel(name = "服务类别id", width = 15)
|
@Excel(name = "服务类别", width = 15)
|
||||||
@ApiModelProperty(value = "服务类别id")
|
@ApiModelProperty(value = "服务类别")
|
||||||
@Dict(dicCode = "id" , dictTable = "config_service_category" , dicText = "category_name")
|
@Dict(dicCode = "id" , dictTable = "config_service_category" , dicText = "category_name")
|
||||||
private java.lang.String categoryId;
|
private java.lang.String categoryId;
|
||||||
/**服务类型名称*/
|
/**服务类型名称*/
|
||||||
|
@ -52,13 +52,13 @@ public class ConfigServiceType implements Serializable {
|
||||||
@ApiModelProperty(value = "排序")
|
@ApiModelProperty(value = "排序")
|
||||||
private java.lang.Integer sort;
|
private java.lang.Integer sort;
|
||||||
/**是否启用 0启用 1未启用*/
|
/**是否启用 0启用 1未启用*/
|
||||||
@Excel(name = "是否启用 0启用 1未启用", width = 15)
|
@Excel(name = "是否启用", width = 15)
|
||||||
@ApiModelProperty(value = "是否启用 0启用 1未启用")
|
@ApiModelProperty(value = "是否启用")
|
||||||
@Dict(dicCode = "iz_enabled")
|
@Dict(dicCode = "iz_enabled")
|
||||||
private java.lang.String izEnabled;
|
private java.lang.String izEnabled;
|
||||||
/**是否删除 0未删除 1删除*/
|
/**是否删除 0未删除 1删除*/
|
||||||
@Excel(name = "是否删除 0未删除 1删除", width = 15)
|
@Excel(name = "是否删除", width = 15)
|
||||||
@ApiModelProperty(value = "是否删除 0未删除 1删除")
|
@ApiModelProperty(value = "是否删除")
|
||||||
@TableLogic
|
@TableLogic
|
||||||
private java.lang.String delFlag;
|
private java.lang.String delFlag;
|
||||||
/**创建人*/
|
/**创建人*/
|
||||||
|
|
|
@ -47,13 +47,13 @@ public class ConfigServiceCategory implements Serializable {
|
||||||
@ApiModelProperty(value = "排序")
|
@ApiModelProperty(value = "排序")
|
||||||
private java.lang.Integer sort;
|
private java.lang.Integer sort;
|
||||||
/**是否启用 0启用 1未启用*/
|
/**是否启用 0启用 1未启用*/
|
||||||
@Excel(name = "是否启用 0启用 1未启用", width = 15)
|
@Excel(name = "是否启用", width = 15)
|
||||||
@ApiModelProperty(value = "是否启用 0启用 1未启用")
|
@ApiModelProperty(value = "是否启用")
|
||||||
@Dict(dicCode = "iz_enabled")
|
@Dict(dicCode = "iz_enabled")
|
||||||
private java.lang.String izEnabled;
|
private java.lang.String izEnabled;
|
||||||
/**是否删除 0未删除 1删除*/
|
/**是否删除 0未删除 1删除*/
|
||||||
@Excel(name = "是否删除 0未删除 1删除", width = 15)
|
@Excel(name = "是否删除", width = 15)
|
||||||
@ApiModelProperty(value = "是否删除 0未删除 1删除")
|
@ApiModelProperty(value = "是否删除")
|
||||||
@TableLogic
|
@TableLogic
|
||||||
private java.lang.String delFlag;
|
private java.lang.String delFlag;
|
||||||
/**创建人*/
|
/**创建人*/
|
||||||
|
|
|
@ -1,74 +1,61 @@
|
||||||
package com.nu.modules.serviceDirective.controller;
|
package com.nu.modules.serviceDirective.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
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.serviceDirective.entity.ConfigServiceDirective;
|
||||||
|
import com.nu.modules.serviceDirective.service.IConfigServiceDirectiveService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
|
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
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.serviceDirective.entity.ConfigServiceDirective;
|
|
||||||
import com.nu.modules.serviceDirective.service.IConfigServiceDirectiveService;
|
|
||||||
|
|
||||||
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: 服务指令
|
* @Description: 服务指令
|
||||||
* @Author: jeecg-boot
|
* @Author: jeecg-boot
|
||||||
* @Date: 2025-03-13
|
* @Date: 2025-03-13
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Api(tags="服务指令")
|
@Api(tags = "服务指令")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/serviceDirective/configServiceDirective")
|
@RequestMapping("/serviceDirective/configServiceDirective")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class ConfigServiceDirectiveController extends JeecgController<ConfigServiceDirective, IConfigServiceDirectiveService> {
|
public class ConfigServiceDirectiveController extends JeecgController<ConfigServiceDirective, IConfigServiceDirectiveService> {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IConfigServiceDirectiveService configServiceDirectiveService;
|
private IConfigServiceDirectiveService configServiceDirectiveService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
*
|
*
|
||||||
* @param configServiceDirective
|
* @param configServiceDirective
|
||||||
* @param pageNo
|
* @param pageNo
|
||||||
* @param pageSize
|
* @param pageSize
|
||||||
* @param req
|
* @param req
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
//@AutoLog(value = "服务指令-分页列表查询")
|
//@AutoLog(value = "服务指令-分页列表查询")
|
||||||
@ApiOperation(value="服务指令-分页列表查询", notes="服务指令-分页列表查询")
|
@ApiOperation(value = "服务指令-分页列表查询", notes = "服务指令-分页列表查询")
|
||||||
@GetMapping(value = "/list")
|
@GetMapping(value = "/list")
|
||||||
public Result<IPage<ConfigServiceDirective>> queryPageList(ConfigServiceDirective configServiceDirective,
|
public Result<IPage<ConfigServiceDirective>> queryPageList(ConfigServiceDirective configServiceDirective,
|
||||||
@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
|
||||||
|
@ -80,95 +67,201 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
|
||||||
customeRuleMap.put("chargingFrequency", QueryRuleEnum.LIKE_WITH_OR);
|
customeRuleMap.put("chargingFrequency", QueryRuleEnum.LIKE_WITH_OR);
|
||||||
customeRuleMap.put("cycleType", QueryRuleEnum.LIKE_WITH_OR);
|
customeRuleMap.put("cycleType", QueryRuleEnum.LIKE_WITH_OR);
|
||||||
customeRuleMap.put("izEnabled", QueryRuleEnum.LIKE_WITH_OR);
|
customeRuleMap.put("izEnabled", QueryRuleEnum.LIKE_WITH_OR);
|
||||||
QueryWrapper<ConfigServiceDirective> queryWrapper = QueryGenerator.initQueryWrapper(configServiceDirective, req.getParameterMap(),customeRuleMap);
|
QueryWrapper<ConfigServiceDirective> queryWrapper = QueryGenerator.initQueryWrapper(configServiceDirective, req.getParameterMap(), customeRuleMap);
|
||||||
Page<ConfigServiceDirective> page = new Page<ConfigServiceDirective>(pageNo, pageSize);
|
Page<ConfigServiceDirective> page = new Page<ConfigServiceDirective>(pageNo, pageSize);
|
||||||
IPage<ConfigServiceDirective> pageList = configServiceDirectiveService.page(page, queryWrapper);
|
IPage<ConfigServiceDirective> pageList = configServiceDirectiveService.page(page, queryWrapper);
|
||||||
return Result.OK(pageList);
|
|
||||||
}
|
//处理单元格合并所需数据
|
||||||
|
{
|
||||||
/**
|
List<ConfigServiceDirective> records_ = pageList.getRecords();
|
||||||
* 添加
|
List<ConfigServiceDirective> records = BeanUtil.copyToList(records_, ConfigServiceDirective.class);
|
||||||
*
|
String fwlb = "";//存储循环到的服务类别值
|
||||||
* @param configServiceDirective
|
int fwlb_repCount = 0;//存储服务类别重复了几次
|
||||||
* @return
|
String fwlx = "";//存储循环到的服务类型值
|
||||||
*/
|
int fwlx_repCount = 0;//存储服务类型重复了几次
|
||||||
@AutoLog(value = "服务指令-添加")
|
String zlbq = "";//存储循环到的指令标签值
|
||||||
@ApiOperation(value="服务指令-添加", notes="服务指令-添加")
|
int zlbq_repCount = 0;//存储指令标签重复了几次
|
||||||
@RequiresPermissions("serviceDirective:config_service_directive:add")
|
for (int i = 0; i < records.size(); i++) {
|
||||||
@PostMapping(value = "/add")
|
if (i == 0) {
|
||||||
public Result<String> add(@RequestBody ConfigServiceDirective configServiceDirective) {
|
fwlb = records.get(i).getCategoryId();
|
||||||
configServiceDirectiveService.save(configServiceDirective);
|
fwlx = records.get(i).getTypeId();
|
||||||
return Result.OK("添加成功!");
|
zlbq = records.get(i).getInstructionTagId();
|
||||||
}
|
} else {
|
||||||
|
//服务类别
|
||||||
/**
|
{
|
||||||
* 编辑
|
if (fwlb.equals(records.get(i).getCategoryId())) {
|
||||||
*
|
//如果是重复数据则存储对应数据
|
||||||
* @param configServiceDirective
|
fwlb_repCount++;
|
||||||
* @return
|
records.get(i).setCategoryRowSpan(0);
|
||||||
*/
|
if (i == records.size() - 1) {
|
||||||
@AutoLog(value = "服务指令-编辑")
|
records.get(i - fwlb_repCount).setCategoryRowSpan(fwlb_repCount + 1);
|
||||||
@ApiOperation(value="服务指令-编辑", notes="服务指令-编辑")
|
}
|
||||||
@RequiresPermissions("serviceDirective:config_service_directive:edit")
|
} else {
|
||||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
//需要做服务类别重复数据记录
|
||||||
public Result<String> edit(@RequestBody ConfigServiceDirective configServiceDirective) {
|
if (fwlb_repCount > 0) {
|
||||||
configServiceDirectiveService.updateById(configServiceDirective);
|
records.get(i - fwlb_repCount).setCategoryRowSpan(fwlb_repCount + 1);
|
||||||
return Result.OK("编辑成功!");
|
}
|
||||||
}
|
//处理服务类型
|
||||||
|
{
|
||||||
/**
|
if (fwlx_repCount > 0) {
|
||||||
* 通过id删除
|
records.get(i - fwlx_repCount).setTypeRowSpan(fwlx_repCount + 1);
|
||||||
*
|
}
|
||||||
* @param id
|
//重置数据
|
||||||
* @return
|
fwlx = "";
|
||||||
*/
|
fwlx_repCount = 0;
|
||||||
@AutoLog(value = "服务指令-通过id删除")
|
}
|
||||||
@ApiOperation(value="服务指令-通过id删除", notes="服务指令-通过id删除")
|
//处理指令标签
|
||||||
@RequiresPermissions("serviceDirective:config_service_directive:delete")
|
{
|
||||||
@DeleteMapping(value = "/delete")
|
if (zlbq_repCount > 0) {
|
||||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
records.get(i - zlbq_repCount).setInstructionRowSpan(zlbq_repCount + 1);
|
||||||
configServiceDirectiveService.removeById(id);
|
}
|
||||||
return Result.OK("删除成功!");
|
//重置数据
|
||||||
}
|
zlbq = "";
|
||||||
|
zlbq_repCount = 0;
|
||||||
/**
|
}
|
||||||
* 批量删除
|
//重置数据
|
||||||
*
|
fwlb = records.get(i).getCategoryId();
|
||||||
* @param ids
|
fwlb_repCount = 0;
|
||||||
* @return
|
}
|
||||||
*/
|
}
|
||||||
@AutoLog(value = "服务指令-批量删除")
|
//服务类型
|
||||||
@ApiOperation(value="服务指令-批量删除", notes="服务指令-批量删除")
|
{
|
||||||
@RequiresPermissions("serviceDirective:config_service_directive:deleteBatch")
|
if (fwlx.equals(records.get(i).getTypeId())) {
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
//如果是重复数据则存储对应数据
|
||||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
fwlx_repCount++;
|
||||||
this.configServiceDirectiveService.removeByIds(Arrays.asList(ids.split(",")));
|
records.get(i).setTypeRowSpan(0);
|
||||||
return Result.OK("批量删除成功!");
|
if (i == records.size() - 1) {
|
||||||
}
|
records.get(i - fwlx_repCount).setTypeRowSpan(fwlx_repCount + 1);
|
||||||
|
}
|
||||||
/**
|
} else {
|
||||||
* 通过id查询
|
//需要做重复数据记录
|
||||||
*
|
if (fwlx_repCount > 0) {
|
||||||
* @param id
|
records.get(i - fwlx_repCount).setTypeRowSpan(fwlx_repCount + 1);
|
||||||
* @return
|
}
|
||||||
*/
|
//处理指令标签
|
||||||
//@AutoLog(value = "服务指令-通过id查询")
|
{
|
||||||
@ApiOperation(value="服务指令-通过id查询", notes="服务指令-通过id查询")
|
if (zlbq_repCount > 0) {
|
||||||
@GetMapping(value = "/queryById")
|
records.get(i - zlbq_repCount).setInstructionRowSpan(zlbq_repCount + 1);
|
||||||
public Result<ConfigServiceDirective> queryById(@RequestParam(name="id",required=true) String id) {
|
}
|
||||||
ConfigServiceDirective configServiceDirective = configServiceDirectiveService.getById(id);
|
//重置数据
|
||||||
if(configServiceDirective==null) {
|
zlbq = "";
|
||||||
return Result.error("未找到对应数据");
|
zlbq_repCount = 0;
|
||||||
}
|
}
|
||||||
return Result.OK(configServiceDirective);
|
//重置数据
|
||||||
}
|
fwlx = records.get(i).getTypeId();
|
||||||
|
fwlx_repCount = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//指令标签
|
||||||
|
{
|
||||||
|
if (zlbq.equals(records.get(i).getInstructionTagId())) {
|
||||||
|
//如果是重复数据则存储对应数据
|
||||||
|
zlbq_repCount++;
|
||||||
|
records.get(i).setInstructionRowSpan(0);
|
||||||
|
if (i == records.size() - 1) {
|
||||||
|
records.get(i - zlbq_repCount).setInstructionRowSpan(zlbq_repCount + 1);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//需要做重复数据记录
|
||||||
|
if (zlbq_repCount > 0) {
|
||||||
|
records.get(i - zlbq_repCount).setInstructionRowSpan(zlbq_repCount + 1);
|
||||||
|
}
|
||||||
|
//重置数据
|
||||||
|
zlbq = records.get(i).getInstructionTagId();
|
||||||
|
zlbq_repCount = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pageList.setRecords(records);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出excel
|
* 添加
|
||||||
*
|
*
|
||||||
* @param request
|
* @param configServiceDirective
|
||||||
* @param configServiceDirective
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@AutoLog(value = "服务指令-添加")
|
||||||
|
@ApiOperation(value = "服务指令-添加", notes = "服务指令-添加")
|
||||||
|
@RequiresPermissions("serviceDirective:config_service_directive:add")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<String> add(@RequestBody ConfigServiceDirective configServiceDirective) {
|
||||||
|
configServiceDirectiveService.save(configServiceDirective);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param configServiceDirective
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "服务指令-编辑")
|
||||||
|
@ApiOperation(value = "服务指令-编辑", notes = "服务指令-编辑")
|
||||||
|
@RequiresPermissions("serviceDirective:config_service_directive:edit")
|
||||||
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
||||||
|
public Result<String> edit(@RequestBody ConfigServiceDirective configServiceDirective) {
|
||||||
|
configServiceDirectiveService.updateById(configServiceDirective);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "服务指令-通过id删除")
|
||||||
|
@ApiOperation(value = "服务指令-通过id删除", notes = "服务指令-通过id删除")
|
||||||
|
@RequiresPermissions("serviceDirective:config_service_directive:delete")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
|
||||||
|
configServiceDirectiveService.removeById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "服务指令-批量删除")
|
||||||
|
@ApiOperation(value = "服务指令-批量删除", notes = "服务指令-批量删除")
|
||||||
|
@RequiresPermissions("serviceDirective:config_service_directive:deleteBatch")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||||
|
this.configServiceDirectiveService.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<ConfigServiceDirective> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||||
|
ConfigServiceDirective configServiceDirective = configServiceDirectiveService.getById(id);
|
||||||
|
if (configServiceDirective == null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(configServiceDirective);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param configServiceDirective
|
||||||
|
*/
|
||||||
@RequiresPermissions("serviceDirective:config_service_directive:exportXls")
|
@RequiresPermissions("serviceDirective:config_service_directive:exportXls")
|
||||||
@RequestMapping(value = "/exportXls")
|
@RequestMapping(value = "/exportXls")
|
||||||
public ModelAndView exportXls(HttpServletRequest request, ConfigServiceDirective configServiceDirective) {
|
public ModelAndView exportXls(HttpServletRequest request, ConfigServiceDirective configServiceDirective) {
|
||||||
|
@ -176,12 +269,12 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过excel导入数据
|
* 通过excel导入数据
|
||||||
*
|
*
|
||||||
* @param request
|
* @param request
|
||||||
* @param response
|
* @param response
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("serviceDirective:config_service_directive:importExcel")
|
@RequiresPermissions("serviceDirective:config_service_directive:importExcel")
|
||||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
|
|
@ -4,10 +4,8 @@ import java.io.Serializable;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
|
||||||
import org.jeecg.common.constant.ProvinceCityArea;
|
import org.jeecg.common.constant.ProvinceCityArea;
|
||||||
import org.jeecg.common.util.SpringContextUtils;
|
import org.jeecg.common.util.SpringContextUtils;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
@ -39,16 +37,19 @@ public class ConfigServiceDirective implements Serializable {
|
||||||
@ApiModelProperty(value = "id")
|
@ApiModelProperty(value = "id")
|
||||||
private java.lang.String id;
|
private java.lang.String id;
|
||||||
/**服务类别id*/
|
/**服务类别id*/
|
||||||
@Excel(name = "服务类别id", width = 15)
|
@Excel(name = "服务类别", width = 15)
|
||||||
@ApiModelProperty(value = "服务类别id")
|
@ApiModelProperty(value = "服务类别")
|
||||||
|
@Dict(dicCode = "id" , dictTable = "config_service_category" , dicText = "category_name")
|
||||||
private java.lang.String categoryId;
|
private java.lang.String categoryId;
|
||||||
/**服务类型id*/
|
/**服务类型id*/
|
||||||
@Excel(name = "服务类型id", width = 15)
|
@Excel(name = "服务类型", width = 15)
|
||||||
@ApiModelProperty(value = "服务类型id")
|
@ApiModelProperty(value = "服务类型")
|
||||||
|
@Dict(dicCode = "id" , dictTable = "config_service_type" , dicText = "type_name")
|
||||||
private java.lang.String typeId;
|
private java.lang.String typeId;
|
||||||
/**指令标签id*/
|
/**指令标签id*/
|
||||||
@Excel(name = "指令标签id", width = 15)
|
@Excel(name = "指令标签", width = 15)
|
||||||
@ApiModelProperty(value = "指令标签id")
|
@ApiModelProperty(value = "指令标签")
|
||||||
|
@Dict(dicCode = "instruction_tag" )
|
||||||
private java.lang.String instructionTagId;
|
private java.lang.String instructionTagId;
|
||||||
/**服务指令名称*/
|
/**服务指令名称*/
|
||||||
@Excel(name = "服务指令名称", width = 15)
|
@Excel(name = "服务指令名称", width = 15)
|
||||||
|
@ -63,20 +64,24 @@ public class ConfigServiceDirective implements Serializable {
|
||||||
@ApiModelProperty(value = "提成价格")
|
@ApiModelProperty(value = "提成价格")
|
||||||
private java.math.BigDecimal comPrice;
|
private java.math.BigDecimal comPrice;
|
||||||
/**是否参与医保报销 0不报销 1报销*/
|
/**是否参与医保报销 0不报销 1报销*/
|
||||||
@Excel(name = "是否参与医保报销 0不报销 1报销", width = 15)
|
@Excel(name = "医保报销", width = 15)
|
||||||
@ApiModelProperty(value = "是否参与医保报销 0不报销 1报销")
|
@ApiModelProperty(value = "医保报销")
|
||||||
|
@Dict(dicCode = "med_ins_reimb" )
|
||||||
private java.lang.String izReimbursement;
|
private java.lang.String izReimbursement;
|
||||||
/**是否参与机构优惠 0不参与 1参与*/
|
/**是否参与机构优惠 0不参与 1参与*/
|
||||||
@Excel(name = "是否参与机构优惠 0不参与 1参与", width = 15)
|
@Excel(name = "机构优惠", width = 15)
|
||||||
@ApiModelProperty(value = "是否参与机构优惠 0不参与 1参与")
|
@ApiModelProperty(value = "机构优惠")
|
||||||
|
@Dict(dicCode = "institutional_discount" )
|
||||||
private java.lang.String izPreferential;
|
private java.lang.String izPreferential;
|
||||||
/**收费频次 1按次收费 2按天收费*/
|
/**收费频次 1按次收费 2按天收费*/
|
||||||
@Excel(name = "收费频次 1按次收费 2按天收费", width = 15)
|
@Excel(name = "收费频次", width = 15)
|
||||||
@ApiModelProperty(value = "收费频次 1按次收费 2按天收费")
|
@ApiModelProperty(value = "收费频次")
|
||||||
|
@Dict(dicCode = "billing_frequency" )
|
||||||
private java.lang.String chargingFrequency;
|
private java.lang.String chargingFrequency;
|
||||||
/**周期类型 1日常护理 2周期护理 3即时护理*/
|
/**周期类型 1日常护理 2周期护理 3即时护理*/
|
||||||
@Excel(name = "周期类型 1日常护理 2周期护理 3即时护理", width = 15)
|
@Excel(name = "周期类型", width = 15)
|
||||||
@ApiModelProperty(value = "周期类型 1日常护理 2周期护理 3即时护理")
|
@ApiModelProperty(value = "周期类型")
|
||||||
|
@Dict(dicCode = "period_type" )
|
||||||
private java.lang.String cycleType;
|
private java.lang.String cycleType;
|
||||||
/**排序*/
|
/**排序*/
|
||||||
@Excel(name = "排序", width = 15)
|
@Excel(name = "排序", width = 15)
|
||||||
|
@ -91,13 +96,13 @@ public class ConfigServiceDirective implements Serializable {
|
||||||
@ApiModelProperty(value = "服务时长(分钟)")
|
@ApiModelProperty(value = "服务时长(分钟)")
|
||||||
private java.lang.String serviceDuration;
|
private java.lang.String serviceDuration;
|
||||||
/**是否启用 0启用 1未启用*/
|
/**是否启用 0启用 1未启用*/
|
||||||
@Excel(name = "是否启用 0启用 1未启用", width = 15)
|
@Excel(name = "是否启用", width = 15)
|
||||||
@ApiModelProperty(value = "是否启用 0启用 1未启用")
|
@ApiModelProperty(value = "是否启用")
|
||||||
@Dict(dicCode = "iz_enabled")
|
@Dict(dicCode = "iz_enabled")
|
||||||
private java.lang.String izEnabled;
|
private java.lang.String izEnabled;
|
||||||
/**是否删除 0未删除 1删除*/
|
/**是否删除 0未删除 1删除*/
|
||||||
@Excel(name = "是否删除 0未删除 1删除", width = 15)
|
@Excel(name = "是否删除", width = 15)
|
||||||
@ApiModelProperty(value = "是否删除 0未删除 1删除")
|
@ApiModelProperty(value = "是否删除")
|
||||||
@TableLogic
|
@TableLogic
|
||||||
private java.lang.String delFlag;
|
private java.lang.String delFlag;
|
||||||
/**创建人*/
|
/**创建人*/
|
||||||
|
@ -127,4 +132,12 @@ public class ConfigServiceDirective implements Serializable {
|
||||||
@Excel(name = "视频文件", width = 15)
|
@Excel(name = "视频文件", width = 15)
|
||||||
@ApiModelProperty(value = "视频文件")
|
@ApiModelProperty(value = "视频文件")
|
||||||
private java.lang.String mp4File;
|
private java.lang.String mp4File;
|
||||||
|
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer categoryRowSpan;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer typeRowSpan;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer instructionRowSpan;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?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-iot-api</artifactId>
|
||||||
|
<version>2.0.0</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<artifactId>nu-iot-local-api</artifactId>
|
||||||
|
|
||||||
|
</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-iot</artifactId>
|
||||||
|
<version>2.0.0</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<artifactId>nu-iot-api</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
<module>nu-iot-local-api</module>
|
||||||
|
</modules>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.nursingunit.boot</groupId>
|
||||||
|
<artifactId>nursing-unit-base-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
|
@ -0,0 +1,35 @@
|
||||||
|
<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-iot</artifactId>
|
||||||
|
<version>2.0.0</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<artifactId>nu-iot-biz</artifactId>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.nursingunit.boot</groupId>
|
||||||
|
<artifactId>nu-iot-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>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?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>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<artifactId>nursing-unit-iot</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
<module>nu-iot-api</module>
|
||||||
|
<module>nu-iot-biz</module>
|
||||||
|
</modules>
|
||||||
|
|
||||||
|
</project>
|
|
@ -24,12 +24,19 @@
|
||||||
<artifactId>nursing-unit-demo</artifactId>
|
<artifactId>nursing-unit-demo</artifactId>
|
||||||
<version>${nursingunit.version}</version>
|
<version>${nursingunit.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- CONFIG 示例模块 -->
|
<!-- CONFIG 模块 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.nursingunit.boot</groupId>
|
<groupId>com.nursingunit.boot</groupId>
|
||||||
<artifactId>nu-config-biz</artifactId>
|
<artifactId>nu-config-biz</artifactId>
|
||||||
<version>${nursingunit.version}</version>
|
<version>${nursingunit.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- IOT 摄像头 模块 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.nursingunit.boot</groupId>
|
||||||
|
<artifactId>nu-iot-biz</artifactId>
|
||||||
|
<version>${nursingunit.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<!-- flyway 数据库自动升级 -->
|
<!-- flyway 数据库自动升级 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -164,6 +164,7 @@ spring:
|
||||||
datasource:
|
datasource:
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://1.92.152.160:33061/nursing_unit_001?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
url: jdbc:mysql://1.92.152.160:33061/nursing_unit_001?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
|
# url: jdbc:mysql://localhost:3306/nursing_unit_001?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: root
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
|
1
pom.xml
1
pom.xml
|
@ -71,6 +71,7 @@
|
||||||
<module>nursing-unit-base-core</module>
|
<module>nursing-unit-base-core</module>
|
||||||
<module>nursing-unit-demo</module>
|
<module>nursing-unit-demo</module>
|
||||||
<module>nursing-unit-config</module>
|
<module>nursing-unit-config</module>
|
||||||
|
<module>nursing-unit-iot</module>
|
||||||
<module>nursing-unit-system</module>
|
<module>nursing-unit-system</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue