@Override public void updateWorkTime(String pid,String id, String name, String startTime, String endTime) throws Exception { executor.update("updateWorkTime", name, startTime,endTime,id); } @Override
@Override public void updateSingleSub(String appId, String userId, String pendingType) throws Exception { executor.update("updateSingleSub",pendingType, appId, userId); } @Override
private void _updateOrganizationStatus(String orgid, String status ) throws Exception { executor.update("updateOrganizationStatus", status,orgid); } @Override
@Override public void updateArea(String areaId,String areaName,String areaDesc,String areaDefault)throws Exception{ executor.update("updateArea", areaName,areaDesc, areaDefault,areaId); } @Override
private void _upatestatus(int user_id,int status) throws Exception { this.executor.update("updateuserstatus", status,user_id); }
@Override public void updateSingleArrange(String year,String dateOfYear, String areaId, String week, String type) throws Exception { executor.update("updateSingleArrange", type,dateOfYear, year, areaId, week); } @Override
@Override public void updateWorkDate(String id, String name, String desc, String startDate, String endDate) throws Exception { executor.update("updateWorkDate", name, desc,startDate, endDate,id); } @Override
/** * 修改委托待办状态 * @param entrustId * @param sts * @throws Exception */ public void unUseEntrustInfo(String entrustId, String sts) throws Exception{ if(!StringUtils.isEmpty(entrustId)){ executor.update("updateWfEntrustStsById", sts, entrustId); }else{ throw new Exception("entrustId is empty"); } }
public void updateOrganizationStatus(String orgid, String status)throws SmOrganizationException{ try { this.executor.update("updateOrganizationStatus", status,orgid) ; } catch (SQLException e){ throw new SmOrganizationException(e); } }
public void buildUserOrgRelationWithEventTrigger(String userId,String orgid) throws SmOrganizationException{ try { this.executor.update("buildUserOrgRelationWithEventTrigger", orgid,userId) ; } catch (SQLException e){ throw new SmOrganizationException(e); } } public void updateOrganizationStatus(String orgid, String status)throws SmOrganizationException{
String DEPLOYMENT_ID_ = (String)procdef.get("DEPLOYMENT_ID_"); String ID_ = (String)procdef.get("ID_"); executor.update("updateRunTasks", ID_,KEY_,ver ); executor.update("updateExecutes", ID_,KEY_,ver ); executor.update("updateJobs", ID_,KEY_,ver ); executor.update("updateIdentitylinks", ID_,KEY_,ver ); executor.update("updateTaskinsts", ID_,KEY_,ver ); executor.update("updateProcinsts", ID_,KEY_,ver ); executor.update("updateActinsts", ID_,KEY_,ver ); String likekey = KEY_ + ":%";
/** (non-Javadoc) * @see com.frameworkset.platform.admin.service.SmUserService#resetpassword(java.lang.String) */ @Override public void resetpassword(String userId) throws SmUserException { String newPassword = EncrpyPwd.encodePassword("123456"); try { executor.update("resetpassword", newPassword,userId); } catch (Exception e) { throw new SmUserException("reset password failed:", e); } } public String modifypassword(String userId,String newPassword,String newPasswordSecond,String oldPassword) throws SmUserException{
@Override public Result updatePassword(int user_id,String password) { Result result = new Result(); try { executor.update("updateuserpassword", EncrpyPwd.encodePassword(password),new Date(),user_id); result.setCode(Result.ok); result.setOperationData(""+user_id); } catch (Exception e) { result.setCode(Result.fail); String m = new StringBuilder().append("更新用户").append(user_id).append("口令失败:").append(e.getMessage()).toString(); result.setErrormessage(m); log.error(m,e); } return result; }
/** * 更新日志模块状态 * status:0 启用,1禁用 * @see com.frameworkset.platform.admin.service.LogManager#updatelogModuleStatus(java.lang.String, java.lang.String) */ public boolean updatelogModuleStatus(String status, String moduleId) throws LogException { boolean b = false; int _status = 0; // 0是记录日志 if (status.equals("0")) { _status = 0; } else { _status = 1; } try { this.executor.update("updatelogModuleStatus", _status,moduleId); String logmodule = this.executor.queryObject(String.class, "getModuleCode", moduleId); if ("0".equals(status)) { map.put(logmodule, new Integer(0)); } else { map.put(logmodule, new Integer(1)); } b = true; } catch (SQLException e) { throw new LogException(e); } return b; }
@Override public void saveMessageType(String processKey, String messagetempleid, String emailtempleid, String noticeId, int iscontainholiday, int noticerate) { try { // 新增 if (StringUtil.isEmpty(noticeId)) { noticeId = java.util.UUID.randomUUID().toString(); executor.insert("insertProTemplate_wf", noticeId, processKey, messagetempleid, emailtempleid, iscontainholiday, noticerate); } else {// 修改 executor.update("updateProTemplate_wf", messagetempleid, emailtempleid, iscontainholiday, noticerate, noticeId); } } catch (SQLException e) { throw new ProcessException(e); } }
public void deleteSmOrganization(String orgId) throws SmOrganizationException { try { executor.update("moveUsertoDaigang", orgId); executor.delete("removeOrgManager", orgId); executor.delete("deleteByKey", orgId); } catch (Throwable e) { throw new SmOrganizationException("delete SmOrganization failed::orgId=" + orgId, e); } } public void deleteBatchSmOrganization(String... orgIds) throws SmOrganizationException {
public String modifypassword(String userId,String newPassword,String newPasswordSecond,String oldPassword) throws SmUserException{ try { if(!newPassword.equals(newPasswordSecond)){ return "两次输入口令不一致!"; } if(oldPassword != null && !oldPassword.equals("")) { String encrptoldPassword = EncrpyPwd.encodePassword(oldPassword); int exist = executor.queryObject(int.class, "oldPasswordright", userId,encrptoldPassword); if(exist ==0){ return "旧口令不正确!"; } } String encrptnewPassword = EncrpyPwd.encodePassword(newPassword); executor.update("resetpassword", encrptnewPassword,userId); return "success"; } catch (Exception e) { throw new SmUserException("reset password failed:", e); } } /** (non-Javadoc)
@Override public void addIsContainHoliday(String processKey, int IsContainHoliday) throws Exception { if (StringUtil.isEmpty(processKey)) { throw new Exception("设置流程工时处理是否包含节假日出错,processKey是空"); } TransactionManager tm = new TransactionManager(); try { tm.begin(); String noticeId = executor.queryField("queryNoticeIdByProKey", processKey); if (StringUtil.isNotEmpty(noticeId)) { executor.update("updateProIsContainHoliday_wf", IsContainHoliday, noticeId); } else { executor.insert("insertProIsContainHoliday_wf", java.util.UUID .randomUUID().toString(), processKey, IsContainHoliday); } tm.commit(); } finally { tm.release(); } }
public void addSmOrganization(SmOrganization smOrganization) throws SmOrganizationException { // 业务组件 TransactionManager tm = new TransactionManager(); try { tm.begin(); int org_sn = executor.queryObject(int.class, "selectMaxSNofdepart", smOrganization.getParentId()); smOrganization.setOrgSn(org_sn); executor.insertBean("addSmOrganization", smOrganization); String orgtreelevel = null; if(smOrganization.getParentId() == null || smOrganization.getParentId().equals("0")) orgtreelevel = OrgTreeLevel.TREE_BASE + OrgTreeLevel.CUT_UP + smOrganization.getOrgId(); else { orgtreelevel = executor.queryObject(String.class, "getorgtreelevel", smOrganization.getParentId()); orgtreelevel = orgtreelevel+OrgTreeLevel.CUT_UP + smOrganization.getOrgId(); } executor.update("updateorgtreelevel", orgtreelevel,smOrganization.getOrgId()); tm.commit(); } catch (Throwable e) { throw new SmOrganizationException("add SmOrganization failed:", e); } finally { tm.release(); } } public void deleteSmOrganization(String orgId) throws SmOrganizationException {