|
@@ -40,10 +40,10 @@ public class CostIncomeGroupSetServiceImpl extends ServiceImpl<CostIncomeGroupSe
|
|
|
/**
|
|
|
* 分页查询
|
|
|
*
|
|
|
- * @param current
|
|
|
- * @param pageSize
|
|
|
- * @param hospId
|
|
|
- * @return
|
|
|
+ * @param current 当前页
|
|
|
+ * @param pageSize 每一页大小
|
|
|
+ * @param hospId 医院Id
|
|
|
+ * @return PageUtils
|
|
|
*/
|
|
|
@Override
|
|
|
public PageUtils queryList(Integer current, Integer pageSize, Long hospId) {
|
|
@@ -75,8 +75,9 @@ public class CostIncomeGroupSetServiceImpl extends ServiceImpl<CostIncomeGroupSe
|
|
|
/**
|
|
|
* 根据Id获取对应的收入归集设置的数据
|
|
|
*
|
|
|
- * @param id
|
|
|
- * @return
|
|
|
+ * @param id 收入归集设置的Id
|
|
|
+ * @param hospId 医院的Id
|
|
|
+ * @return CostIncomeGroupSetVO
|
|
|
*/
|
|
|
@Override
|
|
|
public CostIncomeGroupSetVO getByIncomeGroupId(Long id, Long hospId) {
|
|
@@ -118,8 +119,8 @@ public class CostIncomeGroupSetServiceImpl extends ServiceImpl<CostIncomeGroupSe
|
|
|
|
|
|
/**
|
|
|
* 检验输入的数据是否符合要求
|
|
|
- * @param costIncomeGroupSetSaveDto
|
|
|
- * @param hospId
|
|
|
+ * @param costIncomeGroupSetSaveDto 需要保存的收入归集设置的数据
|
|
|
+ * @param hospId 医院Id
|
|
|
*/
|
|
|
private void checkIncomeGroupSet(CostIncomeGroupSetSaveDto costIncomeGroupSetSaveDto, Long hospId) {
|
|
|
Integer sum = costIncomeGroupSetSaveDto.getOpenDepartmentProportion() + costIncomeGroupSetSaveDto.getStartDepartmentProportion();
|
|
@@ -166,8 +167,8 @@ public class CostIncomeGroupSetServiceImpl extends ServiceImpl<CostIncomeGroupSe
|
|
|
/**
|
|
|
* 修改收入归集设置的数据
|
|
|
*
|
|
|
- * @param costIncomeGroupSetEditDto
|
|
|
- * @param hospId
|
|
|
+ * @param costIncomeGroupSetEditDto 需要修改的收入归集设置的数据
|
|
|
+ * @param hospId 医院Id
|
|
|
*/
|
|
|
@Override
|
|
|
@Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class)
|
|
@@ -192,8 +193,8 @@ public class CostIncomeGroupSetServiceImpl extends ServiceImpl<CostIncomeGroupSe
|
|
|
/**
|
|
|
* 查询当前收入归集设置里面对应的会计科目的Id集合
|
|
|
*
|
|
|
- * @param incomeGroutSetId
|
|
|
- * @return
|
|
|
+ * @param incomeGroutSetId 收入归集设置的Id
|
|
|
+ * @return List<String>
|
|
|
*/
|
|
|
@Override
|
|
|
public List<String> selectIsSelect(Integer incomeGroutSetId) {
|
|
@@ -203,8 +204,7 @@ public class CostIncomeGroupSetServiceImpl extends ServiceImpl<CostIncomeGroupSe
|
|
|
}
|
|
|
String accountCode = incomeGroupSet.getAccountCode();
|
|
|
if (!StringUtils.isEmpty(accountCode)){
|
|
|
- List<String> collect = Arrays.stream(accountCode.split(StrUtil.COMMA)).map(String::valueOf).collect(Collectors.toList());
|
|
|
- return collect;
|
|
|
+ return Arrays.stream(accountCode.split(StrUtil.COMMA)).map(String::valueOf).collect(Collectors.toList());
|
|
|
}else {
|
|
|
return Collections.emptyList();
|
|
|
}
|
|
@@ -212,13 +212,13 @@ public class CostIncomeGroupSetServiceImpl extends ServiceImpl<CostIncomeGroupSe
|
|
|
|
|
|
/**
|
|
|
* 设置对应的排除成本科目
|
|
|
- * @param incomeAccountDto
|
|
|
+ * @param incomeAccountDto 需要排除的会计科目数据对象
|
|
|
*/
|
|
|
@Override
|
|
|
@Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class)
|
|
|
public void updateAccountCode(IncomeAccountDto incomeAccountDto) {
|
|
|
Long id = incomeAccountDto.getId();
|
|
|
- List<String> accountList = Arrays.asList(incomeAccountDto.getAccountCodes());
|
|
|
+ List<String> accountCodeList = Arrays.asList(incomeAccountDto.getAccountCodes());
|
|
|
CostIncomeGroupSet incomeGroupSet = this.getById(id);
|
|
|
if (Objects.isNull(incomeGroupSet)){
|
|
|
throw new CostException(500,"收入归集设置不存在");
|
|
@@ -226,8 +226,8 @@ public class CostIncomeGroupSetServiceImpl extends ServiceImpl<CostIncomeGroupSe
|
|
|
if (NumberConstant.TWO.equals(incomeGroupSet.getOpenDepartmentStatus())|| NumberConstant.TWO.equals(incomeGroupSet.getStartDepartmentStatus())){
|
|
|
throw new CostException(500,"存在成本中心 不允许设置排除的会计科目");
|
|
|
}
|
|
|
- if(CollUtil.isNotEmpty(accountList)){
|
|
|
- String accountCodes = accountList.stream().map(String::valueOf).collect(Collectors.joining(StrUtil.COMMA));
|
|
|
+ if(CollUtil.isNotEmpty(accountCodeList)){
|
|
|
+ String accountCodes = accountCodeList.stream().map(String::valueOf).collect(Collectors.joining(StrUtil.COMMA));
|
|
|
incomeGroupSet.setAccountCode(accountCodes);
|
|
|
}else{
|
|
|
incomeGroupSet.setAccountCode(null);
|