瀏覽代碼

update

Signed-off-by: anderx <312518615@qq.com>
anderx 5 年之前
父節點
當前提交
ad93d4807b

+ 42 - 0
src/main/java/com/goafanti/common/mapper/DemandCollectionMapper.xml

@@ -1806,6 +1806,27 @@
 	<if test="dwxz !=null ">
 	and dwxz = #{dwxz}
 	</if>
+	<if test="rygm == 0 ">
+	and rygm between 0 and 50
+	</if>
+	<if test="rygm == 1 ">
+	and rygm between 51 and 100
+	</if>
+	<if test="rygm == 2 ">
+	and rygm > 101 
+	</if>
+	<if test="jjgm == 0 ">
+	and jjgm between 0 and 300
+	</if>
+	<if test="jjgm == 1 ">
+	and jjgm between 301 and 500
+	</if>
+	<if test="jjgm == 2 ">
+	and jjgm between 501 and 1000
+	</if>
+	<if test="jjgm == 3 ">
+	and jjgm > 1001
+	</if>
 	<if test="yypt !=null ">
 	and yysjjyspt = #{yypt}
 	</if>
@@ -1854,6 +1875,27 @@
 	<if test="htly !=null ">
 	and htly = #{htly}
 	</if>
+	<if test="rygm == 0 ">
+	and rygm between 0 and 50
+	</if>
+	<if test="rygm == 1 ">
+	and rygm between 51 and 100
+	</if>
+	<if test="rygm == 2 ">
+	and rygm > 101 
+	</if>
+	<if test="jjgm == 0 ">
+	and jjgm between 0 and 300
+	</if>
+	<if test="jjgm == 1 ">
+	and jjgm between 301 and 500
+	</if>
+	<if test="jjgm == 2 ">
+	and jjgm between 501 and 1000
+	</if>
+	<if test="jjgm == 3 ">
+	and jjgm > 1001
+	</if>
 	<if test="dwmc !=null ">
 	and dwmc like concat('%',#{dwmc},'%')
 	</if>

+ 2 - 0
src/main/java/com/goafanti/demandCollection/controller/DemandCollectionApiController.java

@@ -45,6 +45,8 @@ public class DemandCollectionApiController  extends CertifyApiController {
 	/**
 	   * 需求收集列表
 	 * @param d
+	 * rygm 人员规模 0、50人以下   1、50~100人 2、100人以上
+	 * jjgm 经济规模 0、300万以下 1、300~500万  2、500~1000万    3、1000万以上
 	 * @return
 	 */
 	@RequestMapping(value="/api/demandCollectionList",method = RequestMethod.GET)

+ 23 - 14
src/main/java/com/goafanti/demandCollection/service/impl/DemandCollectionServiceImpl.java

@@ -59,17 +59,22 @@ public class DemandCollectionServiceImpl extends BaseMybatisDao<DemandCollection
 	public int addDemandCollection(DemandCollection d) {
 		String aid=UUID.randomUUID().toString();
 		SkjtUser su=new SkjtUser();
-		su.setId(aid);
-		su.setAccount(d.getDwmc());
-		su.setPassword("123456");
-		Calendar c=Calendar.getInstance();
-		c.set(Calendar.MILLISECOND, 0);
-		su.setCreateTime(c.getTime());
-		su.setNickname(d.getDwmc());
-		su.setPassword(passwordUtil.getEncryptPwd(su));
-		skjtUserMapper.insertSelective(su);
-		skjtUserMapper.setUserRole(su.getId());
-		d.setAid(aid);
+		SkjtUser user = skjtUserMapper.selectByAccount(d.getDwmc());
+		if (user==null) {
+			su.setId(aid);
+			su.setAccount(d.getDwmc());
+			su.setPassword("123456");
+			Calendar c=Calendar.getInstance();
+			c.set(Calendar.MILLISECOND, 0);
+			su.setCreateTime(c.getTime());
+			su.setNickname(d.getDwmc());
+			su.setPassword(passwordUtil.getEncryptPwd(su));
+			skjtUserMapper.insertSelective(su);
+			skjtUserMapper.setUserRole(su.getId());
+			d.setAid(aid);
+		}else {
+			d.setAid(user.getId());
+		}
 		return demandCollectionMapper.insertSelective(d);
 	}
 	@SuppressWarnings("unchecked")
@@ -84,6 +89,9 @@ public class DemandCollectionServiceImpl extends BaseMybatisDao<DemandCollection
 			map.put("startTime", i.getStartTime());
 			map.put("endTime", i.getEndTime()+" 23:59:59");
 		}
+		if(StringUtils.isNotBlank(i.getHtly()))map.put("htly", i.getHtly());
+		if(StringUtils.isNotBlank(i.getRygm()))map.put("rygm", i.getRygm());
+		if(StringUtils.isNotBlank(i.getJjgm()))map.put("jjgm", i.getJjgm());
 		if(StringUtils.isNotBlank(i.getSsszp()))map.put("ssszp", i.getSsszp());
 		if(StringUtils.isNotBlank(i.getSsszc()))map.put("ssszc", i.getSsszc());
 		if(StringUtils.isNotBlank(i.getSssza()))map.put("sssza", i.getSssza());
@@ -116,7 +124,6 @@ public class DemandCollectionServiceImpl extends BaseMybatisDao<DemandCollection
     		XSSFWorkbook wb =ExportExcelUtil.exportTemplateInfoS(comment,"需求征集表");
     		//根据列表编写文档
     		XSSFSheet sheet =wb.getSheetAt(0);
-    		
     		XSSFCellStyle styleTitle = wb.createCellStyle();
 			styleTitle.setAlignment(HorizontalAlignment.CENTER);
 			styleTitle.setWrapText(true);
@@ -219,10 +226,10 @@ public class DemandCollectionServiceImpl extends BaseMybatisDao<DemandCollection
     					if (x==0)sheet.setColumnWidth(i, 10000);
     					break; 
     					case "现有研发条件情况(人员情况、仪器设备投入等)" : o = ob.getXyyftjqk();
-    					if (x==0)sheet.setColumnWidth(i, 10000);
+    					if (x==0)sheet.setColumnWidth(i, 20000);
     					break; 
     					case "目前合作对象情况(合作对象、方式、已投入研发资金情况等)" : o = ob.getMqhzdxqk(); 
-    					if (x==0)sheet.setColumnWidth(i, 10000);
+    					if (x==0)sheet.setColumnWidth(i, 20000);
     					break; 
     					case "是否有下一步合作需求" : o = ob.getSfyxybhzxq(); break; 
     					case "意向合作对象" : o = ob.getYxhzdx(); break; 
@@ -244,6 +251,8 @@ public class DemandCollectionServiceImpl extends BaseMybatisDao<DemandCollection
     			}
     			x++;
     		}
+    		//冻结
+    		sheet.createFreezePane(2, 2, 2, 2);
     		//返回名称及参数
 			 response.addHeader("Content-Disposition", "attachment;filename="  + new String(fileName.getBytes(),"iso-8859-1"));  
 			 response.setContentType("application/octet-stream;charset=utf-8");

+ 6 - 6
src/main/resources/props/config_local.properties

@@ -1,11 +1,11 @@
 #Driver
 jdbc.driverClassName=com.mysql.jdbc.Driver
-jdbc.url=jdbc:mysql://localhost:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
-jdbc.username=dev
-jdbc.password=123456
-#jdbc.url=jdbc:mysql://101.37.32.31:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
-#jdbc.username=root
-#jdbc.password=aftdev
+#jdbc.url=jdbc:mysql://localhost:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+#jdbc.username=dev
+#jdbc.password=123456
+jdbc.url=jdbc:mysql://101.37.32.31:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+jdbc.username=root
+jdbc.password=aftdev
 jdbc.validationQuery=SELECT 'x'
 jdbc.initialSize=3
 jdbc.maxActive=20