服务指令考核
This commit is contained in:
parent
b575196d51
commit
f96efd2460
|
|
@ -219,7 +219,8 @@ public class WeChatPayApi {
|
|||
mqDto.setOrgCode(orderData.getOrgCode());
|
||||
rabbitMQUtil.sendToExchange("hldy.nubaseelder", "hldy.nubaseelder.bindnu", mqDto);
|
||||
}
|
||||
|
||||
//支付完成清理不可绑定状态
|
||||
redisUtil.del("binding_nu_paying"+orderData.getNuId());
|
||||
}
|
||||
Date now = new Date();
|
||||
systemOrderApiEntity.setNotifyCount(orderData.getNotifyCount() + 1);//回执次数
|
||||
|
|
|
|||
|
|
@ -8,57 +8,57 @@ import com.nu.modules.biz.appraisal.service.IDirectiveAppraisalService;
|
|||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
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.jeecg.common.system.vo.LoginUser;
|
||||
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.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
/**
|
||||
* @Description: 护理单元-服务指令-工单
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-02-28
|
||||
* @Date: 2026-02-28
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="护理单元-服务指令-工单")
|
||||
@Api(tags = "护理单元-服务指令-工单")
|
||||
@RestController
|
||||
@RequestMapping("/appraisal/directiveAppraisal")
|
||||
@Slf4j
|
||||
public class DirectiveAppraisalController extends JeecgController<DirectiveAppraisal, IDirectiveAppraisalService> {
|
||||
@Autowired
|
||||
private IDirectiveAppraisalService directiveAppraisalService;
|
||||
@Autowired
|
||||
private IDirectiveAppraisalService directiveAppraisalService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param directiveAppraisal
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "护理单元-服务指令-工单-分页列表查询")
|
||||
@ApiOperation(value="护理单元-服务指令-工单-分页列表查询", notes="护理单元-服务指令-工单-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<DirectiveAppraisal>> queryPageList(DirectiveAppraisal directiveAppraisal,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param directiveAppraisal
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "护理单元-服务指令-工单-分页列表查询")
|
||||
@ApiOperation(value = "护理单元-服务指令-工单-分页列表查询", notes = "护理单元-服务指令-工单-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<DirectiveAppraisal>> queryPageList(DirectiveAppraisal directiveAppraisal,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
|
||||
Map<String, String[]> customParamMap = new HashMap<>(req.getParameterMap());
|
||||
customParamMap.remove("column"); // 移除排序字段
|
||||
customParamMap.remove("order"); // 移除排序方向
|
||||
Map<String, String[]> customParamMap = new HashMap<>(req.getParameterMap());
|
||||
customParamMap.remove("column"); // 移除排序字段
|
||||
customParamMap.remove("order"); // 移除排序方向
|
||||
// 自定义查询规则
|
||||
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
|
||||
// 自定义多选的查询规则为:LIKE_WITH_OR
|
||||
|
|
@ -67,114 +67,134 @@ public class DirectiveAppraisalController extends JeecgController<DirectiveAppra
|
|||
customeRuleMap.put("categoryId", QueryRuleEnum.LIKE_WITH_OR);
|
||||
customeRuleMap.put("typeId", QueryRuleEnum.LIKE_WITH_OR);
|
||||
customeRuleMap.put("optType", QueryRuleEnum.LIKE_WITH_OR);
|
||||
customeRuleMap.put("optNames", QueryRuleEnum.LIKE_WITH_OR);
|
||||
customeRuleMap.put("optStatus", QueryRuleEnum.LIKE_WITH_OR);
|
||||
customeRuleMap.put("status", QueryRuleEnum.LIKE_WITH_OR);
|
||||
QueryWrapper<DirectiveAppraisal> queryWrapper = QueryGenerator.initQueryWrapper(directiveAppraisal, customParamMap,customeRuleMap);
|
||||
Page<DirectiveAppraisal> page = new Page<DirectiveAppraisal>(pageNo, pageSize);
|
||||
QueryWrapper<DirectiveAppraisal> queryWrapper = QueryGenerator.initQueryWrapper(directiveAppraisal, customParamMap, customeRuleMap);
|
||||
Page<DirectiveAppraisal> page = new Page<DirectiveAppraisal>(pageNo, pageSize);
|
||||
|
||||
//排序:先撤回的放前面 再是未考核的 再是应该执行时间倒序
|
||||
queryWrapper.orderByAsc("CASE WHEN revocation IS NOT NULL AND revocation != '' THEN 0 ELSE 1 END");
|
||||
queryWrapper.orderByAsc("CASE WHEN status = 0 THEN 0 ELSE 1 END");
|
||||
queryWrapper.orderByDesc("start_time");
|
||||
//排序:先撤回的放前面 再是未考核的 再是应该执行时间倒序
|
||||
queryWrapper.orderByAsc("CASE WHEN revocation IS NOT NULL AND revocation != '' THEN 0 ELSE 1 END");
|
||||
queryWrapper.orderByAsc("CASE WHEN status = 0 THEN 0 ELSE 1 END");
|
||||
queryWrapper.orderByDesc("start_time");
|
||||
|
||||
IPage<DirectiveAppraisal> pageList = directiveAppraisalService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param directiveAppraisal
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "护理单元-服务指令-工单-添加")
|
||||
@ApiOperation(value="护理单元-服务指令-工单-添加", notes="护理单元-服务指令-工单-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody DirectiveAppraisal directiveAppraisal) {
|
||||
directiveAppraisalService.save(directiveAppraisal);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param directiveAppraisal
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "护理单元-服务指令-工单-编辑")
|
||||
@ApiOperation(value="护理单元-服务指令-工单-编辑", notes="护理单元-服务指令-工单-编辑")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody DirectiveAppraisal directiveAppraisal) {
|
||||
directiveAppraisalService.updateById(directiveAppraisal);
|
||||
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) {
|
||||
directiveAppraisalService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "护理单元-服务指令-工单-批量删除")
|
||||
@ApiOperation(value="护理单元-服务指令-工单-批量删除", notes="护理单元-服务指令-工单-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.directiveAppraisalService.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<DirectiveAppraisal> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
DirectiveAppraisal directiveAppraisal = directiveAppraisalService.getById(id);
|
||||
if(directiveAppraisal==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(directiveAppraisal);
|
||||
}
|
||||
IPage<DirectiveAppraisal> pageList = directiveAppraisalService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param directiveAppraisal
|
||||
*/
|
||||
* 添加
|
||||
*
|
||||
* @param directiveAppraisal
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "护理单元-服务指令-工单-添加")
|
||||
@ApiOperation(value = "护理单元-服务指令-工单-添加", notes = "护理单元-服务指令-工单-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody DirectiveAppraisal directiveAppraisal) {
|
||||
directiveAppraisalService.save(directiveAppraisal);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param directiveAppraisal
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "护理单元-服务指令-工单-编辑")
|
||||
@ApiOperation(value = "护理单元-服务指令-工单-编辑", notes = "护理单元-服务指令-工单-编辑")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody DirectiveAppraisal directiveAppraisal) {
|
||||
directiveAppraisalService.updateById(directiveAppraisal);
|
||||
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) {
|
||||
directiveAppraisalService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "护理单元-服务指令-工单-批量删除")
|
||||
@ApiOperation(value = "护理单元-服务指令-工单-批量删除", notes = "护理单元-服务指令-工单-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||
this.directiveAppraisalService.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<DirectiveAppraisal> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
DirectiveAppraisal directiveAppraisal = directiveAppraisalService.getById(id);
|
||||
if (directiveAppraisal == null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(directiveAppraisal);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param directiveAppraisal
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, DirectiveAppraisal directiveAppraisal) {
|
||||
return super.exportXls(request, directiveAppraisal, DirectiveAppraisal.class, "护理单元-服务指令-工单");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, DirectiveAppraisal.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 撤回
|
||||
*
|
||||
* @param directiveAppraisal
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "护理单元-服务指令-工单-撤回")
|
||||
@ApiOperation(value = "护理单元-服务指令-工单-撤回", notes = "护理单元-服务指令-工单-撤回")
|
||||
@RequestMapping(value = "/revocation", method = {RequestMethod.PUT, RequestMethod.POST})
|
||||
public Result<String> revocation(@RequestBody DirectiveAppraisal directiveAppraisal) {
|
||||
DirectiveAppraisal upData = new DirectiveAppraisal();
|
||||
upData.setId(directiveAppraisal.getId());
|
||||
upData.setStatus("4");
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
upData.setRevocation(sysUser.getRealname());//撤回人
|
||||
upData.setRevocationTime(new Date());//撤回时间
|
||||
directiveAppraisalService.updateById(upData);
|
||||
return Result.OK("操作成功!");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
package com.nu.modules.biz.appraisal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -13,6 +11,7 @@ import org.jeecg.common.aspect.annotation.Dict;
|
|||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
|
|
@ -92,6 +91,7 @@ public class DirectiveAppraisal implements Serializable {
|
|||
/**服务属性 ds定时 js计时*/
|
||||
@Excel(name = "服务属性 ds定时 js计时", width = 15)
|
||||
@ApiModelProperty(value = "服务属性 ds定时 js计时")
|
||||
@Dict(dicCode = "service_attribute")
|
||||
private java.lang.String serviceAttribute;
|
||||
/**服务类型名称*/
|
||||
@Excel(name = "服务类型名称", width = 15)
|
||||
|
|
@ -154,9 +154,9 @@ public class DirectiveAppraisal implements Serializable {
|
|||
@ApiModelProperty(value = "是否是服务指令包 Y是 N否")
|
||||
private java.lang.String izPackage;
|
||||
/**开始时间*/
|
||||
@Excel(name = "开始时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@Excel(name = "开始时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private java.util.Date startTime;
|
||||
/**结束时间*/
|
||||
|
|
@ -232,7 +232,7 @@ public class DirectiveAppraisal implements Serializable {
|
|||
@ApiModelProperty(value = "实际执行人名称(多个); 主要执行人+协助人")
|
||||
private java.lang.String optNames;
|
||||
/**审核状态 0待审核 1通过 2未通过*/
|
||||
@Excel(name = "审核状态 0待审核 1通过 2未通过", width = 15, dicCode = "appraisal_status")
|
||||
@Excel(name = "审核状态 1待审核 2通过 3未通过", width = 15, dicCode = "appraisal_status")
|
||||
@Dict(dicCode = "appraisal_status")
|
||||
@ApiModelProperty(value = "审核状态 0待审核 1通过 2未通过")
|
||||
private java.lang.String status;
|
||||
|
|
@ -243,11 +243,18 @@ public class DirectiveAppraisal implements Serializable {
|
|||
/**撤回人(汉字)*/
|
||||
@Excel(name = "撤回人(汉字)", width = 15)
|
||||
@ApiModelProperty(value = "撤回人(汉字)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
@Column(nullable = true, updatable = true)
|
||||
private java.lang.String revocation;
|
||||
/**撤回时间*/
|
||||
@Excel(name = "撤回时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "撤回时间")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
@Column(nullable = true, updatable = true)
|
||||
private java.util.Date revocationTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String queryStatus;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue