Преглед изворни кода

大中型项目老系统订单查询

wucl пре 1 година
родитељ
комит
f8caffddfe

+ 49 - 0
biz-base/src/main/java/com/dayou/controller/HistoryOrderController.java

@@ -0,0 +1,49 @@
+package com.dayou.controller;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.dayou.common.RestResponse;
+import com.dayou.dto.history.HisMajorOrder;
+import com.dayou.dto.history.HisOrderParam;
+import com.dayou.service.IHistoryOrderService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 类说明:原系统订单查询
+ *
+ * @author: wucl
+ * @since: 2024/5/8
+ * created with IntelliJ IDEA.
+ */
+@RestController
+@RequestMapping("history/order")
+@Slf4j
+public class HistoryOrderController {
+
+    @Autowired
+    private IHistoryOrderService historyOrderService;
+
+    /**
+     * 获取原系统cookie
+     * @return
+     */
+    @GetMapping("/cookie")
+    public RestResponse<String> getEverCookie(){
+        String cookie = historyOrderService.getEverCookie();
+        return RestResponse.data(cookie);
+    }
+
+    /**
+     * 原系统大中型订单
+     * @param hisOrderParam
+     * @return
+     */
+    @GetMapping("/major")
+    public RestResponse<Page<HisMajorOrder>> page(HisOrderParam hisOrderParam){
+        Page<HisMajorOrder> pages = historyOrderService.hisMajorPage(hisOrderParam);
+        return RestResponse.data(pages);
+    }
+}

+ 161 - 161
biz-base/src/test/java/lucene/LuceneTest.java

