|
@@ -616,6 +616,9 @@ public class KabeiyiServiceImpl implements KabeiyiService {
|
|
|
|
|
|
String yesterday = "2024-10-09";*/
|
|
|
for (Integer dsSequence : factory.keySet()) {
|
|
|
+ if (dsSequence != 5){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
List<String> errorCodes = new ArrayList<>();
|
|
|
|
|
|
Map<String,Object> param = new HashMap<>();
|
|
@@ -645,6 +648,10 @@ public class KabeiyiServiceImpl implements KabeiyiService {
|
|
|
//查询单个发货单详情
|
|
|
String id = getString(consignment.get("code"));
|
|
|
|
|
|
+ if (!id.equals("南通9月份")){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
Map<String, Object> param2 = new HashMap<>();
|
|
|
param2.put("from_account", fromAccount);
|
|
|
param2.put("to_account", fromAccount);
|
|
@@ -700,6 +707,35 @@ public class KabeiyiServiceImpl implements KabeiyiService {
|
|
|
formData.put("textField_m1er3scl",factory.get(dsSequence));//工厂名称
|
|
|
|
|
|
List<Map> entry = (List<Map>) consignment2.get("entry");
|
|
|
+
|
|
|
+ //精准匹配
|
|
|
+ List<Map> jsonString = new ArrayList<>();
|
|
|
+ jsonString.add(UtilMap.map("key, value, type, operator, componentName", "textField_m18nvp87",getString(consignment2.get("code")),"TEXT","eq","TextField"));
|
|
|
+ jsonString.add(UtilMap.map("key, value, type, operator, componentName", "numberField_m18wkih7",new int[]{dsSequence,dsSequence},"DOUBLE","between","NumberField"));
|
|
|
+
|
|
|
+ String searchCondition = JSONObject.toJSONString(jsonString);
|
|
|
+
|
|
|
+ //当子表明细超过500条时,需删除原实例再新增
|
|
|
+ try {
|
|
|
+ if (entry.size() > 500){
|
|
|
+ DDR_New ddrNew1 = ydClient.queryData(YDParam.builder()
|
|
|
+ .formUuid(PRODUCT_REAL)
|
|
|
+ .searchCondition(searchCondition)//精准查询
|
|
|
+ .build(), YDConf.FORM_QUERY.retrieve_list_all);
|
|
|
+ List<Map> data1 = (List<Map>) ddrNew1.getData();
|
|
|
+
|
|
|
+ if (data1.size() > 0){
|
|
|
+ String formInstanceId = data1.get(0).get("formInstanceId").toString();
|
|
|
+
|
|
|
+ ydClient.operateData(YDParam.builder()
|
|
|
+ .formInstId(formInstanceId)
|
|
|
+ .build(), YDConf.FORM_OPERATION.delete);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }catch (Exception e){
|
|
|
+ log.info("",e);
|
|
|
+ }
|
|
|
+
|
|
|
List<Map> collect = entry.stream().map(item -> {
|
|
|
Map detail = new HashMap();
|
|
|
detail.put("textField_m18nvp8c", getString(item.get("socode")));//销售订单号
|
|
@@ -729,12 +765,6 @@ public class KabeiyiServiceImpl implements KabeiyiService {
|
|
|
boolean flag = false;
|
|
|
while (i<=5 && !flag){
|
|
|
try{
|
|
|
- List<Map> jsonString = new ArrayList<>();
|
|
|
- jsonString.add(UtilMap.map("key, value, type, operator, componentName", "textField_m18nvp87",getString(consignment2.get("code")),"TEXT","eq","TextField"));
|
|
|
- jsonString.add(UtilMap.map("key, value, type, operator, componentName", "numberField_m18wkih7",new int[]{dsSequence,dsSequence},"DOUBLE","between","NumberField"));
|
|
|
-
|
|
|
- String searchCondition = JSONObject.toJSONString(jsonString);
|
|
|
-
|
|
|
ydClient.operateData(YDParam.builder()
|
|
|
.formUuid(PRODUCT_REAL)
|
|
|
// .searchCondition(JSON.toJSONString(UtilMap.map("textField_m18nvp87, numberField_m18wkih7",getString(consignment2.get("code")),dsSequence)))//模糊查询
|
|
@@ -799,6 +829,37 @@ public class KabeiyiServiceImpl implements KabeiyiService {
|
|
|
return McR.success();
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public McR testInnerTable() {
|
|
|
+ MDC.put("MDC_KEY_PID","1019");
|
|
|
+
|
|
|
+ Map updateFormData = new HashMap();
|
|
|
+ List<Map> details = new ArrayList<>();
|
|
|
+
|
|
|
+ for (int i = 0; i < 1000; i++) {
|
|
|
+ Map detail = new HashMap();
|
|
|
+ detail.put("textField_m2b95sh3", i+"");
|
|
|
+ details.add(detail);
|
|
|
+ }
|
|
|
+
|
|
|
+ updateFormData.put("tableField_m2b95sh2",details);
|
|
|
+ updateFormData.put("textField_m2b95sh5","4");
|
|
|
+
|
|
|
+ List<Map> jsonString = new ArrayList<>();
|
|
|
+ jsonString.add(UtilMap.map("key, value, type, operator, componentName", "textField_m2b95sh5","1","TEXT","eq","TextField"));
|
|
|
+ String searchCondition = JSONObject.toJSONString(jsonString);
|
|
|
+
|
|
|
+ ydClient.operateData(YDParam.builder()
|
|
|
+ .searchCondition(searchCondition)
|
|
|
+ .formUuid("FORM-05AFA58A7DC4495C82AD23717C90A608JQ1F")
|
|
|
+ .formDataJson(JSON.toJSONString(updateFormData))
|
|
|
+// .updateFormDataJson(JSON.toJSONString(updateFormData))
|
|
|
+ .build(), YDConf.FORM_OPERATION.upsert);
|
|
|
+
|
|
|
+
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 封装GET请求
|
|
|
*
|