Przeglądaj źródła

feat:20260123 解决商机阶段现金金额大于等于0赢单,小于0丢单的需求

zw 1 tydzień temu
rodzic
commit
1bb50120a7

+ 20 - 0
.idea/jarRepositories.xml

@@ -1,11 +1,26 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="RemoteRepositoriesConfiguration">
+    <remote-repository>
+      <option name="id" value="hl" />
+      <option name="name" value="hl" />
+      <option name="url" value="http://10.100.0.10:10026/repository/maven-public/" />
+    </remote-repository>
     <remote-repository>
       <option name="id" value="central" />
       <option name="name" value="Central Repository" />
       <option name="url" value="https://repo.maven.apache.org/maven2" />
     </remote-repository>
+    <remote-repository>
+      <option name="id" value="aliyun" />
+      <option name="name" value="阿里云公共仓库" />
+      <option name="url" value="https://maven.aliyun.com/repository/public" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="central" />
+      <option name="name" value="Central Repository" />
+      <option name="url" value="http://10.100.0.10:10026/repository/maven-public/" />
+    </remote-repository>
     <remote-repository>
       <option name="id" value="central" />
       <option name="name" value="Maven Central repository" />
@@ -16,5 +31,10 @@
       <option name="name" value="JBoss Community repository" />
       <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
     </remote-repository>
+    <remote-repository>
+      <option name="id" value="central" />
+      <option name="name" value="Central Repository" />
+      <option name="url" value="https://maven.aliyun.com/repository/public" />
+    </remote-repository>
   </component>
 </project>

+ 1 - 1
.idea/misc.xml

@@ -8,7 +8,7 @@
       </list>
     </option>
   </component>
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="ms-21" project-jdk-type="JavaSDK">
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8 (2)" project-jdk-type="JavaSDK">
     <output url="file://$PROJECT_DIR$/out" />
   </component>
 </project>

+ 18 - 11
mjava-RJK/mjava-rjk/src/main/java/com/malk/rjk/server/impl/RjkServerImpl.java

@@ -594,8 +594,7 @@ public class RjkServerImpl implements RjkServer {
 
         body.put("related_customers", relatedCustomers);//必需-商机关联的外部相关人
 
-        String stageStr = bizObjectNode.path("F0000093").asText();
-        int stageValue = Integer.parseInt(getStageValueByLabel(stageStr));
+//        String stageStr = bizObjectNode.path("F0000093").asText();//商机阶段
 //        String fromChannelStr = bizObjectNode.path("F0000097").asText("");
 //        int fromChannelId = Integer.parseInt(getSourceValueByLabel(fromChannelStr));
         String customerName = bizObjectNode.path("F0000002").asText();//客户名称
@@ -604,6 +603,15 @@ public class RjkServerImpl implements RjkServer {
         String orderRemark = bizObjectNode.path("F0000033").asText();//订单备注
         updateH3WeilingFillfield(objectId,customerName,paymentDate,cashCollection,orderRemark);
 
+        if (cashCollection >= 0){
+            int stageValue = Integer.parseInt(getStageValueByLabel("赢单"));
+            body.put("winning_date", paymentDate);
+            body.put("winning_amount", cashCollection);
+            body.put("stage", stageValue);
+        }else if (cashCollection < 0){
+            int stageValue = Integer.parseInt(getStageValueByLabel("丢单"));
+            body.put("stage", stageValue);
+        }
         // 商机阶段(必填),可从氚云字段映射。
 //        String businessName = bizObjectNode.path("F0000092").asText();
         body.put("business_name", customerName);
@@ -611,15 +619,6 @@ public class RjkServerImpl implements RjkServer {
 //        String winningDateStr = bizObjectNode.path("F0000095").asText();
 //        String winningDate = formatDate(winningDateStr);//赢单日期
 //        double winningAmount = bizObjectNode.path("F0000096").asInt();//赢单金额
-        if (stageValue == 100 && paymentDate != null && paymentDate.isEmpty()){
-            body.put("winning_date", paymentDate);
-            body.put("winning_amount", cashCollection);
-            body.put("stage", stageValue);
-        }else if (stageValue == 99){
-            body.put("stage", stageValue);
-        }else {
-            body.put("stage", 1);
-        }
 
         JSONObject businessCustom = duildBusinessCustom.BusinessCustom(bizObjectNode);
         if (businessCustom != null){
@@ -755,7 +754,15 @@ public class RjkServerImpl implements RjkServer {
         if (paymentDate != null){
             bizObject.put("F0000095", paymentDate);
         }
+
+        if(cashCollection >= 0){
+            bizObject.put("F0000093", "赢单");
             bizObject.put("F0000096", cashCollection);
+        } else if (cashCollection < 0) {
+            bizObject.put("F0000093", "丢单");
+            bizObject.put("F0000096", cashCollection);
+        }
+
         if (orderRemark != null){
             bizObject.put("F0000100", orderRemark);
         }