Esempio n. 1
0
  public void setAmtReadOnly(
      DataDom dataDom, SessionInfo sessionInfo, ServiceRequest serviceRequest) {
    String sta = dataDom.getRootTable().getSafeRowColumnValue("PRJ_STA");

    if (!"00".equals(sta)) {
      dataDom.getChildTable().getField("PRJL_ID").setReadonly(true);
      dataDom.getChildTable().getField("PRJL_NAM").setReadonly(true);
      dataDom.getChildTable().getField("YSZL_AMT").setReadonly(true);
      dataDom.getChildTable().getField("ZBS_AMT").setReadonly(true);
      dataDom.getChildTable().getField("BZ_AMT").setReadonly(true);
      dataDom.getChildTable().getField("DLFL_AMT").setReadonly(true);
    }

    if ("02".equals(sta)) {
      dataDom.getChildTable().getField("YSZL_AMT").setReadonly(false);
      dataDom.getChildTable().getField("ZBS_AMT").setReadonly(false);
      dataDom.getChildTable().getField("BZ_AMT").setReadonly(false);
      dataDom.getChildTable().getField("DLFL_AMT").setReadonly(false);
    }

    String DLF_TYP = dataDom.getTable("YXPRJMST").getSafeRow().getColumnValue("DLF_TYP");
    Table table = dataDom.getTable("YXPRJLIN");
    if ("A".equals(DLF_TYP)) {
      table.getField("DLFL_AMT").setReadonly(true);
    } else if ("B".equals(DLF_TYP)) {
      table.getField("DLFL_AMT").setReadonly(false);
    }
  }
Esempio n. 2
0
 /**
  * 页面tab页签切换 @Override
  *
  * @param dataDom DataDom
  * @param sessionInfo SessionInfo
  * @param serviceRequest ServiceRequest 含有tabName参数
  * @throws LiemsException
  */
 public void TabOnClick(DataDom dataDom, SessionInfo sessionInfo, ServiceRequest serviceRequest) {
   Table table = dataDom.getTable("YXPBPFLIN");
   if (null != table) {
     Field orgNoField = table.getField("ORG_NO");
     if (null != orgNoField) {
       Row currRow = table.getRow(0);
       String orgNo = "";
       // 增加当前行的判断,仅当当前行不为null时候取DataDom里的orgNo
       if (null != currRow) {
         orgNo = Charset.nullToEmpty(currRow.getColumnValue("ORG_NO"));
       }
       if (!("".equals(orgNo))) {
         serviceRequest.addParameter("selectorgno", orgNo);
       } else {
         serviceRequest.addParameter("selectorgno", sessionInfo.getOrg()[0].getValue());
       }
       // 没有公司编号字段,则取session中第一个公司编号
     } else {
       serviceRequest.addParameter("selectorgno", sessionInfo.getOrg()[0].getValue());
     }
   } else {
     serviceRequest.addParameter("selectorgno", sessionInfo.getOrg()[0].getValue());
   }
   super.TabOnClick(dataDom, sessionInfo, serviceRequest);
 }
Esempio n. 3
0
 /**
  * 设置只读
  *
  * @param dataDom
  * @addTime 2014-2-26 下午05:05:46
  * @author Libo
  */
 private void setReadOnly(DataDom dataDom) {
   Table chileTable = dataDom.getTable("YXDBJYLIN");
   String sta =
       "SELECT DLF_STA FROM YXDLFMST WHERE PRJ_NO = '"
           + dataDom.getTable("YXDBJYMST").getSafeRowColumnValue("PRJ_NO")
           + "'";
   if ("00".equals(sta) || "01".equals(sta)) {
     chileTable.getField("DLF_SUM").setReadonly(true);
   }
 }
Esempio n. 4
0
 public void initSel(DataDom dataDom) {
   Table table = dataDom.getRootTable();
   Row row = table.getRow(0L);
   String venNo = row.getColumnValue("VEN_NO");
   if ((venNo != null) && (!venNo.equals(""))) {
     creatSel(
         table.getField("VEN_LXR"),
         "SELECT LXR_NAM ,LXR_NAM FROM HLVDVENLIN WHERE VEN_NO=" + venNo,
         false,
         false);
   }
 }
Esempio n. 5
0
  private void initSel(DataDom dataDom, SessionInfo sessionInfo) {
    Table table = dataDom.getChildTable();
    String prjNo = dataDom.getRootTable().getSafeRowColumnValue("PRJ_NO");
    if ((prjNo != null) && (!(prjNo.equals("")))) {
      creatSel(
          table.getField("PRJL_NO"),
          "SELECT PRJL_NAM ,PRJL_NO FROM YXPRJLIN where PRJ_NO=" + prjNo,
          true,
          false);

      String sql =
          " select tbr_nam,tbr_no from ( select distinct f.tbr_nam,f.tbr_no,g.tot_seq "
              + " from YXBJDFLIN p "
              + "  left join YXPFTLIN g on p.pfgl_no=g.pfgl_no and p.tbr_no=g.tbr_no "
              + "   left join YXTBRMST f on p.TBR_NO = f.TBR_NO "
              + "  where p.PRJ_NO ="
              + prjNo
              + " order by g.tot_seq asc) ";
      creatSel(dataDom.getTable("YXDBJYLIN").getField("TBR_NO"), sql, true, false);
    }
  }
Esempio n. 6
0
  public void TabOnClick(DataDom dataDom, SessionInfo sessionInfo, ServiceRequest serviceRequest) {
    Table table = dataDom.getTable("YXDBJYMST");
    if (table != null) {
      Field orgNoField = table.getField("ORG_NO");
      if (orgNoField != null) {
        Row currRow = table.getRow(0L);
        String orgNo = "";

        if (currRow != null) {
          orgNo = Charset.nullToEmpty(currRow.getColumnValue("ORG_NO"));
        }
        if (!("".equals(orgNo))) serviceRequest.addParameter("selectorgno", orgNo);
        else serviceRequest.addParameter("selectorgno", sessionInfo.getOrg()[0].getValue());
      } else {
        serviceRequest.addParameter("selectorgno", sessionInfo.getOrg()[0].getValue());
      }
    } else {
      serviceRequest.addParameter("selectorgno", sessionInfo.getOrg()[0].getValue());
    }
    super.TabOnClick(dataDom, sessionInfo, serviceRequest);
  }
Esempio n. 7
0
  private void initNoSplitTbrTab(DataDom dataDom, String prjNo, Database db) throws Exception {
    String sql =
        "select t.TBR_NAM,t.TBR_NO,d.PRJL_NO from  YXTBRMST t join YXBJDFLIN d  on t.TBR_NO=d.TBR_NO  where d.PRJ_NO = "
            + prjNo;
    Rowset rs = db.getRS(sql);

    Table ct1 = dataDom.getTable("YXDBJYLIN");
    Row row = new Row(false, 0, 0, "new");
    row.addColumn("PRJ_NO", Charset.nullToEmpty(prjNo));
    String unit = getMonUnit(prjNo);
    row.addColumn("IS_NTC", "N");
    row.addColumn("IS_RCV", "N");
    row.addColumn("MON_UNIT", unit);
    if (rs.next()) {
      row.addColumn("PRJL_NO", Charset.nullToEmpty(rs.getString("PRJL_NO")));
      row.addColumn("TBR_NO", rs.getString("TBR_NO"));
      ct1.getRows().put("0", row);
      creatSel(ct1.getField("TBR_NO"), sql, false, false);
    } else {
      ct1.clearRow();
    }
  }