Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
75bc053a97
|
|
@ -1,180 +0,0 @@
|
|||
package com.nu.modules.customercaretemp.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.customercaretemp.entity.NuBizCustomerCareTempInfo;
|
||||
import com.nu.modules.customercaretemp.service.INuBizCustomerCareTempInfoService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令模版子表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-11-12
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="服务指令模版子表")
|
||||
@RestController
|
||||
@RequestMapping("/services/nuBizCustomerCareTempInfo")
|
||||
@Slf4j
|
||||
public class NuBizCustomerCareTempInfoController extends JeecgController<NuBizCustomerCareTempInfo, INuBizCustomerCareTempInfoService> {
|
||||
@Autowired
|
||||
private INuBizCustomerCareTempInfoService nuBizCustomerCareTempInfoService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param nuBizCustomerCareTempInfo
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "服务指令模版子表-分页列表查询")
|
||||
@ApiOperation(value="服务指令模版子表-分页列表查询", notes="服务指令模版子表-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<NuBizCustomerCareTempInfo>> queryPageList(NuBizCustomerCareTempInfo nuBizCustomerCareTempInfo,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<NuBizCustomerCareTempInfo> queryWrapper = QueryGenerator.initQueryWrapper(nuBizCustomerCareTempInfo, req.getParameterMap());
|
||||
Page<NuBizCustomerCareTempInfo> page = new Page<NuBizCustomerCareTempInfo>(pageNo, pageSize);
|
||||
IPage<NuBizCustomerCareTempInfo> pageList = nuBizCustomerCareTempInfoService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param nuBizCustomerCareTempInfo
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "服务指令模版子表-添加")
|
||||
@ApiOperation(value="服务指令模版子表-添加", notes="服务指令模版子表-添加")
|
||||
@RequiresPermissions("customercaretemp:nu_biz_customer_care_temp_info:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody NuBizCustomerCareTempInfo nuBizCustomerCareTempInfo) {
|
||||
nuBizCustomerCareTempInfoService.save(nuBizCustomerCareTempInfo);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param nuBizCustomerCareTempInfo
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "服务指令模版子表-编辑")
|
||||
@ApiOperation(value="服务指令模版子表-编辑", notes="服务指令模版子表-编辑")
|
||||
@RequiresPermissions("customercaretemp:nu_biz_customer_care_temp_info:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody NuBizCustomerCareTempInfo nuBizCustomerCareTempInfo) {
|
||||
nuBizCustomerCareTempInfoService.updateById(nuBizCustomerCareTempInfo);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "服务指令模版子表-通过id删除")
|
||||
@ApiOperation(value="服务指令模版子表-通过id删除", notes="服务指令模版子表-通过id删除")
|
||||
@RequiresPermissions("customercaretemp:nu_biz_customer_care_temp_info:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
nuBizCustomerCareTempInfoService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "服务指令模版子表-批量删除")
|
||||
@ApiOperation(value="服务指令模版子表-批量删除", notes="服务指令模版子表-批量删除")
|
||||
@RequiresPermissions("customercaretemp:nu_biz_customer_care_temp_info:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.nuBizCustomerCareTempInfoService.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<NuBizCustomerCareTempInfo> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
NuBizCustomerCareTempInfo nuBizCustomerCareTempInfo = nuBizCustomerCareTempInfoService.getById(id);
|
||||
if(nuBizCustomerCareTempInfo==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(nuBizCustomerCareTempInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param nuBizCustomerCareTempInfo
|
||||
*/
|
||||
@RequiresPermissions("customercaretemp:nu_biz_customer_care_temp_info:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, NuBizCustomerCareTempInfo nuBizCustomerCareTempInfo) {
|
||||
return super.exportXls(request, nuBizCustomerCareTempInfo, NuBizCustomerCareTempInfo.class, "服务指令模版子表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("customercaretemp:nu_biz_customer_care_temp_info:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, NuBizCustomerCareTempInfo.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -10,6 +10,8 @@ import java.io.UnsupportedEncodingException;
|
|||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.nu.modules.customercaretemp.service.INuBizCustomerCareTempInfoService;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
|
|
@ -39,107 +41,120 @@ import io.swagger.annotations.ApiOperation;
|
|||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
/**
|
||||
* @Description: 服务指令模版主表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-11-12
|
||||
* @Date: 2025-11-12
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="服务指令模版主表")
|
||||
@Api(tags = "服务指令模版主表")
|
||||
@RestController
|
||||
@RequestMapping("/services/nuBizCustomerCareTempMain")
|
||||
@Slf4j
|
||||
public class NuBizCustomerCareTempMainController extends JeecgController<NuBizCustomerCareTempMain, INuBizCustomerCareTempMainService> {
|
||||
@Autowired
|
||||
private INuBizCustomerCareTempMainService nuBizCustomerCareTempMainService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param nuBizCustomerCareTempMain
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "服务指令模版主表-分页列表查询")
|
||||
@ApiOperation(value="服务指令模版主表-分页列表查询", notes="服务指令模版主表-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<NuBizCustomerCareTempMain>> queryPageList(NuBizCustomerCareTempMain nuBizCustomerCareTempMain,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<NuBizCustomerCareTempMain> queryWrapper = QueryGenerator.initQueryWrapper(nuBizCustomerCareTempMain, req.getParameterMap());
|
||||
Page<NuBizCustomerCareTempMain> page = new Page<NuBizCustomerCareTempMain>(pageNo, pageSize);
|
||||
IPage<NuBizCustomerCareTempMain> pageList = nuBizCustomerCareTempMainService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param nuBizCustomerCareTempMain
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "服务指令模版主表-添加")
|
||||
@ApiOperation(value="服务指令模版主表-添加", notes="服务指令模版主表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody NuBizCustomerCareTempMain nuBizCustomerCareTempMain) {
|
||||
nuBizCustomerCareTempMainService.save(nuBizCustomerCareTempMain);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param nuBizCustomerCareTempMain
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "服务指令模版主表-编辑")
|
||||
@ApiOperation(value="服务指令模版主表-编辑", notes="服务指令模版主表-编辑")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody NuBizCustomerCareTempMain nuBizCustomerCareTempMain) {
|
||||
nuBizCustomerCareTempMainService.updateById(nuBizCustomerCareTempMain);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "服务指令模版主表-通过id删除")
|
||||
@ApiOperation(value="服务指令模版主表-通过id删除", notes="服务指令模版主表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
nuBizCustomerCareTempMainService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "服务指令模版主表-通过id查询")
|
||||
@ApiOperation(value="服务指令模版主表-通过id查询", notes="服务指令模版主表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<NuBizCustomerCareTempMain> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
NuBizCustomerCareTempMain nuBizCustomerCareTempMain = nuBizCustomerCareTempMainService.getById(id);
|
||||
if(nuBizCustomerCareTempMain==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(nuBizCustomerCareTempMain);
|
||||
}
|
||||
@Autowired
|
||||
private INuBizCustomerCareTempMainService nuBizCustomerCareTempMainService;
|
||||
@Autowired
|
||||
private INuBizCustomerCareTempInfoService nuBizCustomerCareTempInfoService;
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param nuBizCustomerCareTempMain
|
||||
*/
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param nuBizCustomerCareTempMain
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "服务指令模版主表-分页列表查询")
|
||||
@ApiOperation(value = "服务指令模版主表-分页列表查询", notes = "服务指令模版主表-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<NuBizCustomerCareTempMain>> queryPageList(NuBizCustomerCareTempMain nuBizCustomerCareTempMain,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<NuBizCustomerCareTempMain> queryWrapper = QueryGenerator.initQueryWrapper(nuBizCustomerCareTempMain, req.getParameterMap());
|
||||
Page<NuBizCustomerCareTempMain> page = new Page<NuBizCustomerCareTempMain>(pageNo, pageSize);
|
||||
IPage<NuBizCustomerCareTempMain> pageList = nuBizCustomerCareTempMainService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param nuBizCustomerCareTempMain
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "服务指令模版主表-添加")
|
||||
@ApiOperation(value = "服务指令模版主表-添加", notes = "服务指令模版主表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody NuBizCustomerCareTempMain nuBizCustomerCareTempMain) {
|
||||
nuBizCustomerCareTempMainService.save(nuBizCustomerCareTempMain);
|
||||
//全量新增
|
||||
if (nuBizCustomerCareTempMain.getCustomerCareTempInfoList() != null && nuBizCustomerCareTempMain.getCustomerCareTempInfoList().size() > 0) {
|
||||
nuBizCustomerCareTempMain.getCustomerCareTempInfoList().forEach(item -> {
|
||||
item.setPkId(nuBizCustomerCareTempMain.getId());
|
||||
});
|
||||
nuBizCustomerCareTempInfoService.saveBatch(nuBizCustomerCareTempMain.getCustomerCareTempInfoList());
|
||||
}
|
||||
return Result.OK("保存成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param nuBizCustomerCareTempMain
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "服务指令模版主表-编辑")
|
||||
@ApiOperation(value = "服务指令模版主表-编辑", notes = "服务指令模版主表-编辑")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody NuBizCustomerCareTempMain nuBizCustomerCareTempMain) {
|
||||
nuBizCustomerCareTempMainService.updateById(nuBizCustomerCareTempMain);
|
||||
//删除历史数据
|
||||
nuBizCustomerCareTempInfoService.deletePhysics(nuBizCustomerCareTempMain.getId());
|
||||
//全量新增
|
||||
nuBizCustomerCareTempInfoService.saveBatch(nuBizCustomerCareTempMain.getCustomerCareTempInfoList());
|
||||
return Result.OK("保存成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "服务指令模版主表-通过id删除")
|
||||
@ApiOperation(value = "服务指令模版主表-通过id删除", notes = "服务指令模版主表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
|
||||
nuBizCustomerCareTempMainService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "服务指令模版主表-通过id查询")
|
||||
@ApiOperation(value = "服务指令模版主表-通过id查询", notes = "服务指令模版主表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<NuBizCustomerCareTempMain> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
NuBizCustomerCareTempMain nuBizCustomerCareTempMain = nuBizCustomerCareTempMainService.getById(id);
|
||||
if (nuBizCustomerCareTempMain == null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(nuBizCustomerCareTempMain);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param nuBizCustomerCareTempMain
|
||||
*/
|
||||
@RequiresPermissions("customercaretemp:nu_biz_customer_care_temp_main:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, NuBizCustomerCareTempMain nuBizCustomerCareTempMain) {
|
||||
|
|
@ -147,16 +162,28 @@ public class NuBizCustomerCareTempMainController extends JeecgController<NuBizCu
|
|||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("customercaretemp:nu_biz_customer_care_temp_main:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, NuBizCustomerCareTempMain.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取服务指令计划表格数据
|
||||
*
|
||||
* @param pkId
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "护理单元客户配置服务指令-分页列表查询", notes = "护理单元客户配置服务指令-分页列表查询")
|
||||
@GetMapping(value = "/getNclist")
|
||||
public Result<Map<String, Object>> getNclist(@RequestParam("pkId") String pkId) {
|
||||
Map<String, Object> pageList = nuBizCustomerCareTempInfoService.getNclist(pkId);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,10 +4,9 @@ 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 java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import org.jeecg.common.constant.ProvinceCityArea;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import lombok.Data;
|
||||
|
|
@ -141,4 +140,31 @@ public class NuBizCustomerCareTempInfo implements Serializable {
|
|||
@Excel(name = "是否是服务指令包 0否 1是", width = 15)
|
||||
@ApiModelProperty(value = "是否是服务指令包 0否 1是")
|
||||
private java.lang.String izPackage;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "指令包ID")
|
||||
private java.lang.String packageId;
|
||||
|
||||
/**服务指令列表**/
|
||||
@TableField(exist = false)
|
||||
private List<NuBizCustomerCareTempInfo> serverList;
|
||||
/**服务包中的服务列表**/
|
||||
@TableField(exist = false)
|
||||
private List<NuBizCustomerCareTempInfo> directivesList;
|
||||
/**即时指令图标*/
|
||||
@ApiModelProperty(value = "即时指令图标")
|
||||
@TableField(exist = false)
|
||||
private java.lang.String netImmediateFile;
|
||||
/**即时指令焦点图标*/
|
||||
@ApiModelProperty(value = "即时指令图标")
|
||||
@TableField(exist = false)
|
||||
private java.lang.String netImmediateFileFocus;
|
||||
/**服务指令图片大图*/
|
||||
@ApiModelProperty(value = "服务指令图片大图")
|
||||
@TableField(exist = false)
|
||||
private java.lang.String netPreviewFile;
|
||||
/**服务指令图片小图*/
|
||||
@ApiModelProperty(value = "服务指令图片小图")
|
||||
@TableField(exist = false)
|
||||
private java.lang.String netPreviewFileSmall;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,10 +4,9 @@ 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 java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import org.jeecg.common.constant.ProvinceCityArea;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import lombok.Data;
|
||||
|
|
@ -64,4 +63,8 @@ public class NuBizCustomerCareTempMain implements Serializable {
|
|||
@ApiModelProperty(value = "是否删除 0未删除 1删除")
|
||||
@TableLogic
|
||||
private java.lang.String delFlag;
|
||||
|
||||
//服务指令编排模板子表数据
|
||||
@TableField(exist = false)
|
||||
private List<NuBizCustomerCareTempInfo> customerCareTempInfoList;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
package com.nu.modules.customercaretemp.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nu.modules.customercaretemp.entity.NuBizCustomerCareTempInfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nu.modules.customercaretemp.entity.NuBizCustomerCareTempInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令模版子表
|
||||
|
|
@ -14,4 +14,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
*/
|
||||
public interface NuBizCustomerCareTempInfoMapper extends BaseMapper<NuBizCustomerCareTempInfo> {
|
||||
|
||||
List<NuBizCustomerCareTempInfo> getNcDirectiveList(@Param("params") NuBizCustomerCareTempInfo packageDirective);
|
||||
|
||||
void deletePhysics(@Param("pkId") String pkId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,27 @@
|
|||
<?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.customercaretemp.mapper.NuBizCustomerCareTempInfoMapper">
|
||||
<delete id="deletePhysics">
|
||||
delete from nu_biz_customer_care_temp_info where pk_id = #{pkId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
<select id="getNcDirectiveList" resultType="com.nu.modules.customercaretemp.entity.NuBizCustomerCareTempInfo">
|
||||
select a.package_id,a.cycle_type,a.cycle_value,b.*,
|
||||
c.category_name AS category_name,
|
||||
d.type_name AS type_name,
|
||||
e.instruction_name AS instruction_name,
|
||||
f.item_text AS cycle_type_name
|
||||
from nu_config_package_directive a
|
||||
left join nu_config_service_directive b on a.directive_id = b.id
|
||||
left join nu_config_service_category c on b.category_id = c.id
|
||||
left join nu_config_service_type d on b.type_id = d.id
|
||||
left join nu_config_service_instruction_tag e on b.instruction_tag_id = e.id
|
||||
left join sys_dict_item f on f.dict_id = '1900374791386140674' and f.item_value = b.cycle_type
|
||||
<where>
|
||||
<if test="params.packageId != null and params.packageId != ''">
|
||||
AND a.package_id = #{params.packageId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ package com.nu.modules.customercaretemp.service;
|
|||
import com.nu.modules.customercaretemp.entity.NuBizCustomerCareTempInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令模版子表
|
||||
* @Author: jeecg-boot
|
||||
|
|
@ -10,5 +12,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||
* @Version: V1.0
|
||||
*/
|
||||
public interface INuBizCustomerCareTempInfoService extends IService<NuBizCustomerCareTempInfo> {
|
||||
Map<String, Object> getNclist(String pkId);
|
||||
|
||||
void deletePhysics(String pkId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ package com.nu.modules.customercaretemp.service;
|
|||
import com.nu.modules.customercaretemp.entity.NuBizCustomerCareTempMain;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令模版主表
|
||||
* @Author: jeecg-boot
|
||||
|
|
|
|||
|
|
@ -1,12 +1,21 @@
|
|||
package com.nu.modules.customercaretemp.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.nu.modules.customercaretemp.entity.NuBizCustomerCareTempInfo;
|
||||
import com.nu.modules.customercaretemp.mapper.NuBizCustomerCareTempInfoMapper;
|
||||
import com.nu.modules.customercaretemp.service.INuBizCustomerCareTempInfoService;
|
||||
import com.nu.modules.sysconfig.ISysConfigApi;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令模版子表
|
||||
* @Author: jeecg-boot
|
||||
|
|
@ -16,4 +25,97 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||
@Service
|
||||
public class NuBizCustomerCareTempInfoServiceImpl extends ServiceImpl<NuBizCustomerCareTempInfoMapper, NuBizCustomerCareTempInfo> implements INuBizCustomerCareTempInfoService {
|
||||
|
||||
@Autowired
|
||||
private ISysConfigApi sysConfigApi;
|
||||
//图片网络地址
|
||||
private String serverNetUrl;
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getNclist(String pkId) {
|
||||
Map<String, Object> resMap = new HashMap<>();
|
||||
//服务指令计划
|
||||
QueryWrapper<NuBizCustomerCareTempInfo> qw = new QueryWrapper<>();
|
||||
qw.eq( "pk_id", pkId);
|
||||
List<NuBizCustomerCareTempInfo> groupList = baseMapper.selectList(qw);
|
||||
|
||||
for (NuBizCustomerCareTempInfo par : groupList) {
|
||||
if (par.getIzPackage().equals("1")) {
|
||||
String directiveId = par.getDirectiveId();
|
||||
if (directiveId != null && !directiveId.equals("")) {
|
||||
NuBizCustomerCareTempInfo packageDirective = new NuBizCustomerCareTempInfo();
|
||||
packageDirective.setPackageId(directiveId);
|
||||
List<NuBizCustomerCareTempInfo> pdList = baseMapper.getNcDirectiveList(packageDirective);
|
||||
for (NuBizCustomerCareTempInfo pd : pdList) {
|
||||
getNetImages(pd);
|
||||
}
|
||||
par.setDirectivesList(pdList);
|
||||
}
|
||||
} else {
|
||||
getNetImages(par);
|
||||
}
|
||||
}
|
||||
|
||||
resMap.put("serviceList", groupList);//服务指令计划
|
||||
return resMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deletePhysics(String pkId) {
|
||||
baseMapper.deletePhysics(pkId);
|
||||
}
|
||||
|
||||
private NuBizCustomerCareTempInfo getNetImages(NuBizCustomerCareTempInfo par) {
|
||||
if (par.getImmediateFile() != null && !par.getImmediateFile().equals("")) {
|
||||
String immediateFile = getImageNetUrl(par.getImmediateFile());
|
||||
par.setNetImmediateFile(immediateFile);
|
||||
} else {
|
||||
par.setImmediateFile("");
|
||||
par.setNetImmediateFile("");
|
||||
}
|
||||
if (par.getImmediateFileFocus() != null && !par.getImmediateFileFocus().equals("")) {
|
||||
String immediateFileFocus = getImageNetUrl(par.getImmediateFileFocus());
|
||||
par.setNetImmediateFileFocus(immediateFileFocus);
|
||||
} else {
|
||||
par.setImmediateFileFocus("");
|
||||
par.setNetImmediateFileFocus("");
|
||||
}
|
||||
if (par.getPreviewFile() != null && !par.getPreviewFile().equals("")) {
|
||||
String previewFile = getImageNetUrl(par.getPreviewFile());
|
||||
par.setNetPreviewFile(previewFile);
|
||||
} else {
|
||||
par.setPreviewFile("");
|
||||
par.setNetPreviewFile("");
|
||||
}
|
||||
if (par.getPreviewFileSmall() != null && !par.getPreviewFileSmall().equals("")) {
|
||||
String previewFileSmall = getImageNetUrl(par.getPreviewFileSmall());
|
||||
par.setNetPreviewFileSmall(previewFileSmall);
|
||||
} else {
|
||||
par.setPreviewFileSmall("");
|
||||
par.setNetPreviewFileSmall("");
|
||||
}
|
||||
return par;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取管理平台静态资源路径
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private void getOpeMediaAddress() {
|
||||
if (serverNetUrl == null || serverNetUrl.equals("")) {
|
||||
JSONObject json = sysConfigApi.getByKey("ope_media_address");
|
||||
if (json != null) {
|
||||
String configValue = json.getString("configValue");
|
||||
if (!configValue.endsWith("/")) {
|
||||
configValue += "/";
|
||||
}
|
||||
serverNetUrl = configValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String getImageNetUrl(String imageUrl) {
|
||||
getOpeMediaAddress();
|
||||
return serverNetUrl + imageUrl;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue