|
@@ -1,10 +1,13 @@
|
|
|
package com.malk.kuaikeli;
|
|
|
|
|
|
+import cn.hutool.core.util.RandomUtil;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.malk.kuaikeli.service.KKLService;
|
|
|
import com.malk.kuaikeli.service.SupplierMaterialService;
|
|
|
import com.malk.server.aliwork.YDConf;
|
|
|
import com.malk.server.aliwork.YDParam;
|
|
|
import com.malk.service.aliwork.YDClient;
|
|
|
+import com.malk.utils.UtilMap;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.junit.Test;
|
|
|
import org.junit.runner.RunWith;
|
|
@@ -23,6 +26,8 @@ public class DdTest {
|
|
|
private SupplierMaterialService supplierMaterialService;
|
|
|
@Autowired
|
|
|
private YDClient ydClient;
|
|
|
+ @Autowired
|
|
|
+ private KKLService kklService;
|
|
|
|
|
|
@Test
|
|
|
public void create(){
|
|
@@ -32,12 +37,32 @@ public class DdTest {
|
|
|
|
|
|
@Test
|
|
|
public void test(){
|
|
|
- Map form = ydClient.queryData(YDParam.builder()
|
|
|
- .appType("APP_K8EYBJO1GLUWYIXT12DI")
|
|
|
- .systemToken("7C766871QS1GIKQ68SWX0BS71RSZ1LONSB2PLA")
|
|
|
- .formInstanceId(String.valueOf("0b8d83d3-65e8-47ce-94f0-5ac326ec7992"))
|
|
|
- .build(), YDConf.FORM_QUERY.retrieve_id).getFormData();
|
|
|
- System.out.println(JSONObject.toJSONString(form));
|
|
|
+// Map form = ydClient.queryData(YDParam.builder()
|
|
|
+// .appType("APP_K8EYBJO1GLUWYIXT12DI")
|
|
|
+// .systemToken("7C766871QS1GIKQ68SWX0BS71RSZ1LONSB2PLA")
|
|
|
+// .formInstanceId(String.valueOf("0b8d83d3-65e8-47ce-94f0-5ac326ec7992"))
|
|
|
+// .build(), YDConf.FORM_QUERY.retrieve_id).getFormData();
|
|
|
+// System.out.println(JSONObject.toJSONString(form));
|
|
|
+ ydClient.operateData(YDParam.builder()
|
|
|
+ .appType("APP_YSEVMCWNRJAKT4X1HRWZ")
|
|
|
+ .systemToken("TL7661A1OXSJJ5EI6EPT36859MJT383P9MGUL25")
|
|
|
+ .formUuid("FORM-430FF05A3B89497D9AFE0D89660E1E34HKQ5")
|
|
|
+ .searchCondition(JSONObject.toJSONString(UtilMap.map("textField_lvm4l2i7","1001")))
|
|
|
+ .formDataJson(JSONObject.toJSONString(UtilMap.map("textField_lvm4l2i7, textField_lvm4l2i8, textField_lvm4o3p9","1001","张三", RandomUtil.randomString(10))))
|
|
|
+ .build(), YDConf.FORM_OPERATION.upsert);
|
|
|
}
|
|
|
|
|
|
+ String aa="{\"code\":\"GYS-20240429-014\",\"proCode\":\"XM-20240429-015\",\"rate\":\"[\\\"10\\\",\\\"10\\\",\\\"10\\\",\\\"10\\\"]\",\"rate2\":\"[\\\"10\\\",\\\"10\\\",\\\"10\\\",\\\"10\\\"]\",\"proName\":\"测试项目案例\",\"type\":\"[\\\"猪肉类\\\",\\\"冷冻肉类制品\\\",\\\"叶菜类\\\",\\\"水果\\\"]\",\"status\":\"[\\\"已启用\\\",\\\"已启用\\\",\\\"已启用\\\",\\\"已启用\\\"]\"}";
|
|
|
+
|
|
|
+ @Test
|
|
|
+ public void tt(){
|
|
|
+ Map data=JSONObject.parseObject(aa);
|
|
|
+ kklService.serviceRate(data);
|
|
|
+
|
|
|
+ try {
|
|
|
+ Thread.sleep(1000*100);
|
|
|
+ } catch (InterruptedException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|