Ver código fonte

成果需求批量修改

anderx 5 anos atrás
pai
commit
b152b888f6

+ 91 - 57
src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java

@@ -32,6 +32,7 @@ import com.goafanti.achievement.service.AchievementService;
 import com.goafanti.common.bo.Error;
 import com.goafanti.common.bo.MyCollection;
 import com.goafanti.common.bo.PolicyEntity;
+import com.goafanti.common.bo.fieldGlossoryBo;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.PageConstants;
 import com.goafanti.common.dao.AchievementDemandCountMapper;
@@ -41,6 +42,8 @@ import com.goafanti.common.dao.AchievementMapper;
 import com.goafanti.common.dao.AchievementPublishMapper;
 import com.goafanti.common.dao.BranchInformationMapper;
 import com.goafanti.common.dao.DemandKeywordMapper;
+import com.goafanti.common.dao.FieldGlossoryMapper;
+import com.goafanti.common.dao.IndustryCategoryMapper;
 import com.goafanti.common.dao.JtCollectSearchMapper;
 import com.goafanti.common.dao.NoticeMapper;
 import com.goafanti.common.dao.OrganizationIdentityMapper;
@@ -63,6 +66,8 @@ import com.goafanti.common.model.AchievementDemandCount;
 import com.goafanti.common.model.AchievementKeyword;
 import com.goafanti.common.model.AchievementPublish;
 import com.goafanti.common.model.Admin;
+import com.goafanti.common.model.FieldGlossory;
+import com.goafanti.common.model.IndustryCategory;
 import com.goafanti.common.model.JtCollectSearch;
 import com.goafanti.common.model.Notice;
 import com.goafanti.common.model.OrganizationIdentity;
@@ -104,6 +109,8 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 	@Autowired
 	private UserMapper					userMapper;
 	@Autowired
+	private IndustryCategoryMapper	industryCategoryMapper;
+	@Autowired
 	BranchInformationMapper		branchInformationMapper;
 	@Autowired
 	AchievementPublishMapper	achievementPublishMapper;
@@ -895,7 +902,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		//获得当前sheet的开始行
 		int firstRowNum = sheet.getFirstRowNum();
 		//获得当前sheet最后一行
-		int lastRowNum=sheet.getLastRowNum();
+		int lastRowNum= FileUtils.rowDisposeNotBlank(sheet, firstRowNum);
    		//循环除了第2行的所有行
 		Date date=new Date();
 		//获取技淘网的id
@@ -912,6 +919,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 	        	int lastCellNum = row.getLastCellNum();
 		        //循环当前行 cellNum = (firstCellNum+1) 则是除开第一例
 	        	Achievement in=new Achievement();
+	        	String str1=null,str2=null;
 		        for(int cellNum = (firstCellNum); cellNum < lastCellNum;cellNum++){
 			        Cell cell = row.getCell(cellNum);
 			    	try {
@@ -946,11 +954,34 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 					case 9:
 						in.setIsHot(Integer.valueOf(FileUtils.getCellValue(cell)));
 						break;
+					case 10:
+						str1=FileUtils.getCellValue(cell);
+						break;
+					case 11:
+						str2=FileUtils.getCellValue(cell);
+						break;
+					case 12:
+						in.setMaturity(Integer.valueOf(FileUtils.getCellValue(cell)));
+						break;
 					}
 			    	} catch (Exception e) {
 			    		throw new BusinessException(new Error("表格第"+(rowNum+1)+"行输入内容不正确。"));
 					}
 		        }
+		        if(StringUtils.isNotBlank(str1)) {
+		        	List<IndustryCategory> fg=industryCategoryMapper.listByPid(null);
+		        	boolean flag1=true,flag2=true;
+		        	for (IndustryCategory f : fg) {
+						if (flag1==true&&f.getName().equals(str1)) {
+							in.setFieldA(f.getId());
+							flag1=false;
+						}
+						if (flag2==true&&f.getName().equals(str2)) {
+							in.setFieldB(f.getId());
+							flag2=false;
+						}
+					}
+		        }
 		        in.setDeletedSign(DeleteStatus.UNDELETE.getCode());
 		        in.setOrgId(TokenManager.getAdminId());
 		        in.setOwnerId(TokenManager.getAdminId());
@@ -960,73 +991,76 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		        in.setAuditStatus(0);
 		        in.setId(UUID.randomUUID().toString());
 		        in.setInfoSources(1);
