|
@@ -0,0 +1,49 @@
|
|
|
+package com.malk.zhiwei.schedule;
|
|
|
+
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.malk.server.aliwork.YDConf;
|
|
|
+import com.malk.server.aliwork.YDParam;
|
|
|
+import com.malk.service.aliwork.YDClient;
|
|
|
+import com.malk.utils.UtilMap;
|
|
|
+import com.malk.zhiwei.service.ZwService;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
|
|
+import org.springframework.context.annotation.Configuration;
|
|
|
+import org.springframework.scheduling.annotation.EnableScheduling;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 功能:
|
|
|
+ * 作者:hanxue
|
|
|
+ * 日期:2025/8/4 14:47
|
|
|
+ */
|
|
|
+@Slf4j
|
|
|
+@Configuration
|
|
|
+public class FunctionTask {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private YDClient ydClient;
|
|
|
+
|
|
|
+
|
|
|
+ @PostMapping("/deliver/save")
|
|
|
+ public void savedeliver(@RequestBody Map param){
|
|
|
+ Map formData = new HashMap();
|
|
|
+ formData.put("textField_mdwr7jnh",param.get("saleCode"));
|
|
|
+ formData.put("textField_mdwpe4m7",param.get("noticeCode"));
|
|
|
+ formData.put("textField_mdwr7jni",param.get("code"));
|
|
|
+ formData.put("textField_mdqsatd4",param.get("prod"));
|
|
|
+ formData.put("numberField_mdwr7jnf",param.get("qty"));
|
|
|
+ formData.put("textField_mdwr7jng",param.get("isdelete"));
|
|
|
+ Map serarchParam= new HashMap();
|
|
|
+ serarchParam.put("textField_mdqsatd4",param.get("prod"));
|
|
|
+ serarchParam.put("textField_mdwpe4m7",param.get("noticeCode"));
|
|
|
+ ydClient.operateData(YDParam.builder().formUuid("FORM-54A845D217A64108BC2B288F6F0BE622BR5C")
|
|
|
+ .searchCondition(JSONObject.toJSONString(serarchParam))
|
|
|
+ .formDataJson(JSONObject.toJSONString(formData)).build(), YDConf.FORM_OPERATION.upsert);
|
|
|
+ }
|
|
|
+}
|