| | |
| | | import com.vci.common.util.ThreeDES; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.framework.data.UserInfo; |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | | import com.vci.frameworkcore.compatibility.SmUserQueryServiceI; |
| | | import com.vci.frameworkcore.pagemodel.SmPasswordStrategyVO; |
| | | import com.vci.frameworkcore.pagemodel.SmUserVO; |
| | | import com.vci.omd.utils.ObjectTool; |
| | | import com.vci.starter.web.enumpck.BooleanEnum; |
| | | import com.vci.starter.web.enumpck.UserSecretEnum; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.vci.frameworkcore.constant.FrameWorkBusLangCodeConstant.DATA_OID_NOT_EXIST; |
| | | import static com.vci.web.util.WebUtil.arryAndSqlToClientBusinessObject; |
| | | import static com.vci.web.util.WebUtil.arryAndSqlToBusinessObject; |
| | | |
| | | /** |
| | | * 用户的查询相关的服务,可以兼容老平台和老的pdm |
| | |
| | | try{ |
| | | String[][] sqlQueryResult = platformClientUtil.getBOFService().getSqlQueryResult(sql + fromSql, null); |
| | | if(sqlQueryResult.length>0){ |
| | | com.vci.client.bof.ClientBusinessObject cbo = arryAndSqlToClientBusinessObject(queryWrapper.getSelectFieldSql(),sqlQueryResult[0]); |
| | | BusinessObject cbo = arryAndSqlToBusinessObject(queryWrapper.getSelectFieldSql(),sqlQueryResult[0]); |
| | | return cbo2VO(cbo); |
| | | } |
| | | }catch (Exception e){ |
| | |
| | | + " left join pluserdept up on " + queryWrapper.getTableNick() + ".pluid = up.pluseruid left join pldept pkDepartment on up.pldeptuid = pkDepartment.pluid " + |
| | | " left join PLUSERPASSWORDSTRATEGY pkUserPassword on " +queryWrapper.getTableNick() + ".pluid = pkUserPassword.pluseruid " + |
| | | queryWrapper.getLinkTableSql() + (StringUtils.isNotBlank(queryWrapper.getWhereSql())?(" where " + queryWrapper.getWhereSql()):""); |
| | | List<com.vci.client.bof.ClientBusinessObject> dataList = boService.queryBySql(sql + fromSql, null); |
| | | List<BusinessObject> dataList = boService.queryBySql(sql + fromSql, null); |
| | | if(!CollectionUtils.isEmpty(dataList)){ |
| | | dataList.stream().forEach(cbo->{ |
| | | userVOList.add(cbo2VO(cbo)); |
| | |
| | | + " left join pluserdept up on " + queryWrapper.getTableNick() + ".pluid = up.pluseruid left join pldept pkDepartment on up.pldeptuid = pkDepartment.pluid " + |
| | | " left join PLUSERPASSWORDSTRATEGY pkUserPassword on " +queryWrapper.getTableNick() + ".pluid = pkUserPassword.pluseruid " + (QUERY_FIELD_ROLE.equalsIgnoreCase(queryField)?roleSql:"") + |
| | | queryWrapper.getLinkTableSql() + (StringUtils.isNotBlank(queryWrapper.getWhereSql())?(" where " + queryWrapper.getWhereSql()):""); |
| | | List<com.vci.client.bof.ClientBusinessObject> dataList = boService.queryBySql(sql + fromSql, null); |
| | | List<BusinessObject> dataList = boService.queryBySql(sql + fromSql, null); |
| | | if(!CollectionUtils.isEmpty(dataList)){ |
| | | dataList.stream().forEach(cbo->{ |
| | | userVOList.add(cbo2VO(cbo)); |
| | |
| | | * @param cbo 业务数据 |
| | | * @return 显示对象 |
| | | */ |
| | | private SmUserVO cbo2VO(com.vci.client.bof.ClientBusinessObject cbo){ |
| | | private SmUserVO cbo2VO(BusinessObject cbo){ |
| | | SmUserDO userDO = new SmUserDO(); |
| | | SmUserVO userVO = new SmUserVO(); |
| | | WebUtil.copyValueToObjectFromCbos(cbo,userDO); |
| | |
| | | } |
| | | } |
| | | } |
| | | List<com.vci.client.bof.ClientBusinessObject> dataList = boService.queryBySql((isPage?("select " + pageSelectList.stream().collect(Collectors.joining(","))+ " from (select A.*,rownum RN from ( "):"") + sql + fromSql + (isPage?pageSubfix:""), null); |
| | | List<BusinessObject> dataList = boService.queryBySql((isPage?("select " + pageSelectList.stream().collect(Collectors.joining(","))+ " from (select A.*,rownum RN from ( "):"") + sql + fromSql + (isPage?pageSubfix:""), null); |
| | | if(!CollectionUtils.isEmpty(dataList)){ |
| | | dataList.stream().forEach(cbo->{ |
| | | userVOList.add(cbo2VO(cbo)); |
| | |
| | | + " left join pluserdept up on " + queryWrapper.getTableNick() + ".pluid = up.pluseruid left join pldept pkDepartment on up.pldeptuid = pkDepartment.pluid " + |
| | | " left join PLUSERPASSWORDSTRATEGY pkUserPassword on " +queryWrapper.getTableNick() + ".pluid = pkUserPassword.pluseruid " + |
| | | queryWrapper.getLinkTableSql() + (StringUtils.isNotBlank(queryWrapper.getWhereSql())?(" where " + queryWrapper.getWhereSql()):""); |
| | | List<com.vci.client.bof.ClientBusinessObject> dataList = boService.queryBySql(sql + fromSql, null); |
| | | List<BusinessObject> dataList = boService.queryBySql(sql + fromSql, null); |
| | | List<Tree> treeList = new ArrayList<>(); |
| | | if(!CollectionUtils.isEmpty(dataList)){ |
| | | dataList.stream().forEach(cbo->{ |
| | | Tree tree = new Tree(); |
| | | tree.setOid(cbo.getOid()); |
| | | tree.setText(cbo.getId() + " " + cbo.getName()); |
| | | tree.setOid(cbo.oid); |
| | | tree.setText(cbo.id + " " + cbo.name); |
| | | Map<String,String> attributeMap = new HashMap<>(); |
| | | WebUtil.copyValueToCboFromMap(cbo,attributeMap); |
| | | tree.setAttributes(attributeMap); |
| | |
| | | String sql = " select plpassword from pluser where pluid = :userOid"; |
| | | Map<String,String> conditionMap = new HashMap<>(); |
| | | conditionMap.put("userOid",userOid.trim()); |
| | | List<com.vci.client.bof.ClientBusinessObject> clientBusinessObjectList = boService.queryBySql(sql, conditionMap); |
| | | if(CollectionUtils.isEmpty(clientBusinessObjectList)){ |
| | | List<BusinessObject> BusinessObjectList = boService.queryBySql(sql, conditionMap); |
| | | if(CollectionUtils.isEmpty(BusinessObjectList)){ |
| | | return false; |
| | | } |
| | | |
| | | ThreeDES des = new ThreeDES();// 实例化一个对�? |
| | | des.getKey("daliantan0v0");// 生成密匙 |
| | | md5Password = des.getEncString(md5Password); |
| | | if(md5Password.equals(clientBusinessObjectList.get(0).getAttributeValue("plpassword"))){ |
| | | if(md5Password.equals(ObjectTool.getNewBOAttributeValue(BusinessObjectList.get(0),"plpassword"))){ |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | public SmPasswordStrategyVO getPasswordStrategyVOByOid(String oid){ |
| | | VciQueryWrapperForDO queryWrapperForDO = new VciQueryWrapperForDO(null, SmPasswordStrategyDO.class); |
| | | queryWrapperForDO.eq("oid",oid.trim()); |
| | | List<com.vci.client.bof.ClientBusinessObject> cboList = boService.queryBySql(queryWrapperForDO.getSelectFieldSql() + " from plpasswordstrategy " + |
| | | List<BusinessObject> cboList = boService.queryBySql(queryWrapperForDO.getSelectFieldSql() + " from plpasswordstrategy " + |
| | | queryWrapperForDO.getTableNick() + queryWrapperForDO.getLinkTableSql() + |
| | | (StringUtils.isBlank(queryWrapperForDO.getWhereSql()) ? "" : (" where " + queryWrapperForDO.getWhereSql())), null); |
| | | if(!CollectionUtils.isEmpty(cboList)){ |