|
|
@ -70,7 +70,8 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeDao, NoticeEntity> |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageData<NoticeDTO> page(Map<String, Object> params) { |
|
|
|
|
|
|
|
String noticeTitle= (String) params.get("noticeTitle"); |
|
|
|
params.put("noticeTitle",noticeTitle.trim()); |
|
|
|
QueryWrapper<NoticeEntity> wrapper = this.getWrapper(params) |
|
|
|
.eq(FieldConstant.CREATED_BY, SecurityUser.getUserId()); |
|
|
|
|
|
|
@ -135,8 +136,6 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeDao, NoticeEntity> |
|
|
|
private void saveOrUpdate(NoticeDTO dto) { |
|
|
|
UserDetail user = SecurityUser.getUser(); |
|
|
|
dto.setCreatorName(user.getRealName()); |
|
|
|
dto.setDeptId(user.getDeptId()); |
|
|
|
dto.setDeptName(user.getDeptName()); |
|
|
|
NoticeEntity entity = ConvertUtils.sourceToTarget(dto, NoticeEntity.class); |
|
|
|
|
|
|
|
List<String> allDeptIds = dto.getAllDeptIdsShow(); |
|
|
@ -154,6 +153,12 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeDao, NoticeEntity> |
|
|
|
entity.setAllDeptNames(deptDTO.getAllDeptNames()); |
|
|
|
entity.setParentDeptIds(deptDTO.getParentDeptIds()); |
|
|
|
entity.setParentDeptNames(deptDTO.getParentDeptNames()); |
|
|
|
//赋值deptid name 最小组织
|
|
|
|
String[] newAllDeptIds=deptDTO.getAllDeptIds().split(","); |
|
|
|
entity.setDeptId(Long.parseLong(newAllDeptIds[newAllDeptIds.length-1])); |
|
|
|
|
|
|
|
String[] newAllDeptNames=deptDTO.getAllDeptNames().split("-"); |
|
|
|
entity.setDeptName(newAllDeptNames[newAllDeptNames.length-1]); |
|
|
|
} |
|
|
|
}else { |
|
|
|
throw new RenException("所属部门不能为空"); |
|
|
|