|
|
@ -114,18 +114,18 @@ public class AsServiceGroupService extends MybatisBaseService<AsServiceGroupMapp |
|
|
|
return p; |
|
|
|
} |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(query.getGroupName())){ |
|
|
|
qw.like("asg.groupName",query.getGroupName()); |
|
|
|
if (StringUtils.isNotBlank(query.getGroupName())) { |
|
|
|
qw.like("asg.groupName", query.getGroupName()); |
|
|
|
} |
|
|
|
qw.orderByAsc("asg.sortNo"); |
|
|
|
qw.eq("asg.isDelete",0); |
|
|
|
qw.eq("asg.isDelete", 0); |
|
|
|
IPage<AsServiceGroup> page = PagerUtil.queryToPage(pq); |
|
|
|
IPage<AsServiceGroupVo> pagging = baseMapper.selectPageVo(page, qw); |
|
|
|
PagerVo<AsServiceGroupVo> p = PagerUtil.pageToVo(pagging, null); |
|
|
|
return p; |
|
|
|
} |
|
|
|
|
|
|
|
public ResultBean saveOrUpdateDto(AsServiceGroupDto dto){ |
|
|
|
public ResultBean saveOrUpdateDto(AsServiceGroupDto dto) { |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
String dtoSid = dto.getSid(); |
|
|
|
if (StringUtils.isBlank(dtoSid)) { |
|
|
@ -159,27 +159,27 @@ public class AsServiceGroupService extends MybatisBaseService<AsServiceGroupMapp |
|
|
|
} |
|
|
|
} |
|
|
|
int i = baseMapper.checkByCodeAndUseOrgSid(dto.getGroupName(), dto.getUseOrgSid()); |
|
|
|
if (i > 0){ |
|
|
|
if (i > 0) { |
|
|
|
return rb.setMsg("编码已存在"); |
|
|
|
} |
|
|
|
this.insertByDto(dto); |
|
|
|
return rb.success(); |
|
|
|
} |
|
|
|
int i = baseMapper.checkSidByCodeAndUseOrgSid(dto.getGroupName(), dto.getUseOrgSid(),dtoSid); |
|
|
|
if (i > 0){ |
|
|
|
int i = baseMapper.checkSidByCodeAndUseOrgSid(dto.getGroupName(), dto.getUseOrgSid(), dtoSid); |
|
|
|
if (i > 0) { |
|
|
|
return rb.setMsg("编码已存在"); |
|
|
|
} |
|
|
|
this.updateByDto(dto); |
|
|
|
return rb.success(); |
|
|
|
} |
|
|
|
|
|
|
|
public void insertByDto(AsServiceGroupDto dto){ |
|
|
|
public void insertByDto(AsServiceGroupDto dto) { |
|
|
|
AsServiceGroup entity = new AsServiceGroup(); |
|
|
|
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|
|
|
baseMapper.insert(entity); |
|
|
|
} |
|
|
|
|
|
|
|
public void updateByDto(AsServiceGroupDto dto){ |
|
|
|
public void updateByDto(AsServiceGroupDto dto) { |
|
|
|
String dtoSid = dto.getSid(); |
|
|
|
if (StringUtils.isBlank(dtoSid)) { |
|
|
|
return; |
|
|
@ -189,22 +189,17 @@ public class AsServiceGroupService extends MybatisBaseService<AsServiceGroupMapp |
|
|
|
baseMapper.updateById(entity); |
|
|
|
} |
|
|
|
|
|
|
|
public AsServiceGroupDetailsVo fetchDetailsVoBySid(String sid){ |
|
|
|
public AsServiceGroupDetailsVo fetchDetailsVoBySid(String sid) { |
|
|
|
AsServiceGroup entity = baseMapper.fetchIsDeleteBySid(sid); |
|
|
|
AsServiceGroupDetailsVo vo = new AsServiceGroupDetailsVo(); |
|
|
|
BeanUtil.copyProperties(entity, vo); |
|
|
|
return vo; |
|
|
|
} |
|
|
|
|
|
|
|
public List<AsServiceGroupListVo> getGroupList(String orgPath) { |
|
|
|
ResultBean<String> orgSidByPath = sysStaffOrgFeign.getOrgSidByPath(orgPath); |
|
|
|
if (orgSidByPath.getSuccess()) { |
|
|
|
String useOrgSid = orgSidByPath.getData(); |
|
|
|
public List<AsServiceGroupListVo> getGroupList(String useOrgSid) { |
|
|
|
List<AsServiceGroupListVo> list = baseMapper.getGroupList(useOrgSid); |
|
|
|
return list; |
|
|
|
} |
|
|
|
return new ArrayList<>(); |
|
|
|
} |
|
|
|
|
|
|
|
public void delete(String[] sids) { |
|
|
|
for (String sid : sids) { |
|
|
|