|
|
@@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSONArray; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.google.common.collect.Lists; |
|
|
|
import com.ningdatech.basic.util.StrPool; |
|
|
|
import com.ningdatech.log.model.domain.OptLog; |
|
|
|
import com.ningdatech.log.service.OptLogService; |
|
|
|
import com.ningdatech.pmapi.AppTests; |
|
|
@@ -18,6 +19,7 @@ import com.ningdatech.pmapi.gov.model.entity.*; |
|
|
|
import com.ningdatech.pmapi.gov.service.*; |
|
|
|
import com.ningdatech.pmapi.projectdeclared.utils.GenerateProjectCodeUtil; |
|
|
|
import com.ningdatech.pmapi.scheduler.task.SynProjectCollectionTask; |
|
|
|
import com.ningdatech.pmapi.scheduler.task.SynProjectCoreBizTask; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.junit.Test; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
@@ -68,6 +70,9 @@ public class ProjectCollectionTest extends AppTests { |
|
|
|
@Autowired |
|
|
|
private OptLogService optLogService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private SynProjectCoreBizTask projectCoreBizTask; |
|
|
|
|
|
|
|
@Test |
|
|
|
public void test(){ |
|
|
|
List<String> baseProjIds = Lists.newArrayList("33110000020230100061"); |
|
|
@@ -186,4 +191,26 @@ public class ProjectCollectionTest extends AppTests { |
|
|
|
Long ll = ChronoUnit.MONTHS.between(temporal1, temporal2); |
|
|
|
return ll.toString(); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
public void test6(){ |
|
|
|
List<GovBizProjectProcure> list = procureService.list(Wrappers.lambdaQuery(GovBizProjectProcure.class) |
|
|
|
.eq(GovBizProjectProcure::getDeleted,Boolean.FALSE)); |
|
|
|
|
|
|
|
for(GovBizProjectProcure procure : list){ |
|
|
|
try{ |
|
|
|
String index = procure.getBaseBidCode().split("-")[1]; |
|
|
|
procure.setBaseBidCode(procure.getBaseProjId() + StrPool.DASH + String.format(StrPool.FORMAT_DATE_SINGLE_DIGITS,Integer.parseInt(index))); |
|
|
|
procureService.updateById(procure); |
|
|
|
}catch (Exception e){ |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
public void test7() throws UnknownHostException { |
|
|
|
String orgCode = "GO_5f1f6f28a6f7484ea3b9991d8d02599f"; |
|
|
|
projectCoreBizTask.doTask(orgCode); |
|
|
|
} |
|
|
|
} |