EAS_根据bosType或id获取表名,
private void reviseBack(Context ctx,String billId) throws SQLException{ String sql = "select t.FSrcObjectID from T_BOT_RELATION t where t.FDestObjectID='"+billId+"'"; String tableName =""; try { IRowSet rowSet = DbUtil.executeQuery(ctx, sql); while (rowSet.next()) { String sourceFid = rowSet.getString("FSrcObjectID"); BOSObjectType bosType = BizCollUtil.getBOSType(sourceFid); IMetaDataLoader metaDataLoader = MetaDataLoaderFactory.getLocalMetaDataLoader(ctx); EntityObjectInfo bo = metaDataLoader.getEntity(bosType); tableName = bo.getTable().getName(); } if (!EmptyUtil.isEmpty(tableName)) { String upSql = "update "+tableName+" set FSTATE = 60 where fid in ("+sql+")"; DbUtil.execute(ctx, upSql); } } catch (BOSException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
获取可以根据bosType来获取对应的实体对象,再比较选择不同的实体,进行不同的业务
public boolean getAmountControlType(Context ctx, String sourceBillId) throws BOSException { BOSObjectType type = BizCollUtil.getBOSType(sourceBillId); StringBuffer sql = new StringBuffer(); int controltype = 0; if((new OtherExpenseBillInfo()).getBOSType().equals(type)) sql = sql.append("select famountcontroltype from T_BC_OtherExpenseBill where fid=? "); else if((new DailyLoanBillInfo()).getBOSType().equals(type)) sql = sql.append("select famountcontroltype from T_BC_DailyLoanBill where fid=? "); else if((new EvectionReqBillInfo()).getBOSType().equals(type)) sql = sql.append("select famountcontroltype from T_BC_EvectionReqBill where fid=? "); else if((new EvectionLoanBillInfo()).getBOSType().equals(type)) sql = sql.append("select famountcontroltype from T_BC_EvectionLoanBill where fid=? "); Object params[] = { sourceBillId }; IRowSet rowSet = DbUtil.executeQuery(ctx, sql.toString(), params); try { if(rowSet.next()) controltype = rowSet.getInt("famountcontroltype"); } catch(SQLException e) { e.printStackTrace(); } return controltype == 20 || (new EvectionReqBillInfo()).getBOSType().equals(type); }
linux下的docker操作命令及异常
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· winform 绘制太阳,地球,月球 运作规律
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· AI 智能体引爆开源社区「GitHub 热点速览」
· 写一个简单的SQL生成工具