parent
8b0596eb87
commit
eebd9c6b40
|
@ -15,9 +15,12 @@ import kd.bos.servicehelper.BusinessDataServiceHelper;
|
|||
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
||||
import shkd.repc.rebm.formplugin.ImportPurchaseApplyBillPlugin;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.EventObject;
|
||||
import java.util.List;
|
||||
|
||||
import static org.apache.fop.fonts.type1.AdobeStandardEncoding.n;
|
||||
|
||||
public class ContractProjectFormPlugin extends AbstractBillPlugIn {
|
||||
|
||||
private static final Log logger = LogFactory.getLog(ContractProjectFormPlugin.class);
|
||||
|
@ -27,57 +30,44 @@ public class ContractProjectFormPlugin extends AbstractBillPlugIn {
|
|||
super.afterBindData(e);
|
||||
//根据组织携带项目
|
||||
updateRenovationProject();
|
||||
//转换规则
|
||||
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});
|
||||
DynamicObject org = (DynamicObject)this.getView().getModel().getValue("org");
|
||||
DynamicObject contractbill = this.getView().getModel().getDataEntity();
|
||||
|
||||
DynamicObject qeugBidmode = (DynamicObject)this.getView().getModel().getValue("qeug_bidmode");
|
||||
if (null == qeugBidmode) {
|
||||
logger.info("99");
|
||||
this.getView().invokeOperation("refresh");
|
||||
}
|
||||
if (null != org) {
|
||||
String qeugCombofield = org.getString("qeug_combofield");//业务体系
|
||||
this.getView().getModel().setValue("qeug_combofield",qeugCombofield);
|
||||
|
||||
this.getView().getModel().setValue("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) {
|
||||
this.getView().getModel().setValue("multitypepartya",qeug_recon_developer);//甲方
|
||||
}
|
||||
}
|
||||
}
|
||||
DynamicObject bidproject = (DynamicObject)this.getView().getModel().getValue("bidproject");//定标名称
|
||||
if (null != bidproject) {
|
||||
DynamicObject bidmode = bidproject.getDynamicObject("bidmode");//采购方式
|
||||
if (null != bidmode) {
|
||||
logger.info("88");
|
||||
this.getView().getModel().setValue("qeug_bidmode",bidmode);
|
||||
}
|
||||
}
|
||||
// DynamicObject bdTaxrate =(DynamicObject) this.getView().getModel().getValue("bd_taxrate");//税率
|
||||
// if (null == bdTaxrate) {
|
||||
// this.getView().getModel().setValue("bd_taxrate",null);//税率
|
||||
// this.getView().getModel().setValue("taxrate", BigDecimal.ZERO);//税率(%)
|
||||
// this.getView().getModel().setValue("tax",BigDecimal.ZERO);//税额
|
||||
//// this.getView().getModel().setValue("notaxamt",null);//不含税金额
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ import java.util.Map;
|
|||
*/
|
||||
public class closeTaskPagePlugin implements IApprovalSubPlugin {
|
||||
private static final Log logger = LogFactory.getLog(closeTaskPagePlugin.class);
|
||||
|
||||
@Override
|
||||
public boolean executeClosePageAfterSubmitTask(boolean isPCShow, Map<String, Object> customParams) {
|
||||
logger.info("进入页面关闭方法");
|
||||
|
@ -26,20 +27,21 @@ public class closeTaskPagePlugin implements IApprovalSubPlugin {
|
|||
if (parameter.getCustomParams().containsKey("apptype")) {
|
||||
String apptype = parameter.getCustomParam("apptype");
|
||||
if ("zhiyuan".equals(apptype)) {
|
||||
if (isPCShow){
|
||||
try {
|
||||
view.close();
|
||||
}catch (Exception e) {
|
||||
logger.info("发送指令时异常" + e.getMessage());
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
flag = true;
|
||||
}else {
|
||||
HashMap<String,Object> map = new HashMap<>();
|
||||
if (isPCShow) {
|
||||
try {
|
||||
view.close();
|
||||
} catch (Exception e) {
|
||||
logger.info("发送指令时异常" + e.getMessage());
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
flag = true;
|
||||
} else {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("method", "closeWebView");
|
||||
String mapString = JSON.toJSONString(map);
|
||||
logger.info("准备发送指令" + mapString);
|
||||
view.executeClientCommand("callAPPApi", map);
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue