Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/master' into test

anderx 5 anni fa
parent
commit
5bd2fb8395

+ 0 - 1
src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java

@@ -237,7 +237,6 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 	@Override
 	public Pagination<AchievementObject> listMyAchievement(Integer auditStatus, String name,Integer dataCategory, 
 			String startDate,String endDate, Integer pNo, Integer pSize) {
-		System.out.println("as:"+auditStatus+" dc:"+ dataCategory);
 		Map<String,Object> params = new HashMap<>();
 		params.put("ownerId", TokenManager.getUserId());
 		if (null != startDate) params.put("startDate", startDate);

+ 12 - 0
src/main/java/com/goafanti/common/mapper/DemandMapper.xml

@@ -779,6 +779,12 @@
 		<if test="endDate != null">
 			and a.release_date <![CDATA[ <= ]]> #{endDate,jdbcType=TIMESTAMP}
 		</if>
+		<if test="createStartDate != null">
+			and a.create_time <![CDATA[ >= ]]> #{createStartDate,jdbcType=TIMESTAMP}
+		</if>
+		<if test="createEndDate != null">
+			and a.create_time <![CDATA[ <= ]]> #{createEndDate,jdbcType=TIMESTAMP}
+		</if>
 		<if test="name != null">
 			and a.name like concat('%',#{name,jdbcType=VARCHAR},'%')
 		</if>
@@ -814,6 +820,12 @@
 		<if test="endDate != null">
 			and a.release_date <![CDATA[ <= ]]> #{endDate,jdbcType=TIMESTAMP}
 		</if>
+		<if test="createStartDate != null">
+			and a.create_time <![CDATA[ >= ]]> #{createStartDate,jdbcType=TIMESTAMP}
+		</if>
+		<if test="createEndDate != null">
+			and a.create_time <![CDATA[ <= ]]> #{createEndDate,jdbcType=TIMESTAMP}
+		</if>
 		<if test="name != null">
 			and a.name like concat('%',#{name,jdbcType=VARCHAR},'%')
 		</if>

+ 3 - 2
src/main/java/com/goafanti/demand/controller/UserDemandApiController.java

@@ -42,9 +42,10 @@ public class UserDemandApiController extends CertifyApiController {
 	 * 用户需求列表
 	 */
 	@RequestMapping(value = "/list", method = RequestMethod.GET)
-	public Result list(String name,String startDate,String endDate,Integer pageNo, Integer pageSize) {
+	public Result list(String name,String startDate,String endDate,String createStartDate,String createEndDate,Integer auditStatus,
+			Integer pageNo, Integer pageSize) {
 		Result res = new Result();
-		res.setData(demandService.listMyDemand(name, startDate, endDate, pageNo, pageSize));
+		res.setData(demandService.listMyDemand(name, startDate, endDate,createStartDate, createEndDate, auditStatus, pageNo, pageSize));
 		return res;
 	}
 

+ 3 - 2
src/main/java/com/goafanti/demand/service/DemandService.java

@@ -16,7 +16,8 @@ import com.goafanti.portal.bo.DemandSearchDetailBo;
 import com.goafanti.portal.bo.DemandSearchListBo;
 
 public interface DemandService {
-	Pagination<DemandListBo> listMyDemand(String name,String startDate,String endDate,Integer pageNo, Integer pageSize);
+	Pagination<DemandListBo> listMyDemand(String name,String startDate,String endDate,
+			String createStartDate,String createEndDate,Integer auditStatus,Integer pageNo, Integer pageSize);
 	
 	Pagination<DemandListBo> listDemand(String name,String employerName,Integer demandType, 
 			Integer auditStatus,Integer status,String startDate, String endDate,Integer pageNo, Integer pageSize);
@@ -53,8 +54,8 @@ public interface DemandService {
 
 	Pagination<ObjectInterestListBo> selectinterest(Integer type,Integer pageNo, Integer pageSize);
 
-	Pagination<AppDemandBo> listMyDemand(Integer pNo, Integer pSize);
 
+	Pagination<AppDemandBo> listMyDemand(Integer pNo, Integer pSize);
 	int saveAppUserDemand(Demand d, String validityPeriodFormattedDate, String[] keywords);
 
 	Demand DemandFollowDetails(String id);

+ 19 - 3
src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java

@@ -856,12 +856,15 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 	
 	@SuppressWarnings("unchecked")
 	@Override
-	public Pagination<DemandListBo> listMyDemand(String name, String startDate, String endDate,
-			Integer pageNo, Integer pageSize) {
+	public Pagination<DemandListBo> listMyDemand(String name, String startDate, String endDate,String createStartDate,String createEndDate,
+		Integer auditStatus,Integer pageNo, Integer pageSize) {
 		Map<String,Object> params = new HashMap<String,Object>();
 		if(StringUtils.isNotBlank(name)) params.put("name", name);
 		if(StringUtils.isNotBlank(startDate)) params.put("startDate", startDate);
-		if(StringUtils.isNotBlank(endDate)) params.put("endDate", endDate);
+		if(StringUtils.isNotBlank(endDate)) params.put("endDate", endDate+" 23:59:59");
+		if(StringUtils.isNotBlank(createStartDate)) params.put("createStartDate", createStartDate);
+		if(StringUtils.isNotBlank(createEndDate)) params.put("createEndDate", createEndDate+" 23:59:59");
+		if(auditStatus!=null)params.put("auditStatus", auditStatus);
 		params.put("employerId", TokenManager.getUserId());
 		return (Pagination<DemandListBo>) findPage("selectDemandListByPage", "selectDemandListCount", params, pageNo, pageSize);
 	}
@@ -999,6 +1002,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<>();
 		        for(int cellNum = (firstCellNum); cellNum < lastCellNum;cellNum++){
 			        Cell cell = row.getCell(cellNum);
 			    	try {
@@ -1014,6 +1018,9 @@ 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));
@@ -1035,6 +1042,15 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 			    		throw new BusinessException(new Error("表格第"+(rowNum+1)+"行输入内容不正确。"));
 					}
 		        }
+		        if (!list2.isEmpty()) {
+		        	StringBuffer str=new StringBuffer("[");
+		        	for (String string : list2) {
+						str.append(string+",");
+					}
+		        	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);

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

@@ -38,8 +38,8 @@ app.name=AFT
 app.mobile.website=http://m.jishutao.com/1.0/template/index.html
 template.cacheable=false
 
-static.host=//statics.jishutao.com/client/1.2.5
-portal.host=//statics.jishutao.com/portal/1.2.7
+static.host=//statics.jishutao.com/client/1.2.7
+portal.host=//statics.jishutao.com/portal/1.2.8
 skjt.host=//statics.jishutao.com/skjt/1.3
 
 #本地

+ 1 - 1
src/main/webapp/WEB-INF/views/common.html

@@ -293,7 +293,7 @@
 						<a th:href="@{/portal/aboutUs}">关于公司/</a>
 						<a th:href="@{/portal/contactUs}">联系我们</a>
 						<p> Copyright &copy 2016-2020 科德 版权所有 <a href="http://www.beian.miit.gov.cn/" target="_blank">湘ICP备15019731号</a>
-							-2 技术支持:湖南阿凡提信息科技有限公司</p>
+							-2 技术支持:阿凡提信息科技(湖南)股份有限公司</p>
 					</div>
 					<div class="text_center">
 						<div class="cont_left" style="width: 365px">