@@ -1,161 +1,161 @@
-package lucene;
-
-import com.dayou.BaseApplication;
-import com.dayou.annotation.LuceneResource;
-import com.dayou.annotation.LuceneSearchable;
-import com.dayou.entity.Major;
-import com.dayou.entity.Personal;
-import com.dayou.enums.MainBusinessEnum;
-import com.dayou.service.ILuceneSearchService;
-import com.dayou.service.IMajorService;
-import com.dayou.service.IPersonalService;
-import com.dayou.utils.ReflectUtils;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.lucene.analysis.Analyzer;
-import org.apache.lucene.document.Document;
-import org.apache.lucene.document.Field;
-import org.apache.lucene.document.StringField;
-import org.apache.lucene.document.TextField;
-import org.apache.lucene.index.IndexWriter;
-import org.apache.lucene.index.IndexWriterConfig;
-import org.apache.lucene.store.Directory;
-import org.apache.lucene.store.FSDirectory;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
-import org.springframework.core.io.support.ResourcePatternResolver;
-import org.springframework.core.type.classreading.CachingMetadataReaderFactory;
-import org.springframework.core.type.classreading.MetadataReader;
-import org.springframework.core.type.classreading.MetadataReaderFactory;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-import org.springframework.util.ClassUtils;
-import org.wltea.analyzer.lucene.IKAnalyzer;
-import org.springframework.core.io.Resource;
-
-import java.io.IOException;
-import java.nio.file.FileSystems;
-import java.util.*;
-
-/**
- * 类说明:
- *
- * @author: wucl
- * @since: 2024/4/25
- * created with IntelliJ IDEA.
- */
-@Slf4j
-@SpringBootTest(classes = BaseApplication.class)
-@RunWith(value = SpringJUnit4ClassRunner.class)
-public class LuceneTest {
-
-    @Autowired
-    private IPersonalService personalService;
-
-    @Autowired
-    private IMajorService majorService;
-
-    @Autowired
-    private ILuceneSearchService luceneSearchService;
-
-
-
-    @Test
-    public void createIndex() throws NoSuchFieldException {
-        List<Personal> list = personalService.list();
-        List<Major> majors = majorService.list();
-        Collection<Document> docs = new ArrayList<>();
-        java.lang.reflect.Field[] personalFields = Personal.class.getDeclaredFields();
-        java.lang.reflect.Field[] majorFields = Major.class.getDeclaredFields();
-        for (Personal personal : list) {
-            Object id = ReflectUtils.getFieldValue(personal, "id");
-            for (java.lang.reflect.Field field : personalFields) {
-                if (field.getAnnotation(LuceneSearchable.class) != null) {
-                    Document document = new Document();
-                    Object fieldValue = ReflectUtils.getFieldValue(personal, field.getName());
-                    if (fieldValue != null) {
-                        document.add(new StringField("id", String.valueOf(id), Field.Store.YES));
-                        document.add(new TextField("result", String.valueOf(fieldValue), Field.Store.YES));
-                        document.add(new TextField("businessEnum", MainBusinessEnum.PERSONAL_BUSINESS.getMsg(), Field.Store.YES));
-                        document.add(new TextField("menuName", "正在进行", Field.Store.YES));
-                        document.add(new TextField("url", "/personal/pending/list", Field.Store.YES));
-                        docs.add(document);
-                    }
-
-                }
-            }
-        }
-
-        for (Major major : majors) {
-            Object id = ReflectUtils.getFieldValue(major, "id");
-            for (java.lang.reflect.Field field : majorFields) {
-                if (field.getAnnotation(LuceneSearchable.class) != null) {
-                    Document document = new Document();
-                    Object fieldValue = ReflectUtils.getFieldValue(major, field.getName());
-                    if (fieldValue != null) {
-                        document.add(new StringField("id", String.valueOf(id), Field.Store.YES));
-                        document.add(new TextField("result", String.valueOf(fieldValue), Field.Store.YES));
-                        document.add(new TextField("businessEnum", MainBusinessEnum.MAJOR_BUSINESS.getMsg(), Field.Store.YES));
-                        document.add(new TextField("menuName", "正在进行", Field.Store.YES));
-                        document.add(new TextField("url", "/major/list", Field.Store.YES));
-                        docs.add(document);
-                    }
-
-                }
-            }
-
-
-        }
-        Analyzer analyzer = new IKAnalyzer();
-        IndexWriterConfig config = new IndexWriterConfig(analyzer);
-        config.setOpenMode(IndexWriterConfig.OpenMode.CREATE);
-
-
-        try (Directory directory = FSDirectory.open(FileSystems.getDefault().getPath("G:\\luceneIndex"));
-             IndexWriter indexWriter = new IndexWriter(directory, config)) {
-            indexWriter.addDocuments(docs);
-            indexWriter.commit();
-        } catch (Exception e) {
-            log.error("create index error");
-        }
-    }
-
-    private final String BASE_PACKAGE = "com.dayou.entity";
-    private final String RESOURCE_PATTERN = "/**/*.class";
-
-    @Test
-    public void scaningEntity() {
-
-        Map<String, Class> handlerMap = new HashMap<String, Class>();
-
-        //spring工具类,可以获取指定路径下的全部类
-        ResourcePatternResolver resourcePatternResolver = new PathMatchingResourcePatternResolver();
-        try {
-            String pattern = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX +
-                    ClassUtils.convertClassNameToResourcePath(BASE_PACKAGE) + RESOURCE_PATTERN;
-            Resource[] resources = resourcePatternResolver.getResources(pattern);
-            //MetadataReader 的工厂类
-            MetadataReaderFactory readerfactory = new CachingMetadataReaderFactory(resourcePatternResolver);
-            for (Resource resource : resources) {
-                //用于读取类信息
-                MetadataReader reader = readerfactory.getMetadataReader(resource);
-                //扫描到的class
-                String classname = reader.getClassMetadata().getClassName();
-                Class<?> clazz = Class.forName(classname);
-                //判断是否有指定主解
-                LuceneResource anno = clazz.getAnnotation(LuceneResource.class);
-                if (anno != null) {
-                    //将注解中的类型值作为key,对应的类作为 value
-                    handlerMap.put(classname, clazz);
-                }
-            }
-        } catch (IOException | ClassNotFoundException e) {
-        }
-    }
-
-    @Test
-    public void testQuery(){
-        luceneSearchService.initializeIndex();
-    }
-}
+//package lucene;
+//
+//import com.dayou.BaseApplication;
+//import com.dayou.annotation.LuceneResource;
+//import com.dayou.annotation.LuceneSearchable;
+//import com.dayou.entity.Major;
+//import com.dayou.entity.Personal;
+//import com.dayou.enums.MainBusinessEnum;
+//import com.dayou.service.ILuceneSearchService;
+//import com.dayou.service.IMajorService;
+//import com.dayou.service.IPersonalService;
+//import com.dayou.utils.ReflectUtils;
+//import lombok.extern.slf4j.Slf4j;
+//import org.apache.lucene.analysis.Analyzer;
+//import org.apache.lucene.document.Document;
+//import org.apache.lucene.document.Field;
+//import org.apache.lucene.document.StringField;
+//import org.apache.lucene.document.TextField;
+//import org.apache.lucene.index.IndexWriter;
+//import org.apache.lucene.index.IndexWriterConfig;
+//import org.apache.lucene.store.Directory;
+//import org.apache.lucene.store.FSDirectory;
+//import org.junit.Test;
+//import org.junit.runner.RunWith;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.boot.test.context.SpringBootTest;
+//import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
+//import org.springframework.core.io.support.ResourcePatternResolver;
+//import org.springframework.core.type.classreading.CachingMetadataReaderFactory;
+//import org.springframework.core.type.classreading.MetadataReader;
+//import org.springframework.core.type.classreading.MetadataReaderFactory;
+//import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+//import org.springframework.util.ClassUtils;
+//import org.wltea.analyzer.lucene.IKAnalyzer;
+//import org.springframework.core.io.Resource;
+//
+//import java.io.IOException;
+//import java.nio.file.FileSystems;
+//import java.util.*;
+//
+///**
+// * 类说明:
+// *
+// * @author: wucl
+// * @since: 2024/4/25
+// * created with IntelliJ IDEA.
+// */
+//@Slf4j
+//@SpringBootTest(classes = BaseApplication.class)
+//@RunWith(value = SpringJUnit4ClassRunner.class)
+//public class LuceneTest {
+//
+//    @Autowired
+//    private IPersonalService personalService;
+//
+//    @Autowired
+//    private IMajorService majorService;
+//
+//    @Autowired
+//    private ILuceneSearchService luceneSearchService;
+//
+//
+//
+//    @Test
+//    public void createIndex() throws NoSuchFieldException {
+//        List<Personal> list = personalService.list();
+//        List<Major> majors = majorService.list();
+//        Collection<Document> docs = new ArrayList<>();
+//        java.lang.reflect.Field[] personalFields = Personal.class.getDeclaredFields();
+//        java.lang.reflect.Field[] majorFields = Major.class.getDeclaredFields();
+//        for (Personal personal : list) {
+//            Object id = ReflectUtils.getFieldValue(personal, "id");
+//            for (java.lang.reflect.Field field : personalFields) {
+//                if (field.getAnnotation(LuceneSearchable.class) != null) {
+//                    Document document = new Document();
+//                    Object fieldValue = ReflectUtils.getFieldValue(personal, field.getName());
+//                    if (fieldValue != null) {
+//                        document.add(new StringField("id", String.valueOf(id), Field.Store.YES));
+//                        document.add(new TextField("result", String.valueOf(fieldValue), Field.Store.YES));
+//                        document.add(new TextField("businessEnum", MainBusinessEnum.PERSONAL_BUSINESS.getMsg(), Field.Store.YES));
+//                        document.add(new TextField("menuName", "正在进行", Field.Store.YES));
+//                        document.add(new TextField("url", "/personal/pending/list", Field.Store.YES));
+//                        docs.add(document);
+//                    }
+//
+//                }
+//            }
+//        }
+//
+//        for (Major major : majors) {
+//            Object id = ReflectUtils.getFieldValue(major, "id");
+//            for (java.lang.reflect.Field field : majorFields) {
+//                if (field.getAnnotation(LuceneSearchable.class) != null) {
+//                    Document document = new Document();
+//                    Object fieldValue = ReflectUtils.getFieldValue(major, field.getName());
+//                    if (fieldValue != null) {
+//                        document.add(new StringField("id", String.valueOf(id), Field.Store.YES));
+//                        document.add(new TextField("result", String.valueOf(fieldValue), Field.Store.YES));
+//                        document.add(new TextField("businessEnum", MainBusinessEnum.MAJOR_BUSINESS.getMsg(), Field.Store.YES));
+//                        document.add(new TextField("menuName", "正在进行", Field.Store.YES));
+//                        document.add(new TextField("url", "/major/list", Field.Store.YES));
+//                        docs.add(document);
+//                    }
+//
+//                }
+//            }
+//
+//
+//        }
+//        Analyzer analyzer = new IKAnalyzer();
+//        IndexWriterConfig config = new IndexWriterConfig(analyzer);
+//        config.setOpenMode(IndexWriterConfig.OpenMode.CREATE);
+//
+//
+//        try (Directory directory = FSDirectory.open(FileSystems.getDefault().getPath("G:\\luceneIndex"));
+//             IndexWriter indexWriter = new IndexWriter(directory, config)) {
+//            indexWriter.addDocuments(docs);
+//            indexWriter.commit();
+//        } catch (Exception e) {
+//            log.error("create index error");
+//        }
+//    }
+//
+//    private final String BASE_PACKAGE = "com.dayou.entity";
+//    private final String RESOURCE_PATTERN = "/**/*.class";
+//
+//    @Test
+//    public void scaningEntity() {
+//
+//        Map<String, Class> handlerMap = new HashMap<String, Class>();
+//
+//        //spring工具类,可以获取指定路径下的全部类
+//        ResourcePatternResolver resourcePatternResolver = new PathMatchingResourcePatternResolver();
+//        try {
+//            String pattern = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX +
+//                    ClassUtils.convertClassNameToResourcePath(BASE_PACKAGE) + RESOURCE_PATTERN;
+//            Resource[] resources = resourcePatternResolver.getResources(pattern);
+//            //MetadataReader 的工厂类
+//            MetadataReaderFactory readerfactory = new CachingMetadataReaderFactory(resourcePatternResolver);
+//            for (Resource resource : resources) {
+//                //用于读取类信息
+//                MetadataReader reader = readerfactory.getMetadataReader(resource);
+//                //扫描到的class
+//                String classname = reader.getClassMetadata().getClassName();
+//                Class<?> clazz = Class.forName(classname);
+//                //判断是否有指定主解
+//                LuceneResource anno = clazz.getAnnotation(LuceneResource.class);
+//                if (anno != null) {
+//                    //将注解中的类型值作为key,对应的类作为 value
+//                    handlerMap.put(classname, clazz);
+//                }
+//            }
+//        } catch (IOException | ClassNotFoundException e) {
+//        }
+//    }
+//
+//    @Test
+//    public void testQuery(){
+//        luceneSearchService.initializeIndex();
+//    }
+//}