-		        list.add(in);
-		        //关键字处理
-		        if(in.getKeyword()!=null) {
-		        	String [] keywords=null;
-		        	boolean flag= false;
-		        	if (in.getKeyword().contains(",")) {
-		        		keywords=in.getKeyword().split(",");
-		        		flag=true;
-					}else if (in.getKeyword().contains(",")) {
-						keywords=in.getKeyword().split(",");
-						flag=true;
-					}else {
-						AchievementKeyword ak = new AchievementKeyword();
-						ak.setId(UUID.randomUUID().toString());
-						ak.setAchievementId(in.getId());
-						ak.setKeyword(in.getKeyword());
-						keyword.add(ak);
-					}
-		        	if (flag) {
-		        		for (String string : keywords) {
-		        			AchievementKeyword ak = new AchievementKeyword();
+		        if (StringUtils.isNotBlank(in.getName())) {
+		        	list.add(in);
+			        
+			        //关键字处理
+			        if(in.getKeyword()!=null) {
+			        	String [] keywords=null;
+			        	boolean flag= false;
+			        	if (in.getKeyword().contains(",")) {
+			        		keywords=in.getKeyword().split(",");
+			        		flag=true;
+						}else if (in.getKeyword().contains(",")) {
+							keywords=in.getKeyword().split(",");
+							flag=true;
+						}else {
+							AchievementKeyword ak = new AchievementKeyword();
 							ak.setId(UUID.randomUUID().toString());
 							ak.setAchievementId(in.getId());
-							ak.setKeyword(string);
+							ak.setKeyword(in.getKeyword());
 							keyword.add(ak);
 						}
+			        	if (flag) {
+			        		for (String string : keywords) {
+			        			AchievementKeyword ak = new AchievementKeyword();
+								ak.setId(UUID.randomUUID().toString());
+								ak.setAchievementId(in.getId());
+								ak.setKeyword(string);
+								keyword.add(ak);
+							}
+						}
 					}
+					AchievementPublish ap = null;
+					List<String> webpages = new ArrayList<>();
+					webpages.add("web_achievement_main");
+					webpages.add("web_index");
+					webpages.add("web_achievement_list");
+					for(String page: webpages){
+							ap = new AchievementPublish();
+							ap.setId(UUID.randomUUID().toString());
+							ap.setAchievementId((in.getId()));
+							ap.setPublisher(TokenManager.getUserId());
+							ap.setPublisher("1");
+							ap.setPublishTime(date);
+							ap.setPublishClient(PageConstants.WEB_PLATFORM);
+							ap.setPublishPage(page);
+							ap.setPublishPlatform(defaultPlatformId);
+							ap.setIfTop(AFTConstants.NO);
+							ap.setTopNumber(PageConstants.DEFAULT_TOP_NUMBER);
+							ap.setShowNumber(PageConstants.DEFAULT_SHOW_NUMBER);
+							publish.add(ap);
+					}
+					AchievementPublish ap2 = new AchievementPublish();
+					ap2.setId(UUID.randomUUID().toString());
+					ap2.setAchievementId(in.getId());
+					ap2.setPublisher(TokenManager.getUserId());
+					ap2.setPublishTime(date);
+					ap2.setPublishClient(PageConstants.APP_PLATFORM);
+					ap2.setPublishPage("ap2p_achievement_list");
+					ap2.setPublishPlatform(defaultPlatformId);
+					ap2.setIfTop(AFTConstants.NO);
+					ap2.setTopNumber(PageConstants.DEFAULT_TOP_NUMBER);
+					ap2.setShowNumber(PageConstants.DEFAULT_SHOW_NUMBER);
+					publish.add(ap2);
 				}
-				
-				AchievementPublish ap = null;
-				List<String> webpages = new ArrayList<>();
-				webpages.add("web_achievement_main");
-				webpages.add("web_index");
-				webpages.add("web_achievement_list");
-				for(String page: webpages){
-						ap = new AchievementPublish();
-						ap.setId(UUID.randomUUID().toString());
-						ap.setAchievementId((in.getId()));
-						ap.setPublisher(TokenManager.getUserId());
-						ap.setPublisher("1");
-						ap.setPublishTime(date);
-						ap.setPublishClient(PageConstants.WEB_PLATFORM);
-						ap.setPublishPage(page);
-						ap.setPublishPlatform(defaultPlatformId);
-						ap.setIfTop(AFTConstants.NO);
-						ap.setTopNumber(PageConstants.DEFAULT_TOP_NUMBER);
-						ap.setShowNumber(PageConstants.DEFAULT_SHOW_NUMBER);
-						publish.add(ap);
-				}
-				AchievementPublish ap2 = new AchievementPublish();
-				ap2.setId(UUID.randomUUID().toString());
-				ap2.setAchievementId(in.getId());
-				ap2.setPublisher(TokenManager.getUserId());
-				ap2.setPublishTime(date);
-				ap2.setPublishClient(PageConstants.APP_PLATFORM);
-				ap2.setPublishPage("ap2p_achievement_list");
-				ap2.setPublishPlatform(defaultPlatformId);
-				ap2.setIfTop(AFTConstants.NO);
-				ap2.setTopNumber(PageConstants.DEFAULT_TOP_NUMBER);
-				ap2.setShowNumber(PageConstants.DEFAULT_SHOW_NUMBER);
-				publish.add(ap2);
-		        
    		}
    		achievementMapper.insertBatch(list);
    		achievementKeywordMapper.insertBatch(keyword);
 		achievementPublishMapper.insertBatch(publish);
        }
+
+	
 	 
 		
 	 

+ 3 - 0
src/main/java/com/goafanti/common/dao/FieldGlossoryMapper.java

@@ -4,6 +4,7 @@ import java.util.List;
 
 import org.apache.ibatis.annotations.Param;
 
+import com.goafanti.common.bo.fieldGlossoryBo;
 import com.goafanti.common.model.FieldGlossory;
 
 public interface FieldGlossoryMapper {
@@ -20,4 +21,6 @@ public interface FieldGlossoryMapper {
     int updateByPrimaryKey(FieldGlossory record);
 
 	List<FieldGlossory> getField(@Param("pid")Integer pid, @Param("level")Integer level);
+
+	List<fieldGlossoryBo> getAll();
 }

+ 1 - 0
src/main/java/com/goafanti/common/dao/IndustryCategoryMapper.java

@@ -26,5 +26,6 @@ public interface IndustryCategoryMapper {
 	List<fieldGlossoryBo> selectDomainList();
 	
 	List<ReletivelyIndustry>selectIndustryReletively();
+
     
 }

+ 10 - 6
src/main/java/com/goafanti/common/mapper/AchievementMapper.xml

@@ -820,12 +820,15 @@
   
    <insert id="insertBatch" parameterType="com.goafanti.common.model.Achievement">
     insert into achievement
-    	(id, deleted_sign, audit_status, patent_case,parameter,owner_id,
-    	 create_time, release_status, data_category,info_sources,
-    	 name, keyword, category,
+    	(id, deleted_sign, audit_status,
+    	 patent_case,parameter,owner_id,
+    	 create_time, release_status, data_category,
+    	 info_sources,name, keyword, 
+    	 category,field_a,field_b,
     	 owner_name, owner_type, owner_id_number,
     	 owner_mobile, owner_email, owner_postal_address,
-    	 cooperation_mode, introduction, tech_broker_id,international_flag
+    	 cooperation_mode, introduction, tech_broker_id,
+    	 international_flag,maturity
     	 )
     values 
     <foreach item="item" index="index" collection="list" separator=",">
@@ -833,11 +836,12 @@
       	#{item.id,jdbcType=VARCHAR}, #{item.deletedSign,jdbcType=INTEGER}, #{item.auditStatus,jdbcType=INTEGER}, 
       	#{item.patentCase,jdbcType=LONGVARCHAR}, #{item.parameter,jdbcType=LONGVARCHAR},#{item.ownerId,jdbcType=VARCHAR},
       	#{item.createTime,jdbcType=TIMESTAMP}, #{item.releaseStatus,jdbcType=INTEGER}, #{item.dataCategory,jdbcType=INTEGER},
-      	#{item.infoSources,jdbcType=INTEGER},#{item.name,jdbcType=VARCHAR}, #{item.keyword,jdbcType=VARCHAR}, #{item.category,jdbcType=INTEGER},
+      	#{item.infoSources,jdbcType=INTEGER},#{item.name,jdbcType=VARCHAR}, #{item.keyword,jdbcType=VARCHAR},
+      	#{item.category,jdbcType=INTEGER},#{item.fieldA,jdbcType=INTEGER},#{item.fieldB,jdbcType=INTEGER},
       	#{item.ownerName,jdbcType=VARCHAR}, #{item.ownerType,jdbcType=VARCHAR}, #{item.ownerIdNumber,jdbcType=VARCHAR},
       	#{item.ownerMobile,jdbcType=VARCHAR}, #{item.ownerEmail,jdbcType=VARCHAR}, #{item.ownerPostalAddress,jdbcType=VARCHAR},
       	#{item.cooperationMode,jdbcType=INTEGER}, #{item.introduction,jdbcType=LONGVARCHAR},#{item.techBrokerId,jdbcType=VARCHAR},
-      	#{item.internationalFlag,jdbcType=INTEGER}
+      	#{item.internationalFlag,jdbcType=INTEGER},#{item.maturity,jdbcType=INTEGER}
       )
     </foreach>
   </insert>

+ 13 - 9
src/main/java/com/goafanti/common/mapper/DemandMapper.xml

@@ -671,20 +671,24 @@
     insert into demand 
     	(id, deleted_sign, audit_status, 
     	status, release_status, create_time, 
-    	keyword, data_category, name,employer_id,
-    	demand_type, problem_des, employer_name,
-    	employer_contacts, employer_contacts_mobile, 
-    	employer_contacts_mailbox, info_sources,tech_broker_id,remark,urgent_days ,urgent_money,is_hot)
+    	keyword, data_category, name,
+    	employer_id,demand_type, problem_des,
+    	employer_name,employer_contacts, employer_contacts_mobile,
+    	employer_contacts_mailbox, info_sources,tech_broker_id,
+    	remark,urgent_days ,urgent_money,
+    	is_hot,industry_category_a,industry_category_b
+    	 )
     values 
     <foreach item="item" index="index" collection="list" separator=",">
       (
       	#{item.id,jdbcType=VARCHAR}, #{item.deletedSign,jdbcType=INTEGER}, #{item.auditStatus,jdbcType=INTEGER},
       	#{item.status,jdbcType=INTEGER}, #{item.releaseStatus,jdbcType=INTEGER}, #{item.createTime,jdbcType=TIMESTAMP},
-      	#{item.keyword,jdbcType=VARCHAR}, #{item.dataCategory,jdbcType=INTEGER}, #{item.name,jdbcType=VARCHAR},#{item.employerId,jdbcType=VARCHAR},
-      	#{item.demandType,jdbcType=INTEGER}, #{item.problemDes,jdbcType=VARCHAR}, #{item.employerName,jdbcType=VARCHAR},
-      	#{item.employerContacts,jdbcType=VARCHAR}, #{item.employerContactsMobile,jdbcType=VARCHAR}, #{item.employerContactsMailbox,jdbcType=VARCHAR},
-      	#{item.infoSources,jdbcType=INTEGER},#{item.techBrokerId,jdbcType=VARCHAR},#{item.remark,jdbcType=VARCHAR},#{item.urgentDays,jdbcType=VARCHAR},
-      	#{item.urgentMoney,jdbcType=VARCHAR},#{item.isHot,jdbcType=INTEGER}
+      	#{item.keyword,jdbcType=VARCHAR}, #{item.dataCategory,jdbcType=INTEGER}, #{item.name,jdbcType=VARCHAR},
+      	#{item.employerId,jdbcType=VARCHAR},#{item.demandType,jdbcType=INTEGER}, #{item.problemDes,jdbcType=VARCHAR},
+      	#{item.employerName,jdbcType=VARCHAR},#{item.employerContacts,jdbcType=VARCHAR},#{item.employerContactsMobile,jdbcType=VARCHAR},
+      	#{item.employerContactsMailbox,jdbcType=VARCHAR},#{item.infoSources,jdbcType=INTEGER},#{item.techBrokerId,jdbcType=VARCHAR},
+      	#{item.remark,jdbcType=VARCHAR},#{item.urgentDays,jdbcType=VARCHAR},#{item.urgentMoney,jdbcType=VARCHAR},
+      	#{item.isHot,jdbcType=INTEGER},#{item.industryCategoryA,jdbcType=INTEGER},#{item.industryCategoryB,jdbcType=INTEGER}
       )
     </foreach>
   </insert>

+ 4 - 1
src/main/java/com/goafanti/common/mapper/IndustryCategoryMapper.xml

@@ -84,7 +84,10 @@
     select 
     <include refid="Base_Column_List" />
     from industry_category
-    where pid = #{pid,jdbcType=INTEGER}
+    where 1=1
+    <if test="pid !=null">
+    and pid = #{pid,jdbcType=INTEGER}
+    </if>
   </select>
   <select id="selectindustryList" resultType="com.goafanti.common.bo.fieldGlossoryBo">
   	SELECT id, name, pid, `level`

+ 56 - 33
src/main/java/com/goafanti/common/utils/FileUtils.java

@@ -267,43 +267,66 @@ public class FileUtils {
 	   		if(sheet == null){
 	   			throw new BusinessException(new Error("未找到正确的参数。"));
 	   		}
-	   		//获得当前sheet的开始行
-	   		int firstRowNum = sheet.getFirstRowNum();
-	   		//获得当前sheet的结束行
-	   		int lastRowNum = sheet.getLastRowNum();
-	   		//处理空白行
-	   		for (int i = firstRowNum; i <= sheet.getLastRowNum();i++) {
-	   			Row r = sheet.getRow(i);
-	   			if(r == null){
-	   				// 如果是空行(即没有任何数据、格式),直接把它以下的数据往上移动
-	   				sheet.shiftRows(i+1, sheet.getLastRowNum(),-1);
-	   				continue;
-	   			}
-	   			boolean flag = false;
-	   			for(Cell c:r){
-	   				if(c.getCellTypeEnum() != CellType.BLANK){
-	   					flag = true;
-	   					break;
-	   				}
-	   			}
-	   			if(flag){
-	   				i++;
-	   				continue;
-	   			} else{//如果是空白行(即可能没有数据,但是有一定格式)
-	   				if(i == sheet.getLastRowNum())//如果到了最后一行,直接将那一行remove掉
-	   					sheet.removeRow(r);
-	   				else//如果还没到最后一行,则数据往上移一行
-	   				    sheet.shiftRows(i+1, sheet.getLastRowNum(),-1);
-	   			}
-	   		}
-	   		lastRowNum=sheet.getLastRowNum();
-	   		if (lastRowNum<2) {
-	   			throw new BusinessException(new Error("未找到正确的参数。"));
-				}
 	       }
 	       return sheet;
 	}
 	
+	public static  int rowDispose(Sheet sheet, int firstRowNum) {
+		int lastRowNum=sheet.getLastRowNum();
+		//处理空白行
+   		for (int i = firstRowNum; i <= sheet.getLastRowNum();i++) {
+   			Row r = sheet.getRow(i);
+   			if(r == null){
+   				// 如果是空行(即没有任何数据、格式),直接把它以下的数据往上移动
+   				sheet.shiftRows(i+1, sheet.getLastRowNum(),-1);
+   				continue;
+   			}
+   			boolean flag = false;
+   			for(Cell c:r){
+   				if(c.getCellTypeEnum() != CellType.BLANK){
+   					flag = true;
+   					break;
+   				}
+   			}
+   			if(flag){
+   				i++;
+   				continue;
+   			} else{
+   				//如果是空白行(即可能没有数据,但是有一定格式)
+   				if(i == sheet.getLastRowNum())//如果到了最后一行,直接将那一行remove掉
+   					sheet.removeRow(r);
+   				else//如果还没到最后一行,则数据往上移一行
+   				    sheet.shiftRows(i+1, sheet.getLastRowNum(),-1);
+   			}
+   		}
+   		
+   		if (lastRowNum<2) {
+   			throw new BusinessException(new Error("未找到正确的参数。"));
+			}
+		return sheet.getLastRowNum();
+	}
+	
+	public static  int rowDisposeNotBlank(Sheet sheet, int firstRowNum) {
+		int lastRowNum=sheet.getLastRowNum();
+		//行数从0开始 默认使用2行做头部,则设置1
+		int i=1;
+		for(int rowNum = firstRowNum+2;rowNum <= lastRowNum;rowNum++){
+			Row row = sheet.getRow(rowNum);
+			if(row == null){
+				continue;
+			}
+			 Cell cell = row.getCell(0);
+			 String str =FileUtils.getCellValue(cell);
+			 if (StringUtils.isNotBlank(str)) {
+				i++;
+			}
+		}
+   		if (i<2) {
+   			throw new BusinessException(new Error("未找到正确的参数。"));
+			}
+		return i;
+	}
+	
 	public static String getCellValue(Cell cell){
      	String cellValue = "";
      	if(cell == null){

+ 26 - 14
src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java

@@ -23,6 +23,7 @@ import org.springframework.web.multipart.MultipartFile;
 
 import com.goafanti.common.bo.Error;
 import com.goafanti.common.bo.MyCollection;
+import com.goafanti.common.bo.fieldGlossoryBo;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.PageConstants;
 import com.goafanti.common.dao.AchievementDemandCountMapper;
@@ -36,6 +37,7 @@ import com.goafanti.common.dao.DemandKeywordMapper;
 import com.goafanti.common.dao.DemandMapper;
 import com.goafanti.common.dao.DemandPublishMapper;
 import com.goafanti.common.dao.FieldGlossoryMapper;
+import com.goafanti.common.dao.IndustryCategoryMapper;
 import com.goafanti.common.dao.JtCollectSearchMapper;
 import com.goafanti.common.dao.NewsInterestMapper;
 import com.goafanti.common.dao.NoticeMapper;
@@ -62,6 +64,8 @@ import com.goafanti.common.model.AchievementDemandCount;
 import com.goafanti.common.model.Demand;
 import com.goafanti.common.model.DemandKeyword;
 import com.goafanti.common.model.DemandPublish;
+import com.goafanti.common.model.FieldGlossory;
+import com.goafanti.common.model.IndustryCategory;
 import com.goafanti.common.model.JtCollectSearch;
 import com.goafanti.common.model.Notice;
 import com.goafanti.common.model.OrganizationIdentity;
@@ -117,7 +121,7 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 	@Autowired
 	DemandFollowDetailMapper	demandFollowDetailMapper;
 	@Autowired
-	FieldGlossoryMapper    fieldGlossoryMapper;
+	IndustryCategoryMapper    industryCategoryMapper;
 	@Autowired
 	BranchInformationMapper		branchInformationMapper;
 	@Autowired
@@ -985,7 +989,7 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 		//获得当前sheet的开始行
 		int firstRowNum = sheet.getFirstRowNum();
 		//获得当前sheet最后一行
-		int lastRowNum=sheet.getLastRowNum();
+		int lastRowNum= FileUtils.rowDisposeNotBlank(sheet, firstRowNum);
    		//循环除了第2行的所有行
 		Date date=new Date();
 		//获取技淘网的id
@@ -1002,7 +1006,7 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 	        	int lastCellNum = row.getLastCellNum();
 		        //循环当前行 cellNum = (firstCellNum+1) 则是除开第一例
 	        	Demand in=new Demand();
-	        	List<String> list2 =new ArrayList<>();
+	        	String str1=null,str2=null;
 		        for(int cellNum = (firstCellNum); cellNum < lastCellNum;cellNum++){
 			        Cell cell = row.getCell(cellNum);
 			    	try {
@@ -1018,9 +1022,6 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 							break;
 						case 3:
 							in.setProblemDes(FileUtils.getCellValue(cell));
-							if (in.getProblemDes().length()>512) {
-								list2.add(in.getName());
-							}
 							break;
 						case 4:
 							in.setKeyword(FileUtils.getCellValue(cell));
@@ -1037,20 +1038,31 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 						case 8:
 							in.setUrgentMoney(new BigDecimal(FileUtils.getCellValue(cell)));
 							break;
+						case 9:
+							str1=FileUtils.getCellValue(cell);
+							break;
+						case 10:
+							str2=FileUtils.getCellValue(cell);
+							break;
 						}
 			    	} catch (Exception e) {
 			    		throw new BusinessException(new Error("表格第"+(rowNum+1)+"行输入内容不正确。"));
 					}
 		        }
-		        if (!list2.isEmpty()) {
-		        	StringBuffer str=new StringBuffer("[");
-		        	for (String string : list2) {
-						str.append(string+",");
+		        if(StringUtils.isNotBlank(str1)) {
+		          	List<IndustryCategory> fg=industryCategoryMapper.listByPid(null);
+		        	boolean flag1=true,flag2=true;
+		        	for (IndustryCategory f : fg) {
+						if (flag1==true&&f.getName().equals(str1)) {
+							in.setIndustryCategoryA(f.getId());
+							flag1=false;
+						}
+						if (flag2==true&&f.getName().equals(str2)) {
+							in.setIndustryCategoryB(f.getId());
+							flag2=false;
+						}
 					}
-		        	str.deleteCharAt(str.length()-1);
-		        	str.append("]");
-		        	throw new BusinessException(new Error("名称"+str+"内容过长,请控制在512个字符内"));
-				}
+		        }
 		        in.setDeletedSign(DeleteStatus.UNDELETE.getCode());
 		        in.setEmployerId(TokenManager.getAdminId());
 		        in.setCreateTime(date);