|
|
|
@ -1,15 +1,18 @@
|
|
|
|
|
package cokr.xit.fims.crdn.service.bean;
|
|
|
|
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
|
|
import cokr.xit.base.file.FileInfo;
|
|
|
|
|
import cokr.xit.base.file.service.bean.FileBean;
|
|
|
|
|
import cokr.xit.base.file.web.FileInfoFactory;
|
|
|
|
|
import cokr.xit.fims.cmmn.CrdnSttsHstry;
|
|
|
|
|
import cokr.xit.fims.cmmn.service.bean.CrdnSttsHstryBean;
|
|
|
|
|
import cokr.xit.fims.crdn.Crdn;
|
|
|
|
@ -51,16 +54,12 @@ public class Crdn05ServiceBean extends AbstractServiceBean implements CrdnServic
|
|
|
|
|
return crdn05Mapper.selectCrackdownList(req);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public boolean create(Crdn crdn, List<FileInfo> fileInfoList) {
|
|
|
|
|
crdn.setAtchFileCnt(fileInfoList.size());
|
|
|
|
|
boolean saved = this.create(crdn);
|
|
|
|
|
fileInfoList.forEach(fileInfo -> fileInfo.setInfoType(Crdn.INF_TYPE).setInfoKey(crdn.getCrdnId()));
|
|
|
|
|
fileBean.create(fileInfoList);
|
|
|
|
|
return saved;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public boolean create(Crdn crdn) {
|
|
|
|
|
if(ifEmpty(crdn.getAtchFileCnt(), () -> 0) == 0) {
|
|
|
|
|
public boolean create(Crdn crdn, MultipartFile[] newFileList) {
|
|
|
|
|
List<FileInfo> fileInfoList = new ArrayList<FileInfo>();
|
|
|
|
|
if(newFileList != null) {
|
|
|
|
|
fileInfoList = new FileInfoFactory().makeFileInfos(null, newFileList);
|
|
|
|
|
crdn.setAtchFileCnt(fileInfoList.size());
|
|
|
|
|
} else {
|
|
|
|
|
crdn.setAtchFileCnt(0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -120,8 +119,13 @@ public class Crdn05ServiceBean extends AbstractServiceBean implements CrdnServic
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!fileInfoList.isEmpty()) {
|
|
|
|
|
fileInfoList.forEach(fileInfo -> fileInfo.setInfoType(Crdn.INF_TYPE).setInfoKey(crdn.getCrdnId()));
|
|
|
|
|
fileBean.create(fileInfoList);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|