|
@@ -16,6 +16,7 @@
|
|
*/
|
|
*/
|
|
package com.qunzhixinxi.hnqz.admin.service.impl;
|
|
package com.qunzhixinxi.hnqz.admin.service.impl;
|
|
|
|
|
|
|
|
+import cn.hutool.core.collection.CollUtil;
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
@@ -82,18 +83,18 @@ public class WmDaDrugEntServiceImpl extends ServiceImpl<WmDaDrugEntMapper, WmDaD
|
|
if(sysDeptService.saveDept(sysDept) > 0){
|
|
if(sysDeptService.saveDept(sysDept) > 0){
|
|
|
|
|
|
Map<String, Integer> subjectTypeAndChannel = entity.getSubjectTypeAndChannel();
|
|
Map<String, Integer> subjectTypeAndChannel = entity.getSubjectTypeAndChannel();
|
|
-
|
|
|
|
- for (Map.Entry<String, Integer> entry : subjectTypeAndChannel.entrySet()){
|
|
|
|
- SysDeptSub deptSub = new SysDeptSub();
|
|
|
|
- deptSub.setDeptId(sysDept.getDeptId());
|
|
|
|
- deptSub.setSubjectChannel(entry.getValue());
|
|
|
|
- deptSub.setSubjectType(entry.getKey());
|
|
|
|
- deptSub.setEnableFlag(SubjectTypeEnum.ENABLE_FLAG_TRUE.getCode());
|
|
|
|
- deptSub.setUpdateTime(sysDept.getCreateTime());
|
|
|
|
- sysDeptSubMapper.insert(deptSub);
|
|
|
|
-
|
|
|
|
|
|
+ if (CollUtil.isNotEmpty(subjectTypeAndChannel)) {
|
|
|
|
+ for (Map.Entry<String, Integer> entry : subjectTypeAndChannel.entrySet()) {
|
|
|
|
+ SysDeptSub deptSub = new SysDeptSub();
|
|
|
|
+ deptSub.setDeptId(sysDept.getDeptId());
|
|
|
|
+ deptSub.setSubjectChannel(entry.getValue());
|
|
|
|
+ deptSub.setSubjectType(entry.getKey());
|
|
|
|
+ deptSub.setEnableFlag(SubjectTypeEnum.ENABLE_FLAG_TRUE.getCode());
|
|
|
|
+ deptSub.setUpdateTime(sysDept.getCreateTime());
|
|
|
|
+ sysDeptSubMapper.insert(deptSub);
|
|
|
|
+
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-
|
|
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
return false;
|
|
@@ -156,14 +157,16 @@ public class WmDaDrugEntServiceImpl extends ServiceImpl<WmDaDrugEntMapper, WmDaD
|
|
sysDeptRelationService.saveBatch(newList);
|
|
sysDeptRelationService.saveBatch(newList);
|
|
|
|
|
|
// 创建结算渠道和通道
|
|
// 创建结算渠道和通道
|
|
- for (Map.Entry<String, Integer> entry : entity.getSubjectTypeAndChannel().entrySet()){
|
|
|
|
- SysDeptSub deptSub = new SysDeptSub();
|
|
|
|
- deptSub.setDeptId(sysDept.getDeptId());
|
|
|
|
- deptSub.setSubjectType(entry.getKey());
|
|
|
|
- deptSub.setSubjectChannel(entry.getValue());
|
|
|
|
- deptSub.setUpdateTime(LocalDateTime.now());
|
|
|
|
- deptSub.setEnableFlag(SubjectTypeEnum.ENABLE_FLAG_TRUE.getCode());
|
|
|
|
- sysDeptSubMapper.insert(deptSub);
|
|
|
|
|
|
+ if (CollUtil.isNotEmpty(entity.getSubjectTypeAndChannel())) {
|
|
|
|
+ for (Map.Entry<String, Integer> entry : entity.getSubjectTypeAndChannel().entrySet()) {
|
|
|
|
+ SysDeptSub deptSub = new SysDeptSub();
|
|
|
|
+ deptSub.setDeptId(sysDept.getDeptId());
|
|
|
|
+ deptSub.setSubjectType(entry.getKey());
|
|
|
|
+ deptSub.setSubjectChannel(entry.getValue());
|
|
|
|
+ deptSub.setUpdateTime(LocalDateTime.now());
|
|
|
|
+ deptSub.setEnableFlag(SubjectTypeEnum.ENABLE_FLAG_TRUE.getCode());
|
|
|
|
+ sysDeptSubMapper.insert(deptSub);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
return true;
|
|
return true;
|