parent
f2c730c6ec
commit
350a719d46
|
|
@ -1,5 +1,7 @@
|
|||
package tqq9.lc123.cloud.app.plugin.operate.sys;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import kd.bos.bill.AbstractBillPlugIn;
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.form.events.AfterDoOperationEventArgs;
|
||||
|
|
@ -30,8 +32,14 @@ public class ScsGetUPLPlugin extends AbstractBillPlugIn implements Plugin {
|
|||
String url = (String) att.get("url");
|
||||
fj.add(url);
|
||||
}
|
||||
String collect = fj.stream().map(s -> "\"" + s + "\"").collect(Collectors.joining(", ", "[", "]"));
|
||||
this.getModel().setValue("tqq9_fjurl_tag", collect);
|
||||
String fj_urls = "";
|
||||
try {
|
||||
fj_urls = new ObjectMapper().writeValueAsString(fj);
|
||||
} catch (JsonProcessingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
;
|
||||
this.getModel().setValue("tqq9_fjurl_tag", fj_urls);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package tqq9.lc123.cloud.app.plugin.operate.sys;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import kd.bos.bill.AbstractBillPlugIn;
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.form.events.AfterDoOperationEventArgs;
|
||||
|
|
@ -7,6 +8,7 @@ import kd.bos.orm.query.QFilter;
|
|||
import kd.bos.servicehelper.AttachmentServiceHelper;
|
||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
import kd.sdk.plugin.Plugin;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -16,7 +18,7 @@ import java.util.stream.Collectors;
|
|||
/**
|
||||
* 动态表单插件
|
||||
*/
|
||||
public class ZczGetURLPlugin extends AbstractBillPlugIn implements Plugin {
|
||||
public class ZczGetURLPlugin extends AbstractBillPlugIn implements Plugin {
|
||||
|
||||
@Override
|
||||
public void afterDoOperation(AfterDoOperationEventArgs eventArgs) {
|
||||
|
|
@ -41,31 +43,47 @@ public class ZczGetURLPlugin extends AbstractBillPlugIn implements Plugin {
|
|||
String url = (String) att.get("url");
|
||||
bj.add(url);
|
||||
}
|
||||
String sh_collect = sh.stream().map(s -> "\"" + s + "\"").collect(Collectors.joining(", ", "[", "]"));
|
||||
this.getModel().setValue("tqq9_shfjurl_tag", sh_collect);
|
||||
String sh_urls = "";
|
||||
try {
|
||||
sh_urls = new ObjectMapper().writeValueAsString(sh);
|
||||
} catch (JsonProcessingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
this.getModel().setValue("tqq9_shfjurl_tag", sh_urls);
|
||||
//北京
|
||||
DynamicObject bj_file = BusinessDataServiceHelper.loadSingle("tqq9_registration", "id,tqq9_attachmentpanelbj",
|
||||
new QFilter[]{new QFilter("number", QFilter.equals, number)});
|
||||
//获取单据中附件面板信息
|
||||
List<Map<String, Object>> bj_atts = AttachmentServiceHelper.getAttachments("tqq9_registration", bj_file.getPkValue().toString(), "tqq9_attachmentpanelbj");
|
||||
for (Map<String, Object> att: bj_atts) {
|
||||
for (Map<String, Object> att : bj_atts) {
|
||||
String url = (String) att.get("url");
|
||||
bj.add(url);
|
||||
}
|
||||
String bj_collect = bj.stream().map(s -> "\"" + s + "\"").collect(Collectors.joining(", ", "[", "]"));
|
||||
this.getModel().setValue("tqq9_bjfjurl_tag",bj_collect);
|
||||
String bj_urls = "";
|
||||
try {
|
||||
bj_urls = new ObjectMapper().writeValueAsString(bj);
|
||||
} catch (JsonProcessingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
this.getModel().setValue("tqq9_bjfjurl_tag", bj_urls);
|
||||
//广州
|
||||
//获取单据信息,并查询单据中的附件字段
|
||||
DynamicObject gz_file = BusinessDataServiceHelper.loadSingle("tqq9_registration", "id,tqq9_attachmentpanelgz1",
|
||||
new QFilter[]{new QFilter("number", QFilter.equals, number)});
|
||||
//获取单据中附件面板信息
|
||||
List<Map<String, Object>> gz_atts = AttachmentServiceHelper.getAttachments("tqq9_registration", gz_file.getPkValue().toString(), "tqq9_attachmentpanelgz1");
|
||||
for (Map<String, Object> att: gz_atts) {
|
||||
for (Map<String, Object> att : gz_atts) {
|
||||
String url = (String) att.get("url");
|
||||
bj.add(url);
|
||||
}
|
||||
String gz_collect = gz.stream().map(s -> "\"" + s + "\"").collect(Collectors.joining(", ", "[", "]"));
|
||||
this.getModel().setValue("tqq9_gzfjurl_tag",gz_collect);
|
||||
String gz_urls = "";
|
||||
try {
|
||||
gz_urls = new ObjectMapper().writeValueAsString(gz);
|
||||
} catch (JsonProcessingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
;
|
||||
this.getModel().setValue("tqq9_gzfjurl_tag", gz_urls);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue