导入修改

This commit is contained in:
zhangheng 2024-04-19 17:17:55 +08:00
parent 04f54846f6
commit 7f839b4126
6 changed files with 21 additions and 8 deletions

View File

@ -194,6 +194,16 @@ public class Constants {
*/ */
public static final String TASK_STATUS_CODE = "TSC"; public static final String TASK_STATUS_CODE = "TSC";
/**
* 任务状态编码
*/
public static final String AGENCY_CODE = "AYC";
/**
* 任务状态编码
*/
public static final String DEPARTMENT_CODE = "DTC";
/** /**
* 门诊患者 * 门诊患者
*/ */
@ -323,9 +333,4 @@ public class Constants {
* 资讯编码前缀 * 资讯编码前缀
*/ */
public static final String INFO_CODE = "IC"; public static final String INFO_CODE = "IC";
/**
* 科室编码前缀
*/
public static final String DEPARTMENT_CODE = "HDC";
} }

View File

@ -165,7 +165,6 @@ public class Department extends BaseEntity {
*/ */
@ApiModelProperty(value = "成立日期") @ApiModelProperty(value = "成立日期")
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "成立日期", width = 30, dateFormat = "yyyy-MM-dd")
private LocalDate establishDate; private LocalDate establishDate;
/** /**
@ -173,7 +172,6 @@ public class Department extends BaseEntity {
*/ */
@ApiModelProperty(value = "撤销日期") @ApiModelProperty(value = "撤销日期")
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "撤销日期", width = 30, dateFormat = "yyyy-MM-dd")
private LocalDate revokeDate; private LocalDate revokeDate;
@Override @Override

View File

@ -1,10 +1,12 @@
package com.xinelu.manage.service.agency.impl; package com.xinelu.manage.service.agency.impl;
import com.xinelu.common.constant.Constants;
import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.enums.NodeTypeEnum; import com.xinelu.common.enums.NodeTypeEnum;
import com.xinelu.common.exception.ServiceException; import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.common.utils.bean.BeanUtils; import com.xinelu.common.utils.bean.BeanUtils;
import com.xinelu.common.utils.codes.GenerateSystemCodeUtil;
import com.xinelu.common.utils.regex.RegexUtil; import com.xinelu.common.utils.regex.RegexUtil;
import com.xinelu.manage.domain.agency.Agency; import com.xinelu.manage.domain.agency.Agency;
import com.xinelu.manage.domain.department.Department; import com.xinelu.manage.domain.department.Department;
@ -48,6 +50,8 @@ public class AgencyServiceImpl implements IAgencyService {
private SysAreaMapper sysAreaMapper; private SysAreaMapper sysAreaMapper;
@Resource @Resource
private DepartmentMapper departmentMapper; private DepartmentMapper departmentMapper;
@Resource
private GenerateSystemCodeUtil generateSystemCodeUtil;
/** /**
@ -114,6 +118,7 @@ public class AgencyServiceImpl implements IAgencyService {
} }
agency.setCreateTime(LocalDateTime.now()); agency.setCreateTime(LocalDateTime.now());
agency.setCreateBy(SecurityUtils.getUsername()); agency.setCreateBy(SecurityUtils.getUsername());
agency.setAgencyCode(Constants.AGENCY_CODE + generateSystemCodeUtil.generateSystemCode(Constants.AGENCY_CODE));
return AjaxResult.success(agencyMapper.insertAgency(agency)); return AjaxResult.success(agencyMapper.insertAgency(agency));
} }

View File

@ -1,11 +1,13 @@
package com.xinelu.manage.service.department.impl; package com.xinelu.manage.service.department.impl;
import com.xinelu.common.constant.Constants;
import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.core.domain.entity.SysUser; import com.xinelu.common.core.domain.entity.SysUser;
import com.xinelu.common.exception.ServiceException; import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.common.utils.StringUtils; import com.xinelu.common.utils.StringUtils;
import com.xinelu.common.utils.bean.BeanUtils; import com.xinelu.common.utils.bean.BeanUtils;
import com.xinelu.common.utils.codes.GenerateSystemCodeUtil;
import com.xinelu.common.utils.regex.RegexUtil; import com.xinelu.common.utils.regex.RegexUtil;
import com.xinelu.manage.domain.department.Department; import com.xinelu.manage.domain.department.Department;
import com.xinelu.manage.dto.department.DepartmentDTO; import com.xinelu.manage.dto.department.DepartmentDTO;
@ -41,6 +43,8 @@ public class DepartmentServiceImpl implements IDepartmentService {
private RegexUtil regexUtil; private RegexUtil regexUtil;
@Resource @Resource
private SysUserMapper sysUserMapper; private SysUserMapper sysUserMapper;
@Resource
private GenerateSystemCodeUtil generateSystemCodeUtil;
/** /**
* 查询科室信息 * 查询科室信息
@ -108,6 +112,7 @@ public class DepartmentServiceImpl implements IDepartmentService {
} }
department.setCreateTime(LocalDateTime.now()); department.setCreateTime(LocalDateTime.now());
department.setCreateBy(SecurityUtils.getUsername()); department.setCreateBy(SecurityUtils.getUsername());
department.setDepartmentCode(Constants.DEPARTMENT_CODE + generateSystemCodeUtil.generateSystemCode(Constants.DEPARTMENT_CODE));
return departmentMapper.insertDepartment(department); return departmentMapper.insertDepartment(department);
} }

View File

@ -89,7 +89,7 @@ public class InfoCategoryServiceImpl implements IInfoCategoryService {
infocategory.setCreateTime(LocalDateTime.now());//设置添加时间 infocategory.setCreateTime(LocalDateTime.now());//设置添加时间
infocategory.setInfoCategoryCreator(SecurityUtils.getUsername());//设置当前的用户 infocategory.setInfoCategoryCreator(SecurityUtils.getUsername());//设置当前的用户
infocategory.setInfoCategoryType(infocategory.getInfoCategoryName());//类型 无用 直接赋值和名称相同 infocategory.setInfoCategoryType(infocategory.getInfoCategoryName());//类型 无用 直接赋值和名称相同
infocategory.setInfoCategoryCode(Constants.INFO_CATEGORY_CODE + generateSystemCodeUtil.generateSystemCode(Constants.DEPARTMENT_CODE)); infocategory.setInfoCategoryCode(Constants.INFO_CATEGORY_CODE + generateSystemCodeUtil.generateSystemCode(Constants.INFO_CATEGORY_CODE));
} }
int insertCount = infoCategoryMapper.insertInfoCategoryList(infoCategoryDTO.getInfoCategoryList()); int insertCount = infoCategoryMapper.insertInfoCategoryList(infoCategoryDTO.getInfoCategoryList());
if (insertCount < 0) { if (insertCount < 0) {