+ 62 - 0
common/src/main/java/com/dayou/utils/HttpKit.java

@@ -24,6 +24,7 @@ import org.springframework.web.util.WebUtils;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.*;
+import java.net.HttpURLConnection;
 import java.net.URL;
 import java.net.URLConnection;
 import java.net.URLEncoder;
@@ -232,6 +233,67 @@ public class HttpKit {
         return result;
     }
 
+
+    public static String sendPost(String url,Map<String, Object> param,String cookie){
+        PrintWriter out = null;
+        BufferedReader in = null;
+        String result = "";
+        try {
+            String para = "";
+            for (String key : param.keySet()) {
+                para += (key + "=" + param.get(key) + "&");
+            }
+            if (para.lastIndexOf("&") > 0) {
+                para = para.substring(0, para.length() - 1);
+            }
+            String urlNameString = url + "?" + para;
+            URL realUrl = new URL(urlNameString);
+            // 打开和URL之间的连接
+            HttpURLConnection conn = (HttpURLConnection) realUrl.openConnection();
+            // 设置通用的请求属性
+            conn.setRequestProperty("accept", "*/*");
+            conn.setRequestProperty("connection", "Keep-Alive");
+            conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
+            conn.setRequestProperty("charset","UTF-8");
+            conn.setRequestProperty("Accept-Charset", "UTF-8");
+            conn.setRequestProperty("contentType","UTF-8");
+            conn.setRequestProperty("Cookie",cookie);
+            // 发送POST请求必须设置如下两行
+            conn.setDoOutput(true);
+            conn.setDoInput(true);
+
+            // 获取URLConnection对象对应的输出流,设置utf-8编码
+            out = new PrintWriter(new OutputStreamWriter(conn.getOutputStream(),"UTF-8"));
+            // 发送请求参数
+            out.print(param);
+            // flush输出流的缓冲
+            out.flush();
+            // 定义BufferedReader输入流来读取URL的响应
+            in = new BufferedReader(new InputStreamReader(conn.getInputStream(),"UTF-8"));
+            String line;
+            while ((line = in.readLine()) != null) {
+                result += line;
+            }
+        } catch (Exception e) {
+            System.out.println("发送 POST 请求出现异常!" + e);
+            e.printStackTrace();
+        }
+        // 使用finally块来关闭输出流、输入流
+        finally {
+            try {
+                if (out != null) {
+                    out.close();
+                }
+                if (in != null) {
+                    in.close();
+                }
+            } catch (IOException ex) {
+                ex.printStackTrace();
+            }
+        }
+        return result;
+    }
+
     /**
      * 获取请求参数
      *

+ 376 - 0
domain/src/main/java/com/dayou/dto/history/HisMajorOrder.java

@@ -0,0 +1,376 @@
+package com.dayou.dto.history;
+
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 类说明:
+ *
+ * @author: wucl
+ * @since: 2024/5/7
+ * created with IntelliJ IDEA.
+ */
+@Data
+public class HisMajorOrder {
+
+    private java.lang.String id;
+    private java.lang.String creatorId;
+    private java.lang.String creatorName;
+    private java.lang.String modifierId;
+    private java.lang.String modifierName;
+    private java.util.Date createdDatetime;
+    private java.util.Date modifiedDatetime;
+    private java.lang.String createOrgId;
+    private java.lang.String createOrgName;
+
+    private String sourceTypeName;
+
+    /**
+     * 金融
+     */
+    public static final String SOURCE_TYPE_FINANCE = "FINANCE";
+    /**
+     * 非金融
+     */
+    public static final String SOURCE_TYPE_NON_FINANCE = "NON_FINANCE";
+    /**
+     * 土地
+     */
+    public static final String SOURCE_TYPE_LAND = "LAND";
+    public static final String PRODUCT_YJS = "价值意见书";
+    public static final String PRODUCT_BG = "报告";
+    /**
+     * 等待入库
+     */
+    public static final String REPO_WAIT_IN = "WAIT_IN";
+    /**
+     * 在库
+     */
+    public static final String REPO_IN = "IN";
+    /**
+     * 已出库
+     */
+    public static final String REPO_OUT = "OUT";
+    // 出库申请-部门经理
+    public static final String APPLY_WAIT = "WAIT_APPLY";
+    // 出库申请-财务经理
+    public static final String APPLY_WAIT2 = "WAIT_APPLY2";
+    /**
+     * 申请终止:同意终止
+     */
+    public static final String APPLY_PASS = "PASS";
+    /**
+     * 申请终止:不同意终止
+     */
+    public static final String APPLY_DENY = "DENY";
+    private String sourceType;
+
+    private Boolean assign;
+
+    private String masterId;
+
+    private String masterName;
+
+    private String name;
+
+    private String code;
+
+
+    private String customerType;
+    private String customerId;
+    private String customerName;
+    private String customerId2;
+    private String customerName2;
+    private String contactId;
+    private String contactOrg;
+    private String contactDuty;
+    private String terminalId;
+    private String terminalName;
+    private String terminalType;
+    private String terminalContactId;
+    private String terminalContactName;
+    private String terminalContactMobile;
+
+
+
+    private String companyId;
+    private String companyName;
+
+    private Boolean refinance;
+
+    private String loanProperty;
+    private String loanUsage;
+
+    private Boolean loanExpired;
+
+    private Double loanMoney;
+
+    private Double loanLimit;
+
+    private String principal;
+
+    private String principalAddress;
+
+    private String principalName;
+
+    private String principalMobile;
+
+    private String principalDescription;
+    private String propertyName;
+
+    private String propertyMobile;
+
+    private String bankContactName;
+
+    private String bankContactMobile;
+
+    private Boolean urgent;
+
+    private String status;
+
+    private String reportNO;
+
+    private String mainReportNO;
+
+    private Boolean locations;
+
+    private String address;
+
+    private String ruleType;
+
+    private Integer ruleIndex;
+
+    private String masterOrgId;
+
+    private String masterOrgName;
+
+    private String nowNodeId;
+
+    private String nowNodeName;
+
+    private String nowNodeEmpId;
+
+    private String nowNodeEmpName;
+
+    private String managerId;
+
+    private String managerName;
+
+    private String members;
+
+    private String orderEmpId;
+
+    private String orderEmpName;
+
+    private Date orderTime;
+
+    private String performance;
+
+    private Double bonusRate;
+
+    private Double money;
+    private Double area;
+    private Double landArea;
+    private String houseUsage;
+    private Double price;
+
+
+    private Boolean calculateOrders;
+    private Boolean calculatePriceEfficiency;
+
+    private String businessType;
+
+    private String businessType2;
+    private String spec;
+
+
+    private String evaluateTarget;
+    private String evaluateTargetId;
+
+
+    private Boolean oral;
+    private Boolean originOral;
+
+    private String otherEvaluateTarget;
+
+    private String description;
+
+
+    private Date surveyDate;
+
+    private Date priceDate;
+    private Date approvePriceTime;
+    private Double approvePriceDuration;
+    private String specDesc;
+    private String signEmpId1;
+    private String signEmpName1;
+    private String signEmpNameNO1;
+
+    private String signEmpId2;
+    private String signEmpName2;
+    private String signEmpNameNO2;
+
+    private Double discount;
+
+    private Double needPay;
+    private Date needPayRecordTime;
+    private Double realPay;
+
+    private String incomeId;
+    private String companyNO;
+    private String payBankName;
+    private String payBankNO;
+    private String companyAddress;
+    private String companyContactName;
+    private String companyContactPhone;
+    private String needPayDescription;
+    private Integer printTimes;
+    private Double balanceMoney;
+    private Boolean payed;
+
+    // 发票类型
+    private String ticketType;
+
+    private Double standardPrice;
+
+    private Boolean deleted;
+
+    private Boolean repeatOrder;
+    private Boolean fhbq;
+
+    private Boolean needApprove2;
+    // 三审人
+    private String approveEmpId3;
+    private String approveEmpName3;
+
+    private Boolean needApprove3;
+
+    private String repo;
+    private Boolean finished;
+
+    private String applyStop;
+    // 申请终止时的流程任务的ID,用于判断
+    private String applyStopTaskId;
+    private String stopReason;
+
+    // 流程实例ID
+    private String flowInstanceId;
+
+    // 评估对象ID,用于取号时传递过来取小号用
+    private List<String> targetIds;
+
+    private String progress;
+
+    private String outRepoApply;
+    private String outRepoApplyReason;
+    private Date outRepoTime;
+    private Date yjsInTime;
+    private Date yjsOutTime;
+    private Date bgInTime;
+    private Date bgOutTime;
+    private Date archiveTime;
+
+    private Double archiveDuration;
+
+    private String outRepoApplyTaskId;
+
+    private Boolean yjs;
+    private Integer yjsPrintQuantity;
+    // 意见书二审人
+    private String yjsApprove2EmpId;
+    private String yjsApprove2EmpName;
+    private Integer bgPrintQuantity;
+    // 报告二审人
+    private String bgApprove2EmpId;
+    private String bgApprove2EmpName;
+
+    // 当前产品
+    private String nowProduct;
+    private Boolean bg;
+    private Boolean fph;
+    private Integer fphPrintQuantity;
+
+
+    private String bgScore;
+    private Integer cjError1;
+    private Integer cjError2;
+    private Integer cjError3;
+    private String cjReason;
+    private Date cjTime;
+    private String cjEmpName;
+    private String wbtsEmpName;
+    private Integer wbtsError1;
+    private Integer wbtsError2;
+    private Integer wbtsError3;
+    private Integer wbtsError4;
+    private String wbtsReason;
+    private Date wbtsTime;
+    private String nbtsEmpName;
+    private Integer nbtsError1;
+    private Integer nbtsError2;
+    private Integer nbtsError3;
+    private Integer nbtsError4;
+    private String nbtsReason;
+    private Date nbtsTime;
+    private Double difficultScore;
+    private Date difficultTime;
+    private String difficultReason;
+
+
+
+
+
+    private Double lossMoney;
+    private Date lossRecordTime;
+    private String lossRecordEmpId;
+    private String lossRecordEmpName;
+
+    private String lossMoneyDescription;
+
+    // 电子二维码(这里存放的实际上是HTML链接)
+    private String infoQR;
+
+    private Boolean history;
+
+    private Double ticketMoney;
+
+    private Date confirmTime;
+
+
+    private String evaluateMethod;
+
+    private Double score1;
+
+    private Boolean cz;
+
+    // 业务分类(评估人员)提成流程实例ID
+    private String pgFlowInstanceId;
+    // 业务提成类型审批状态(审批中、通过、不通过)
+    private String pgApproveStatus;
+    /**
+     * 提成业务类型
+     *
+     * @author 许靖
+     * @date 2020年04月13日23:43:52
+     * @description 用于确定当前这笔实收款是使用哪一种业务类型来进行提成(评估人员),数据来自IndexWeightDetail的"评估人员_业务分类"
+     * 当审批通过后,有值。
+     */
+    private String pgBusinessType;
+    /**
+     * @author 许靖
+     * @date 2020年04月03日04:05:53
+     * @description 用于确定当前这笔实收款是使用哪一种业务类型来进行提成(客户经理),数据来自IndexWeightDetail的"客户经理_分类提成比例"
+     */
+    private String masterBusinessType;
+    private String masterApproveStatus;
+    // 订单提成(给客户经理用的)
+    private String masterFlowInstanceId;
+
+
+    private Integer version;
+
+    private String approveDesc;
+    private Date approveTime;
+}

