Merge remote-tracking branch 'origin/dev' into 3.11_院后第二增量

This commit is contained in:
zhangheng 2024-03-18 16:38:59 +08:00
commit 151ecf36a0
55 changed files with 1255 additions and 1074 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

@ -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,13 +4,17 @@ 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 {
@ -65,12 +69,12 @@ public class ProjectDevice extends BaseEntity {
*/
@ApiModelProperty("设备绑定时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date deviceBindTime;
private LocalDateTime deviceBindTime;
/**
* 设备解绑时间
*/
@ApiModelProperty("设备解绑时间")
private Date deviceUnbindTime;
private LocalDateTime deviceUnbindTime;
/**
* 设备IP地址
*/

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
*/
@ -47,15 +50,21 @@ public class SignPatientRecord extends BaseEntity {
@ApiModelProperty(value = "患者电话")
private String patientPhone;
/** 身份证号 */
/**
* 身份证号
*/
@ApiModelProperty(value = "身份证号")
private String cardNo;
/** 性别 */
/**
* 性别
*/
@ApiModelProperty(value = "性别")
private String sex;
/** 出生日期格式yyyy-MM-dd */
/**
* 出生日期格式yyyy-MM-dd
*/
@ApiModelProperty(value = "出生日期格式yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date birthDate;
@ -65,7 +74,7 @@ public class SignPatientRecord extends BaseEntity {
*/
@ApiModelProperty(value = "签约时间格式yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date signTime;
private LocalDateTime signTime;
/**
* 签约时所属医院id

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

@ -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,7 +51,7 @@ public class CrowdInfoServiceImpl implements ICrowdInfoService {
*/
@Override
public int insertCrowdInfo(CrowdInfo crowdInfo) {
crowdInfo.setCreateTime(DateUtils.getNowDate());
crowdInfo.setCreateTime(LocalDateTime.now());
crowdInfo.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
return crowdInfoMapper.insertCrowdInfo(crowdInfo);
}
@ -63,7 +64,7 @@ public class CrowdInfoServiceImpl implements ICrowdInfoService {
*/
@Override
public int updateCrowdInfo(CrowdInfo crowdInfo) {
crowdInfo.setUpdateTime(DateUtils.getNowDate());
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

@ -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);
}
@ -133,7 +133,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

@ -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);
}
@ -147,7 +147,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,7 +51,7 @@ public class MaterialsInfoServiceImpl implements IMaterialsInfoService {
*/
@Override
public int insertMaterialsInfo(MaterialsInfo materialsInfo) {
materialsInfo.setCreateTime(DateUtils.getNowDate());
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业务层处理
*
@ -78,7 +80,7 @@ public class PatientBlacklistServiceImpl implements IPatientBlacklistService {
BeanUtils.copyBeanProp(patientBlacklist, blacklistSaveDto);
patientBlacklist.setPatientId(patientList.get(0).getId());
patientBlacklist.setDelFlag(0);
patientBlacklist.setCreateTime(DateUtils.getNowDate());
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);
}
@ -116,7 +118,7 @@ public class PatientBlacklistServiceImpl implements IPatientBlacklistService {
PatientBlacklist patientBlacklist = new PatientBlacklist();
patientBlacklist.setId(id);
patientBlacklist.setDelFlag(1);
patientBlacklist.setUpdateTime(new Date());
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,7 +50,7 @@ public class PatientBlacklistAbnormalCauseServiceImpl implements IPatientBlackli
*/
@Override
public int insertPatientBlacklistAbnormalCause(PatientBlacklistAbnormalCause patientBlacklistAbnormalCause) {
patientBlacklistAbnormalCause.setCreateTime(DateUtils.getNowDate());
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,7 +52,7 @@ public class PatientInfoServiceImpl implements IPatientInfoService {
*/
@Override
public int insertPatientInfo(PatientInfo patientInfo) {
patientInfo.setCreateTime(DateUtils.getNowDate());
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,20 +18,22 @@ 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 {
@ -51,7 +52,8 @@ public class PatientPreHospitalizationServiceImpl implements IPatientPreHospital
@Resource
private RegexUtil regexUtil;
@Override public int insert(PatientPreHospitalization preHospitalization) {
@Override
public int insert(PatientPreHospitalization preHospitalization) {
// 根据身份证号查询是否有患者信息
PatientInfoDto patientInfoDto = new PatientInfoDto();
patientInfoDto.setCardNo(preHospitalization.getCardNo());
@ -61,7 +63,7 @@ public class PatientPreHospitalizationServiceImpl implements IPatientPreHospital
PatientInfo patientInfo = new PatientInfo();
BeanUtils.copyBeanProp(patientInfo, preHospitalization);
patientInfo.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
patientInfo.setCreateTime(DateUtils.getNowDate());
patientInfo.setCreateTime(LocalDateTime.now());
patientInfo.setDelFlag(0);
patientInfo.setPatientType(PatientTypeConstants.PRE_HOSPITALIZED_PATIENT);
patientInfoMapper.insertPatientInfo(patientInfo);
@ -71,7 +73,7 @@ public class PatientPreHospitalizationServiceImpl implements IPatientPreHospital
PatientInfo patientInfo = patientList.get(0);
BeanUtils.copyBeanProp(patientInfo, preHospitalization);
patientInfo.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName());
patientInfo.setUpdateTime(DateUtils.getNowDate());
patientInfo.setUpdateTime(LocalDateTime.now());
patientInfo.setDelFlag(0);
patientInfo.setPatientType(PatientTypeConstants.PRE_HOSPITALIZED_PATIENT);
patientInfoMapper.updatePatientInfo(patientInfo);
@ -80,15 +82,17 @@ public class PatientPreHospitalizationServiceImpl implements IPatientPreHospital
// 保存预住院信息
preHospitalization.setDelFlag(0);
preHospitalization.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
preHospitalization.setCreateTime(DateUtils.getNowDate());
preHospitalization.setCreateTime(LocalDateTime.now());
return preHospitalizationMapper.insertSelective(preHospitalization);
}
@Override public List<PatientPreHospitalization> selectList(PatientInfoDto patientInfo) {
@Override
public List<PatientPreHospitalization> selectList(PatientInfoDto patientInfo) {
return preHospitalizationMapper.selectList(patientInfo);
}
@Override public int update(PatientPreHospitalization preHospitalization) {
@Override
public int update(PatientPreHospitalization preHospitalization) {
// 修改患者信息
PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(preHospitalization.getPatientId());
Long patientId = patientInfo.getId();
@ -102,15 +106,18 @@ public class PatientPreHospitalizationServiceImpl implements IPatientPreHospital
}
@Override public int deleteByIds(Long[] ids) {
@Override
public int deleteByIds(Long[] ids) {
return preHospitalizationMapper.deleteByIds(ids);
}
@Override public PatientPreHospitalization getById(Long id) {
@Override
public PatientPreHospitalization getById(Long id) {
return preHospitalizationMapper.selectByPrimaryKey(id);
}
@Override public AjaxResult importList(List<PatientPreHospitalization> patientList) {
@Override
public AjaxResult importList(List<PatientPreHospitalization> patientList) {
//判断添加的数据是否为空
if (CollectionUtils.isEmpty(patientList)) {
return AjaxResult.error("请添加预住院患者导入信息!");
@ -180,7 +187,7 @@ public class PatientPreHospitalizationServiceImpl implements IPatientPreHospital
}
}
preHospitalization.setCreateTime(DateUtils.getNowDate());
preHospitalization.setCreateTime(LocalDateTime.now());
preHospitalization.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
// 根据身份证号查询患者信息

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,7 +50,7 @@ public class PatientPropagandaServiceImpl implements IPatientPropagandaService {
*/
@Override
public int insertPatientPropaganda(PatientPropaganda patientPropaganda) {
patientPropaganda.setCreateTime(DateUtils.getNowDate());
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,7 +32,8 @@ public class PatientVisitInHospitalServiceImpl implements IPatientVisitInHospita
return patientVisitInHospitalMapper.selectPatientVisitInHospitalById(id);
}
@Override public PatientVisitInHospital getByVisitRecord(Long patientVisitRecordId) {
@Override
public PatientVisitInHospital getByVisitRecord(Long patientVisitRecordId) {
PatientVisitInHospital patientVisitInHospital = new PatientVisitInHospital();
patientVisitInHospital.setPatientVisitRecordId(patientVisitRecordId);
List<PatientVisitInHospital> list = patientVisitInHospitalMapper.selectPatientVisitInHospitalList(patientVisitInHospital);
@ -60,7 +62,7 @@ public class PatientVisitInHospitalServiceImpl implements IPatientVisitInHospita
*/
@Override
public int insertPatientVisitInHospital(PatientVisitInHospital patientVisitInHospital) {
patientVisitInHospital.setCreateTime(DateUtils.getNowDate());
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,7 +43,8 @@ public class PatientVisitOperationServiceImpl implements IPatientVisitOperationS
return patientVisitOperationMapper.selectPatientVisitOperationList(patientVisitOperation);
}
@Override public PatientVisitOperation getByVisitRecord(Long patientVisitRecordId) {
@Override
public PatientVisitOperation getByVisitRecord(Long patientVisitRecordId) {
PatientVisitOperation patientVisitOperation = new PatientVisitOperation();
patientVisitOperation.setPatientVisitRecordId(patientVisitRecordId);
List<PatientVisitOperation> operations = patientVisitOperationMapper.selectPatientVisitOperationList(patientVisitOperation);
@ -60,7 +62,7 @@ public class PatientVisitOperationServiceImpl implements IPatientVisitOperationS
*/
@Override
public int insertPatientVisitOperation(PatientVisitOperation patientVisitOperation) {
patientVisitOperation.setCreateTime(DateUtils.getNowDate());
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,7 +44,8 @@ public class PatientVisitOutHospitalServiceImpl implements IPatientVisitOutHospi
return patientVisitOutHospitalMapper.selectPatientVisitOutHospitalList(patientVisitOutHospital);
}
@Override public PatientVisitOutHospital getByVisitRecord(Long patientVisitRecordId) {
@Override
public PatientVisitOutHospital getByVisitRecord(Long patientVisitRecordId) {
PatientVisitOutHospital patientVisitOutHospital = new PatientVisitOutHospital();
patientVisitOutHospital.setPatientVisitRecordId(patientVisitRecordId);
List<PatientVisitOutHospital> list = patientVisitOutHospitalMapper.selectPatientVisitOutHospitalList(patientVisitOutHospital);
@ -60,7 +63,7 @@ public class PatientVisitOutHospitalServiceImpl implements IPatientVisitOutHospi
*/
@Override
public int insertPatientVisitOutHospital(PatientVisitOutHospital patientVisitOutHospital) {
patientVisitOutHospital.setCreateTime(DateUtils.getNowDate());
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

@ -5,7 +5,6 @@ import com.xinelu.common.constant.NodeTypeConstants;
import com.xinelu.common.constant.VisitTypeConstants;
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;
@ -23,17 +22,19 @@ import com.xinelu.manage.mapper.department.DepartmentMapper;
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
import com.xinelu.manage.mapper.patientvisitrecord.PatientVisitRecordMapper;
import com.xinelu.manage.service.patientvisitrecord.IPatientVisitRecordService;
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.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.temporal.ChronoUnit;
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;
/**
* 患者就诊记录基本信息Service业务层处理
@ -85,18 +86,19 @@ public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService
@Override
public int insertPatientVisitRecord(PatientVisitRecord patientVisitRecord) {
patientVisitRecord.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
patientVisitRecord.setCreateTime(DateUtils.getNowDate());
patientVisitRecord.setCreateTime(LocalDateTime.now());
return patientVisitRecordMapper.insertPatientVisitRecord(patientVisitRecord);
}
@Override public int saveRecord(PatientVisitRecordSaveDto saveDto) {
@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(DateUtils.getNowDate());
patientVisitRecord.setCreateTime(LocalDateTime.now());
// 住院时间出院时间-入院时间
LocalDate admissionTime = saveDto.getAdmissionTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
LocalDate dischargeTime = saveDto.getDischargeTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
@ -117,7 +119,7 @@ public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService
PatientVisitRecord patientVisitRecord = new PatientVisitRecord();
BeanUtils.copyBeanProp(patientVisitRecord, updDto);
patientVisitRecord.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName());
patientVisitRecord.setUpdateTime(DateUtils.getNowDate());
patientVisitRecord.setUpdateTime(LocalDateTime.now());
// 住院时间出院时间-入院时间
LocalDate admissionTime = updDto.getAdmissionTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
LocalDate dischargeTime = updDto.getDischargeTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
@ -167,7 +169,7 @@ public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService
for (PatientVisitRecordImportDto item : importDataList) {
PatientVisitRecord patientVisitRecord = new PatientVisitRecord();
BeanUtils.copyProperties(item, patientVisitRecord);
patientVisitRecord.setCreateTime(DateUtils.getNowDate());
patientVisitRecord.setCreateTime(LocalDateTime.now());
patientVisitRecord.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
switch (patientType) {
// 在院患者

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业务层处理
*
@ -62,10 +63,10 @@ public class ProjectServiceImpl implements IProjectService {
// 查询是否有相同code的检测项目
List<Project> projects = projectMapper.hasSameCodeProject(null, project.getGroupId(), project.getProjectCode());
if (CollectionUtils.isNotEmpty(projects)) {
throw new ServiceException("已存在编码为【"+project.getProjectCode() +"】的检测项目");
throw new ServiceException("已存在编码为【" + project.getProjectCode() + "】的检测项目");
}
project.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
project.setCreateTime(DateUtils.getNowDate());
project.setCreateTime(LocalDateTime.now());
project.setDelFlag(0);
return projectMapper.insertProject(project);
}
@ -81,10 +82,10 @@ public class ProjectServiceImpl implements IProjectService {
// 查询是否有相同code的检测项目
List<Project> projects = projectMapper.hasSameCodeProject(project.getId(), project.getGroupId(), project.getProjectCode());
if (CollectionUtils.isNotEmpty(projects)) {
throw new ServiceException("已存在编码为【"+project.getProjectCode() +"】的检测项目");
throw new ServiceException("已存在编码为【" + project.getProjectCode() + "】的检测项目");
}
project.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName());
project.setUpdateTime(DateUtils.getNowDate());
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业务层处理
*
@ -64,15 +65,16 @@ public class ProjectGroupServiceImpl implements IProjectGroupService {
// 查询是否有相同编码的项目组
List<ProjectGroup> list = projectGroupMapper.hasSameCodeGroup(null, projectGroup.getGroupCode());
if (CollectionUtils.isNotEmpty(list)) {
throw new ServiceException("已存在编码为【"+projectGroup.getGroupCode() +"】的分组");
throw new ServiceException("已存在编码为【" + projectGroup.getGroupCode() + "】的分组");
}
projectGroup.setCreateTime(DateUtils.getNowDate());
projectGroup.setCreateTime(LocalDateTime.now());
projectGroup.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
projectGroup.setDelFlag(0);
return projectGroupMapper.insertProjectGroup(projectGroup);
}
@Override public int insertList(ProjectGroupSaveListDto saveDto) {
@Override
public int insertList(ProjectGroupSaveListDto saveDto) {
if (ObjectUtils.isNotEmpty(saveDto)) {
List<ProjectGroup> list = saveDto.getList();
if (CollectionUtils.isNotEmpty(list)) {
@ -80,9 +82,9 @@ public class ProjectGroupServiceImpl implements IProjectGroupService {
// 查询是否有相同编码的项目组
List<ProjectGroup> groupList = projectGroupMapper.hasSameCodeGroup(null, projectGroup.getGroupCode());
if (CollectionUtils.isNotEmpty(groupList)) {
throw new ServiceException("已存在编码为【"+projectGroup.getGroupCode() +"】的分组");
throw new ServiceException("已存在编码为【" + projectGroup.getGroupCode() + "】的分组");
}
projectGroup.setCreateTime(DateUtils.getNowDate());
projectGroup.setCreateTime(LocalDateTime.now());
projectGroup.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
projectGroup.setDelFlag(0);
}
@ -106,9 +108,9 @@ public class ProjectGroupServiceImpl implements IProjectGroupService {
// 查询是否有相同编码的项目组
List<ProjectGroup> groupList = projectGroupMapper.hasSameCodeGroup(projectGroup.getId(), projectGroup.getGroupCode());
if (CollectionUtils.isNotEmpty(groupList)) {
throw new ServiceException("已存在编码为【"+projectGroup.getGroupCode() +"】的分组");
throw new ServiceException("已存在编码为【" + projectGroup.getGroupCode() + "】的分组");
}
projectGroup.setUpdateTime(DateUtils.getNowDate());
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,20 +12,22 @@ 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 {
@ -67,7 +68,7 @@ public class ProjectResultServiceImpl implements IProjectResultService {
*/
@Override
public int insertProjectResult(ProjectResult projectResult) {
projectResult.setCreateTime(DateUtils.getNowDate());
projectResult.setCreateTime(LocalDateTime.now());
return projectResultMapper.insertProjectResult(projectResult);
}
@ -79,7 +80,7 @@ public class ProjectResultServiceImpl implements IProjectResultService {
*/
@Override
public int updateProjectResult(ProjectResult projectResult) {
projectResult.setUpdateTime(DateUtils.getNowDate());
projectResult.setUpdateTime(LocalDateTime.now());
return projectResultMapper.updateProjectResult(projectResult);
}

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,7 +55,7 @@ public class PropagandaInfoServiceImpl implements IPropagandaInfoService {
*/
@Override
public int insertPropagandaInfo(PropagandaInfo propagandaInfo) {
propagandaInfo.setCreateTime(DateUtils.getNowDate());
propagandaInfo.setCreateTime(LocalDateTime.now());
return propagandaInfoMapper.insertPropagandaInfo(propagandaInfo);
}
@ -66,14 +67,15 @@ 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) {
@Override
public int copyPropagandaInfo(Long id) {
PropagandaInfo propagandaInfo = propagandaInfoMapper.selectPropagandaInfoById(id);
propagandaInfo.setId(null);
propagandaInfo.setCreateTime(DateUtils.getNowDate());
propagandaInfo.setCreateTime(LocalDateTime.now());
propagandaInfo.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
propagandaInfo.setUpdateTime(null);
propagandaInfo.setUpdateBy(null);
@ -82,7 +84,8 @@ public class PropagandaInfoServiceImpl implements IPropagandaInfoService {
return propagandaInfoMapper.insertPropagandaInfo(propagandaInfo);
}
@Override public int updateStatus(PropagandaUpdateDto propagandaInfo) {
@Override
public int updateStatus(PropagandaUpdateDto propagandaInfo) {
PropagandaInfo body = new PropagandaInfo();
body.setId(propagandaInfo.getId());
body.setPropagandaStatus(propagandaInfo.getPropagandaStatus());
@ -111,7 +114,8 @@ public class PropagandaInfoServiceImpl implements IPropagandaInfoService {
return propagandaInfoMapper.deletePropagandaInfoById(id);
}
@Override public List<DepartmentVO> selectNumByDept(DepartmentDTO 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,7 +50,7 @@ public class PropagandaMaterialsServiceImpl implements IPropagandaMaterialsServi
*/
@Override
public int insertPropagandaMaterials(PropagandaMaterials propagandaMaterials) {
propagandaMaterials.setCreateTime(DateUtils.getNowDate());
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

@ -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

@ -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);
}

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,7 +20,7 @@ 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;
@ -72,11 +71,10 @@ public class ServicePackageServiceImpl implements IServicePackageService {
public TableDataInfo selectServicePackageList(ServicePackage servicePackage) {
pageServiceUtil.startPage();
List<ServicePackageVO> voList = servicePackageMapper.selectServicePackageLists(servicePackage);
voList.stream().map(vo -> {
voList.stream().peek(vo -> {
// 拼接服务包期限+服务包单位
String packageTermAndUnit = vo.getPackageTerm() + vo.getPackageTermUnit();
vo.setPackageTermAndUnit(packageTermAndUnit);
return vo;
}).collect(Collectors.toList());
return pageServiceUtil.getDataTable(voList);
}
@ -96,7 +94,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 +126,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 +151,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 +171,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 +191,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("不能重复添加服务包内容");
}

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

@ -17,12 +17,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.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import java.util.Objects;
@ -75,7 +75,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 +94,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 +106,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 +118,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 +137,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 +163,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 +194,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) {
@ -259,7 +257,7 @@ 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);
}
@ -280,7 +278,7 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService {
}
// 如果不存在执行修改功能
serviceWayContent.setUpdateBy(SecurityUtils.getUsername());
serviceWayContent.setUpdateTime(DateUtils.getNowDate());
serviceWayContent.setUpdateTime(LocalDateTime.now());
return serviceWayContentMapper.updateServiceWay(serviceWayContent);
}

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,7 +50,7 @@ public class SignPatientInformedServiceImpl implements ISignPatientInformedServi
*/
@Override
public int insertSignPatientInformed(SignPatientInformed signPatientInformed) {
signPatientInformed.setCreateTime(DateUtils.getNowDate());
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,7 +50,7 @@ public class SignPatientPackageHardwareServiceImpl implements ISignPatientPackag
*/
@Override
public int insertSignPatientPackageHardware(SignPatientPackageHardware signPatientPackageHardware) {
signPatientPackageHardware.setCreateTime(DateUtils.getNowDate());
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

@ -23,20 +23,22 @@ import com.xinelu.manage.service.signpatientrecord.ISignPatientRecordService;
import com.xinelu.manage.vo.signpatientrecord.SignPatientInfoVo;
import com.xinelu.manage.vo.signpatientrecord.SignPatientListVo;
import com.xinelu.manage.vo.signpatientrecord.SignPatientRecordVo;
import java.util.Calendar;
import java.util.List;
import javax.annotation.Resource;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.Calendar;
import java.util.List;
/**
* @author haown
* @description 针对表sign_patient_record(签约记录表)的数据库操作Service实现
* @createDate 2024-02-28 15:05:02
*/
* @author haown
* @description 针对表sign_patient_record(签约记录表)的数据库操作Service实现
* @createDate 2024-02-28 15:05:02
*/
@Service
public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
@ -56,11 +58,13 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
@Resource
private SignPatientInformedMapper signPatientInformedMapper;
@Override public List<SignPatientListVo> selectList(SignPatientListDto signPatientRecord) {
@Override
public List<SignPatientListVo> selectList(SignPatientListDto signPatientRecord) {
return signPatientRecordMapper.selectList(signPatientRecord);
}
@Override public SignPatientInfoVo getByRecordId(Long id) {
@Override
public SignPatientInfoVo getByRecordId(Long id) {
SignPatientInfoVo signPatientInfoVo = signPatientRecordMapper.getByRecordId(id);
// 根据签约记录主键查询设备列表
SignPatientPackageHardware queryDevice = new SignPatientPackageHardware();
@ -75,7 +79,8 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
return signPatientInfoVo;
}
@Override public List<SignPatientRecordVo> getByPatient(Long patientId) {
@Override
public List<SignPatientRecordVo> getByPatient(Long patientId) {
return signPatientRecordMapper.getByPatient(patientId);
}
@ -96,9 +101,8 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
signPatientRecord.setServiceStatus(SignRecordServiceStatusConstants.SERVICE_CENTER);
signPatientRecord.setDelFlag(0);
signPatientRecord.setPaymentStatus(PaymentStatusConstants.UNPAID_FEES);
signPatientRecord.setSignTime(DateUtils.getNowDate());
signPatientRecord.setSignTime(LocalDateTime.now());
signPatientRecord.setSignStatus(SignRecordServiceStatusConstants.IN_SIGN);
if (signPatientPackage != null) {
signPatientRecord.setPrice(signPatientPackage.getPackagePrice());
} else {
@ -108,13 +112,12 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
patient.setSignPatientRecordId(signPatientRecord.getId());
patient.setSignStatus(SignRecordServiceStatusConstants.IN_SIGN);
patient.setServiceStatus(SignRecordServiceStatusConstants.SERVICE_CENTER);
patient.setSignTime(DateUtils.getNowDate());
patient.setSignTime(LocalDateTime.now());
patientInfoMapper.updatePatientInfo(patient);
// 保存签约记录
int flag = signPatientRecordMapper.insert(signPatientRecord);
if (flag > 0) {
// 保存签约服务包信息
if (signPatientPackage != null) {
signPatientPackage.setSignPatientRecordId(signPatientRecord.getId());
signPatientPackage.setPatientId(signPatientRecord.getPatientId());
signPatientPackage.setPackagePaymentStatus(PaymentStatusConstants.UNPAID_FEES);
@ -144,15 +147,13 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
}
}
signPatientPackageMapper.insertSignPatientPackage(signPatientPackage);
}
// 保存硬件
if (!CollectionUtils.isEmpty(body.getDevices())) {
for(SignPatientPackageHardware hardware : body.getDevices()) {
for (SignPatientPackageHardware hardware : body.getDevices()) {
hardware.setSignPatientRecordId(signPatientRecord.getId());
hardwareMapper.insertSignPatientPackageHardware(hardware);
}
}
// 保存告知书
if (!CollectionUtils.isEmpty(body.getInformeds())) {
for (SignPatientInformed informed : body.getInformeds()) {
@ -179,7 +180,7 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
signRecord.setSignStatus(patientCancelSignDto.getSignStatus());
signRecord.setServiceStatus(patientCancelSignDto.getServiceStatus());
signRecord.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName());
signRecord.setUpdateTime(DateUtils.getNowDate());
signRecord.setUpdateTime(LocalDateTime.now());
signRecord.setSeparateReason(patientCancelSignDto.getSeparateReason());
if (StringUtils.equals(SignRecordServiceStatusConstants.SEPARATE_SIGN, patientCancelSignDto.getSignStatus())) {
@ -189,8 +190,7 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
patient.setServiceStatus(patientCancelSignDto.getServiceStatus());
patientInfoMapper.updatePatientInfo(patient);
}
int flag = signPatientRecordMapper.updateByPrimaryKeySelective(signRecord);
return flag;
return signPatientRecordMapper.updateByPrimaryKeySelective(signRecord);
}
}

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,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

@ -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;
@ -102,7 +101,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 +130,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 +156,7 @@ public class WechatTemplateServiceImpl implements IWechatTemplateService {
}
// 设置修改者和修改时间
String editUsername = SecurityUtils.getUsername();
Date editTime = DateUtils.getNowDate();
LocalDateTime editTime = LocalDateTime.now();
wechatTemplateTaskDTO.setUpdateBy(editUsername);
wechatTemplateTaskDTO.setUpdateTime(editTime);