Merge branch 'master' of http://47.115.223.229:8888/yangjun/nursing_unit_java
This commit is contained in:
commit
c1aa3777b5
|
|
@ -6,6 +6,7 @@ import com.nu.entity.*;
|
|||
import com.nu.modules.config.IDirectiveConfigApi;
|
||||
import com.nu.modules.care.api.ICareDirectivePlanApi;
|
||||
import com.nu.modules.order.api.IDirectiveOrderApi;
|
||||
import com.nu.modules.servicepackage.IDirectivePackageApi;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
|
@ -34,6 +35,8 @@ public class CareDirectiveApi {
|
|||
private ICareDirectivePlanApi careDirectivePlanApi;
|
||||
@Autowired
|
||||
private IDirectiveOrderApi directiveOrderApi;
|
||||
@Autowired
|
||||
private IDirectivePackageApi directivePackageApi;
|
||||
|
||||
/**
|
||||
* 获取护理类服务指令树-配置数据
|
||||
|
|
@ -57,6 +60,19 @@ public class CareDirectiveApi {
|
|||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指令包集合数据
|
||||
*
|
||||
* @param careDirectivePackageEntity
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getNcPackagelist")
|
||||
public Result<List<CareDirectivePackageEntity>> getNcPackagelist(CareDirectivePackageEntity careDirectivePackageEntity) {
|
||||
careDirectivePackageEntity.setInstructionTagId("1");
|
||||
List<CareDirectivePackageEntity> pageList = directivePackageApi.getNcPackagelist(careDirectivePackageEntity, null);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* PAD端保存长者标签
|
||||
*
|
||||
|
|
|
|||
|
|
@ -53,4 +53,10 @@ public class CareDirectivePackageEntity implements Serializable {
|
|||
// 服务指令集合
|
||||
private List<CareDirectiveEntity> directivesList;
|
||||
|
||||
private String instructionTagId;
|
||||
|
||||
private List<DirectiveEntity> directives;
|
||||
|
||||
private String ids;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,222 @@
|
|||
package com.nu.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令
|
||||
* @Author: 张明远
|
||||
* @Date: 2025-03-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class DirectiveEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 服务类别id
|
||||
*/
|
||||
private String categoryId;
|
||||
/**
|
||||
* 服务类型id
|
||||
*/
|
||||
private String typeId;
|
||||
/**
|
||||
* 分类标签
|
||||
*/
|
||||
private String instructionTagId;
|
||||
/**
|
||||
* 服务指令名称
|
||||
*/
|
||||
private String directiveName;
|
||||
/**
|
||||
* 收费价格
|
||||
*/
|
||||
private java.math.BigDecimal tollPrice;
|
||||
/**
|
||||
* 提成价格
|
||||
*/
|
||||
private java.math.BigDecimal comPrice;
|
||||
/**
|
||||
* 是否参与医保报销 0不报销 1报销
|
||||
*/
|
||||
private String izReimbursement;
|
||||
/**
|
||||
* 是否参与机构优惠 0不参与 1参与
|
||||
*/
|
||||
private String izPreferential;
|
||||
/**
|
||||
* 收费频次 1按次收费 2按天收费
|
||||
*/
|
||||
private String chargingFrequency;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
/**
|
||||
* 服务描述
|
||||
*/
|
||||
private String serviceContent;
|
||||
/**
|
||||
* 服务时长(分钟)
|
||||
*/
|
||||
private String serviceDuration;
|
||||
/**
|
||||
* 超时时长(分钟)
|
||||
*/
|
||||
private String timeoutDuration;
|
||||
|
||||
/**
|
||||
* 指令状态
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 是否启用 Y启用 N未启用
|
||||
*/
|
||||
private String izEnabled;
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private String delFlag;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
/**
|
||||
* 创建日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date createTime;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updateBy;
|
||||
/**
|
||||
* 更新日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date updateTime;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
private String sysOrgCode;
|
||||
/**
|
||||
* 指令音频文件
|
||||
*/
|
||||
private String mp3File;
|
||||
//语音文件是否变更
|
||||
private boolean mp3FileChanged;
|
||||
/**
|
||||
* 指令视频文件
|
||||
*/
|
||||
private String mp4File;
|
||||
//视频文件是否变更
|
||||
private boolean mp4FileChanged;
|
||||
/**
|
||||
* 服务指令图片
|
||||
*/
|
||||
private String previewFile;
|
||||
//服务指令图片是否变更
|
||||
private boolean previewFileChanged;
|
||||
/**
|
||||
* 即时指令图标
|
||||
*/
|
||||
private String immediateFile;
|
||||
/**
|
||||
* 即时指令焦点图标
|
||||
*/
|
||||
private String immediateFileFocus;
|
||||
/**
|
||||
* 指令音频文件md5
|
||||
*/
|
||||
private String mp3FileMd5;
|
||||
/**
|
||||
* 指令视频文件md5
|
||||
*/
|
||||
private String mp4FileMd5;
|
||||
/**
|
||||
* 服务指令图片大图md5
|
||||
*/
|
||||
private String previewFileMd5;
|
||||
/**
|
||||
* 服务指令图片小图
|
||||
*/
|
||||
private String previewFileSmall;
|
||||
/**
|
||||
* 服务指令图片小图md5
|
||||
*/
|
||||
private String previewFileSmallMd5;
|
||||
/**
|
||||
* 即时指令图标md5
|
||||
*/
|
||||
private String immediateFileMd5;
|
||||
/**
|
||||
* 即时指令图标md5
|
||||
*/
|
||||
private String immediateFileFocusMd5;
|
||||
/**
|
||||
* 是否下载tplink视频 Y下载 N不下载
|
||||
*/
|
||||
private String izDownTplink;
|
||||
|
||||
//即时指令图标是否变更
|
||||
private boolean immediateFileChanged;
|
||||
|
||||
//即时指令焦点图标是否变更
|
||||
private boolean immediateFileFocusChanged;
|
||||
|
||||
//合并单元格用:类别合并的行数
|
||||
private Integer categoryRowSpan;
|
||||
//合并单元格用:类型合并的行数
|
||||
private Integer typeRowSpan;
|
||||
//合并单元格用:分类标签合并的行数
|
||||
private Integer instructionRowSpan;
|
||||
//体型标签id,id,id
|
||||
private String bodyTags;
|
||||
//情绪标签id,id,id
|
||||
private String emotionTags;
|
||||
|
||||
//分类标签中文名称
|
||||
private String instructionName;
|
||||
//服务类别中文名称
|
||||
private String categoryName;
|
||||
//服务类型中文名称
|
||||
private String typeName;
|
||||
//媒体资源存储路径名
|
||||
private String mediaFileSavePath;
|
||||
//体型标签json字符串(前台封装好的 有id、label)
|
||||
private String bodyTagsObj;
|
||||
//情绪标签json字符串(前台封装好的 有id、label)
|
||||
private String emotionTagsObj;
|
||||
//护理分类名称
|
||||
private String instructionTagName;
|
||||
private String syncIds;
|
||||
private String excludeIds;//需要排除的ids
|
||||
private String filterIzEnabled;
|
||||
private String directiveId;
|
||||
private boolean izAbnormal;//查询服务时长、收费价格、提成价格 都等于 0的数据
|
||||
private String compareOrgCode;//对比的机构编码
|
||||
private boolean ownExist;//本平台是否存在该指令
|
||||
private boolean targetExist;//目标平台是否存在该指令
|
||||
// @TableField(exist = false)
|
||||
// private String cycleTypeShow;
|
||||
// @TableField(exist = false)
|
||||
// private String cycleTypeValue;
|
||||
private String syncCode;
|
||||
// /**
|
||||
// * 指令类型 1日常护理 2周期护理 3即时护理
|
||||
// */
|
||||
// @Excel(name = "指令类型", width = 15)
|
||||
// @ApiModelProperty(value = "指令类型")
|
||||
// @Dict(dicCode = "period_type")
|
||||
// private java.lang.String cycleType;
|
||||
}
|
||||
|
|
@ -220,9 +220,10 @@ public class NuConfigSuppliersApplyController extends JeecgController<NuConfigSu
|
|||
@ApiOperation(value="供应商入驻申请-变更审核", notes="供应商入驻申请-变更审核")
|
||||
@RequestMapping(value = "/audit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> audit(@RequestBody NuConfigSuppliersApply nuConfigSuppliersApply) {
|
||||
nuConfigSuppliersApplyService.audit(nuConfigSuppliersApply);
|
||||
String orgCode = nuConfigSuppliersApplyService.audit(nuConfigSuppliersApply);
|
||||
SuppliersInfoMQDto suppliersInfoMQDto = new SuppliersInfoMQDto();
|
||||
BeanUtils.copyProperties(nuConfigSuppliersApply, suppliersInfoMQDto);
|
||||
suppliersInfoMQDto.setSysOrgCode(orgCode);
|
||||
rabbitMQUtil.sendToExchange("nu.suppliers.updateAuditResult", "nu.suppliers.updateAuditResult", suppliersInfoMQDto);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,5 +16,5 @@ public interface INuConfigSuppliersApplyService extends IService<NuConfigSupplie
|
|||
|
||||
List<Map<String, Object>> getModifyInfo(NuConfigSuppliersApply suppliersApply);
|
||||
|
||||
void audit(NuConfigSuppliersApply nuConfigSuppliersApply);
|
||||
String audit(NuConfigSuppliersApply nuConfigSuppliersApply);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ public class NuConfigSuppliersApplyServiceImpl extends ServiceImpl<NuConfigSuppl
|
|||
}
|
||||
|
||||
@Override
|
||||
public void audit(NuConfigSuppliersApply nuConfigSuppliersApply) {
|
||||
public String audit(NuConfigSuppliersApply nuConfigSuppliersApply) {
|
||||
//变更后数据
|
||||
NuConfigSuppliersApply one = baseMapper.selectById(nuConfigSuppliersApply.getId());
|
||||
|
||||
|
|
@ -142,5 +142,7 @@ public class NuConfigSuppliersApplyServiceImpl extends ServiceImpl<NuConfigSuppl
|
|||
apply.setApplyContent(nuConfigSuppliersApply.getApplyContent());
|
||||
}
|
||||
baseMapper.updateById(apply);
|
||||
|
||||
return one.getSysOrgCode();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,4 +39,18 @@ public class DynamicQueueNameProvider {
|
|||
public String getEditSuppApply() {
|
||||
return getEditSuppliersApply();
|
||||
}
|
||||
|
||||
public String getUpSuppliersInfo() {
|
||||
JSONObject deptInfo = sysBaseAPI.getDeptInfo();
|
||||
String orgCode = deptInfo.getString("code");
|
||||
if (StringUtils.isNotBlank(orgCode)) {
|
||||
return orgCode + ".suppliers.upSuppliersInfo";
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
public String getUpSuppApplyInfoKey() {
|
||||
return getUpSuppliersInfo();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ public class SuppliersMQListener {
|
|||
private INuConfigSuppliersApplyService nuConfigSuppliersApplyService;
|
||||
@Autowired
|
||||
private IConfigSuppliersInfoService configSuppliersInfoService;
|
||||
|
||||
/**
|
||||
* 供应商-供应商申请合作
|
||||
*/
|
||||
|
|
@ -42,10 +43,10 @@ public class SuppliersMQListener {
|
|||
public void applyStatus(SuppliersInfoMQDto suppliersInfoMQDto) {
|
||||
try {
|
||||
QueryWrapper<NuConfigSuppliersApply> qw = new QueryWrapper<>();
|
||||
qw.eq("suppliers_id",suppliersInfoMQDto.getSuppliersId());
|
||||
qw.eq("suppliers_id", suppliersInfoMQDto.getSuppliersId());
|
||||
NuConfigSuppliersApply upData = new NuConfigSuppliersApply();
|
||||
upData.setIzHistory("Y");
|
||||
nuConfigSuppliersApplyService.update(upData,qw);
|
||||
nuConfigSuppliersApplyService.update(upData, qw);
|
||||
|
||||
NuConfigSuppliersApply configSuppliersApply = new NuConfigSuppliersApply();
|
||||
BeanUtils.copyProperties(suppliersInfoMQDto, configSuppliersApply);
|
||||
|
|
@ -78,8 +79,8 @@ public class SuppliersMQListener {
|
|||
NuConfigSuppliersApply applyUpdateData = new NuConfigSuppliersApply();
|
||||
applyUpdateData.setIzHistory("Y");
|
||||
UpdateWrapper<NuConfigSuppliersApply> uw = new UpdateWrapper<>();
|
||||
uw.eq("suppliers_id",suppliersInfoMQDto.getSuppliersId());
|
||||
nuConfigSuppliersApplyService.update(applyUpdateData,uw);
|
||||
uw.eq("suppliers_id", suppliersInfoMQDto.getSuppliersId());
|
||||
nuConfigSuppliersApplyService.update(applyUpdateData, uw);
|
||||
|
||||
//插入信息变更审核数据
|
||||
NuConfigSuppliersApply applyData = new NuConfigSuppliersApply();
|
||||
|
|
@ -114,6 +115,50 @@ public class SuppliersMQListener {
|
|||
|
||||
}
|
||||
|
||||
@AutoLog(value = "供应商-信息变更通过")
|
||||
@RabbitListener(
|
||||
bindings = @QueueBinding(
|
||||
value = @Queue(name = "#{suppliersDQNP.getUpSuppliersInfo()}"),
|
||||
exchange = @Exchange(name = "nu.suppliers.upSuppliersInfo", type = ExchangeTypes.DIRECT),
|
||||
key = "#{suppliersDQNP.getUpSuppApplyInfoKey()}"
|
||||
),
|
||||
errorHandler = "suppliersMQExceptionHandler"
|
||||
)
|
||||
public void upSuppliersInfo(SuppliersInfoMQDto suppliersInfoMQDto) {
|
||||
try {
|
||||
ConfigSuppliersInfo configSuppliersInfo = new ConfigSuppliersInfo();
|
||||
configSuppliersInfo.setId(suppliersInfoMQDto.getSuppliersId());
|
||||
configSuppliersInfo.setSuppliersName(suppliersInfoMQDto.getSuppliersName());//供应商名称
|
||||
configSuppliersInfo.setSuppliersNature(suppliersInfoMQDto.getSuppliersNature());//供应商性质
|
||||
configSuppliersInfo.setSuppliersAddress(suppliersInfoMQDto.getSuppliersAddress());//供应商地址
|
||||
configSuppliersInfo.setPersonInCharge(suppliersInfoMQDto.getPersonInCharge());//负责人
|
||||
configSuppliersInfo.setContactNumber(suppliersInfoMQDto.getContactNumber());//联系电话
|
||||
configSuppliersInfo.setOpeningBank(suppliersInfoMQDto.getOpeningBank());//开户行
|
||||
configSuppliersInfo.setOpeningBankNo(suppliersInfoMQDto.getOpeningBankNo());//开户行账号
|
||||
configSuppliersInfo.setImgPath(suppliersInfoMQDto.getImgPath());//资质照片
|
||||
configSuppliersInfoService.updateById(configSuppliersInfo);
|
||||
|
||||
QueryWrapper<NuConfigSuppliersApply> applyQW = new QueryWrapper<>();
|
||||
applyQW.eq("suppliers_id", suppliersInfoMQDto.getSuppliersId());
|
||||
applyQW.eq("iz_history", "N");
|
||||
NuConfigSuppliersApply applyOne = nuConfigSuppliersApplyService.getOne(applyQW);
|
||||
//供应商变更信息时,如果本机构处于入驻申请 需要把信息变为最新的
|
||||
if (applyOne != null && "1".equals(applyOne.getApplyStatus())) {
|
||||
applyOne.setSuppliersName(suppliersInfoMQDto.getSuppliersName());//供应商名称
|
||||
applyOne.setSuppliersNature(suppliersInfoMQDto.getSuppliersNature());//供应商性质
|
||||
applyOne.setSuppliersAddress(suppliersInfoMQDto.getSuppliersAddress());//供应商地址
|
||||
applyOne.setPersonInCharge(suppliersInfoMQDto.getPersonInCharge());//负责人
|
||||
applyOne.setContactNumber(suppliersInfoMQDto.getContactNumber());//联系电话
|
||||
applyOne.setOpeningBank(suppliersInfoMQDto.getOpeningBank());//开户行
|
||||
applyOne.setOpeningBankNo(suppliersInfoMQDto.getOpeningBankNo());//开户行账号
|
||||
applyOne.setImgPath(suppliersInfoMQDto.getImgPath());//资质照片
|
||||
nuConfigSuppliersApplyService.updateById(applyOne);
|
||||
}
|
||||
System.out.println("保存成功");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
package com.nu.modules.servicepackage;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.nu.entity.CareDirectivePackageEntity;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface IDirectivePackageApi {
|
||||
public List<CareDirectivePackageEntity> getNcPackagelist(CareDirectivePackageEntity directivePackageEntity, List<CareDirectivePackageEntity> pageList);
|
||||
}
|
||||
|
|
@ -5,13 +5,13 @@ 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 com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
|
|
@ -21,7 +21,6 @@ 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;
|
||||
|
|
@ -31,13 +30,10 @@ 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;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -59,7 +55,7 @@ public class AppraisalController {
|
|||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param Appraisal
|
||||
* @param appraisal
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
|
|
@ -68,37 +64,59 @@ public class AppraisalController {
|
|||
//@AutoLog(value = "服务指令工单-分页列表查询")
|
||||
@ApiOperation(value="服务指令工单-分页列表查询", notes="服务指令工单-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<Appraisal>> queryPageList(Appraisal Appraisal,
|
||||
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);
|
||||
// // 自定义查询规则
|
||||
// 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);
|
||||
|
||||
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);
|
||||
IPage<Appraisal> pageList = service.findPage(page, appraisal);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核
|
||||
*
|
||||
* @param appraisal
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "服务指令工单-审核")
|
||||
@ApiOperation(value="服务指令工单-审核", notes="服务指令工单-审核")
|
||||
// @RequiresPermissions("Appraisal:nu_biz_nu_directive_order:edit")
|
||||
@RequestMapping(value = "/approval", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> approval(@RequestBody Appraisal appraisal) {
|
||||
Appraisal AppraisalEntity = service.getById(appraisal.getId());
|
||||
if(AppraisalEntity==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
service.updateById(appraisal);
|
||||
return Result.OK("审核成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
|
|
@ -199,13 +217,13 @@ public class AppraisalController {
|
|||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param Appraisal
|
||||
* @param appraisal
|
||||
*/
|
||||
// @RequiresPermissions("Appraisal:nu_biz_nu_directive_order:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, Appraisal Appraisal) {
|
||||
public ModelAndView exportXls(HttpServletRequest request, Appraisal appraisal) {
|
||||
// Step.1 组装查询条件查询数据
|
||||
QueryWrapper<Appraisal> queryWrapper = QueryGenerator.initQueryWrapper(Appraisal, request.getParameterMap());
|
||||
QueryWrapper<Appraisal> queryWrapper = QueryGenerator.initQueryWrapper(appraisal, request.getParameterMap());
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
//配置选中数据查询条件
|
||||
|
|
@ -222,16 +240,16 @@ public class AppraisalController {
|
|||
for (Appraisal main : AppraisalList) {
|
||||
Appraisal vo = new Appraisal();
|
||||
BeanUtils.copyProperties(main, vo);
|
||||
List<AppraisalSub> nuBizNuAppraisalSubList = subService.selectByMainId(main.getId());
|
||||
vo.setAppraisalSubList(nuBizNuAppraisalSubList);
|
||||
List<AppraisalSub> appraisalSubList = subService.selectByMainId(main.getId());
|
||||
vo.setAppraisalSubList(appraisalSubList);
|
||||
pageList.add(vo);
|
||||
}
|
||||
|
||||
// Step.4 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, "服务指令工单列表");
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, "服务考核列表");
|
||||
mv.addObject(NormalExcelConstants.CLASS, Appraisal.class);
|
||||
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("服务指令工单数据", "导出人:"+sysUser.getRealname(), "服务指令工单"));
|
||||
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("服务考核数据", "导出人:"+sysUser.getRealname(), "服务考核"));
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
|
||||
return mv;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -186,6 +186,9 @@ public class Appraisal implements Serializable {
|
|||
/**考核人*/
|
||||
@Excel(name = "考核人", width = 15)
|
||||
private String appraisalName;
|
||||
/**考核意见*/
|
||||
@Excel(name = "考核意见", width = 15)
|
||||
private String appraisalComments;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<AppraisalSub> appraisalSubList;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
package com.nu.modules.biz.appraisal.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.nu.modules.biz.appraisal.entity.Appraisal;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
|
|
@ -13,4 +15,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
*/
|
||||
public interface AppraisalMapper extends BaseMapper<Appraisal> {
|
||||
|
||||
IPage<Appraisal> findPage(Page<Appraisal> page,@Param("params") Appraisal appraisal);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public interface AppraisalSubMapper extends BaseMapper<AppraisalSub> {
|
|||
* @param mainId 主表id
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean deleteByMainId(@Param("mainId") String mainId);
|
||||
boolean deleteByMainId(@Param("mainId") String mainId);
|
||||
|
||||
/**
|
||||
* 通过主表id查询子表数据
|
||||
|
|
@ -27,5 +27,5 @@ public interface AppraisalSubMapper extends BaseMapper<AppraisalSub> {
|
|||
* @param mainId 主表id
|
||||
* @return List<NuBizNuDirectiveOrderSub>
|
||||
*/
|
||||
public List<AppraisalSub> selectByMainId(@Param("mainId") String mainId);
|
||||
List<AppraisalSub> selectByMainId(@Param("mainId") String mainId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,4 +2,274 @@
|
|||
<!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">
|
||||
|
||||
<resultMap id="AppraisalMap" type="com.nu.modules.biz.appraisal.entity.Appraisal">
|
||||
<id column="id" property="id"/>
|
||||
<result column="order_no" property="orderNo"/>
|
||||
<result column="order_type" property="orderType"/>
|
||||
<result column="opt_type" property="optType"/>
|
||||
<result column="pool_id" property="poolId"/>
|
||||
<result column="biz_id" property="bizId"/>
|
||||
<result column="biz_type" property="bizType"/>
|
||||
<result column="nu_id" property="nuId"/>
|
||||
<result column="nu_name" property="nuName"/>
|
||||
<result column="elder_id" property="elderId"/>
|
||||
<result column="elder_name" property="elderName"/>
|
||||
<result column="employee_id" property="employeeId"/>
|
||||
<result column="employee_name" property="employeeName"/>
|
||||
<result column="directive_id" property="directiveId"/>
|
||||
<result column="directive_name" property="directiveName"/>
|
||||
<result column="cycle_type_id" property="cycleTypeId"/>
|
||||
<result column="cycle_type" property="cycleType"/>
|
||||
<result column="cycle_value" property="cycleValue"/>
|
||||
<result column="preview_file" property="previewFile"/>
|
||||
<result column="preview_file_small" property="previewFileSmall"/>
|
||||
<result column="mp3_file" property="mp3File"/>
|
||||
<result column="mp4_file" property="mp4File"/>
|
||||
<result column="service_duration" property="serviceDuration"/>
|
||||
<result column="service_content" property="serviceContent"/>
|
||||
<result column="iz_package" property="izPackage"/>
|
||||
<result column="toll_price" property="tollPrice"/>
|
||||
<result column="com_price" property="comPrice"/>
|
||||
<result column="real_com_price" property="realComPrice"/>
|
||||
<result column="start_time" property="startTime"/>
|
||||
<result column="end_time" property="endTime"/>
|
||||
<result column="begin_emp" property="beginEmp"/>
|
||||
<result column="begin_time" property="beginTime"/>
|
||||
<result column="finish_emp" property="finishEmp"/>
|
||||
<result column="finish_time" property="finishTime"/>
|
||||
<result column="iz_start" property="izStart"/>
|
||||
<result column="iz_finish" property="izFinish"/>
|
||||
<result column="initiator_id" property="initiatorId"/>
|
||||
<result column="initiator_name" property="initiatorName"/>
|
||||
<result column="create_by" property="createBy"/>
|
||||
<result column="create_emp" property="createEmp"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_by" property="updateBy"/>
|
||||
<result column="update_emp" property="updateEmp"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="del_flag" property="delFlag"/>
|
||||
<result column="remarks" property="remarks"/>
|
||||
<result column="timeout_duration" property="timeoutDuration"/>
|
||||
<result column="iz_timeout" property="izTimeout"/>
|
||||
<result column="opt_ids" property="optIds"/>
|
||||
<result column="opt_names" property="optNames"/>
|
||||
<result column="manually_pic_path" property="manuallyPicPath"/>
|
||||
<result column="manually_mp4_path" property="manuallyMp4Path"/>
|
||||
<result column="appraisal_status" property="appraisalStatus"/>
|
||||
<result column="appraisal_time" property="appraisalTime"/>
|
||||
<result column="appraisal_id" property="appraisalId"/>
|
||||
<result column="appraisal_name" property="appraisalName"/>
|
||||
<result column="appraisal_comments" property="appraisalComments"/>
|
||||
<collection property="appraisalSubList" ofType="com.nu.modules.biz.appraisal.entity.AppraisalSub">
|
||||
<id column="sub_id" property="id"/>
|
||||
<result column="sub_order_no" property="orderNo"/>
|
||||
<result column="sub_order_type" property="orderType"/>
|
||||
<result column="sub_opt_type" property="optType"/>
|
||||
<result column="sub_main_id" property="mainId"/>
|
||||
<result column="sub_nu_id" property="nuId"/>
|
||||
<result column="sub_nu_name" property="nuName"/>
|
||||
<result column="sub_elder_id" property="elderId"/>
|
||||
<result column="sub_elder_name" property="elderName"/>
|
||||
<result column="sub_employee_id" property="employeeId"/>
|
||||
<result column="sub_employee_name" property="employeeName"/>
|
||||
<result column="sub_instruction_tag_id" property="instructionTagId"/>
|
||||
<result column="sub_instruction_tag_name" property="instructionTagName"/>
|
||||
<result column="sub_category_id" property="categoryId"/>
|
||||
<result column="sub_category_name" property="categoryName"/>
|
||||
<result column="sub_type_id" property="typeId"/>
|
||||
<result column="sub_type_name" property="typeName"/>
|
||||
<result column="sub_directive_id" property="directiveId"/>
|
||||
<result column="sub_directive_name" property="directiveName"/>
|
||||
<result column="sub_cycle_type_id" property="cycleTypeId"/>
|
||||
<result column="sub_cycle_type" property="cycleType"/>
|
||||
<result column="sub_cycle_value" property="cycleValue"/>
|
||||
<result column="sub_preview_file" property="previewFile"/>
|
||||
<result column="sub_preview_file_small" property="previewFileSmall"/>
|
||||
<result column="sub_mp3_file" property="mp3File"/>
|
||||
<result column="sub_mp4_file" property="mp4File"/>
|
||||
<result column="sub_service_duration" property="serviceDuration"/>
|
||||
<result column="sub_service_content" property="serviceContent"/>
|
||||
<result column="sub_toll_price" property="tollPrice"/>
|
||||
<result column="sub_com_price" property="comPrice"/>
|
||||
<result column="sub_real_com_price" property="realComPrice"/>
|
||||
<result column="sub_package_id" property="packageId"/>
|
||||
<result column="sub_package_name" property="packageName"/>
|
||||
<result column="sub_iz_package" property="izPackage"/>
|
||||
<result column="sub_start_time" property="startTime"/>
|
||||
<result column="sub_end_time" property="endTime"/>
|
||||
<result column="sub_begin_time" property="beginTime"/>
|
||||
<result column="sub_finish_time" property="finishTime"/>
|
||||
<result column="sub_iz_start" property="izStart"/>
|
||||
<result column="sub_iz_finish" property="izFinish"/>
|
||||
<result column="sub_timeout_duration" property="timeoutDuration"/>
|
||||
<result column="sub_create_by" property="createBy"/>
|
||||
<result column="sub_create_time" property="createTime"/>
|
||||
<result column="sub_update_by" property="updateBy"/>
|
||||
<result column="sub_update_time" property="updateTime"/>
|
||||
<result column="sub_del_flag" property="delFlag"/>
|
||||
<result column="sub_tplink_path" property="tplinkPath"/>
|
||||
<result column="sub_manually_pic_path" property="manuallyPicPath"/>
|
||||
<result column="sub_manually_mp4_path" property="manuallyMp4Path"/>
|
||||
</collection>
|
||||
</resultMap>
|
||||
|
||||
<sql id="baseSelect">
|
||||
SELECT o.id,
|
||||
o.order_no,
|
||||
o.order_type,
|
||||
o.opt_type,
|
||||
o.pool_id,
|
||||
o.biz_id,
|
||||
o.biz_type,
|
||||
o.nu_id,
|
||||
o.nu_name,
|
||||
o.elder_id,
|
||||
o.elder_name,
|
||||
o.employee_id,
|
||||
o.employee_name,
|
||||
o.directive_id,
|
||||
o.directive_name,
|
||||
o.cycle_type_id,
|
||||
o.cycle_type,
|
||||
o.cycle_value,
|
||||
o.preview_file,
|
||||
o.preview_file_small,
|
||||
o.mp3_file,
|
||||
o.mp4_file,
|
||||
o.service_duration,
|
||||
o.service_content,
|
||||
o.iz_package,
|
||||
o.toll_price,
|
||||
o.com_price,
|
||||
o.real_com_price,
|
||||
o.start_time,
|
||||
o.end_time,
|
||||
o.begin_emp,
|
||||
o.begin_time,
|
||||
o.finish_emp,
|
||||
o.finish_time,
|
||||
o.iz_start,
|
||||
o.iz_finish,
|
||||
o.initiator_id,
|
||||
o.initiator_name,
|
||||
o.create_by,
|
||||
o.create_emp,
|
||||
o.create_time,
|
||||
o.update_by,
|
||||
o.update_emp,
|
||||
o.update_time,
|
||||
o.del_flag,
|
||||
o.remarks,
|
||||
o.timeout_duration,
|
||||
o.iz_timeout,
|
||||
o.opt_ids,
|
||||
o.opt_names,
|
||||
o.manually_pic_path,
|
||||
o.manually_mp4_path,
|
||||
ifnull(o.appraisal_status,'0') as appraisal_status,
|
||||
o.appraisal_time,
|
||||
o.appraisal_id,
|
||||
o.appraisal_name,
|
||||
o.appraisal_comments,
|
||||
s.id as sub_id,
|
||||
s.order_no as sub_order_no,
|
||||
s.order_type as sub_order_type,
|
||||
s.opt_type as sub_opt_type,
|
||||
s.main_id as sub_main_id,
|
||||
s.nu_id as sub_nu_id,
|
||||
s.nu_name as sub_nu_name,
|
||||
s.elder_id as sub_elder_id,
|
||||
s.elder_name as sub_elder_name,
|
||||
s.employee_id as sub_employee_id,
|
||||
s.employee_name as sub_employee_name,
|
||||
s.instruction_tag_id as sub_instruction_tag_id,
|
||||
s.instruction_tag_name as sub_instruction_tag_name,
|
||||
s.category_id as sub_category_id,
|
||||
s.category_name as sub_category_name,
|
||||
s.type_id as sub_type_id,
|
||||
s.type_name as sub_type_name,
|
||||
s.directive_id as sub_directive_id,
|
||||
s.directive_name as sub_directive_name,
|
||||
s.cycle_type_id as sub_cycle_type_id,
|
||||
s.cycle_type as sub_cycle_type,
|
||||
s.cycle_value as sub_cycle_value,
|
||||
s.preview_file as sub_preview_file,
|
||||
s.preview_file_small as sub_preview_file_small,
|
||||
s.mp3_file as sub_mp3_file,
|
||||
s.mp4_file as sub_mp4_file,
|
||||
s.service_duration as sub_service_duration,
|
||||
s.service_content as sub_service_content,
|
||||
s.toll_price as sub_toll_price,
|
||||
s.com_price as sub_com_price,
|
||||
s.real_com_price as sub_real_com_price,
|
||||
s.package_id as sub_package_id,
|
||||
s.package_name as sub_package_name,
|
||||
s.iz_package as sub_iz_package,
|
||||
s.start_time as sub_start_time,
|
||||
s.end_time as sub_end_time,
|
||||
s.begin_time as sub_begin_time,
|
||||
s.finish_time as sub_finish_time,
|
||||
s.iz_start as sub_iz_start,
|
||||
s.iz_finish as sub_iz_finish,
|
||||
s.timeout_duration as sub_timeout_duration,
|
||||
s.create_by as sub_create_by,
|
||||
s.create_time as sub_create_time,
|
||||
s.update_by as sub_update_by,
|
||||
s.update_time as sub_update_time,
|
||||
s.del_flag as sub_del_flag,
|
||||
s.tplink_path as sub_tplink_path,
|
||||
s.manually_pic_path as sub_manually_pic_path,
|
||||
s.manually_mp4_path as sub_manually_mp4_path
|
||||
FROM nu_biz_nu_directive_order o
|
||||
LEFT JOIN nu_biz_nu_directive_order_sub s ON o.id = s.main_id
|
||||
</sql>
|
||||
|
||||
<select id="findPage" resultMap="AppraisalMap">
|
||||
<include refid="baseSelect"/>
|
||||
<where>
|
||||
<if test="params.startTime != null">
|
||||
AND o.create_time >= #{params.startTime}
|
||||
</if>
|
||||
<if test="params.endTime != null">
|
||||
AND o.create_time <= #{params.endTime}
|
||||
</if>
|
||||
<if test="params.employeeId != null and params.employeeId != ''">
|
||||
AND (
|
||||
<foreach item="optId" index="index" collection="params.employeeId.split(',')"
|
||||
open="(" separator="or" close=")">
|
||||
FIND_IN_SET(#{optId}, o.opt_ids) > 0
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="params.appraisalStatus != null and params.appraisalStatus != ''">
|
||||
AND ifnull(o.appraisal_status,'0') = #{params.appraisalStatus}
|
||||
</if>
|
||||
<if test="params.orderNo != null and params.orderNo != ''">
|
||||
AND o.order_no LIKE concat('%',#{params.orderNo},'%')
|
||||
</if>
|
||||
<if test="params.orderType != null and params.orderType != ''">
|
||||
AND o.order_type = #{params.orderType}
|
||||
</if>
|
||||
<if test="params.optType != null and params.optType != ''">
|
||||
AND o.opt_type = #{params.optType}
|
||||
</if>
|
||||
<if test="params.nuId != null and params.nuId != ''">
|
||||
AND o.nu_id = #{params.nuId}
|
||||
</if>
|
||||
<if test="params.elderId != null and params.elderId != ''">
|
||||
AND o.elder_id = #{params.elderId}
|
||||
</if>
|
||||
<if test="params.izPackage != null and params.izPackage != ''">
|
||||
AND o.iz_package = #{params.izPackage}
|
||||
</if>
|
||||
<if test="params.izFinish != null and params.izFinish != ''">
|
||||
AND o.iz_finish = #{params.izFinish}
|
||||
</if>
|
||||
<if test="params.izTimeout != null and params.izTimeout != ''">
|
||||
AND o.iz_timeout = #{params.izTimeout}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY o.start_time, s.start_time
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,9 +1,10 @@
|
|||
package com.nu.modules.biz.appraisal.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
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;
|
||||
|
|
@ -16,34 +17,36 @@ import java.util.List;
|
|||
*/
|
||||
public interface IAppraisalService extends IService<Appraisal> {
|
||||
|
||||
IPage<Appraisal> findPage(Page<Appraisal> page, Appraisal appraisal);
|
||||
|
||||
/**
|
||||
* 添加一对多
|
||||
*
|
||||
* @param Appraisal
|
||||
* @param appraisal
|
||||
* @param appraisalSubList
|
||||
*/
|
||||
public void saveMain(Appraisal Appraisal,List<AppraisalSub> appraisalSubList) ;
|
||||
void saveMain(Appraisal appraisal,List<AppraisalSub> appraisalSubList) ;
|
||||
|
||||
/**
|
||||
* 修改一对多
|
||||
*
|
||||
* @param Appraisal
|
||||
* @param appraisal
|
||||
* @param appraisalSubList
|
||||
*/
|
||||
public void updateMain(Appraisal Appraisal,List<AppraisalSub> appraisalSubList);
|
||||
void updateMain(Appraisal appraisal,List<AppraisalSub> appraisalSubList);
|
||||
|
||||
/**
|
||||
* 删除一对多
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
public void delMain (String id);
|
||||
void delMain (String id);
|
||||
|
||||
/**
|
||||
* 批量删除一对多
|
||||
*
|
||||
* @param idList
|
||||
*/
|
||||
public void delBatchMain (Collection<? extends Serializable> idList);
|
||||
void delBatchMain (Collection<? extends Serializable> idList);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,5 +18,5 @@ public interface IAppraisalSubService extends IService<AppraisalSub> {
|
|||
* @param mainId 主表id
|
||||
* @return List<NuBizNuDirectiveOrderSub>
|
||||
*/
|
||||
public List<AppraisalSub> selectByMainId(String mainId);
|
||||
List<AppraisalSub> selectByMainId(String mainId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,13 @@
|
|||
package com.nu.modules.biz.appraisal.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
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.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -24,15 +27,20 @@ public class AppraisalServiceImpl extends ServiceImpl<AppraisalMapper, Appraisal
|
|||
|
||||
@Autowired
|
||||
private AppraisalSubMapper subMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public IPage<Appraisal> findPage(Page<Appraisal> page, Appraisal appraisal){
|
||||
return baseMapper.findPage(page,appraisal);
|
||||
}
|
||||
|
||||
@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) {
|
||||
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());
|
||||
entity.setMainId(appraisal.getId());
|
||||
subMapper.insert(entity);
|
||||
}
|
||||
}
|
||||
|
|
@ -40,17 +48,17 @@ public class AppraisalServiceImpl extends ServiceImpl<AppraisalMapper, Appraisal
|
|||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateMain(Appraisal Appraisal,List<AppraisalSub> AppraisalSubList) {
|
||||
baseMapper.updateById(Appraisal);
|
||||
public void updateMain(Appraisal appraisal,List<AppraisalSub> appraisalSubList) {
|
||||
baseMapper.updateById(appraisal);
|
||||
|
||||
//1.先删除子表数据
|
||||
subMapper.deleteByMainId(Appraisal.getId());
|
||||
subMapper.deleteByMainId(appraisal.getId());
|
||||
|
||||
//2.子表数据重新插入
|
||||
if(AppraisalSubList!=null && AppraisalSubList.size()>0) {
|
||||
for(AppraisalSub entity:AppraisalSubList) {
|
||||
if(appraisalSubList!=null && appraisalSubList.size()>0) {
|
||||
for(AppraisalSub entity:appraisalSubList) {
|
||||
//外键设置
|
||||
entity.setMainId(Appraisal.getId());
|
||||
entity.setMainId(appraisal.getId());
|
||||
subMapper.insert(entity);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@ package com.nu.modules.biz.plan.care.service.impl;
|
|||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.nu.entity.*;
|
||||
import com.nu.modules.biz.datapool.service.ICareDataPoolService;
|
||||
import com.nu.modules.config.directivepackage.service.IDirectivePackageService;
|
||||
import com.nu.modules.config.directivepackage.service.impl.DirectivePackageServiceImpl;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.nu.modules.biz.plan.care.entity.ElderTagPlan;
|
||||
|
|
@ -14,7 +17,10 @@ import com.nu.modules.care.api.ICareDirectivePlanApi;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元客户配置服务指令
|
||||
|
|
@ -29,6 +35,8 @@ public class CareDirectivePlanServiceImpl extends ServiceImpl<CareDirectivePlanM
|
|||
private IElderTagPlanService bizNuElderTagPlanService;
|
||||
@Autowired
|
||||
private ICareDataPoolService dataPoolServiceImpl;
|
||||
@Autowired
|
||||
private DirectivePackageServiceImpl directivePackageService;
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getPlanList(CareDirectiveEntity careDirectiveEntity) {
|
||||
|
|
@ -36,6 +44,34 @@ public class CareDirectivePlanServiceImpl extends ServiceImpl<CareDirectivePlanM
|
|||
//服务指令计划
|
||||
careDirectiveEntity.setQueryType("service");
|
||||
List<CareDirectivePlan> groupList = baseMapper.list(careDirectiveEntity);
|
||||
if (!CollectionUtils.isEmpty(groupList)) {
|
||||
//将包的指令塞进去(写一个sql效率低)
|
||||
CareDirectivePackageEntity queryParams = new CareDirectivePackageEntity();
|
||||
List<CareDirectivePackageEntity> ids = Lists.newArrayList();
|
||||
groupList.stream().forEach(item -> {
|
||||
CareDirectivePackageEntity d_ = new CareDirectivePackageEntity();
|
||||
if ("Y".equals(item.getIzPackage())) {
|
||||
d_.setId(item.getDirectiveId());
|
||||
ids.add(d_);
|
||||
}
|
||||
});
|
||||
List<CareDirectivePackageEntity> packagelist = directivePackageService.getNcPackagelist(queryParams, ids);
|
||||
if (!CollectionUtils.isEmpty(groupList)) {
|
||||
Map<String, CareDirectivePackageEntity> packageMap = packagelist.stream()
|
||||
.collect(Collectors.toMap(
|
||||
CareDirectivePackageEntity::getId,
|
||||
entity -> entity,
|
||||
(existing, replacement) -> existing
|
||||
));
|
||||
groupList.stream().forEach(item -> {
|
||||
if ("Y".equals(item.getIzPackage())) {
|
||||
List<DirectiveEntity> directives = packageMap.get(item.getDirectiveId()).getDirectives();
|
||||
item.setDirectivesList(BeanUtil.copyToList(directives, CareDirectivePlan.class));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
resMap.put("serviceList", groupList);//服务指令计划
|
||||
//即时指令
|
||||
careDirectiveEntity.setQueryType("instant");
|
||||
|
|
@ -57,6 +93,7 @@ public class CareDirectivePlanServiceImpl extends ServiceImpl<CareDirectivePlanM
|
|||
|
||||
/**
|
||||
* 保存长者标签
|
||||
*
|
||||
* @param careDirectiveEntity
|
||||
*/
|
||||
@Override
|
||||
|
|
@ -84,7 +121,7 @@ public class CareDirectivePlanServiceImpl extends ServiceImpl<CareDirectivePlanM
|
|||
@Override
|
||||
public CareDirectiveEntity addDirective(CareDirectiveEntity careDirectiveEntity) {
|
||||
CareDirectivePlan careDirectivePlan = new CareDirectivePlan();
|
||||
BeanUtils.copyProperties(careDirectiveEntity,careDirectivePlan);
|
||||
BeanUtils.copyProperties(careDirectiveEntity, careDirectivePlan);
|
||||
baseMapper.insert(careDirectivePlan);
|
||||
//TODO 增加日志
|
||||
|
||||
|
|
@ -97,7 +134,7 @@ public class CareDirectivePlanServiceImpl extends ServiceImpl<CareDirectivePlanM
|
|||
@Override
|
||||
public void editDirective(CareDirectiveEntity careDirectiveEntity) {
|
||||
CareDirectivePlan careDirectivePlan = new CareDirectivePlan();
|
||||
BeanUtils.copyProperties(careDirectiveEntity,careDirectivePlan);
|
||||
BeanUtils.copyProperties(careDirectiveEntity, careDirectivePlan);
|
||||
CareDirectivePlan entity = baseMapper.selectById(careDirectiveEntity.getId());
|
||||
baseMapper.deleteByIdPhysic(careDirectiveEntity.getId());
|
||||
baseMapper.insert(careDirectivePlan);
|
||||
|
|
@ -110,7 +147,7 @@ public class CareDirectivePlanServiceImpl extends ServiceImpl<CareDirectivePlanM
|
|||
@Override
|
||||
public void deleteDirective(CareDirectiveEntity careDirectiveEntity) {
|
||||
CareDirectivePlan careDirectivePlan = new CareDirectivePlan();
|
||||
BeanUtils.copyProperties(careDirectiveEntity,careDirectivePlan);
|
||||
BeanUtils.copyProperties(careDirectiveEntity, careDirectivePlan);
|
||||
String id = careDirectivePlan.getId();
|
||||
//调用方法删除数据池中的数据
|
||||
dataPoolServiceImpl.deleteDataPool(careDirectivePlan);
|
||||
|
|
@ -125,6 +162,6 @@ public class CareDirectivePlanServiceImpl extends ServiceImpl<CareDirectivePlanM
|
|||
|
||||
@Override
|
||||
public int queryTotal(String nuId, String elderId) {
|
||||
return baseMapper.queryTotal(nuId,elderId);
|
||||
return baseMapper.queryTotal(nuId, elderId);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -125,6 +125,7 @@
|
|||
csd.mp4_file,
|
||||
csd.preview_file,
|
||||
csd.immediate_file,
|
||||
csd.immediate_file_focus,
|
||||
cdbt.id AS bodytag_id,
|
||||
cdbt.tag_name AS bodytag_name,
|
||||
cdbt.sort AS bodytag_sort,
|
||||
|
|
@ -152,10 +153,12 @@
|
|||
(SELECT * FROM nu_config_directive_package
|
||||
<where>
|
||||
del_flag = '0'
|
||||
and id in
|
||||
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
<if test="ids != null and ids != ''">
|
||||
and id in
|
||||
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="directivePackage.instructionTagId != null and directivePackage.instructionTagId != '' ">
|
||||
and instruction_tag_id = #{directivePackage.instructionTagId}
|
||||
</if>
|
||||
|
|
|
|||
|
|
@ -1,12 +1,17 @@
|
|||
package com.nu.modules.config.directivepackage.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.nu.entity.CareDirectivePackageEntity;
|
||||
import com.nu.modules.config.directivepackage.entity.DirectivePackage;
|
||||
import com.nu.modules.config.directivepackage.mapper.DirectivePackageMapper;
|
||||
import com.nu.modules.config.directivepackage.service.IDirectivePackageService;
|
||||
import com.nu.modules.servicepackage.IDirectivePackageApi;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -17,7 +22,7 @@ import java.util.List;
|
|||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class DirectivePackageServiceImpl extends ServiceImpl<DirectivePackageMapper, DirectivePackage> implements IDirectivePackageService {
|
||||
public class DirectivePackageServiceImpl extends ServiceImpl<DirectivePackageMapper, DirectivePackage> implements IDirectivePackageService, IDirectivePackageApi {
|
||||
|
||||
@Override
|
||||
public void saveDirectives(DirectivePackage directivePackage) {
|
||||
|
|
@ -35,7 +40,7 @@ public class DirectivePackageServiceImpl extends ServiceImpl<DirectivePackageMap
|
|||
|
||||
@Override
|
||||
public void queryList(DirectivePackage directivePackage, IPage<DirectivePackage> pageList) {
|
||||
List<DirectivePackage> record = baseMapper.queryList(directivePackage,pageList.getRecords());
|
||||
List<DirectivePackage> record = baseMapper.queryList(directivePackage, pageList.getRecords());
|
||||
pageList.setRecords(record);
|
||||
}
|
||||
|
||||
|
|
@ -49,4 +54,17 @@ public class DirectivePackageServiceImpl extends ServiceImpl<DirectivePackageMap
|
|||
return directivePackages.stream().findFirst().orElse(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CareDirectivePackageEntity> getNcPackagelist(CareDirectivePackageEntity directivePackageEntity, List<CareDirectivePackageEntity> pageList) {
|
||||
DirectivePackage directivePackage = new DirectivePackage();
|
||||
BeanUtils.copyProperties(directivePackageEntity, directivePackage);
|
||||
List<DirectivePackage> ids = Lists.newArrayList();
|
||||
if (!CollectionUtils.isEmpty(pageList)) {
|
||||
ids = BeanUtil.copyToList(pageList, DirectivePackage.class);
|
||||
} else {
|
||||
ids = null;
|
||||
}
|
||||
List<DirectivePackage> record = baseMapper.queryList(directivePackage, ids);
|
||||
return BeanUtil.copyToList(record, CareDirectivePackageEntity.class);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue