新增问题修复

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

Loading…
Cancel
Save