提交 34abf79b authored 作者: chaoyanjun's avatar chaoyanjun

--no commit message

上级 9e73ca9e
...@@ -548,46 +548,37 @@ public class SelectedSubjectServiceImpl extends BaseServiceImpl<SelectedSubject, ...@@ -548,46 +548,37 @@ public class SelectedSubjectServiceImpl extends BaseServiceImpl<SelectedSubject,
private void saveThriceAuditDetails(SelectedSubject subject, String principal, String principalName,Copyright copyright) { private void saveThriceAuditDetails(SelectedSubject subject, String principal, String principalName,Copyright copyright) {
ThriceAudit thriceAudit = new ThriceAudit(); ThriceAudit thriceAudit = new ThriceAudit();
thriceAudit.setSubjectNum(subject.getSubjectNum()); thriceAudit.setSubjectNum(subject.getSubjectNum());
thriceAudit.setBookType("1");
List<ThriceAudit> list = thriceAuditMapper.select(thriceAudit); List<ThriceAudit> list = thriceAuditMapper.select(thriceAudit);
if (ArrayUtils.empty(list)){ if (ArrayUtils.isNotEmpty(list)){
BeanUtils.copyProperties(subject, thriceAudit, "id"); list.forEach(v ->{
thriceAudit.setStatus(ThriceAuditEnum.PENDING_PERFECT.getCode()); thriceAuditMapper.delete(v);
thriceAudit.setPrincipal(principal); });
thriceAudit.setPricipalName(principalName); }
thriceAudit.setCreateTime(new Date()); BeanUtils.copyProperties(subject, thriceAudit, "id");
thriceAudit.setCreater(subject.getCreater()); thriceAudit.setStatus(ThriceAuditEnum.PENDING_PERFECT.getCode());
thriceAudit.setBookType(BookTypeEnum.NEW_BOOK.getCode()); thriceAudit.setPrincipal(principal);
thriceAudit.setIncludeTime(subject.getSubjectNum()); thriceAudit.setPricipalName(principalName);
thriceAudit.setWordCount(subject.getEstimatWordCount()); thriceAudit.setCreateTime(new Date());
thriceAudit.setPrice(subject.getEstimatPrice()); thriceAudit.setCreater(subject.getCreater());
//thriceAudit.setPrintNUm(subject.getEstimatStampCount()); thriceAudit.setBookType(BookTypeEnum.NEW_BOOK.getCode());
thriceAudit.setSeriesOfBooksAuthor(subject.getSerialDutyName()); thriceAudit.setIncludeTime(subject.getSubjectNum());
thriceAudit.setCnmarcName(subject.getSeriesName()); thriceAudit.setWordCount(subject.getEstimatWordCount());
if (copyright != null){ thriceAudit.setPrice(subject.getEstimatPrice());
thriceAudit.setProjectName(copyright.getProjectName()); //thriceAudit.setPrintNUm(subject.getEstimatStampCount());
} thriceAudit.setSeriesOfBooksAuthor(subject.getSerialDutyName());
Integer auditId = auditManage.save(thriceAudit); thriceAudit.setCnmarcName(subject.getSeriesName());
if (auditId == null) { if (copyright != null){
throw new BaseException( thriceAudit.setProjectName(copyright.getProjectName());
NBErrorEnum.SAVE_AUDIT_FAILED.getErrNum(), }
NBErrorEnum.SAVE_AUDIT_FAILED.getErrMsg() Integer auditId = auditManage.save(thriceAudit);
); if (auditId == null) {
} throw new BaseException(
this.saveThriceAuditLog(subject.getSubjectNum(), auditId); NBErrorEnum.SAVE_AUDIT_FAILED.getErrNum(),
}else{ NBErrorEnum.SAVE_AUDIT_FAILED.getErrMsg()
ThriceAudit audit = list.get(0); );
BeanUtils.copyProperties(subject,audit,"id");
audit.setStatus("2-1");//三审列表状态为待完善
Integer auditId = auditManage.update(audit);
if (auditId == null) {
throw new BaseException(
NBErrorEnum.SAVE_AUDIT_FAILED.getErrNum(),
NBErrorEnum.SAVE_AUDIT_FAILED.getErrMsg()
);
}
this.saveThriceAuditLog(subject.getSubjectNum(), auditId);
} }
this.saveThriceAuditLog(subject.getSubjectNum(), auditId);
} }
/** /**
...@@ -611,6 +602,10 @@ public class SelectedSubjectServiceImpl extends BaseServiceImpl<SelectedSubject, ...@@ -611,6 +602,10 @@ public class SelectedSubjectServiceImpl extends BaseServiceImpl<SelectedSubject,
} }
private boolean saveFinancial(SelectedSubject subject) { private boolean saveFinancial(SelectedSubject subject) {
List<Financial> list = financialManage.getBySubjectNum(subject.getSubjectNum());
if (ArrayUtils.isNotEmpty(list)){
financialManage.deleteList(list);
}
Financial financial = new Financial(); Financial financial = new Financial();
financial.setSubjectNum(subject.getSubjectNum()); financial.setSubjectNum(subject.getSubjectNum());
financial.setBookName(subject.getBookName()); financial.setBookName(subject.getBookName());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论