+ 34 - 0
domain/src/main/java/com/dayou/dto/history/HisOrderParam.java

@@ -0,0 +1,34 @@
+package com.dayou.dto.history;
+
+import lombok.Data;
+
+/**
+ * 类说明:
+ *
+ * @author: wucl
+ * @since: 2024/5/8
+ * created with IntelliJ IDEA.
+ */
+@Data
+public class HisOrderParam {
+
+    private String keywords;
+
+    private String businessType;
+
+    private String nowNodeName;
+
+    private String sourceType;
+
+    private Boolean deleted;
+
+    private Integer limit;
+
+    private String orderBy;
+
+    private Integer start;
+
+    private Integer current;
+
+    private Integer size;
+}

+ 19 - 0
service/src/main/java/com/dayou/service/IHistoryOrderService.java

@@ -0,0 +1,19 @@
+package com.dayou.service;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.dayou.dto.history.HisMajorOrder;
+import com.dayou.dto.history.HisOrderParam;
+
+/**
+ * 类说明:
+ *
+ * @author: wucl
+ * @since: 2024/5/8
+ * created with IntelliJ IDEA.
+ */
+public interface IHistoryOrderService {
+
+    Page<HisMajorOrder> hisMajorPage(HisOrderParam param);
+
+    String getEverCookie();
+}

