|
@@ -10,12 +10,14 @@ import com.malk.server.aliwork.YDConf;
|
|
|
import com.malk.server.aliwork.YDParam;
|
|
|
import com.malk.server.common.McR;
|
|
|
import com.malk.service.aliwork.YDClient;
|
|
|
+import com.malk.service.dingtalk.DDClient;
|
|
|
import com.malk.utils.UtilMap;
|
|
|
import com.malk.utils.UtilServlet;
|
|
|
import lombok.SneakyThrows;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
@@ -30,6 +32,10 @@ public class PJJSController {
|
|
|
|
|
|
@Autowired
|
|
|
private YDClient ydClient;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private DDClient dd;
|
|
|
+
|
|
|
@Autowired
|
|
|
private McDelegate mcDelegate;
|
|
|
|
|
@@ -150,6 +156,28 @@ public class PJJSController {
|
|
|
|
|
|
|
|
|
|
|
|
+ ///
|
|
|
+ @SneakyThrows
|
|
|
+ @PostMapping("report/PJJStemporary")
|
|
|
+ McR temporary(@RequestBody Map<String,String> data ) {
|
|
|
+ String formid=data.get("fomid") ;
|
|
|
+ log.info("formid,{}",formid);
|
|
|
+ Map formdata= ydClient.queryData(YDParam.builder()
|
|
|
+ .appType("APP_G951QZ32AUJNJUE4G127")
|
|
|
+ .systemToken("HOA66I8176RID79L6QF3554SPPYH22VTBH1TLX6")
|
|
|
+ .formUuid("FORM-04F671D6ABB048B2953763C3DAE14AE6ICGU")
|
|
|
+ .formInstanceId(String.valueOf(formid))
|
|
|
+ .build(), YDConf.FORM_QUERY.retrieve_id).getFormData();
|
|
|
+
|
|
|
+ List<Map> list=(List<Map>) JSON.parse(String.valueOf(formdata.get("attachmentField_lt468w10")));
|
|
|
+ String ddapptonken= dd.getAccessToken("dingraobfxqulra4mp9r","KN28UwWycxxCkKkug1x61lsWWAhEaNpQbc8efrgMKyNUXayw-O2sRxDkhh9LTh8y");
|
|
|
+ log.info("ddapptonken, {}",ddapptonken);
|
|
|
+ //return McR.success(ydClient.convertTemporaryUrl(list.get(0).get("url").toString(),"APP_G951QZ32AUJNJUE4G127","HOA66I8176RID79L6QF3554SPPYH22VTBH1TLX6",ddapptonken));
|
|
|
+ return McR.success(list.get(0).get("previewUrl").toString());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|