| | |
| | | @Override |
| | | public List<Map<String, Object>> getMessageByUserCodeV2(MessageParameter messageParameter) { |
| | | //String where=" where UserCode = '"+messageParameter.getUserCode()+"'"; |
| | | String actionType=""; |
| | | if ("抄送我的".equals(messageParameter.getActionType())){ |
| | | actionType=messageParameter.getActionType(); |
| | | } |
| | | if ("审核".equals(messageParameter.getActionType()) && messageParameter.getMsgType() == 2) {//我发起的 |
| | | messageParameter.setActionType("提交"); |
| | | } else if ("抄送我的".equals(messageParameter.getActionType())||("审核".equals(messageParameter.getActionType()) && messageParameter.getMsgType() == 3)) {//抄送我的 |
| | |
| | | " where UserCode = @UserCode \n"; |
| | | |
| | | if (messageParameter.getIsfinshed() == 1) { |
| | | sql += " and curstatus = 'Undone' \n"; |
| | | sql += " and curstatus = 'Undone' and isnull(a.isRead,0) = 0\n"; |
| | | } |
| | | if (messageParameter.getIsfinshed() == 2) { |
| | | sql += " and curstatus = 'Finished' \n"; |
| | | else if (messageParameter.getIsfinshed() == 2) { |
| | | sql += " and curstatus = 'Finished' and isnull(a.isRead,0) = 0 \n"; |
| | | } |
| | | if (messageParameter.getIsfinshed() == 3) { |
| | | else if (messageParameter.getIsfinshed() == 3||("抄送我的".equals(actionType)&&messageParameter.getIsfinshed()==0)) { |
| | | //在线交流,通知 |
| | | if(messageParameter.getMsgType()==4) { |
| | | //未读 |
| | |
| | | sql += " and isnull(a.isRead,0) = 1 \n"; |
| | | } |
| | | } |
| | | |
| | | sql += |
| | | " and (isnull(@SearchKey,'') = ''\n" + |
| | | " or a.QueryString like '%' + @SearchKey + '%' \n" + |
| | |
| | | " select @ActionCount=count(1) \n" + |
| | | " from t219001 a with (nolock) \n" + |
| | | " where a.UserCode =@userCode\n" + |
| | | " and a.actiontype ='抄送' \n" + |
| | | " and a.actiontype ='抄送' and isnull(a.isRead,0)=0\n" + |
| | | " set @MsgCount=isnull(@MsgCount,0)+isnull(@ActionCount,0)\n" + |
| | | " set @todoCount=isnull(@todoCount,0)+isnull(@ActionCount,0)\n" + |
| | | " insert into @table(ActionType,ActionCount)values('抄送我的',@ActionCount)\n" + |
| | |
| | | @Override |
| | | public List<Map<String, Object>> getMessageByType(MessageParameter messageParameter) { |
| | | //String where=" where UserCode = '"+messageParameter.getUserCode()+"'"; |
| | | String actionType=""; |
| | | if ("抄送我的".equals(messageParameter.getActionType())){ |
| | | actionType=messageParameter.getActionType(); |
| | | } |
| | | if ("审核".equals(messageParameter.getActionType()) && messageParameter.getMsgType() == 2) {//我发起的 |
| | | messageParameter.setActionType("提交"); |
| | | ; |
| | |
| | | " and (isnull(@ActionType,'') = '' or a.ActionType in (select list from GetInStr( @ActionType)) )\n" + |
| | | " and (isnull(@FilterFormId,0) = 0 or a.formid = isnull(@FilterFormId,0))\n"; |
| | | if (messageParameter.getIsfinshed() == 1) { |
| | | sql += " and curstatus = 'Undone' \n"; |
| | | sql += " and curstatus = 'Undone' and isnull(a.isRead,0) = 0 \n"; |
| | | }else if (messageParameter.getIsfinshed() == 2) { |
| | | sql += " and curstatus = 'Finished' \n"; |
| | | }else { |
| | | sql += " and curstatus = 'Finished' and isnull(a.isRead,0) = 0 \n"; |
| | | }else if (messageParameter.getIsfinshed() == 3||("抄送我的".equals(actionType)&&messageParameter.getIsfinshed()==0)){ |
| | | //在线交流,通知 |
| | | if(messageParameter.getMsgType()==4) { |
| | | //未读 |
| | |
| | | //已读 |
| | | sql += " and isnull(isRead,0) = 1 \n"; |
| | | } |
| | | |
| | | } |
| | | sql +=" group by a.FormId \n"+ |
| | | " ) a \n" + |