+ 145 - 0
service/src/main/java/com/dayou/service/impl/HistoryOrderServiceImpl.java

@@ -0,0 +1,145 @@
+package com.dayou.service.impl;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONException;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.dayou.dto.history.HisMajorOrder;
+import com.dayou.dto.history.HisOrderParam;
+import com.dayou.exception.ErrorCode;
+import com.dayou.service.IHistoryOrderService;
+import com.dayou.utils.HttpKit;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.impl.client.DefaultHttpClient;
+import org.springframework.stereotype.Service;
+
+import java.io.UnsupportedEncodingException;
+import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * 类说明:
+ *
+ * @author: wucl
+ * @since: 2024/5/8
+ * created with IntelliJ IDEA.
+ */
+@Slf4j
+@Service
+public class HistoryOrderServiceImpl implements IHistoryOrderService {
+
+    private static String COOKIE ;
+
+
+    private static final String HISTORY_LOGIN_URL = "http://noa.scdayou.com/login?loginName=admin&password=ABC666000";
+
+    private static final String HISTORY_MAJOR_ORDER_URL = "http://noa.scdayou.com/dyoa/order/pageQuery";
+
+    @Override
+    public Page<HisMajorOrder> hisMajorPage(HisOrderParam param) {
+        checkCookie();
+        pageSet(param);
+        Page<HisMajorOrder> page = new Page<>();
+        try {
+            Map<String, Object> map = removeMapKey(BeanUtil.beanToMap(param));
+            String respond = HttpKit.sendPost(HISTORY_MAJOR_ORDER_URL, map,COOKIE);
+            JSONObject jsonObject = JSON.parseObject(respond);
+            JSONObject data = jsonObject.getJSONObject("data");
+            JSONArray dataArray = data.getJSONArray("data");
+            if (CollectionUtil.isNotEmpty(dataArray)){
+                List<HisMajorOrder> hisMajorOrders = dataArray.toJavaList(HisMajorOrder.class);
+                page.setRecords(hisMajorOrders);
+                page.setTotal(Long.valueOf(String.valueOf(data.get("total"))));
+            }
+        } catch (JSONException e) {
+            historySystemLogin();
+            ErrorCode.throwBusinessException(ErrorCode.CUSTOM_ERROR,"远程连接超时,请刷新页面。");
+        } catch (Exception e) {
+            log.error("远程调用失败.");
+            e.printStackTrace();
+        }
+
+        return page;
+    }
+
+    @Override
+    public String getEverCookie() {
+        checkCookie();
+        return COOKIE;
+    }
+
+    private void checkCookie(){
+        if (StrUtil.isBlank(COOKIE)){
+            historySystemLogin();
+        }
+    }
+    /**
+     * 登录原系统获取COOKIE
+     * @return
+     */
+    private void historySystemLogin(){
+
+        try {
+            // 创建HttpClient对象
+            HttpClient httpClient = new DefaultHttpClient();
+
+            // 创建HttpGet请求对象
+            HttpPost httpPost = new HttpPost(HISTORY_LOGIN_URL);
+
+            // 发送请求并获取响应
+            HttpResponse response = httpClient.execute(httpPost);
+
+            // 获取cookie
+            String cookies = Arrays.toString(response.getHeaders("Set-Cookie"));
+            if (cookies != null) {
+                String pattern = "(JSESSIONID)(.*?)( )";
+                Pattern r = Pattern.compile(pattern);
+                Matcher m = r.matcher(cookies);
+                if (m.find()) {
+                    COOKIE =  m.group(0).trim().split(";")[0];
+                }
+            }
+
+            // 关闭连接
+            httpClient.getConnectionManager().shutdown();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    private Map<String, Object> removeMapKey(Map param) {
+        Set set = param.keySet();
+
+        for (Iterator iterator = set.iterator(); iterator.hasNext(); ) {
+            Object obj = (Object) iterator.next();
+            Object value = (Object) param.get(obj);
+            if (value == null || value.equals("") || value.equals("null") || obj.toString().length() == 0) {
+                iterator.remove();
+            }else {
+                if (value instanceof String){
+                    try {
+                        String xValue = new String (((String) value).getBytes("ISO8859-1"),"UTF-8");
+                        param.put(obj,xValue);
+                    } catch (UnsupportedEncodingException e) {
+                        throw new RuntimeException(e);
+                    }
+                }
+            }
+        }
+
+        return param;
+    }
+
+    private void pageSet(HisOrderParam param){
+        param.setLimit(param.getSize());
+        param.setStart((param.getCurrent()-1)*param.getLimit());
+    }
+}

+ 1 - 1
service/src/main/java/com/dayou/service/impl/ItemServiceImpl.java

@@ -104,7 +104,7 @@ public class ItemServiceImpl extends ServiceImpl<ItemMapper, Item> implements II
 
     @Transactional
     @Override
-   // @DoBrokerage(operation = EDIT,rule = BrokerageRule.LAND_MARKETER_RULE)
+    @DoBrokerage(operation = EDIT,rule = BrokerageRule.LAND_MARKETER_RULE)
     public Boolean update(ItemDTO itemDTO){
         if (itemDTO.getId()==null){
             ErrorCode.throwBusinessException(ErrorCode.PARAM_ERROR);