kingdee笔记待整理.docx
《kingdee笔记待整理.docx》由会员分享,可在线阅读,更多相关《kingdee笔记待整理.docx(14页珍藏版)》请在冰豆网上搜索。
![kingdee笔记待整理.docx](https://file1.bdocx.com/fileroot1/2022-11/16/5de33a69-24ba-402d-b41d-89b9d75af711/5de33a69-24ba-402d-b41d-89b9d75af7111.gif)
kingdee笔记待整理
getBillInterface().save(this.editData);
//LIST动态判断源数据单据
/**
*动态回填数据状态
*@paramobjectUuidPK
*/
privatevoidprintFeedback(StringobjectUuidPK){
DispatchTaskInfodinfo;
try{
dinfo=DispatchTaskFactory.getRemoteInstance().getDispatchTaskInfo(newObjectUuidPK(objectUuidPK));
Stringobjpk=dinfo.getSourceBillId();
ObjectbillInfo=(Object)DynamicObjectFactory.getRemoteInstance().getValue(newObjectUuidPK(objpk).getObjectType(),newObjectUuidPK(objpk));
if(objpk!
=null&&billInfoinstanceofMendRecordTableInfo){
MendRecordTableInfotinfo=MendRecordTableFactory.getRemoteInstance().getMendRecordTableInfo(objpk);
if(AuditState.unexecute.equals(tinfo.getAuditState())){
tinfo.setAuditState(AuditState.execute);
MendRecordTableFactory.getRemoteInstance().update(newObjectUuidPK(tinfo.getId().toString()),tinfo);
}
}elseif(objpk!
=null&&billInfoinstanceofMonthMendPlanInfo){
MonthMendPlanInfopinfo=MonthMendPlanFactory.getRemoteInstance().getMonthMendPlanInfo(objpk);
if(AuditState.unexecute.equals(pinfo.getAuditState())){
pinfo.setAuditState(AuditState.execute);
MonthMendPlanFactory.getRemoteInstance().update(newObjectUuidPK(pinfo.getId().toString()),pinfo);
}
}
}catch(EASBizExceptione1){
e1.printStackTrace();
}catch(BOSExceptione1){
e1.printStackTrace();
}
}}
}catch(EASBizExceptione1){
e1.printStackTrace();
}catch(BOSExceptione1){
e1.printStackTrace();
}
}
chcek=ObjectPK;
}
if(chcek==null){
MsgBox.showInfo("请选中一行!
");
}
}
List设图标:
publicvoidonLoad()throwsException{
//TODOAuto-generatedmethodstub
super.onLoad();
btnApproval.setIcon(EASResource.getIcon("imgTbtn_audit"));
btnAgainstApproval.setIcon(EASResource.getIcon("imgTbtn_unaudit"));
btnOver.setIcon(EASResource.getIcon("imgTbtn_execute"));
btnClose.setIcon(EASResource.getIcon("imgTbtn_close"));
}
Edit:
/**
*多项选择
*/
intcurrRow=-1;
Stringchcek=null;
int[]selectRows=KDTableUtil.getSelectedRows(tblMain);
for(inti=0;icurrRow=selectRows[i];//编辑的行号
StringObjectPK=(tblMain.getRow(currRow).getCell("id").getValue()).toString();//获得当前行对象
if(!
ObjectPK.equals(chcek)){
if(MendPlanFactory.getRemoteInstance().setClose(ObjectPK)){
}else{
MsgBox.showError("第"+(selectRows[i]+1)+"行单据状态不符合,不能关闭!
");
}
chcek=ObjectPK;
}
}
actionRefresh_actionPerformed(e);
if(chcek==null){
MsgBox.showInfo("请选中一行!
");
}
Edit:
/**
*单项选择当前活动的第一行。
*/
//一个控件的值赋给其他对象时先排空。
if(txtstratCount.getValue()!
=null){
sart=newBigDecimal(txtstratCount.getValue().toString());
}else{
MsgBox.showInfo("请先填写起始读数!
");
//kdtEntrys.setEnabled(false);
SysUtil.abort();
}
if(info.getSourceBillId()!
=null)与if(info.getSourceBillId().toString()!
=null)的区别。
后者为null是报错。
checkSelected();//选中
if(confirmRemove())//确认框
{
Remove();//删除
}
Int类型不是&int显示而是正常数据
table.getColumn(columnName).getStyleAttributes().setNumberFormat("#,##0;-#,##0");
过滤组织:
EntityViewInfoview=newEntityViewInfo();
FilterInfofilter=newFilterInfo();
view.setFilter(filter);
StringcuId=SysContext.getSysContext().getCurrentCtrlUnit().getId().toString();
CtrlUnitInfocu=CtrlUnitFactory.getRemoteInstance().getCtrlUnitInfo(newObjectUuidPK(cuId));
Stringcu_longNumber=cu.getLongNumber();
filter.getFilterItems().add(newFilterItemInfo("CU.longNumber","%"+cu_longNumber+"%",CompareType.LIKE));
prmtassetName.setEntityViewInfo(view);
并重新QURERY:
prmtassetName.setQueryInfo("com.kingdee.eas.custom.equipment.maintain.app.FaCurCardQuery_Copy");
prmtassetName.setCommitFormat("$number$");
prmtassetName.setDisplayFormat("$assetName$");
prmtassetName.setEditFormat("$number$");
分录添增删:
kdtEntrys_detailPanel.getRemoveLinesButton().setEnabled(false);
kdtEntrys_detailPanel.getAddNewLineButton().setEnabled(false);kdtEntrys_detailPanel.getInsertLineButton().setEnabled(false);
套打:
publicvoidactionPrintPreview_actionPerformed(ActionEvente)
throwsException{
//TODOAuto-generatedmethodstub
//super.actionPrintPreview_actionPerformed(e);
if(editData==null||StringUtils.isEmpty(editData.getString("id"))){
return;
}
Stringid=editData.getId().toString();//得到当前要打印单据的id
ExpenseAuditDataProviderdata=newExpenseAuditDataProvider(id);//得到打印数据
KDNoteHelperappHlp=newKDNoteHelper();
appHlp.printPreview("bim/custom/equipment/maintenance/DispatchTask",data,
javax.swing.SwingUtilities.getWindowAncestor(this));//定义打印模板输出的路径
}
publicclassExpenseAuditDataProviderimplementsBOSQueryDelegate{//重新复写打印类
privateStringbillId=null;
publicExpenseAuditDataProvider(){
super();
}
publicExpenseAuditDataProvider(StringbillId){
super();
this.billId=b