Merge branch 'dev' into 0418_小程序开发
This commit is contained in:
commit
b27ecd75f7
@ -195,7 +195,7 @@ 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 AGENCY_CODE = "AYC";
|
||||||
|
|
||||||
|
|||||||
@ -27,10 +27,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,9 @@
|
|||||||
package com.xinelu.manage.service.agencycategory.impl;
|
package com.xinelu.manage.service.agencycategory.impl;
|
||||||
|
|
||||||
|
import com.xinelu.common.constant.Constants;
|
||||||
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.codes.GenerateSystemCodeUtil;
|
||||||
import com.xinelu.manage.domain.agencycategory.AgencyCategory;
|
import com.xinelu.manage.domain.agencycategory.AgencyCategory;
|
||||||
import com.xinelu.manage.mapper.agencycategory.AgencyCategoryMapper;
|
import com.xinelu.manage.mapper.agencycategory.AgencyCategoryMapper;
|
||||||
import com.xinelu.manage.service.agencycategory.IAgencyCategoryService;
|
import com.xinelu.manage.service.agencycategory.IAgencyCategoryService;
|
||||||
@ -28,6 +30,8 @@ import java.util.stream.Collectors;
|
|||||||
public class AgencyCategoryServiceImpl implements IAgencyCategoryService {
|
public class AgencyCategoryServiceImpl implements IAgencyCategoryService {
|
||||||
@Resource
|
@Resource
|
||||||
private AgencyCategoryMapper agencyCategoryMapper;
|
private AgencyCategoryMapper agencyCategoryMapper;
|
||||||
|
@Resource
|
||||||
|
private GenerateSystemCodeUtil generateSystemCodeUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询机构类别
|
* 查询机构类别
|
||||||
@ -65,6 +69,7 @@ public class AgencyCategoryServiceImpl implements IAgencyCategoryService {
|
|||||||
}
|
}
|
||||||
agencyCategory.setCreateTime(LocalDateTime.now());
|
agencyCategory.setCreateTime(LocalDateTime.now());
|
||||||
agencyCategory.setCreateBy(SecurityUtils.getUsername());
|
agencyCategory.setCreateBy(SecurityUtils.getUsername());
|
||||||
|
agencyCategory.setCategoryCode(Constants.CATEGORY_CODE + generateSystemCodeUtil.generateSystemCode(Constants.CATEGORY_CODE));
|
||||||
return agencyCategoryMapper.insertAgencyCategory(agencyCategory);
|
return agencyCategoryMapper.insertAgencyCategory(agencyCategory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -124,6 +124,9 @@ public class DepartmentServiceImpl implements IDepartmentService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int updateDepartment(Department department) {
|
public int updateDepartment(Department department) {
|
||||||
|
if (Objects.nonNull(department) && Objects.nonNull(department.getId()) && Objects.nonNull(department.getParentDepartmentId()) && department.getId().equals(department.getParentDepartmentId())) {
|
||||||
|
department.setParentDepartmentId(null);
|
||||||
|
}
|
||||||
department.setUpdateBy(SecurityUtils.getUsername());
|
department.setUpdateBy(SecurityUtils.getUsername());
|
||||||
department.setUpdateTime(LocalDateTime.now());
|
department.setUpdateTime(LocalDateTime.now());
|
||||||
return departmentMapper.updateDepartmentById(department);
|
return departmentMapper.updateDepartmentById(department);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user