服务考核-创建
This commit is contained in:
parent
9e2d70bb21
commit
3e2b71e55b
|
|
@ -0,0 +1,280 @@
|
|||
package com.nu.modules.biz.appraisal.controller;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.nu.modules.biz.appraisal.entity.Appraisal;
|
||||
import com.nu.modules.biz.appraisal.entity.AppraisalSub;
|
||||
import com.nu.modules.biz.appraisal.service.IAppraisalService;
|
||||
import com.nu.modules.biz.appraisal.service.IAppraisalSubService;
|
||||
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.vo.LoginUser;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
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 org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
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 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: caolei
|
||||
* @Date: 2026-01-23
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="服务考核")
|
||||
@RestController
|
||||
@RequestMapping("/service/appraisal")
|
||||
@Slf4j
|
||||
public class AppraisalController {
|
||||
@Autowired
|
||||
private IAppraisalService service;
|
||||
@Autowired
|
||||
private IAppraisalSubService subService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param Appraisal
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "服务指令工单-分页列表查询")
|
||||
@ApiOperation(value="服务指令工单-分页列表查询", notes="服务指令工单-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<Appraisal>> queryPageList(Appraisal Appraisal,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
// 自定义查询规则
|
||||
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
|
||||
// 自定义多选的查询规则为:LIKE_WITH_OR
|
||||
customeRuleMap.put("startTime", QueryRuleEnum.LIKE_WITH_OR);
|
||||
customeRuleMap.put("endTime", QueryRuleEnum.LIKE_WITH_OR);
|
||||
customeRuleMap.put("appraisalStatus", QueryRuleEnum.LIKE_WITH_OR);
|
||||
customeRuleMap.put("orderNo", QueryRuleEnum.LIKE_WITH_OR);
|
||||
customeRuleMap.put("orderType", QueryRuleEnum.LIKE_WITH_OR);
|
||||
customeRuleMap.put("optType", QueryRuleEnum.LIKE_WITH_OR);
|
||||
customeRuleMap.put("nuId", QueryRuleEnum.LIKE_WITH_OR);
|
||||
customeRuleMap.put("employeeId", QueryRuleEnum.LIKE_WITH_OR);
|
||||
customeRuleMap.put("elderId", QueryRuleEnum.LIKE_WITH_OR);
|
||||
customeRuleMap.put("izPackage", QueryRuleEnum.LIKE_WITH_OR);
|
||||
customeRuleMap.put("izFinish", QueryRuleEnum.LIKE_WITH_OR);
|
||||
customeRuleMap.put("izTimeout", QueryRuleEnum.LIKE_WITH_OR);
|
||||
QueryWrapper<Appraisal> queryWrapper = QueryGenerator.initQueryWrapper(Appraisal, req.getParameterMap(),customeRuleMap);
|
||||
Page<Appraisal> page = new Page<Appraisal>(pageNo, pageSize);
|
||||
if(Appraisal.getStartTime()!=null){
|
||||
queryWrapper.ge("create_time",Appraisal.getStartTime());
|
||||
}
|
||||
if(Appraisal.getEndTime()!=null){
|
||||
queryWrapper.le("create_time",Appraisal.getEndTime());
|
||||
}
|
||||
IPage<Appraisal> pageList = service.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param appraisal
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "服务指令工单-添加")
|
||||
@ApiOperation(value="服务指令工单-添加", notes="服务指令工单-添加")
|
||||
// @RequiresPermissions("Appraisal:nu_biz_nu_directive_order:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody Appraisal appraisal) {
|
||||
service.saveMain(appraisal, appraisal.getAppraisalSubList());
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param appraisal
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "服务指令工单-编辑")
|
||||
@ApiOperation(value="服务指令工单-编辑", notes="服务指令工单-编辑")
|
||||
// @RequiresPermissions("Appraisal:nu_biz_nu_directive_order:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody Appraisal appraisal) {
|
||||
Appraisal AppraisalEntity = service.getById(appraisal.getId());
|
||||
if(AppraisalEntity==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
service.updateMain(appraisal, appraisal.getAppraisalSubList());
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "服务指令工单-通过id删除")
|
||||
@ApiOperation(value="服务指令工单-通过id删除", notes="服务指令工单-通过id删除")
|
||||
// @RequiresPermissions("Appraisal:nu_biz_nu_directive_order:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
service.delMain(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "服务指令工单-批量删除")
|
||||
@ApiOperation(value="服务指令工单-批量删除", notes="服务指令工单-批量删除")
|
||||
// @RequiresPermissions("Appraisal:nu_biz_nu_directive_order:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.service.delBatchMain(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "服务指令工单-通过id查询")
|
||||
@ApiOperation(value="服务指令工单-通过id查询", notes="服务指令工单-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<Appraisal> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
Appraisal Appraisal = service.getById(id);
|
||||
if(Appraisal==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(Appraisal);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "nu_biz_nu_directive_order_sub通过主表ID查询")
|
||||
@ApiOperation(value="nu_biz_nu_directive_order_sub主表ID查询", notes="nu_biz_nu_directive_order_sub-通主表ID查询")
|
||||
@GetMapping(value = "/queryAppraisalSubByMainId")
|
||||
public Result<List<AppraisalSub>> queryNuBizNuAppraisalSubListByMainId(@RequestParam(name="id",required=true) String id) {
|
||||
List<AppraisalSub> nuBizNuAppraisalSubList = subService.selectByMainId(id);
|
||||
return Result.OK(nuBizNuAppraisalSubList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param Appraisal
|
||||
*/
|
||||
// @RequiresPermissions("Appraisal:nu_biz_nu_directive_order:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, Appraisal Appraisal) {
|
||||
// Step.1 组装查询条件查询数据
|
||||
QueryWrapper<Appraisal> queryWrapper = QueryGenerator.initQueryWrapper(Appraisal, request.getParameterMap());
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
//配置选中数据查询条件
|
||||
String selections = request.getParameter("selections");
|
||||
if(oConvertUtils.isNotEmpty(selections)) {
|
||||
List<String> selectionList = Arrays.asList(selections.split(","));
|
||||
queryWrapper.in("id",selectionList);
|
||||
}
|
||||
//Step.2 获取导出数据
|
||||
List<Appraisal> AppraisalList = service.list(queryWrapper);
|
||||
|
||||
// Step.3 组装pageList
|
||||
List<Appraisal> pageList = new ArrayList<Appraisal>();
|
||||
for (Appraisal main : AppraisalList) {
|
||||
Appraisal vo = new Appraisal();
|
||||
BeanUtils.copyProperties(main, vo);
|
||||
List<AppraisalSub> nuBizNuAppraisalSubList = subService.selectByMainId(main.getId());
|
||||
vo.setAppraisalSubList(nuBizNuAppraisalSubList);
|
||||
pageList.add(vo);
|
||||
}
|
||||
|
||||
// Step.4 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, "服务指令工单列表");
|
||||
mv.addObject(NormalExcelConstants.CLASS, Appraisal.class);
|
||||
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("服务指令工单数据", "导出人:"+sysUser.getRealname(), "服务指令工单"));
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
|
||||
return mv;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
// @RequiresPermissions("Appraisal:nu_biz_nu_directive_order:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
|
||||
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
|
||||
// 获取上传文件对象
|
||||
MultipartFile file = entity.getValue();
|
||||
ImportParams params = new ImportParams();
|
||||
params.setTitleRows(2);
|
||||
params.setHeadRows(1);
|
||||
params.setNeedSave(true);
|
||||
try {
|
||||
List<Appraisal> list = ExcelImportUtil.importExcel(file.getInputStream(), Appraisal.class, params);
|
||||
for (Appraisal page : list) {
|
||||
Appraisal po = new Appraisal();
|
||||
BeanUtils.copyProperties(page, po);
|
||||
service.saveMain(po, page.getAppraisalSubList());
|
||||
}
|
||||
return Result.OK("文件导入成功!数据行数:" + list.size());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
return Result.error("文件导入失败:"+e.getMessage());
|
||||
} finally {
|
||||
try {
|
||||
file.getInputStream().close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
return Result.OK("文件导入失败!");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,192 @@
|
|||
package com.nu.modules.biz.appraisal.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
|
||||
/**
|
||||
* @Description: 服务考核
|
||||
* @Author: caolei
|
||||
* @Date: 2026-01-23
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@ApiModel(value="nu_biz_nu_directive_order对象", description="服务考核")
|
||||
@Data
|
||||
@TableName("nu_biz_nu_directive_order")
|
||||
public class Appraisal implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**ID*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
/**单号*/
|
||||
@Excel(name = "单号", width = 15)
|
||||
private String orderNo;
|
||||
/**工单类型 1护理;2医疗:3仓库;4行政*/
|
||||
@Excel(name = "工单类型", width = 15, dicCode = "service_instruction_tag")
|
||||
@Dict(dicCode = "service_instruction_tag")
|
||||
private String orderType;
|
||||
/**执行类型 1单人 2协助 3转单*/
|
||||
@Excel(name = "执行类型", width = 15, dicCode = "directive_order_opt_type")
|
||||
@Dict(dicCode = "directive_order_opt_type")
|
||||
private String optType;
|
||||
/**数据池主表ID,nu_biz_nu_directive_data_pool.id*/
|
||||
private String poolId;
|
||||
/**服务指令业务ID*/
|
||||
private String bizId;
|
||||
/**业务类型*/
|
||||
private String bizType;
|
||||
/**护理单元ID*/
|
||||
@Dict(dictTable = "nu_base_info", dicText = "nu_name", dicCode = "nu_id")
|
||||
private String nuId;
|
||||
/**护理单元名称*/
|
||||
@Excel(name = "护理单元", width = 15)
|
||||
private String nuName;
|
||||
/**长者ID*/
|
||||
private String elderId;
|
||||
/**长者名称*/
|
||||
@Excel(name = "长者名称", width = 15)
|
||||
private String elderName;
|
||||
/**员工ID*/
|
||||
private String employeeId;
|
||||
/**员工姓名*/
|
||||
// @Excel(name = "员工姓名", width = 15)
|
||||
private String employeeName;
|
||||
/**服务指令ID*/
|
||||
private String directiveId;
|
||||
/**服务指令名称*/
|
||||
@Excel(name = "服务指令", width = 15)
|
||||
private String directiveName;
|
||||
/**周期类型ID*/
|
||||
private String cycleTypeId;
|
||||
/**周期类型*/
|
||||
@Excel(name = "周期类型", width = 15)
|
||||
private String cycleType;
|
||||
/**周期值*/
|
||||
@Excel(name = "周期值", width = 15)
|
||||
private String cycleValue;
|
||||
/**服务指令图片大图*/
|
||||
private String previewFile;
|
||||
/**服务指令图片小图*/
|
||||
private String previewFileSmall;
|
||||
/**语音文件*/
|
||||
private String mp3File;
|
||||
/**视频文件*/
|
||||
private String mp4File;
|
||||
/**服务时长(分钟)*/
|
||||
@Excel(name = "服务时长(分钟)", width = 15)
|
||||
private String serviceDuration;
|
||||
/**服务说明*/
|
||||
@Excel(name = "服务说明", width = 15)
|
||||
private String serviceContent;
|
||||
/**是否是服务指令包 Y是 N否*/
|
||||
@Excel(name = "是否是指令包", width = 15, dicCode = "is_open")
|
||||
@Dict(dicCode = "is_open")
|
||||
private String izPackage;
|
||||
/**收费价格*/
|
||||
@Excel(name = "收费价格", width = 15)
|
||||
private java.math.BigDecimal tollPrice;
|
||||
/**提成价格*/
|
||||
@Excel(name = "提成价格", width = 15)
|
||||
private java.math.BigDecimal comPrice;
|
||||
/**实际提成价格*/
|
||||
@Excel(name = "实际提成价格", width = 15)
|
||||
private java.math.BigDecimal realComPrice;
|
||||
/**开始时间*/
|
||||
@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")
|
||||
private Date startTime;
|
||||
/**结束时间*/
|
||||
@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")
|
||||
private Date endTime;
|
||||
/**实际开始员工*/
|
||||
private String beginEmp;
|
||||
/**实际开始时间*/
|
||||
@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")
|
||||
private Date beginTime;
|
||||
/**实际结束员工*/
|
||||
private String finishEmp;
|
||||
/**实际结束时间*/
|
||||
@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")
|
||||
private Date finishTime;
|
||||
/**是否开始 Y是 N否*/
|
||||
@Excel(name = "是否开始", width = 15, dicCode = "is_open")
|
||||
@Dict(dicCode = "is_open")
|
||||
private String izStart;
|
||||
/**是否完成 Y是 N否*/
|
||||
@Excel(name = "是否完成", width = 15, dicCode = "is_open")
|
||||
@Dict(dicCode = "is_open")
|
||||
private String izFinish;
|
||||
/**发起人ID*/
|
||||
private String initiatorId;
|
||||
/**发起人姓名*/
|
||||
private String initiatorName;
|
||||
/**创建人*/
|
||||
private String createEmp;
|
||||
/**创建人*/
|
||||
private String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
/**更新人*/
|
||||
private String updateEmp;
|
||||
/**更新人*/
|
||||
private String updateBy;
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
/**是否删除 0未删除 1删除*/
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
/**备注*/
|
||||
private String remarks;
|
||||
/**服务容错时长(end_time + 这个时间) 小于 begin_time算超时*/
|
||||
@Excel(name = "服务容错时长", width = 15)
|
||||
private String timeoutDuration;
|
||||
/**是否超时 Y超时 N未超时*/
|
||||
@Excel(name = "是否超时", width = 15, dicCode = "is_open")
|
||||
@Dict(dicCode = "is_open")
|
||||
private String izTimeout;
|
||||
/**实际执行人id(多个); 主要执行人+协助人*/
|
||||
private String optIds;
|
||||
/**实际执行人名称(多个); 主要执行人+协助人*/
|
||||
@Excel(name = "执行人", width = 15)
|
||||
private String optNames;
|
||||
/**手动拍照*/
|
||||
private String manuallyPicPath;
|
||||
/**手动录制*/
|
||||
private String manuallyMp4Path;
|
||||
/**考核状态 0未考核 1通过 2未通过*/
|
||||
@Excel(name = "考核状态", width = 15, dicCode = "appraisal_status")
|
||||
@Dict(dicCode = "appraisal_status")
|
||||
private String appraisalStatus;
|
||||
/**考核时间*/
|
||||
@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")
|
||||
private Date appraisalTime;
|
||||
/**考核人ID*/
|
||||
private String appraisalId;
|
||||
/**考核人*/
|
||||
@Excel(name = "考核人", width = 15)
|
||||
private String appraisalName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<AppraisalSub> appraisalSubList;
|
||||
}
|
||||
|
|
@ -0,0 +1,247 @@
|
|||
package com.nu.modules.biz.appraisal.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
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 org.jeecg.common.constant.ProvinceCityArea;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import java.util.Date;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
|
||||
/**
|
||||
* @Description: 服务考核子表
|
||||
* @Author: caolei
|
||||
* @Date: 2026-01-23
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@ApiModel(value="nu_biz_nu_directive_order_sub对象", description="服务考核子表")
|
||||
@Data
|
||||
@TableName("nu_biz_nu_directive_order_sub")
|
||||
public class AppraisalSub implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**ID*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "ID")
|
||||
private String id;
|
||||
/**单号*/
|
||||
@Excel(name = "单号", width = 15)
|
||||
@ApiModelProperty(value = "单号")
|
||||
private String orderNo;
|
||||
/**工单类型 1护理;2医疗:3仓库;4行政*/
|
||||
@Excel(name = "工单类型 1护理;2医疗:3仓库;4行政", width = 15)
|
||||
@ApiModelProperty(value = "工单类型 1护理;2医疗:3仓库;4行政")
|
||||
private String orderType;
|
||||
/**主表ID,nu_biz_nu_directive_order.id*/
|
||||
@ApiModelProperty(value = "主表ID,nu_biz_nu_directive_order.id")
|
||||
private String mainId;
|
||||
/**护理单元ID,nu_base_info.id*/
|
||||
@Excel(name = "护理单元ID,nu_base_info.id", width = 15)
|
||||
@ApiModelProperty(value = "护理单元ID,nu_base_info.id")
|
||||
private String nuId;
|
||||
/**护理单元名称*/
|
||||
@Excel(name = "护理单元名称", width = 15)
|
||||
@ApiModelProperty(value = "护理单元名称")
|
||||
private String nuName;
|
||||
/**长者ID,nu_biz_elder_info.id*/
|
||||
@Excel(name = "长者ID,nu_biz_elder_info.id", width = 15)
|
||||
@ApiModelProperty(value = "长者ID,nu_biz_elder_info.id")
|
||||
private String elderId;
|
||||
/**长者名称*/
|
||||
@Excel(name = "长者名称", width = 15)
|
||||
@ApiModelProperty(value = "长者名称")
|
||||
private String elderName;
|
||||
/**员工ID*/
|
||||
@Excel(name = "员工ID", width = 15)
|
||||
@ApiModelProperty(value = "员工ID")
|
||||
private String employeeId;
|
||||
/**员工姓名*/
|
||||
@Excel(name = "员工姓名", width = 15)
|
||||
@ApiModelProperty(value = "员工姓名")
|
||||
private String employeeName;
|
||||
/**分类标签*/
|
||||
@Excel(name = "分类标签", width = 15)
|
||||
@ApiModelProperty(value = "分类标签")
|
||||
private String instructionTagId;
|
||||
/**分类标签名称*/
|
||||
@Excel(name = "分类标签名称", width = 15)
|
||||
@ApiModelProperty(value = "分类标签名称")
|
||||
private String instructionTagName;
|
||||
/**服务类别ID,nu_config_service_category.id*/
|
||||
@Excel(name = "服务类别ID,nu_config_service_category.id", width = 15)
|
||||
@ApiModelProperty(value = "服务类别ID,nu_config_service_category.id")
|
||||
private String categoryId;
|
||||
/**服务类别名称*/
|
||||
@Excel(name = "服务类别名称", width = 15)
|
||||
@ApiModelProperty(value = "服务类别名称")
|
||||
private String categoryName;
|
||||
/**服务类型ID,nu_config_service_type.id*/
|
||||
@Excel(name = "服务类型ID,nu_config_service_type.id", width = 15)
|
||||
@ApiModelProperty(value = "服务类型ID,nu_config_service_type.id")
|
||||
private String typeId;
|
||||
/**服务类型名称*/
|
||||
@Excel(name = "服务类型名称", width = 15)
|
||||
@ApiModelProperty(value = "服务类型名称")
|
||||
private String typeName;
|
||||
/**服务指令ID,nu_config_service_directive.id*/
|
||||
@Excel(name = "服务指令ID,nu_config_service_directive.id", width = 15)
|
||||
@ApiModelProperty(value = "服务指令ID,nu_config_service_directive.id")
|
||||
private String directiveId;
|
||||
/**服务指令名称*/
|
||||
@Excel(name = "服务指令名称", width = 15)
|
||||
@ApiModelProperty(value = "服务指令名称")
|
||||
private String directiveName;
|
||||
/**周期类型ID*/
|
||||
@Excel(name = "周期类型ID", width = 15)
|
||||
@ApiModelProperty(value = "周期类型ID")
|
||||
private String cycleTypeId;
|
||||
/**周期类型*/
|
||||
@Excel(name = "周期类型", width = 15)
|
||||
@ApiModelProperty(value = "周期类型")
|
||||
private String cycleType;
|
||||
/**周期值*/
|
||||
@Excel(name = "周期值", width = 15)
|
||||
@ApiModelProperty(value = "周期值")
|
||||
private String cycleValue;
|
||||
/**服务指令图片大图*/
|
||||
@Excel(name = "服务指令图片大图", width = 15)
|
||||
@ApiModelProperty(value = "服务指令图片大图")
|
||||
private String previewFile;
|
||||
/**服务指令图片小图*/
|
||||
@Excel(name = "服务指令图片小图", width = 15)
|
||||
@ApiModelProperty(value = "服务指令图片小图")
|
||||
private String previewFileSmall;
|
||||
/**语音文件*/
|
||||
@Excel(name = "语音文件", width = 15)
|
||||
@ApiModelProperty(value = "语音文件")
|
||||
private String mp3File;
|
||||
/**视频文件*/
|
||||
@Excel(name = "视频文件", width = 15)
|
||||
@ApiModelProperty(value = "视频文件")
|
||||
private String mp4File;
|
||||
/**服务时长(分钟)*/
|
||||
@Excel(name = "服务时长(分钟)", width = 15)
|
||||
@ApiModelProperty(value = "服务时长(分钟)")
|
||||
private String serviceDuration;
|
||||
/**服务说明*/
|
||||
@Excel(name = "服务说明", width = 15)
|
||||
@ApiModelProperty(value = "服务说明")
|
||||
private String serviceContent;
|
||||
/**收费价格*/
|
||||
@Excel(name = "收费价格", width = 15)
|
||||
@ApiModelProperty(value = "收费价格")
|
||||
private java.math.BigDecimal tollPrice;
|
||||
/**提成价格*/
|
||||
@Excel(name = "提成价格", width = 15)
|
||||
@ApiModelProperty(value = "提成价格")
|
||||
private java.math.BigDecimal comPrice;
|
||||
/**实际提成价格*/
|
||||
@Excel(name = "实际提成价格", width = 15)
|
||||
@ApiModelProperty(value = "实际提成价格")
|
||||
private java.math.BigDecimal realComPrice;
|
||||
/**服务指令包ID*/
|
||||
@Excel(name = "服务指令包ID", width = 15)
|
||||
@ApiModelProperty(value = "服务指令包ID")
|
||||
private String packageId;
|
||||
/**服务指令包名称*/
|
||||
@Excel(name = "服务指令包名称", width = 15)
|
||||
@ApiModelProperty(value = "服务指令包名称")
|
||||
private String packageName;
|
||||
/**是否是服务指令包 Y是 N否*/
|
||||
@Excel(name = "是否是服务指令包 Y是 N否", width = 15)
|
||||
@ApiModelProperty(value = "是否是服务指令包 Y是 N否")
|
||||
private String izPackage;
|
||||
/**开始时间*/
|
||||
@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 = "开始时间")
|
||||
private Date startTime;
|
||||
/**结束时间*/
|
||||
@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 = "结束时间")
|
||||
private Date endTime;
|
||||
/**实际开始时间*/
|
||||
@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 = "实际开始时间")
|
||||
private Date beginTime;
|
||||
/**实际结束时间*/
|
||||
@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 = "实际结束时间")
|
||||
private Date finishTime;
|
||||
/**是否开始 Y是 N否*/
|
||||
@Excel(name = "是否开始 Y是 N否", width = 15)
|
||||
@ApiModelProperty(value = "是否开始 Y是 N否")
|
||||
private String izStart;
|
||||
/**是否完成 Y是 N否*/
|
||||
@Excel(name = "是否完成 Y是 N否", width = 15)
|
||||
@ApiModelProperty(value = "是否完成 Y是 N否")
|
||||
private String izFinish;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private Date createTime;
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private Date updateTime;
|
||||
/**是否删除 0未删除 1删除*/
|
||||
@Excel(name = "是否删除 0未删除 1删除", width = 15)
|
||||
@ApiModelProperty(value = "是否删除 0未删除 1删除")
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
/**tplink下载地址*/
|
||||
@Excel(name = "tplink下载地址", width = 15)
|
||||
@ApiModelProperty(value = "tplink下载地址")
|
||||
private String tplinkPath;
|
||||
/**手动拍照*/
|
||||
@Excel(name = "手动拍照", width = 15)
|
||||
@ApiModelProperty(value = "手动拍照")
|
||||
private String manuallyPicPath;
|
||||
/**手动录制*/
|
||||
@Excel(name = "手动录制", width = 15)
|
||||
@ApiModelProperty(value = "手动录制")
|
||||
private String manuallyMp4Path;
|
||||
/**执行类型 1单人 2协助 3转单*/
|
||||
@Excel(name = "执行类型 1单人 2协助 3转单", width = 15)
|
||||
@ApiModelProperty(value = "执行类型 1单人 2协助 3转单")
|
||||
private String optType;
|
||||
/**服务容错时长(end_time + 这个时间) 小于 begin_time算超时*/
|
||||
@Excel(name = "服务容错时长(end_time + 这个时间) 小于 begin_time算超时", width = 15)
|
||||
@ApiModelProperty(value = "服务容错时长(end_time + 这个时间) 小于 begin_time算超时")
|
||||
private String timeoutDuration;
|
||||
/**是否超时 Y超时 N未超时*/
|
||||
@Excel(name = "是否超时 Y超时 N未超时", width = 15)
|
||||
@ApiModelProperty(value = "是否超时 Y超时 N未超时")
|
||||
private String izTimeout;
|
||||
/**实际执行人id(多个); 主要执行人+协助人*/
|
||||
@Excel(name = "实际执行人id(多个); 主要执行人+协助人", width = 15)
|
||||
@ApiModelProperty(value = "实际执行人id(多个); 主要执行人+协助人")
|
||||
private String optIds;
|
||||
/**实际执行人名称(多个); 主要执行人+协助人*/
|
||||
@Excel(name = "实际执行人名称(多个); 主要执行人+协助人", width = 15)
|
||||
@ApiModelProperty(value = "实际执行人名称(多个); 主要执行人+协助人")
|
||||
private String optNames;
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.nu.modules.biz.appraisal.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.nu.modules.biz.appraisal.entity.Appraisal;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 服务考核
|
||||
* @Author: caolei
|
||||
* @Date: 2026-01-23
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface AppraisalMapper extends BaseMapper<Appraisal> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.nu.modules.biz.appraisal.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.nu.modules.biz.appraisal.entity.AppraisalSub;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @Description: 服务考核子表
|
||||
* @Author: caolei
|
||||
* @Date: 2026-01-23
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface AppraisalSubMapper extends BaseMapper<AppraisalSub> {
|
||||
|
||||
/**
|
||||
* 通过主表id删除子表数据
|
||||
*
|
||||
* @param mainId 主表id
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean deleteByMainId(@Param("mainId") String mainId);
|
||||
|
||||
/**
|
||||
* 通过主表id查询子表数据
|
||||
*
|
||||
* @param mainId 主表id
|
||||
* @return List<NuBizNuDirectiveOrderSub>
|
||||
*/
|
||||
public List<AppraisalSub> selectByMainId(@Param("mainId") String mainId);
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?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.biz.appraisal.mapper.AppraisalMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<?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.biz.appraisal.mapper.AppraisalSubMapper">
|
||||
|
||||
<delete id="deleteByMainId" parameterType="java.lang.String">
|
||||
DELETE
|
||||
FROM nu_biz_nu_directive_order_sub
|
||||
WHERE
|
||||
main_id = #{mainId} </delete>
|
||||
|
||||
<select id="selectByMainId" parameterType="java.lang.String" resultType="com.nu.modules.biz.appraisal.entity.AppraisalSub">
|
||||
SELECT *
|
||||
FROM nu_biz_nu_directive_order_sub
|
||||
WHERE
|
||||
main_id = #{mainId} </select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
package com.nu.modules.biz.appraisal.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.modules.biz.appraisal.entity.Appraisal;
|
||||
import com.nu.modules.biz.appraisal.entity.AppraisalSub;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 服务考核
|
||||
* @Author: caolei
|
||||
* @Date: 2026-01-23
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IAppraisalService extends IService<Appraisal> {
|
||||
|
||||
/**
|
||||
* 添加一对多
|
||||
*
|
||||
* @param Appraisal
|
||||
* @param appraisalSubList
|
||||
*/
|
||||
public void saveMain(Appraisal Appraisal,List<AppraisalSub> appraisalSubList) ;
|
||||
|
||||
/**
|
||||
* 修改一对多
|
||||
*
|
||||
* @param Appraisal
|
||||
* @param appraisalSubList
|
||||
*/
|
||||
public void updateMain(Appraisal Appraisal,List<AppraisalSub> appraisalSubList);
|
||||
|
||||
/**
|
||||
* 删除一对多
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
public void delMain (String id);
|
||||
|
||||
/**
|
||||
* 批量删除一对多
|
||||
*
|
||||
* @param idList
|
||||
*/
|
||||
public void delBatchMain (Collection<? extends Serializable> idList);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.nu.modules.biz.appraisal.service;
|
||||
|
||||
import com.nu.modules.biz.appraisal.entity.AppraisalSub;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 服务考核子表
|
||||
* @Author: caolei
|
||||
* @Date: 2026-01-23
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IAppraisalSubService extends IService<AppraisalSub> {
|
||||
|
||||
/**
|
||||
* 通过主表id查询子表数据
|
||||
*
|
||||
* @param mainId 主表id
|
||||
* @return List<NuBizNuDirectiveOrderSub>
|
||||
*/
|
||||
public List<AppraisalSub> selectByMainId(String mainId);
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
package com.nu.modules.biz.appraisal.service.impl;
|
||||
|
||||
import com.nu.modules.biz.appraisal.entity.Appraisal;
|
||||
import com.nu.modules.biz.appraisal.entity.AppraisalSub;
|
||||
import com.nu.modules.biz.appraisal.mapper.AppraisalMapper;
|
||||
import com.nu.modules.biz.appraisal.mapper.AppraisalSubMapper;
|
||||
import com.nu.modules.biz.appraisal.service.IAppraisalService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* @Description: 服务考核
|
||||
* @Author: caolei
|
||||
* @Date: 2026-01-23
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class AppraisalServiceImpl extends ServiceImpl<AppraisalMapper, Appraisal> implements IAppraisalService {
|
||||
|
||||
@Autowired
|
||||
private AppraisalSubMapper subMapper;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void saveMain(Appraisal Appraisal, List<AppraisalSub> AppraisalSubList) {
|
||||
baseMapper.insert(Appraisal);
|
||||
if(AppraisalSubList!=null && AppraisalSubList.size()>0) {
|
||||
for(AppraisalSub entity:AppraisalSubList) {
|
||||
//外键设置
|
||||
entity.setMainId(Appraisal.getId());
|
||||
subMapper.insert(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateMain(Appraisal Appraisal,List<AppraisalSub> AppraisalSubList) {
|
||||
baseMapper.updateById(Appraisal);
|
||||
|
||||
//1.先删除子表数据
|
||||
subMapper.deleteByMainId(Appraisal.getId());
|
||||
|
||||
//2.子表数据重新插入
|
||||
if(AppraisalSubList!=null && AppraisalSubList.size()>0) {
|
||||
for(AppraisalSub entity:AppraisalSubList) {
|
||||
//外键设置
|
||||
entity.setMainId(Appraisal.getId());
|
||||
subMapper.insert(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delMain(String id) {
|
||||
subMapper.deleteByMainId(id);
|
||||
baseMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delBatchMain(Collection<? extends Serializable> idList) {
|
||||
for(Serializable id:idList) {
|
||||
subMapper.deleteByMainId(id.toString());
|
||||
baseMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.nu.modules.biz.appraisal.service.impl;
|
||||
|
||||
import com.nu.modules.biz.appraisal.entity.AppraisalSub;
|
||||
import com.nu.modules.biz.appraisal.mapper.AppraisalSubMapper;
|
||||
import com.nu.modules.biz.appraisal.service.IAppraisalSubService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 服务考核子表
|
||||
* @Author: caolei
|
||||
* @Date: 2026-01-23
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class AppraisalSubServiceImpl extends ServiceImpl<AppraisalSubMapper, AppraisalSub> implements IAppraisalSubService {
|
||||
|
||||
@Override
|
||||
public List<AppraisalSub> selectByMainId(String mainId) {
|
||||
return baseMapper.selectByMainId(mainId);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue