Compare commits
No commits in common. "6870eb3602c84d143c3351f362079236b29e8976" and "cec3803e540bbb3f9a56eede38f56490a5fde2b8" have entirely different histories.
6870eb3602
...
cec3803e54
|
@ -1,63 +0,0 @@
|
||||||
package zcgj.zcdev.zcdev.fs.plugin.form;
|
|
||||||
|
|
||||||
import kd.bos.bill.AbstractBillPlugIn;
|
|
||||||
import kd.bos.bill.BillShowParameter;
|
|
||||||
import kd.bos.context.RequestContext;
|
|
||||||
import kd.bos.dataentity.entity.DynamicObject;
|
|
||||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
|
||||||
import kd.bos.entity.operate.Submit;
|
|
||||||
import kd.bos.form.ShowType;
|
|
||||||
import kd.bos.form.control.EntryGrid;
|
|
||||||
import kd.bos.form.events.BeforeDoOperationEventArgs;
|
|
||||||
import kd.bos.form.events.HyperLinkClickEvent;
|
|
||||||
import kd.bos.form.events.HyperLinkClickListener;
|
|
||||||
import kd.bos.form.field.BasedataEdit;
|
|
||||||
import kd.bos.form.field.RefBillEdit;
|
|
||||||
import kd.bos.logging.Log;
|
|
||||||
import kd.bos.logging.LogFactory;
|
|
||||||
import kd.bos.servicehelper.user.UserServiceHelper;
|
|
||||||
import kd.sdk.plugin.Plugin;
|
|
||||||
import zcgj.zcdev.zcdev.fs.utils.OrgCheckUtils;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.time.ZoneId;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.EventObject;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 预付单关联申请插件
|
|
||||||
*/
|
|
||||||
public class PrepaybillWriteoffapplyPlugin extends AbstractBillPlugIn implements Plugin, HyperLinkClickListener {
|
|
||||||
|
|
||||||
private static final Log log = LogFactory.getLog(PrepaybillWriteoffapplyPlugin.class);
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void registerListener(EventObject e) {
|
|
||||||
super.registerListener(e);
|
|
||||||
EntryGrid control = this.getControl("zcgj_writeoffapply");
|
|
||||||
control.addHyperClickListener(this);
|
|
||||||
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public void hyperLinkClick(HyperLinkClickEvent hyperLinkClickEvent) {
|
|
||||||
String fieldName = hyperLinkClickEvent.getFieldName();
|
|
||||||
EntryGrid entryGrid = getView().getControl("zcgj_writeoffapply");
|
|
||||||
int[] selectRows = entryGrid.getSelectRows();
|
|
||||||
if(selectRows != null && selectRows.length == 1){
|
|
||||||
DynamicObjectCollection dynamicObjectCollection = this.getModel().getDataEntity(true).getDynamicObjectCollection("zcgj_writeoffapply");
|
|
||||||
DynamicObject dynamicObject = dynamicObjectCollection.get(selectRows[0]);
|
|
||||||
String zcgjApplybillno = dynamicObject.getString("zcgj_applybillno");
|
|
||||||
long sourceapplybillid = dynamicObject.getLong("zcgj_sourceapplybillid");
|
|
||||||
if(sourceapplybillid != 0){
|
|
||||||
//弹出发票详情
|
|
||||||
BillShowParameter showParameter = new BillShowParameter();
|
|
||||||
showParameter.setPkId(sourceapplybillid);
|
|
||||||
showParameter.setFormId("er_dailyapplybill");
|
|
||||||
showParameter.getOpenStyle().setShowType(ShowType.MainNewTabPage); //打开方式
|
|
||||||
getView().showForm(showParameter);
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
this.getView().showTipNotification("请选择一条关联申请数据。");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -65,8 +65,7 @@ public class TripreimbursebillIsInvoiceDateCheckOp extends AbstractOperationServ
|
||||||
if(costcompanyObj!=null && costdeptObj != null){
|
if(costcompanyObj!=null && costdeptObj != null){
|
||||||
DynamicObject costcompany = (DynamicObject)costcompanyObj;
|
DynamicObject costcompany = (DynamicObject)costcompanyObj;
|
||||||
long costcompanyId = costcompany.getLong("id");
|
long costcompanyId = costcompany.getLong("id");
|
||||||
String number = costcompany.getString("number");
|
if(OrgCheckUtils.isKS(costcompanyId)){
|
||||||
if(OrgCheckUtils.isKS(costcompanyId) && !number.equals("10006476")){
|
|
||||||
List<String> errorList = new ArrayList<>();
|
List<String> errorList = new ArrayList<>();
|
||||||
//行程明细,会有多个明细
|
//行程明细,会有多个明细
|
||||||
DynamicObjectCollection tripentry = dataEntity.getDynamicObjectCollection("tripentry");
|
DynamicObjectCollection tripentry = dataEntity.getDynamicObjectCollection("tripentry");
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
package zcgj.zcdev.zcdev.fs.plugin.other;
|
|
||||||
|
|
||||||
import kd.bos.dataentity.entity.DynamicObject;
|
|
||||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
|
||||||
import kd.bos.dataentity.utils.OrmUtils;
|
|
||||||
import kd.bos.entity.ExtendedDataEntity;
|
|
||||||
import kd.bos.entity.botp.plugin.AbstractConvertPlugIn;
|
|
||||||
import kd.bos.entity.botp.plugin.args.AfterBuildDrawFilterEventArgs;
|
|
||||||
import kd.bos.entity.botp.plugin.args.AfterConvertEventArgs;
|
|
||||||
import kd.bos.entity.botp.plugin.args.BeforeBuildRowConditionEventArgs;
|
|
||||||
import kd.bos.orm.query.QCP;
|
|
||||||
import kd.bos.orm.query.QFilter;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 预付单上拉费用申请单botp插件
|
|
||||||
*/
|
|
||||||
public class PrepaybillWriteoffapplyBotpPlugin extends AbstractConvertPlugIn {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void afterBuildDrawFilter(AfterBuildDrawFilterEventArgs e) {
|
|
||||||
//选单过滤
|
|
||||||
super.afterBuildDrawFilter(e);
|
|
||||||
System.out.println("afterBuildDrawFilter——>");
|
|
||||||
QFilter plugFilter = e.getPlugFilter();//插件追加的选单条件
|
|
||||||
String sourceLayout = e.getSourceLayout();//获取插件设置的选单时打开的源单列表布局
|
|
||||||
DynamicObject targetDataEntity = e.getTargetDataEntity();//当前数据包
|
|
||||||
DynamicObjectCollection writeoffapplyCollection = targetDataEntity.getDynamicObjectCollection("zcgj_writeoffapply");
|
|
||||||
List<Long> ids = new ArrayList<>();
|
|
||||||
for (DynamicObject dynamicObject : writeoffapplyCollection) {
|
|
||||||
long aLong = dynamicObject.getLong("zcgj_sourceapplybillid");
|
|
||||||
ids.add(aLong);
|
|
||||||
}
|
|
||||||
QFilter filter = new QFilter("id", QCP.not_in, ids);
|
|
||||||
e.setPlugFilter(filter);
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue