|
|
|
@ -4,7 +4,6 @@ import java.util.List;
|
|
|
|
|
|
|
|
|
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
|
|
import com.op.common.core.utils.DateUtils;
|
|
|
|
|
import com.op.common.core.utils.uuid.IdUtils;
|
|
|
|
|
import com.op.common.security.utils.SecurityUtils;
|
|
|
|
|
import com.op.system.api.domain.SysNoticeGroup;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
@ -32,8 +31,9 @@ public class SysNoticeGroupServiceImpl implements ISysNoticeGroupService {
|
|
|
|
|
* @return 通知公告-班组
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public SysNoticeGroup selectSysNoticeGroupById(Long id) {
|
|
|
|
|
return sysNoticeGroupMapper.selectSysNoticeGroupById(id);
|
|
|
|
|
@DS("#header.poolName")
|
|
|
|
|
public List<SysNoticeGroup> selectByNoticeId(String id) {
|
|
|
|
|
return sysNoticeGroupMapper.selectByNoticeId(id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -63,11 +63,13 @@ public class SysNoticeGroupServiceImpl implements ISysNoticeGroupService {
|
|
|
|
|
String[] groupNames = sysNoticeGroup.getGroupNames();
|
|
|
|
|
Long noticeId = sysNoticeGroup.getNoticeId();
|
|
|
|
|
String username = SecurityUtils.getUsername();
|
|
|
|
|
// 绑定前先清空旧数据
|
|
|
|
|
sysNoticeGroupMapper.deleteByNotice(sysNoticeGroup);
|
|
|
|
|
|
|
|
|
|
Long serialId = getSerialId();
|
|
|
|
|
int count = 0;
|
|
|
|
|
for (int i = 0; i < groupCodes.length; i++) {
|
|
|
|
|
sysNoticeGroup.setId(serialId++);
|
|
|
|
|
sysNoticeGroup.setId(String.valueOf(serialId++));
|
|
|
|
|
sysNoticeGroup.setNoticeId(noticeId);
|
|
|
|
|
sysNoticeGroup.setGroupCode(groupCodes[i]);
|
|
|
|
|
sysNoticeGroup.setGroupName(groupNames[i]);
|
|
|
|
@ -112,6 +114,17 @@ public class SysNoticeGroupServiceImpl implements ISysNoticeGroupService {
|
|
|
|
|
return sysNoticeGroupMapper.deleteSysNoticeGroupById(id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<SysNoticeGroup> validData(SysNoticeGroup sysNoticeGroup) {
|
|
|
|
|
return sysNoticeGroupMapper.validData(sysNoticeGroup);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@DS("#header.poolName")
|
|
|
|
|
public int deleteByNoticeId(SysNoticeGroup sysNoticeGroup) {
|
|
|
|
|
return sysNoticeGroupMapper.deleteByNotice(sysNoticeGroup);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@DS("#header.poolName")
|
|
|
|
|
private Long getSerialId() {
|
|
|
|
|
String dateToStr = DateUtils.parseDateToStr(DateUtils.YYYYMMDD, DateUtils.getNowDate());
|
|
|
|
|