|
|
@@ -99,6 +99,7 @@ public class KdYdCustomerServiceImpl extends ServiceImpl<KdYdCustomerMapper, KdY
|
|
|
|
|
|
// === 提取主表字段 ===
|
|
|
String khmc = UtilMap.getString(formData, "textField_lqanqe6j");
|
|
|
+// String khmc = "26228测试客户11";
|
|
|
String khbm = UtilMap.getString(formData, "textField_meqhqqvg");
|
|
|
String xssx = UtilMap.getString(formData, "selectField_megi74y7");
|
|
|
String khxypj = UtilMap.getString(formData, "selectField_mewirdx4");
|
|
|
@@ -108,6 +109,7 @@ public class KdYdCustomerServiceImpl extends ServiceImpl<KdYdCustomerMapper, KdY
|
|
|
String khfz = UtilMap.getString(formData, "selectField_lqanqe6q");
|
|
|
String fptt = UtilMap.getString(formData, "textField_llujklkr");
|
|
|
String nsdjh = UtilMap.getString(formData, "textField_meqhqqvm");
|
|
|
+// String nsdjh = "121212";
|
|
|
String khyh = UtilMap.getString(formData, "textField_meqhqqvn");
|
|
|
String yhzh = UtilMap.getString(formData, "textField_meqhqqvs");
|
|
|
String jxslx = UtilMap.getString(formData, "selectField_mis6kl56");
|
|
|
@@ -133,7 +135,9 @@ public class KdYdCustomerServiceImpl extends ServiceImpl<KdYdCustomerMapper, KdY
|
|
|
// 构建主表数据
|
|
|
Map<String, Object> customData = new HashMap<>();
|
|
|
customData.put("khmc", khmc);
|
|
|
- customData.put("khbm", khbm);
|
|
|
+ if("edit".equals(action)){
|
|
|
+ customData.put("khbm", khbm);
|
|
|
+ }
|
|
|
customData.put("xssx", xssx);
|
|
|
customData.put("khxypj", khxypj);
|
|
|
customData.put("khsx", khsx);
|
|
|
@@ -200,7 +204,7 @@ public class KdYdCustomerServiceImpl extends ServiceImpl<KdYdCustomerMapper, KdY
|
|
|
// 构建form参数
|
|
|
Map<String, Object> formParams = new HashMap<>();
|
|
|
formParams.put("jsons", jsonStr);
|
|
|
- log.info("请求参数:" + formParams);
|
|
|
+ log.info("客户请求参数:" + formParams);
|
|
|
// 发送请求
|
|
|
HttpResponse response = null;
|
|
|
if ("add".equals(action)) {
|
|
|
@@ -220,10 +224,10 @@ public class KdYdCustomerServiceImpl extends ServiceImpl<KdYdCustomerMapper, KdY
|
|
|
String responseBody = response.body();
|
|
|
try {
|
|
|
// 一行代码提取
|
|
|
-// String jdbh = JSON.parseArray(responseBody)
|
|
|
-// .getJSONObject(0)
|
|
|
-// .getJSONObject("data")
|
|
|
-// .getString("djbh");
|
|
|
+ String khbh = JSON.parseArray(responseBody)
|
|
|
+ .getJSONObject(0)
|
|
|
+ .getJSONObject("data")
|
|
|
+ .getString("djbh");
|
|
|
String msg = JSON.parseArray(responseBody)
|
|
|
.getJSONObject(0)
|
|
|
.getString("msg");
|
|
|
@@ -233,11 +237,11 @@ public class KdYdCustomerServiceImpl extends ServiceImpl<KdYdCustomerMapper, KdY
|
|
|
ydClient.operateData(
|
|
|
YDParam.builder()
|
|
|
.formInstanceId(formInstId)
|
|
|
- .updateFormDataJson(JSONObject.toJSONString(UtilMap.map("textField_ml08nk3y, textareaField_mkxqgrvq", code, msg)))
|
|
|
+ .updateFormDataJson(JSONObject.toJSONString(UtilMap.map("textField_ml08nk3y, textareaField_mkxqgrvq, textField_meqhqqvg", code, msg, khbh)))
|
|
|
.useLatestVersion(true).build(),
|
|
|
YDConf.FORM_OPERATION.update);
|
|
|
//
|
|
|
- log.info("回写数据到宜搭成功,formInstId: {}", formInstId);
|
|
|
+ log.info("回写数据到宜搭成功,formInstId: {},responseBody:{}", formInstId, responseBody);
|
|
|
} catch (Exception e) {
|
|
|
log.warn("回写数据到宜搭失败,formInstId: {}, 错误: {}", formInstId, e.getMessage());
|
|
|
}
|
|
|
@@ -246,7 +250,7 @@ public class KdYdCustomerServiceImpl extends ServiceImpl<KdYdCustomerMapper, KdY
|
|
|
// 构建返回结果
|
|
|
result.put("data", customData);
|
|
|
|
|
|
- log.info("客户信息同步成功: formInstId={}, khmc={}, khbm={}", formInstId, khmc, khbm);
|
|
|
+ log.info("客户信息同步成功: formInstId={}, khmc={}", formInstId, khmc);
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
log.error("客户信息同步异常", e);
|