Compare commits
3 Commits
6409208f48
...
88908f67b6
Author | SHA1 | Date |
---|---|---|
|
88908f67b6 | |
|
86890397bc | |
|
3fb0022904 |
|
@ -40,7 +40,7 @@ import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 入库单发票导入插件+事物类型默认为空+是否主材隐显
|
* 入库单发票导入插件+ 事物类型默认为空(废弃+是否主材隐显(废弃
|
||||||
*/
|
*/
|
||||||
public class MaterialInbFinaceConfirmeInvoicePlugin extends AbstractBillPlugIn implements Plugin {
|
public class MaterialInbFinaceConfirmeInvoicePlugin extends AbstractBillPlugIn implements Plugin {
|
||||||
private static final Log log = LogFactory.getLog(MaterialInbFinaceConfirmeInvoicePlugin.class);
|
private static final Log log = LogFactory.getLog(MaterialInbFinaceConfirmeInvoicePlugin.class);
|
||||||
|
@ -48,7 +48,7 @@ public class MaterialInbFinaceConfirmeInvoicePlugin extends AbstractBillPlugIn i
|
||||||
@Override
|
@Override
|
||||||
public void afterCreateNewData(EventObject e) {
|
public void afterCreateNewData(EventObject e) {
|
||||||
super.afterCreateNewData(e);
|
super.afterCreateNewData(e);
|
||||||
this.getModel().setValue("transtype", null);//事务类型默认为空
|
// this.getModel().setValue("transtype", null);//事务类型默认为空
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -57,20 +57,20 @@ public class MaterialInbFinaceConfirmeInvoicePlugin extends AbstractBillPlugIn i
|
||||||
String key = e.getProperty().getName();
|
String key = e.getProperty().getName();
|
||||||
if (key.equals("transtype")) {
|
if (key.equals("transtype")) {
|
||||||
//事务类型
|
//事务类型
|
||||||
ChangeData[] changeSet = e.getChangeSet();
|
// ChangeData[] changeSet = e.getChangeSet();
|
||||||
ChangeData changeData = changeSet[0];
|
// ChangeData changeData = changeSet[0];
|
||||||
DynamicObject transtype = (DynamicObject) changeData.getNewValue();//新值
|
// DynamicObject transtype = (DynamicObject) changeData.getNewValue();//新值
|
||||||
if (transtype != null) {
|
// if (transtype != null) {
|
||||||
String number = transtype.getString("number");
|
// String number = transtype.getString("number");
|
||||||
if (number.equals("jrjc")) {
|
// if (number.equals("jrjc")) {
|
||||||
//事务类型为即入即出时隐藏是否主材
|
// //事务类型为即入即出时隐藏是否主材
|
||||||
this.getView().setVisible(false, "ismainmaterial");//是否主材
|
// this.getView().setVisible(false, "ismainmaterial");//是否主材
|
||||||
} else {
|
// } else {
|
||||||
this.getView().setVisible(true, "ismainmaterial");//是否主材
|
// this.getView().setVisible(true, "ismainmaterial");//是否主材
|
||||||
}
|
// }
|
||||||
} else {
|
// } else {
|
||||||
this.getView().setVisible(true, "ismainmaterial");//是否主材
|
// this.getView().setVisible(true, "ismainmaterial");//是否主材
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ public class MaterialInbPurchaseApplyPlugin extends AbstractBillPlugIn implement
|
||||||
long zcgj_bigintfield = returnData.getLong("zcgj_bigintfield");//采购申请单id
|
long zcgj_bigintfield = returnData.getLong("zcgj_bigintfield");//采购申请单id
|
||||||
QFilter filter = new QFilter("purchaseentry.id", QCP.equals, zcgj_bigintfield);
|
QFilter filter = new QFilter("purchaseentry.id", QCP.equals, zcgj_bigintfield);
|
||||||
DynamicObjectCollection purchaseApply = QueryServiceHelper.query("ecma_purchaseapply",
|
DynamicObjectCollection purchaseApply = QueryServiceHelper.query("ecma_purchaseapply",
|
||||||
"purchaseentry,purchaseentry.material,purchaseentry.purchaseqty,purchaseentry.entrytaxrate,purchaseentry.price,purchaseentry.id",
|
"purchaseentry,purchaseentry.material,purchaseentry.purchaseqty,purchaseentry.entrytaxrate,purchaseentry.price,purchaseentry.id,purchaseentry.remarks",
|
||||||
new QFilter[]{filter});//采购申请单
|
new QFilter[]{filter});//采购申请单
|
||||||
|
|
||||||
long material = purchaseApply.get(0).getLong("purchaseentry.material");//采购申请分录-资源编码
|
long material = purchaseApply.get(0).getLong("purchaseentry.material");//采购申请分录-资源编码
|
||||||
|
@ -111,11 +111,13 @@ public class MaterialInbPurchaseApplyPlugin extends AbstractBillPlugIn implement
|
||||||
Object entryTaxRate = purchaseApply.get(0).get("purchaseentry.entrytaxrate");//采购申请分录-税率
|
Object entryTaxRate = purchaseApply.get(0).get("purchaseentry.entrytaxrate");//采购申请分录-税率
|
||||||
Object price = purchaseApply.get(0).get("purchaseentry.price");//采购申请分录-预估单价
|
Object price = purchaseApply.get(0).get("purchaseentry.price");//采购申请分录-预估单价
|
||||||
Object purchaseEntryId = purchaseApply.get(0).get("purchaseentry.id");//采购申请分录-预估单价
|
Object purchaseEntryId = purchaseApply.get(0).get("purchaseentry.id");//采购申请分录-预估单价
|
||||||
|
Object remarks = purchaseApply.get(0).get("purchaseentry.remarks");//采购申请分录-备注
|
||||||
this.getModel().setValue("material", material, curIndex);//资源编码
|
this.getModel().setValue("material", material, curIndex);//资源编码
|
||||||
this.getModel().setValue("entrytaxrate", entryTaxRate, curIndex);//税率名称
|
this.getModel().setValue("entrytaxrate", entryTaxRate, curIndex);//税率名称
|
||||||
this.getModel().setValue("qty", purchaseQty, curIndex);//数量
|
this.getModel().setValue("qty", purchaseQty, curIndex);//数量
|
||||||
this.getModel().setValue("price", price, curIndex);//入库单价
|
this.getModel().setValue("price", price, curIndex);//入库单价
|
||||||
this.getModel().setValue("listingid", purchaseEntryId, curIndex);//合同清单id
|
this.getModel().setValue("listingid", purchaseEntryId, curIndex);//合同清单id
|
||||||
|
this.getModel().setValue("note", remarks, curIndex);//备注
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
package zcgj.zcdev.zcdev.pr.plugin.form;
|
||||||
|
|
||||||
|
import kd.bos.bill.AbstractBillPlugIn;
|
||||||
|
|
||||||
|
import java.util.EventObject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 采购申请单表单插件:初始默认采购组织等于所属组织
|
||||||
|
*/
|
||||||
|
public class PurchaseAppBillPlugin extends AbstractBillPlugIn {
|
||||||
|
@Override
|
||||||
|
public void afterCreateNewData(EventObject e) {
|
||||||
|
super.afterCreateNewData(e);
|
||||||
|
Object org = this.getModel().getValue("org");//所属组织
|
||||||
|
this.getModel().setValue("purchaseorg", org);//采购组织
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue