mes:spring mvc mes系统

  • W8_613601
    了解作者
  • 7.9MB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-13 12:51
    上传日期
IE-MES IE-MES制造执行系统由深圳市迈鼎盛信息技术有限公司的研发团队倾心奉献,其定位于制造执行系统的Java开源版本,系统包括系统管理、车间基础数据建模、计划管理、物料控制、生产执行、质量管理、库存管理、看板管理、数据分析等主体功能模块。广泛应用于汽车、高科技电子、医疗仪器、SMT等离散行业。通过精确物料追溯以及对人员、时间、操作信息的准确记录,为物料管理、生产控制提供准确的参考数据,以便进行预估和统计分析。 系统搭建起来也非常简单: 1、使用readMe.txt中的数据库脚本刷一下MySQL数据库; 2、源码采用maven管理,可以直接导入eclipse,更改数据源配置即可run起来,登录账号:admin,密码:123456。 迈鼎盛已经研发出IE-MES v2.0商业版本,有意向进行开发商业项目合作的,可以加微信j285549265,渴望热爱开源、热爱技术的小伙伴来信咯! 研
mes-master.zip
内容介绍
/* * Copyright 2009-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ibatis.executor.resultset; import java.sql.CallableStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; import java.util.Map.Entry; import org.apache.ibatis.cache.CacheKey; import org.apache.ibatis.executor.ErrorContext; import org.apache.ibatis.executor.Executor; import org.apache.ibatis.executor.ExecutorException; import org.apache.ibatis.executor.loader.ResultLoader; import org.apache.ibatis.executor.loader.ResultLoaderMap; import org.apache.ibatis.executor.parameter.ParameterHandler; import org.apache.ibatis.executor.result.DefaultResultContext; import org.apache.ibatis.executor.result.DefaultResultHandler; import org.apache.ibatis.mapping.BoundSql; import org.apache.ibatis.mapping.Discriminator; import org.apache.ibatis.mapping.MappedStatement; import org.apache.ibatis.mapping.ParameterMapping; import org.apache.ibatis.mapping.ParameterMode; import org.apache.ibatis.mapping.ResultMap; import org.apache.ibatis.mapping.ResultMapping; import org.apache.ibatis.reflection.MetaClass; import org.apache.ibatis.reflection.MetaObject; import org.apache.ibatis.reflection.factory.ObjectFactory; import org.apache.ibatis.session.AutoMappingBehavior; import org.apache.ibatis.session.Configuration; import org.apache.ibatis.session.ResultContext; import org.apache.ibatis.session.ResultHandler; import org.apache.ibatis.session.RowBounds; import org.apache.ibatis.type.TypeHandler; import org.apache.ibatis.type.TypeHandlerRegistry; /** * @author Clinton Begin * @author Eduardo Macarron */ public class DefaultResultSetHandler implements ResultSetHandler { private static final Object NO_VALUE = new Object(); private final Executor executor; private final Configuration configuration; private final MappedStatement mappedStatement; private final RowBounds rowBounds; private final ParameterHandler parameterHandler; private final ResultHandler resultHandler; private final BoundSql boundSql; private final TypeHandlerRegistry typeHandlerRegistry; private final ObjectFactory objectFactory; // nested resultmaps private final Map<CacheKey, Object> nestedResultObjects = new HashMap<CacheKey, Object>(); private final Map<CacheKey, Object> ancestorObjects = new HashMap<CacheKey, Object>(); private final Map<String, String> ancestorColumnPrefix = new HashMap<String, String>(); public static final String BATCHSAVE = ".BaseMapper."; // multiple resultsets private final Map<String, ResultMapping> nextResultMaps = new HashMap<String, ResultMapping>(); private final Map<CacheKey, List<PendingRelation>> pendingRelations = new HashMap<CacheKey, List<PendingRelation>>(); private static class PendingRelation { public MetaObject metaObject; public ResultMapping propertyMapping; } public DefaultResultSetHandler(Executor executor, MappedStatement mappedStatement, ParameterHandler parameterHandler, ResultHandler resultHandler, BoundSql boundSql, RowBounds rowBounds) { this.executor = executor; this.configuration = mappedStatement.getConfiguration(); this.mappedStatement = mappedStatement; this.rowBounds = rowBounds; this.parameterHandler = parameterHandler; this.boundSql = boundSql; this.typeHandlerRegistry = configuration.getTypeHandlerRegistry(); this.objectFactory = configuration.getObjectFactory(); this.resultHandler = resultHandler; } // // HANDLE OUTPUT PARAMETER // public void handleOutputParameters(CallableStatement cs) throws SQLException { final Object parameterObject = parameterHandler.getParameterObject(); final MetaObject metaParam = configuration.newMetaObject(parameterObject); final List<ParameterMapping> parameterMappings = boundSql.getParameterMappings(); for (int i = 0; i < parameterMappings.size(); i++) { final ParameterMapping parameterMapping = parameterMappings.get(i); if (parameterMapping.getMode() == ParameterMode.OUT || parameterMapping.getMode() == ParameterMode.INOUT) { if (ResultSet.class.equals(parameterMapping.getJavaType())) { handleRefCursorOutputParameter((ResultSet) cs.getObject(i + 1), parameterMapping, metaParam); } else { final TypeHandler<?> typeHandler = parameterMapping.getTypeHandler(); metaParam.setValue(parameterMapping.getProperty(), typeHandler.getResult(cs, i + 1)); } } } } private void handleRefCursorOutputParameter(ResultSet rs, ParameterMapping parameterMapping, MetaObject metaParam) throws SQLException { try { final String resultMapId = parameterMapping.getResultMapId(); final ResultMap resultMap = configuration.getResultMap(resultMapId); final DefaultResultHandler resultHandler = new DefaultResultHandler(objectFactory); final ResultSetWrapper rsw = new ResultSetWrapper(rs, configuration); handleRowValues(rsw, resultMap, resultHandler, new RowBounds(), null); metaParam.setValue(parameterMapping.getProperty(), resultHandler.getResultList()); } finally { closeResultSet(rs); // issue #228 (close resultsets) } } // // HANDLE RESULT SETS // @SuppressWarnings({ "unchecked", "rawtypes" }) public List<Object> handleResultSets(Statement stmt) throws SQLException { ErrorContext.instance().activity("handling results").object(mappedStatement.getId()); final List<Object> multipleResults = new ArrayList<Object>(); int resultSetCount = 0; ResultSetWrapper rsw = getFirstResultSet(stmt); List<ResultMap> resultMaps = mappedStatement.getResultMaps(); int resultMapCount = resultMaps.size(); validateResultMapsCount(rsw, resultMapCount); while (rsw != null && resultMapCount > resultSetCount) { ResultMap resultMap = resultMaps.get(resultSetCount); handleResultSet(rsw, resultMap, multipleResults, null); rsw = getNextResultSet(stmt); cleanUpAfterHandlingResultSet(); resultSetCount++; } String[] resultSets = mappedStatement.getResulSets(); if (resultSets != null) { while (rsw != null && resultSetCount < resultSets.length) { ResultMapping parentMapping = nextResultMaps.get(resultSets[resultSetCount]); if (parentMapping != null) { String nestedResultMapId = parentMapping.getNestedResultMapId(); ResultMap resultMap = configuration.getResultMap(nestedResultMapId); handleResultSet(rsw, resultMap, null, parentMapping); } rsw = getNextResultSet(stmt); cleanUpAfterHandlingResultSet(); resultSetCount++; } } List<Object> lists = collapseSingleResultList(multipleResults); if(mappedStatement.getId().indexOf(BATCHSAVE)>-1){ try { List<Object> mlist = new ArrayList<Object>(); Object parameterObject = boundSql.getParameterObject(); Map map = (Map) parameterObject; Object o3 = null; if(null!=map){ o3=map.get("param3"); } for (Object object : lists) { Map<String, Object> m = (Map) object; Object o = null; if(null!=o3){ Class fm = (Class) o3; o= fm.newInstance(); }else{ o = (Object) parameterObject.ge
评论
    相关推荐
    • Spring MVC eclipse开发(Demo源码)
      Spring MVC eclipse开发(Demo源码)
    • MIDlet控件实例项目(mvc)
      这个是Eclipse项目,MIDlet控件的例子,分成input, output 和midlet.有助于理解控件的使用和分层。
    • 自定义MVC结构-Eclipse
      最近自学java中的框架-struts写了一些小例子,这都是很经典的程序,如果大家瞧得起要下载去看看,顺便给俺找找不足的地方。我的qq 821865130 email qingtian_hechen@163.com 希望大家能多多给我帮助...在此谢谢各位!!
    • Eclipse中spring mvc配置实例
      页面登陆的springmvc实例
    • mvc实现登陆
      使用mvc架构实现的登陆,用eclipse开发,能运行的程序
    • spring mvc
      spring mvc最小代码。spring mvc最小代码。spring mvc最小代码。spring mvc最小代码。
    • eclipse入门资料
      eclipse入门级的资料,包括怎么样安装eclipse,怎样安装插件,以及eclipse的简单操作
    • Eclipse开发的JSP科技企业信息管理系统
      运用jsp的MVC模式开发,是比较好的参考实例。适合有一定的基础知识的读者
    • SSH商城MVC
      商城开源框架
    • SSM-eclipse
      SSM(Spring+SpringMVC+MyBatis)框架集由Spring、SpringMVC、MyBatis三个开源框架整合而成,常作为数据源较简单的web项目的框架