|
|
@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
@@ -227,6 +228,16 @@ public class AitableController {
|
|
|
String yidaActualOrderDate = UtilMap.getString(data, "yidaActualOrderDate"); //实际成单日期
|
|
|
String yidaSaleProjectName = UtilMap.getString(data, "yidaSaleProjectName"); //项目名称
|
|
|
String yidaGetRfqDate = UtilMap.getString(data, "yidaGetRfqDate"); //询报价日期或者客户跟进RFQ日期
|
|
|
+
|
|
|
+ //先查询当前修改记录
|
|
|
+ Map<String,String> saleRecord = new HashMap<String,String>(); //售前台账记录
|
|
|
+ try {
|
|
|
+ log.info("查询【表1】售前台账记录");
|
|
|
+ saleRecord = aitableService.querySys1SaleRecordByID(aitableId);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("查询售前台账数据异常",e);
|
|
|
+ }
|
|
|
+
|
|
|
Map<String,Object> fields = new HashMap<>();
|
|
|
try {
|
|
|
String aiTableOrderStatus = ""; //订单状态 - S1~3【商机进度】
|
|
|
@@ -268,8 +279,14 @@ public class AitableController {
|
|
|
fields.put("P3XtfD8",yidaSaleProjectName); //项目名称 - S1【基础】
|
|
|
aitableService.updateSys1SaleData(aitableId,fields);
|
|
|
}else if(yidaGetRfqDate != null && !yidaGetRfqDate.isEmpty()){ //询报价日期或者客户跟进RFQ日期
|
|
|
- fields.put("ZFArSI6",Long.parseLong(yidaActualOrderDate)); //实际收到RFQ日期
|
|
|
- aitableService.updateSys1SaleData(aitableId,fields);
|
|
|
+ if(saleRecord.get("yidaGetRfqDate") != null){ //已有实际收到RFQ日期
|
|
|
+ //忽略
|
|
|
+ log.info("已有实际收到RFQ日期");
|
|
|
+ }else{
|
|
|
+ fields.put("ZFArSI6",Long.parseLong(yidaGetRfqDate)); //实际收到RFQ日期
|
|
|
+ log.info("更新实际收到RFQ日期");
|
|
|
+ aitableService.updateSys1SaleData(aitableId,fields);
|
|
|
+ }
|
|
|
}
|
|
|
return McR.success();
|
|
|
} catch (Exception e) {
|