forked from liweijie/education
联教编辑报错
This commit is contained in:
+42
-6
@@ -577,6 +577,7 @@ public class LogServiceImpl implements LogService {
|
||||
@Override
|
||||
@Transactional
|
||||
public void addSubsidyProject(KSBZXM entity) {
|
||||
fillSubsidyProjectDefaults(entity);
|
||||
entity.setCjsj(LocalDateTime.now());
|
||||
entity.setXgsj(LocalDateTime.now());
|
||||
ksbzxmMapper.insert(entity);
|
||||
@@ -622,12 +623,7 @@ public class LogServiceImpl implements LogService {
|
||||
}
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
for (KSBZXM entity : list) {
|
||||
if (entity.getBh() == null || entity.getBh().isEmpty()) {
|
||||
entity.setBh(com.roomroot.jwgl.utils.UuidUtil.getUUID());
|
||||
}
|
||||
if (entity.getXmlx() == null || entity.getXmlx().isEmpty()) {
|
||||
entity.setXmlx("联教联训");
|
||||
}
|
||||
fillSubsidyProjectDefaults(entity);
|
||||
entity.setCjsj(now);
|
||||
entity.setXgsj(now);
|
||||
ksbzxmMapper.insert(entity);
|
||||
@@ -635,6 +631,46 @@ public class LogServiceImpl implements LogService {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
/** 课时补助项目非空列兜底。达梦空串等同 NULL。 */
|
||||
private void fillSubsidyProjectDefaults(KSBZXM entity) {
|
||||
if (entity.getBh() == null || entity.getBh().trim().isEmpty()) {
|
||||
entity.setBh(UuidUtil.getUUID());
|
||||
}
|
||||
if (entity.getMc() == null || entity.getMc().trim().isEmpty()) {
|
||||
throw new ServiceException("名称不能为空");
|
||||
}
|
||||
if (entity.getXmlx() == null || entity.getXmlx().trim().isEmpty()) {
|
||||
entity.setXmlx("联教联训");
|
||||
}
|
||||
if (entity.getXz() == null || entity.getXz().trim().isEmpty()) {
|
||||
entity.setXz("-");
|
||||
}
|
||||
if (entity.getYj() == null || entity.getYj().trim().isEmpty()) {
|
||||
entity.setYj("-");
|
||||
}
|
||||
if (entity.getKslx() == null || entity.getKslx().trim().isEmpty()) {
|
||||
entity.setKslx("-");
|
||||
}
|
||||
if (entity.getSm() == null || entity.getSm().trim().isEmpty()) {
|
||||
entity.setSm("-");
|
||||
}
|
||||
if (entity.getBz() == null || entity.getBz().trim().isEmpty()) {
|
||||
entity.setBz("-");
|
||||
}
|
||||
if (entity.getTs() == null) {
|
||||
entity.setTs(0f);
|
||||
}
|
||||
if (entity.getJbksl() == null) {
|
||||
entity.setJbksl(0f);
|
||||
}
|
||||
if (entity.getTjzt() == null) {
|
||||
entity.setTjzt(0);
|
||||
}
|
||||
if (entity.getSpzt() == null) {
|
||||
entity.setSpzt(0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportSubsidyProject(jakarta.servlet.http.HttpServletResponse response) throws Exception {
|
||||
List<KSBZXM> list = ksbzxmMapper.selectList(
|
||||
|
||||
Reference in New Issue
Block a user