|
@@ -998,7 +998,28 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
|
|
|
public void insertProInfo(String[] proInfos,String[] flags,String[] proId,String filingId){
|
|
|
String pro="";
|
|
|
JSONObject json = null;
|
|
|
- if (flags.length!=0 && proId.length==1){
|
|
|
+ boolean tiao=false;
|
|
|
+ for (int i=0;i<flags.length;i++){
|
|
|
+ if (!flags[i].equals("")){
|
|
|
+ tiao=true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(!tiao || proInfos[1].length()>50){
|
|
|
+ Integer count=0;
|
|
|
+ for (int i=0;i<proInfos.length;i++){
|
|
|
+ if (proInfos[i]!=""&& !"".equals(proInfos[i])) {
|
|
|
+ json = JSONObject.fromObject(proInfos[i]);
|
|
|
+ ProjectFilingBatchProInfo info = new ProjectFilingBatchProInfo();
|
|
|
+ info.setId(IdGen.uuid());
|
|
|
+ info.setProId(json.get("proId").toString());
|
|
|
+ info.setProInfofilingBatch(json.get("filingId").toString());
|
|
|
+ info.setProInfoName(json.get("names").toString());
|
|
|
+ info.setProInfoType(json.get("types").toString());
|
|
|
+ if(count==0){ DelProInfo(info);count++;}
|
|
|
+ proInfoDao.proInfoInsert(info);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else if (flags.length!=0 && proInfos.length==4 && tiao ){
|
|
|
int count=0;
|
|
|
for (int s=0;s< proInfos.length;s++){
|
|
|
count++;
|
|
@@ -1016,21 +1037,6 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
|
|
|
info.setProInfoType(json.get("types").toString());
|
|
|
DelProInfo(info);
|
|
|
proInfoDao.proInfoInsert(info);
|
|
|
- }else{
|
|
|
- Integer count=0;
|
|
|
- for (int i=0;i<proInfos.length;i++){
|
|
|
- if (proInfos[i]!=""&& !"".equals(proInfos[i])) {
|
|
|
- json = JSONObject.fromObject(proInfos[i]);
|
|
|
- ProjectFilingBatchProInfo info = new ProjectFilingBatchProInfo();
|
|
|
- info.setId(IdGen.uuid());
|
|
|
- info.setProId(json.get("proId").toString());
|
|
|
- info.setProInfofilingBatch(json.get("filingId").toString());
|
|
|
- info.setProInfoName(json.get("names").toString());
|
|
|
- info.setProInfoType(json.get("types").toString());
|
|
|
- if(count==0){ DelProInfo(info);count++;}
|
|
|
- proInfoDao.proInfoInsert(info);
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
}
|