Merge branch '3.11_院后第二增量' of http://182.92.166.109:3000/jihan/PostDischargePatientManage into 3.11_院后第二增量

 Conflicts:
	postdischarge-manage/src/main/java/com/xinelu/manage/service/patientvisitrecord/impl/PatientVisitRecordServiceImpl.java
	postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientrecord/impl/SignPatientRecordServiceImpl.java
This commit is contained in:
haown 2024-03-19 09:13:12 +08:00
commit 49d0133211
91 changed files with 1867 additions and 1265 deletions

View File

@ -61,9 +61,9 @@ spring:
servlet:
multipart:
# 单个文件大小
max-file-size: 10MB
max-file-size: 100MB
# 设置总上传的文件大小
max-request-size: 20MB
max-request-size: 500MB
# 服务模块
devtools:
restart:

View File

@ -3,7 +3,7 @@ package com.xinelu.common.core.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.util.Date;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
@ -29,7 +29,7 @@ public class BaseEntity implements Serializable {
* 创建时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
private LocalDateTime createTime;
/**
* 更新者
@ -40,7 +40,7 @@ public class BaseEntity implements Serializable {
* 更新时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
private LocalDateTime updateTime;
/**
* 备注
@ -68,11 +68,11 @@ public class BaseEntity implements Serializable {
this.createBy = createBy;
}
public Date getCreateTime() {
public LocalDateTime getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
public void setCreateTime(LocalDateTime createTime) {
this.createTime = createTime;
}
@ -84,11 +84,11 @@ public class BaseEntity implements Serializable {
this.updateBy = updateBy;
}
public Date getUpdateTime() {
public LocalDateTime getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
public void setUpdateTime(LocalDateTime updateTime) {
this.updateTime = updateTime;
}

View File

@ -4,7 +4,7 @@ import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import javax.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
@ -13,15 +13,15 @@ import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.xinelu.common.annotation.Log;
import com.xinelu.common.core.controller.BaseController;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.enums.BusinessType;
import com.xinyilu.common.annotation.Log;
import com.xinyilu.common.core.controller.BaseController;
import com.xinyilu.common.core.domain.AjaxResult;
import com.xinyilu.common.enums.BusinessType;
import ${packageName}.domain.${ClassName};
import ${packageName}.service.I${ClassName}Service;
import com.xinelu.common.utils.poi.ExcelUtil;
import com.xinyilu.common.utils.poi.ExcelUtil;
#if($table.crud || $table.sub)
import com.xinelu.common.core.page.TableDataInfo;
import com.xinyilu.common.core.page.TableDataInfo;
#elseif($table.tree)
#end
@ -63,7 +63,7 @@ public class ${ClassName}Controller extends BaseController {
@PostMapping("/export")
public void export(HttpServletResponse response, ${ClassName} ${className}) {
List<${ClassName}> list = ${className}Service.select${ClassName}List(${className});
ExcelUtil<${ClassName}> util = new ExcelUtil<${ClassName}>(${ClassName}. class);
ExcelUtil<${ClassName}> util = new ExcelUtil<>(${ClassName}. class);
util.exportExcel(response, list, "${functionName}数据");
}

View File

@ -11,9 +11,13 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.xinelu.common.annotation.Excel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.xinyilu.common.annotation.Excel;
#if($table.crud)
import com.xinyilu.common.core.domain.BaseEntity;
#elseif($table.tree)
import com.xinyilu.common.core.domain.TreeEntity;
#end
/**
@ -28,7 +32,7 @@ import com.xinelu.common.annotation.Excel;
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "${functionName}对象", description = "${tableName}")
#if($table.crud)
#set($Entity="BaseEntity")
#set($Entity="BaseDomain")
#elseif($table.tree)
#set($Entity="TreeEntity")
#end

View File

@ -28,7 +28,7 @@ public interface ${ClassName}Mapper {
* @param ${className} ${functionName}
* @return ${functionName}集合
*/
public List<${ClassName}> select${ClassName}List(${ClassName} ${className});
List<${ClassName}> select${ClassName}List(${ClassName} ${className});
/**
* 新增${functionName}
@ -36,7 +36,7 @@ public interface ${ClassName}Mapper {
* @param ${className} ${functionName}
* @return 结果
*/
public int insert${ClassName}(${ClassName} ${className});
int insert${ClassName}(${ClassName} ${className});
/**
* 修改${functionName}
@ -44,7 +44,7 @@ public interface ${ClassName}Mapper {
* @param ${className} ${functionName}
* @return 结果
*/
public int update${ClassName}(${ClassName} ${className});
int update${ClassName}(${ClassName} ${className});
/**
* 删除${functionName}
@ -52,7 +52,7 @@ public interface ${ClassName}Mapper {
* @param ${pkColumn.javaField} ${functionName}主键
* @return 结果
*/
public int delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField});
int delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField});
/**
* 批量删除${functionName}
@ -60,7 +60,7 @@ public interface ${ClassName}Mapper {
* @param ${pkColumn.javaField}s 需要删除的数据主键集合
* @return 结果
*/
public int delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s);
int delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s);
#if($table.sub)
/**
@ -69,7 +69,7 @@ public interface ${ClassName}Mapper {
* @param ${pkColumn.javaField}s 需要删除的数据主键集合
* @return 结果
*/
public int delete${subClassName}By${subTableFkClassName}s(${pkColumn.javaType}[] ${pkColumn.javaField}s);
int delete${subClassName}By${subTableFkClassName}s(${pkColumn.javaType}[] ${pkColumn.javaField}s);
/**
* 批量新增${subTable.functionName}
@ -77,7 +77,7 @@ public interface ${ClassName}Mapper {
* @param ${subclassName}List ${subTable.functionName}列表
* @return 结果
*/
public int batch${subClassName}(List<${subClassName}> ${subclassName}List);
int batch${subClassName}(List<${subClassName}> ${subclassName}List);
/**
@ -86,6 +86,6 @@ public interface ${ClassName}Mapper {
* @param ${pkColumn.javaField} ${functionName}ID
* @return 结果
*/
public int delete${subClassName}By${subTableFkClassName}(${pkColumn.javaType} ${pkColumn.javaField});
int delete${subClassName}By${subTableFkClassName}(${pkColumn.javaType} ${pkColumn.javaField});
#end
}

View File

@ -25,7 +25,7 @@ public interface I${ClassName}Service {
* @param ${className} ${functionName}
* @return ${functionName}集合
*/
public List<${ClassName}> select${ClassName}List(${ClassName} ${className});
List<${ClassName}> select${ClassName}List(${ClassName} ${className});
/**
* 新增${functionName}
@ -33,7 +33,7 @@ public interface I${ClassName}Service {
* @param ${className} ${functionName}
* @return 结果
*/
public int insert${ClassName}(${ClassName} ${className});
int insert${ClassName}(${ClassName} ${className});
/**
* 修改${functionName}
@ -41,7 +41,7 @@ public interface I${ClassName}Service {
* @param ${className} ${functionName}
* @return 结果
*/
public int update${ClassName}(${ClassName} ${className});
int update${ClassName}(${ClassName} ${className});
/**
* 批量删除${functionName}
@ -49,7 +49,7 @@ public interface I${ClassName}Service {
* @param ${pkColumn.javaField}s 需要删除的${functionName}主键集合
* @return 结果
*/
public int delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s);
int delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s);
/**
* 删除${functionName}信息
@ -57,5 +57,5 @@ public interface I${ClassName}Service {
* @param ${pkColumn.javaField} ${functionName}主键
* @return 结果
*/
public int delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField});
int delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField});
}

View File

