天眼查,产值确认,excel导出格式框架
This commit is contained in:
parent
c4a15a6a05
commit
41689d1290
|
@ -1,14 +1,25 @@
|
||||||
package shkd.repc.recon.formplugin;
|
package shkd.repc.recon.formplugin;
|
||||||
|
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
import kd.bos.dataentity.entity.DynamicObject;
|
import kd.bos.dataentity.entity.DynamicObject;
|
||||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||||
|
import kd.bos.entity.datamodel.IDataModel;
|
||||||
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
|
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
|
||||||
|
import kd.bos.form.IFormView;
|
||||||
|
import kd.bos.form.ShowFormHelper;
|
||||||
|
import kd.bos.form.ShowType;
|
||||||
|
import kd.bos.form.StyleCss;
|
||||||
|
import kd.bos.form.events.BeforeDoOperationEventArgs;
|
||||||
|
import kd.bos.form.operate.FormOperate;
|
||||||
import kd.bos.form.plugin.AbstractFormPlugin;
|
import kd.bos.form.plugin.AbstractFormPlugin;
|
||||||
|
import kd.bos.list.ListFilterParameter;
|
||||||
|
import kd.bos.list.ListShowParameter;
|
||||||
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 java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 产值确认表单插件
|
* 产值确认表单插件
|
||||||
|
@ -16,6 +27,63 @@ import java.math.BigDecimal;
|
||||||
*/
|
*/
|
||||||
public class WorkloadcfmbillFormPlugin extends AbstractFormPlugin {
|
public class WorkloadcfmbillFormPlugin extends AbstractFormPlugin {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void beforeDoOperation(BeforeDoOperationEventArgs args) {
|
||||||
|
super.beforeDoOperation(args);
|
||||||
|
|
||||||
|
FormOperate source = (FormOperate) args.getSource();
|
||||||
|
String operateKey = source.getOperateKey();
|
||||||
|
switch (operateKey) {
|
||||||
|
//分录--查看合同清单明细按钮
|
||||||
|
case "operationcolumnap":
|
||||||
|
int index = this.getModel().getEntryCurrentRowIndex("qeug_invoiceentryinfo");
|
||||||
|
boolean qeugIsnew = (boolean)this.getModel().getValue("qeug_isnew", index);
|
||||||
|
if (qeugIsnew) {
|
||||||
|
this.getView().showTipNotification("新增行无法查看明细");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
DynamicObject cqcontract = (DynamicObject) this.getModel().getValue("qeug_contractbill");
|
||||||
|
long id = 0;
|
||||||
|
if (null != cqcontract) {
|
||||||
|
id = cqcontract.getLong("id");
|
||||||
|
}
|
||||||
|
|
||||||
|
getListShowParamer(this.getView(), this.getModel(),String.valueOf(id));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打开列表展示清单详情页
|
||||||
|
* @param formView 页面
|
||||||
|
* @param model 模型
|
||||||
|
*/
|
||||||
|
private void getListShowParamer(IFormView formView, IDataModel model,String contentId) {
|
||||||
|
|
||||||
|
ListShowParameter parameter = ShowFormHelper.createShowListForm("qeug_contractsummarylist", true);
|
||||||
|
parameter.getOpenStyle().setShowType(ShowType.Modal);//Floating MainNewTabPage NewBrowserPage InContainer
|
||||||
|
parameter.setBillFormId("qeug_contractsummarylist");
|
||||||
|
parameter.setHasRight(true);
|
||||||
|
StyleCss styleCss = new StyleCss();
|
||||||
|
styleCss.setWidth("1500");
|
||||||
|
styleCss.setHeight("800");
|
||||||
|
parameter.getOpenStyle().setInlineStyleCss(styleCss);
|
||||||
|
DynamicObjectCollection dynColl = formView.getModel().getEntryEntity("qeug_invoiceentryinfo");
|
||||||
|
int index = model.getEntryCurrentRowIndex("qeug_invoiceentryinfo");
|
||||||
|
DynamicObject dynamicObject = dynColl.get(index);
|
||||||
|
String qeug_summarycontent = dynamicObject.getString("qeug_summarycontent");//汇总内容(sheetName)
|
||||||
|
// Object pkValue = formView.getModel().getDataEntity().getPkValue();//合同ID
|
||||||
|
|
||||||
|
QFilter q1 = new QFilter("qeug_sheetname", QCP.equals, qeug_summarycontent);
|
||||||
|
QFilter q2 = new QFilter("qeug_contractid",QCP.equals, contentId);
|
||||||
|
List<QFilter> listQF = Lists.newArrayList();
|
||||||
|
listQF.add(q1.and(q2));
|
||||||
|
parameter.setListFilterParameter(new ListFilterParameter(listQF, null));
|
||||||
|
this.getView().showForm(parameter);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void propertyChanged(PropertyChangedArgs e) {
|
public void propertyChanged(PropertyChangedArgs e) {
|
||||||
super.propertyChanged(e);
|
super.propertyChanged(e);
|
||||||
|
@ -58,4 +126,6 @@ public class WorkloadcfmbillFormPlugin extends AbstractFormPlugin {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
package shkd.repc.recon.listplugin;
|
||||||
|
|
||||||
|
import kd.bos.form.events.ExportFileEvent;
|
||||||
|
import kd.bos.form.events.FlexBeforeClosedEvent;
|
||||||
|
import kd.bos.list.plugin.IListPlugin;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同明细清单列表插件
|
||||||
|
* qeug_contractsummarylist
|
||||||
|
*/
|
||||||
|
public class ContractSummaryListPlugin implements IListPlugin {
|
||||||
|
|
||||||
|
|
||||||
|
/** 导出文件后事件,可以用来修改导出的文件内容,比如修改excel数据、格式、加密等 */
|
||||||
|
public void afterExportFile(ExportFileEvent e) {
|
||||||
|
File file = e.getFile();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginName() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setPluginName(String s) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void destory() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void flexBeforeClosed(FlexBeforeClosedEvent flexBeforeClosedEvent) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void trace(Object o) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -17,6 +17,7 @@ public class PrequalificationOPPlugin extends AbstractOperationServicePlugIn {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterExecuteOperationTransaction(AfterOperationArgs e) {
|
public void afterExecuteOperationTransaction(AfterOperationArgs e) {
|
||||||
|
//todo: 资质预审
|
||||||
//资质预审审核 + OP 判断如果为直接入库,那就查潜在供应商中的正式供应商字段,然后进行取值赋值
|
//资质预审审核 + OP 判断如果为直接入库,那就查潜在供应商中的正式供应商字段,然后进行取值赋值
|
||||||
super.afterExecuteOperationTransaction(e);
|
super.afterExecuteOperationTransaction(e);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue