新增问题修复

bbt
zef 8 months ago
parent 3aa6d1f445
commit 6379b420e1

@ -101,8 +101,13 @@ public class TbCompanyInformationReportingController extends BaseController {
if(tbCompanyInformationReporting.getDetails()==null||tbCompanyInformationReporting.getDetails().size()<1){
return error("上报详情信息三项不能都为空");
}
boolean sing=false;
List<TbCompanyInformationReportingDetails> details = tbCompanyInformationReporting.getDetails();
for (TbCompanyInformationReportingDetails detail : details) {
if(StringUtils.isBlank(detail.getDataType())){
sing=true;
break;
}
if(tbCompanyInformationReportingDetailsService.group1FieldsEmptyByCompanyThreePreventionData(detail)){
tbCompanyInformationReporting.setCompanyThreePreventionData("0");
}else {
@ -120,8 +125,14 @@ public class TbCompanyInformationReportingController extends BaseController {
}
detail.setCreateTime(DateUtils.getNowDate());
}
if(sing){
return error("上报详情类型为空");
}
tbCompanyInformationReporting.setReportState("1");
int i = tbCompanyInformationReportingService.insertTbCompanyInformationReporting(tbCompanyInformationReporting);
for (TbCompanyInformationReportingDetails detail : details){
detail.setCompanyInformationReportingId(tbCompanyInformationReporting.getId());
}
boolean saveBatch = tbCompanyInformationReportingDetailsService.saveBatch(details);
if(!saveBatch){
i=0;

Loading…
Cancel
Save