@ -1,18 +1,19 @@
package ${packageName}.service.impl;
import java.time.LocalDateTime;
import java.util.List;
#foreach ($column in $columns)
#if($column.javaField == 'createTime' || $column.javaField == 'updateTime')
import com.xinelu.common.utils.DateUtils;
import com.xinyilu.common.utils.DateUtils;
#break
#end
#end
import javax.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
#if($table.sub)
import java.util.ArrayList;
import com.xinelu.common.utils.StringUtils;
import com.xinyilu.common.utils.StringUtils;
import org.springframework.transaction.annotation.Transactional;
import ${packageName}.domain.${subClassName};
#end
@ -66,7 +67,7 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service {
public int insert${ClassName}(${ClassName} ${className}) {
#foreach ($column in $columns)
#if($column.javaField == 'createTime')
${className}.setCreateTime(DateUtils.getNowDate());
${className}.setCreateTime(LocalDateTime.now());
#end
#end
#if($table.sub)
@ -91,7 +92,7 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service {
public int update${ClassName}(${ClassName} ${className}) {
#foreach ($column in $columns)
#if($column.javaField == 'updateTime')
${className}.setUpdateTime(DateUtils.getNowDate());
${className}.setUpdateTime(LocalDateTime.now());
#end
#end
#if($table.sub)

View File

@ -3,7 +3,7 @@ package ${packageName}.domain;
#foreach ($import in $subImportList)
import ${import};
#end
import com.xinelu.common.annotation.Excel;
import com.xinyilu.common.annotation.Excel;
/**
* ${subTable.functionName}对象 ${subTableName}

View File

@ -37,10 +37,6 @@ public class ServiceWayContentController extends BaseController {
/**
* 查询服务方式列表
*
* @param serviceWayName
* @param id
* @return
*/
@ApiOperation("查询服务方式列表")
@GetMapping("/serviceWayList")
@ -51,9 +47,6 @@ public class ServiceWayContentController extends BaseController {
/**
* 根据服务方式id获取服务方式
*
* @param id
* @return
*/
@ApiOperation("根据服务方式id获取服务方式")
@GetMapping(value = "/serviceWay/{id}")
@ -63,9 +56,6 @@ public class ServiceWayContentController extends BaseController {
/**
* 新增服务方式
*
* @param serviceWayContent
* @return
*/
@ApiOperation("新增服务方式")
@PostMapping("/addServiceWay")
@ -75,9 +65,6 @@ public class ServiceWayContentController extends BaseController {
/**
* 修改服务方式
*
* @param serviceWayContent
* @return
*/
@ApiOperation("修改服务方式")
@PutMapping("/editServiceWay")
@ -87,9 +74,6 @@ public class ServiceWayContentController extends BaseController {
/**
* 根据id删除服务方式
*
* @param id
* @return
*/
@ApiOperation("根据id删除服务方式")
@DeleteMapping("/removeServiceWay/{id}")

View File

@ -64,7 +64,7 @@ public class SpecialDiseaseRouteController extends BaseController {
*/
@PreAuthorize("@ss.hasPermi('system:specialDiseaseRoute:add')")
@Log(title = "专病路径信息", businessType = BusinessType.INSERT)
@PostMapping
@PostMapping("/add")
public AjaxResult add(@RequestBody SpecialDiseaseRoute specialDiseaseRoute) {
return toAjax(specialDiseaseRouteService.insertSpecialDiseaseRoute(specialDiseaseRoute));
}
@ -74,7 +74,7 @@ public class SpecialDiseaseRouteController extends BaseController {
*/
@PreAuthorize("@ss.hasPermi('system:specialDiseaseRoute:edit')")
@Log(title = "专病路径信息", businessType = BusinessType.UPDATE)
@PutMapping
@PutMapping("/edit")
public AjaxResult edit(@RequestBody SpecialDiseaseRoute specialDiseaseRoute) {
return toAjax(specialDiseaseRouteService.updateSpecialDiseaseRoute(specialDiseaseRoute));
}
@ -88,4 +88,12 @@ public class SpecialDiseaseRouteController extends BaseController {
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(specialDiseaseRouteService.deleteSpecialDiseaseRouteByIds(ids));
}
/**
* 科室路径数量
*/
@GetMapping("/departmentRouteCount")
public AjaxResult departmentRouteCount(String departmentName) {
return specialDiseaseRouteService.departmentRouteCount(departmentName);
}
}

View File

@ -0,0 +1,91 @@
package com.xinelu.manage.controller.specialdiseasetriggercondition;
import com.xinelu.common.annotation.Log;
import com.xinelu.common.core.controller.BaseController;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.core.page.TableDataInfo;
import com.xinelu.common.enums.BusinessType;
import com.xinelu.common.utils.poi.ExcelUtil;
import com.xinelu.manage.domain.specialdiseasetriggercondition.SpecialDiseaseTriggerCondition;
import com.xinelu.manage.service.specialdiseasetriggercondition.ISpecialDiseaseTriggerConditionService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 触发条件关系Controller
*
* @author xinelu
* @date 2024-03-18
*/
@RestController
@RequestMapping("/system/triggerCondition")
public class SpecialDiseaseTriggerConditionController extends BaseController {
@Resource
private ISpecialDiseaseTriggerConditionService specialDiseaseTriggerConditionService;
/**
* 查询触发条件关系列表
*/
@PreAuthorize("@ss.hasPermi('system:triggerCondition:list')")
@GetMapping("/list")
public TableDataInfo list(SpecialDiseaseTriggerCondition specialDiseaseTriggerCondition) {
startPage();
List<SpecialDiseaseTriggerCondition> list = specialDiseaseTriggerConditionService.selectSpecialDiseaseTriggerConditionList(specialDiseaseTriggerCondition);
return getDataTable(list);
}
/**
* 导出触发条件关系列表
*/
@PreAuthorize("@ss.hasPermi('system:triggerCondition:export')")
@Log(title = "触发条件关系", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SpecialDiseaseTriggerCondition specialDiseaseTriggerCondition) {
List<SpecialDiseaseTriggerCondition> list = specialDiseaseTriggerConditionService.selectSpecialDiseaseTriggerConditionList(specialDiseaseTriggerCondition);
ExcelUtil<SpecialDiseaseTriggerCondition> util = new ExcelUtil<SpecialDiseaseTriggerCondition>(SpecialDiseaseTriggerCondition.class);
util.exportExcel(response, list, "触发条件关系数据");
}
/**
* 获取触发条件关系详细信息
*/
@PreAuthorize("@ss.hasPermi('system:triggerCondition:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(specialDiseaseTriggerConditionService.selectSpecialDiseaseTriggerConditionById(id));
}
/**
* 新增触发条件关系
*/
@PreAuthorize("@ss.hasPermi('system:triggerCondition:add')")
@Log(title = "触发条件关系", businessType = BusinessType.INSERT)
@PostMapping("/add")
public AjaxResult add(@RequestBody SpecialDiseaseTriggerCondition specialDiseaseTriggerCondition) {
return toAjax(specialDiseaseTriggerConditionService.insertSpecialDiseaseTriggerCondition(specialDiseaseTriggerCondition));
}
/**
* 修改触发条件关系
*/
@PreAuthorize("@ss.hasPermi('system:triggerCondition:edit')")
@Log(title = "触发条件关系", businessType = BusinessType.UPDATE)
@PutMapping("/edit")
public AjaxResult edit(@RequestBody SpecialDiseaseTriggerCondition specialDiseaseTriggerCondition) {
return toAjax(specialDiseaseTriggerConditionService.updateSpecialDiseaseTriggerCondition(specialDiseaseTriggerCondition));
}
/**
* 删除触发条件关系
*/
@PreAuthorize("@ss.hasPermi('system:triggerCondition:remove')")
@Log(title = "触发条件关系", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(specialDiseaseTriggerConditionService.deleteSpecialDiseaseTriggerConditionByIds(ids));
}
}

View File

@ -38,6 +38,15 @@ public class TaskPartitionDictController extends BaseController {
return getDataTable(list);
}
/**
* 查询任务细分字典列表 - 不分页
*/
@GetMapping("/taskPartitionList")
public AjaxResult taskPartitionList(TaskPartitionDict taskPartitionDict) {
return AjaxResult.success(taskPartitionDictService.selectTaskPartitionDictList(taskPartitionDict));
}
/**
* 导出任务细分字典列表
*/

View File

@ -64,7 +64,7 @@ public class TaskStatusDictController extends BaseController {
*/
@PreAuthorize("@ss.hasPermi('system:taskStatus:add')")
@Log(title = "任务状态字典", businessType = BusinessType.INSERT)
@PostMapping
@PostMapping("/add")
public AjaxResult add(@RequestBody TaskStatusDict taskStatusDict) {
return toAjax(taskStatusDictService.insertTaskStatusDict(taskStatusDict));
}
@ -74,7 +74,7 @@ public class TaskStatusDictController extends BaseController {
*/
@PreAuthorize("@ss.hasPermi('system:taskStatus:edit')")
@Log(title = "任务状态字典", businessType = BusinessType.UPDATE)
@PutMapping
@PutMapping("/edit")
public AjaxResult edit(@RequestBody TaskStatusDict taskStatusDict) {
return toAjax(taskStatusDictService.updateTaskStatusDict(taskStatusDict));
}

View File

@ -50,7 +50,7 @@ public class TextMessageController extends BaseController {
List<TextMessageTaskVO> list = textMessageService.selectTextMessageList(textMessageDTO);
//处理上面查询的list集合
int num = list.size();
list = list.stream().skip((pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
list = list.stream().skip((long) (pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
TableDataInfo rspData = new TableDataInfo();
rspData.setCode(HttpStatus.SUCCESS);
rspData.setRows(list);

View File

@ -49,7 +49,7 @@ public class WechatTemplateController extends BaseController {
List<WechatTemplateTaskVO> list = wechatTemplateService.selectWechatTemplateList(wechatTemplateDto);
//处理上面查询的list集合
int num = list.size();
list = list.stream().skip((pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
list = list.stream().skip((long) (pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
TableDataInfo rspData = new TableDataInfo();
rspData.setCode(HttpStatus.SUCCESS);
rspData.setRows(list);

View File

@ -12,7 +12,7 @@ import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Date;
import java.time.LocalDate;
/**
* 科室信息对象 department
@ -166,7 +166,7 @@ public class Department extends BaseEntity {
@ApiModelProperty(value = "成立日期")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "成立日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date establishDate;
private LocalDate establishDate;
/**
* 撤销日期
@ -174,7 +174,7 @@ public class Department extends BaseEntity {
@ApiModelProperty(value = "撤销日期")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "撤销日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date revokeDate;
private LocalDate revokeDate;
@Override
public String toString() {

View File

@ -5,6 +5,8 @@ import com.xinelu.common.annotation.Excel;
import com.xinelu.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.time.LocalDateTime;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
@ -86,7 +88,7 @@ public class PatientInfo extends BaseEntity {
@ApiModelProperty(value = "签约时间格式yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "签约时间格式yyyy-MM-dd HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd")
private Date signTime;
private LocalDateTime signTime;
/** 开证医生(预住院患者) */
@ApiModelProperty(value = "开证医生")

View File

@ -4,81 +4,85 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import com.xinelu.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
/**
* 检测项目设备表
* @TableName project_device
*/
* 检测项目设备表
*
* @TableName project_device
*/
@EqualsAndHashCode(callSuper = true)
@ApiModel("检测项目设备表")
@Data
public class ProjectDevice extends BaseEntity {
/**
* 主键id
*/
* 主键id
*/
@ApiModelProperty("主键id")
private Long id;
/**
* 患者id
*/
* 患者id
*/
@ApiModelProperty("患者id")
private Long patientId;
/**
* 患者姓名
*/
* 患者姓名
*/
@ApiModelProperty("患者姓名")
private String patientName;
/**
* 身份证号
*/
* 身份证号
*/
@ApiModelProperty("身份证号")
private String cardNo;
/**
* 设备类型血糖仪GLUCOSE_METER血压计BLOOD_PRESSURE_DEVICE
*/
* 设备类型血糖仪GLUCOSE_METER血压计BLOOD_PRESSURE_DEVICE
*/
@ApiModelProperty("设备类型血糖仪GLUCOSE_METER血压计BLOOD_PRESSURE_DEVICE")
private String deviceType;
/**
* 设备名称
*/
* 设备名称
*/
@ApiModelProperty("设备名称")
private String deviceName;
/**
* 设备编码
*/
* 设备编码
*/
@ApiModelProperty("设备编码")
private String deviceCode;
/**
* 设备状态,绑定BIND,解绑UN_BIND
*/
* 设备状态,绑定BIND,解绑UN_BIND
*/
@ApiModelProperty("设备状态,绑定BIND,解绑UN_BIND")
private String deviceStatus;
/**
* 备注信息
*/
* 备注信息
*/
@ApiModelProperty("备注信息")
private String deviceRemark;
/**
* 设备绑定时间
*/
* 设备绑定时间
*/
@ApiModelProperty("设备绑定时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date deviceBindTime;
private LocalDateTime deviceBindTime;
/**
* 设备解绑时间
*/
* 设备解绑时间
*/
@ApiModelProperty("设备解绑时间")
private Date deviceUnbindTime;
private LocalDateTime deviceUnbindTime;
/**
* 设备IP地址
*/
* 设备IP地址
*/
@ApiModelProperty("设备IP地址")
private String deviceIp;
/**
* 设备端口
*/
* 设备端口
*/
@ApiModelProperty("设备端口")
private Integer devicePort;

View File

@ -4,15 +4,18 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import com.xinelu.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
/**
* 患者签约记录表
*
* @TableName sign_patient_record
*/
@Data
@ -22,7 +25,7 @@ import lombok.NoArgsConstructor;
@ApiModel(value = "患者签约记录表", description = "sign_patient_record")
public class SignPatientRecord extends BaseEntity {
private static final long serialVersionUID=1L;
private static final long serialVersionUID = 1L;
/**
* 主键id
*/
@ -35,37 +38,43 @@ public class SignPatientRecord extends BaseEntity {
@ApiModelProperty(value = "患者信息表id")
private Long patientId;
/**
* 患者姓名
*/
@ApiModelProperty(value = "患者姓名")
private String patientName;
/**
* 患者姓名
*/
@ApiModelProperty(value = "患者姓名")
private String patientName;
/**
* 患者电话
*/
@ApiModelProperty(value = "患者电话")
private String patientPhone;
/**
* 患者电话
*/
@ApiModelProperty(value = "患者电话")
private String patientPhone;
/** 身份证号 */
@ApiModelProperty(value = "身份证号")
private String cardNo;
/**
* 身份证号
*/
@ApiModelProperty(value = "身份证号")
private String cardNo;
/** 性别 */
@ApiModelProperty(value = "性别")
private String sex;
/**
* 性别
*/
@ApiModelProperty(value = "性别")
private String sex;
/** 出生日期格式yyyy-MM-dd */
@ApiModelProperty(value = "出生日期格式yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date birthDate;
/**
* 出生日期格式yyyy-MM-dd
*/
@ApiModelProperty(value = "出生日期格式yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date birthDate;
/**
* 签约时间格式yyyy-MM-dd HH:mm:ss
*/
@ApiModelProperty(value = "签约时间格式yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date signTime;
private LocalDateTime signTime;
/**
* 签约时所属医院id
@ -127,8 +136,8 @@ public class SignPatientRecord extends BaseEntity {
@ApiModelProperty(value = "就诊方式门诊OUTPATIENT_SERVICE住院BE_IN_HOSPITAL")
private String visitMethod;
@ApiModelProperty(value = "住院/门诊号")
private String inHospitalNumber;
@ApiModelProperty(value = "住院/门诊号")
private String inHospitalNumber;
/**
* 签约时诊断
@ -178,11 +187,11 @@ public class SignPatientRecord extends BaseEntity {
@ApiModelProperty(value = "开单医生姓名(意向签约)")
private String billingDoctorName;
/**
* 提交时间待续签
*/
@ApiModelProperty(value = "提交时间(待续签)")
private Date submissionTime;
/**
* 提交时间待续签
*/
@ApiModelProperty(value = "提交时间(待续签)")
private Date submissionTime;
/**
* 金额
*/
@ -195,25 +204,25 @@ public class SignPatientRecord extends BaseEntity {
@ApiModelProperty(value = "缴费状态已缴费PAID未交费UNPAID_FEES")
private String paymentStatus;
/**
* 解约原因
*/
@ApiModelProperty(value = "解约原因")
private String separateReason;
/**
* 解约原因
*/
@ApiModelProperty(value = "解约原因")
private String separateReason;
/**
* 健康管理师id
*/
@ApiModelProperty(value = "健康管理师id")
private Long healthManageId;
/**
* 健康管理师id
*/
@ApiModelProperty(value = "健康管理师id")
private Long healthManageId;
/**
* 健康管理师姓名
*/
@ApiModelProperty(value = "健康管理师姓名")
private String healthManageName;
/**
* 健康管理师姓名
*/
@ApiModelProperty(value = "健康管理师姓名")
private String healthManageName;
/**
/**
* 删除标识0未删除1已删除
*/
@ApiModelProperty(value = "删除标识0未删除1已删除")

View File

@ -12,6 +12,7 @@ import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.time.LocalTime;
import java.util.Date;
/**
@ -95,7 +96,7 @@ public class SpecialDiseaseNode extends BaseEntity {
@ApiModelProperty(value = "执行时间格式HH:mm")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "执行时间格式HH:mm", width = 30, dateFormat = "yyyy-MM-dd")
private Date executionTime;
private LocalTime executionTime;
/**
* 模板表id

View File

@ -0,0 +1,108 @@
package com.xinelu.manage.domain.specialdiseasetriggercondition;
import com.xinelu.common.annotation.Excel;
import com.xinelu.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 触发条件关系对象 special_disease_trigger_condition
*
* @author xinelu
* @date 2024-03-18
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "触发条件关系对象", description = "special_disease_trigger_condition")
public class SpecialDiseaseTriggerCondition extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 主键id
*/
private Long id;
/**
* 专病路径表id
*/
@ApiModelProperty(value = "专病路径表id")
@Excel(name = "专病路径表id")
private Long routeId;
/**
* 路径名称
*/
@ApiModelProperty(value = "路径名称")
@Excel(name = "路径名称")
private String routeName;
/**
* 触发条件编码
*/
@ApiModelProperty(value = "触发条件编码")
@Excel(name = "触发条件编码")
private String triggerConditionCode;
/**
* 触发条件名称诊断DIAGNOSIS换药日期DRESSING_CHANGE_DATE治疗方式TREATMENT_METHOD手术名称SURGICAL_NAME药品名称DRUG_NAME
*/
@ApiModelProperty(value = "触发条件名称诊断DIAGNOSIS换药日期DRESSING_CHANGE_DATE治疗方式TREATMENT_METHOD手术名称SURGICAL_NAME药品名称DRUG_NAME")
@Excel(name = "触发条件名称诊断DIAGNOSIS换药日期DRESSING_CHANGE_DATE治疗方式TREATMENT_METHOD手术名称SURGICAL_NAME药品名称DRUG_NAME")
private String triggerConditionName;
/**
* 触发条件运算符包含CONTAIN不包含NOT_CONTAIN等于EQUAL_TO不等于NOT_EQUAL_TO
*/
@ApiModelProperty(value = "触发条件运算符包含CONTAIN不包含NOT_CONTAIN等于EQUAL_TO不等于NOT_EQUAL_TO")
@Excel(name = "触发条件运算符包含CONTAIN不包含NOT_CONTAIN等于EQUAL_TO不等于NOT_EQUAL_TO")
private String triggerConditionOperator;
/**
* 触发条件值
*/
@ApiModelProperty(value = "触发条件值")
@Excel(name = "触发条件值")
private String triggerConditionValue;
/**
* 排序
*/
@ApiModelProperty(value = "排序")
@Excel(name = "排序")
private Integer triggerConditionSort;
/**
* 备注信息
*/
@ApiModelProperty(value = "备注信息")
@Excel(name = "备注信息")
private String triggerConditionRemark;
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("routeId", getRouteId())
.append("routeName", getRouteName())
.append("triggerConditionCode", getTriggerConditionCode())
.append("triggerConditionName", getTriggerConditionName())
.append("triggerConditionOperator", getTriggerConditionOperator())
.append("triggerConditionValue", getTriggerConditionValue())
.append("triggerConditionSort", getTriggerConditionSort())
.append("triggerConditionRemark", getTriggerConditionRemark())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

View File

@ -0,0 +1,128 @@
package com.xinelu.manage.domain.subscribemessagerecord;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xinelu.common.annotation.Excel;
import com.xinelu.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Date;
/**
* 微信小程序订阅消息记录对象 subscribe_message_record
*
* @author xinelu
* @date 2024-03-18
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "微信小程序订阅消息记录对象", description = "subscribe_message_record")
public class SubscribeMessageRecord extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 主键id
*/
private Long id;
/**
* 会员id
*/
@ApiModelProperty(value = "会员id")
@Excel(name = "会员id")
private Long patientId;
/**
* 签约患者管理任务节点表id
*/
@ApiModelProperty(value = "签约患者管理任务节点表id")
@Excel(name = "签约患者管理任务节点表id")
private Long manageRouteNodeId;
/**
* 微信unionid标识
*/
@ApiModelProperty(value = "微信unionid标识")
@Excel(name = "微信unionid标识")
private String unionid;
/**
* 微信小程序的openid
*/
@ApiModelProperty(value = "微信小程序的openid")
@Excel(name = "微信小程序的openid")
private String openid;
/**
* 微信小程序账户id
*/
@ApiModelProperty(value = "微信小程序账户id")
@Excel(name = "微信小程序账户id")
private String appletId;
/**
* 消息模板id
*/
@ApiModelProperty(value = "消息模板id")
@Excel(name = "消息模板id")
private String templateId;
/**
* 订阅任务消息类型电话外呼PHONE_OUTBOUND问卷量表QUESTIONNAIRE_SCALE宣教文章PROPAGANDA_ARTICLE文字提醒TEXT_REMIND人工随访ARTIFICIAL_FOLLOW_UP
*/
@ApiModelProperty(value = "订阅任务消息类型电话外呼PHONE_OUTBOUND问卷量表QUESTIONNAIRE_SCALE宣教文章PROPAGANDA_ARTICLE文字提醒TEXT_REMIND人工随访ARTIFICIAL_FOLLOW_UP")
@Excel(name = "订阅任务消息类型电话外呼PHONE_OUTBOUND问卷量表QUESTIONNAIRE_SCALE宣教文章PROPAGANDA_ARTICLE文字提醒TEXT_REMIND人工随访ARTIFICIAL_FOLLOW_UP")
private String messageType;
/**
* 用于订阅消息次数
*/
@ApiModelProperty(value = "用于订阅消息次数")
@Excel(name = "用于订阅消息次数")
private Long subscribeCount;
/**
* 订阅时间
*/
@ApiModelProperty(value = "订阅时间")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "订阅时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date subscribeTime;
/**
* 订阅状态accept接受reject拒绝
*/
@ApiModelProperty(value = "订阅状态accept接受reject拒绝")
@Excel(name = "订阅状态accept接受reject拒绝")
private String subscribeStatus;
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("patientId", getPatientId())
.append("manageRouteNodeId", getManageRouteNodeId())
.append("unionid", getUnionid())
.append("openid", getOpenid())
.append("appletId", getAppletId())
.append("templateId", getTemplateId())
.append("messageType", getMessageType())
.append("subscribeCount", getSubscribeCount())
.append("subscribeTime", getSubscribeTime())
.append("subscribeStatus", getSubscribeStatus())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

View File

@ -3,6 +3,7 @@ package com.xinelu.manage.dto.labelfieldcontent;
import com.xinelu.common.custominterface.Insert;
import com.xinelu.common.custominterface.Update;
import com.xinelu.manage.domain.labelfieldcontent.LabelFieldContent;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -16,6 +17,7 @@ import java.util.List;
* @date : 2024/3/11 17:09
*/
@Data
@ApiModel(value ="标签字段内容AddDTO")
public class LabelFieldContentAddDTO {
/**

View File

@ -62,20 +62,11 @@ public interface LabelFieldContentMapper {
/**
* 检查数据库中同一个fieldId下内容名称的重复性
*
* @param fieldId
* @param contentName
* @return
*/
int existCountByFieldIdAndContentName(@Param("fieldId") Long fieldId, @Param("contentName") String contentName);
/**
* 检查除去当前记录外有没有重复内容名称
*
* @param id
* @param fieldId
* @param contentName
* @return
*/
int existCountByContentNameExcludingId(@Param("id") Long id, @Param("fieldId") Long fieldId, @Param("contentName") String contentName);
}

View File

@ -62,20 +62,11 @@ public interface LabelFieldInfoMapper {
/**
* 检查同类型下有没有重复字段名称
*
* @param fieldType
* @param fieldNames
* @return
*/
int countDuplicateFieldNamesByType(@Param("fieldType") String fieldType, @Param("fieldNames") List<String> fieldNames);
/**
* 检查除当前记录外有没有同名的字段信息名称
*
* @param id
* @param fieldType
* @param fieldName
* @return
*/
int countByFieldNameExcludingId(@Param("id") Long id, @Param("fieldType") String fieldType, @Param("fieldName") String fieldName);
}

View File

@ -62,20 +62,11 @@ public interface OperationInfoMapper {
/**
* 检查所属科室下手术名称是否重复
*
* @param departmentId
* @param operationName
* @return
*/
int countByDepartmentIdAndOperationName(@Param("departmentId") Long departmentId, @Param("operationName") String operationName);
/**
* 检查除当前记录之外是否存在同名的手术名称
*
* @param id
* @param departmentId
* @param operationName
* @return
*/
int countByOperationNameExcludingId(@Param("id") Long id, @Param("departmentId") Long departmentId, @Param("operationName") String operationName);
}

View File

@ -65,53 +65,31 @@ public interface ServicePackageMapper {
/**
* 根据服务包id查询服务包详情信息
*
* @param id
* @return
*/
ServicePackageDetailVO selectServicePackagesById(Long id);
/**
* 查询服务包列表
*
* @param servicePackage
* @return
*/
List<ServicePackageVO> selectServicePackageLists(ServicePackage servicePackage);
/**
* 根据服务包id查询服务包内容
*
* @param id
* @return
*/
List<ServicePackageContentVO> selectServicePackageVOListById(Long id);
List<ServicePackageContentVO> selectServicePackageVoListById(Long id);
/**
* 判断所属科室下服务包名称是否存在
*
* @param departmentId
* @param packageName
* @return
*/
int existNameCount(@Param("departmentId") Long departmentId, @Param("packageName") String packageName);
/**
* 修改服务包发布状态
*
* @param id
* @param whetherRelease
* @return
*/
int editReleaseStatus(@Param("id") Long id, @Param("whetherRelease") Integer whetherRelease);
/**
* 检查除当前记录之外是否存在同名的服务包名称
*
* @param id
* @param departmentId
* @param packageName
* @return
*/
int countByPackageNameExcludingId(@Param("id") Long id, @Param("departmentId") Long departmentId, @Param("packageName") String packageName);
}

View File

@ -63,43 +63,26 @@ public interface ServicePackageContentMapper {
/**
* 根据服务包id删除服务包内容
*
* @param ids
* @return
*/
int deleteServicePackageContentByPackageIds(Long[] ids);
/**
* 根据服务包id和服务方式名称查询服务方式是否存在
*
* @param id
* @param serviceWayName
* @return
*/
Long countByPackageIdAndServiceWayName(@Param("id") Long id, @Param("serviceWayName") String serviceWayName);
/**
* 根据服务方式id和服务内容查询服务内容是否存在
*
* @param serviceWayId
* @param serviceContent
* @return
*/
Long countByServiceWayIdAndServiceContent(@Param("serviceWayId") Long serviceWayId, @Param("serviceContent") String serviceContent);
/**
* 根据服务内容id和服务频次查询服务频次是否存在
*
* @param serviceContentId
* @param vo
* @return
*/
int countByServiceContentIdAndServiceFrequency(@Param("serviceContentId") Long serviceContentId, @Param("vo") ServicePackageContentVO vo);
/**
* 根据服务包id删除服务包内容
* @param id
* @return
*/
int deleteServicePackageContentByPackageId(Long id);
}

View File

@ -69,130 +69,77 @@ public interface ServiceWayContentMapper {
/**
* 查询服务方式列表
*
* @param serviceWayName
* @param id
* @return
*/
List<ServiceWayContentAndNumVO> selectListNum(@Param("serviceWayName") String serviceWayName, @Param("id") Long id);
/**
* 查询服务方式内容列表
*
* @param serviceWayContentDTO
* @return
*/
List<ServiceWayContentVO> selectServiceWayContentListV1(ServiceWayContentDTO serviceWayContentDTO);
/**
* 根据服务频次id查询服务内容和服务频次
*
* @param id
* @return
*/
ServiceWayContentAndFrequencyVO selectServiceWayContentDetailByFrequencyId(Long id);
/**
* 查询服务方式是否存在
*
* @param serviceWayName
* @return
*/
int countByServiceName(String serviceWayName);
/**
* 根据id删除服务方式
*
* @param id
* @return
*/
int deleteServiceWayById(Long id);
/**
* 通过id查询服务方式
*
* @param id
* @return
*/
String selectServiceWayById(Long id);
/**
* @param serviceWayContentAddDTO
* @param id
* @return
*/
int countByDTOAndContentId(@Param("DTO") ServiceWayContentAddDTO serviceWayContentAddDTO, @Param("id") Long id);
/**
* 修改服务方式
*
* @param serviceWayContent
* @return
*/
int updateServiceWay(ServiceWayContent serviceWayContent);
/**
* 判断同一服务内容下服务频次是否存在
*
* @param serviceWayContentEditDTO
* @return
*/
int countByEditDTO(ServiceWayContentEditDTO serviceWayContentEditDTO);
/**
* 根据服务频次id删除服务内容
*
* @param id
* @return
*/
int deleteByFrequencyId(Long id);
/**
* 判断服务内容在服务内容表中是否存在
*
* @param serviceWayId
* @param serviceContent
* @return
*/
ServiceWayContentVO countByWayIdAndContent(@Param("serviceWayId") Long serviceWayId, @Param("serviceContent") String serviceContent);
/**
* 判断服务频次在服务频次表中是否存在
*
* @param serviceFrequencyDTO
* @return
*/
int countByServiceFrequencyDTO(ServiceFrequencyDTO serviceFrequencyDTO);
/**
* 判断当前服务方式下服务内容是否重复
*
* @param serviceContent
* @param serviceWayId
* @return
*/
int selectServiceContentByName(@Param("serviceContent") String serviceContent, @Param("serviceWayId") Long serviceWayId);
/**
* 检查TEXT类型的serviceFrequencyText是否重复
*
* @param serviceWayContentEditDTO
* @return
*/
boolean isServiceFrequencyTextDuplicate(@Param("serviceWayContentEditDTO") ServiceWayContentEditDTO serviceWayContentEditDTO);
/**
* 检查DIGIT类型的serviceFrequencyStart和serviceFrequencyEnd是否重复
*
* @param serviceWayContentEditDTO
* @return
*/
boolean isServiceFrequencyDigitDuplicate(@Param("serviceWayContentEditDTO") ServiceWayContentEditDTO serviceWayContentEditDTO);
/**
* 更新服务频次
* @param currentFrequency
* @return
*/
int updateServiceFrequency(ServiceWayContent currentFrequency);
}

View File

@ -1,6 +1,7 @@
package com.xinelu.manage.mapper.specialdiseaseroute;
import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute;
import com.xinelu.manage.vo.department.DepartmentVO;
import java.util.List;
@ -18,7 +19,7 @@ public interface SpecialDiseaseRouteMapper {
* @param id 专病路径信息主键
* @return 专病路径信息
*/
public SpecialDiseaseRoute selectSpecialDiseaseRouteById(Long id);
SpecialDiseaseRoute selectSpecialDiseaseRouteById(Long id);
/**
* 查询专病路径信息列表
@ -26,7 +27,7 @@ public interface SpecialDiseaseRouteMapper {
* @param specialDiseaseRoute 专病路径信息
* @return 专病路径信息集合
*/
public List<SpecialDiseaseRoute> selectSpecialDiseaseRouteList(SpecialDiseaseRoute specialDiseaseRoute);
List<SpecialDiseaseRoute> selectSpecialDiseaseRouteList(SpecialDiseaseRoute specialDiseaseRoute);
/**
* 新增专病路径信息
@ -34,7 +35,7 @@ public interface SpecialDiseaseRouteMapper {
* @param specialDiseaseRoute 专病路径信息
* @return 结果
*/
public int insertSpecialDiseaseRoute(SpecialDiseaseRoute specialDiseaseRoute);
int insertSpecialDiseaseRoute(SpecialDiseaseRoute specialDiseaseRoute);
/**
* 修改专病路径信息
@ -42,7 +43,7 @@ public interface SpecialDiseaseRouteMapper {
* @param specialDiseaseRoute 专病路径信息
* @return 结果
*/
public int updateSpecialDiseaseRoute(SpecialDiseaseRoute specialDiseaseRoute);
int updateSpecialDiseaseRoute(SpecialDiseaseRoute specialDiseaseRoute);
/**
* 删除专病路径信息
@ -50,7 +51,7 @@ public interface SpecialDiseaseRouteMapper {
* @param id 专病路径信息主键
* @return 结果
*/
public int deleteSpecialDiseaseRouteById(Long id);
int deleteSpecialDiseaseRouteById(Long id);
/**
* 批量删除专病路径信息
@ -58,5 +59,13 @@ public interface SpecialDiseaseRouteMapper {
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSpecialDiseaseRouteByIds(Long[] ids);
int deleteSpecialDiseaseRouteByIds(Long[] ids);
/**
* 科室路径数量
*
* @param departmentName 科室名称
* @return DepartmentVO
*/
List<DepartmentVO> departmentRouteByDepartmentName(String departmentName);
}

View File

@ -0,0 +1,61 @@
package com.xinelu.manage.mapper.specialdiseasetriggercondition;
import com.xinelu.manage.domain.specialdiseasetriggercondition.SpecialDiseaseTriggerCondition;
import java.util.List;
/**
* 触发条件关系Mapper接口
*
* @author xinelu
* @date 2024-03-18
*/
public interface SpecialDiseaseTriggerConditionMapper {
/**
* 查询触发条件关系
*
* @param id 触发条件关系主键
* @return 触发条件关系
*/
public SpecialDiseaseTriggerCondition selectSpecialDiseaseTriggerConditionById(Long id);
/**
* 查询触发条件关系列表
*
* @param specialDiseaseTriggerCondition 触发条件关系
* @return 触发条件关系集合
*/
public List<SpecialDiseaseTriggerCondition> selectSpecialDiseaseTriggerConditionList(SpecialDiseaseTriggerCondition specialDiseaseTriggerCondition);
/**
* 新增触发条件关系
*
* @param specialDiseaseTriggerCondition 触发条件关系
* @return 结果
*/
public int insertSpecialDiseaseTriggerCondition(SpecialDiseaseTriggerCondition specialDiseaseTriggerCondition);
/**
* 修改触发条件关系
*
* @param specialDiseaseTriggerCondition 触发条件关系
* @return 结果
*/
public int updateSpecialDiseaseTriggerCondition(SpecialDiseaseTriggerCondition specialDiseaseTriggerCondition);
/**
* 删除触发条件关系
*
* @param id 触发条件关系主键
* @return 结果
*/
public int deleteSpecialDiseaseTriggerConditionById(Long id);
/**
* 批量删除触发条件关系
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSpecialDiseaseTriggerConditionByIds(Long[] ids);
}

View File

@ -66,58 +66,36 @@ public interface TextMessageMapper {
/**
* 根据id查询短信模板信息
*
* @param id
* @return
*/
TextMessageVO selectTextMessageInfoById(Long id);
/**
* 检查短信模板信息是否存在
*
* @param textMessageTaskDTO
* @return
*/
int countByTextMessageTaskDTO(TextMessageTaskDTO textMessageTaskDTO);
/**
* 批量插入短信模板适用任务类型
*
* @param tasks
* @return
*/
int insertTextMessageSuitTasks(List<TextMessageSuitTask> tasks);
/**
* 批量删除短信模板适用任务类型
*
* @param ids
* @return
*/
int deleteTextMessageSuitTasks(Long[] ids);
/**
* 修改短信模板适用任务类型
*
* @param task
* @return
*/
int updateTextMessageSuitTask(@Param("task") TextMessageSuitTask task);
/**
* 根据id删除之前的适用任务类型
*
* @param id
*/
void deleteTextMessageSuitTask(Long id);
/**
* 检查除当前记录之外是否存在同名的短信模板名称
*
* @param id
* @param departmentId
* @param textMessageName
* @return
*/
int countByTextMessageNameExcludingId(@Param("id") Long id, @Param("departmentId") Long departmentId, @Param("textMessageName") String textMessageName);
}

View File

@ -66,66 +66,41 @@ public interface WechatTemplateMapper {
/**
* 查询微信模板信息Dto列表
*
* @param wechatTemplateDto
* @return
*/
List<WechatTemplateVO> selectWechatTemplateDtoList(WechatTemplateDTO wechatTemplateDto);
/**
* 根据id查询微信模板Dto
*
* @param id
* @return
*/
WechatTemplateVO selectWechatTemplateDtoById(@Param("id") Long id);
/**
* 新增微信模板适用任务类型
*
* @param tasks
* @return
*/
int insertWechatTemplateSuitTask(List<WechatTemplateSuitTask> tasks);
/**
* 修改微信模板适用任务类型
*
* @param tasks
* @return
*/
int updateWechatTemplateSuitTask(List<WechatTemplateSuitTask> tasks);
/**
* 批量删除微信模板使用任务类型
*
* @param ids
* @return
*/
int deleteWechatTemplateSuitTaskByIds(Long[] ids);
/**
* 检查微信模板名称是否存在
*
* @param wechatTemplateTaskDTO
* @return
*/
int countByWechatTemplateTaskDTO(WechatTemplateTaskDTO wechatTemplateTaskDTO);
/**
* 根据id删除之前存储的适用模板任务类型
*
* @param id
*/
void deleteWechatTemplateSuitTaskById(Long id);
/**
* 检查除当前记录之外是否存在同名的微信模板名称
*
* @param id
* @param departmentId
* @param wechatTemplateName
* @return
*/
int countByWechatTemplateNameExcludingId(@Param("id") Long id, @Param("departmentId") Long departmentId, @Param("wechatTemplateName") String wechatTemplateName);
}

View File

@ -2,7 +2,6 @@ package com.xinelu.manage.service.agency.impl;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.common.utils.bean.BeanUtils;
import com.xinelu.common.utils.regex.RegexUtil;
@ -20,7 +19,11 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.*;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
@ -111,7 +114,7 @@ public class AgencyServiceImpl implements IAgencyService {
if (i > 0) {
return AjaxResult.error("该名称" + agency.getAgencyName() + "以重复!");
}
agency.setCreateTime(DateUtils.getNowDate());
agency.setCreateTime(LocalDateTime.now());
agency.setCreateBy(SecurityUtils.getUsername());
return AjaxResult.success(agencyMapper.insertAgency(agency));
}
@ -134,7 +137,7 @@ public class AgencyServiceImpl implements IAgencyService {
throw new ServiceException("该名称" + agency.getAgencyName() + "以重复!");
}
}
agency.setUpdateTime(DateUtils.getNowDate());
agency.setUpdateTime(LocalDateTime.now());
agency.setUpdateBy(SecurityUtils.getUsername());
return AjaxResult.success(agencyMapper.updateAgencyById(agency));
}
@ -211,7 +214,7 @@ public class AgencyServiceImpl implements IAgencyService {
List<Agency> saveAgencyList = new ArrayList<>();
for (Agency item : subtractList) {
item.setCreateBy(SecurityUtils.getUsername());
item.setCreateTime(new Date());
item.setCreateTime(LocalDateTime.now());
Agency newAgency = new Agency();
BeanUtils.copyProperties(item, newAgency);
saveAgencyList.add(newAgency);

View File

@ -12,6 +12,7 @@ import com.xinelu.manage.vo.agencycategory.AgencyCategoryVO;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@ -63,7 +64,7 @@ public class AgencyCategoryServiceImpl implements IAgencyCategoryService {
if (Objects.isNull(agencyCategory.getCategoryLevel()) || agencyCategory.getCategoryLevel().equals(1)) {
agencyCategory.setParentCategoryId(null);
}
agencyCategory.setCreateTime(DateUtils.getNowDate());
agencyCategory.setCreateTime(LocalDateTime.now());
agencyCategory.setCreateBy(SecurityUtils.getUsername());
return agencyCategoryMapper.insertAgencyCategory(agencyCategory);
}
@ -76,7 +77,7 @@ public class AgencyCategoryServiceImpl implements IAgencyCategoryService {
*/
@Override
public int updateAgencyCategory(AgencyCategory agencyCategory) {
agencyCategory.setUpdateTime(DateUtils.getNowDate());
agencyCategory.setUpdateTime(LocalDateTime.now());
agencyCategory.setUpdateBy(SecurityUtils.getUsername());
return agencyCategoryMapper.updateAgencyCategory(agencyCategory);
}

View File

@ -1,14 +1,15 @@
package com.xinelu.manage.service.crowdinfo.impl;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.manage.domain.crowdinfo.CrowdInfo;
import com.xinelu.manage.mapper.crowdinfo.CrowdInfoMapper;
import com.xinelu.manage.service.crowdinfo.ICrowdInfoService;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
/**
* 人群信息Service业务层处理
*
@ -50,8 +51,8 @@ public class CrowdInfoServiceImpl implements ICrowdInfoService {
*/
@Override
public int insertCrowdInfo(CrowdInfo crowdInfo) {
crowdInfo.setCreateTime(DateUtils.getNowDate());
crowdInfo.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
crowdInfo.setCreateTime(LocalDateTime.now());
crowdInfo.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
return crowdInfoMapper.insertCrowdInfo(crowdInfo);
}
@ -63,8 +64,8 @@ public class CrowdInfoServiceImpl implements ICrowdInfoService {
*/
@Override
public int updateCrowdInfo(CrowdInfo crowdInfo) {
crowdInfo.setUpdateTime(DateUtils.getNowDate());
crowdInfo.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName());
crowdInfo.setUpdateTime(LocalDateTime.now());
crowdInfo.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName());
return crowdInfoMapper.updateCrowdInfo(crowdInfo);
}

View File

@ -3,7 +3,6 @@ package com.xinelu.manage.service.department.impl;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.core.domain.entity.SysUser;
import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.common.utils.StringUtils;
import com.xinelu.common.utils.bean.BeanUtils;
@ -21,8 +20,8 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
@ -107,7 +106,7 @@ public class DepartmentServiceImpl implements IDepartmentService {
if (Objects.isNull(department.getParentDepartmentId())) {
department.setParentDepartmentId(0L);
}
department.setCreateTime(DateUtils.getNowDate());
department.setCreateTime(LocalDateTime.now());
department.setCreateBy(SecurityUtils.getUsername());
return departmentMapper.insertDepartment(department);
}
@ -121,7 +120,7 @@ public class DepartmentServiceImpl implements IDepartmentService {
@Override
public int updateDepartment(Department department) {
department.setUpdateBy(SecurityUtils.getUsername());
department.setUpdateTime(DateUtils.getNowDate());
department.setUpdateTime(LocalDateTime.now());
return departmentMapper.updateDepartmentById(department);
}
@ -230,7 +229,7 @@ public class DepartmentServiceImpl implements IDepartmentService {
item.setParentDepartmentId(0L);
}
item.setCreateBy(SecurityUtils.getUsername());
item.setCreateTime(new Date());
item.setCreateTime(LocalDateTime.now());
Department newDepartment = new Department();
BeanUtils.copyProperties(item, newDepartment);
saveDepartmentList.add(newDepartment);

View File

@ -1,7 +1,6 @@
package com.xinelu.manage.service.departmentdiseasetype.impl;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.manage.domain.departmentdiseasetype.DepartmentDiseaseType;
import com.xinelu.manage.mapper.departmentdiseasetype.DepartmentDiseaseTypeMapper;
import com.xinelu.manage.service.departmentdiseasetype.IDepartmentDiseaseTypeService;
@ -10,9 +9,9 @@ import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
@ -56,7 +55,7 @@ public class DepartmentDiseaseTypeServiceImpl implements IDepartmentDiseaseTypeS
*/
@Override
public int insertDepartmentDiseaseType(DepartmentDiseaseType departmentDiseaseType) {
departmentDiseaseType.setCreateTime(DateUtils.getNowDate());
departmentDiseaseType.setCreateTime(LocalDateTime.now());
return departmentDiseaseTypeMapper.insertDepartmentDiseaseType(departmentDiseaseType);
}
@ -68,7 +67,7 @@ public class DepartmentDiseaseTypeServiceImpl implements IDepartmentDiseaseTypeS
*/
@Override
public int updateDepartmentDiseaseType(DepartmentDiseaseType departmentDiseaseType) {
departmentDiseaseType.setUpdateTime(DateUtils.getNowDate());
departmentDiseaseType.setUpdateTime(LocalDateTime.now());
return departmentDiseaseTypeMapper.updateDepartmentDiseaseType(departmentDiseaseType);
}

View File

@ -62,8 +62,6 @@ public interface ILabelFieldContentService {
/**
* 批量新增标签字段内容信息
* @param labelFieldContentAddDTO
* @return
*/
int insertLabelFieldContents(LabelFieldContentAddDTO labelFieldContentAddDTO);
}

View File

@ -2,7 +2,6 @@ package com.xinelu.manage.service.labelfieldcontent.impl;
import com.xinelu.common.constant.LabelFieldInfoFieldTypeConstants;
import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.common.utils.bean.BeanUtils;
import com.xinelu.common.utils.codes.GenerateSystemCodeUtil;
@ -15,6 +14,7 @@ import org.apache.commons.lang3.ObjectUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
/**
@ -61,7 +61,7 @@ public class LabelFieldContentServiceImpl implements ILabelFieldContentService {
*/
@Override
public int insertLabelFieldContent(LabelFieldContent labelFieldContent) {
labelFieldContent.setCreateTime(DateUtils.getNowDate());
labelFieldContent.setCreateTime(LocalDateTime.now());
return labelFieldContentMapper.insertLabelFieldContent(labelFieldContent);
}
@ -82,7 +82,7 @@ public class LabelFieldContentServiceImpl implements ILabelFieldContentService {
throw new ServiceException("当前标签字段类型下字段内容名称已存在");
}
labelFieldContent.setUpdateBy(SecurityUtils.getUsername());
labelFieldContent.setUpdateTime(DateUtils.getNowDate());
labelFieldContent.setUpdateTime(LocalDateTime.now());
return labelFieldContentMapper.updateLabelFieldContent(labelFieldContent);
}
@ -110,9 +110,6 @@ public class LabelFieldContentServiceImpl implements ILabelFieldContentService {
/**
* 批量新增标签字段内容信息
*
* @param labelFieldContentAddDTO
* @return
*/
@Override
public int insertLabelFieldContents(LabelFieldContentAddDTO labelFieldContentAddDTO) {
@ -133,7 +130,7 @@ public class LabelFieldContentServiceImpl implements ILabelFieldContentService {
labelFieldContent.setFieldName(labelFieldContentAddDTO.getFieldName());
labelFieldContent.setContentCode(LabelFieldInfoFieldTypeConstants.CONTENT_ENCODING + systemCodeUtil.generateDepartCode(LabelFieldInfoFieldTypeConstants.CONTENT_ENCODING));
labelFieldContent.setCreateBy(SecurityUtils.getUsername());
labelFieldContent.setCreateTime(DateUtils.getNowDate());
labelFieldContent.setCreateTime(LocalDateTime.now());
if (labelFieldContentMapper.insertLabelFieldContent(labelFieldContent) <= 0) {
throw new ServiceException("新增标签字段内容信息失败");
}

View File

@ -62,8 +62,6 @@ public interface ILabelFieldInfoService {
/**
* 批量新增标签字段信息
* @param labelFieldInfoAddDTO
* @return
*/
int insertLabelFieldInfoList(LabelFieldInfoAddDTO labelFieldInfoAddDTO);

View File

@ -2,7 +2,6 @@ package com.xinelu.manage.service.labelfieldinfo.impl;
import com.xinelu.common.constant.LabelFieldInfoFieldTypeConstants;
import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.common.utils.codes.GenerateSystemCodeUtil;
import com.xinelu.manage.domain.labelfieldinfo.LabelFieldInfo;
@ -15,6 +14,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@ -63,7 +63,7 @@ public class LabelFieldInfoServiceImpl implements ILabelFieldInfoService {
*/
@Override
public int insertLabelFieldInfo(LabelFieldInfo labelFieldInfo) {
labelFieldInfo.setCreateTime(DateUtils.getNowDate());
labelFieldInfo.setCreateTime(LocalDateTime.now());
return labelFieldInfoMapper.insertLabelFieldInfo(labelFieldInfo);
}
@ -87,7 +87,7 @@ public class LabelFieldInfoServiceImpl implements ILabelFieldInfoService {
}
// 执行修改操作
labelFieldInfo.setUpdateBy(SecurityUtils.getUsername());
labelFieldInfo.setUpdateTime(DateUtils.getNowDate());
labelFieldInfo.setUpdateTime(LocalDateTime.now());
return labelFieldInfoMapper.updateLabelFieldInfo(labelFieldInfo);
}
@ -115,9 +115,6 @@ public class LabelFieldInfoServiceImpl implements ILabelFieldInfoService {
/**
* 批量新增标签字段信息
*
* @param labelFieldInfoAddDTO
* @return
*/
@Transactional(rollbackFor = Exception.class)
@Override
@ -147,7 +144,7 @@ public class LabelFieldInfoServiceImpl implements ILabelFieldInfoService {
for (LabelFieldInfo labelFieldInfo : fieldInfoList) {
labelFieldInfo.setFieldCode(LabelFieldInfoFieldTypeConstants.FIELD_ENCODING + systemCodeUtil.generateDepartCode(LabelFieldInfoFieldTypeConstants.FIELD_ENCODING));
labelFieldInfo.setCreateBy(SecurityUtils.getUsername());
labelFieldInfo.setCreateTime(DateUtils.getNowDate());
labelFieldInfo.setCreateTime(LocalDateTime.now());
if (labelFieldInfoMapper.insertLabelFieldInfo(labelFieldInfo) <= 0) {
throw new ServiceException("新增标签字段信息失败");
}

View File

@ -1,14 +1,15 @@
package com.xinelu.manage.service.materialsinfo.impl;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.manage.domain.materialsinfo.MaterialsInfo;
import com.xinelu.manage.dto.materialsinfo.MaterialsInfoDto;
import com.xinelu.manage.mapper.materialsinfo.MaterialsInfoMapper;
import com.xinelu.manage.service.materialsinfo.IMaterialsInfoService;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
/**
* 素材信息Service业务层处理
*
@ -50,8 +51,8 @@ public class MaterialsInfoServiceImpl implements IMaterialsInfoService {
*/
@Override
public int insertMaterialsInfo(MaterialsInfo materialsInfo) {
materialsInfo.setCreateTime(DateUtils.getNowDate());
return materialsInfoMapper.insertMaterialsInfo(materialsInfo);
materialsInfo.setCreateTime(LocalDateTime.now());
return materialsInfoMapper.insertMaterialsInfo(materialsInfo);
}
/**
@ -62,7 +63,7 @@ public class MaterialsInfoServiceImpl implements IMaterialsInfoService {
*/
@Override
public int updateMaterialsInfo(MaterialsInfo materialsInfo) {
materialsInfo.setUpdateTime(DateUtils.getNowDate());
materialsInfo.setUpdateTime(LocalDateTime.now());
return materialsInfoMapper.updateMaterialsInfo(materialsInfo);
}

View File

@ -1,12 +1,12 @@
package com.xinelu.manage.service.normdepartmentcompare.impl;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.manage.domain.normdepartmentcompare.NormDepartmentCompare;
import com.xinelu.manage.mapper.normdepartmentcompare.NormDepartmentCompareMapper;
import com.xinelu.manage.service.normdepartmentcompare.INormDepartmentCompareService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
@ -51,7 +51,7 @@ public class NormDepartmentCompareServiceImpl implements INormDepartmentCompareS
*/
@Override
public int insertNormDepartmentCompare(NormDepartmentCompare normDepartmentCompare) {
normDepartmentCompare.setCreateTime(DateUtils.getNowDate());
normDepartmentCompare.setCreateTime(LocalDateTime.now());
return normDepartmentCompareMapper.insertNormDepartmentCompare(normDepartmentCompare);
}
@ -63,7 +63,7 @@ public class NormDepartmentCompareServiceImpl implements INormDepartmentCompareS
*/
@Override
public int updateNormDepartmentCompare(NormDepartmentCompare normDepartmentCompare) {
normDepartmentCompare.setUpdateTime(DateUtils.getNowDate());
normDepartmentCompare.setUpdateTime(LocalDateTime.now());
return normDepartmentCompareMapper.updateNormDepartmentCompare(normDepartmentCompare);
}

View File

@ -2,7 +2,6 @@ package com.xinelu.manage.service.operationInfo.impl;
import com.xinelu.common.constant.Constants;
import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.common.utils.codes.GenerateSystemCodeUtil;
import com.xinelu.manage.domain.operationInfo.OperationInfo;
@ -12,6 +11,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
/**
@ -67,7 +67,7 @@ public class OperationInfoServiceImpl implements IOperationInfoService {
// 设置创建人创建时间
operationInfo.setOperationCode(Constants.SURGERY_ENCODING + systemCodeUtil.generateDepartCode(Constants.SURGERY_ENCODING));
operationInfo.setCreateBy(SecurityUtils.getUsername());
operationInfo.setCreateTime(DateUtils.getNowDate());
operationInfo.setCreateTime(LocalDateTime.now());
return operationInfoMapper.insertOperationInfo(operationInfo);
}
@ -86,7 +86,7 @@ public class OperationInfoServiceImpl implements IOperationInfoService {
}
// 设置修改人修改时间
operationInfo.setUpdateBy(SecurityUtils.getUsername());
operationInfo.setUpdateTime(DateUtils.getNowDate());
operationInfo.setUpdateTime(LocalDateTime.now());
return operationInfoMapper.updateOperationInfo(operationInfo);
}

View File

@ -12,12 +12,14 @@ import com.xinelu.manage.mapper.patientblacklist.PatientBlacklistMapper;
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
import com.xinelu.manage.service.patientblacklist.IPatientBlacklistService;
import com.xinelu.manage.vo.patientblacklist.PatientBlacklistVo;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
/**
* 患者-黑明单关系Service业务层处理
*
@ -29,8 +31,8 @@ public class PatientBlacklistServiceImpl implements IPatientBlacklistService {
@Resource
private PatientBlacklistMapper patientBlacklistMapper;
@Resource
private PatientInfoMapper patientInfoMapper;
@Resource
private PatientInfoMapper patientInfoMapper;
/**
* 查询患者-黑明单关系
@ -62,23 +64,23 @@ public class PatientBlacklistServiceImpl implements IPatientBlacklistService {
*/
@Override
public int insertPatientBlacklist(PatientBlacklistSaveDto blacklistSaveDto) {
// 根据患者姓名身份证号查询患者
PatientInfoDto patientInfoDto = new PatientInfoDto();
patientInfoDto.setPatientName(blacklistSaveDto.getPatientName());
patientInfoDto.setPatientPhone(blacklistSaveDto.getPatientPhone());
patientInfoDto.setCardNo(blacklistSaveDto.getCardNo());
List<PatientInfo> patientList = patientInfoMapper.selectPatientInfoList(patientInfoDto);
if (CollectionUtils.isEmpty(patientList)) {
throw new ServiceException("未找到该患者,请确认姓名身份证号手机号是否正确");
}
if (patientList.size() > 1) {
throw new ServiceException("找到多名患者信息,请确认姓名身份证号手机号是否正确");
}
PatientBlacklist patientBlacklist = new PatientBlacklist();
BeanUtils.copyBeanProp(patientBlacklist, blacklistSaveDto);
patientBlacklist.setPatientId(patientList.get(0).getId());
patientBlacklist.setDelFlag(0);
patientBlacklist.setCreateTime(DateUtils.getNowDate());
// 根据患者姓名身份证号查询患者
PatientInfoDto patientInfoDto = new PatientInfoDto();
patientInfoDto.setPatientName(blacklistSaveDto.getPatientName());
patientInfoDto.setPatientPhone(blacklistSaveDto.getPatientPhone());
patientInfoDto.setCardNo(blacklistSaveDto.getCardNo());
List<PatientInfo> patientList = patientInfoMapper.selectPatientInfoList(patientInfoDto);
if (CollectionUtils.isEmpty(patientList)) {
throw new ServiceException("未找到该患者,请确认姓名身份证号手机号是否正确");
}
if (patientList.size() > 1) {
throw new ServiceException("找到多名患者信息,请确认姓名身份证号手机号是否正确");
}
PatientBlacklist patientBlacklist = new PatientBlacklist();
BeanUtils.copyBeanProp(patientBlacklist, blacklistSaveDto);
patientBlacklist.setPatientId(patientList.get(0).getId());
patientBlacklist.setDelFlag(0);
patientBlacklist.setCreateTime(LocalDateTime.now());
return patientBlacklistMapper.insertPatientBlacklist(patientBlacklist);
}
@ -90,7 +92,7 @@ public class PatientBlacklistServiceImpl implements IPatientBlacklistService {
*/
@Override
public int updatePatientBlacklist(PatientBlacklist patientBlacklist) {
patientBlacklist.setUpdateTime(DateUtils.getNowDate());
patientBlacklist.setUpdateTime(LocalDateTime.now());
return patientBlacklistMapper.updatePatientBlacklist(patientBlacklist);
}
@ -113,10 +115,10 @@ public class PatientBlacklistServiceImpl implements IPatientBlacklistService {
*/
@Override
public int deletePatientBlacklistById(Long id) {
PatientBlacklist patientBlacklist = new PatientBlacklist();
patientBlacklist.setId(id);
patientBlacklist.setDelFlag(1);
patientBlacklist.setUpdateTime(new Date());
PatientBlacklist patientBlacklist = new PatientBlacklist();
patientBlacklist.setId(id);
patientBlacklist.setDelFlag(1);
patientBlacklist.setUpdateTime(LocalDateTime.now());
return patientBlacklistMapper.updatePatientBlacklist(patientBlacklist);
}
}

View File

@ -1,13 +1,14 @@
package com.xinelu.manage.service.patientblacklistabnormalcause.impl;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.manage.domain.patientblacklistabnormalcause.PatientBlacklistAbnormalCause;
import com.xinelu.manage.mapper.patientblacklistabnormalcause.PatientBlacklistAbnormalCauseMapper;
import com.xinelu.manage.service.patientblacklistabnormalcause.IPatientBlacklistAbnormalCauseService;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
/**
* 患者黑名单异常原因Service业务层处理
*
@ -49,8 +50,8 @@ public class PatientBlacklistAbnormalCauseServiceImpl implements IPatientBlackli
*/
@Override
public int insertPatientBlacklistAbnormalCause(PatientBlacklistAbnormalCause patientBlacklistAbnormalCause) {
patientBlacklistAbnormalCause.setCreateTime(DateUtils.getNowDate());
return patientBlacklistAbnormalCauseMapper.insertPatientBlacklistAbnormalCause(patientBlacklistAbnormalCause);
patientBlacklistAbnormalCause.setCreateTime(LocalDateTime.now());
return patientBlacklistAbnormalCauseMapper.insertPatientBlacklistAbnormalCause(patientBlacklistAbnormalCause);
}
/**
@ -61,7 +62,7 @@ public class PatientBlacklistAbnormalCauseServiceImpl implements IPatientBlackli
*/
@Override
public int updatePatientBlacklistAbnormalCause(PatientBlacklistAbnormalCause patientBlacklistAbnormalCause) {
patientBlacklistAbnormalCause.setUpdateTime(DateUtils.getNowDate());
patientBlacklistAbnormalCause.setUpdateTime(LocalDateTime.now());
return patientBlacklistAbnormalCauseMapper.updatePatientBlacklistAbnormalCause(patientBlacklistAbnormalCause);
}

View File

@ -1,14 +1,15 @@
package com.xinelu.manage.service.patientinfo.impl;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.manage.domain.patientinfo.PatientInfo;
import com.xinelu.manage.dto.patientinfo.PatientInfoDto;
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
import com.xinelu.manage.service.patientinfo.IPatientInfoService;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
/**
* 患者信息Service业务层处理
*
@ -51,8 +52,8 @@ public class PatientInfoServiceImpl implements IPatientInfoService {
*/
@Override
public int insertPatientInfo(PatientInfo patientInfo) {
patientInfo.setCreateTime(DateUtils.getNowDate());
patientInfo.setDelFlag(0);
patientInfo.setCreateTime(LocalDateTime.now());
patientInfo.setDelFlag(0);
return patientInfoMapper.insertPatientInfo(patientInfo);
}
@ -64,7 +65,7 @@ public class PatientInfoServiceImpl implements IPatientInfoService {
*/
@Override
public int updatePatientInfo(PatientInfo patientInfo) {
patientInfo.setUpdateTime(DateUtils.getNowDate());
patientInfo.setUpdateTime(LocalDateTime.now());
return patientInfoMapper.updatePatientInfo(patientInfo);
}

View File

@ -4,7 +4,6 @@ import com.xinelu.common.constant.NodeTypeConstants;
import com.xinelu.common.constant.PatientTypeConstants;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.common.utils.StringUtils;
import com.xinelu.common.utils.bean.BeanUtils;
@ -19,203 +18,211 @@ import com.xinelu.manage.mapper.department.DepartmentMapper;
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
import com.xinelu.manage.mapper.patientprehospitalization.PatientPreHospitalizationMapper;
import com.xinelu.manage.service.patientprehospitalization.IPatientPreHospitalizationService;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author haown
* @description 针对表patient_pre_hospitalization(预住院患者表)的数据库操作Service实现
* @createDate 2024-03-08 10:25:39
*/
* @author haown
* @description 针对表patient_pre_hospitalization(预住院患者表)的数据库操作Service实现
* @createDate 2024-03-08 10:25:39
*/
@Service
public class PatientPreHospitalizationServiceImpl implements IPatientPreHospitalizationService {
@Resource
private PatientPreHospitalizationMapper preHospitalizationMapper;
@Resource
private PatientPreHospitalizationMapper preHospitalizationMapper;
@Resource
private PatientInfoMapper patientInfoMapper;
@Resource
private PatientInfoMapper patientInfoMapper;
@Resource
private AgencyMapper agencyMapper;
@Resource
private AgencyMapper agencyMapper;
@Resource
private DepartmentMapper departmentMapper;
@Resource
private DepartmentMapper departmentMapper;
@Resource
private RegexUtil regexUtil;
@Resource
private RegexUtil regexUtil;
@Override public int insert(PatientPreHospitalization preHospitalization) {
// 根据身份证号查询是否有患者信息
PatientInfoDto patientInfoDto = new PatientInfoDto();
patientInfoDto.setCardNo(preHospitalization.getCardNo());
List<PatientInfo> patientList = patientInfoMapper.selectPatientInfoList(patientInfoDto);
if (CollectionUtils.isEmpty(patientList)) {
// 保存患者信息
PatientInfo patientInfo = new PatientInfo();
BeanUtils.copyBeanProp(patientInfo, preHospitalization);
patientInfo.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
patientInfo.setCreateTime(DateUtils.getNowDate());
patientInfo.setDelFlag(0);
patientInfo.setPatientType(PatientTypeConstants.PRE_HOSPITALIZED_PATIENT);
patientInfoMapper.insertPatientInfo(patientInfo);
preHospitalization.setPatientId(patientInfo.getId());
} else {
// 修改患者信息
PatientInfo patientInfo = patientList.get(0);
BeanUtils.copyBeanProp(patientInfo, preHospitalization);
patientInfo.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName());
patientInfo.setUpdateTime(DateUtils.getNowDate());
patientInfo.setDelFlag(0);
patientInfo.setPatientType(PatientTypeConstants.PRE_HOSPITALIZED_PATIENT);
patientInfoMapper.updatePatientInfo(patientInfo);
preHospitalization.setPatientId(patientList.get(0).getId());
}
// 保存预住院信息
preHospitalization.setDelFlag(0);
preHospitalization.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
preHospitalization.setCreateTime(DateUtils.getNowDate());
return preHospitalizationMapper.insertSelective(preHospitalization);
}
@Override
public int insert(PatientPreHospitalization preHospitalization) {
// 根据身份证号查询是否有患者信息
PatientInfoDto patientInfoDto = new PatientInfoDto();
patientInfoDto.setCardNo(preHospitalization.getCardNo());
List<PatientInfo> patientList = patientInfoMapper.selectPatientInfoList(patientInfoDto);
if (CollectionUtils.isEmpty(patientList)) {
// 保存患者信息
PatientInfo patientInfo = new PatientInfo();
BeanUtils.copyBeanProp(patientInfo, preHospitalization);
patientInfo.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
patientInfo.setCreateTime(LocalDateTime.now());
patientInfo.setDelFlag(0);
patientInfo.setPatientType(PatientTypeConstants.PRE_HOSPITALIZED_PATIENT);
patientInfoMapper.insertPatientInfo(patientInfo);
preHospitalization.setPatientId(patientInfo.getId());
} else {
// 修改患者信息
PatientInfo patientInfo = patientList.get(0);
BeanUtils.copyBeanProp(patientInfo, preHospitalization);
patientInfo.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName());
patientInfo.setUpdateTime(LocalDateTime.now());
patientInfo.setDelFlag(0);
patientInfo.setPatientType(PatientTypeConstants.PRE_HOSPITALIZED_PATIENT);
patientInfoMapper.updatePatientInfo(patientInfo);
preHospitalization.setPatientId(patientList.get(0).getId());
}
// 保存预住院信息
preHospitalization.setDelFlag(0);
preHospitalization.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
preHospitalization.setCreateTime(LocalDateTime.now());
return preHospitalizationMapper.insertSelective(preHospitalization);
}
@Override public List<PatientPreHospitalization> selectList(PatientInfoDto patientInfo) {
return preHospitalizationMapper.selectList(patientInfo);
}
@Override
public List<PatientPreHospitalization> selectList(PatientInfoDto patientInfo) {
return preHospitalizationMapper.selectList(patientInfo);
}
@Override public int update(PatientPreHospitalization preHospitalization) {
// 修改患者信息
PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(preHospitalization.getPatientId());
Long patientId = patientInfo.getId();
BeanUtils.copyBeanProp(patientInfo, preHospitalization);
patientInfo.setId(patientId);
int flag = patientInfoMapper.updatePatientInfo(patientInfo);
if (flag >= 0) {
return preHospitalizationMapper.updateByPrimaryKeySelective(preHospitalization);
}
return -1;
}
@Override
public int update(PatientPreHospitalization preHospitalization) {
// 修改患者信息
PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(preHospitalization.getPatientId());
Long patientId = patientInfo.getId();
BeanUtils.copyBeanProp(patientInfo, preHospitalization);
patientInfo.setId(patientId);
int flag = patientInfoMapper.updatePatientInfo(patientInfo);
if (flag >= 0) {
return preHospitalizationMapper.updateByPrimaryKeySelective(preHospitalization);
}
return -1;
}
@Override public int deleteByIds(Long[] ids) {
return preHospitalizationMapper.deleteByIds(ids);
}
@Override
public int deleteByIds(Long[] ids) {
return preHospitalizationMapper.deleteByIds(ids);
}
@Override public PatientPreHospitalization getById(Long id) {
return preHospitalizationMapper.selectByPrimaryKey(id);
}
@Override
public PatientPreHospitalization getById(Long id) {
return preHospitalizationMapper.selectByPrimaryKey(id);
}
@Override public AjaxResult importList(List<PatientPreHospitalization> patientList) {
//判断添加的数据是否为空
if (CollectionUtils.isEmpty(patientList)) {
return AjaxResult.error("请添加预住院患者导入信息!");
}
// 根据患者身份证号做去重处理
List<PatientPreHospitalization> importDataList = patientList.stream().filter(item -> StringUtils.isNotBlank(item.getCardNo())).distinct().collect(Collectors.toList());
// 校验联系电话格式是否正确
PatientPreHospitalization patient = importDataList.stream().filter(item -> StringUtils.isNotBlank(item.getPatientPhone())).filter(item -> BooleanUtils.isFalse(regexUtil.regexPhone(item.getPatientPhone()))).findFirst().orElse(new PatientPreHospitalization());
if (StringUtils.isNotBlank(patient.getPatientPhone())) {
return AjaxResult.error("当前患者联系电话:" + patient.getPatientPhone() + " 格式不正确,请重新录入!");
}
List<PatientPreHospitalization> saveList = new ArrayList<>();
for (PatientPreHospitalization item : importDataList) {
PatientPreHospitalization preHospitalization = new PatientPreHospitalization();
BeanUtils.copyProperties(item, preHospitalization);
// 根据医院名称查询医院id
Agency agency = new Agency();
if (StringUtils.isNotBlank(item.getHospitalAgencyName())) {
agency.setAgencyName(item.getHospitalAgencyName());
agency.setNodeType(NodeTypeConstants.HOSPITAL);
List<Agency> agencyList = agencyMapper.selectAgencyList(agency);
if (CollectionUtils.isNotEmpty(agencyList)) {
preHospitalization.setHospitalAgencyId(agencyList.get(0).getId());
}
} else {
preHospitalization.setHospitalAgencyId(SecurityUtils.getLoginUser().getUser().getAgencyId());
Agency agencyData = agencyMapper.selectAgencyById(SecurityUtils.getLoginUser().getUser().getAgencyId());
if (ObjectUtils.isNotEmpty(agencyData)) {
preHospitalization.setHospitalAgencyName(agencyData.getAgencyName());
}
}
// 查询院区id
if (StringUtils.isNotBlank(item.getCampusAgencyName())) {
agency.setAgencyName(item.getWardName());
agency.setNodeType(NodeTypeConstants.CAMPUS);
List<Agency> campusList = agencyMapper.selectAgencyList(agency);
if (CollectionUtils.isNotEmpty(campusList)) {
preHospitalization.setCampusAgencyId(campusList.get(0).getId());
}
}
@Override
public AjaxResult importList(List<PatientPreHospitalization> patientList) {
//判断添加的数据是否为空
if (CollectionUtils.isEmpty(patientList)) {
return AjaxResult.error("请添加预住院患者导入信息!");
}
// 根据患者身份证号做去重处理
List<PatientPreHospitalization> importDataList = patientList.stream().filter(item -> StringUtils.isNotBlank(item.getCardNo())).distinct().collect(Collectors.toList());
// 校验联系电话格式是否正确
PatientPreHospitalization patient = importDataList.stream().filter(item -> StringUtils.isNotBlank(item.getPatientPhone())).filter(item -> BooleanUtils.isFalse(regexUtil.regexPhone(item.getPatientPhone()))).findFirst().orElse(new PatientPreHospitalization());
if (StringUtils.isNotBlank(patient.getPatientPhone())) {
return AjaxResult.error("当前患者联系电话:" + patient.getPatientPhone() + " 格式不正确,请重新录入!");
}
List<PatientPreHospitalization> saveList = new ArrayList<>();
for (PatientPreHospitalization item : importDataList) {
PatientPreHospitalization preHospitalization = new PatientPreHospitalization();
BeanUtils.copyProperties(item, preHospitalization);
// 根据医院名称查询医院id
Agency agency = new Agency();
if (StringUtils.isNotBlank(item.getHospitalAgencyName())) {
agency.setAgencyName(item.getHospitalAgencyName());
agency.setNodeType(NodeTypeConstants.HOSPITAL);
List<Agency> agencyList = agencyMapper.selectAgencyList(agency);
if (CollectionUtils.isNotEmpty(agencyList)) {
preHospitalization.setHospitalAgencyId(agencyList.get(0).getId());
}
} else {
preHospitalization.setHospitalAgencyId(SecurityUtils.getLoginUser().getUser().getAgencyId());
Agency agencyData = agencyMapper.selectAgencyById(SecurityUtils.getLoginUser().getUser().getAgencyId());
if (ObjectUtils.isNotEmpty(agencyData)) {
preHospitalization.setHospitalAgencyName(agencyData.getAgencyName());
}
}
// 查询院区id
if (StringUtils.isNotBlank(item.getCampusAgencyName())) {
agency.setAgencyName(item.getWardName());
agency.setNodeType(NodeTypeConstants.CAMPUS);
List<Agency> campusList = agencyMapper.selectAgencyList(agency);
if (CollectionUtils.isNotEmpty(campusList)) {
preHospitalization.setCampusAgencyId(campusList.get(0).getId());
}
}
// 查询科室id
Department department = new Department();
if (StringUtils.isNotBlank(item.getDepartmentName())) {
department.setAgencyName(item.getHospitalAgencyName());
department.setDepartmentName(item.getDepartmentName());
department.setNodeType(NodeTypeConstants.DEPARTMENT);
List<Department> deptList = departmentMapper.selectDepartmentList(department);
if (CollectionUtils.isNotEmpty(deptList)) {
preHospitalization.setDepartmentId(deptList.get(0).getId());
}
} else {
preHospitalization.setDepartmentId(SecurityUtils.getLoginUser().getUser().getDepartmentId());
Department department1 = departmentMapper.selectDepartmentById(SecurityUtils.getLoginUser().getUser().getDepartmentId());
if (ObjectUtils.isNotEmpty(department1)) {
preHospitalization.setDepartmentName(department1.getDepartmentName());
}
}
// 查询病区
if (StringUtils.isNotBlank(item.getWardName())) {
department.setAgencyName(item.getHospitalAgencyName());
department.setDepartmentName(item.getWardName());
department.setNodeType(NodeTypeConstants.WARD);
List<Department> deptList = departmentMapper.selectDepartmentList(department);
if (CollectionUtils.isNotEmpty(deptList)) {
preHospitalization.setWardId(deptList.get(0).getId());
}
}
// 查询科室id
Department department = new Department();
if (StringUtils.isNotBlank(item.getDepartmentName())) {
department.setAgencyName(item.getHospitalAgencyName());
department.setDepartmentName(item.getDepartmentName());
department.setNodeType(NodeTypeConstants.DEPARTMENT);
List<Department> deptList = departmentMapper.selectDepartmentList(department);
if (CollectionUtils.isNotEmpty(deptList)) {
preHospitalization.setDepartmentId(deptList.get(0).getId());
}
} else {
preHospitalization.setDepartmentId(SecurityUtils.getLoginUser().getUser().getDepartmentId());
Department department1 = departmentMapper.selectDepartmentById(SecurityUtils.getLoginUser().getUser().getDepartmentId());
if (ObjectUtils.isNotEmpty(department1)) {
preHospitalization.setDepartmentName(department1.getDepartmentName());
}
}
// 查询病区
if (StringUtils.isNotBlank(item.getWardName())) {
department.setAgencyName(item.getHospitalAgencyName());
department.setDepartmentName(item.getWardName());
department.setNodeType(NodeTypeConstants.WARD);
List<Department> deptList = departmentMapper.selectDepartmentList(department);
if (CollectionUtils.isNotEmpty(deptList)) {
preHospitalization.setWardId(deptList.get(0).getId());
}
}
preHospitalization.setCreateTime(DateUtils.getNowDate());
preHospitalization.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
preHospitalization.setCreateTime(LocalDateTime.now());
preHospitalization.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
// 根据身份证号查询患者信息
PatientInfoDto patientQuery = new PatientInfoDto();
patientQuery.setCardNo(item.getCardNo());
List<PatientInfo> patientInfoList = patientInfoMapper.selectPatientInfoList(patientQuery);
if (CollectionUtils.isNotEmpty(patientInfoList)) {
// 修改居民信息
PatientInfo updInfo = patientInfoList.get(0);
BeanUtils.copyBeanProp(updInfo, item);
patientInfoMapper.updatePatientInfo(updInfo);
preHospitalization.setPatientId(patientInfoList.get(0).getId());
} else {
PatientInfo saveInfo = new PatientInfo();
// 添加居民
BeanUtils.copyBeanProp(saveInfo, item);
patientInfoMapper.insertPatientInfo(saveInfo);
preHospitalization.setPatientId(saveInfo.getId());
}
// 根据患者身份证号和预约时间查询是否有记录
PatientPreHospitalization preHospitalizationQuery = new PatientPreHospitalization();
preHospitalizationQuery.setCardNo(item.getCardNo());
preHospitalizationQuery.setAppointmentDate(item.getAppointmentDate());
List<PatientPreHospitalization> list = preHospitalizationMapper.selectApplyList(preHospitalizationQuery);
if (CollectionUtils.isEmpty(list)) {
// 新增
saveList.add(preHospitalization);
} else {
// 有预约信息暂时不导入
}
}
int insertCount = preHospitalizationMapper.insertBatch(saveList);
if (insertCount <= 0) {
throw new ServiceException("导入预住院信息失败,请联系管理员!");
}
return AjaxResult.success();
}
// 根据身份证号查询患者信息
PatientInfoDto patientQuery = new PatientInfoDto();
patientQuery.setCardNo(item.getCardNo());
List<PatientInfo> patientInfoList = patientInfoMapper.selectPatientInfoList(patientQuery);
if (CollectionUtils.isNotEmpty(patientInfoList)) {
// 修改居民信息
PatientInfo updInfo = patientInfoList.get(0);
BeanUtils.copyBeanProp(updInfo, item);
patientInfoMapper.updatePatientInfo(updInfo);
preHospitalization.setPatientId(patientInfoList.get(0).getId());
} else {
PatientInfo saveInfo = new PatientInfo();
// 添加居民
BeanUtils.copyBeanProp(saveInfo, item);
patientInfoMapper.insertPatientInfo(saveInfo);
preHospitalization.setPatientId(saveInfo.getId());
}
// 根据患者身份证号和预约时间查询是否有记录
PatientPreHospitalization preHospitalizationQuery = new PatientPreHospitalization();
preHospitalizationQuery.setCardNo(item.getCardNo());
preHospitalizationQuery.setAppointmentDate(item.getAppointmentDate());
List<PatientPreHospitalization> list = preHospitalizationMapper.selectApplyList(preHospitalizationQuery);
if (CollectionUtils.isEmpty(list)) {
// 新增
saveList.add(preHospitalization);
} else {
// 有预约信息暂时不导入
}
}
int insertCount = preHospitalizationMapper.insertBatch(saveList);
if (insertCount <= 0) {
throw new ServiceException("导入预住院信息失败,请联系管理员!");
}
return AjaxResult.success();
}
}

View File

@ -1,12 +1,13 @@
package com.xinelu.manage.service.patientpropaganda.impl;
import java.util.List;
import com.xinelu.common.utils.DateUtils;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.xinelu.manage.mapper.patientpropaganda.PatientPropagandaMapper;
import com.xinelu.manage.domain.patientpropaganda.PatientPropaganda;
import com.xinelu.manage.mapper.patientpropaganda.PatientPropagandaMapper;
import com.xinelu.manage.service.patientpropaganda.IPatientPropagandaService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
/**
* 患者宣教信息Service业务层处理
@ -49,8 +50,8 @@ public class PatientPropagandaServiceImpl implements IPatientPropagandaService {
*/
@Override
public int insertPatientPropaganda(PatientPropaganda patientPropaganda) {
patientPropaganda.setCreateTime(DateUtils.getNowDate());
return patientPropagandaMapper.insertPatientPropaganda(patientPropaganda);
patientPropaganda.setCreateTime(LocalDateTime.now());
return patientPropagandaMapper.insertPatientPropaganda(patientPropaganda);
}
/**
@ -61,7 +62,7 @@ public class PatientPropagandaServiceImpl implements IPatientPropagandaService {
*/
@Override
public int updatePatientPropaganda(PatientPropaganda patientPropaganda) {
patientPropaganda.setUpdateTime(DateUtils.getNowDate());
patientPropaganda.setUpdateTime(LocalDateTime.now());
return patientPropagandaMapper.updatePatientPropaganda(patientPropaganda);
}

View File

@ -1,14 +1,15 @@
package com.xinelu.manage.service.patientvisitinhospital.impl;
import java.util.List;
import com.xinelu.common.utils.DateUtils;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.xinelu.manage.mapper.patientvisitinhospital.PatientVisitInHospitalMapper;
import com.xinelu.manage.domain.patientvisitinhospital.PatientVisitInHospital;
import com.xinelu.manage.mapper.patientvisitinhospital.PatientVisitInHospitalMapper;
import com.xinelu.manage.service.patientvisitinhospital.IPatientVisitInHospitalService;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
/**
* 患者就诊入院记录信息Service业务层处理
*
@ -31,17 +32,18 @@ public class PatientVisitInHospitalServiceImpl implements IPatientVisitInHospita
return patientVisitInHospitalMapper.selectPatientVisitInHospitalById(id);
}
@Override public PatientVisitInHospital getByVisitRecord(Long patientVisitRecordId) {
PatientVisitInHospital patientVisitInHospital = new PatientVisitInHospital();
patientVisitInHospital.setPatientVisitRecordId(patientVisitRecordId);
List<PatientVisitInHospital> list = patientVisitInHospitalMapper.selectPatientVisitInHospitalList(patientVisitInHospital);
if (CollectionUtils.isEmpty(list)) {
return null;
}
return list.get(0);
}
@Override
public PatientVisitInHospital getByVisitRecord(Long patientVisitRecordId) {
PatientVisitInHospital patientVisitInHospital = new PatientVisitInHospital();
patientVisitInHospital.setPatientVisitRecordId(patientVisitRecordId);
List<PatientVisitInHospital> list = patientVisitInHospitalMapper.selectPatientVisitInHospitalList(patientVisitInHospital);
if (CollectionUtils.isEmpty(list)) {
return null;
}
return list.get(0);
}
/**
/**
* 查询患者就诊入院记录信息列表
*
* @param patientVisitInHospital 患者就诊入院记录信息
@ -60,8 +62,8 @@ public class PatientVisitInHospitalServiceImpl implements IPatientVisitInHospita
*/
@Override
public int insertPatientVisitInHospital(PatientVisitInHospital patientVisitInHospital) {
patientVisitInHospital.setCreateTime(DateUtils.getNowDate());
return patientVisitInHospitalMapper.insertPatientVisitInHospital(patientVisitInHospital);
patientVisitInHospital.setCreateTime(LocalDateTime.now());
return patientVisitInHospitalMapper.insertPatientVisitInHospital(patientVisitInHospital);
}
/**
@ -72,7 +74,7 @@ public class PatientVisitInHospitalServiceImpl implements IPatientVisitInHospita
*/
@Override
public int updatePatientVisitInHospital(PatientVisitInHospital patientVisitInHospital) {
patientVisitInHospital.setUpdateTime(DateUtils.getNowDate());
patientVisitInHospital.setUpdateTime(LocalDateTime.now());
return patientVisitInHospitalMapper.updatePatientVisitInHospital(patientVisitInHospital);
}

View File

@ -1,14 +1,15 @@
package com.xinelu.manage.service.patientvisitoperation.impl;
import java.util.List;
import com.xinelu.common.utils.DateUtils;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.xinelu.manage.mapper.patientvisitoperation.PatientVisitOperationMapper;
import com.xinelu.manage.domain.patientvisitoperation.PatientVisitOperation;
import com.xinelu.manage.mapper.patientvisitoperation.PatientVisitOperationMapper;
import com.xinelu.manage.service.patientvisitoperation.IPatientVisitOperationService;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
/**
* 患者就诊手术记录信息Service业务层处理
*
@ -42,17 +43,18 @@ public class PatientVisitOperationServiceImpl implements IPatientVisitOperationS
return patientVisitOperationMapper.selectPatientVisitOperationList(patientVisitOperation);
}
@Override public PatientVisitOperation getByVisitRecord(Long patientVisitRecordId) {
PatientVisitOperation patientVisitOperation = new PatientVisitOperation();
patientVisitOperation.setPatientVisitRecordId(patientVisitRecordId);
List<PatientVisitOperation> operations = patientVisitOperationMapper.selectPatientVisitOperationList(patientVisitOperation);
if (CollectionUtils.isEmpty(operations)) {
return null;
}
return operations.get(0);
}
@Override
public PatientVisitOperation getByVisitRecord(Long patientVisitRecordId) {
PatientVisitOperation patientVisitOperation = new PatientVisitOperation();
patientVisitOperation.setPatientVisitRecordId(patientVisitRecordId);
List<PatientVisitOperation> operations = patientVisitOperationMapper.selectPatientVisitOperationList(patientVisitOperation);
if (CollectionUtils.isEmpty(operations)) {
return null;
}
return operations.get(0);
}
/**
/**
* 新增患者就诊手术记录信息
*
* @param patientVisitOperation 患者就诊手术记录信息
@ -60,8 +62,8 @@ public class PatientVisitOperationServiceImpl implements IPatientVisitOperationS
*/
@Override
public int insertPatientVisitOperation(PatientVisitOperation patientVisitOperation) {
patientVisitOperation.setCreateTime(DateUtils.getNowDate());
return patientVisitOperationMapper.insertPatientVisitOperation(patientVisitOperation);
patientVisitOperation.setCreateTime(LocalDateTime.now());
return patientVisitOperationMapper.insertPatientVisitOperation(patientVisitOperation);
}
/**
@ -72,7 +74,7 @@ public class PatientVisitOperationServiceImpl implements IPatientVisitOperationS
*/
@Override
public int updatePatientVisitOperation(PatientVisitOperation patientVisitOperation) {
patientVisitOperation.setUpdateTime(DateUtils.getNowDate());
patientVisitOperation.setUpdateTime(LocalDateTime.now());
return patientVisitOperationMapper.updatePatientVisitOperation(patientVisitOperation);
}

View File

@ -1,14 +1,16 @@
package com.xinelu.manage.service.patientvisitouthospital.impl;
import java.util.List;
import com.xinelu.common.utils.DateUtils;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.xinelu.manage.mapper.patientvisitouthospital.PatientVisitOutHospitalMapper;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.manage.domain.patientvisitouthospital.PatientVisitOutHospital;
import com.xinelu.manage.mapper.patientvisitouthospital.PatientVisitOutHospitalMapper;
import com.xinelu.manage.service.patientvisitouthospital.IPatientVisitOutHospitalService;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
/**
* 患者就诊出院记录信息Service业务层处理
*
@ -42,17 +44,18 @@ public class PatientVisitOutHospitalServiceImpl implements IPatientVisitOutHospi
return patientVisitOutHospitalMapper.selectPatientVisitOutHospitalList(patientVisitOutHospital);
}
@Override public PatientVisitOutHospital getByVisitRecord(Long patientVisitRecordId) {
PatientVisitOutHospital patientVisitOutHospital = new PatientVisitOutHospital();
patientVisitOutHospital.setPatientVisitRecordId(patientVisitRecordId);
List<PatientVisitOutHospital> list = patientVisitOutHospitalMapper.selectPatientVisitOutHospitalList(patientVisitOutHospital);
if (CollectionUtils.isEmpty(list)) {
return null;
}
return list.get(0);
}
@Override
public PatientVisitOutHospital getByVisitRecord(Long patientVisitRecordId) {
PatientVisitOutHospital patientVisitOutHospital = new PatientVisitOutHospital();
patientVisitOutHospital.setPatientVisitRecordId(patientVisitRecordId);
List<PatientVisitOutHospital> list = patientVisitOutHospitalMapper.selectPatientVisitOutHospitalList(patientVisitOutHospital);
if (CollectionUtils.isEmpty(list)) {
return null;
}
return list.get(0);
}
/**
/**
* 新增患者就诊出院记录信息
*
* @param patientVisitOutHospital 患者就诊出院记录信息
@ -60,8 +63,8 @@ public class PatientVisitOutHospitalServiceImpl implements IPatientVisitOutHospi
*/
@Override
public int insertPatientVisitOutHospital(PatientVisitOutHospital patientVisitOutHospital) {
patientVisitOutHospital.setCreateTime(DateUtils.getNowDate());
return patientVisitOutHospitalMapper.insertPatientVisitOutHospital(patientVisitOutHospital);
patientVisitOutHospital.setCreateTime(LocalDateTime.now());
return patientVisitOutHospitalMapper.insertPatientVisitOutHospital(patientVisitOutHospital);
}
/**
@ -72,7 +75,7 @@ public class PatientVisitOutHospitalServiceImpl implements IPatientVisitOutHospi
*/
@Override
public int updatePatientVisitOutHospital(PatientVisitOutHospital patientVisitOutHospital) {
patientVisitOutHospital.setUpdateTime(DateUtils.getNowDate());
patientVisitOutHospital.setUpdateTime(LocalDateTime.now());
return patientVisitOutHospitalMapper.updatePatientVisitOutHospital(patientVisitOutHospital);
}

View File

@ -89,6 +89,23 @@ public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService
return patientVisitRecordMapper.insertPatientVisitRecord(patientVisitRecord);
}
@Override
public int saveRecord(PatientVisitRecordSaveDto saveDto) {
PatientVisitRecord patientVisitRecord = new PatientVisitRecord();
// 查询患者信息
PatientInfo patientInfo = patientMapper.selectPatientInfoById(saveDto.getPatientId());
BeanUtils.copyBeanProp(patientVisitRecord, patientInfo);
BeanUtils.copyBeanProp(patientVisitRecord, saveDto);
patientVisitRecord.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
patientVisitRecord.setCreateTime(LocalDateTime.now());
// 住院时间出院时间-入院时间
LocalDate admissionTime = saveDto.getAdmissionTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
LocalDate dischargeTime = saveDto.getDischargeTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
long daysBetween = ChronoUnit.DAYS.between(admissionTime, dischargeTime);
patientVisitRecord.setHospitalizationDays((int) daysBetween + 1);
patientVisitRecordMapper.insertPatientVisitRecord(patientVisitRecord);
return 0;
}
@Override public int saveRecord(PatientVisitRecordSaveDto saveDto) {
PatientVisitRecord patientVisitRecord = new PatientVisitRecord();
// 查询患者信息
@ -106,7 +123,7 @@ public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService
return patientVisitRecordMapper.insertPatientVisitRecord(patientVisitRecord);
}
/**
/**
* 修改患者就诊记录基本信息
*
* @param updDto 患者就诊记录基本信息
@ -114,16 +131,16 @@ public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService
*/
@Override
public int updatePatientVisitRecord(PatientVisitRecordSaveDto updDto) {
PatientVisitRecord patientVisitRecord = new PatientVisitRecord();
BeanUtils.copyBeanProp(patientVisitRecord, updDto);
patientVisitRecord.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName());
patientVisitRecord.setUpdateTime(DateUtils.getNowDate());
// 住院时间出院时间-入院时间
LocalDate admissionTime = updDto.getAdmissionTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
LocalDate dischargeTime = updDto.getDischargeTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
long daysBetween = ChronoUnit.DAYS.between(admissionTime, dischargeTime);
patientVisitRecord.setHospitalizationDays((int) daysBetween + 1);
patientVisitRecordMapper.insertPatientVisitRecord(patientVisitRecord);
PatientVisitRecord patientVisitRecord = new PatientVisitRecord();
BeanUtils.copyBeanProp(patientVisitRecord, updDto);
patientVisitRecord.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName());
patientVisitRecord.setUpdateTime(LocalDateTime.now());
// 住院时间出院时间-入院时间
LocalDate admissionTime = updDto.getAdmissionTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
LocalDate dischargeTime = updDto.getDischargeTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
long daysBetween = ChronoUnit.DAYS.between(admissionTime, dischargeTime);
patientVisitRecord.setHospitalizationDays((int) daysBetween + 1);
patientVisitRecordMapper.insertPatientVisitRecord(patientVisitRecord);
return patientVisitRecordMapper.updatePatientVisitRecord(patientVisitRecord);
}
@ -276,5 +293,4 @@ public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService
}
return AjaxResult.success();
}
}

View File

@ -1,17 +1,18 @@
package com.xinelu.manage.service.project.impl;
import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.common.utils.StringUtils;
import com.xinelu.manage.domain.project.Project;
import com.xinelu.manage.mapper.project.ProjectMapper;
import com.xinelu.manage.service.project.IProjectService;
import java.util.List;
import javax.annotation.Resource;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
/**
* 检测项目Service业务层处理
*
@ -53,21 +54,21 @@ public class ProjectServiceImpl implements IProjectService {
*/
@Override
public int insertProject(Project project) {
if (StringUtils.isBlank(project.getProjectName())) {
throw new ServiceException("请输入检测项目名称");
}
if (StringUtils.isBlank(project.getProjectCode())) {
throw new ServiceException("请输入检测项目编码");
}
// 查询是否有相同code的检测项目
List<Project> projects = projectMapper.hasSameCodeProject(null, project.getGroupId(), project.getProjectCode());
if (CollectionUtils.isNotEmpty(projects)) {
throw new ServiceException("已存在编码为【"+project.getProjectCode() +"】的检测项目");
}
project.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
project.setCreateTime(DateUtils.getNowDate());
project.setDelFlag(0);
return projectMapper.insertProject(project);
if (StringUtils.isBlank(project.getProjectName())) {
throw new ServiceException("请输入检测项目名称");
}
if (StringUtils.isBlank(project.getProjectCode())) {
throw new ServiceException("请输入检测项目编码");
}
// 查询是否有相同code的检测项目
List<Project> projects = projectMapper.hasSameCodeProject(null, project.getGroupId(), project.getProjectCode());
if (CollectionUtils.isNotEmpty(projects)) {
throw new ServiceException("已存在编码为【" + project.getProjectCode() + "】的检测项目");
}
project.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
project.setCreateTime(LocalDateTime.now());
project.setDelFlag(0);
return projectMapper.insertProject(project);
}
/**
@ -78,13 +79,13 @@ public class ProjectServiceImpl implements IProjectService {
*/
@Override
public int updateProject(Project project) {
// 查询是否有相同code的检测项目
List<Project> projects = projectMapper.hasSameCodeProject(project.getId(), project.getGroupId(), project.getProjectCode());
if (CollectionUtils.isNotEmpty(projects)) {
throw new ServiceException("已存在编码为【"+project.getProjectCode() +"】的检测项目");
}
project.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName());
project.setUpdateTime(DateUtils.getNowDate());
// 查询是否有相同code的检测项目
List<Project> projects = projectMapper.hasSameCodeProject(project.getId(), project.getGroupId(), project.getProjectCode());
if (CollectionUtils.isNotEmpty(projects)) {
throw new ServiceException("已存在编码为【" + project.getProjectCode() + "】的检测项目");
}
project.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName());
project.setUpdateTime(LocalDateTime.now());
return projectMapper.updateProject(project);
}

View File

@ -8,6 +8,8 @@ import com.xinelu.common.utils.StringUtils;
import com.xinelu.manage.domain.projectdevice.ProjectDevice;
import com.xinelu.manage.mapper.projectdevice.ProjectDeviceMapper;
import com.xinelu.manage.service.projectdevice.IProjectDeviceService;
import java.time.LocalDateTime;
import java.util.List;
import javax.annotation.Resource;
import org.apache.commons.collections4.CollectionUtils;
@ -74,9 +76,9 @@ public class ProjectDeviceServiceImpl implements IProjectDeviceService {
throw new ServiceException("该设备已被绑定,请解绑后重新绑定");
}
projectDevice.setDeviceStatus(DeviceStatusConstants.BIND);
projectDevice.setDeviceBindTime(DateUtils.getNowDate());
projectDevice.setDeviceBindTime(LocalDateTime.now());
projectDevice.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
projectDevice.setCreateTime(DateUtils.getNowDate());
projectDevice.setCreateTime(LocalDateTime.now());
return projectDeviceMapper.insertProjectDevice(projectDevice);
}
@ -89,7 +91,7 @@ public class ProjectDeviceServiceImpl implements IProjectDeviceService {
@Override
public int updateProjectDevice(ProjectDevice projectDevice) {
projectDevice.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName());
projectDevice.setUpdateTime(DateUtils.getNowDate());
projectDevice.setUpdateTime(LocalDateTime.now());
return projectDeviceMapper.updateProjectDevice(projectDevice);
}

View File

@ -1,19 +1,20 @@
package com.xinelu.manage.service.projectgroup.impl;
import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.common.utils.StringUtils;
import com.xinelu.manage.domain.projectgroup.ProjectGroup;
import com.xinelu.manage.dto.projectgroup.ProjectGroupSaveListDto;
import com.xinelu.manage.mapper.projectgroup.ProjectGroupMapper;
import com.xinelu.manage.service.projectgroup.IProjectGroupService;
import java.util.List;
import javax.annotation.Resource;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
/**
* 检测项目分组Service业务层处理
*
@ -47,7 +48,7 @@ public class ProjectGroupServiceImpl implements IProjectGroupService {
return projectGroupMapper.selectProjectGroupList(projectGroup);
}
/**
/**
* 新增检测项目分组
*
* @param projectGroup 检测项目分组
@ -55,47 +56,48 @@ public class ProjectGroupServiceImpl implements IProjectGroupService {
*/
@Override
public int insertProjectGroup(ProjectGroup projectGroup) {
if (StringUtils.isBlank(projectGroup.getGroupName())) {
throw new ServiceException("请输入检测项目分组名称");
}
if (StringUtils.isBlank(projectGroup.getGroupCode())) {
throw new ServiceException("请输入检测项目分组编码");
}
// 查询是否有相同编码的项目组
List<ProjectGroup> list = projectGroupMapper.hasSameCodeGroup(null, projectGroup.getGroupCode());
if (CollectionUtils.isNotEmpty(list)) {
throw new ServiceException("已存在编码为【"+projectGroup.getGroupCode() +"】的分组");
}
projectGroup.setCreateTime(DateUtils.getNowDate());
projectGroup.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
projectGroup.setDelFlag(0);
if (StringUtils.isBlank(projectGroup.getGroupName())) {
throw new ServiceException("请输入检测项目分组名称");
}
if (StringUtils.isBlank(projectGroup.getGroupCode())) {
throw new ServiceException("请输入检测项目分组编码");
}
// 查询是否有相同编码的项目组
List<ProjectGroup> list = projectGroupMapper.hasSameCodeGroup(null, projectGroup.getGroupCode());
if (CollectionUtils.isNotEmpty(list)) {
throw new ServiceException("已存在编码为【" + projectGroup.getGroupCode() + "】的分组");
}
projectGroup.setCreateTime(LocalDateTime.now());
projectGroup.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
projectGroup.setDelFlag(0);
return projectGroupMapper.insertProjectGroup(projectGroup);
}
@Override public int insertList(ProjectGroupSaveListDto saveDto) {
if (ObjectUtils.isNotEmpty(saveDto)) {
List<ProjectGroup> list = saveDto.getList();
if (CollectionUtils.isNotEmpty(list)) {
for (ProjectGroup projectGroup : list) {
// 查询是否有相同编码的项目组
List<ProjectGroup> groupList = projectGroupMapper.hasSameCodeGroup(null, projectGroup.getGroupCode());
if (CollectionUtils.isNotEmpty(groupList)) {
throw new ServiceException("已存在编码为【"+projectGroup.getGroupCode() +"】的分组");
}
projectGroup.setCreateTime(DateUtils.getNowDate());
projectGroup.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
projectGroup.setDelFlag(0);
}
return projectGroupMapper.insertBatch(list);
} else {
throw new ServiceException("传输数据错误");
}
} else {
throw new ServiceException("传输数据错误");
}
}
@Override
public int insertList(ProjectGroupSaveListDto saveDto) {
if (ObjectUtils.isNotEmpty(saveDto)) {
List<ProjectGroup> list = saveDto.getList();
if (CollectionUtils.isNotEmpty(list)) {
for (ProjectGroup projectGroup : list) {
// 查询是否有相同编码的项目组
List<ProjectGroup> groupList = projectGroupMapper.hasSameCodeGroup(null, projectGroup.getGroupCode());
if (CollectionUtils.isNotEmpty(groupList)) {
throw new ServiceException("已存在编码为【" + projectGroup.getGroupCode() + "】的分组");
}
projectGroup.setCreateTime(LocalDateTime.now());
projectGroup.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
projectGroup.setDelFlag(0);
}
return projectGroupMapper.insertBatch(list);
} else {
throw new ServiceException("传输数据错误");
}
} else {
throw new ServiceException("传输数据错误");
}
}
/**
/**
* 修改检测项目分组
*
* @param projectGroup 检测项目分组
@ -103,13 +105,13 @@ public class ProjectGroupServiceImpl implements IProjectGroupService {
*/
@Override
public int updateProjectGroup(ProjectGroup projectGroup) {
// 查询是否有相同编码的项目组
List<ProjectGroup> groupList = projectGroupMapper.hasSameCodeGroup(projectGroup.getId(), projectGroup.getGroupCode());
if (CollectionUtils.isNotEmpty(groupList)) {
throw new ServiceException("已存在编码为【"+projectGroup.getGroupCode() +"】的分组");
}
projectGroup.setUpdateTime(DateUtils.getNowDate());
projectGroup.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName());
// 查询是否有相同编码的项目组
List<ProjectGroup> groupList = projectGroupMapper.hasSameCodeGroup(projectGroup.getId(), projectGroup.getGroupCode());
if (CollectionUtils.isNotEmpty(groupList)) {
throw new ServiceException("已存在编码为【" + projectGroup.getGroupCode() + "】的分组");
}
projectGroup.setUpdateTime(LocalDateTime.now());
projectGroup.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName());
return projectGroupMapper.updateProjectGroup(projectGroup);
}

View File

@ -1,7 +1,6 @@
package com.xinelu.manage.service.projectresult.impl;
import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.common.utils.StringUtils;
import com.xinelu.manage.domain.project.Project;
import com.xinelu.manage.domain.projectgroup.ProjectGroup;
@ -13,136 +12,138 @@ import com.xinelu.manage.mapper.projectresult.ProjectResultMapper;
import com.xinelu.manage.service.projectresult.IProjectResultService;
import com.xinelu.manage.vo.projectresult.ProjectResultStatisticVo;
import com.xinelu.manage.vo.projectresult.ProjectResultVo;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
/**
* @author haown
* @description 针对表project_result(检测项目结果表)的数据库操作Service实现
* @createDate 2024-03-06 10:40:56
*/
* @author haown
* @description 针对表project_result(检测项目结果表)的数据库操作Service实现
* @createDate 2024-03-06 10:40:56
*/
@Service
public class ProjectResultServiceImpl implements IProjectResultService {
@Resource
private ProjectGroupMapper projectGroupMapper;
@Resource
private ProjectMapper projectMapper;
@Resource
private ProjectResultMapper projectResultMapper;
@Resource
private ProjectGroupMapper projectGroupMapper;
@Resource
private ProjectMapper projectMapper;
@Resource
private ProjectResultMapper projectResultMapper;
/**
* 查询检测项目结果
*
* @param id 检测项目结果主键
* @return 检测项目结果
*/
@Override
public ProjectResult selectProjectResultById(Long id) {
return projectResultMapper.selectProjectResultById(id);
}
/**
* 查询检测项目结果
*
* @param id 检测项目结果主键
* @return 检测项目结果
*/
@Override
public ProjectResult selectProjectResultById(Long id) {
return projectResultMapper.selectProjectResultById(id);
}
/**
* 查询检测项目结果列表
*
* @param projectResult 检测项目结果
* @return 检测项目结果
*/
@Override
public List<ProjectResult> selectProjectResultList(ProjectResult projectResult) {
return projectResultMapper.selectProjectResultList(projectResult);
}
/**
* 查询检测项目结果列表
*
* @param projectResult 检测项目结果
* @return 检测项目结果
*/
@Override
public List<ProjectResult> selectProjectResultList(ProjectResult projectResult) {
return projectResultMapper.selectProjectResultList(projectResult);
}
/**
* 新增检测项目结果
*
* @param projectResult 检测项目结果
* @return 结果
*/
@Override
public int insertProjectResult(ProjectResult projectResult) {
projectResult.setCreateTime(DateUtils.getNowDate());
return projectResultMapper.insertProjectResult(projectResult);
}
/**
* 新增检测项目结果
*
* @param projectResult 检测项目结果
* @return 结果
*/
@Override
public int insertProjectResult(ProjectResult projectResult) {
projectResult.setCreateTime(LocalDateTime.now());
return projectResultMapper.insertProjectResult(projectResult);
}
/**
* 修改检测项目结果
*
* @param projectResult 检测项目结果
* @return 结果
*/
@Override
public int updateProjectResult(ProjectResult projectResult) {
projectResult.setUpdateTime(DateUtils.getNowDate());
return projectResultMapper.updateProjectResult(projectResult);
}
/**
* 修改检测项目结果
*
* @param projectResult 检测项目结果
* @return 结果
*/
@Override
public int updateProjectResult(ProjectResult projectResult) {
projectResult.setUpdateTime(LocalDateTime.now());
return projectResultMapper.updateProjectResult(projectResult);
}
/**
* 批量删除检测项目结果
*
* @param ids 需要删除的检测项目结果主键
* @return 结果
*/
@Override
public int deleteProjectResultByIds(Long[] ids) {
return projectResultMapper.deleteProjectResultByIds(ids);
}
/**
* 批量删除检测项目结果
*
* @param ids 需要删除的检测项目结果主键
* @return 结果
*/
@Override
public int deleteProjectResultByIds(Long[] ids) {
return projectResultMapper.deleteProjectResultByIds(ids);
}
/**
* 删除检测项目结果信息
*
* @param id 检测项目结果主键
* @return 结果
*/
@Override
public int deleteProjectResultById(Long id) {
return projectResultMapper.deleteProjectResultById(id);
}
/**
* 删除检测项目结果信息
*
* @param id 检测项目结果主键
* @return 结果
*/
@Override
public int deleteProjectResultById(Long id) {
return projectResultMapper.deleteProjectResultById(id);
}
@Override
public ProjectResultStatisticVo curveStatistics(ProjectResultStatisticDto projectResultStatisticDto) {
// 根据groupCode查询groupId
if (StringUtils.isNotBlank(projectResultStatisticDto.getGroupCode())) {
ProjectGroup projectGroup = new ProjectGroup();
projectGroup.setGroupCode(projectResultStatisticDto.getGroupCode());
List<ProjectGroup> groupList = projectGroupMapper.selectProjectGroupList(projectGroup);
if (CollectionUtils.isEmpty(groupList)) {
throw new ServiceException("未找到该检测项目");
}
projectResultStatisticDto.setGroupId(groupList.get(0).getId());
}
// 根据projectCode查询projectId
if (StringUtils.isNotBlank(projectResultStatisticDto.getProjectCode())) {
Project projectQuery = new Project();
projectQuery.setProjectCode(projectResultStatisticDto.getProjectCode());
List<Project> projectList = projectMapper.selectProjectList(projectQuery);
if (CollectionUtils.isEmpty(projectList)) {
throw new ServiceException("未找到该检测项目");
}
projectResultStatisticDto.setProjectId(projectList.get(0).getId());
}
if (projectResultStatisticDto.getPatientId() == null) {
throw new ServiceException("数据格式错误");
}
List<String> measureTimeList = new ArrayList<>();
Map<String, List<String>> valueMap = new HashMap<>();
List<ProjectResultVo> resultList = projectResultMapper.selectList(projectResultStatisticDto);
if (!CollectionUtils.isEmpty(resultList)) {
// 根据projectId进行分组
Map<String, List<ProjectResultVo>> groupByProject = resultList.stream().collect(Collectors.groupingBy(ProjectResultVo::getProjectName));
for (String projectName : groupByProject.keySet()) {
List<ProjectResultVo> projectResultList = groupByProject.get(projectName);
List<String> valueList = projectResultList.stream().map(ProjectResultVo::getMeasureResult).collect(Collectors.toList());
measureTimeList = projectResultList.stream().map(ProjectResultVo::getMeasureTimeStr).collect(Collectors.toList());
valueMap.put(projectName, valueList);
}
}
return ProjectResultStatisticVo.builder().xList(measureTimeList).yList(valueMap).build();
}
@Override
public ProjectResultStatisticVo curveStatistics(ProjectResultStatisticDto projectResultStatisticDto) {
// 根据groupCode查询groupId
if (StringUtils.isNotBlank(projectResultStatisticDto.getGroupCode())) {
ProjectGroup projectGroup = new ProjectGroup();
projectGroup.setGroupCode(projectResultStatisticDto.getGroupCode());
List<ProjectGroup> groupList = projectGroupMapper.selectProjectGroupList(projectGroup);
if (CollectionUtils.isEmpty(groupList)) {
throw new ServiceException("未找到该检测项目");
}
projectResultStatisticDto.setGroupId(groupList.get(0).getId());
}
// 根据projectCode查询projectId
if (StringUtils.isNotBlank(projectResultStatisticDto.getProjectCode())) {
Project projectQuery = new Project();
projectQuery.setProjectCode(projectResultStatisticDto.getProjectCode());
List<Project> projectList = projectMapper.selectProjectList(projectQuery);
if (CollectionUtils.isEmpty(projectList)) {
throw new ServiceException("未找到该检测项目");
}
projectResultStatisticDto.setProjectId(projectList.get(0).getId());
}
if (projectResultStatisticDto.getPatientId() == null) {
throw new ServiceException("数据格式错误");
}
List<String> measureTimeList = new ArrayList<>();
Map<String, List<String>> valueMap = new HashMap<>();
List<ProjectResultVo> resultList = projectResultMapper.selectList(projectResultStatisticDto);
if (!CollectionUtils.isEmpty(resultList)) {
// 根据projectId进行分组
Map<String, List<ProjectResultVo>> groupByProject = resultList.stream().collect(Collectors.groupingBy(ProjectResultVo::getProjectName));
for (String projectName : groupByProject.keySet()) {
List<ProjectResultVo> projectResultList = groupByProject.get(projectName);
List<String> valueList = projectResultList.stream().map(ProjectResultVo::getMeasureResult).collect(Collectors.toList());
measureTimeList = projectResultList.stream().map(ProjectResultVo::getMeasureTimeStr).collect(Collectors.toList());
valueMap.put(projectName, valueList);
}
}
return ProjectResultStatisticVo.builder().xList(measureTimeList).yList(valueMap).build();
}
}

View File

@ -1,6 +1,5 @@
package com.xinelu.manage.service.propagandainfo.impl;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.manage.domain.propagandainfo.PropagandaInfo;
import com.xinelu.manage.dto.department.DepartmentDTO;
@ -9,10 +8,12 @@ import com.xinelu.manage.dto.propagandainfo.PropagandaUpdateDto;
import com.xinelu.manage.mapper.propagandainfo.PropagandaInfoMapper;
import com.xinelu.manage.service.propagandainfo.IPropagandaInfoService;
import com.xinelu.manage.vo.department.DepartmentVO;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
/**
* 宣教库管理Service业务层处理
*
@ -54,8 +55,8 @@ public class PropagandaInfoServiceImpl implements IPropagandaInfoService {
*/
@Override
public int insertPropagandaInfo(PropagandaInfo propagandaInfo) {
propagandaInfo.setCreateTime(DateUtils.getNowDate());
return propagandaInfoMapper.insertPropagandaInfo(propagandaInfo);
propagandaInfo.setCreateTime(LocalDateTime.now());
return propagandaInfoMapper.insertPropagandaInfo(propagandaInfo);
}
/**
@ -66,30 +67,32 @@ public class PropagandaInfoServiceImpl implements IPropagandaInfoService {
*/
@Override
public int updatePropagandaInfo(PropagandaInfo propagandaInfo) {
propagandaInfo.setUpdateTime(DateUtils.getNowDate());
propagandaInfo.setUpdateTime(LocalDateTime.now());
return propagandaInfoMapper.updatePropagandaInfo(propagandaInfo);
}
@Override public int copyPropagandaInfo(Long id) {
PropagandaInfo propagandaInfo = propagandaInfoMapper.selectPropagandaInfoById(id);
propagandaInfo.setId(null);
propagandaInfo.setCreateTime(DateUtils.getNowDate());
propagandaInfo.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
propagandaInfo.setUpdateTime(null);
propagandaInfo.setUpdateBy(null);
propagandaInfo.setPropagandaCode(propagandaInfo.getPropagandaCode() + "-COPY");
propagandaInfo.setPropagandaStatus("CREATE_COMPLETE");
return propagandaInfoMapper.insertPropagandaInfo(propagandaInfo);
}
@Override
public int copyPropagandaInfo(Long id) {
PropagandaInfo propagandaInfo = propagandaInfoMapper.selectPropagandaInfoById(id);
propagandaInfo.setId(null);
propagandaInfo.setCreateTime(LocalDateTime.now());
propagandaInfo.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
propagandaInfo.setUpdateTime(null);
propagandaInfo.setUpdateBy(null);
propagandaInfo.setPropagandaCode(propagandaInfo.getPropagandaCode() + "-COPY");
propagandaInfo.setPropagandaStatus("CREATE_COMPLETE");
return propagandaInfoMapper.insertPropagandaInfo(propagandaInfo);
}
@Override public int updateStatus(PropagandaUpdateDto propagandaInfo) {
PropagandaInfo body = new PropagandaInfo();
body.setId(propagandaInfo.getId());
body.setPropagandaStatus(propagandaInfo.getPropagandaStatus());
return propagandaInfoMapper.updatePropagandaInfo(body);
}
@Override
public int updateStatus(PropagandaUpdateDto propagandaInfo) {
PropagandaInfo body = new PropagandaInfo();
body.setId(propagandaInfo.getId());
body.setPropagandaStatus(propagandaInfo.getPropagandaStatus());
return propagandaInfoMapper.updatePropagandaInfo(body);
}
/**
/**
* 批量删除宣教库管理
*
* @param ids 需要删除的宣教库管理主键
@ -111,7 +114,8 @@ public class PropagandaInfoServiceImpl implements IPropagandaInfoService {
return propagandaInfoMapper.deletePropagandaInfoById(id);
}
@Override public List<DepartmentVO> selectNumByDept(DepartmentDTO departmentDto) {
return propagandaInfoMapper.selectNumByDept(departmentDto);
}
@Override
public List<DepartmentVO> selectNumByDept(DepartmentDTO departmentDto) {
return propagandaInfoMapper.selectNumByDept(departmentDto);
}
}

View File

@ -1,12 +1,13 @@
package com.xinelu.manage.service.propagandamaterials.impl;
import java.util.List;
import com.xinelu.common.utils.DateUtils;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.xinelu.manage.mapper.propagandamaterials.PropagandaMaterialsMapper;
import com.xinelu.manage.domain.propagandamaterials.PropagandaMaterials;
import com.xinelu.manage.mapper.propagandamaterials.PropagandaMaterialsMapper;
import com.xinelu.manage.service.propagandamaterials.IPropagandaMaterialsService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
/**
* 宣教素材关系Service业务层处理
@ -49,8 +50,8 @@ public class PropagandaMaterialsServiceImpl implements IPropagandaMaterialsServi
*/
@Override
public int insertPropagandaMaterials(PropagandaMaterials propagandaMaterials) {
propagandaMaterials.setCreateTime(DateUtils.getNowDate());
return propagandaMaterialsMapper.insertPropagandaMaterials(propagandaMaterials);
propagandaMaterials.setCreateTime(LocalDateTime.now());
return propagandaMaterialsMapper.insertPropagandaMaterials(propagandaMaterials);
}
/**
@ -61,7 +62,7 @@ public class PropagandaMaterialsServiceImpl implements IPropagandaMaterialsServi
*/
@Override
public int updatePropagandaMaterials(PropagandaMaterials propagandaMaterials) {
propagandaMaterials.setUpdateTime(DateUtils.getNowDate());
propagandaMaterials.setUpdateTime(LocalDateTime.now());
return propagandaMaterialsMapper.updatePropagandaMaterials(propagandaMaterials);
}

View File

@ -6,7 +6,6 @@ import com.xinelu.manage.vo.questionInfo.QuestionVO;
import java.util.List;
/**
* 问卷基本信息Service接口
*

View File

@ -1,7 +1,6 @@
package com.xinelu.manage.service.questioninfo.impl;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.common.utils.bean.BeanUtils;
import com.xinelu.manage.domain.questioninfo.QuestionInfo;
@ -20,6 +19,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
@ -91,7 +91,7 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService {
//新增问卷表
QuestionInfo questionInfo = new QuestionInfo();
BeanUtils.copyBeanProp(questionInfo, question);
questionInfo.setCreateTime(DateUtils.getNowDate());
questionInfo.setCreateTime(LocalDateTime.now());
questionInfo.setCreateBy(SecurityUtils.getUsername());
int questionCount = questionInfoMapper.insertQuestionInfo(questionInfo);
if (questionCount <= 0) {
@ -106,7 +106,7 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService {
QuestionSubject saveQuestionSubject = new QuestionSubject();
BeanUtils.copyBeanProp(saveQuestionSubject, questionSubject);
saveQuestionSubject.setQuestionInfoId(questionInfo.getId());
saveQuestionSubject.setCreateTime(DateUtils.getNowDate());
saveQuestionSubject.setCreateTime(LocalDateTime.now());
saveQuestionSubject.setCreateBy(SecurityUtils.getUsername());
questionSubjects.add(saveQuestionSubject);
questionSubjectOptions.addAll(questionSubject.getQuestionSubjectOptionList());
@ -123,7 +123,7 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService {
BeanUtils.copyBeanProp(saveQuestionSubjectOption, questionSubjectOption);
QuestionSubject questionSubject = questionSubjects.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getQuestionNumber()) && questionSubjectOption.getQuestionNumber().compareTo(item.getQuestionNumber()) == 0).findFirst().orElse(new QuestionSubject());
saveQuestionSubjectOption.setQuestionnaireSubjectId(questionSubject.getId());
saveQuestionSubjectOption.setCreateTime(DateUtils.getNowDate());
saveQuestionSubjectOption.setCreateTime(LocalDateTime.now());
saveQuestionSubjectOption.setCreateBy(SecurityUtils.getUsername());
saveQuestionSubjectOptions.add(saveQuestionSubjectOption);
}
@ -147,7 +147,7 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService {
//新增问卷表
QuestionInfo questionInfo = new QuestionInfo();
BeanUtils.copyBeanProp(questionInfo, question);
questionInfo.setUpdateTime(DateUtils.getNowDate());
questionInfo.setUpdateTime(LocalDateTime.now());
questionInfo.setUpdateBy(SecurityUtils.getUsername());
int questionCount = questionInfoMapper.updateQuestionInfo(questionInfo);
if (questionCount <= 0) {
@ -177,7 +177,7 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService {
QuestionSubject saveQuestionSubject = new QuestionSubject();
BeanUtils.copyBeanProp(saveQuestionSubject, questionSubject);
saveQuestionSubject.setQuestionInfoId(questionInfo.getId());
saveQuestionSubject.setCreateTime(DateUtils.getNowDate());
saveQuestionSubject.setCreateTime(LocalDateTime.now());
saveQuestionSubject.setCreateBy(SecurityUtils.getUsername());
questionSubjects.add(saveQuestionSubject);
questionSubjectOptions.addAll(questionSubject.getQuestionSubjectOptionList());
@ -193,7 +193,7 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService {
BeanUtils.copyBeanProp(saveQuestionSubjectOption, questionSubjectOption);
QuestionSubject questionSubject = questionSubjects.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getQuestionNumber()) && questionSubjectOption.getQuestionNumber().compareTo(item.getQuestionNumber()) == 0).findFirst().orElse(new QuestionSubject());
saveQuestionSubjectOption.setQuestionnaireSubjectId(questionSubject.getId());
saveQuestionSubjectOption.setCreateTime(DateUtils.getNowDate());
saveQuestionSubjectOption.setCreateTime(LocalDateTime.now());
saveQuestionSubjectOption.setCreateBy(SecurityUtils.getUsername());
saveQuestionSubjectOptions.add(saveQuestionSubjectOption);
}

View File

@ -1,12 +1,12 @@
package com.xinelu.manage.service.questionsubject.impl;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.manage.domain.questionsubject.QuestionSubject;
import com.xinelu.manage.mapper.questionsubject.QuestionSubjectMapper;
import com.xinelu.manage.service.questionsubject.IQuestionSubjectService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
@ -51,7 +51,7 @@ public class QuestionSubjectServiceImpl implements IQuestionSubjectService {
*/
@Override
public int insertQuestionSubject(QuestionSubject questionSubject) {
questionSubject.setCreateTime(DateUtils.getNowDate());
questionSubject.setCreateTime(LocalDateTime.now());
return questionSubjectMapper.insertQuestionSubject(questionSubject);
}
@ -63,7 +63,7 @@ public class QuestionSubjectServiceImpl implements IQuestionSubjectService {
*/
@Override
public int updateQuestionSubject(QuestionSubject questionSubject) {
questionSubject.setUpdateTime(DateUtils.getNowDate());
questionSubject.setUpdateTime(LocalDateTime.now());
return questionSubjectMapper.updateQuestionSubject(questionSubject);
}

View File

@ -1,12 +1,12 @@
package com.xinelu.manage.service.questionsubjectoption.impl;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.manage.domain.questionsubjectoption.QuestionSubjectOption;
import com.xinelu.manage.mapper.questionsubjectoption.QuestionSubjectOptionMapper;
import com.xinelu.manage.service.questionsubjectoption.IQuestionSubjectOptionService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
@ -51,7 +51,7 @@ public class QuestionSubjectOptionServiceImpl implements IQuestionSubjectOptionS
*/
@Override
public int insertQuestionSubjectOption(QuestionSubjectOption questionSubjectOption) {
questionSubjectOption.setCreateTime(DateUtils.getNowDate());
questionSubjectOption.setCreateTime(LocalDateTime.now());
return questionSubjectOptionMapper.insertQuestionSubjectOption(questionSubjectOption);
}
@ -63,7 +63,7 @@ public class QuestionSubjectOptionServiceImpl implements IQuestionSubjectOptionS
*/
@Override
public int updateQuestionSubjectOption(QuestionSubjectOption questionSubjectOption) {
questionSubjectOption.setUpdateTime(DateUtils.getNowDate());
questionSubjectOption.setUpdateTime(LocalDateTime.now());
return questionSubjectOptionMapper.updateQuestionSubjectOption(questionSubjectOption);
}

View File

@ -63,10 +63,6 @@ public interface IScriptInfoService {
/**
* 话术图片上传
*
* @param multipartFile
* @return
* @throws Exception
*/
AjaxResult uploadScriptInfo(MultipartFile multipartFile) throws Exception;
}

View File

@ -3,7 +3,6 @@ package com.xinelu.manage.service.scriptInfo.impl;
import com.xinelu.common.config.SystemBusinessConfig;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.common.utils.file.FileUploadUtils;
import com.xinelu.common.utils.file.MimeTypeUtils;
@ -16,6 +15,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
/**
@ -70,7 +70,7 @@ public class ScriptInfoServiceImpl implements IScriptInfoService {
}
// 设置创建人与创建时间
scriptInfo.setCreateBy(SecurityUtils.getUsername());
scriptInfo.setCreateTime(DateUtils.getNowDate());
scriptInfo.setCreateTime(LocalDateTime.now());
return scriptInfoMapper.insertScriptInfo(scriptInfo);
}
@ -90,7 +90,7 @@ public class ScriptInfoServiceImpl implements IScriptInfoService {
}
// 不存在同名的话术名称或者名称未改变设置修改人和修改时间
scriptInfo.setUpdateBy(SecurityUtils.getUsername());
scriptInfo.setUpdateTime(DateUtils.getNowDate());
scriptInfo.setUpdateTime(LocalDateTime.now());
// 进行更新操作
return scriptInfoMapper.updateScriptInfo(scriptInfo);
}
@ -120,9 +120,6 @@ public class ScriptInfoServiceImpl implements IScriptInfoService {
/**
* 话术图片上传
*
* @param multipartFile
* @return
*/
@Override
public AjaxResult uploadScriptInfo(MultipartFile multipartFile) throws Exception {

View File

@ -62,10 +62,6 @@ public interface IServicePackageService {
/**
* 修改服务包发布状态
*
* @param id
* @param whetherRelease
* @return
*/
int editReleaseStatus(Long id, Integer whetherRelease);
}

View File

@ -3,7 +3,6 @@ package com.xinelu.manage.service.servicepackage.impl;
import com.xinelu.common.constant.Constants;
import com.xinelu.common.core.page.TableDataInfo;
import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.common.utils.PageServiceUtil;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.common.utils.bean.BeanUtils;
@ -21,9 +20,8 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.Date;
import java.time.LocalDateTime;
import java.util.List;
import java.util.stream.Collectors;
/**
* 服务包基础信息Service业务层处理
@ -57,7 +55,7 @@ public class ServicePackageServiceImpl implements IServicePackageService {
ServicePackageDetailVO servicePackageDetailVO = servicePackageMapper.selectServicePackagesById(id);
servicePackageDetailVO.setPackageTermAndUnit(servicePackageDetailVO.getPackageTerm() + servicePackageDetailVO.getPackageTermUnit());
// 根据服务包id查询服务包内容
List<ServicePackageContentVO> voList = servicePackageMapper.selectServicePackageVOListById(id);
List<ServicePackageContentVO> voList = servicePackageMapper.selectServicePackageVoListById(id);
servicePackageDetailVO.setVoList(voList);
return servicePackageDetailVO;
}
@ -72,12 +70,11 @@ public class ServicePackageServiceImpl implements IServicePackageService {
public TableDataInfo selectServicePackageList(ServicePackage servicePackage) {
pageServiceUtil.startPage();
List<ServicePackageVO> voList = servicePackageMapper.selectServicePackageLists(servicePackage);
voList.stream().map(vo -> {
voList.forEach(vo -> {
// 拼接服务包期限+服务包单位
String packageTermAndUnit = vo.getPackageTerm() + vo.getPackageTermUnit();
vo.setPackageTermAndUnit(packageTermAndUnit);
return vo;
}).collect(Collectors.toList());
});
return pageServiceUtil.getDataTable(voList);
}
@ -96,7 +93,7 @@ public class ServicePackageServiceImpl implements IServicePackageService {
throw new ServiceException("当前科室下服务包名称已存在");
}
String username = SecurityUtils.getUsername();
Date nowDate = DateUtils.getNowDate();
LocalDateTime nowDate = LocalDateTime.now();
// 初始化ServicePackage将servicePackageAddDTO赋值给ServicePackage新增服务包
ServicePackage servicePackage = new ServicePackage();
BeanUtils.copyProperties(servicePackageAddDTO, servicePackage);
@ -128,7 +125,7 @@ public class ServicePackageServiceImpl implements IServicePackageService {
throw new ServiceException("当前科室下服务包名称已存在");
}
String username = SecurityUtils.getUsername();
Date nowDate = DateUtils.getNowDate();
LocalDateTime nowDate = LocalDateTime.now();
// 初始化ServicePackage将servicePackageAddDTO赋值给ServicePackage更新服务包
ServicePackage servicePackage = new ServicePackage();
BeanUtils.copyProperties(servicePackageAddDTO, servicePackage);
@ -153,7 +150,7 @@ public class ServicePackageServiceImpl implements IServicePackageService {
/**
* 新增服务包方式
*/
private Long createServiceWay(ServicePackage servicePackage, ServicePackageContentVO vo, String username, Date nowDate) {
private Long createServiceWay(ServicePackage servicePackage, ServicePackageContentVO vo, String username, LocalDateTime nowDate) {
Long serviceWayId = servicePackageContentMapper.countByPackageIdAndServiceWayName(servicePackage.getId(), vo.getServiceWayName());
if (serviceWayId == null) {
ServicePackageContent serviceWay = new ServicePackageContent();
@ -173,7 +170,7 @@ public class ServicePackageServiceImpl implements IServicePackageService {
/**
* 新增服务包内容
*/
private Long createServiceContent(ServicePackage servicePackage, ServicePackageContentVO vo, Long serviceWayId, String username, Date nowDate) {
private Long createServiceContent(ServicePackage servicePackage, ServicePackageContentVO vo, Long serviceWayId, String username, LocalDateTime nowDate) {
Long serviceContentId = servicePackageContentMapper.countByServiceWayIdAndServiceContent(serviceWayId, vo.getServiceContent());
if (serviceContentId == null) {
ServicePackageContent serviceContent = new ServicePackageContent();
@ -193,7 +190,7 @@ public class ServicePackageServiceImpl implements IServicePackageService {
/**
* 新增服务包频次
*/
private void createServiceFrequency(ServicePackage servicePackage, ServicePackageContentVO vo, Long serviceContentId, String username, Date nowDate) {
private void createServiceFrequency(ServicePackage servicePackage, ServicePackageContentVO vo, Long serviceContentId, String username, LocalDateTime nowDate) {
if (servicePackageContentMapper.countByServiceContentIdAndServiceFrequency(serviceContentId, vo) > 0) {
throw new ServiceException("不能重复添加服务包内容");
}
@ -243,10 +240,6 @@ public class ServicePackageServiceImpl implements IServicePackageService {
/**
* 修改服务包发布状态
*
* @param id
* @param whetherRelease
* @return
*/
@Override
public int editReleaseStatus(Long id, Integer whetherRelease) {

View File

@ -1,12 +1,12 @@
package com.xinelu.manage.service.servicepackagecontent.impl;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.manage.domain.servicepackagecontent.ServicePackageContent;
import com.xinelu.manage.mapper.servicepackagecontent.ServicePackageContentMapper;
import com.xinelu.manage.service.servicepackagecontent.IServicePackageContentService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
/**
@ -50,7 +50,7 @@ public class ServicePackageContentServiceImpl implements IServicePackageContentS
*/
@Override
public int insertServicePackageContent(ServicePackageContent servicePackageContent) {
servicePackageContent.setCreateTime(DateUtils.getNowDate());
servicePackageContent.setCreateTime(LocalDateTime.now());
return servicePackageContentMapper.insertServicePackageContent(servicePackageContent);
}
@ -62,7 +62,7 @@ public class ServicePackageContentServiceImpl implements IServicePackageContentS
*/
@Override
public int updateServicePackageContent(ServicePackageContent servicePackageContent) {
servicePackageContent.setUpdateTime(DateUtils.getNowDate());
servicePackageContent.setUpdateTime(LocalDateTime.now());
return servicePackageContentMapper.updateServicePackageContent(servicePackageContent);
}

View File

@ -67,50 +67,31 @@ public interface IServiceWayContentService {
/**
* 查询服务方式列表
*
* @param serviceWayName
* @param id
* @return
*/
List<ServiceWayContentAndNumVO> selectListNum(String serviceWayName, Long id);
/**
* 新增服务方式
*
* @param serviceWayContent
* @return
*/
int insertServiceWay(ServiceWayContent serviceWayContent);
/**
* 修改服务方式
*
* @param serviceWayContent
* @return
*/
int editServiceWay(ServiceWayContent serviceWayContent);
/**
* 根据id删除服务方式
*
* @param id
* @return
*/
int deleteServiceWayById(Long id);
/**
* 根据id查询服务方式
*
* @param id
* @return
*/
String selectServiceWayById(Long id);
/**
* 根据服务频次id删除服务内容
*
* @param id
* @return
*/
int deleteByFrequencyId(Long id);
}

View File

@ -3,7 +3,6 @@ package com.xinelu.manage.service.servicewaycontent.impl;
import com.xinelu.common.constant.Constants;
import com.xinelu.common.enums.ServiceWayContentServiceType;
import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.common.utils.bean.BeanUtils;
import com.xinelu.common.utils.codes.GenerateSystemCodeUtil;
@ -17,13 +16,12 @@ import com.xinelu.manage.service.servicewaycontent.IServiceWayContentService;
import com.xinelu.manage.vo.servicewaycontent.ServiceWayContentAndFrequencyVO;
import com.xinelu.manage.vo.servicewaycontent.ServiceWayContentAndNumVO;
import com.xinelu.manage.vo.servicewaycontent.ServiceWayContentVO;
import com.xinelu.system.mapper.SysDictDataMapper;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.Date;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Objects;
@ -56,7 +54,7 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService {
* 查询服务方式内容列表
*
* @param serviceWayContentDTO 服务方式内容
* @return
* @return 服务方式内容集合
*/
@Override
public List<ServiceWayContentVO> selectServiceWayContentList(ServiceWayContentDTO serviceWayContentDTO) {
@ -75,7 +73,6 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService {
// 判断服务内容在服务内容表中是否存在
ServiceWayContentVO serviceWayContentVO = serviceWayContentMapper.countByWayIdAndContent(serviceWayContentAddDTO.getServiceWayId(), serviceWayContentAddDTO.getServiceContent());
String username = SecurityUtils.getUsername();
Date date = DateUtils.getNowDate();
ServiceWayContent serviceFrequency = new ServiceWayContent();
// 如果服务内容在服务内容表中存在
if (ObjectUtils.isNotEmpty(serviceWayContentVO)) {
@ -95,7 +92,7 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService {
serviceFrequency.setServiceFrequencyStart(serviceWayContentAddDTO.getServiceFrequencyStart());
serviceFrequency.setServiceFrequencyEnd(serviceWayContentAddDTO.getServiceFrequencyEnd());
serviceFrequency.setCreateBy(username);
serviceFrequency.setCreateTime(date);
serviceFrequency.setCreateTime(LocalDateTime.now());
if (serviceWayContentMapper.insertServiceWayContent(serviceFrequency) <= 0) {
throw new ServiceException("新增服务频次失败");
}
@ -107,7 +104,7 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService {
serviceContent.setServiceWayId(serviceWayContentAddDTO.getServiceWayId());
serviceContent.setServiceContent(serviceWayContentAddDTO.getServiceContent());
serviceContent.setCreateBy(username);
serviceContent.setCreateTime(date);
serviceContent.setCreateTime(LocalDateTime.now());
if (serviceWayContentMapper.insertServiceWayContent(serviceContent) <= 0) {
throw new ServiceException("新增服务内容失败");
}
@ -119,7 +116,7 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService {
serviceFrequency.setServiceFrequencyStart(serviceWayContentAddDTO.getServiceFrequencyStart());
serviceFrequency.setServiceFrequencyEnd(serviceWayContentAddDTO.getServiceFrequencyEnd());
serviceFrequency.setCreateBy(username);
serviceFrequency.setCreateTime(date);
serviceFrequency.setCreateTime(LocalDateTime.now());
serviceFrequency.setServiceSort(serviceWayContentAddDTO.getServiceSort());
if (serviceWayContentMapper.insertServiceWayContent(serviceFrequency) <= 0) {
throw new ServiceException("新增服务频次失败");
@ -138,7 +135,6 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService {
@Transactional(rollbackFor = Exception.class)
public int updateServiceWayContent(ServiceWayContentEditDTO serviceWayContentEditDTO) {
String username = SecurityUtils.getUsername();
Date date = DateUtils.getNowDate();
// 获取当前的服务频次记录
ServiceWayContent currentFrequency = serviceWayContentMapper.selectServiceWayContentById(serviceWayContentEditDTO.getId());
if (currentFrequency == null) {
@ -165,7 +161,7 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService {
newServiceContent.setServiceContent(serviceWayContentEditDTO.getServiceContent());
newServiceContent.setServiceType(ServiceWayContentServiceType.SERVICE_CONTENT.toString());
newServiceContent.setCreateBy(username);
newServiceContent.setCreateTime(date);
newServiceContent.setCreateTime(LocalDateTime.now());
serviceWayContentMapper.insertServiceWayContent(newServiceContent);
// 更新当前频次记录的ServiceContentId为新创建的服务内容ID
currentFrequency.setServiceContentId(newServiceContent.getId());
@ -196,7 +192,7 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService {
currentFrequency.setServiceFrequencyStart(serviceWayContentEditDTO.getServiceFrequencyStart());
currentFrequency.setServiceFrequencyEnd(serviceWayContentEditDTO.getServiceFrequencyEnd());
currentFrequency.setUpdateBy(username);
currentFrequency.setUpdateTime(date);
currentFrequency.setUpdateTime(LocalDateTime.now());
// 执行更新操作
if (serviceWayContentMapper.updateServiceFrequency(currentFrequency) <= 0) {
@ -230,10 +226,6 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService {
/**
* 查询服务方式列表
*
* @param serviceWayName
* @param id
* @return
*/
@Override
public List<ServiceWayContentAndNumVO> selectListNum(String serviceWayName, Long id) {
@ -242,9 +234,6 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService {
/**
* 新增服务方式
*
* @param serviceWayContent
* @return
*/
@Override
@Transactional(rollbackFor = Exception.class)
@ -259,15 +248,12 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService {
serviceWayContent.setServiceWayCode(Constants.SERVICE_MODE_ENCODING + systemCodeUtil.generateDepartCode(Constants.SERVICE_MODE_ENCODING));
serviceWayContent.setServiceType(ServiceWayContentServiceType.SERVICE_WRY.toString());
serviceWayContent.setCreateBy(SecurityUtils.getUsername());
serviceWayContent.setCreateTime(DateUtils.getNowDate());
serviceWayContent.setCreateTime(LocalDateTime.now());
return serviceWayContentMapper.insertServiceWayContent(serviceWayContent);
}
/**
* 修改服务方式
*
* @param serviceWayContent
* @return
*/
@Override
@Transactional(rollbackFor = Exception.class)
@ -280,15 +266,12 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService {
}
// 如果不存在执行修改功能
serviceWayContent.setUpdateBy(SecurityUtils.getUsername());
serviceWayContent.setUpdateTime(DateUtils.getNowDate());
serviceWayContent.setUpdateTime(LocalDateTime.now());
return serviceWayContentMapper.updateServiceWay(serviceWayContent);
}
/**
* 根据id删除服务方式
*
* @param id
* @return
*/
@Override
public int deleteServiceWayById(Long id) {
@ -305,6 +288,9 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService {
return serviceWayContentMapper.deleteServiceWayById(id);
}
/**
* 根据服务方式id获取服务方式
*/
@Override
public String selectServiceWayById(Long id) {
return serviceWayContentMapper.selectServiceWayById(id);
@ -312,9 +298,6 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService {
/**
* 根据服务频次id删除服务内容
*
* @param id
* @return
*/
@Override
public int deleteByFrequencyId(Long id) {

View File

@ -1,13 +1,14 @@
package com.xinelu.manage.service.signpatientinformed.impl;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.manage.domain.signpatientinformed.SignPatientInformed;
import com.xinelu.manage.mapper.signpatientinformed.SignPatientInformedMapper;
import com.xinelu.manage.service.signpatientinformed.ISignPatientInformedService;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
/**
* 签约知情同意书信息Service业务层处理
*
@ -49,8 +50,8 @@ public class SignPatientInformedServiceImpl implements ISignPatientInformedServi
*/
@Override
public int insertSignPatientInformed(SignPatientInformed signPatientInformed) {
signPatientInformed.setCreateTime(DateUtils.getNowDate());
return signPatientInformedMapper.insertSignPatientInformed(signPatientInformed);
signPatientInformed.setCreateTime(LocalDateTime.now());
return signPatientInformedMapper.insertSignPatientInformed(signPatientInformed);
}
/**
@ -61,7 +62,7 @@ public class SignPatientInformedServiceImpl implements ISignPatientInformedServi
*/
@Override
public int updateSignPatientInformed(SignPatientInformed signPatientInformed) {
signPatientInformed.setUpdateTime(DateUtils.getNowDate());
signPatientInformed.setUpdateTime(LocalDateTime.now());
return signPatientInformedMapper.updateSignPatientInformed(signPatientInformed);
}

View File

@ -1,12 +1,13 @@
package com.xinelu.manage.service.signpatientpackage.impl;
import java.util.List;
import com.xinelu.common.utils.DateUtils;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.xinelu.manage.mapper.signpatientpackage.SignPatientPackageMapper;
import com.xinelu.manage.domain.signpatientpackage.SignPatientPackage;
import com.xinelu.manage.mapper.signpatientpackage.SignPatientPackageMapper;
import com.xinelu.manage.service.signpatientpackage.ISignPatientPackageService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
/**
* 签约患者服务包信息Service业务层处理
@ -49,7 +50,7 @@ public class SignPatientPackageServiceImpl implements ISignPatientPackageService
*/
@Override
public int insertSignPatientPackage(SignPatientPackage signPatientPackage) {
signPatientPackage.setCreateTime(DateUtils.getNowDate());
signPatientPackage.setCreateTime(LocalDateTime.now());
return signPatientPackageMapper.insertSignPatientPackage(signPatientPackage);
}
@ -61,7 +62,7 @@ public class SignPatientPackageServiceImpl implements ISignPatientPackageService
*/
@Override
public int updateSignPatientPackage(SignPatientPackage signPatientPackage) {
signPatientPackage.setUpdateTime(DateUtils.getNowDate());
signPatientPackage.setUpdateTime(LocalDateTime.now());
return signPatientPackageMapper.updateSignPatientPackage(signPatientPackage);
}

View File

@ -1,12 +1,13 @@
package com.xinelu.manage.service.signpatientpackagehardware.impl;
import java.util.List;
import com.xinelu.common.utils.DateUtils;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.xinelu.manage.mapper.signpatientpackagehardware.SignPatientPackageHardwareMapper;
import com.xinelu.manage.domain.signpatientpackagehardware.SignPatientPackageHardware;
import com.xinelu.manage.mapper.signpatientpackagehardware.SignPatientPackageHardwareMapper;
import com.xinelu.manage.service.signpatientpackagehardware.ISignPatientPackageHardwareService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
/**
* 签约患者服务包硬件信息Service业务层处理
@ -49,8 +50,8 @@ public class SignPatientPackageHardwareServiceImpl implements ISignPatientPackag
*/
@Override
public int insertSignPatientPackageHardware(SignPatientPackageHardware signPatientPackageHardware) {
signPatientPackageHardware.setCreateTime(DateUtils.getNowDate());
return signPatientPackageHardwareMapper.insertSignPatientPackageHardware(signPatientPackageHardware);
signPatientPackageHardware.setCreateTime(LocalDateTime.now());
return signPatientPackageHardwareMapper.insertSignPatientPackageHardware(signPatientPackageHardware);
}
/**
@ -61,7 +62,7 @@ public class SignPatientPackageHardwareServiceImpl implements ISignPatientPackag
*/
@Override
public int updateSignPatientPackageHardware(SignPatientPackageHardware signPatientPackageHardware) {
signPatientPackageHardware.setUpdateTime(DateUtils.getNowDate());
signPatientPackageHardware.setUpdateTime(LocalDateTime.now());
return signPatientPackageHardwareMapper.updateSignPatientPackageHardware(signPatientPackageHardware);
}

View File

@ -25,8 +25,6 @@ import com.xinelu.manage.dto.signpatientrecord.SignPatientStatusDto;
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
import com.xinelu.manage.mapper.servicepackage.ServicePackageMapper;
import com.xinelu.manage.mapper.signpatientinformed.SignPatientInformedMapper;
import com.xinelu.manage.mapper.signpatientmanageroute.SignPatientManageRouteMapper;
import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper;
import com.xinelu.manage.mapper.signpatientpackage.SignPatientPackageMapper;
import com.xinelu.manage.mapper.signpatientpackagehardware.SignPatientPackageHardwareMapper;
import com.xinelu.manage.mapper.signpatientrecord.SignPatientRecordMapper;
@ -67,16 +65,6 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
private SignPatientPackageHardwareMapper signPatientPackageHardwareMapper;
@Resource
private SignPatientInformedMapper signPatientInformedMapper;
@Resource
private ServicePackageMapper servicePackageMapper;
@Resource
private SpecialDiseaseRouteMapper specialDiseaseRouteMapper;
@Resource
private SignPatientManageRouteMapper signPatientManageRouteMapper;
@Resource
private SpecialDiseaseNodeMapper specialDiseaseNodeMapper;
@Resource
private SignPatientManageRouteNodeMapper manageRouteNodeMapper;
@Override public List<SignPatientListVo> selectList(SignPatientListDto signPatientRecord) {
return signPatientRecordMapper.selectList(signPatientRecord);
@ -204,21 +192,21 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
return 0;
}
@Override
@Transactional(rollbackFor = Exception.class)
public int updateSignStatus(SignPatientStatusDto patientCancelSignDto) {
if (patientCancelSignDto.getPatientId() == null) {
throw new ServiceException("居民主键不能为空");
}
// 修改签约记录状态
SignPatientRecord signRecord = new SignPatientRecord();
signRecord.setId(patientCancelSignDto.getId());
signRecord.setSignStatus(patientCancelSignDto.getSignStatus());
signRecord.setServiceStatus(patientCancelSignDto.getServiceStatus());
signRecord.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName());
signRecord.setUpdateTime(DateUtils.getNowDate());
signRecord.setSeparateReason(patientCancelSignDto.getSeparateReason());
if (StringUtils.equals(SignRecordServiceStatusConstants.SEPARATE_SIGN, patientCancelSignDto.getSignStatus())) {
@Override
@Transactional(rollbackFor = Exception.class)
public int updateSignStatus(SignPatientStatusDto patientCancelSignDto) {
if (patientCancelSignDto.getPatientId() == null) {
throw new ServiceException("居民主键不能为空");
}
// 修改签约记录状态
SignPatientRecord signRecord = new SignPatientRecord();
signRecord.setId(patientCancelSignDto.getId());
signRecord.setSignStatus(patientCancelSignDto.getSignStatus());
signRecord.setServiceStatus(patientCancelSignDto.getServiceStatus());
signRecord.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName());
signRecord.setUpdateTime(LocalDateTime.now());
signRecord.setSeparateReason(patientCancelSignDto.getSeparateReason());
if (StringUtils.equals(SignRecordServiceStatusConstants.SEPARATE_SIGN, patientCancelSignDto.getSignStatus())) {
PatientInfo patient = patientInfoMapper.selectPatientInfoById(patientCancelSignDto.getPatientId());
// 签约信息保存到患者表

View File

@ -1,12 +1,12 @@
package com.xinelu.manage.service.specialdiseasenode.impl;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.manage.domain.specialdiseasenode.SpecialDiseaseNode;
import com.xinelu.manage.mapper.specialdiseasenode.SpecialDiseaseNodeMapper;
import com.xinelu.manage.service.specialdiseasenode.ISpecialDiseaseNodeService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
@ -51,7 +51,7 @@ public class SpecialDiseaseNodeServiceImpl implements ISpecialDiseaseNodeService
*/
@Override
public int insertSpecialDiseaseNode(SpecialDiseaseNode specialDiseaseNode) {
specialDiseaseNode.setCreateTime(DateUtils.getNowDate());
specialDiseaseNode.setCreateTime(LocalDateTime.now());
return specialDiseaseNodeMapper.insertSpecialDiseaseNode(specialDiseaseNode);
}
@ -63,7 +63,7 @@ public class SpecialDiseaseNodeServiceImpl implements ISpecialDiseaseNodeService
*/
@Override
public int updateSpecialDiseaseNode(SpecialDiseaseNode specialDiseaseNode) {
specialDiseaseNode.setUpdateTime(DateUtils.getNowDate());
specialDiseaseNode.setUpdateTime(LocalDateTime.now());
return specialDiseaseNodeMapper.updateSpecialDiseaseNode(specialDiseaseNode);
}

View File

@ -1,5 +1,6 @@
package com.xinelu.manage.service.specialdiseaseroute;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute;
import java.util.List;
@ -59,4 +60,12 @@ public interface ISpecialDiseaseRouteService {
* @return 结果
*/
public int deleteSpecialDiseaseRouteById(Long id);
/**
* 科室路径数量
*
* @param departmentName 科室名称
* @return AjaxResult
*/
AjaxResult departmentRouteCount(String departmentName);
}

View File

@ -1,12 +1,16 @@
package com.xinelu.manage.service.specialdiseaseroute.impl;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute;
import com.xinelu.manage.mapper.specialdiseaseroute.SpecialDiseaseRouteMapper;
import com.xinelu.manage.service.specialdiseaseroute.ISpecialDiseaseRouteService;
import com.xinelu.manage.vo.department.DepartmentVO;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
@ -51,7 +55,7 @@ public class SpecialDiseaseRouteServiceImpl implements ISpecialDiseaseRouteServi
*/
@Override
public int insertSpecialDiseaseRoute(SpecialDiseaseRoute specialDiseaseRoute) {
specialDiseaseRoute.setCreateTime(DateUtils.getNowDate());
specialDiseaseRoute.setCreateTime(LocalDateTime.now());
return specialDiseaseRouteMapper.insertSpecialDiseaseRoute(specialDiseaseRoute);
}
@ -63,7 +67,7 @@ public class SpecialDiseaseRouteServiceImpl implements ISpecialDiseaseRouteServi
*/
@Override
public int updateSpecialDiseaseRoute(SpecialDiseaseRoute specialDiseaseRoute) {
specialDiseaseRoute.setUpdateTime(DateUtils.getNowDate());
specialDiseaseRoute.setUpdateTime(LocalDateTime.now());
return specialDiseaseRouteMapper.updateSpecialDiseaseRoute(specialDiseaseRoute);
}
@ -88,4 +92,26 @@ public class SpecialDiseaseRouteServiceImpl implements ISpecialDiseaseRouteServi
public int deleteSpecialDiseaseRouteById(Long id) {
return specialDiseaseRouteMapper.deleteSpecialDiseaseRouteById(id);
}
/**
* 科室路径数量
*
* @param departmentName 科室名称
* @return AjaxResult
*/
@Override
public AjaxResult departmentRouteCount(String departmentName) {
DepartmentVO departmentVO = new DepartmentVO();
List<DepartmentVO> department = new ArrayList<>();
departmentVO.setDepartmentName("全部");
departmentVO.setCountNum(0);
List<DepartmentVO> departmentVOS = specialDiseaseRouteMapper.departmentRouteByDepartmentName(departmentName);
if (CollectionUtils.isNotEmpty(departmentVOS)) {
Integer result = departmentVOS.stream().mapToInt(DepartmentVO::getCountNum).sum();
departmentVO.setCountNum(result);
department.add(departmentVO);
department.addAll(departmentVOS);
}
return AjaxResult.success(department);
}
}

View File

@ -0,0 +1,61 @@
package com.xinelu.manage.service.specialdiseasetriggercondition;
import com.xinelu.manage.domain.specialdiseasetriggercondition.SpecialDiseaseTriggerCondition;
import java.util.List;
/**
* 触发条件关系Service接口
*
* @author xinelu
* @date 2024-03-18
*/
public interface ISpecialDiseaseTriggerConditionService {
/**
* 查询触发条件关系
*
* @param id 触发条件关系主键
* @return 触发条件关系
*/
public SpecialDiseaseTriggerCondition selectSpecialDiseaseTriggerConditionById(Long id);
/**
* 查询触发条件关系列表
*
* @param specialDiseaseTriggerCondition 触发条件关系
* @return 触发条件关系集合
*/
public List<SpecialDiseaseTriggerCondition> selectSpecialDiseaseTriggerConditionList(SpecialDiseaseTriggerCondition specialDiseaseTriggerCondition);
/**
* 新增触发条件关系
*
* @param specialDiseaseTriggerCondition 触发条件关系
* @return 结果
*/
public int insertSpecialDiseaseTriggerCondition(SpecialDiseaseTriggerCondition specialDiseaseTriggerCondition);
/**
* 修改触发条件关系
*
* @param specialDiseaseTriggerCondition 触发条件关系
* @return 结果
*/
public int updateSpecialDiseaseTriggerCondition(SpecialDiseaseTriggerCondition specialDiseaseTriggerCondition);
/**
* 批量删除触发条件关系
*
* @param ids 需要删除的触发条件关系主键集合
* @return 结果
*/
public int deleteSpecialDiseaseTriggerConditionByIds(Long[] ids);
/**
* 删除触发条件关系信息
*
* @param id 触发条件关系主键
* @return 结果
*/
public int deleteSpecialDiseaseTriggerConditionById(Long id);
}

View File

@ -0,0 +1,91 @@
package com.xinelu.manage.service.specialdiseasetriggercondition.impl;
import com.xinelu.manage.domain.specialdiseasetriggercondition.SpecialDiseaseTriggerCondition;
import com.xinelu.manage.mapper.specialdiseasetriggercondition.SpecialDiseaseTriggerConditionMapper;
import com.xinelu.manage.service.specialdiseasetriggercondition.ISpecialDiseaseTriggerConditionService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
/**
* 触发条件关系Service业务层处理
*
* @author xinelu
* @date 2024-03-18
*/
@Service
public class SpecialDiseaseTriggerConditionServiceImpl implements ISpecialDiseaseTriggerConditionService {
@Resource
private SpecialDiseaseTriggerConditionMapper specialDiseaseTriggerConditionMapper;
/**
* 查询触发条件关系
*
* @param id 触发条件关系主键
* @return 触发条件关系
*/
@Override
public SpecialDiseaseTriggerCondition selectSpecialDiseaseTriggerConditionById(Long id) {
return specialDiseaseTriggerConditionMapper.selectSpecialDiseaseTriggerConditionById(id);
}
/**
* 查询触发条件关系列表
*
* @param specialDiseaseTriggerCondition 触发条件关系
* @return 触发条件关系
*/
@Override
public List<SpecialDiseaseTriggerCondition> selectSpecialDiseaseTriggerConditionList(SpecialDiseaseTriggerCondition specialDiseaseTriggerCondition) {
return specialDiseaseTriggerConditionMapper.selectSpecialDiseaseTriggerConditionList(specialDiseaseTriggerCondition);
}
/**
* 新增触发条件关系
*
* @param specialDiseaseTriggerCondition 触发条件关系
* @return 结果
*/
@Override
public int insertSpecialDiseaseTriggerCondition(SpecialDiseaseTriggerCondition specialDiseaseTriggerCondition) {
specialDiseaseTriggerCondition.setCreateTime(LocalDateTime.now());
return specialDiseaseTriggerConditionMapper.insertSpecialDiseaseTriggerCondition(specialDiseaseTriggerCondition);
}
/**
* 修改触发条件关系
*
* @param specialDiseaseTriggerCondition 触发条件关系
* @return 结果
*/
@Override
public int updateSpecialDiseaseTriggerCondition(SpecialDiseaseTriggerCondition specialDiseaseTriggerCondition) {
specialDiseaseTriggerCondition.setUpdateTime(LocalDateTime.now());
return specialDiseaseTriggerConditionMapper.updateSpecialDiseaseTriggerCondition(specialDiseaseTriggerCondition);
}
/**
* 批量删除触发条件关系
*
* @param ids 需要删除的触发条件关系主键
* @return 结果
*/
@Override
public int deleteSpecialDiseaseTriggerConditionByIds(Long[] ids) {
return specialDiseaseTriggerConditionMapper.deleteSpecialDiseaseTriggerConditionByIds(ids);
}
/**
* 删除触发条件关系信息
*
* @param id 触发条件关系主键
* @return 结果
*/
@Override
public int deleteSpecialDiseaseTriggerConditionById(Long id) {
return specialDiseaseTriggerConditionMapper.deleteSpecialDiseaseTriggerConditionById(id);
}
}

View File

@ -1,12 +1,12 @@
package com.xinelu.manage.service.subdivisioncategory.impl;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.manage.domain.subdivisioncategory.SubdivisionCategory;
import com.xinelu.manage.mapper.subdivisioncategory.SubdivisionCategoryMapper;
import com.xinelu.manage.service.subdivisioncategory.ISubdivisionCategoryService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
@ -51,7 +51,7 @@ public class SubdivisionCategoryServiceImpl implements ISubdivisionCategoryServi
*/
@Override
public int insertSubdivisionCategory(SubdivisionCategory subdivisionCategory) {
subdivisionCategory.setCreateTime(DateUtils.getNowDate());
subdivisionCategory.setCreateTime(LocalDateTime.now());
return subdivisionCategoryMapper.insertSubdivisionCategory(subdivisionCategory);
}
@ -63,7 +63,7 @@ public class SubdivisionCategoryServiceImpl implements ISubdivisionCategoryServi
*/
@Override
public int updateSubdivisionCategory(SubdivisionCategory subdivisionCategory) {
subdivisionCategory.setUpdateTime(DateUtils.getNowDate());
subdivisionCategory.setUpdateTime(LocalDateTime.now());
return subdivisionCategoryMapper.updateSubdivisionCategory(subdivisionCategory);
}

View File

@ -1,7 +1,6 @@
package com.xinelu.manage.service.taskpartitiondict.impl;
import com.xinelu.common.constant.Constants;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.common.utils.codes.GenerateSystemCodeUtil;
import com.xinelu.manage.domain.taskpartitiondict.TaskPartitionDict;
@ -10,6 +9,7 @@ import com.xinelu.manage.service.taskpartitiondict.ITaskPartitionDictService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
@ -57,7 +57,7 @@ public class TaskPartitionDictServiceImpl implements ITaskPartitionDictService {
@Override
public int insertTaskPartitionDict(TaskPartitionDict taskPartitionDict) {
taskPartitionDict.setTaskPartitionCode(Constants.TASK_PARTITION_CODE + generateSystemCodeUtil.generateSystemCode(Constants.TASK_PARTITION_CODE));
taskPartitionDict.setCreateTime(DateUtils.getNowDate());
taskPartitionDict.setCreateTime(LocalDateTime.now());
taskPartitionDict.setCreateBy(SecurityUtils.getUsername());
return taskPartitionDictMapper.insertTaskPartitionDict(taskPartitionDict);
}
@ -70,7 +70,7 @@ public class TaskPartitionDictServiceImpl implements ITaskPartitionDictService {
*/
@Override
public int updateTaskPartitionDict(TaskPartitionDict taskPartitionDict) {
taskPartitionDict.setUpdateTime(DateUtils.getNowDate());
taskPartitionDict.setUpdateTime(LocalDateTime.now());
taskPartitionDict.setUpdateBy(SecurityUtils.getUsername());
return taskPartitionDictMapper.updateTaskPartitionDict(taskPartitionDict);
}

View File

@ -1,12 +1,12 @@
package com.xinelu.manage.service.taskstatusdict.impl;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.manage.domain.taskstatusdict.TaskStatusDict;
import com.xinelu.manage.mapper.taskstatusdict.TaskStatusDictMapper;
import com.xinelu.manage.service.taskstatusdict.ITaskStatusDictService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
@ -51,7 +51,7 @@ public class TaskStatusDictServiceImpl implements ITaskStatusDictService {
*/
@Override
public int insertTaskStatusDict(TaskStatusDict taskStatusDict) {
taskStatusDict.setCreateTime(DateUtils.getNowDate());
taskStatusDict.setCreateTime(LocalDateTime.now());
return taskStatusDictMapper.insertTaskStatusDict(taskStatusDict);
}
@ -63,7 +63,7 @@ public class TaskStatusDictServiceImpl implements ITaskStatusDictService {
*/
@Override
public int updateTaskStatusDict(TaskStatusDict taskStatusDict) {
taskStatusDict.setUpdateTime(DateUtils.getNowDate());
taskStatusDict.setUpdateTime(LocalDateTime.now());
return taskStatusDictMapper.updateTaskStatusDict(taskStatusDict);
}

View File

@ -1,7 +1,6 @@
package com.xinelu.manage.service.tasktypedict.impl;
import com.xinelu.common.constant.Constants;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.common.utils.codes.GenerateSystemCodeUtil;
import com.xinelu.manage.domain.tasktypedict.TaskTypeDict;
@ -10,6 +9,7 @@ import com.xinelu.manage.service.tasktypedict.ITaskTypeDictService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
@ -57,7 +57,7 @@ public class TaskTypeDictServiceImpl implements ITaskTypeDictService {
@Override
public int insertTaskTypeDict(TaskTypeDict taskTypeDict) {
taskTypeDict.setTaskTypeCode(Constants.TASK_TYPE_CODE + generateSystemCodeUtil.generateSystemCode(Constants.TASK_TYPE_CODE));
taskTypeDict.setCreateTime(DateUtils.getNowDate());
taskTypeDict.setCreateTime(LocalDateTime.now());
taskTypeDict.setCreateBy(SecurityUtils.getUsername());
return taskTypeDictMapper.insertTaskTypeDict(taskTypeDict);
}
@ -70,7 +70,7 @@ public class TaskTypeDictServiceImpl implements ITaskTypeDictService {
*/
@Override
public int updateTaskTypeDict(TaskTypeDict taskTypeDict) {
taskTypeDict.setUpdateTime(DateUtils.getNowDate());
taskTypeDict.setUpdateTime(LocalDateTime.now());
taskTypeDict.setUpdateBy(SecurityUtils.getUsername());
return taskTypeDictMapper.updateTaskTypeDict(taskTypeDict);
}

View File

@ -2,7 +2,6 @@ package com.xinelu.manage.service.textmessage.impl;
import com.xinelu.common.core.domain.entity.SysDictData;
import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.common.utils.bean.BeanUtils;
import com.xinelu.manage.domain.textmessage.TextMessage;
@ -18,8 +17,8 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
@ -110,7 +109,7 @@ public class TextMessageServiceImpl implements ITextMessageService {
// 设置创建者和创建时间
String currentUsername = SecurityUtils.getUsername();
Date currentTime = DateUtils.getNowDate();
LocalDateTime currentTime = LocalDateTime.now();
textMessageTaskDTO.setCreateBy(currentUsername);
textMessageTaskDTO.setCreateTime(currentTime);
@ -139,7 +138,7 @@ public class TextMessageServiceImpl implements ITextMessageService {
return 1;
}
private TextMessageSuitTask createTextMessageSuitTask(Long suitTaskTypeId, Long textMessageId, String createdBy, Date createdAt) {
private TextMessageSuitTask createTextMessageSuitTask(Long suitTaskTypeId, Long textMessageId, String createdBy, LocalDateTime createdAt) {
SysDictData sysDictData = sysDictDataMapper.selectDictDataById(suitTaskTypeId);
TextMessageSuitTask task = new TextMessageSuitTask();
task.setMessageId(textMessageId);
@ -166,7 +165,7 @@ public class TextMessageServiceImpl implements ITextMessageService {
// 设置修改者和修改时间
String editUsername = SecurityUtils.getUsername();
Date editTime = DateUtils.getNowDate();
LocalDateTime editTime = LocalDateTime.now();
textMessageTaskDTO.setUpdateBy(editUsername);
textMessageTaskDTO.setUpdateTime(editTime);

View File

@ -66,9 +66,6 @@ public interface IWechatTemplateService {
/**
* 根据id查询微信模板Dto
*
* @param id
* @return
*/
WechatTemplateTaskVO selectWechatTemplateDtoById(Long id);
}

View File

@ -2,7 +2,6 @@ package com.xinelu.manage.service.wechattemplate.impl;
import com.xinelu.common.core.domain.entity.SysDictData;
import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.common.utils.PageServiceUtil;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.common.utils.bean.BeanUtils;
@ -19,8 +18,8 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
@ -38,9 +37,6 @@ public class WechatTemplateServiceImpl implements IWechatTemplateService {
@Resource
private SysDictDataMapper sysDictDataMapper;
@Resource
private PageServiceUtil pageServiceUtil;
/**
* 查询微信模板信息
*
@ -102,7 +98,7 @@ public class WechatTemplateServiceImpl implements IWechatTemplateService {
// 设置创建者和创建时间
String currentUsername = SecurityUtils.getUsername();
Date currentTime = DateUtils.getNowDate();
LocalDateTime currentTime = LocalDateTime.now();
wechatTemplateTaskDTO.setCreateBy(currentUsername);
wechatTemplateTaskDTO.setCreateTime(currentTime);
@ -131,7 +127,7 @@ public class WechatTemplateServiceImpl implements IWechatTemplateService {
return 1;
}
private WechatTemplateSuitTask createWechatTempSuitTask(Long suitTaskTypeId, Long wechatTempId, String createdBy, Date createdAt) {
private WechatTemplateSuitTask createWechatTempSuitTask(Long suitTaskTypeId, Long wechatTempId, String createdBy, LocalDateTime createdAt) {
SysDictData sysDictData = sysDictDataMapper.selectDictDataById(suitTaskTypeId);
WechatTemplateSuitTask task = new WechatTemplateSuitTask();
task.setWechatTemplateId(wechatTempId);
@ -157,7 +153,7 @@ public class WechatTemplateServiceImpl implements IWechatTemplateService {
}
// 设置修改者和修改时间
String editUsername = SecurityUtils.getUsername();
Date editTime = DateUtils.getNowDate();
LocalDateTime editTime = LocalDateTime.now();
wechatTemplateTaskDTO.setUpdateBy(editUsername);
wechatTemplateTaskDTO.setUpdateTime(editTime);
@ -223,9 +219,6 @@ public class WechatTemplateServiceImpl implements IWechatTemplateService {
/**
* 根据id查询微信模板Dto
*
* @param id
* @return
*/
@Override
public WechatTemplateTaskVO selectWechatTemplateDtoById(Long id) {

View File

@ -211,7 +211,7 @@
</where>
order by create_time DESC
</select>
<select id="selectServicePackageVOListById"
<select id="selectServicePackageVoListById"
resultType="com.xinelu.manage.vo.servicepackagecontent.ServicePackageContentVO">
select spc1.id,
spc1.service_way_name,

View File

@ -223,35 +223,6 @@
</if>
</where>
</select>
<select id="countByDTOAndContentId" resultType="java.lang.Integer">
select count(*)
from service_way_content swc1
left join
service_way_content swc2 on swc1.id = swc2.service_way_id
left join service_way_content swc3 on swc2.id = swc3.service_content_id
<where>
swc1.service_type = 'SERVICE_WRY'
and swc2.service_type = 'SERVICE_CONTENT'
and swc3.service_type = 'SERVICE_FREQUENCY'
and swc1.id = #{DTO.id} and swc2.id = #{id}
<if test="serviceFrequencyType != null and serviceFrequencyType != ''">
and service_frequency_type =
#{serviceFrequencyType}
</if>
<if test="serviceFrequencyText != null and serviceFrequencyText != ''">
and service_frequency_text =
#{serviceFrequencyText}
</if>
<if test="serviceFrequencyStart != null ">
and service_frequency_start =
#{serviceFrequencyStart}
</if>
<if test="serviceFrequencyEnd != null ">
and service_frequency_end =
#{serviceFrequencyEnd}
</if>
</where>
</select>
<select id="countByEditDTO" resultType="java.lang.Integer"
parameterType="com.xinelu.manage.dto.servicewaycontent.ServiceWayContentEditDTO">
select count(*)

View File

@ -5,68 +5,86 @@
<mapper namespace="com.xinelu.manage.mapper.specialdiseaseroute.SpecialDiseaseRouteMapper">
<resultMap type="SpecialDiseaseRoute" id="SpecialDiseaseRouteResult">
<result property="id" column="id"/>
<result property="departmentId" column="department_id"/>
<result property="departmentName" column="department_name"/>
<result property="diseaseTypeId" column="disease_type_id"/>
<result property="diseaseTypeName" column="disease_type_name"/>
<result property="routeName" column="route_name"/>
<result property="routeCode" column="route_code"/>
<result property="version" column="version"/>
<result property="routeClassify" column="route_classify"/>
<result property="releaseStatus" column="release_status"/>
<result property="suitRange" column="suit_range"/>
<result property="routeSort" column="route_sort"/>
<result property="routeRemark" column="route_remark"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="id" column="id"/>
<result property="departmentId" column="department_id"/>
<result property="departmentName" column="department_name"/>
<result property="diseaseTypeId" column="disease_type_id"/>
<result property="diseaseTypeName" column="disease_type_name"/>
<result property="routeName" column="route_name"/>
<result property="routeCode" column="route_code"/>
<result property="version" column="version"/>
<result property="routeClassify" column="route_classify"/>
<result property="releaseStatus" column="release_status"/>
<result property="suitRange" column="suit_range"/>
<result property="routeSort" column="route_sort"/>
<result property="routeRemark" column="route_remark"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
</resultMap>
<sql id="selectSpecialDiseaseRouteVo">
select id, department_id, department_name, disease_type_id, disease_type_name, route_name, route_code, version, route_classify, release_status, suit_range, route_sort, route_remark, create_by, create_time, update_by, update_time from special_disease_route
select id,
department_id,
department_name,
disease_type_id,
disease_type_name,
route_name,
route_code,
version,
route_classify,
release_status,
suit_range,
route_sort,
route_remark,
create_by,
create_time,
update_by,
update_time
from special_disease_route
</sql>
<select id="selectSpecialDiseaseRouteList" parameterType="SpecialDiseaseRoute" resultMap="SpecialDiseaseRouteResult">
<select id="selectSpecialDiseaseRouteList" parameterType="SpecialDiseaseRoute"
resultMap="SpecialDiseaseRouteResult">
<include refid="selectSpecialDiseaseRouteVo"/>
<where>
<if test="departmentId != null ">
and department_id = #{departmentId}
</if>
<if test="departmentName != null and departmentName != ''">
and department_name like concat('%', #{departmentName}, '%')
</if>
<if test="diseaseTypeId != null ">
and disease_type_id = #{diseaseTypeId}
</if>
<if test="diseaseTypeName != null and diseaseTypeName != ''">
and disease_type_name like concat('%', #{diseaseTypeName}, '%')
</if>
<if test="routeName != null and routeName != ''">
and route_name like concat('%', #{routeName}, '%')
</if>
<if test="routeCode != null and routeCode != ''">
and route_code = #{routeCode}
</if>
<if test="version != null and version != ''">
and version = #{version}
</if>
<if test="routeClassify != null and routeClassify != ''">
and route_classify = #{routeClassify}
</if>
<if test="releaseStatus != null and releaseStatus != ''">
and release_status = #{releaseStatus}
</if>
<if test="suitRange != null and suitRange != ''">
and suit_range = #{suitRange}
</if>
<if test="routeSort != null ">
and route_sort = #{routeSort}
</if>
<if test="routeRemark != null and routeRemark != ''">
and route_remark = #{routeRemark}
</if>
<if test="departmentId != null ">
and department_id = #{departmentId}
</if>
<if test="departmentName != null and departmentName != ''">
and department_name like concat('%', #{departmentName}, '%')
</if>
<if test="diseaseTypeId != null ">
and disease_type_id = #{diseaseTypeId}
</if>
<if test="diseaseTypeName != null and diseaseTypeName != ''">
and disease_type_name like concat('%', #{diseaseTypeName}, '%')
</if>
<if test="routeName != null and routeName != ''">
and route_name like concat('%', #{routeName}, '%')
</if>
<if test="routeCode != null and routeCode != ''">
and route_code = #{routeCode}
</if>
<if test="version != null and version != ''">
and version = #{version}
</if>
<if test="routeClassify != null and routeClassify != ''">
and route_classify = #{routeClassify}
</if>
<if test="releaseStatus != null and releaseStatus != ''">
and release_status = #{releaseStatus}
</if>
<if test="suitRange != null and suitRange != ''">
and suit_range = #{suitRange}
</if>
<if test="routeSort != null ">
and route_sort = #{routeSort}
</if>
<if test="routeRemark != null and routeRemark != ''">
and route_remark = #{routeRemark}
</if>
</where>
</select>
@ -80,132 +98,134 @@
keyProperty="id">
insert into special_disease_route
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="departmentId != null">department_id,
</if>
<if test="departmentName != null">department_name,
</if>
<if test="diseaseTypeId != null">disease_type_id,
</if>
<if test="diseaseTypeName != null">disease_type_name,
</if>
<if test="routeName != null">route_name,
</if>
<if test="routeCode != null">route_code,
</if>
<if test="version != null">version,
</if>
<if test="routeClassify != null">route_classify,
</if>
<if test="releaseStatus != null">release_status,
</if>
<if test="suitRange != null">suit_range,
</if>
<if test="routeSort != null">route_sort,
</if>
<if test="routeRemark != null">route_remark,
</if>
<if test="createBy != null">create_by,
</if>
<if test="createTime != null">create_time,
</if>
<if test="updateBy != null">update_by,
</if>
<if test="updateTime != null">update_time,
</if>
<if test="departmentId != null">department_id,
</if>
<if test="departmentName != null">department_name,
</if>
<if test="diseaseTypeId != null">disease_type_id,
</if>
<if test="diseaseTypeName != null">disease_type_name,
</if>
<if test="routeName != null">route_name,
</if>
<if test="routeCode != null">route_code,
</if>
<if test="version != null">version,
</if>
<if test="routeClassify != null">route_classify,
</if>
<if test="releaseStatus != null">release_status,
</if>
<if test="suitRange != null">suit_range,
</if>
<if test="routeSort != null">route_sort,
</if>
<if test="routeRemark != null">route_remark,
</if>
<if test="createBy != null">create_by,
</if>
<if test="createTime != null">create_time,
</if>
<if test="updateBy != null">update_by,
</if>
<if test="updateTime != null">update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="departmentId != null">#{departmentId},
</if>
<if test="departmentName != null">#{departmentName},
</if>
<if test="diseaseTypeId != null">#{diseaseTypeId},
</if>
<if test="diseaseTypeName != null">#{diseaseTypeName},
</if>
<if test="routeName != null">#{routeName},
</if>
<if test="routeCode != null">#{routeCode},
</if>
<if test="version != null">#{version},
</if>
<if test="routeClassify != null">#{routeClassify},
</if>
<if test="releaseStatus != null">#{releaseStatus},
</if>
<if test="suitRange != null">#{suitRange},
</if>
<if test="routeSort != null">#{routeSort},
</if>
<if test="routeRemark != null">#{routeRemark},
</if>
<if test="createBy != null">#{createBy},
</if>
<if test="createTime != null">#{createTime},
</if>
<if test="updateBy != null">#{updateBy},
</if>
<if test="updateTime != null">#{updateTime},
</if>
<if test="departmentId != null">#{departmentId},
</if>
<if test="departmentName != null">#{departmentName},
</if>
<if test="diseaseTypeId != null">#{diseaseTypeId},
</if>
<if test="diseaseTypeName != null">#{diseaseTypeName},
</if>
<if test="routeName != null">#{routeName},
</if>
<if test="routeCode != null">#{routeCode},
</if>
<if test="version != null">#{version},
</if>
<if test="routeClassify != null">#{routeClassify},
</if>
<if test="releaseStatus != null">#{releaseStatus},
</if>
<if test="suitRange != null">#{suitRange},
</if>
<if test="routeSort != null">#{routeSort},
</if>
<if test="routeRemark != null">#{routeRemark},
</if>
<if test="createBy != null">#{createBy},
</if>
<if test="createTime != null">#{createTime},
</if>
<if test="updateBy != null">#{updateBy},
</if>
<if test="updateTime != null">#{updateTime},
</if>
</trim>
</insert>
<update id="updateSpecialDiseaseRoute" parameterType="SpecialDiseaseRoute">
update special_disease_route
<trim prefix="SET" suffixOverrides=",">
<if test="departmentId != null">department_id =
#{departmentId},
</if>
<if test="departmentName != null">department_name =
#{departmentName},
</if>
<if test="diseaseTypeId != null">disease_type_id =
#{diseaseTypeId},
</if>
<if test="diseaseTypeName != null">disease_type_name =
#{diseaseTypeName},
</if>
<if test="routeName != null">route_name =
#{routeName},
</if>
<if test="routeCode != null">route_code =
#{routeCode},
</if>
<if test="version != null">version =
#{version},
</if>
<if test="routeClassify != null">route_classify =
#{routeClassify},
</if>
<if test="releaseStatus != null">release_status =
#{releaseStatus},
</if>
<if test="suitRange != null">suit_range =
#{suitRange},
</if>
<if test="routeSort != null">route_sort =
#{routeSort},
</if>
<if test="routeRemark != null">route_remark =
#{routeRemark},
</if>
<if test="createBy != null">create_by =
#{createBy},
</if>
<if test="createTime != null">create_time =
#{createTime},
</if>
<if test="updateBy != null">update_by =
#{updateBy},
</if>
<if test="updateTime != null">update_time =
#{updateTime},
</if>
<if test="departmentId != null">department_id =
#{departmentId},
</if>
<if test="departmentName != null">department_name =
#{departmentName},
</if>
<if test="diseaseTypeId != null">disease_type_id =
#{diseaseTypeId},
</if>
<if test="diseaseTypeName != null">disease_type_name =
#{diseaseTypeName},
</if>
<if test="routeName != null">route_name =
#{routeName},
</if>
<if test="routeCode != null">route_code =
#{routeCode},
</if>
<if test="version != null">version =
#{version},
</if>
<if test="routeClassify != null">route_classify =
#{routeClassify},
</if>
<if test="releaseStatus != null">release_status =
#{releaseStatus},
</if>
<if test="suitRange != null">suit_range =
#{suitRange},
</if>
<if test="routeSort != null">route_sort =
#{routeSort},
</if>
<if test="routeRemark != null">route_remark =
#{routeRemark},
</if>
<if test="createBy != null">create_by =
#{createBy},
</if>
<if test="createTime != null">create_time =
#{createTime},
</if>
<if test="updateBy != null">update_by =
#{updateBy},
</if>
<if test="updateTime != null">update_time =
#{updateTime},
</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSpecialDiseaseRouteById" parameterType="Long">
delete from special_disease_route where id = #{id}
delete
from special_disease_route
where id = #{id}
</delete>
<delete id="deleteSpecialDiseaseRouteByIds" parameterType="String">
@ -214,4 +234,18 @@
#{id}
</foreach>
</delete>
<select id="departmentRouteByDepartmentName" resultType="com.xinelu.manage.vo.department.DepartmentVO">
select dt.id,
dt.department_name,
dt.department_code,
count(sdr.id) AS countNum
from department dt left join special_disease_route sdr on dt.id = sdr.department_id
<where>
<if test="departmentName != null and departmentName != ''">
dt.department_name like concat('%',#{departmentName},'%')
</if>
</where>
GROUP BY dt.id
</select>
</mapper>

View File

@ -0,0 +1,190 @@
<?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.xinelu.manage.mapper.specialdiseasetriggercondition.SpecialDiseaseTriggerConditionMapper">
<resultMap type="SpecialDiseaseTriggerCondition" id="SpecialDiseaseTriggerConditionResult">
<result property="id" column="id"/>
<result property="routeId" column="route_id"/>
<result property="routeName" column="route_name"/>
<result property="triggerConditionCode" column="trigger_condition_code"/>
<result property="triggerConditionName" column="trigger_condition_name"/>
<result property="triggerConditionOperator" column="trigger_condition_operator"/>
<result property="triggerConditionValue" column="trigger_condition_value"/>
<result property="triggerConditionSort" column="trigger_condition_sort"/>
<result property="triggerConditionRemark" column="trigger_condition_remark"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
</resultMap>
<sql id="selectSpecialDiseaseTriggerConditionVo">
select id,
route_id,
route_name,
trigger_condition_code,
trigger_condition_name,
trigger_condition_operator,
trigger_condition_value,
trigger_condition_sort,
trigger_condition_remark,
create_by,
create_time,
update_by,
update_time
from special_disease_trigger_condition
</sql>
<select id="selectSpecialDiseaseTriggerConditionList" parameterType="SpecialDiseaseTriggerCondition"
resultMap="SpecialDiseaseTriggerConditionResult">
<include refid="selectSpecialDiseaseTriggerConditionVo"/>
<where>
<if test="routeId != null ">
and route_id = #{routeId}
</if>
<if test="routeName != null and routeName != ''">
and route_name like concat('%', #{routeName}, '%')
</if>
<if test="triggerConditionCode != null and triggerConditionCode != ''">
and trigger_condition_code = #{triggerConditionCode}
</if>
<if test="triggerConditionName != null and triggerConditionName != ''">
and trigger_condition_name like concat('%', #{triggerConditionName}, '%')
</if>
<if test="triggerConditionOperator != null and triggerConditionOperator != ''">
and trigger_condition_operator = #{triggerConditionOperator}
</if>
<if test="triggerConditionValue != null and triggerConditionValue != ''">
and trigger_condition_value = #{triggerConditionValue}
</if>
<if test="triggerConditionSort != null ">
and trigger_condition_sort = #{triggerConditionSort}
</if>
<if test="triggerConditionRemark != null and triggerConditionRemark != ''">
and trigger_condition_remark = #{triggerConditionRemark}
</if>
</where>
</select>
<select id="selectSpecialDiseaseTriggerConditionById" parameterType="Long"
resultMap="SpecialDiseaseTriggerConditionResult">
<include refid="selectSpecialDiseaseTriggerConditionVo"/>
where id = #{id}
</select>
<insert id="insertSpecialDiseaseTriggerCondition" parameterType="SpecialDiseaseTriggerCondition"
useGeneratedKeys="true"
keyProperty="id">
insert into special_disease_trigger_condition
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="routeId != null">route_id,
</if>
<if test="routeName != null">route_name,
</if>
<if test="triggerConditionCode != null">trigger_condition_code,
</if>
<if test="triggerConditionName != null">trigger_condition_name,
</if>
<if test="triggerConditionOperator != null">trigger_condition_operator,
</if>
<if test="triggerConditionValue != null">trigger_condition_value,
</if>
<if test="triggerConditionSort != null">trigger_condition_sort,
</if>
<if test="triggerConditionRemark != null">trigger_condition_remark,
</if>
<if test="createBy != null">create_by,
</if>
<if test="createTime != null">create_time,
</if>
<if test="updateBy != null">update_by,
</if>
<if test="updateTime != null">update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="routeId != null">#{routeId},
</if>
<if test="routeName != null">#{routeName},
</if>
<if test="triggerConditionCode != null">#{triggerConditionCode},
</if>
<if test="triggerConditionName != null">#{triggerConditionName},
</if>
<if test="triggerConditionOperator != null">#{triggerConditionOperator},
</if>
<if test="triggerConditionValue != null">#{triggerConditionValue},
</if>
<if test="triggerConditionSort != null">#{triggerConditionSort},
</if>
<if test="triggerConditionRemark != null">#{triggerConditionRemark},
</if>
<if test="createBy != null">#{createBy},
</if>
<if test="createTime != null">#{createTime},
</if>
<if test="updateBy != null">#{updateBy},
</if>
<if test="updateTime != null">#{updateTime},
</if>
</trim>
</insert>
<update id="updateSpecialDiseaseTriggerCondition" parameterType="SpecialDiseaseTriggerCondition">
update special_disease_trigger_condition
<trim prefix="SET" suffixOverrides=",">
<if test="routeId != null">route_id =
#{routeId},
</if>
<if test="routeName != null">route_name =
#{routeName},
</if>
<if test="triggerConditionCode != null">trigger_condition_code =
#{triggerConditionCode},
</if>
<if test="triggerConditionName != null">trigger_condition_name =
#{triggerConditionName},
</if>
<if test="triggerConditionOperator != null">trigger_condition_operator =
#{triggerConditionOperator},
</if>
<if test="triggerConditionValue != null">trigger_condition_value =
#{triggerConditionValue},
</if>
<if test="triggerConditionSort != null">trigger_condition_sort =
#{triggerConditionSort},
</if>
<if test="triggerConditionRemark != null">trigger_condition_remark =
#{triggerConditionRemark},
</if>
<if test="createBy != null">create_by =
#{createBy},
</if>
<if test="createTime != null">create_time =
#{createTime},
</if>
<if test="updateBy != null">update_by =
#{updateBy},
</if>
<if test="updateTime != null">update_time =
#{updateTime},
</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSpecialDiseaseTriggerConditionById" parameterType="Long">
delete
from special_disease_trigger_condition
where id = #{id}
</delete>
<delete id="deleteSpecialDiseaseTriggerConditionByIds" parameterType="String">
delete from special_disease_trigger_condition where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>