diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/ding/controller/DingInfoPullController.java b/pmapi/src/main/java/com/ningdatech/pmapi/ding/controller/DingInfoPullController.java index 04c38fc..8ceeda3 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/ding/controller/DingInfoPullController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/ding/controller/DingInfoPullController.java @@ -87,6 +87,25 @@ public class DingInfoPullController { System.out.println(JSON.toJSONString(forEntity)); } + @GetMapping("/test-app2") + public void testApp2() throws NoSuchAlgorithmException { + long timestamp = System.currentTimeMillis(); + String areaCode = "331121"; + String appScret = "496f0f2a19994f76b4fd9dae087366c7"; + String appKey = "A331101453557202109017383"; + String appCode = "A331123467587202306014169"; + + String requestSecret = RefreshKeyUtil.getRequestSecret(appKey, appScret); + String sign = CryptUtils.MD5Encode(appKey + requestSecret + timestamp); + String url = "https://interface.zjzwfw.gov.cn/gateway/api/001003001029/dataSharing/XS8daav3bcemZ3Ra.htm?" + + "requestTime=" + timestamp + "&sign=" + sign + "&appKey=" + appKey + "&name=abc&" + + "pageSize=10&deptCode=abc&areaCode=" + areaCode + "&pageNum=1&appCode=" + appCode; + RestTemplate restTemplate = new RestTemplate(); + ResponseEntity forEntity = restTemplate.getForEntity(url, String.class); + + System.out.println(JSON.toJSONString(forEntity)); + } + @GetMapping("/getToken") public String getToken() { return employeeBatchGetTask.getToken(); diff --git a/pmapi/src/main/resources/application-prod.yml b/pmapi/src/main/resources/application-prod.yml index db573e1..6de2397 100644 --- a/pmapi/src/main/resources/application-prod.yml +++ b/pmapi/src/main/resources/application-prod.yml @@ -193,11 +193,11 @@ yxt: #省局联审 请求信息 provincial: - host: http://223.4.72.75/prometheus-zhejiang_foreign + host: https://pms.zj.gov.cn/prometheus-zhejiang_foreign pushUrl: /api/v1/foreign/importantPro detailUrl: /api/v1/foreign/importantProView - key: 7fb48b518c6044a5a44deddd11b445e3 - secret: ced8fff70018413c9516c58f95885624 + key: b5b2096953534a53991be4ea95f8cffa + secret: 1bec9b77134d4962ac466fbe9696b897 #天印服务器接口信息 diff --git a/pmapi/src/test/java/com/ningdatech/pmapi/irs/IrsTest.java b/pmapi/src/test/java/com/ningdatech/pmapi/irs/IrsTest.java index 863e758..ae811d8 100644 --- a/pmapi/src/test/java/com/ningdatech/pmapi/irs/IrsTest.java +++ b/pmapi/src/test/java/com/ningdatech/pmapi/irs/IrsTest.java @@ -65,6 +65,25 @@ public class IrsTest extends AppTests { } @Test + public void testApp() throws NoSuchAlgorithmException { + long timestamp = System.currentTimeMillis(); + String areaCode = "331121"; + String appScret = "496f0f2a19994f76b4fd9dae087366c7"; + String appKey = "A331101453557202109017383"; + String appCode = "A331123467587202306014169"; + + String requestSecret = RefreshKeyUtil.getRequestSecret(appKey, appScret); + String sign = CryptUtils.MD5Encode(appKey + requestSecret + timestamp); + String url = "https://interface.zjzwfw.gov.cn/gateway/api/001003001029/dataSharing/XS8daav3bcemZ3Ra.htm?" + + "requestTime=" + timestamp + "&sign=" + sign + "&appKey=" + appKey + "&name=abc&" + + "pageSize=10&deptCode=abc&areaCode=" + areaCode + "&pageNum=1&appCode=" + appCode; + RestTemplate restTemplate = new RestTemplate(); + ResponseEntity forEntity = restTemplate.getForEntity(url, String.class); + + System.out.println(JSON.toJSONString(forEntity)); + } + + @Test public void test2() throws NoSuchAlgorithmException { long timestamp = System.currentTimeMillis(); String areaCode = "331121"; diff --git a/pmapi/src/test/java/com/ningdatech/pmapi/provincial/Test.java b/pmapi/src/test/java/com/ningdatech/pmapi/provincial/Test.java index 8ce4134..5819000 100644 --- a/pmapi/src/test/java/com/ningdatech/pmapi/provincial/Test.java +++ b/pmapi/src/test/java/com/ningdatech/pmapi/provincial/Test.java @@ -1,9 +1,13 @@ package com.ningdatech.pmapi.provincial; +import cn.hutool.core.collection.CollUtil; import cn.hutool.crypto.SecureUtil; +import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.ningdatech.file.service.FileService; import com.ningdatech.pmapi.AppTests; +import com.ningdatech.pmapi.common.constant.ProjectDeclareConst; +import com.ningdatech.pmapi.common.constant.RegionConst; import com.ningdatech.pmapi.projectdeclared.converter.ApplicationConverter; import com.ningdatech.pmapi.projectdeclared.manage.PrequalificationDeclaredProjectManage; import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; @@ -12,6 +16,9 @@ import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication; import com.ningdatech.pmapi.projectlib.service.IProjectApplicationService; import com.ningdatech.pmapi.projectlib.service.IProjectService; import com.ningdatech.pmapi.provincial.service.IJoinReviewProvincialBureauService; +import com.ningdatech.pmapi.staging.contants.StagingContant; +import com.ningdatech.pmapi.staging.model.entity.ProjectStaging; +import com.ningdatech.pmapi.staging.service.IProjectStagingService; import com.ningdatech.pmapi.todocenter.constant.TodoCenterContant; import com.wflow.exception.BusinessException; import lombok.extern.slf4j.Slf4j; @@ -51,6 +58,9 @@ public class Test extends AppTests{// @Autowired private IJoinReviewProvincialBureauService joinReviewProvincialBureauService; + @Autowired + private IProjectStagingService projectStagingService; + @org.junit.Test public void test() throws NoSuchAlgorithmException, UnsupportedEncodingException, InvalidKeyException { // Long timeStamp = System.currentTimeMillis()/1000; @@ -93,4 +103,28 @@ public class Test extends AppTests{// } System.out.println("成功"); } + + @org.junit.Test + public void test5(){ + //1. 定时取 项目暂存表的数据 去进行状态继续流转 + List stagingList = projectStagingService.list(Wrappers.lambdaQuery(ProjectStaging.class) + .eq(ProjectStaging::getDead,Boolean.FALSE) + .le(ProjectStaging::getNextTime, LocalDateTime.now()) + .le(ProjectStaging::getRetryTimes, StagingContant.Retry.MAX_RETRY_TIMES) + .orderByAsc(ProjectStaging::getProjectId)); + + log.info("需要状态流转的项目 size:{} :{}",stagingList.size(), JSON.toJSONString(stagingList)); + } + + @org.junit.Test + public void test6(){ + List projectList = projectService.list(Wrappers.lambdaQuery(Project.class) + .eq(Project::getStage, ProjectStatusEnum.NOT_APPROVED.getCode()) + .eq(Project::getStatus, ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS.getCode()) + .ge(Project::getDeclareAmount, ProjectDeclareConst.Number.DECLARE_AMOUNT_JUDGEMENT) + .eq(Project::getAreaCode, RegionConst.RC_LS) + .orderByAsc(Project::getCreateOn)); + + log.info("需要去查询省级联审结果的项目 size:{}",projectList.size()); + } } diff --git a/pmapi/src/test/resources/application-prod.yml b/pmapi/src/test/resources/application-prod.yml index 7f9325a..87aea90 100644 --- a/pmapi/src/test/resources/application-prod.yml +++ b/pmapi/src/test/resources/application-prod.yml @@ -193,11 +193,11 @@ yxt: #省局联审 请求信息 provincial: - host: http://zj.ningdatech.com/prometheus-zhejiang_foreign + host: https://pms.zj.gov.cn/prometheus-zhejiang_foreign pushUrl: /api/v1/foreign/importantPro detailUrl: /api/v1/foreign/importantProView - key: 7196317343a64e67895dc0375c098fe7 - secret: 75152a97f20e4c4c854dc6301cf72ad4 + key: b5b2096953534a53991be4ea95f8cffa + secret: 1bec9b77134d4962ac466fbe9696b897 #天印服务器接口信息