1.财务中台接口调整
2.其他出库申请单界面插件调整 3.商品批次注册证管理附件上传功能 4.采购建议报表下推采购订单 5.品牌审核时反写执行采购信息到对应品牌的物料信息学里
This commit is contained in:
parent
9caf21c6e6
commit
120ef7a4ee
|
|
@ -84,12 +84,6 @@ public class CasPaybillController {
|
|||
Boolean iserror = true;
|
||||
for (DynamicObject cas_paybill : cas_paybills) {
|
||||
if (billno.equals(cas_paybill.getString("billno"))) {
|
||||
Date bizdate = dateFormat.parse(dataMap.get("bizdate").toString());
|
||||
// cas_paybill.set("bizdate", bizdate);
|
||||
// cas_paybill.set("openorg.number", dataMap.get("openorg_number"));
|
||||
// cas_paybill.set("settletype.number", dataMap.get("settletype_number"));
|
||||
// cas_paybill.set("payeracctbank.number", dataMap.get("bankaccountnumber"));
|
||||
// cas_paybill.set("tqq9_billstatus", dataMap.get("billstatus"));
|
||||
cas_paybill.set("description", dataMap.get("description"));
|
||||
cas_paybill.set("tqq9_digital_receipt", dataMap.get("tqq9_digital_receipt"));
|
||||
resultBean.setId(cas_paybill.getString("id"));
|
||||
|
|
|
|||
|
|
@ -174,10 +174,10 @@ public class ApiResultExt implements Serializable {
|
|||
Set<String> idSet = new HashSet<>();
|
||||
for (ResultBean resultBean : resultBeans) {
|
||||
Error error = resultBean.getErrors();
|
||||
resultBean.setBillStatus(false);
|
||||
String message = iOperateInfo.getMessage();
|
||||
String id = iOperateInfo.getPkValue().toString();
|
||||
if (StringUtils.equals(resultBean.getId(),id)) {
|
||||
resultBean.setBillStatus(false);
|
||||
if (error == null) {
|
||||
error = new Error();
|
||||
error.setRowMsg(new ArrayList<String>());
|
||||
|
|
|
|||
|
|
@ -31,10 +31,10 @@ public class HttpClient {
|
|||
new QFilter[]{new QFilter("number", QCP.equals, "FinanceHub_Token_Url")});
|
||||
DynamicObject userName = BusinessDataServiceHelper.loadSingle("tqq9_thirdconfig", "name",
|
||||
new QFilter[]{new QFilter("number", QCP.equals, "FinanceHub_Token_Username ")});
|
||||
USERNAME = userName != null ? userName.getString("rbkj_value") : null;
|
||||
USERNAME = userName != null ? userName.getString("name") : null;
|
||||
DynamicObject passWord = BusinessDataServiceHelper.loadSingle("tqq9_thirdconfig", "name",
|
||||
new QFilter[]{new QFilter("number", QCP.equals, "FinanceHub_Token_Password")});
|
||||
PASSWORD = passWord != null ? passWord.getString("rbkj_value") : null;
|
||||
PASSWORD = passWord != null ? passWord.getString("name") : null;
|
||||
}
|
||||
|
||||
private static RestTemplate restTemplate = new RestTemplate();
|
||||
|
|
|
|||
|
|
@ -5,6 +5,9 @@ import kd.bos.dataentity.entity.DynamicObject;
|
|||
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
||||
import kd.bos.entity.plugin.PreparePropertysEventArgs;
|
||||
import kd.bos.entity.plugin.args.BeforeOperationArgs;
|
||||
import kd.bos.orm.query.QCP;
|
||||
import kd.bos.orm.query.QFilter;
|
||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
import kd.sdk.plugin.Plugin;
|
||||
|
||||
/**
|
||||
|
|
@ -41,6 +44,7 @@ public class PayBillFromApiSavePlugin extends AbstractOperationServicePlugIn imp
|
|||
bill.set("recaccbankname", payeeName);
|
||||
}
|
||||
DynamicObject payeeBank = bill.getDynamicObject("payeebank");//收款银行
|
||||
payeeBank = BusinessDataServiceHelper.loadSingle("bd_bebank", new QFilter[]{new QFilter("number", QCP.equals, payeeBank.getString("number"))});
|
||||
String recBankNumber = bill.getString("recbanknumber");//收款行号
|
||||
if(payeeBank != null && StringUtils.isBlank(recBankNumber)){
|
||||
bill.set("recbanknumber", payeeBank.getString("number"));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,128 @@
|
|||
package tqq9.lc123.cloud.app.plugin.form.im;
|
||||
|
||||
import kd.bos.bill.AbstractBillPlugIn;
|
||||
import kd.bos.bill.BillShowParameter;
|
||||
import kd.bos.bill.OperationStatus;
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||
import kd.bos.dataentity.utils.StringUtils;
|
||||
import kd.bos.entity.datamodel.IDataModel;
|
||||
import kd.bos.entity.datamodel.ListSelectedRow;
|
||||
import kd.bos.entity.datamodel.ListSelectedRowCollection;
|
||||
import kd.bos.entity.datamodel.events.ChangeData;
|
||||
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
|
||||
import kd.bos.form.IFormView;
|
||||
import kd.bos.form.ShowType;
|
||||
import kd.bos.form.StyleCss;
|
||||
import kd.bos.form.control.Control;
|
||||
import kd.bos.form.events.ClosedCallBackEvent;
|
||||
import kd.bos.form.events.HyperLinkClickEvent;
|
||||
import kd.bos.form.events.HyperLinkClickListener;
|
||||
import kd.bos.form.field.BasedataEdit;
|
||||
import kd.bos.form.field.events.BeforeF7SelectEvent;
|
||||
import kd.bos.form.field.events.BeforeF7SelectListener;
|
||||
import kd.bos.list.ListShowParameter;
|
||||
import kd.bos.orm.query.QCP;
|
||||
import kd.bos.orm.query.QFilter;
|
||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
|
||||
import java.util.EventObject;
|
||||
|
||||
/**
|
||||
* 其他出库申请界面插件
|
||||
*/
|
||||
public class OtherOutApplyBillPlugin extends AbstractBillPlugIn implements BeforeF7SelectListener {
|
||||
@Override
|
||||
public void registerListener(EventObject e) {
|
||||
super.registerListener(e);
|
||||
this.addItemClickListeners("tbmain");
|
||||
BasedataEdit control = this.getControl("tqq9_lot");
|
||||
control.addBeforeF7SelectListener(this);
|
||||
this.addClickListeners("tqq9_xsddh");
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**出库批号根据了做筛选
|
||||
*
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void beforeF7Select(BeforeF7SelectEvent beforeF7SelectEvent) {
|
||||
int index = this.getModel().getEntryCurrentRowIndex("entryentity");
|
||||
DynamicObjectCollection entryentity = this.getModel().getDataEntity(true).getDynamicObjectCollection("entryentity");
|
||||
DynamicObject dynamicObject = entryentity.get(index);
|
||||
DynamicObject tqq9_materiel = dynamicObject.getDynamicObject("tqq9_materiel");
|
||||
if (tqq9_materiel == null) {
|
||||
beforeF7SelectEvent.setCancel(true);
|
||||
this.getView().showMessage("请先填物料信息");
|
||||
} else {
|
||||
DynamicObject materiel = tqq9_materiel.getDynamicObject("masterid");//物料
|
||||
Boolean enablelot = tqq9_materiel.getBoolean("enablelot");//是否启用批号管理
|
||||
if (enablelot) {
|
||||
ListShowParameter param = (ListShowParameter) beforeF7SelectEvent.getFormShowParameter();
|
||||
QFilter qF1 = new QFilter("material.number", QCP.equals, materiel.getString("number"));
|
||||
param.getListFilterParameter().getQFilters().add(qF1);
|
||||
} else {
|
||||
beforeF7SelectEvent.setCancel(true);
|
||||
this.getView().showMessage("该物料未启用批号管理");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/**售后单号带出售后信息
|
||||
*
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void propertyChanged(PropertyChangedArgs e) {
|
||||
super.propertyChanged(e);
|
||||
String name = e.getProperty().getName();
|
||||
IDataModel model = this.getModel();
|
||||
if (StringUtils.equals("tqq9_returnapply", name)) {
|
||||
ChangeData[] changeSet = e.getChangeSet();
|
||||
DynamicObject newValue = (DynamicObject) changeSet[0].getNewValue();//销售退货申请单
|
||||
DynamicObject dynamicObject = BusinessDataServiceHelper.loadSingle("sm_returnapply", new QFilter[]{new QFilter("billno", QCP.equals, newValue.getString("billno"))});
|
||||
DynamicObjectCollection billentry = dynamicObject.getDynamicObjectCollection("billentry");
|
||||
if (billentry.size() > 0) {
|
||||
DynamicObject entry = billentry.get(0);
|
||||
String mainbillnumber = entry.getString("mainbillnumber");//核心单据编号
|
||||
String tqq9_kddh = dynamicObject.getString("tqq9_kddh");//快递单号
|
||||
DynamicObject tqq9_sskf = dynamicObject.getDynamicObject("tqq9_sskf");//所属客服
|
||||
DynamicObject operator = dynamicObject.getDynamicObject("operator");//所属客服
|
||||
DynamicObject customer = dynamicObject.getDynamicObject("customer");//订货客户
|
||||
model.setValue("tqq9_xsddh", mainbillnumber);//对应销售订单号
|
||||
model.setValue("tqq9_dpdh", tqq9_kddh);//DP单号
|
||||
model.setValue("tqq9_sskf", tqq9_sskf);//所属客服
|
||||
model.setValue("tqq9_ssxs", operator);//所属销售
|
||||
model.setValue("tqq9_kufptt", customer);//客户发票抬头
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**点击对应销售订单号跳转
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public void click(EventObject evt) {
|
||||
super.click(evt);
|
||||
Control source = (Control) evt.getSource();
|
||||
if (StringUtils.equals("tqq9_xsddh", source.getKey())) {
|
||||
String tqq9_xsddh = (String) this.getModel().getValue("tqq9_xsddh");
|
||||
DynamicObject sm_salorder = BusinessDataServiceHelper.loadSingle("sm_salorder", new QFilter[]{new QFilter("billno", QCP.equals, tqq9_xsddh)});
|
||||
Long id = sm_salorder.getLong("id");
|
||||
if (id != null) {
|
||||
BillShowParameter formshowParameter = new BillShowParameter();
|
||||
formshowParameter.setFormId("sm_salorder");
|
||||
formshowParameter.getOpenStyle().setInlineStyleCss(new StyleCss());
|
||||
formshowParameter.setPkId(id);
|
||||
formshowParameter.getOpenStyle().setShowType(ShowType.Modal);
|
||||
formshowParameter.setStatus(OperationStatus.VIEW);
|
||||
this.getView().showForm(formshowParameter);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
package tqq9.lc123.cloud.app.plugin.form.pm;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import kd.bos.bill.AbstractBillPlugIn;
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||
|
|
@ -11,11 +13,17 @@ import kd.bos.entity.datamodel.events.ChangeData;
|
|||
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
|
||||
import kd.bos.logging.Log;
|
||||
import kd.bos.logging.LogFactory;
|
||||
import kd.bos.orm.query.QCP;
|
||||
import kd.bos.orm.query.QFilter;
|
||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import tqq9.lc123.cloud.app.api.utils.HttpClient;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.net.ConnectException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -26,6 +34,12 @@ public class PuroderBillShareRefundPlugin extends AbstractBillPlugIn {
|
|||
|
||||
private final static Log logger = LogFactory.getLog(PuroderBillShareRefundPlugin.class);
|
||||
private final static String ENTRYENTITY = "billentry";
|
||||
private static String URL;
|
||||
static {
|
||||
DynamicObject url = BusinessDataServiceHelper.loadSingle("tqq9_thirdconfig", "name",
|
||||
new QFilter[]{new QFilter("number", QCP.equals, "FLXT_Balance_Url")});
|
||||
URL = url != null ? url.getString("name") : null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
|
|
@ -310,5 +324,41 @@ public class PuroderBillShareRefundPlugin extends AbstractBillPlugIn {
|
|||
|
||||
|
||||
}
|
||||
// if (StringUtils.equals("supplier", name)) {
|
||||
// IDataModel model = this.getModel();
|
||||
// ChangeData changeData = e.getChangeSet()[0];
|
||||
// DynamicObject newValue = (DynamicObject) changeData.getNewValue();//供应商
|
||||
// DynamicObject org = (DynamicObject)model.getValue("org");//组织
|
||||
// HashMap<String,String> queryMap =new HashMap<>();
|
||||
// queryMap.put("supplierId",newValue.getString("number"));
|
||||
//// queryMap.put("supplierId","1024");
|
||||
// queryMap.put("companyId",org.getString("number"));
|
||||
// try {
|
||||
// ResponseEntity responseEntity = HttpClient.doPost(URL, null, "Authorization", "Bearer b96dad1eb4f84c41bae651162aeacdd3", queryMap);
|
||||
// JSONObject responseEntityBody = (JSONObject)responseEntity.getBody();
|
||||
// JSONArray data = responseEntityBody.getJSONArray("data");
|
||||
// for (Object datum : data) {
|
||||
// JSONObject datum1 = (JSONObject) datum;
|
||||
// String type = datum1.get("type").toString();//类型
|
||||
// if(StringUtils.equals(type,"0")){
|
||||
// //货返
|
||||
// BigDecimal totalMoney = (BigDecimal) datum1.get("totalMoney");//剩余总金额
|
||||
// BigDecimal totalMoneyAvailable = (BigDecimal) datum1.get("totalMoneyAvailable");//可使用金额
|
||||
// model.setValue("tqq9_hshfzje",totalMoney);//含税货返总金额
|
||||
// model.setValue("tqq9_hshfkyje",totalMoneyAvailable);//含税货返可用金额
|
||||
// }else if(StringUtils.equals(type,"1")){
|
||||
// BigDecimal totalMoney = (BigDecimal) datum1.get("totalMoney");//剩余总金额
|
||||
// BigDecimal totalMoneyAvailable = (BigDecimal) datum1.get("totalMoneyAvailable");//可使用金额
|
||||
// model.setValue("tqq9_hsxfzje",totalMoney);//含税现返总金额
|
||||
// model.setValue("tqq9_hsxfzje",totalMoneyAvailable);//含税现返可用金额
|
||||
// }
|
||||
// }
|
||||
// getView().updateView();
|
||||
// } catch (ConnectException ex) {
|
||||
// throw new RuntimeException(ex);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,28 @@
|
|||
package tqq9.lc123.cloud.app.plugin.form.sys;
|
||||
|
||||
import kd.bos.bill.AbstractBillPlugIn;
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.dataentity.utils.StringUtils;
|
||||
import kd.bos.entity.datamodel.ListSelectedRowCollection;
|
||||
import kd.bos.form.CloseCallBack;
|
||||
import kd.bos.form.FormShowParameter;
|
||||
import kd.bos.form.ShowType;
|
||||
import kd.bos.form.control.events.BeforeItemClickEvent;
|
||||
import kd.bos.form.control.events.ItemClickEvent;
|
||||
import kd.bos.form.events.ClosedCallBackEvent;
|
||||
import kd.bos.form.events.HyperLinkClickArgs;
|
||||
import kd.bos.list.BillList;
|
||||
import kd.bos.list.IListView;
|
||||
import kd.bos.list.plugin.AbstractListPlugin;
|
||||
import kd.bos.logging.Log;
|
||||
import kd.bos.logging.LogFactory;
|
||||
import kd.bos.orm.query.QCP;
|
||||
import kd.bos.orm.query.QFilter;
|
||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
||||
import kd.sdk.plugin.Plugin;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.EventObject;
|
||||
import java.util.HashMap;
|
||||
|
||||
|
|
@ -18,40 +30,117 @@ import java.util.HashMap;
|
|||
* 商品批次注册证管理界面插件
|
||||
*/
|
||||
public class GoodlotManageBillPlugin extends AbstractListPlugin implements Plugin {
|
||||
private final static Log logger = LogFactory.getLog(GoodlotManageBillPlugin.class);
|
||||
|
||||
/**
|
||||
* 控件监听
|
||||
*/
|
||||
@Override
|
||||
public void registerListener(EventObject e) {
|
||||
super.registerListener(e);
|
||||
this.addItemClickListeners("tbmain");
|
||||
this.addClickListeners("tqq9_lotcheck", "tqq9_customcheck");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 点击前事件,校验是否选择单行数据
|
||||
*/
|
||||
@Override
|
||||
public void beforeItemClick(BeforeItemClickEvent evt) {
|
||||
super.beforeItemClick(evt);
|
||||
String itemKey = evt.getItemKey();
|
||||
|
||||
if (StringUtils.equals(itemKey, "tqq9_lotchecktb") || StringUtils.equals(itemKey, "tqq9_customchecktb")) {
|
||||
BillList billList = (BillList) this.getControl("billlistap");
|
||||
ListSelectedRowCollection selectedRows = billList.getSelectedRows();
|
||||
if (selectedRows.size() > 1) {
|
||||
evt.setCancel(true);
|
||||
this.getView().showMessage("请选择单行信息");
|
||||
} else if (selectedRows.size() == 0) {
|
||||
evt.setCancel(true);
|
||||
this.getView().showMessage("请选择要执的单行信息");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 点击跳转附件上传页面
|
||||
*/
|
||||
@Override
|
||||
public void itemClick(ItemClickEvent evt) {
|
||||
super.itemClick(evt);
|
||||
String itemKey = evt.getItemKey();
|
||||
if (StringUtils.equals(itemKey,"tqq9_lotchecktb")||StringUtils.equals(itemKey,"tqq9_customchecktb")) {
|
||||
if (StringUtils.equals(itemKey, "tqq9_lotchecktb") || StringUtils.equals(itemKey, "tqq9_customchecktb")) {
|
||||
BillList billList = (BillList) this.getControl("billlistap");
|
||||
ListSelectedRowCollection selectedRows = billList.getSelectedRows();
|
||||
Object[] ids = selectedRows.getPrimaryKeyValues();
|
||||
Object id = ids[0];
|
||||
FormShowParameter param = new FormShowParameter();
|
||||
param.setFormId("tqq9_upattachment");
|
||||
param.setCloseCallBack(new CloseCallBack(this, "tqq9_upattachment"));
|
||||
param.setFormId("tqq9_upload");
|
||||
param.setCloseCallBack(new CloseCallBack(this, "tqq9_upload"));
|
||||
param.getOpenStyle().setShowType(ShowType.Modal);
|
||||
param.setCustomParam("buttontype", itemKey);
|
||||
param.setCustomParam("id", id);
|
||||
this.getView().showForm(param);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 附件上传页面回传附件信息
|
||||
*/
|
||||
@Override
|
||||
public void closedCallBack(ClosedCallBackEvent closedCallBackEvent) {
|
||||
super.closedCallBack(closedCallBackEvent);
|
||||
String actionId = closedCallBackEvent.getActionId();
|
||||
Object returnData = closedCallBackEvent.getReturnData();
|
||||
if (returnData != null) {
|
||||
if ("tqq9_upattachment".equals(actionId)) {
|
||||
|
||||
DynamicObject data = (DynamicObject) ((HashMap) returnData).get("data");
|
||||
// model.setValue("tqq9_paybillno", dynamicObject.getString("billno"));//付款单
|
||||
// model.setValue("joinpayamount", unsettleamount, seq);//关联付款金额
|
||||
// model.setValue("paidamount", unsettleamount, seq);//已付金额
|
||||
// model.setValue("tqq9_settleamount", unsettleamount, seq);//本次结算金额
|
||||
if (StringUtils.equals("tqq9_upload", actionId)) {
|
||||
ArrayList attachmentData = (ArrayList) ((HashMap) returnData).get("attachmentData");
|
||||
HashMap<String, Object> map = (HashMap) attachmentData.get(0);
|
||||
String url = map.get("url").toString();
|
||||
HashMap creator = (HashMap) map.get("creator");
|
||||
String name = creator.get("zh_CN").toString();
|
||||
DynamicObject user = BusinessDataServiceHelper.loadSingle("bos_user", new QFilter[]{new QFilter("name", QCP.equals, name)});
|
||||
Long uploadTime = (Long) map.get("uploadTime");
|
||||
Date date = new Date(uploadTime);
|
||||
String buttontype = ((HashMap) returnData).get("buttontype").toString();
|
||||
Object id = ((HashMap) returnData).get("id");
|
||||
DynamicObject tqq9_goodlotmanage = BusinessDataServiceHelper.loadSingle(id, "tqq9_goodlotmanage");
|
||||
if (StringUtils.equals("tqq9_lotchecktb", buttontype)) {
|
||||
tqq9_goodlotmanage.set("tqq9_lotcheck", url);//中台批次检测文件
|
||||
tqq9_goodlotmanage.set("tqq9_lotcheckdate", date);//批次检测报告操作时间
|
||||
tqq9_goodlotmanage.set("tqq9_lotcheckperson", user);//批次检测报表操作人
|
||||
SaveServiceHelper.save(new DynamicObject[]{tqq9_goodlotmanage});
|
||||
} else if (StringUtils.equals("tqq9_customchecktb", buttontype)) {
|
||||
tqq9_goodlotmanage.set("tqq9_customcheck", url);//中台报关单文件
|
||||
tqq9_goodlotmanage.set("tqq9_customcheckdate", date);//报关单操作时间
|
||||
tqq9_goodlotmanage.set("tqq9_customcheckperson", user);//报关单操作人
|
||||
SaveServiceHelper.save(new DynamicObject[]{tqq9_goodlotmanage});
|
||||
}
|
||||
getView().updateView();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 点击链接下载
|
||||
*/
|
||||
@Override
|
||||
public void billListHyperLinkClick(HyperLinkClickArgs args) {
|
||||
super.billListHyperLinkClick(args);
|
||||
String fieldName = args.getFieldName();
|
||||
args.setCancel(true);
|
||||
if (StringUtils.equals("tqq9_lotcheck", fieldName) || StringUtils.equals("tqq9_customcheck", fieldName)) {
|
||||
ListSelectedRowCollection selectedRows = ((IListView) this.getView()).getSelectedRows();
|
||||
Object id = selectedRows.getPrimaryKeyValues()[0];
|
||||
DynamicObject tqq9_goodlotmanage = BusinessDataServiceHelper.loadSingle(id, "tqq9_goodlotmanage");
|
||||
String url = tqq9_goodlotmanage.getString(fieldName);
|
||||
if (url != null) {
|
||||
this.getView().download(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -49,4 +49,6 @@ public class MaterialBillPlugin extends AbstractBillPlugIn {
|
|||
// this.getView().setVisible(true, "tqq9_bgyy","tqq9_bgyy2","tqq9_shbgyy","tqq9_bgms1","tqq9_bgms2","tqq9_bgms3");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,16 @@
|
|||
package tqq9.lc123.cloud.app.plugin.form.sys;
|
||||
|
||||
import kd.bos.bill.AbstractBillPlugIn;
|
||||
import kd.bos.form.control.Control;
|
||||
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.sdk.plugin.Plugin;
|
||||
|
||||
import java.util.EventObject;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
|
@ -16,22 +21,33 @@ public class upattAchmentBillPlugin extends AbstractBillPlugIn implements Plugin
|
|||
@Override
|
||||
public void registerListener(EventObject e) {
|
||||
super.registerListener(e);
|
||||
this.addClickListeners("btnok");
|
||||
this.addItemClickListeners("tqq9_toolbarap");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 由商品批次注册证管理界面跳转此界面,选择附件后回传相关信息
|
||||
*/
|
||||
@Override
|
||||
public void click(EventObject evt) {
|
||||
super.click(evt);
|
||||
Control control = (Control) evt.getSource();
|
||||
if ("btnok".equals(control.getKey())) {
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("tqq9_attachmentpanelap", this.getModel().getValue("tqq9_attachmentpanelap"));
|
||||
// data.put("query_project", this.getModel().getValue("rbkj_project"));
|
||||
// data.put("isContinue", true);
|
||||
this.getView().returnDataToParent(data);
|
||||
public void afterDoOperation(AfterDoOperationEventArgs afterDoOperationEventArgs) {
|
||||
super.afterDoOperation(afterDoOperationEventArgs);
|
||||
String itemKey = afterDoOperationEventArgs.getOperateKey();
|
||||
if (StringUtils.equals("donothing", 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();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -19,18 +19,20 @@ import java.math.BigDecimal;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 单据转换插件
|
||||
* 付款申请单转换规则插件
|
||||
*/
|
||||
public class PurApplySyncSupplierDeductPlugin extends AbstractConvertPlugIn implements Plugin {
|
||||
private final static Log logger = LogFactory.getLog(PurApplySyncSupplierDeductPlugin.class);
|
||||
private static String RECEIPTNOTICE = "ap_payapply";
|
||||
|
||||
/**
|
||||
* 付款申请单反写供应商可抵扣总额
|
||||
*/
|
||||
@Override
|
||||
public void afterConvert(AfterConvertEventArgs e) {
|
||||
super.afterConvert(e);
|
||||
ExtendedDataEntitySet targetExtDataEntitySet = e.getTargetExtDataEntitySet();
|
||||
ExtendedDataEntity[] extendedDataEntities = targetExtDataEntitySet.FindByEntityKey(RECEIPTNOTICE);
|
||||
// Map<String, String> variables = this.getOption().getVariables();
|
||||
for (ExtendedDataEntity extendedDataEntity : extendedDataEntities) {
|
||||
//付款申请单
|
||||
DynamicObject dataEntity = extendedDataEntity.getDataEntity();
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import java.math.BigDecimal;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 采购订单转换插件
|
||||
* 采购订单下推收获通知单转换插件
|
||||
* 退货补货数量修改
|
||||
*/
|
||||
public class PurOrderPushReceiptNoticePlugin extends AbstractConvertPlugIn implements Plugin {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,59 @@
|
|||
package tqq9.lc123.cloud.app.plugin.operate.pm;
|
||||
|
||||
import com.oracle.truffle.regex.tregex.string.StringUTF16;
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||
import kd.bos.dataentity.utils.StringUtils;
|
||||
import kd.bos.entity.ExtendedDataEntity;
|
||||
import kd.bos.entity.ExtendedDataEntitySet;
|
||||
import kd.bos.entity.botp.plugin.AbstractConvertPlugIn;
|
||||
import kd.bos.entity.botp.plugin.args.AfterConvertEventArgs;
|
||||
import kd.bos.logging.Log;
|
||||
import kd.bos.logging.LogFactory;
|
||||
import kd.bos.orm.query.QCP;
|
||||
import kd.bos.orm.query.QFilter;
|
||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
import kd.sdk.plugin.Plugin;
|
||||
import tqq9.lc123.cloud.app.plugin.operate.im.PurOrderPushReceiptNoticePlugin;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 采购订单下推采购建议报表转换插件
|
||||
*/
|
||||
public class PurRptPushPurOrderPlugin extends AbstractConvertPlugIn implements Plugin {
|
||||
private final static Log logger = LogFactory.getLog(PurRptPushPurOrderPlugin.class);
|
||||
private static String PURORDERBILL = "pm_purorderbill";//采购订单
|
||||
|
||||
@Override
|
||||
public void afterConvert(AfterConvertEventArgs e) {
|
||||
super.afterConvert(e);
|
||||
ExtendedDataEntitySet targetExtDataEntitySet = e.getTargetExtDataEntitySet();
|
||||
ExtendedDataEntity[] extendedDataEntities = targetExtDataEntitySet.FindByEntityKey(PURORDERBILL);
|
||||
Map<String, String> variables = this.getOption().getVariables();
|
||||
for (ExtendedDataEntity extendedDataEntity : extendedDataEntities) {
|
||||
//采购订单
|
||||
DynamicObject dataEntity = extendedDataEntity.getDataEntity();
|
||||
DynamicObjectCollection dynamicObjectCollection = dataEntity.getDynamicObjectCollection("billentry");
|
||||
for (DynamicObject dynamicObject : dynamicObjectCollection) {
|
||||
DynamicObject org = dataEntity.getDynamicObject("org");//采购组织
|
||||
String number = org.getString("number");
|
||||
DynamicObject materialpurchaseinfo = dynamicObject.getDynamicObject("material");//物料采购信息
|
||||
DynamicObject masterid = materialpurchaseinfo.getDynamicObject("masterid");//物料信息
|
||||
masterid = BusinessDataServiceHelper.loadSingle("bd_material", new QFilter[]{new QFilter("number", QCP.equals, masterid.getString("number"))});
|
||||
BigDecimal maxprice = BigDecimal.ZERO;
|
||||
if(StringUtils.equals("SHLC",number)){
|
||||
maxprice=masterid.getBigDecimal("tqq9_maxprice_sh");
|
||||
}else if(StringUtils.equals("BJLC",number)){
|
||||
maxprice=masterid.getBigDecimal("tqq9_maxprice_bj");
|
||||
}else if(StringUtils.equals("GZLC",number)){
|
||||
maxprice=masterid.getBigDecimal("tqq9_maxprice_gz");
|
||||
}
|
||||
dynamicObject.set("priceandtax",maxprice);
|
||||
dynamicObject.set("tqq9_zgcgxj",maxprice);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package tqq9.lc123.cloud.app.plugin.operate.sys;
|
||||
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
||||
import kd.bos.entity.plugin.args.AfterOperationArgs;
|
||||
import kd.bos.orm.query.QCP;
|
||||
import kd.bos.orm.query.QFilter;
|
||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
||||
import kd.sdk.plugin.Plugin;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 品牌审核时反写执行采购信息到对应品牌的物料信息学里
|
||||
*/
|
||||
public class BrandUpdatePlugin extends AbstractOperationServicePlugIn implements Plugin {
|
||||
|
||||
@Override
|
||||
public void afterExecuteOperationTransaction(AfterOperationArgs e) {
|
||||
super.afterExecuteOperationTransaction(e);
|
||||
for (DynamicObject dataEntity : e.getDataEntities()) {
|
||||
String number = dataEntity.getString("number");
|
||||
DynamicObject tqq9_brand = BusinessDataServiceHelper.loadSingle("tqq9_brand", "id,name,number,tqq9_shcg,tqq9_bjcg,tqq9_gzcg",new QFilter[]{new QFilter("number", QCP.equals, number)});
|
||||
DynamicObjectCollection tqq9_shcg = tqq9_brand.getDynamicObjectCollection("tqq9_shcg");
|
||||
DynamicObjectCollection tqq9_bjcg = tqq9_brand.getDynamicObjectCollection("tqq9_bjcg");
|
||||
DynamicObjectCollection tqq9_gzcg = tqq9_brand.getDynamicObjectCollection("tqq9_gzcg");
|
||||
DynamicObject[] bd_material = BusinessDataServiceHelper.load("bd_material", "id,name,number,tqq9_shcg,tqq9_bjcg,tqq9_gzcg", new QFilter[]{new QFilter("tqq9_brand.number", QCP.equals, number)});
|
||||
for (DynamicObject dynamicObject : bd_material) {
|
||||
DynamicObjectCollection tqq9_shcg1 = dynamicObject.getDynamicObjectCollection("tqq9_shcg");
|
||||
tqq9_shcg1.clear();
|
||||
for (int i = 0; i < tqq9_shcg.size(); i++) {
|
||||
DynamicObject shcg = tqq9_shcg.get(i);
|
||||
DynamicObject newbrand = new DynamicObject(tqq9_shcg1.getDynamicObjectType());
|
||||
newbrand.set("fbasedataid",shcg.getDynamicObject("fbasedataid"));
|
||||
tqq9_shcg1.add(newbrand);
|
||||
}
|
||||
DynamicObjectCollection tqq9_bjcg1 = dynamicObject.getDynamicObjectCollection("tqq9_bjcg");
|
||||
tqq9_bjcg1.clear();
|
||||
for (int i = 0; i < tqq9_bjcg.size(); i++) {
|
||||
DynamicObject bjcg = tqq9_bjcg.get(i);
|
||||
DynamicObject newbrand = new DynamicObject(tqq9_bjcg1.getDynamicObjectType());
|
||||
newbrand.set("fbasedataid",bjcg.getDynamicObject("fbasedataid"));
|
||||
tqq9_bjcg1.add(newbrand);
|
||||
}
|
||||
DynamicObjectCollection tqq9_gzcg1 = dynamicObject.getDynamicObjectCollection("tqq9_gzcg");
|
||||
tqq9_gzcg1.clear();
|
||||
for (int i = 0; i < tqq9_gzcg.size(); i++) {
|
||||
DynamicObject gzcg = tqq9_gzcg.get(i);
|
||||
DynamicObject newbrand = new DynamicObject(tqq9_gzcg1.getDynamicObjectType());
|
||||
newbrand.set("fbasedataid",gzcg.getDynamicObject("fbasedataid"));
|
||||
tqq9_gzcg1.add(newbrand);
|
||||
}
|
||||
dynamicObject.set("tqq9_shcg",tqq9_shcg1);
|
||||
dynamicObject.set("tqq9_bjcg",tqq9_bjcg1);
|
||||
dynamicObject.set("tqq9_gzcg",tqq9_gzcg1);
|
||||
}
|
||||
SaveServiceHelper.save(bd_material);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue