zoukankan      html  css  js  c++  java
  • where的使用

    public Record getAutoAssignOffline(String processName, String bizUuid, String activityName) throws ActiveRecordException {
            //查询是否是首次
            String  statusSql="SELECT receive_no FROM biz_factoring_reception WHERE uuid = ?";
            //获取是否是首次的状态
            String  receiveNo=Db.findFirst(statusSql,bizUuid).getStr("receiveNo");
             String   where="";
            if ("1".equals(receiveNo)) {
                where +=" and  c.first_reception_flag =1" ;
                
            }else if ( !"1".equals(receiveNo)  ) {
                where +=" and  c.first_reception_flag = 0 " ;
            }
            // 查询自动分配状态的SQL
            String sql = String.format(
                    " SELECT " +
                    "    c.task_name , " +
                    "    c.auto_assign , " +
                    "    c.uuid " +
                    " FROM " +
                    "    biz_pay_comfirm_info a, " +
                    "    biz_document_task_info c ," +
                    "   biz_factoring_reception b  "+
                    " WHERE " +
                    "    a.core_enterprise_id = c.core_enterprise_id " +
                    " and a.financial_institutions_id = c.financial_institutions_id " +
                    " and a.signing_body_id = c.signing_body_id " +
                    " and b.biz_id =a.uuid  " + 
                    " and b.uuid = ? " +
                    " and c.process_name = ? " +
                    " and a.sys_status =1    " +
                    " and b.sys_status =1    " +
                    " and c.sys_status =1    " +
                    " and c.activity_name = ?  "
                    + " %s  " ,where);
            Record record=Db.findFirst(sql, bizUuid, processName, activityName );
            return record;
        }
  • 相关阅读:
    rabbitmq入门
    php7.2 安装redis扩展
    php安装扩展的几种方法
    yum安装php7.2
    相关报错
    [枚举]P1089 津津的储蓄计划
    [DFS]排列的生成
    [枚举]P1085 不高兴的津津
    [模拟]P1047 校门外的树
    [模拟]P1046 陶陶摘苹果
  • 原文地址:https://www.cnblogs.com/xiaoniuniu886/p/9679290.html
Copyright © 2011-2022 走看看