parent
ba63f77170
commit
fa80a2d684
|
@ -22,63 +22,6 @@ public class ContractProjectFormPlugin extends AbstractBillPlugIn {
|
|||
|
||||
private static final Log logger = LogFactory.getLog(ContractProjectFormPlugin.class);
|
||||
|
||||
@Override
|
||||
public void afterCreateNewData(EventObject e) {
|
||||
super.afterCreateNewData(e);
|
||||
|
||||
IFormView parentView = this.getView().getParentView();
|
||||
if (null != parentView) {
|
||||
parentView = parentView.getParentView();
|
||||
if (null != parentView) {
|
||||
IDataModel model = parentView.getModel();
|
||||
DynamicObject dataEntity = model.getDataEntity();
|
||||
IDataEntityType dataEntityType = dataEntity.getDataEntityType();
|
||||
String name = dataEntityType.getName();
|
||||
if ("rebm_decision".equals(name)) {
|
||||
DynamicObject org = (DynamicObject)this.getView().getModel().getValue("org");
|
||||
DynamicObject contractbill = this.getView().getModel().getDataEntity();
|
||||
contractbill = BusinessDataServiceHelper.loadSingle(contractbill.getPkValue(), "recon_contractbill");
|
||||
|
||||
if (null != org) {
|
||||
String qeugCombofield = org.getString("qeug_combofield");//业务体系
|
||||
contractbill.set("qeug_combofield",qeugCombofield);
|
||||
contractbill.set("partyatype","qeug_recon_developer");//甲方类别:财务组织
|
||||
org = BusinessDataServiceHelper.loadSingle(org.getPkValue(),"bos_org");
|
||||
DynamicObject qeug_recon_orgrelation = BusinessDataServiceHelper.loadSingle("qeug_recon_orgrelation",
|
||||
new QFilter[]{new QFilter("number", QCP.equals, org.getString("number"))});
|
||||
if (null != qeug_recon_orgrelation) {
|
||||
//行政与财务组织对应关系
|
||||
qeug_recon_orgrelation = BusinessDataServiceHelper.loadSingle(qeug_recon_orgrelation.getPkValue(),"qeug_recon_orgrelation");
|
||||
//甲方
|
||||
DynamicObject qeug_recon_developer = BusinessDataServiceHelper.loadSingle("qeug_recon_developer",
|
||||
new QFilter[]{new QFilter("number", QCP.equals, qeug_recon_orgrelation.getString("qeug_companynumber"))});
|
||||
if (null != qeug_recon_developer) {
|
||||
contractbill.set("multitypepartya",qeug_recon_developer);//甲方
|
||||
}
|
||||
}
|
||||
}
|
||||
DynamicObject bidproject = contractbill.getDynamicObject("bidproject");//定标名称
|
||||
if (null != bidproject) {
|
||||
DynamicObject bidmode = bidproject.getDynamicObject("bidmode");//采购方式
|
||||
if (null != bidmode) {
|
||||
logger.info("88");
|
||||
contractbill.set("qeug_bidmode",bidmode);
|
||||
}
|
||||
}
|
||||
contractbill.set("bd_taxrate",null);//税率
|
||||
SaveServiceHelper.save(new DynamicObject[]{contractbill});
|
||||
this.getView().invokeOperation("refresh");
|
||||
DynamicObject qeugBidmode = contractbill.getDynamicObject("qeug_bidmode");
|
||||
if (null == qeugBidmode) {
|
||||
logger.info("99");
|
||||
this.getView().updateView("qeug_bidmode");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterBindData(EventObject e) {
|
||||
super.afterBindData(e);
|
||||
|
@ -120,6 +63,7 @@ public class ContractProjectFormPlugin extends AbstractBillPlugIn {
|
|||
if (null != bidproject) {
|
||||
DynamicObject bidmode = bidproject.getDynamicObject("bidmode");//采购方式
|
||||
if (null != bidmode) {
|
||||
logger.info("88");
|
||||
contractbill.set("qeug_bidmode",bidmode);
|
||||
}
|
||||
}
|
||||
|
@ -128,6 +72,7 @@ public class ContractProjectFormPlugin extends AbstractBillPlugIn {
|
|||
|
||||
DynamicObject qeugBidmode = (DynamicObject)this.getView().getModel().getValue("qeug_bidmode");
|
||||
if (null == qeugBidmode) {
|
||||
logger.info("99");
|
||||
this.getView().invokeOperation("refresh");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue