Compare commits
No commits in common. "645588997ddd4c1d0f191a2468d71a3a55431416" and "6af80687911a00d3e29f51ce0473a150d6e6bd7c" have entirely different histories.
645588997d
...
6af8068791
|
|
@ -690,7 +690,7 @@ public class OutContractSettleEditPluginExt extends AbstractBillPlugIn implement
|
|||
}
|
||||
}
|
||||
|
||||
protected void contractChanged(ChangeData changeData) {
|
||||
/* protected void contractChanged(ChangeData changeData) {
|
||||
this.getModel().setValue("issettlebymatin", false);
|
||||
this.getModel().deleteEntryData("materialinentry");
|
||||
this.getModel().setValue("issettlebyreconc", false);
|
||||
|
|
@ -722,17 +722,53 @@ public class OutContractSettleEditPluginExt extends AbstractBillPlugIn implement
|
|||
|
||||
this.getView().setVisible(isPurchaseContract, new String[]{"issettlebymatin"});
|
||||
this.getView().setVisible(isPurchaseContract, new String[]{"issettlebyreconc"});
|
||||
/* boolean isLeaseContract = this.isLeaseType();
|
||||
this.getView().setVisible(isLeaseContract, new String[]{"iseqsettle"});*///二开注释掉的系统代码
|
||||
//二开添加逻辑↓
|
||||
DynamicObject contractType = contract.getDynamicObject("contracttype");//合同名称-合同类型
|
||||
QFilter[] qFilters = new QFilter[]{new QFilter("number", QCP.equals, contractType.get("number"))};
|
||||
DynamicObject ec_conttype = BusinessDataServiceHelper.loadSingle("ec_conttype", "contattr", qFilters);//合同类型
|
||||
DynamicObject contattr = ec_conttype.getDynamicObject("contattr");//合同属性
|
||||
this.getView().setVisible(contattr != null && contattr.getString("number").equals("sbwbl"), "iseqsettle");//按设备费用结算单结算隐显
|
||||
//二开添加逻辑↑
|
||||
boolean isLeaseContract = this.isLeaseType();
|
||||
this.getView().setVisible(isLeaseContract, new String[]{"iseqsettle"});
|
||||
}
|
||||
}*///系统代码
|
||||
protected void contractChanged(ChangeData changeData) {
|
||||
this.getModel().setValue("issettlebymatin", false);
|
||||
this.getModel().deleteEntryData("materialinentry");
|
||||
this.getModel().setValue("issettlebyreconc", false);
|
||||
this.getModel().deleteEntryData("reconcentry");
|
||||
Object value = this.getModel().getValue("contattr");//合同属性
|
||||
if (value != null) {
|
||||
DynamicObject contAttr = (DynamicObject) value;
|
||||
String numebr = contAttr.getString("number");
|
||||
if (!numebr.equals("sbwbl")) {
|
||||
this.getModel().setValue("iseqsettle", false);
|
||||
}
|
||||
}
|
||||
this.getModel().deleteEntryData("eqsettleentry");
|
||||
DynamicObject contract = (DynamicObject) changeData.getNewValue();
|
||||
if (contract == null) {
|
||||
this.getView().setVisible(false, new String[]{"issettlebymatin"});
|
||||
this.getView().setVisible(false, new String[]{"issettlebyreconc"});
|
||||
this.getView().setVisible(false, new String[]{"iseqsettle"});
|
||||
} else {
|
||||
DynamicObject project = contract.getDynamicObject("project");
|
||||
if (project == null) {
|
||||
this.getView().setEnable(false, new String[]{"project"});
|
||||
}
|
||||
|
||||
boolean isPurchaseContract = this.isPurchaseType();
|
||||
if (isPurchaseContract) {
|
||||
String contractSettle = contract.getString("settlemethod");
|
||||
if (StringUtils.equals(contractSettle, "B")) {
|
||||
this.getModel().setValue("issettlebymatin", true);
|
||||
this.getModel().setValue("issettlebyreconc", false);
|
||||
} else if (StringUtils.equals(contractSettle, "A")) {
|
||||
this.getModel().setValue("issettlebymatin", false);
|
||||
this.getModel().setValue("issettlebyreconc", true);
|
||||
}
|
||||
}
|
||||
|
||||
this.getView().setVisible(isPurchaseContract, new String[]{"issettlebymatin"});
|
||||
this.getView().setVisible(isPurchaseContract, new String[]{"issettlebyreconc"});
|
||||
boolean isLeaseContract = this.isLeaseType();
|
||||
this.getView().setVisible(isLeaseContract, new String[]{"iseqsettle"});
|
||||
}
|
||||
}//二开替换
|
||||
|
||||
|
||||
protected void itemUnitProjectChanged(ChangeData changeData) {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import kd.bos.entity.validate.AbstractValidator;
|
|||
import kd.bos.orm.query.QCP;
|
||||
import kd.bos.orm.query.QFilter;
|
||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
import kd.bos.servicehelper.QueryServiceHelper;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
|
@ -29,7 +28,6 @@ public class MaterialInBillDateSubValidatorOp extends AbstractOperationServicePl
|
|||
e.getFieldKeys().add("zcgj_entryentity");//合同进项发票信息
|
||||
e.getFieldKeys().add("zcgj_invoice");//发票号码
|
||||
e.getFieldKeys().add("zcgj_purchaseapply");//采购申请
|
||||
e.getFieldKeys().add("fiaccountorg");//财务记账组织
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -47,12 +45,6 @@ public class MaterialInBillDateSubValidatorOp extends AbstractOperationServicePl
|
|||
String matinsource = ecma_MaterialInBill.getString("matinsource");//入库来源
|
||||
if ("6".equals(matinsource)) {
|
||||
//入库来源为采购申请
|
||||
DynamicObject fiaccountorg = ecma_MaterialInBill.getDynamicObject("fiaccountorg");//财务记账组织
|
||||
if (fiaccountorg != null) {
|
||||
QFilter filter = new QFilter("zcgj_companyblentry.zcgj_org.id", QCP.equals, fiaccountorg.getPkValue());
|
||||
filter.and(new QFilter("zcgj_checkreqdate", QCP.equals, true));
|
||||
DynamicObject zcgj_companybelong = QueryServiceHelper.queryOne("zcgj_companybelong", "id", new QFilter[]{filter});
|
||||
if (zcgj_companybelong != null) {
|
||||
boolean zcgj_ispurchaseapplys = ecma_MaterialInBill.getBoolean("zcgj_ispurchaseapplys");//多采购申请
|
||||
if (zcgj_ispurchaseapplys) {
|
||||
DynamicObjectCollection zcgj_purchaseapplyentryCollection = ecma_MaterialInBill.getDynamicObjectCollection("zcgj_purchaseapplyentry");//采购申请分录
|
||||
|
|
@ -117,6 +109,4 @@ public class MaterialInBillDateSubValidatorOp extends AbstractOperationServicePl
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,17 +74,6 @@ public class InContractSettleFiConfirmWorkFlowPlugin implements IWorkflowPlugin
|
|||
inFinaceconfirm.set("zcgj_amount_all",amountAll);
|
||||
inFinaceconfirm.set("zcgj_taxamt_all",taxamtAll);
|
||||
|
||||
DynamicObjectCollection meteringSummaryCollection1 = inContractSettle.getDynamicObjectCollection("zcgj_metering_summary");//结算单-计量汇总
|
||||
DynamicObjectCollection meteringSummaryCollection2 = inFinaceconfirm.getDynamicObjectCollection("zcgj_metering_summary");//财务确认单-计量汇总
|
||||
meteringSummaryCollection2.clear();
|
||||
for (DynamicObject meteringSummary1 : meteringSummaryCollection1){
|
||||
DynamicObject newMeteringSummary = meteringSummaryCollection2.addNew();
|
||||
newMeteringSummary.set("zcgj_rateval",meteringSummary1.getBigDecimal("zcgj_rateval"));//税率(%)
|
||||
newMeteringSummary.set("zcgj_pa_amount",meteringSummary1.getBigDecimal("zcgj_pa_amount"));//含税金额
|
||||
newMeteringSummary.set("zcgj_amountnotax",meteringSummary1.getBigDecimal("zcgj_amountnotax"));//不含税金额
|
||||
newMeteringSummary.set("zcgj_taxamt1",meteringSummary1.getBigDecimal("zcgj_taxamt"));//税额
|
||||
}
|
||||
|
||||
SaveServiceHelper.saveOperate("zcgj_ec_in_finaceconfirm", new DynamicObject[]{inFinaceconfirm}, null);//支出合同实体
|
||||
|
||||
//生成支出财务确认单 end
|
||||
|
|
|
|||
|
|
@ -75,17 +75,6 @@ public class InContractSettleInvalidWorkFlowPlugin implements IWorkflowPlugin {
|
|||
inFinaceconfirm.set("zcgj_amount_all",amountAll);
|
||||
inFinaceconfirm.set("zcgj_taxamt_all",taxamtAll);
|
||||
|
||||
DynamicObjectCollection meteringSummaryCollection1 = inContractSettle.getDynamicObjectCollection("zcgj_metering_summary");//收入合同结算单-计量汇总
|
||||
DynamicObjectCollection meteringSummaryCollection2 = inFinaceconfirm.getDynamicObjectCollection("zcgj_metering_summary");//收入财务确认单-计量汇总
|
||||
meteringSummaryCollection2.clear();
|
||||
for (DynamicObject meteringSummary1 : meteringSummaryCollection1){
|
||||
DynamicObject newMeteringSummary = meteringSummaryCollection2.addNew();
|
||||
newMeteringSummary.set("zcgj_rateval",meteringSummary1.getBigDecimal("zcgj_rateval"));//税率(%)
|
||||
newMeteringSummary.set("zcgj_pa_amount",meteringSummary1.getBigDecimal("zcgj_pa_amount"));//含税金额
|
||||
newMeteringSummary.set("zcgj_amountnotax",meteringSummary1.getBigDecimal("zcgj_amountnotax"));//不含税金额
|
||||
newMeteringSummary.set("zcgj_taxamt1",meteringSummary1.getBigDecimal("zcgj_taxamt"));//税额
|
||||
}
|
||||
|
||||
OperationResult ecInFinaceconfirm = SaveServiceHelper.saveOperate("zcgj_ec_in_finaceconfirm", new DynamicObject[]{inFinaceconfirm}, null);//支出合同实体
|
||||
if(ecInFinaceconfirm.isSuccess()){
|
||||
String sourceBillId = inContractSettle.getString("zcgj_invalidbillid");
|
||||
|
|
|
|||
Loading…
Reference in New Issue