@@ -7,6 +7,7 @@ import com.ningdatech.pmapi.common.util.CryptUtils; | |||||
import com.ningdatech.pmapi.common.util.HttpUtil; | import com.ningdatech.pmapi.common.util.HttpUtil; | ||||
import lombok.RequiredArgsConstructor; | import lombok.RequiredArgsConstructor; | ||||
import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
import org.apache.commons.lang3.StringUtils; | |||||
import org.springframework.beans.factory.annotation.Value; | import org.springframework.beans.factory.annotation.Value; | ||||
import org.springframework.http.HttpMethod; | import org.springframework.http.HttpMethod; | ||||
import org.springframework.http.ResponseEntity; | import org.springframework.http.ResponseEntity; | ||||
@@ -54,7 +55,7 @@ public class ProjectIrsManage { | |||||
* @return | * @return | ||||
* @throws NoSuchAlgorithmException | * @throws NoSuchAlgorithmException | ||||
*/ | */ | ||||
public JSONObject searchCoreBiz(String businessName,String orgCode) { | |||||
public JSONObject searchCoreBiz(String businessName,String orgCode,Integer limit,Integer page) { | |||||
long timestamp = System.currentTimeMillis(); | long timestamp = System.currentTimeMillis(); | ||||
String secret = refreshTokenService.refreshToken(appKey, appSecret, govRequestTokenUrl, govRefreshTokenUrl, | String secret = refreshTokenService.refreshToken(appKey, appSecret, govRequestTokenUrl, govRefreshTokenUrl, | ||||
interfaceName, HttpMethod.POST.name()); | interfaceName, HttpMethod.POST.name()); | ||||
@@ -73,7 +74,8 @@ public class ProjectIrsManage { | |||||
} | } | ||||
String url = coreBizUrl + "?" + | String url = coreBizUrl + "?" + | ||||
"dingCode=&matterName=" + businessName + "&oid=&useState=1&limit=10&page=1" + | |||||
"dingCode=" + orgCode + "&matterName=" + (StringUtils.isNotBlank(businessName)?businessName:StringUtils.EMPTY) + "&oid=&useState=1&" + | |||||
"limit=" + (Objects.isNull(limit) ? "10" : limit) + "&page=" + (Objects.isNull(page) ? "1" : page) + | |||||
"&appKey=" + appKey + "&sign=" + sign + "&requestTime=" + timestamp; | "&appKey=" + appKey + "&sign=" + sign + "&requestTime=" + timestamp; | ||||
ResponseEntity<JSONObject> forEntity = restTemplate.getForEntity(url, JSONObject.class); | ResponseEntity<JSONObject> forEntity = restTemplate.getForEntity(url, JSONObject.class); | ||||
@@ -47,8 +47,10 @@ public class DeclaredProjectController { | |||||
@ApiOperation(value = "核心业务列表", notes = "核心业务列表") | @ApiOperation(value = "核心业务列表", notes = "核心业务列表") | ||||
@GetMapping("/core-biz") | @GetMapping("/core-biz") | ||||
public JSONObject bizList(@RequestParam(required = false) String businessName) { | |||||
return declaredProjectManage.bizList(businessName); | |||||
public JSONObject bizList(@RequestParam(required = false) String businessName, | |||||
@RequestParam(required = false) Integer pageSize, | |||||
@RequestParam(required = false) Integer pageNumber) { | |||||
return declaredProjectManage.bizList(businessName,pageSize,pageNumber); | |||||
} | } | ||||
@ApiOperation(value = "申报项目草稿箱列表", notes = "申报项目草稿箱列表") | @ApiOperation(value = "申报项目草稿箱列表", notes = "申报项目草稿箱列表") | ||||
@@ -49,6 +49,7 @@ import com.wflow.workflow.bean.dto.OrgInfoDTO; | |||||
import com.wflow.workflow.bean.vo.ProcessStartParamsVo; | import com.wflow.workflow.bean.vo.ProcessStartParamsVo; | ||||
import com.wflow.workflow.service.ProcessInstanceService; | import com.wflow.workflow.service.ProcessInstanceService; | ||||
import com.wflow.workflow.service.ProcessModelService; | import com.wflow.workflow.service.ProcessModelService; | ||||
import io.swagger.models.auth.In; | |||||
import lombok.RequiredArgsConstructor; | import lombok.RequiredArgsConstructor; | ||||
import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.StringUtils; | ||||
@@ -431,11 +432,14 @@ public class DeclaredProjectManage { | |||||
* @param businessName | * @param businessName | ||||
* @return | * @return | ||||
*/ | */ | ||||
public JSONObject bizList(String businessName) { | |||||
public JSONObject bizList(String businessName,Integer limit, Integer page) { | |||||
JSONObject jsonObject = new JSONObject(); | JSONObject jsonObject = new JSONObject(); | ||||
UserInfoDetails user = LoginUserUtil.loginUserDetail(); | UserInfoDetails user = LoginUserUtil.loginUserDetail(); | ||||
if(BizConst.DEV.equals(active)){ | if(BizConst.DEV.equals(active)){ | ||||
jsonObject = JSONObject.parseObject(DeclaredProjectContant.Biz.CORE_BIZ); | jsonObject = JSONObject.parseObject(DeclaredProjectContant.Biz.CORE_BIZ); | ||||
if(CollUtil.isEmpty(jsonObject)){ | |||||
return jsonObject; | |||||
} | |||||
if(StringUtils.isNotBlank(businessName)){ | if(StringUtils.isNotBlank(businessName)){ | ||||
JSONArray dataArray = JSONArray.parseArray(jsonObject.getString("data")); | JSONArray dataArray = JSONArray.parseArray(jsonObject.getString("data")); | ||||
if(CollUtil.isEmpty(dataArray)){ | if(CollUtil.isEmpty(dataArray)){ | ||||
@@ -451,15 +455,12 @@ public class DeclaredProjectManage { | |||||
} | } | ||||
} | } | ||||
jsonObject.put("data",dataArrayRes); | jsonObject.put("data",dataArrayRes); | ||||
jsonObject.put("total",dataArrayRes.size()); | |||||
} | } | ||||
}else if(BizConst.PRE.equals(active) || | }else if(BizConst.PRE.equals(active) || | ||||
BizConst.PROD.equals(active)){ | BizConst.PROD.equals(active)){ | ||||
jsonObject = projectIrsManage.searchCoreBiz(businessName,user.getEmpPosUnitCode()); | |||||
} | |||||
if(CollUtil.isEmpty(jsonObject)){ | |||||
return jsonObject; | |||||
jsonObject = projectIrsManage.searchCoreBiz(businessName,user.getEmpPosUnitCode(),limit,page); | |||||
} | } | ||||
return jsonObject; | return jsonObject; | ||||
} | } | ||||
} | } |
@@ -5,24 +5,11 @@ import com.alibaba.fastjson.JSON; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.ningdatech.pmapi.common.constant.BizConst; | import com.ningdatech.pmapi.common.constant.BizConst; | ||||
import com.ningdatech.pmapi.common.enumeration.CommonEnum; | import com.ningdatech.pmapi.common.enumeration.CommonEnum; | ||||
import com.ningdatech.pmapi.common.helper.UserInfoHelper; | |||||
import com.ningdatech.pmapi.meeting.helper.YxtCallOrSmsHelper; | |||||
import com.ningdatech.pmapi.projectlib.enumeration.InstTypeEnum; | |||||
import com.ningdatech.pmapi.projectlib.model.entity.Project; | import com.ningdatech.pmapi.projectlib.model.entity.Project; | ||||
import com.ningdatech.pmapi.projectlib.model.entity.ProjectInst; | import com.ningdatech.pmapi.projectlib.model.entity.ProjectInst; | ||||
import com.ningdatech.pmapi.projectlib.service.IProjectInstService; | import com.ningdatech.pmapi.projectlib.service.IProjectInstService; | ||||
import com.ningdatech.pmapi.projectlib.service.IProjectService; | import com.ningdatech.pmapi.projectlib.service.IProjectService; | ||||
import com.ningdatech.pmapi.staging.enums.MsgTypeEnum; | |||||
import com.ningdatech.pmapi.staging.service.INdWorkNoticeStagingService; | |||||
import com.ningdatech.pmapi.sys.manage.EarlyWarningManage; | import com.ningdatech.pmapi.sys.manage.EarlyWarningManage; | ||||
import com.ningdatech.pmapi.sys.manage.NoticeManage; | |||||
import com.ningdatech.pmapi.sys.model.entity.Notify; | |||||
import com.ningdatech.pmapi.sys.model.entity.WflowEarlyWarningRecords; | |||||
import com.ningdatech.pmapi.sys.service.IEarlyWarningRecordsService; | |||||
import com.ningdatech.pmapi.sys.service.INotifyService; | |||||
import com.ningdatech.pmapi.todocenter.bean.entity.WorkNoticeInfo; | |||||
import com.ningdatech.pmapi.user.security.auth.model.UserFullInfoDTO; | |||||
import com.ningdatech.yxt.model.cmd.SendSmsCmd; | |||||
import com.wflow.enums.WarningRuleTypeEnum; | import com.wflow.enums.WarningRuleTypeEnum; | ||||
import com.wflow.workflow.notify.event.EarlyWarningEvent; | import com.wflow.workflow.notify.event.EarlyWarningEvent; | ||||
import lombok.RequiredArgsConstructor; | import lombok.RequiredArgsConstructor; | ||||
@@ -34,7 +21,6 @@ import org.flowable.engine.history.HistoricProcessInstance; | |||||
import org.springframework.context.event.EventListener; | import org.springframework.context.event.EventListener; | ||||
import org.springframework.scheduling.annotation.Async; | import org.springframework.scheduling.annotation.Async; | ||||
import org.springframework.stereotype.Component; | import org.springframework.stereotype.Component; | ||||
import java.time.LocalDateTime; | |||||
import java.time.ZoneId; | import java.time.ZoneId; | ||||
import java.util.List; | import java.util.List; | ||||
import java.util.Objects; | import java.util.Objects; | ||||