|
|
@@ -1,6 +1,5 @@
|
|
|
package com.goafanti.demand.service.impl;
|
|
|
|
|
|
-import java.math.BigDecimal;
|
|
|
import java.text.ParseException;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Calendar;
|
|
|
@@ -19,16 +18,18 @@ import org.springframework.stereotype.Service;
|
|
|
import com.goafanti.achievement.bo.AchievementDemandListBo;
|
|
|
|
|
|
import com.goafanti.common.constant.AFTConstants;
|
|
|
+import com.goafanti.common.constant.PageConstants;
|
|
|
import com.goafanti.common.dao.AchievementDemandCountMapper;
|
|
|
import com.goafanti.common.dao.AchievementDemandMapper;
|
|
|
|
|
|
import com.goafanti.common.dao.AchievementKeywordMapper;
|
|
|
import com.goafanti.common.dao.AchievementMapper;
|
|
|
+import com.goafanti.common.dao.BranchInformationMapper;
|
|
|
import com.goafanti.common.dao.DemandFollowDetailMapper;
|
|
|
import com.goafanti.common.dao.DemandInterestMapper;
|
|
|
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.NewsInterestMapper;
|
|
|
|
|
|
@@ -42,7 +43,6 @@ import com.goafanti.common.dao.UserRoleMapper;
|
|
|
import com.goafanti.common.enums.DeleteStatus;
|
|
|
import com.goafanti.common.enums.DemandAuditStatus;
|
|
|
import com.goafanti.common.enums.DemandInfoSourceStatus;
|
|
|
-import com.goafanti.common.enums.DemandPortalSearchSignType;
|
|
|
import com.goafanti.common.enums.DemandReleaseStatus;
|
|
|
import com.goafanti.common.enums.DemandStatus;
|
|
|
import com.goafanti.common.enums.DemandSwitchSign;
|
|
|
@@ -54,6 +54,7 @@ import com.goafanti.common.model.AchievementDemand;
|
|
|
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.Notice;
|
|
|
import com.goafanti.common.model.OrganizationIdentity;
|
|
|
import com.goafanti.common.model.User;
|
|
|
@@ -66,12 +67,11 @@ import com.goafanti.demand.bo.DemandImportBo;
|
|
|
|
|
|
import com.goafanti.demand.bo.DemandListBo;
|
|
|
import com.goafanti.demand.bo.DemandManageDetailBo;
|
|
|
-import com.goafanti.demand.bo.DemandManageListBo;
|
|
|
import com.goafanti.demand.bo.DemandPartnerListBo;
|
|
|
+import com.goafanti.demand.bo.DemandPublishBo;
|
|
|
import com.goafanti.demand.bo.ObjectInterestListBo;
|
|
|
import com.goafanti.demand.service.DemandService;
|
|
|
|
|
|
-import com.goafanti.portal.bo.BoutiqueListBo;
|
|
|
import com.goafanti.portal.bo.DemandPortalDetailBo;
|
|
|
import com.goafanti.portal.bo.DemandPortalSimilarListBo;
|
|
|
import com.goafanti.portal.bo.DemandSearchDetailBo;
|
|
|
@@ -80,14 +80,10 @@ import com.goafanti.portal.bo.DemandSearchListBo;
|
|
|
|
|
|
@Service
|
|
|
public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements DemandService {
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
@Autowired
|
|
|
private DemandMapper demandMapper;
|
|
|
@Autowired
|
|
|
private UserMapper userMapper;
|
|
|
-
|
|
|
@Autowired
|
|
|
private UserRoleMapper userRoleMapper;
|
|
|
@Autowired
|
|
|
@@ -107,9 +103,6 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
|
|
|
@Autowired
|
|
|
private AchievementMapper achievementMapper;
|
|
|
@Autowired
|
|
|
- private FieldGlossoryMapper fieldGlossoryMapper;
|
|
|
-
|
|
|
- @Autowired
|
|
|
private DemandInterestMapper demandInterestMapper;
|
|
|
@Autowired
|
|
|
private NewsInterestMapper newsInterestMapper;
|
|
|
@@ -117,112 +110,14 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
|
|
|
private UserInterestMapper userInterestMapper;
|
|
|
@Autowired
|
|
|
ProjectInterestMapper projectInterestMapper;
|
|
|
-
|
|
|
-
|
|
|
+ @Autowired
|
|
|
DemandFollowDetailMapper demandFollowDetailMapper;
|
|
|
-
|
|
|
- @SuppressWarnings("unchecked")
|
|
|
- @Override
|
|
|
- public Pagination<DemandManageListBo> selectUserDemandManageList(String employerName, Integer auditStatus,
|
|
|
- Integer province, Integer serialNumber, String name, String keyword, Integer infoSources,
|
|
|
- Integer demandType, String validityPeriodStartDate, String validityPeriodEndDate, String username,
|
|
|
- Integer status, Integer releaseStatus, String releaseDateStartDate, String releaseDateEndDate,String createDateStartDate, String createDateEndDate, Integer pNo,
|
|
|
- Integer pSize, Integer boutique, Integer hot) {
|
|
|
-
|
|
|
- Map<String, Object> params = disposeParams(auditStatus, province, serialNumber, name, keyword, infoSources,
|
|
|
- demandType, validityPeriodStartDate, validityPeriodEndDate, username, status, releaseStatus,
|
|
|
- releaseDateStartDate, releaseDateEndDate, createDateStartDate, createDateEndDate, boutique, hot);
|
|
|
-
|
|
|
- if (pNo == null || pNo < 0) {
|
|
|
- pNo = 1;
|
|
|
- }
|
|
|
-
|
|
|
- if (pSize == null || pSize < 0 || pSize > 10) {
|
|
|
- pSize = 10;
|
|
|
- }
|
|
|
-
|
|
|
- /*
|
|
|
- * if (TokenManager.hasRole(AFTConstants.SALESMANAGERADMIN) ||
|
|
|
- * TokenManager.hasRole(AFTConstants.SALESMANADMIN)) {
|
|
|
- * params.put("principal", TokenManager.getAdminId()); }
|
|
|
- *
|
|
|
- * if (TokenManager.hasRole(AFTConstants.MANAGERADMIN)) {
|
|
|
- * params.put("mid", TokenManager.getAdminId()); }
|
|
|
- *
|
|
|
- * if (TokenManager.hasRole(AFTConstants.TECHBROKER)) {
|
|
|
- * params.put("techBroker", TokenManager.getAdminId()); }
|
|
|
- */
|
|
|
-
|
|
|
- if (!TokenManager.hasRole(AFTConstants.SUPERADMIN) && !TokenManager.hasRole(AFTConstants.AUDITORADMIN)) {
|
|
|
- params.put("adminId", TokenManager.getAdminId());
|
|
|
- }
|
|
|
-
|
|
|
- if (StringUtils.isNotBlank(employerName)) {
|
|
|
- params.put("employerName", employerName);
|
|
|
- }
|
|
|
-
|
|
|
- if (StringUtils.isNotBlank(username)) {
|
|
|
- params.put("username", username);
|
|
|
- }
|
|
|
-
|
|
|
- return (Pagination<DemandManageListBo>) findPage("findManageUserDemandListByPage", "findManageUserDemandCount",
|
|
|
- params, pNo, pSize);
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- @SuppressWarnings("unchecked")
|
|
|
- @Override
|
|
|
- public Pagination<DemandManageListBo> selectOrgDemandManageList(Integer dataCategory,String employerName, Integer auditStatus,
|
|
|
- Integer province, Integer serialNumber, String name, String keyword, Integer infoSources,
|
|
|
- Integer demandType, String validityPeriodStartDate, String validityPeriodEndDate, String username,
|
|
|
- Integer status, Integer releaseStatus, String releaseDateStartDate, String releaseDateEndDate,String createDateStartDate, String createDateEndDate, Integer pNo,
|
|
|
- Integer pSize, Integer boutique, Integer hot, String techBrokerId,String recordPerson) {
|
|
|
- Map<String, Object> params = disposeParams(auditStatus, province, serialNumber, name, keyword, infoSources,
|
|
|
- demandType, validityPeriodStartDate, validityPeriodEndDate, username, status, releaseStatus,
|
|
|
- releaseDateStartDate, releaseDateEndDate, createDateStartDate, createDateEndDate, boutique, hot);
|
|
|
-
|
|
|
- if (pNo == null || pNo < 0) {
|
|
|
- pNo = 1;
|
|
|
- }
|
|
|
-
|
|
|
- if (pSize == null || pSize < 0 || pSize > 10) {
|
|
|
- pSize = 10;
|
|
|
- }
|
|
|
-
|
|
|
- /*if (TokenManager.hasRole(AFTConstants.SALESMANAGERADMIN) || TokenManager.hasRole(AFTConstants.SALESMANADMIN)) {
|
|
|
- params.put("principal", TokenManager.getAdminId());
|
|
|
- }
|
|
|
-
|
|
|
- if (TokenManager.hasRole(AFTConstants.MANAGERADMIN)) {
|
|
|
- params.put("mid", TokenManager.getAdminId());
|
|
|
- }
|
|
|
-
|
|
|
- if (TokenManager.hasRole(AFTConstants.TECHBROKER)) {
|
|
|
- params.put("techBroker", TokenManager.getAdminId());
|
|
|
- }*/
|
|
|
- if (null != dataCategory) {
|
|
|
- params.put("dataCategory", dataCategory);
|
|
|
- }
|
|
|
- if (null!=recordPerson) {
|
|
|
- params.put("recordPerson", recordPerson);
|
|
|
- }
|
|
|
-
|
|
|
- /*if (!TokenManager.hasRole(AFTConstants.SUPERADMIN) && !TokenManager.hasRole(AFTConstants.AUDITORADMIN)) {
|
|
|
- params.put("adminId", TokenManager.getAdminId());
|
|
|
- }*/
|
|
|
-
|
|
|
- if (StringUtils.isNotBlank(employerName)) {
|
|
|
- params.put("employerName", employerName);
|
|
|
- }
|
|
|
-
|
|
|
- if (StringUtils.isNotBlank(username)) {
|
|
|
- params.put("unitName", username);
|
|
|
- }
|
|
|
-
|
|
|
- return (Pagination<DemandManageListBo>) findPage("findManageOrgDemandListByPage", "findManageOrgDemandCount",
|
|
|
- params, pNo, pSize);
|
|
|
- }
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ FieldGlossoryMapper fieldGlossoryMapper;
|
|
|
+ @Autowired
|
|
|
+ BranchInformationMapper branchInformationMapper;
|
|
|
+ @Autowired
|
|
|
+ DemandPublishMapper demandPublishMapper;
|
|
|
@Override
|
|
|
public void saveUserDemand(Demand d, String validityPeriodFormattedDate, String[] keywords) {
|
|
|
Date validityPeriod = null;
|
|
|
@@ -316,28 +211,7 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
|
|
|
public Demand selectByPrimaryKey(String id) {
|
|
|
return demandMapper.selectByPrimaryKey(id);
|
|
|
}
|
|
|
-
|
|
|
- @SuppressWarnings("unchecked")
|
|
|
- @Override
|
|
|
- public Pagination<DemandListBo> listDemand(Integer auditStatus, Integer serialNumber, String name, String keyword,
|
|
|
- Integer demandType, String validityPeriodStartDate, String validityPeriodEndDate, Integer status,
|
|
|
- Integer releaseStatus, String releaseDateStartDate, String releaseDateEndDate,String createDateStartDate, String createDateEndDate, Integer pNo, Integer pSize) {
|
|
|
- Map<String, Object> params = disposeParams(auditStatus, null, serialNumber, name, keyword, null, demandType,
|
|
|
- validityPeriodStartDate, validityPeriodEndDate, null, status, releaseStatus, releaseDateStartDate,
|
|
|
- releaseDateEndDate, createDateStartDate, createDateEndDate, null, null);
|
|
|
-
|
|
|
- params.put("employerId", TokenManager.getUserId());
|
|
|
-
|
|
|
- if (pNo == null || pNo < 0) {
|
|
|
- pNo = 1;
|
|
|
- }
|
|
|
-
|
|
|
- if (pSize == null || pSize < 0) {
|
|
|
- pSize = 10;
|
|
|
- }
|
|
|
- return (Pagination<DemandListBo>) findPage("findDemandListByPage", "findDemandCount", params, pNo, pSize);
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
@Override
|
|
|
public int updateReleaseStatus(Demand d) {
|
|
|
d.setAuditStatus(DemandAuditStatus.AUDITED.getCode());
|
|
|
@@ -414,7 +288,7 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void saveDemand(Demand d, String validityPeriodFormattedDate, String[] keywords) {
|
|
|
+ public void saveDemand(Demand d, String validityPeriodFormattedDate, String[] keywords,List<String> webPages, List<String> appPages) {
|
|
|
Date validityPeriod = null;
|
|
|
if (!StringUtils.isBlank(validityPeriodFormattedDate)) {
|
|
|
try {
|
|
|
@@ -422,27 +296,61 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
|
|
|
} catch (ParseException e) {
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
d.setValidityPeriod(validityPeriod);
|
|
|
d.setId(UUID.randomUUID().toString());
|
|
|
-
|
|
|
d.setDeletedSign(DeleteStatus.UNDELETE.getCode());
|
|
|
-
|
|
|
Calendar now = Calendar.getInstance();
|
|
|
now.set(Calendar.MILLISECOND, 0);
|
|
|
d.setStatus(DemandStatus.UNRESOLVED.getCode());
|
|
|
d.setReleaseStatus(DemandReleaseStatus.UNRELEASE.getCode());
|
|
|
-
|
|
|
if (DemandAuditStatus.SUBMIT.getCode().equals(d.getAuditStatus())) {
|
|
|
d.setAuditStatus(DemandAuditStatus.INAUDIT.getCode());
|
|
|
createAuditorNotice(d);
|
|
|
} else {
|
|
|
d.setAuditStatus(DemandAuditStatus.CREATE.getCode());
|
|
|
}
|
|
|
-
|
|
|
d.setCreateTime(now.getTime());
|
|
|
demandMapper.insert(d);
|
|
|
disposeDemandKeyword(keywords, d, false);
|
|
|
+ disposeDemandPublish(d,webPages,appPages);
|
|
|
+ }
|
|
|
+
|
|
|
+ private void disposeDemandPublish(Demand d, List<String> webPages, List<String> appPages) {
|
|
|
+ DemandPublish dp = null;
|
|
|
+ String defaultPlatformId = branchInformationMapper.selectByDomain(PageConstants.DEFAULT_DOMAIN).getId();
|
|
|
+ if(webPages.size()>0){
|
|
|
+ for(String page: webPages){
|
|
|
+ dp = new DemandPublish();
|
|
|
+ dp.setId(UUID.randomUUID().toString());
|
|
|
+ dp.setDemandId(d.getId());
|
|
|
+ dp.setPublisher(TokenManager.getUserId());
|
|
|
+ dp.setPublishTime(d.getCreateTime());
|
|
|
+ dp.setPublishClient(PageConstants.WEB_PLATFORM);
|
|
|
+ dp.setPublishPage(page);
|
|
|
+ dp.setPublishPlatform(defaultPlatformId);
|
|
|
+ dp.setIfTop(AFTConstants.NO);
|
|
|
+ dp.setTopNumber(PageConstants.DEFAULT_TOP_NUMBER);
|
|
|
+ dp.setShowNumber(PageConstants.DEFAULT_SHOW_NUMBER);
|
|
|
+ demandPublishMapper.insert(dp);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(appPages.size()>0){
|
|
|
+ for(String page: webPages){
|
|
|
+ dp = new DemandPublish();
|
|
|
+ dp.setId(UUID.randomUUID().toString());
|
|
|
+ dp.setDemandId(d.getId());
|
|
|
+ dp.setPublisher(TokenManager.getUserId());
|
|
|
+ dp.setPublishTime(d.getCreateTime());
|
|
|
+ dp.setPublishClient(PageConstants.APP_PLATFORM);
|
|
|
+ dp.setPublishPage(page);
|
|
|
+ dp.setPublishPlatform(defaultPlatformId);
|
|
|
+ dp.setIfTop(AFTConstants.NO);
|
|
|
+ dp.setTopNumber(PageConstants.DEFAULT_TOP_NUMBER);
|
|
|
+ dp.setShowNumber(PageConstants.DEFAULT_SHOW_NUMBER);
|
|
|
+ demandPublishMapper.insert(dp);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -491,59 +399,6 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
|
|
|
demandKeywordMapper.insertBatch(demandKeywordList);
|
|
|
}
|
|
|
|
|
|
- @SuppressWarnings("unchecked")
|
|
|
- @Override
|
|
|
- public Pagination<DemandSearchListBo> listDemandSearchList(String url,Integer sign, String keyword, Integer industryCategoryA,
|
|
|
- Integer industryCategoryB, Integer demandType, BigDecimal budgetCostLower, BigDecimal budgetCostUpper,
|
|
|
- Integer pNo, Integer pSize, Integer dateSort) {
|
|
|
- Map<String, Object> params = new HashMap<>();
|
|
|
- if (!StringUtils.isBlank(url)) {
|
|
|
- params.put("url", url);
|
|
|
- }
|
|
|
- if (!StringUtils.isBlank(keyword)) {
|
|
|
- params.put("keyword", keyword);
|
|
|
- }
|
|
|
-
|
|
|
- if (null != industryCategoryA) {
|
|
|
- params.put("industryCategoryA", industryCategoryA);
|
|
|
- }
|
|
|
-
|
|
|
- if (null != industryCategoryB) {
|
|
|
- params.put("industryCategoryB", industryCategoryB);
|
|
|
- }
|
|
|
-
|
|
|
- if (null != demandType) {
|
|
|
- params.put("demandType", demandType);
|
|
|
- }
|
|
|
-
|
|
|
- if (null != budgetCostLower && DemandPortalSearchSignType.ALL.getCode().equals(sign)) {
|
|
|
- params.put("budgetCostLower", budgetCostLower);
|
|
|
- }
|
|
|
-
|
|
|
- if (null != budgetCostUpper && DemandPortalSearchSignType.ALL.getCode().equals(sign)) {
|
|
|
- params.put("budgetCostUpper", budgetCostUpper);
|
|
|
- }
|
|
|
-
|
|
|
- if (null != sign) {
|
|
|
- params.put("sign", sign);
|
|
|
- }
|
|
|
-
|
|
|
- if (null != dateSort) {
|
|
|
- params.put("dateSort", dateSort);
|
|
|
- }
|
|
|
-
|
|
|
- if (pNo == null || pNo < 0) {
|
|
|
- pNo = 1;
|
|
|
- }
|
|
|
-
|
|
|
- if (pSize == null || pSize < 0 || pSize > 10) {
|
|
|
- pSize = 12;
|
|
|
- }
|
|
|
-
|
|
|
- return (Pagination<DemandSearchListBo>) findPage("findSearchDemandListByPage", "findSearchDemandCount", params,
|
|
|
- pNo, pSize);
|
|
|
- }
|
|
|
-
|
|
|
@Override
|
|
|
public DemandSearchDetailBo selectDemandSearchDetail(String uid, String id) {
|
|
|
return demandMapper.selectDemandSearchDetail(uid, id);
|
|
|
@@ -807,7 +662,7 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
|
|
|
public int updateByPrimaryKeySelective(Demand d) {
|
|
|
return demandMapper.updateByPrimaryKeySelective(d);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
@Override
|
|
|
public DemandListBo selectDemandDetail(String id ) {
|
|
|
DemandListBo d=demandMapper.selectAppByPrimaryKey(id);
|
|
|
@@ -834,52 +689,6 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
|
|
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
@Override
|
|
|
- public Pagination<BoutiqueListBo> boutiqueSearchList(Integer industryCategoryA, Integer pNo, Integer pSize) {
|
|
|
- Map<String, Object> params = new HashMap<>();
|
|
|
- if (null != industryCategoryA)
|
|
|
- params.put("industryCategoryA", industryCategoryA);
|
|
|
- return (Pagination<BoutiqueListBo>) findPage("findBoutiqueListByPage", "findBoutiqueCount", params, pNo, pSize);
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public ArrayList<DemandListBo> selectDemandList(Integer boutique) {
|
|
|
- return demandMapper.selectDemandList(boutique);
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public List<DemandListBo> selectCsutomerLike() {
|
|
|
- return demandMapper.selectCsutomerLike(TokenManager.getUserId());
|
|
|
- }
|
|
|
-
|
|
|
- @SuppressWarnings("unchecked")
|
|
|
- @Override
|
|
|
- public Pagination<DemandSearchListBo> listAppDemand(Integer auditStatus, Integer serialNumber, String name,
|
|
|
- String keyword, Integer demandType,Integer industryCategoryA, String validityPeriodStartDate, String validityPeriodEndDate,
|
|
|
- Integer status, Integer releaseStatus, String releaseDateStartDate, String releaseDateEndDate,String employerId, Integer pNo,
|
|
|
- Integer pSize) {
|
|
|
- Map<String, Object> params = disposeParams(auditStatus, null, serialNumber, name, keyword, null, demandType,
|
|
|
- validityPeriodStartDate, validityPeriodEndDate, null, status, releaseStatus, releaseDateStartDate,
|
|
|
- releaseDateEndDate,null,null, null, null);
|
|
|
- if (null!=industryCategoryA) {
|
|
|
- params.put("industryCategoryA", industryCategoryA);
|
|
|
- }
|
|
|
- if (null!=employerId) {
|
|
|
- params.put("employerId", employerId);
|
|
|
- }
|
|
|
- if (pNo == null || pNo < 0) {
|
|
|
- pNo = 1;
|
|
|
- }
|
|
|
-
|
|
|
- if (pSize == null || pSize < 0) {
|
|
|
- pSize = 10;
|
|
|
-
|
|
|
- }
|
|
|
- Pagination<DemandSearchListBo> p=(Pagination<DemandSearchListBo>) findPage("findAppDemandListByPage", "findAppDemandCount", params, pNo, pSize);
|
|
|
- return p;
|
|
|
- }
|
|
|
-
|
|
|
- @SuppressWarnings("unchecked")
|
|
|
- @Override
|
|
|
public Pagination<ObjectInterestListBo> selectinterest(Integer type,Integer pNo, Integer pSize) {
|
|
|
if (pNo == null || pNo < 0) {
|
|
|
pNo = 1;
|
|
|
@@ -1019,92 +828,6 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
|
|
|
return demandMapper.insert(d);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- @SuppressWarnings("unchecked")
|
|
|
- @Override
|
|
|
- public Pagination<DemandManageListBo> selectMyDemandManageList(Integer dataCategory,String employerName, Integer auditStatus,
|
|
|
- Integer province, Integer serialNumber, String name, String keyword, Integer infoSources,
|
|
|
- Integer demandType, String validityPeriodStartDate, String validityPeriodEndDate, String username,
|
|
|
- Integer status, Integer releaseStatus, String releaseDateStartDate, String releaseDateEndDate,String createDateStartDate, String createDateEndDate, Integer pNo,
|
|
|
- Integer pSize, Integer boutique, Integer hot, String techBrokerId) {
|
|
|
- Map<String, Object> params = disposeParams(auditStatus, province, serialNumber, name, keyword, infoSources,
|
|
|
- demandType, validityPeriodStartDate, validityPeriodEndDate, username, status, releaseStatus,
|
|
|
- releaseDateStartDate, releaseDateEndDate, createDateStartDate, createDateEndDate, boutique, hot);
|
|
|
-
|
|
|
- if (pNo == null || pNo < 0) {
|
|
|
- pNo = 1;
|
|
|
- }
|
|
|
-
|
|
|
- if (pSize == null || pSize < 0 || pSize > 10) {
|
|
|
- pSize = 10;
|
|
|
- }
|
|
|
- if (null != dataCategory) {
|
|
|
- params.put("dataCategory", dataCategory);
|
|
|
- }
|
|
|
-
|
|
|
- if (!TokenManager.hasRole(AFTConstants.SUPERADMIN) && !TokenManager.hasRole(AFTConstants.AUDITORADMIN)) {
|
|
|
- params.put("adminId", TokenManager.getAdminId());
|
|
|
- }
|
|
|
-
|
|
|
- if (StringUtils.isNotBlank(employerName)) {
|
|
|
- params.put("employerName", employerName);
|
|
|
- }
|
|
|
-
|
|
|
- if (StringUtils.isNotBlank(username)) {
|
|
|
- params.put("unitName", username);
|
|
|
- }
|
|
|
- if (null != techBrokerId) {
|
|
|
- params.put("techBrokerId", techBrokerId);
|
|
|
- }
|
|
|
-
|
|
|
- return (Pagination<DemandManageListBo>) findPage("findMyDemandListByPage", "findMyDemandCount",
|
|
|
- params, pNo, pSize);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- @SuppressWarnings("unchecked")
|
|
|
- @Override
|
|
|
- public Pagination<DemandManageListBo> selectManageDemandManageList(Integer dataCategory,String employerName, Integer auditStatus,
|
|
|
- Integer province, Integer serialNumber, String name, String keyword, Integer infoSources,
|
|
|
- Integer demandType, String validityPeriodStartDate, String validityPeriodEndDate, String username,
|
|
|
- Integer status, Integer releaseStatus, String releaseDateStartDate, String releaseDateEndDate,String createDateStartDate, String createDateEndDate, Integer pNo,
|
|
|
- Integer pSize, Integer boutique, Integer hot, String techBrokerId,String recordPerson) {
|
|
|
- Map<String, Object> params = disposeParams(auditStatus, province, serialNumber, name, keyword, infoSources,
|
|
|
- demandType, validityPeriodStartDate, validityPeriodEndDate, username, status, releaseStatus,
|
|
|
- releaseDateStartDate, releaseDateEndDate, createDateStartDate, createDateEndDate, boutique, hot);
|
|
|
-
|
|
|
- if (pNo == null || pNo < 0) {
|
|
|
- pNo = 1;
|
|
|
- }
|
|
|
-
|
|
|
- if (pSize == null || pSize < 0 || pSize > 10) {
|
|
|
- pSize = 10;
|
|
|
- }
|
|
|
- if (null != dataCategory) {
|
|
|
- params.put("dataCategory", dataCategory);
|
|
|
- }
|
|
|
- if (null != recordPerson) {
|
|
|
- params.put("recordPerson", recordPerson);
|
|
|
- }
|
|
|
- if (!TokenManager.hasRole(AFTConstants.SUPERADMIN) && !TokenManager.hasRole(AFTConstants.AUDITORADMIN)) {
|
|
|
- params.put("adminId", TokenManager.getAdminId());
|
|
|
- }
|
|
|
-
|
|
|
- if (StringUtils.isNotBlank(employerName)) {
|
|
|
- params.put("employerName", employerName);
|
|
|
- }
|
|
|
-
|
|
|
- if (StringUtils.isNotBlank(username)) {
|
|
|
- params.put("unitName", username);
|
|
|
- }
|
|
|
- if (null != techBrokerId) {
|
|
|
- params.put("techBrokerId", techBrokerId);
|
|
|
- }
|
|
|
-
|
|
|
- return (Pagination<DemandManageListBo>) findPage("findManageDemandListByPage", "findManagegDemandCount",
|
|
|
- params, pNo, pSize);
|
|
|
- }
|
|
|
-
|
|
|
@Override
|
|
|
public Demand DemandFollowDetails(String id) {
|
|
|
return demandMapper.selectDemandFollow(id);
|
|
|
@@ -1147,10 +870,30 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
|
|
|
return demandMapper.getProLearnStudyDemand();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
+ @Override
|
|
|
+ public Pagination<DemandSearchListBo> listAppDemand(Integer auditStatus, Integer serialNumber, String name,
|
|
|
+ String keyword, Integer demandType,Integer industryCategoryA, String validityPeriodStartDate, String validityPeriodEndDate,
|
|
|
+ Integer status, Integer releaseStatus, String releaseDateStartDate, String releaseDateEndDate,String employerId, Integer pNo,
|
|
|
+ Integer pSize) {
|
|
|
+ Map<String, Object> params = disposeParams(auditStatus, null, serialNumber, name, keyword, null, demandType,
|
|
|
+ validityPeriodStartDate, validityPeriodEndDate, null, status, releaseStatus, releaseDateStartDate,
|
|
|
+ releaseDateEndDate,null,null, null, null);
|
|
|
+ if (null!=industryCategoryA) {
|
|
|
+ params.put("industryCategoryA", industryCategoryA);
|
|
|
+ }
|
|
|
+ if (null!=employerId) {
|
|
|
+ params.put("employerId", employerId);
|
|
|
+ }
|
|
|
+ if (pNo == null || pNo < 0) {
|
|
|
+ pNo = 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (pSize == null || pSize < 0) {
|
|
|
+ pSize = 10;
|
|
|
+
|
|
|
+ }
|
|
|
+ Pagination<DemandSearchListBo> p=(Pagination<DemandSearchListBo>) findPage("findAppDemandListByPage", "findAppDemandCount", params, pNo, pSize);
|
|
|
+ return p;
|
|
|
+ }
|
|
|
}
|