|
@@ -17,10 +17,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.List;
|
|
|
-import java.util.UUID;
|
|
|
+import java.util.*;
|
|
|
+import java.util.regex.Pattern;
|
|
|
|
|
|
import static java.lang.System.in;
|
|
|
|
|
@@ -82,14 +80,14 @@ public class RyTask {
|
|
|
isRun = true;
|
|
|
//从自治区同步项目信息
|
|
|
this.syncSubInfo();
|
|
|
- //同步自治区前期手续信息
|
|
|
+// //同步自治区前期手续信息
|
|
|
this.syncPreNew();
|
|
|
- //同步住建局手续
|
|
|
+// //同步住建局手续
|
|
|
this.syncDoc();
|
|
|
this.syncDocLog();
|
|
|
- //从公共资源交易中心同步招投标信息
|
|
|
- this.syncTender();
|
|
|
// //从公共资源交易中心同步招投标信息
|
|
|
+ this.syncTender();
|
|
|
+// //从公共资源交易中心同步招投标信息
|
|
|
this.syncTenderLog();
|
|
|
isRun = false;
|
|
|
}
|
|
@@ -153,6 +151,9 @@ public class RyTask {
|
|
|
docLogService.saveOrUpdate(doc);
|
|
|
continue;
|
|
|
}
|
|
|
+// if (doc.getDocName().contains("-")){
|
|
|
+// doc.setDocName(doc.getDocName().split("-")[0]);
|
|
|
+// }
|
|
|
try {
|
|
|
if (subInfoService.SyncDocLog(doc, company)) {
|
|
|
doc.setIsHandle("2");
|
|
@@ -186,10 +187,10 @@ public class RyTask {
|
|
|
}
|
|
|
|
|
|
for (SubDoc doc : list) {
|
|
|
- if(doc.getCode().split("-").length!=5){
|
|
|
- doc.setIsHandle("2");
|
|
|
- subDocService.saveOrUpdate(doc);
|
|
|
- continue;
|
|
|
+ String code = doc.getCode();
|
|
|
+ String[] parts = code.split("-");
|
|
|
+ if (parts.length >= 5) {
|
|
|
+ doc.setCode(String.join("-", Arrays.copyOfRange(parts, 0, 5)));
|
|
|
}
|
|
|
try {
|
|
|
if (subInfoService.syncDoc(doc, company)) {
|
|
@@ -264,6 +265,14 @@ public class RyTask {
|
|
|
syncLogService.remove(new LambdaQueryWrapper<SyncLog>().eq(SyncLog::getCat, "1"));
|
|
|
}
|
|
|
for (Sub sub : list) {
|
|
|
+ if (sub.getProjectid().contains("X")||sub.getProjectid().contains("x")){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ String prefix = sub.getProjectid().substring(0, 4);
|
|
|
+ String regex = "^\\d{2}(0[1-9]|1[0-2])"; // 两位数字年份,后接两位数字月份
|
|
|
+ if (!Pattern.matches(regex,prefix)){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
try {
|
|
|
if (subInfoService.syncSubInfo(sub, company)) {
|
|
|
sub.setIsHandle("2");
|