Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
3ad48aad48
|
@ -24,6 +24,8 @@ import kd.bos.org.utils.OrgTreeUtils;
|
||||||
import kd.bos.orm.query.QCP;
|
import kd.bos.orm.query.QCP;
|
||||||
import kd.bos.orm.query.QFilter;
|
import kd.bos.orm.query.QFilter;
|
||||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||||
|
import kd.bos.servicehelper.QueryServiceHelper;
|
||||||
|
import kd.bos.servicehelper.org.OrgUnitServiceHelper;
|
||||||
import kd.bos.servicehelper.user.UserServiceHelper;
|
import kd.bos.servicehelper.user.UserServiceHelper;
|
||||||
import kd.fi.er.business.bean.CostDeptF7ChangePram;
|
import kd.fi.er.business.bean.CostDeptF7ChangePram;
|
||||||
import kd.fi.er.business.servicehelper.CoreBaseBillServiceHelper;
|
import kd.fi.er.business.servicehelper.CoreBaseBillServiceHelper;
|
||||||
|
@ -52,6 +54,9 @@ public class PaymentApplicationPlugin extends AbstractBillPlugIn implements Atta
|
||||||
zcgj_org.addBeforeF7SelectListener(this);
|
zcgj_org.addBeforeF7SelectListener(this);
|
||||||
AttachmentPanel panel = getControl("attachmentpanel");//附件
|
AttachmentPanel panel = getControl("attachmentpanel");//附件
|
||||||
panel.addOperaClickListener(this);
|
panel.addOperaClickListener(this);
|
||||||
|
|
||||||
|
BasedataEdit zcgj_costcompany = this.getView().getControl("zcgj_costcompany");//费用承担公司
|
||||||
|
zcgj_costcompany.addBeforeF7SelectListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -138,6 +143,16 @@ public class PaymentApplicationPlugin extends AbstractBillPlugIn implements Atta
|
||||||
formShowParameter.setCustomParam("isIncludeAllSub", "true");
|
formShowParameter.setCustomParam("isIncludeAllSub", "true");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}else if("zcgj_costcompany".equals(propertyName)){ //费用承担公司过滤
|
||||||
|
DynamicObject zcgjDepartment = (DynamicObject) this.getModel().getValue("zcgj_department");
|
||||||
|
if (zcgjDepartment != null) {
|
||||||
|
List<Long> id = findCostCompanysByCostDept(zcgjDepartment.getLong("id"));
|
||||||
|
if(id!=null && !id.isEmpty()){
|
||||||
|
List<QFilter> qFilter = new ArrayList<>();
|
||||||
|
qFilter.add(new QFilter("id", QCP.in, id));
|
||||||
|
formShowParameter.getListFilterParameter().setQFilters(qFilter);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -247,4 +262,36 @@ public class PaymentApplicationPlugin extends AbstractBillPlugIn implements Atta
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static List<Long> findCostCompanysByCostDept(Long deptID) {
|
||||||
|
ArrayList<Long> deptIDs = new ArrayList();
|
||||||
|
deptIDs.add(deptID);
|
||||||
|
List<Long> selectIds = OrgUnitServiceHelper.getAdminOrgRelation(deptIDs, false);
|
||||||
|
QFilter treeTypeFilter = new QFilter("view.treetype", "=", "10");
|
||||||
|
QFilter isDefaultViewFilter = new QFilter("view.isdefault", "=", Boolean.TRUE);
|
||||||
|
QFilter isbizunitFilter = new QFilter("isbizunit", "=", Boolean.TRUE);
|
||||||
|
QFilter orgFilter = null;
|
||||||
|
QFilter[] filters = null;
|
||||||
|
DynamicObject orgInfo = null;
|
||||||
|
Long costCompany = null;
|
||||||
|
|
||||||
|
List parents;
|
||||||
|
for(String orgFunction = "01"; costCompany == null; deptID = (Long)parents.get(0)) {
|
||||||
|
orgFilter = new QFilter("org", "=", deptID);
|
||||||
|
filters = new QFilter[]{treeTypeFilter, isDefaultViewFilter, orgFilter, isbizunitFilter};
|
||||||
|
orgInfo = QueryServiceHelper.queryOne("bos_org_structure", "org", filters);
|
||||||
|
if (orgInfo != null) {
|
||||||
|
costCompany = ErCommonUtils.getPk(orgInfo.get("org"));
|
||||||
|
selectIds.add(costCompany);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
parents = OrgUnitServiceHelper.getSuperiorOrgs(orgFunction, deptID);
|
||||||
|
if (parents == null || parents.isEmpty()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return selectIds;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,25 +5,37 @@ import kd.bos.bill.BillShowParameter;
|
||||||
import kd.bos.bill.OperationStatus;
|
import kd.bos.bill.OperationStatus;
|
||||||
import kd.bos.dataentity.entity.DynamicObject;
|
import kd.bos.dataentity.entity.DynamicObject;
|
||||||
import kd.bos.dataentity.entity.LocaleString;
|
import kd.bos.dataentity.entity.LocaleString;
|
||||||
|
import kd.bos.dataentity.metadata.IDataEntityProperty;
|
||||||
import kd.bos.dataentity.resource.ResManager;
|
import kd.bos.dataentity.resource.ResManager;
|
||||||
import kd.bos.entity.datamodel.IDataModel;
|
import kd.bos.entity.datamodel.IDataModel;
|
||||||
|
import kd.bos.entity.datamodel.events.ChangeData;
|
||||||
|
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
|
||||||
import kd.bos.form.FormShowParameter;
|
import kd.bos.form.FormShowParameter;
|
||||||
|
import kd.bos.form.control.AttachmentPanel;
|
||||||
import kd.bos.form.events.AfterDoOperationEventArgs;
|
import kd.bos.form.events.AfterDoOperationEventArgs;
|
||||||
import kd.bos.form.events.PreOpenFormEventArgs;
|
import kd.bos.form.events.PreOpenFormEventArgs;
|
||||||
import kd.bos.form.events.SetFilterEvent;
|
import kd.bos.form.events.SetFilterEvent;
|
||||||
|
import kd.bos.form.field.BasedataEdit;
|
||||||
|
import kd.bos.form.field.RefBillEdit;
|
||||||
|
import kd.bos.form.field.events.BeforeF7SelectEvent;
|
||||||
|
import kd.bos.form.field.events.BeforeF7SelectListener;
|
||||||
import kd.bos.form.operate.FormOperate;
|
import kd.bos.form.operate.FormOperate;
|
||||||
import kd.bos.list.ListShowParameter;
|
import kd.bos.list.ListShowParameter;
|
||||||
import kd.bos.list.plugin.AbstractListPlugin;
|
import kd.bos.list.plugin.AbstractListPlugin;
|
||||||
|
import kd.bos.orm.query.QCP;
|
||||||
import kd.bos.orm.query.QFilter;
|
import kd.bos.orm.query.QFilter;
|
||||||
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||||
import kd.bos.servicehelper.QueryServiceHelper;
|
import kd.bos.servicehelper.QueryServiceHelper;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.EventObject;
|
import java.util.EventObject;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 对公报销单无合同列表插件
|
* 对公报销单无合同列表插件
|
||||||
*/
|
*/
|
||||||
public class PublicreimbursebillNoContractPlugin extends AbstractBillPlugIn {
|
public class PublicreimbursebillNoContractPlugin extends AbstractBillPlugIn implements BeforeF7SelectListener {
|
||||||
|
|
||||||
private static boolean editTitle = false;
|
private static boolean editTitle = false;
|
||||||
|
|
||||||
|
@ -50,6 +62,21 @@ public class PublicreimbursebillNoContractPlugin extends AbstractBillPlugIn {
|
||||||
if(isec){
|
if(isec){
|
||||||
this.getView().setFormTitle(new LocaleString("无合同付款申请单"));
|
this.getView().setFormTitle(new LocaleString("无合同付款申请单"));
|
||||||
}
|
}
|
||||||
|
BillShowParameter bsp=(BillShowParameter)this.getView().getFormShowParameter();
|
||||||
|
if(bsp.getStatus()!=OperationStatus.ADDNEW){
|
||||||
|
if(isec){
|
||||||
|
DynamicObject costcompany = (DynamicObject) this.getModel().getValue("costcompany");
|
||||||
|
if(costcompany!=null){
|
||||||
|
long id = costcompany.getLong("id");
|
||||||
|
QFilter numberFilter = new QFilter("fiaccountorg", QCP.equals,id);
|
||||||
|
DynamicObject[] project = BusinessDataServiceHelper.load("ec_project", "number,name", new QFilter[]{numberFilter});
|
||||||
|
if(project != null && project.length==1){
|
||||||
|
long projectId = project[0].getLong("id");
|
||||||
|
this.getModel().setValue("zcgj_ec_project", project[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -77,4 +104,80 @@ public class PublicreimbursebillNoContractPlugin extends AbstractBillPlugIn {
|
||||||
billShowParameter.setCaption(ResManager.loadKDString("无合同付款申请单", "PublicReimAssetBillEdit_1", "fi-er-formplugin", new Object[0]));
|
billShowParameter.setCaption(ResManager.loadKDString("无合同付款申请单", "PublicReimAssetBillEdit_1", "fi-er-formplugin", new Object[0]));
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void propertyChanged(PropertyChangedArgs e) {
|
||||||
|
super.propertyChanged(e);
|
||||||
|
String name = e.getProperty().getName();
|
||||||
|
boolean isec=(boolean)this.getModel().getValue("zcgj_isec");
|
||||||
|
if(isec){
|
||||||
|
if(name.equals("costcompany")){
|
||||||
|
ChangeData changeData = e.getChangeSet()[0];
|
||||||
|
DynamicObject costcompany = (DynamicObject)changeData.getNewValue();
|
||||||
|
if(costcompany!=null){
|
||||||
|
long id = costcompany.getLong("id");
|
||||||
|
QFilter numberFilter = new QFilter("fiaccountorg", QCP.equals,id);
|
||||||
|
DynamicObject[] project = BusinessDataServiceHelper.load("ec_project", "number,name", new QFilter[]{numberFilter});
|
||||||
|
if(project != null && project.length==1){
|
||||||
|
long projectId = project[0].getLong("id");
|
||||||
|
this.getModel().setValue("zcgj_ec_project", project[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void registerListener(EventObject e) {
|
||||||
|
super.registerListener(e);
|
||||||
|
boolean isec=(boolean)this.getModel().getValue("zcgj_isec");
|
||||||
|
if(isec){
|
||||||
|
RefBillEdit zcgj_materialinbill = this.getView().getControl("zcgj_materialinbill");//入库单
|
||||||
|
zcgj_materialinbill.addBeforeF7SelectListener(this);
|
||||||
|
|
||||||
|
RefBillEdit zcgj_maintenanceack = this.getView().getControl("zcgj_maintenanceack");//设备维修确认单
|
||||||
|
zcgj_maintenanceack.addBeforeF7SelectListener(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void beforeF7Select(BeforeF7SelectEvent beforeF7SelectEvent) {
|
||||||
|
ListShowParameter formShowParameter = (ListShowParameter) beforeF7SelectEvent.getFormShowParameter();
|
||||||
|
IDataEntityProperty property = beforeF7SelectEvent.getProperty();//过滤字段信息
|
||||||
|
String propertyName = property.getName();//过滤字段标识
|
||||||
|
|
||||||
|
if("zcgj_materialinbill".equals(propertyName)){ //费用承担公司过滤
|
||||||
|
DynamicObject billpayerid = (DynamicObject)this.getModel().getValue("billpayerid");
|
||||||
|
DynamicObject costcompany = (DynamicObject)this.getModel().getValue("costcompany");
|
||||||
|
if(billpayerid!=null && costcompany!=null){
|
||||||
|
Long payerid = billpayerid.getLong("id");
|
||||||
|
Long companyId = costcompany.getLong("id");
|
||||||
|
List<QFilter> qFilter = new ArrayList<>();
|
||||||
|
qFilter.add(new QFilter("supplier", QCP.equals, payerid));
|
||||||
|
qFilter.add(new QFilter("fiaccountorg", QCP.equals, companyId));
|
||||||
|
qFilter.add(new QFilter("billstatus", QCP.equals, "C"));
|
||||||
|
formShowParameter.getListFilterParameter().setQFilters(qFilter);
|
||||||
|
}else{
|
||||||
|
this.getView().showTipNotification("费用承担公司或往来单位不能为空");
|
||||||
|
beforeF7SelectEvent.setCancel(true);
|
||||||
|
}
|
||||||
|
}else if("zcgj_maintenanceack".equals(propertyName)){
|
||||||
|
DynamicObject billpayerid = (DynamicObject)this.getModel().getValue("billpayerid");
|
||||||
|
DynamicObject costcompany = (DynamicObject)this.getModel().getValue("costcompany");
|
||||||
|
if(billpayerid!=null && costcompany!=null){
|
||||||
|
Long payerid = billpayerid.getLong("id");
|
||||||
|
Long companyId = costcompany.getLong("id");
|
||||||
|
List<QFilter> qFilter = new ArrayList<>();
|
||||||
|
qFilter.add(new QFilter("entryentity.zcgj_supplier", QCP.equals, payerid));
|
||||||
|
qFilter.add(new QFilter("zcgj_accountorg", QCP.equals, companyId));
|
||||||
|
qFilter.add(new QFilter("zcgj_maintype", QCP.equals, "10"));
|
||||||
|
qFilter.add(new QFilter("billstatus", QCP.equals, "C"));
|
||||||
|
formShowParameter.getListFilterParameter().setQFilters(qFilter);
|
||||||
|
}else{
|
||||||
|
this.getView().showTipNotification("费用承担公司或往来单位不能为空");
|
||||||
|
beforeF7SelectEvent.setCancel(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,18 @@
|
||||||
package zcgj.zcdev.zcdev.fs.plugin.form;
|
package zcgj.zcdev.zcdev.fs.plugin.form;
|
||||||
|
|
||||||
|
import kd.bos.bill.OperationStatus;
|
||||||
import kd.bos.dataentity.OperateOption;
|
import kd.bos.dataentity.OperateOption;
|
||||||
import kd.bos.dataentity.entity.DynamicObject;
|
import kd.bos.dataentity.entity.DynamicObject;
|
||||||
import kd.bos.dataentity.resource.ResManager;
|
import kd.bos.dataentity.resource.ResManager;
|
||||||
import kd.bos.entity.EntityMetadataCache;
|
import kd.bos.entity.EntityMetadataCache;
|
||||||
|
import kd.bos.entity.cache.AppCache;
|
||||||
|
import kd.bos.entity.cache.IAppCache;
|
||||||
import kd.bos.entity.datamodel.ListSelectedRow;
|
import kd.bos.entity.datamodel.ListSelectedRow;
|
||||||
import kd.bos.entity.datamodel.ListSelectedRowCollection;
|
import kd.bos.entity.datamodel.ListSelectedRowCollection;
|
||||||
import kd.bos.entity.operate.result.IOperateInfo;
|
import kd.bos.entity.operate.result.IOperateInfo;
|
||||||
import kd.bos.entity.operate.result.OperationResult;
|
import kd.bos.entity.operate.result.OperationResult;
|
||||||
|
import kd.bos.form.FormShowParameter;
|
||||||
|
import kd.bos.form.IFormView;
|
||||||
import kd.bos.form.ShowType;
|
import kd.bos.form.ShowType;
|
||||||
import kd.bos.form.control.events.ItemClickEvent;
|
import kd.bos.form.control.events.ItemClickEvent;
|
||||||
import kd.bos.list.BillList;
|
import kd.bos.list.BillList;
|
||||||
|
@ -22,6 +27,8 @@ import kd.ssc.task.formplugin.util.VoucherUtil;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
import static kd.bamp.mbis.webapi.constant.apiconstant.CardActionApiConstant.billid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 共享任务中心-我的任务-批量生成凭证插件
|
* 共享任务中心-我的任务-批量生成凭证插件
|
||||||
*/
|
*/
|
||||||
|
@ -38,6 +45,55 @@ public class TaskListBuildVoucherPlugin extends AbstractListPlugin implements Pl
|
||||||
handleBuildVoucher();
|
handleBuildVoucher();
|
||||||
} else if ("zcgj_deletevoucher".equals(itemKey)) {
|
} else if ("zcgj_deletevoucher".equals(itemKey)) {
|
||||||
handleDeleteVoucher();
|
handleDeleteVoucher();
|
||||||
|
} else if("zcgj_tracevoucher".equals(itemKey)){ //联查凭证
|
||||||
|
BillList billList = this.getView().getControl(AbstractListPlugin.BILLLISTID);
|
||||||
|
ListSelectedRowCollection selectedRows = billList.getSelectedRows();
|
||||||
|
if(selectedRows!=null){
|
||||||
|
if(selectedRows.size()==1){
|
||||||
|
DynamicObject task = BusinessDataServiceHelper.loadSingle((Long) selectedRows.get(0).getPrimaryKeyValue(), "task_task");
|
||||||
|
String billId = task.getString("billid");
|
||||||
|
VoucherUtil.viewVoucher(billId, this.getView(), true);
|
||||||
|
}else{
|
||||||
|
this.getView().showTipNotification("请选择一条数据进行查看凭证。");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
this.getView().showTipNotification("请选择一条数据进行查看凭证。");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}else if("zcgj_previewvoucher".equals(itemKey)){ //凭证预览
|
||||||
|
Map<String, Object> voucherOperate = null;
|
||||||
|
OperateOption option = OperateOption.create();
|
||||||
|
IFormView view = this.getView();
|
||||||
|
OperationResult operationResult = null;
|
||||||
|
try {
|
||||||
|
BillList billList = this.getView().getControl(AbstractListPlugin.BILLLISTID);
|
||||||
|
ListSelectedRowCollection selectedRows = billList.getSelectedRows();
|
||||||
|
if(selectedRows.size()==1){
|
||||||
|
DynamicObject task = BusinessDataServiceHelper.loadSingle((Long) selectedRows.get(0).getPrimaryKeyValue(), "task_task");
|
||||||
|
String entityName = task.getDynamicObject("billtype").getDynamicObject("bindbill").getString("number");
|
||||||
|
String billId = task.getString("billid");
|
||||||
|
String billnumber = task.getString("billnumber");
|
||||||
|
voucherOperate = EntityMetadataCache.getDataEntityOperate(entityName, "previewvoucher");
|
||||||
|
option.setVariableValue("previewpageid", view.getPageId());
|
||||||
|
operationResult = OperationServiceHelper.executeOperate((String)voucherOperate.get("key"), entityName, new Object[]{billId}, option);
|
||||||
|
if (operationResult.isSuccess()) {
|
||||||
|
this.showPreVoucher(view);
|
||||||
|
} else {
|
||||||
|
List<IOperateInfo> allErrorInfo = operationResult.getAllErrorOrValidateInfo();
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
allErrorInfo.forEach((error) -> sb.append(error.getMessage()));
|
||||||
|
view.showTipNotification(sb.toString());
|
||||||
|
log.info("预览凭证失败,单据id:" + billId + ",失败原因:" + sb);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
this.getView().showTipNotification("请选择一条数据进行预览凭证。");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception e1) {
|
||||||
|
view.showErrorNotification(String.format(ResManager.loadKDString("预览凭证失败: %s", "TaskVoucherApproveFormPlugin_0", "ssc-task-formplugin", new Object[0]), e1.getMessage()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,7 +223,28 @@ public class TaskListBuildVoucherPlugin extends AbstractListPlugin implements Pl
|
||||||
|
|
||||||
this.getView().invokeOperation("refresh");
|
this.getView().invokeOperation("refresh");
|
||||||
}
|
}
|
||||||
|
private void showPreVoucher(IFormView view) {
|
||||||
|
IAppCache cache = AppCache.get("gl");
|
||||||
|
String string = (String)cache.get("accSys_" + view.getPageId() + "_perviewvoucher", String.class);
|
||||||
|
String entityName = (String)cache.get("accSys_" + view.getPageId() + "_entityname", String.class);
|
||||||
|
String billId = (String)cache.get("accSys_" + view.getPageId() + "_billid", String.class);
|
||||||
|
String isevent = (String)cache.get("accSys_" + view.getPageId() + "_isevent", String.class);
|
||||||
|
if (kd.bos.dataentity.utils.StringUtils.isNotBlank(string)) {
|
||||||
|
String tempId = (String)cache.get("accSys_" + view.getPageId() + "_vchtemplateid", String.class);
|
||||||
|
FormShowParameter form = new FormShowParameter();
|
||||||
|
form.setFormId("ai_previewvoucher");
|
||||||
|
form.setCustomParam("voucher", string);
|
||||||
|
form.setCustomParam("entityname", entityName);
|
||||||
|
form.setCustomParam("isevent", isevent);
|
||||||
|
form.setCustomParam("billId", billId);
|
||||||
|
form.setCustomParam("tempId", tempId);
|
||||||
|
form.getOpenStyle().setShowType(ShowType.MainNewTabPage);
|
||||||
|
form.setStatus(OperationStatus.VIEW);
|
||||||
|
view.showForm(form);
|
||||||
|
}
|
||||||
|
|
||||||
|
cache.remove("accSys_" + view.getPageId() + "_perviewvoucher");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@ public class PublicBillContractCkOp extends AbstractOperationServicePlugIn {
|
||||||
e.getFieldKeys().add("zcgj_invoiceremark");//特殊说明
|
e.getFieldKeys().add("zcgj_invoiceremark");//特殊说明
|
||||||
e.getFieldKeys().add("zcgj_nocontract");//合同付款类型 无合同付款 NOCONTRACT , 合同付款 CONTRACT
|
e.getFieldKeys().add("zcgj_nocontract");//合同付款类型 无合同付款 NOCONTRACT , 合同付款 CONTRACT
|
||||||
e.getFieldKeys().add("contractentry");//关联合同
|
e.getFieldKeys().add("contractentry");//关联合同
|
||||||
|
e.getFieldKeys().add("zcgj_bizype");//业务类型
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -53,6 +54,21 @@ public class PublicBillContractCkOp extends AbstractOperationServicePlugIn {
|
||||||
if(OrgCheckUtils.isKS(costcompanyId)){
|
if(OrgCheckUtils.isKS(costcompanyId)){
|
||||||
boolean isec = dataEntity.getBoolean("zcgj_isec");
|
boolean isec = dataEntity.getBoolean("zcgj_isec");
|
||||||
if(isec){
|
if(isec){
|
||||||
|
String bisType = dataEntity.getString("zcgj_bizype");
|
||||||
|
//物资采购 WZCG
|
||||||
|
if("WZCG".equals(bisType)){
|
||||||
|
DynamicObjectCollection entry = dataEntity.getDynamicObjectCollection("zcgj_materialinbillentry"); //入库单
|
||||||
|
if((entry == null || entry.isEmpty())){
|
||||||
|
this.addFatalErrorMessage(extendedDataEntity, String.format("业务类型为物资采购时,入库单分录不能为空!"));
|
||||||
|
}
|
||||||
|
}else if("SBWX".equals(bisType)){//设备维修 SBWX
|
||||||
|
DynamicObjectCollection entry = dataEntity.getDynamicObjectCollection("zcgj_maintenanceackentry"); //入库单
|
||||||
|
if((entry == null || entry.isEmpty())){
|
||||||
|
this.addFatalErrorMessage(extendedDataEntity, String.format("业务类型为设备维修时,维修确认单分录不能为空!"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//其他工程款 QTGCK 不交易
|
||||||
|
}else{
|
||||||
String nocontract = dataEntity.getString("zcgj_nocontract");
|
String nocontract = dataEntity.getString("zcgj_nocontract");
|
||||||
if("CONTRACT".equals(nocontract)){ //如果是合同付款
|
if("CONTRACT".equals(nocontract)){ //如果是合同付款
|
||||||
DynamicObjectCollection contractentry = dataEntity.getDynamicObjectCollection("contractentry");
|
DynamicObjectCollection contractentry = dataEntity.getDynamicObjectCollection("contractentry");
|
||||||
|
@ -62,7 +78,6 @@ public class PublicBillContractCkOp extends AbstractOperationServicePlugIn {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue