/** * <br> * [機 能] 初期処理 <br> * [解 説] <br> * [備 考] * * @param reqMdl リクエスト情報 * @param paramMdl パラメータ情報 * @throws SQLException SQL実行時例外 */ public void getInitData(RequestModel reqMdl, Cir090knParamModel paramMdl) throws SQLException { // アカウントSID List<Cir150AccountModel> accountList = new ArrayList<Cir150AccountModel>(); if (paramMdl.getCir090SelKbn() == GSConstCircular.ACCOUNT_SEL) { // 指定アカウント Cir150AccountModel cirMdl = new Cir150AccountModel(reqMdl); cirMdl.setAccountSid(paramMdl.getCir090AccountSid()); cirMdl.setAccountName(paramMdl.getCir090AccountName()); accountList.add(cirMdl); paramMdl.setCir090knAccountList(accountList); } else { accountList = getAllUseAccount(reqMdl, reqMdl.getSmodel().getUsrsid(), con__); paramMdl.setCir090knAccountList(accountList); } }
/** * <br> * [機 能] 回覧板手動削除 <br> * [解 説] <br> * [備 考] * * @param reqMdl リクエスト情報 * @param paramMdl パラメータ情報 * @throws SQLException SQL実行時例外 */ public void updateSyudoDelSetting(RequestModel reqMdl, Cir090knParamModel paramMdl) throws SQLException { // アカウントSID List<Cir150AccountModel> accountList = new ArrayList<Cir150AccountModel>(); if (paramMdl.getCir090SelKbn() == GSConstCircular.ACCOUNT_SEL) { // 指定アカウント Cir150AccountModel smlMdl = new Cir150AccountModel(reqMdl); smlMdl.setAccountSid(paramMdl.getCir090AccountSid()); smlMdl.setAccountName(paramMdl.getCir090AccountName()); accountList.add(smlMdl); paramMdl.setCir090knAccountList(accountList); } else { accountList = getAllUseAccount(reqMdl, reqMdl.getSmodel().getUsrsid(), con__); paramMdl.setCir090knAccountList(accountList); } ArrayList<CirAdelModel> jdelList = new ArrayList<CirAdelModel>(); ArrayList<CirAdelModel> sdelList = new ArrayList<CirAdelModel>(); ArrayList<CirAdelModel> ddelList = new ArrayList<CirAdelModel>(); CirInfDao cirInfDao = new CirInfDao(con__); CirViewDao cirViewDao = new CirViewDao(con__); CirAdelModel adelModel = null; // 受信 int jdelKbn = NullDefault.getInt(paramMdl.getCir090JdelKbn(), GSConstCircular.CIR_AUTO_DEL_NO); if (jdelKbn == GSConstCircular.CIR_AUTO_DEL_LIMIT) { for (Cir150AccountModel mdl : paramMdl.getCir090knAccountList()) { adelModel = new CirAdelModel(); adelModel.setCadJdelYear(Integer.parseInt(paramMdl.getCir090JYear())); adelModel.setCadJdelMonth(Integer.parseInt(paramMdl.getCir090JMonth())); adelModel.setCacSid(mdl.getAccountSid()); jdelList.add(adelModel); } } // 送信 int sdelKbn = NullDefault.getInt(paramMdl.getCir090SdelKbn(), GSConstCircular.CIR_AUTO_DEL_NO); if (sdelKbn == GSConstCircular.CIR_AUTO_DEL_LIMIT) { for (Cir150AccountModel mdl : paramMdl.getCir090knAccountList()) { adelModel = new CirAdelModel(); adelModel.setCadSdelYear(Integer.parseInt(paramMdl.getCir090SYear())); adelModel.setCadSdelMonth(Integer.parseInt(paramMdl.getCir090SMonth())); adelModel.setCacSid(mdl.getAccountSid()); sdelList.add(adelModel); } } int ddelKbn = NullDefault.getInt(paramMdl.getCir090DdelKbn(), GSConstCircular.CIR_AUTO_DEL_NO); if (ddelKbn == GSConstCircular.CIR_AUTO_DEL_LIMIT) { for (Cir150AccountModel mdl : paramMdl.getCir090knAccountList()) { adelModel = new CirAdelModel(); adelModel.setCadDdelYear(Integer.parseInt(paramMdl.getCir090DYear())); adelModel.setCadDdelMonth(Integer.parseInt(paramMdl.getCir090DMonth())); adelModel.setCacSid(mdl.getAccountSid()); ddelList.add(adelModel); } } // ゴミ箱データ削除 if (!ddelList.isEmpty()) { cirViewDao.delete(ddelList, 2); cirInfDao.delete(ddelList, 2); } if (!jdelList.isEmpty()) { // 受信タブデータ削除 cirViewDao.delete(jdelList, 1); } if (!sdelList.isEmpty()) { // 送信タブデータ削除 cirInfDao.delete(sdelList, 1); } // 削除対象の回覧板SIDを取得 CircularDao cDao = new CircularDao(con__); String[] delLst = cDao.getDelList(); // 回覧板情報を物理削除、バイナリ情報を論理削除 cDao.deleteCir(delLst, GSConstUser.SID_ADMIN); }