Пример #1
0
 /**
  * 获取单位部门人员树
  *
  * @return
  */
 @SuppressWarnings("unchecked")
 public String unitDeptUserTree() {
   String where = "1=1";
   listMailgetUnitDeptUserTree =
       DbOperationFation.getTreeDataForJson(
           "B_V_Ufp_Mail_UnitDeptUserTree", "pid", "uuid", "NAME", where);
   return SUCCESS;
 }
Пример #2
0
 /** 电子邮件 删除 */
 public String detailsDelete() {
   B_T_Ufp_Mail_Relation b_T_Ufp_Mail_Relation = null;
   String resultMsg = null;
   if ("3".equals(mailType)) {
     DbOperationFation.deleteByExample("B_T_Ufp_Mail_Attribute", checkedIds, moduleId);
     DbOperationFation.deleteByExample("B_T_Ufp_Mail_Relation", checkedIds, moduleId);
     DbOperationFation.deleteByExample("B_T_Ufp_Mail_Content", checkedIds, moduleId);
     resultMsg = Constants.DELETE_SUCCESSFUL_MSG;
   } else {
     if (StringTools.isNotNullAndHasValue(checkedIds)) {
       String temps[] = checkedIds.split(",");
       for (String temp : temps) {
         b_T_Ufp_Mail_Relation = mapperMRT.selectByPrimaryKey(temp.trim());
         b_T_Ufp_Mail_Relation.setReplyFlag(3); // 垃圾箱和草稿箱标志
         b_T_Ufp_Mail_Relation.setMailType(Long.valueOf("3")); // 垃圾箱
         mapperMRT.updateByPrimaryKeySelective(b_T_Ufp_Mail_Relation);
       }
       resultMsg = "已转到垃圾箱";
     }
   }
   sucessMessage(resultMsg);
   b_T_Ufp_Mail_Relation = null;
   return SUCCESS;
 }
Пример #3
0
  /** 电子邮件详细信息新建或修改 */
  public String detailsUpdate() throws Exception {
    // 取得数据连接
    B_T_Ufp_Mail_Attribute record = null;
    B_T_Ufp_Mail_Relation recordRelation = null;
    B_T_Ufp_Mail_Content recordContent = null;
    C_T_Sys_FileExample example = null;
    C_T_Sys_FileExample.Criteria criteria = null;
    try {
      example = new C_T_Sys_FileExample();
      criteria = example.createCriteria();
      // 创建需要更新的记录集合
      record = new B_T_Ufp_Mail_Attribute();
      recordRelation = new B_T_Ufp_Mail_Relation();
      recordContent = new B_T_Ufp_Mail_Content();
      String returnMsg = null;
      String sendTime = DateTools.getServerDateTime(10);
      String sendUser = SessionFactory.getSessionUserNm();
      String sendSysUser = SessionFactory.getSessionUserId();

      if (StringTools.isNullOrNoValue(isTranferCopy)) {
        if (StringTools.isNullOrNoValue(mainDocId)) {
          returnMsg =
              saveMail(
                  record,
                  recordRelation,
                  recordContent,
                  sendTime,
                  sendUser,
                  sendSysUser,
                  1,
                  example,
                  criteria);
        } else {
          if (isPaper != null && ("2".equals(isPaper) || "".equals(isPaper))) {
            DbOperationFation.deleteByExample("B_T_Ufp_Mail_Attribute", mainDocId, moduleId);
            DbOperationFation.deleteByExample("B_T_Ufp_Mail_Relation", mainDocId, moduleId);
            DbOperationFation.deleteByExample("B_T_Ufp_Mail_Content", mainDocId, moduleId);
            returnMsg =
                saveMail(
                    record,
                    recordRelation,
                    recordContent,
                    sendTime,
                    sendUser,
                    sendSysUser,
                    1,
                    example,
                    criteria);
          } else {
            returnMsg =
                replyTrunMail(
                    record,
                    recordRelation,
                    recordContent,
                    sendTime,
                    sendUser,
                    sendSysUser,
                    example,
                    criteria);
          }
        }
      } else {
        // 转移拷贝(isTranferCopy)信件设置
        if (!"".equals(checkedIds)) {
          String temps[] = checkedIds.split(",");
          for (String temp : temps) {
            b_T_Ufp_Mail_Relation = mapperMRT.selectByPrimaryKey(temp.trim());
            if ("1".equals(isTranferCopy)) {
              // 转移至
              tranferMail(recordRelation);
            } else if ("2".equals(isTranferCopy)) {
              // 拷贝至
              copyMail(record, recordRelation, recordContent, temp.trim(), example, criteria);
            }
          }
        }
      }
      sucessMessage(returnMsg);
    } catch (Exception e) {
      throw e;
    } finally {
      // 释放资源
      example = null;
      criteria = null;
    }
    return SUCCESS;
  }