|
|
@@ -130,6 +130,34 @@ public class AitableController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 客户变更
|
|
|
+ * @param data
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @PostMapping("/changeCustomer")
|
|
|
+ McR changeCustomerBasicInfo(@RequestBody JSONObject data) {
|
|
|
+ log.info("客户变更, {}", data);
|
|
|
+ McException.assertParamException_Null(data, "aitableId");
|
|
|
+ String aitableId = UtilMap.getString(data, "aitableId");
|
|
|
+ String yidaCustomerLevel = UtilMap.getString(data, "yidaCustomerLevel"); //客户潜在等级
|
|
|
+ String yidaNewOrOld = UtilMap.getString(data, "yidaNewOrOld"); //新老客户
|
|
|
+ Map<String,Object> fields = new HashMap<>();
|
|
|
+ try {
|
|
|
+ if(StringUtils.isNotEmpty(yidaCustomerLevel)){
|
|
|
+ fields.put("qgOhsh1",yidaCustomerLevel); //客户分级【客户】
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotEmpty(yidaNewOrOld)){
|
|
|
+ fields.put("3Y796Wb",yidaNewOrOld); //新老客户?【客户】
|
|
|
+ }
|
|
|
+ aitableService.updateSys1CustomerData(aitableId,fields);
|
|
|
+ return McR.success();
|
|
|
+ } catch (Exception e) {
|
|
|
+ return McR.error("400",e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 新建商机
|
|
|
* @param data
|