예제 #1
0
 public QueryApprovalVo operateApproval(QueryApprovalVo approvalVo) {
   String sql =
       "select * from APPROVAL_INFO_LIST where aclid = "
           + approvalVo.getAclid()
           + " and ailfl = 1 and aaz318 = "
           + approvalVo.getAaz318()
           + " and ailid="
           + approvalVo.getAilid();
   ApprovalInfoList a = CommonJdbcDaoUtils.get(sql, ApprovalInfoList.class);
   BeanTools.copyPropertiesIgnoreNull(approvalVo, a);
   CommonHibernateDaoUtils.update(a);
   if (approvalVo.getAilspfl() != null) {
     if (approvalVo.getAilspfl() == 1) {
       CommonJdbcDaoUtils.update(
           "update APPROVAL_INFO_LIST set ailspfl=1 where aaz318="
               + approvalVo.getAaz318()
               + " and ailfl=1 and ailspfl=0 and aclid<>"
               + approvalVo.getAclid());
     }
   }
   BeanTools.copyProperties(a, approvalVo);
   return approvalVo;
 }
예제 #2
0
  public List<Af53DTO> findCaseID(String ids) {
    String aaz318s = "";
    String[] id = ids.split(",");
    for (int i = 0; i < id.length; i++) {
      if ((i + 1) == id.length) {
        aaz318s += "'" + id[i] + "'";
      } else {
        aaz318s += "'" + id[i] + "',";
      }
    }

    String sql = "select * from af53 where aaz318 in ( " + aaz318s + ")";

    List<Af53DTO> af53dtos = CommonJdbcDaoUtils.query(sql.toString(), Af53DTO.class);

    return af53dtos;
  }
예제 #3
0
  public List<QueryApprovalVo> queryApproalData(String aaz318) {

    StringBuffer sql =
        new StringBuffer(
            "select a.*,b.aclname from APPROVAL_INFO_LIST a,APPROVAL_CLASS_LIST b where a.aclid = b.aclid and a.ailfl = 1 and aaz318 = ");

    sql.append(aaz318);

    sql.append(" and a.aclid in (1, 2, 3) ");

    sql.append(
        " and (a.ailspfl=0 or (a.ailspfl=1 and a.ailtg is not null))   order by a.ailtime desc,a.ailid asc");

    List<QueryApprovalVo> list = CommonJdbcDaoUtils.query(sql.toString(), QueryApprovalVo.class);

    /*for (QueryApprovalVo queryApprovalVo : list) {
    	if (2 == queryApprovalVo.getAclid() && "未审批".equals(queryApprovalVo.getAilzt())) {
    		throw new BusinessException("二级未审批");
    	}
    }*/

    return list;
  }
예제 #4
0
 public ApprovalClassList qryMaxApprovalId() {
   String sql = "select max(aclid) aclid from APPROVAL_CLASS_LIST";
   return CommonJdbcDaoUtils.get(sql, ApprovalClassList.class);
 }