1.url下载
This commit is contained in:
parent
6453839d00
commit
e30625fdf7
|
|
@ -201,7 +201,8 @@ public class OtherOutApplyBillPlugin extends AbstractBillPlugIn implements Befor
|
|||
dynamicObject.set("tqq9_licensenoxkzh", entry.getString("tqq9_ykzno"));//许可证号
|
||||
dynamicObject.set("tqq9_producedate", entry.getDate("tqq9_createdate"));//生产日期
|
||||
dynamicObject.set("tqq9_expirydate", entry.getDate("tqq9_deadline"));//到期日期
|
||||
dynamicObject.set("tqq9_dcck", entry.getDynamicObject("tqq9_thck"));//退货仓库
|
||||
dynamicObject.set("tqq9_drck", entry.getDynamicObject("tqq9_thck"));//退货仓库
|
||||
dataEntity.set("tqq9_basedatafield1", entry.getDynamicObject("tqq9_thck"));//退货仓库
|
||||
dynamicObject.set("tqq9_lot", entry.getDynamicObject("tqq9_ph"));//批号
|
||||
dynamicObject.set("tqq9_qty", entry.getBigDecimal("qty"));//数量
|
||||
dynamicObject.set("tqq9_baseqty", entry.getBigDecimal("qty"));//数量
|
||||
|
|
|
|||
|
|
@ -70,14 +70,19 @@ public class PurApplyBillPlugin extends AbstractBillPlugIn implements Plugin {
|
|||
//集采供应商
|
||||
if (StringUtils.equals("tqq9_sup_sh", name)) {
|
||||
DynamicObject tqq9_sup_sh = (DynamicObject) model.getValue("tqq9_sup_sh");//供应商
|
||||
if (tqq9_sup_sh != null) {
|
||||
DynamicObject org = BusinessDataServiceHelper.loadSingle("bos_org", new QFilter[]{new QFilter("number", QCP.equals, SH_ORGNUMBER)});
|
||||
String number = org.getString("number");
|
||||
DynamicObject org_fl = BusinessDataServiceHelper.loadSingle("tqq9_thirdconfig", "name",
|
||||
new QFilter[]{new QFilter("number", QCP.equals, number)});
|
||||
String orgid_fl = org_fl != null ? org_fl.getString("name") : null;
|
||||
EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
|
||||
entryFieldRefresher.updateDynamicObjectByOrg(SH_ORGNUMBER, "supplier", tqq9_sup_sh, model);
|
||||
String tqq9_mulcombofield1 = tqq9_sup_sh.getString("tqq9_mulcombofield1");
|
||||
model.setValue("tqq9_suparea_sh", tqq9_mulcombofield1);
|
||||
HashMap<String, Object> queryMap = new HashMap<>();
|
||||
queryMap.put("supplierId", tqq9_sup_sh.getString("number"));
|
||||
queryMap.put("companyId", org.getString("number"));
|
||||
queryMap.put("supplierId", tqq9_sup_sh.getString("tqq9_ztsupplierid"));
|
||||
queryMap.put("companyId", orgid_fl);
|
||||
Gson gson = new Gson();
|
||||
try {
|
||||
String bodyString = HttpRequestUtils.doGet(URL, queryMap, tokenMap);
|
||||
|
|
@ -105,6 +110,7 @@ public class PurApplyBillPlugin extends AbstractBillPlugIn implements Plugin {
|
|||
}
|
||||
view.updateView();
|
||||
}
|
||||
}
|
||||
//收货仓库
|
||||
if (StringUtils.equals("tqq9_rewares_sh", name)) {
|
||||
DynamicObject tqq9_rewares_sh = (DynamicObject) model.getValue("tqq9_rewares_sh");
|
||||
|
|
@ -151,14 +157,19 @@ public class PurApplyBillPlugin extends AbstractBillPlugIn implements Plugin {
|
|||
//集采供应商
|
||||
if (StringUtils.equals("tqq9_sup_bj", name)) {
|
||||
DynamicObject tqq9_sup_bj = (DynamicObject) model.getValue("tqq9_sup_bj");
|
||||
if (tqq9_sup_bj != null) {
|
||||
DynamicObject org = BusinessDataServiceHelper.loadSingle("bos_org", new QFilter[]{new QFilter("number", QCP.equals, BJ_ORGNUMBER)});
|
||||
String number = org.getString("number");
|
||||
DynamicObject org_fl = BusinessDataServiceHelper.loadSingle("tqq9_thirdconfig", "name",
|
||||
new QFilter[]{new QFilter("number", QCP.equals, number)});
|
||||
String orgid_fl = org_fl != null ? org_fl.getString("name") : null;
|
||||
EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
|
||||
entryFieldRefresher.updateDynamicObjectByOrg(BJ_ORGNUMBER, "supplier", tqq9_sup_bj, model);
|
||||
String tqq9_mulcombofield1 = tqq9_sup_bj.getString("tqq9_mulcombofield1");
|
||||
model.setValue("tqq9_suparea_bj", tqq9_mulcombofield1);
|
||||
HashMap<String, Object> queryMap = new HashMap<>();
|
||||
queryMap.put("supplierId", tqq9_sup_bj.getString("number"));
|
||||
queryMap.put("companyId", org.getString("number"));
|
||||
queryMap.put("supplierId", tqq9_sup_bj.getString("tqq9_ztsupplierid"));
|
||||
queryMap.put("companyId", orgid_fl);
|
||||
Gson gson = new Gson();
|
||||
try {
|
||||
String bodyString = HttpRequestUtils.doGet(URL, queryMap, tokenMap);
|
||||
|
|
@ -188,6 +199,7 @@ public class PurApplyBillPlugin extends AbstractBillPlugIn implements Plugin {
|
|||
|
||||
view.updateView();
|
||||
}
|
||||
}
|
||||
//收货仓库
|
||||
if (StringUtils.equals("tqq9_rewares_bj", name)) {
|
||||
DynamicObject tqq9_rewares_bj = (DynamicObject) model.getValue("tqq9_rewares_bj");
|
||||
|
|
@ -234,14 +246,20 @@ public class PurApplyBillPlugin extends AbstractBillPlugIn implements Plugin {
|
|||
//集采供应商
|
||||
if (StringUtils.equals("tqq9_sup_gz", name)) {
|
||||
DynamicObject tqq9_sup_gz = (DynamicObject) model.getValue("tqq9_sup_gz");
|
||||
if (tqq9_sup_gz != null) {
|
||||
|
||||
DynamicObject org = BusinessDataServiceHelper.loadSingle("bos_org", new QFilter[]{new QFilter("number", QCP.equals, GZ_ORGNUMBER)});
|
||||
String number = org.getString("number");
|
||||
DynamicObject org_fl = BusinessDataServiceHelper.loadSingle("tqq9_thirdconfig", "name",
|
||||
new QFilter[]{new QFilter("number", QCP.equals, number)});
|
||||
String orgid_fl = org_fl != null ? org_fl.getString("name") : null;
|
||||
EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
|
||||
entryFieldRefresher.updateDynamicObjectByOrg(GZ_ORGNUMBER, "supplier", tqq9_sup_gz, model);
|
||||
String tqq9_mulcombofield1 = tqq9_sup_gz.getString("tqq9_mulcombofield1");
|
||||
model.setValue("tqq9_suparea_gz", tqq9_mulcombofield1);
|
||||
HashMap<String, Object> queryMap = new HashMap<>();
|
||||
queryMap.put("supplierId", tqq9_sup_gz.getString("number"));
|
||||
queryMap.put("companyId", org.getString("number"));
|
||||
queryMap.put("supplierId", tqq9_sup_gz.getString("tqq9_ztsupplierid"));
|
||||
queryMap.put("companyId", orgid_fl);
|
||||
Gson gson = new Gson();
|
||||
try {
|
||||
String bodyString = HttpRequestUtils.doGet(URL, queryMap, tokenMap);
|
||||
|
|
@ -269,6 +287,7 @@ public class PurApplyBillPlugin extends AbstractBillPlugIn implements Plugin {
|
|||
}
|
||||
view.updateView();
|
||||
}
|
||||
}
|
||||
//收货仓库
|
||||
if (StringUtils.equals("tqq9_rewares_gz", name)) {
|
||||
DynamicObject tqq9_rewares_gz = (DynamicObject) model.getValue("tqq9_rewares_gz");
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package tqq9.lc123.cloud.app.plugin.form.pm;
|
|||
|
||||
import kd.bos.bill.AbstractBillPlugIn;
|
||||
import kd.bos.bill.BillShowParameter;
|
||||
import kd.bos.bill.OperationStatus;
|
||||
import kd.bos.dataentity.OperateOption;
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||
|
|
@ -10,8 +9,6 @@ import kd.bos.dataentity.utils.StringUtils;
|
|||
import kd.bos.entity.operate.result.OperationResult;
|
||||
import kd.bos.form.CloseCallBack;
|
||||
import kd.bos.form.ShowType;
|
||||
import kd.bos.form.StyleCss;
|
||||
import kd.bos.form.control.Control;
|
||||
import kd.bos.form.events.BeforeDoOperationEventArgs;
|
||||
import kd.bos.form.events.ClosedCallBackEvent;
|
||||
import kd.bos.form.field.BasedataEdit;
|
||||
|
|
@ -103,28 +100,6 @@ public class PurRefundApplyBillPlugin extends AbstractBillPlugIn implements Befo
|
|||
}
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 点击对应异地退货单号跳转
|
||||
// */
|
||||
// @Override
|
||||
// public void click(EventObject evt) {
|
||||
// super.click(evt);
|
||||
// Control source = (Control) evt.getSource();
|
||||
// if (StringUtils.equals("tqq9_ydthno", source.getKey())) {
|
||||
// String tqq9_ydthno = (String) this.getModel().getValue("tqq9_ydthno");
|
||||
// DynamicObject tqq9_otheroutapply = BusinessDataServiceHelper.loadSingle("tqq9_otheroutapply", new QFilter[]{new QFilter("billno", QCP.equals, tqq9_ydthno)});
|
||||
// if (tqq9_otheroutapply != null) {
|
||||
// BillShowParameter formshowParameter = new BillShowParameter();
|
||||
// formshowParameter.setFormId("tqq9_otheroutapply");
|
||||
// formshowParameter.getOpenStyle().setInlineStyleCss(new StyleCss());
|
||||
// formshowParameter.setPkId(tqq9_otheroutapply.get("id"));
|
||||
// formshowParameter.getOpenStyle().setShowType(ShowType.Modal);
|
||||
// formshowParameter.setStatus(OperationStatus.VIEW);
|
||||
// this.getView().showForm(formshowParameter);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
/**
|
||||
* 出库批号根据了做筛选
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ public class PuroderBillShareRefundPlugin extends AbstractBillPlugIn {
|
|||
}};
|
||||
|
||||
private static String URL;
|
||||
|
||||
static {
|
||||
DynamicObject url = BusinessDataServiceHelper.loadSingle("tqq9_thirdconfig", "name",
|
||||
new QFilter[]{new QFilter("number", QCP.equals, "FLXT_Balance_Url")});
|
||||
|
|
@ -46,7 +47,6 @@ public class PuroderBillShareRefundPlugin extends AbstractBillPlugIn {
|
|||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void afterAddRow(AfterAddRowEventArgs e) {
|
||||
super.afterAddRow(e);
|
||||
|
|
@ -332,9 +332,14 @@ public class PuroderBillShareRefundPlugin extends AbstractBillPlugIn {
|
|||
ChangeData changeData = e.getChangeSet()[0];
|
||||
DynamicObject newValue = (DynamicObject) changeData.getNewValue();//供应商
|
||||
DynamicObject org = (DynamicObject) model.getValue("org");//组织
|
||||
if (newValue != null && org != null) {
|
||||
String number = org.getString("number");
|
||||
DynamicObject org_fl = BusinessDataServiceHelper.loadSingle("tqq9_thirdconfig", "name",
|
||||
new QFilter[]{new QFilter("number", QCP.equals, number)});
|
||||
String orgid_fl = org_fl != null ? org_fl.getString("name") : null;
|
||||
HashMap<String, Object> queryMap = new HashMap<>();
|
||||
queryMap.put("supplierId",newValue.getString("number"));
|
||||
queryMap.put("companyId",org.getString("number"));
|
||||
queryMap.put("supplierId", newValue.getString("tqq9_ztsupplierid"));
|
||||
queryMap.put("companyId", orgid_fl);
|
||||
Gson gson = new Gson();
|
||||
try {
|
||||
String bodyString = HttpRequestUtils.doGet(URL, queryMap, tokenMap);
|
||||
|
|
@ -353,7 +358,7 @@ public class PuroderBillShareRefundPlugin extends AbstractBillPlugIn {
|
|||
} else if (StringUtils.equals(type, "0.0")) {
|
||||
//现返
|
||||
model.setValue("tqq9_hsxfzje", totalMoney);//含税现返总金额
|
||||
model.setValue("tqq9_hsxfzje",totalMoneyAvailable);//含税现返可用金额
|
||||
model.setValue("tqq9_hsxfkyje", totalMoneyAvailable);//含税现返可用金额
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -364,3 +369,4 @@ public class PuroderBillShareRefundPlugin extends AbstractBillPlugIn {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
package tqq9.lc123.cloud.app.plugin.form.sys;
|
||||
|
||||
import kd.bos.bill.AbstractBillPlugIn;
|
||||
import kd.bos.dataentity.utils.StringUtils;
|
||||
import kd.bos.form.control.events.ItemClickEvent;
|
||||
import kd.sdk.plugin.Plugin;
|
||||
|
||||
import java.util.EventObject;
|
||||
|
||||
/**
|
||||
* 点击按钮下载附件
|
||||
*/
|
||||
public class DownloadAttachmentPlugin extends AbstractBillPlugIn implements Plugin {
|
||||
@Override
|
||||
public void registerListener(EventObject e) {
|
||||
super.registerListener(e);
|
||||
this.addItemClickListeners("tbmain");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void itemClick(ItemClickEvent evt) {
|
||||
super.itemClick(evt);
|
||||
String itemKey = evt.getItemKey();
|
||||
if (StringUtils.equals("tqq9_download", itemKey)) {
|
||||
String tqq9_zcztplj = this.getModel().getValue("tqq9_zcztplj").toString();
|
||||
if (StringUtils.isNotBlank(tqq9_zcztplj)) {
|
||||
this.getView().openUrl(tqq9_zcztplj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -78,8 +78,8 @@ public class GoodlotManageBillPlugin extends AbstractListPlugin implements Plugi
|
|||
Object[] ids = selectedRows.getPrimaryKeyValues();
|
||||
Object id = ids[0];
|
||||
FormShowParameter param = new FormShowParameter();
|
||||
param.setFormId("tqq9_upload");
|
||||
param.setCloseCallBack(new CloseCallBack(this, "tqq9_upload"));
|
||||
param.setFormId("tqq9_uploadattachment");
|
||||
param.setCloseCallBack(new CloseCallBack(this, "tqq9_uploadattachment"));
|
||||
param.getOpenStyle().setShowType(ShowType.Modal);
|
||||
param.setCustomParam("buttontype", itemKey);
|
||||
param.setCustomParam("id", id);
|
||||
|
|
@ -96,7 +96,7 @@ public class GoodlotManageBillPlugin extends AbstractListPlugin implements Plugi
|
|||
String actionId = closedCallBackEvent.getActionId();
|
||||
Object returnData = closedCallBackEvent.getReturnData();
|
||||
if (returnData != null) {
|
||||
if (StringUtils.equals("tqq9_upload", actionId)) {
|
||||
if (StringUtils.equals("tqq9_uploadattachment", actionId)) {
|
||||
ArrayList attachmentData = (ArrayList) ((HashMap) returnData).get("attachmentData");
|
||||
HashMap<String, Object> map = (HashMap) attachmentData.get(0);
|
||||
String url = map.get("url").toString();
|
||||
|
|
@ -139,6 +139,7 @@ public class GoodlotManageBillPlugin extends AbstractListPlugin implements Plugi
|
|||
String url = tqq9_goodlotmanage.getString(fieldName);
|
||||
if (url != null) {
|
||||
this.getView().download(url);
|
||||
// this.getView().openUrl(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,12 @@ import kd.bos.dataentity.entity.DynamicObject;
|
|||
import kd.bos.dataentity.utils.StringUtils;
|
||||
import kd.bos.form.FormShowParameter;
|
||||
import kd.bos.form.control.AttachmentPanel;
|
||||
import kd.bos.form.events.AfterDoOperationEventArgs;
|
||||
import kd.bos.form.events.BeforeDoOperationEventArgs;
|
||||
import kd.bos.form.operate.FormOperate;
|
||||
import kd.bos.orm.query.QCP;
|
||||
import kd.bos.orm.query.QFilter;
|
||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
import kd.bos.servicehelper.user.UserServiceHelper;
|
||||
import kd.sdk.plugin.Plugin;
|
||||
|
||||
import java.util.EventObject;
|
||||
|
|
@ -25,14 +30,46 @@ public class upattAchmentBillPlugin extends AbstractBillPlugIn implements Plugin
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* 由商品批次注册证管理界面跳转此界面,选择附件后回传相关信息
|
||||
*/
|
||||
// @Override
|
||||
// public void afterDoOperation(AfterDoOperationEventArgs afterDoOperationEventArgs) {
|
||||
// super.afterDoOperation(afterDoOperationEventArgs);
|
||||
// String itemKey = afterDoOperationEventArgs.getOperateKey();
|
||||
// if (StringUtils.equals("dothing", itemKey)) {
|
||||
// FormShowParameter formShowParameter = this.getView().getFormShowParameter();
|
||||
// String buttontype = formShowParameter.getCustomParam("buttontype").toString();
|
||||
// String id = formShowParameter.getCustomParam("id").toString();
|
||||
// AttachmentPanel tqq9_attachmentpanelap = this.getView().getControl("tqq9_attachmentpanelap");
|
||||
// List<Map<String, Object>> attachmentData = tqq9_attachmentpanelap.getAttachmentData();
|
||||
// HashMap<String, Object> map = new HashMap<>();
|
||||
// map.put("attachmentData", attachmentData);
|
||||
// map.put("buttontype", buttontype);
|
||||
// map.put("id", id);
|
||||
// this.getView().returnDataToParent(map);
|
||||
// this.getView().close();
|
||||
//
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* 由商品批次注册证管理界面跳转此界面,选择附件后回传相关信息
|
||||
*/
|
||||
@Override
|
||||
public void afterDoOperation(AfterDoOperationEventArgs afterDoOperationEventArgs) {
|
||||
super.afterDoOperation(afterDoOperationEventArgs);
|
||||
String itemKey = afterDoOperationEventArgs.getOperateKey();
|
||||
if (StringUtils.equals("donothing", itemKey)) {
|
||||
public void beforeDoOperation(BeforeDoOperationEventArgs args) {
|
||||
super.beforeDoOperation(args);
|
||||
FormOperate formOperate = (FormOperate)args.getSource();
|
||||
if ( StringUtils.equals( "save", formOperate.getOperateKey())){
|
||||
DynamicObject dataEntity = this.getModel().getDataEntity();
|
||||
long currentUserId = UserServiceHelper.getCurrentUserId();
|
||||
DynamicObject user = BusinessDataServiceHelper.loadSingle("bos_user", new QFilter[]{new QFilter("id", QCP.equals, currentUserId)});
|
||||
long timestamp = System.currentTimeMillis();
|
||||
String number = String.valueOf(timestamp);
|
||||
dataEntity.set("number",number);
|
||||
dataEntity.set("status","A");
|
||||
dataEntity.set("creator",user);
|
||||
dataEntity.set("enable","1");
|
||||
FormShowParameter formShowParameter = this.getView().getFormShowParameter();
|
||||
String buttontype = formShowParameter.getCustomParam("buttontype").toString();
|
||||
String id = formShowParameter.getCustomParam("id").toString();
|
||||
|
|
@ -46,8 +83,8 @@ public class upattAchmentBillPlugin extends AbstractBillPlugIn implements Plugin
|
|||
this.getView().close();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue