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