- 博客(37)
- 收藏
- 关注
原创 大excel上传
[code="java"]package com.sf.novatar.tpl.util;import java.io.File;import java.io.FileNotFoundException;import java.io.IOException;import java.io.InputStream;import java.util.List;import...
2017-03-02 20:37:39 170
原创 根据excel格式创建数据库
1、power designer 创建物理模型,点击tools-》execute commands-》run script-》打开脚本run;
2017-02-17 17:35:31 261
原创 java
[code="java"]/***service层代码*//** * 2016年8月31日 80001092方法说明:导出盘点差异 * @param bean * void */ @SuppressWarnings("unchecked") public void exportStockDiffInfo(BeanBase bean) {...
2016-09-22 15:49:16 68
js常用格式化
[code="js"]Date.prototype.format = function(format) //author: meizz{ var o = { "M+" : this.getMonth()+1, //month "d+" : this.getDate(), //day "h+" : this.getHours(), //hour...
2016-09-22 15:27:10 113
原创 Spring @autowired注解
[code="java"]spring-mvc @autowired注解:使用@autowired注解自动注入一个接口时,如果该接口只有一个实现类,则不用指定//接口只有一个实现类,对象sysConfigurationsDao不用与ISysConfigurationsService的实现类里的@Service("sysConfigurationsService") 名称一致@Aut...
2016-06-15 16:28:56 156
mysql分页
[code="java"]package com.sfpay.framework.base.pagination;import java.io.Serializable;import java.util.Collection;//Ipage接口public interface IPage extends Serializable{ public ...
2016-06-14 14:06:05 88
原创 EL表达式
[code="html"]el中保留字empty与null的区别先看例子:Test.jsp代码 name:${param.name } empty处理结果: ${empty param.name } ==null处理结果:${param.name == null } 地址栏输入:地址栏输入:http://127.0.0.1:8080/test/test.js...
2016-04-29 13:42:25 46
lambda表达式和匿名内部类
[code="java"]public class TestMain { public static void main(String[] args) { TT tt = s -> { List list = Arrays.asList(s); list.forEach( ss -> System.out.println(ss)); }; tt.t...
2016-04-25 09:13:56 98
原创 js 匿名函数
[code="html"](function () { var yQuery = (function () { var yQuery = function () { return yQuery.fn.init(); }; yQuery.f...
2016-04-14 16:44:33 48
原创 mysql find_in_set函数使用
[code="sql"]SELECT BRANCH_CODE, BRANCH_NAME, iae.FACE_AMT, iae.SPEC, iae.BEGIN_NO, iae.END_NO, (iae.PASS_BEN*iae.SPEC) AS RESERVE_COUNT, iae.CODE, iae.T...
2016-04-13 14:56:48 60
原创 Mybatis 传入List参数
[code="java"]//dao 代码 如果传入的参数是数组,也一样void insertDefaultMsg(@Param("idsList") ArrayList idsList);//xml文件 UPDATE plf_pur_delivery_plan p SET p.promise_delivery_amount = p.quanti...
2016-04-13 13:51:57 514
原创 js Map
[code="js"]function Map() { this.elements = new Array(); //获取MAP元素个数 this.size = function() { return this.elements.length; } //判断MAP是否为空 this.isEmpty = function() { return (this.el...
2016-03-16 16:25:32 146
原创 存储过程
[code="sql"]DROP PROCEDURE IF EXISTS add_att_batch_id; DELIMITER // #将“;”转意CREATE PROCEDURE add_att_batch_id() BEGIN DECLARE CurrentDatabase VARCHAR (100) ; SELECT DATABASE() INTO...
2016-03-16 15:51:27 64
原创 spring@value注解
Spring3中用注解直接注入properties中的值 @Servicepublic class TestService{ @Value("${sytem.username}") String loginUserName;}在spring中定义资源文件:或者org.springframework.beans.factory.config.PropertyPla...
2016-03-16 13:48:31 83
原创 AVA-反射-getGenericSuperclass()介绍
[code="java"] 1 public class Person { 2 3 } 4 5 import java.lang.reflect.ParameterizedType; 6 import java.lang.reflect.Type; 7 8 public class Student extends Person { 9 public sta...
2016-03-15 17:00:16 80
原创 excel上传解析
[code="java"]private List check(Workbook workBook) { List excelValueList = null; // 待导入的数据 int import_wb_sheetNos = workBook.getNumberOfSheets(); if (import_wb_sheetNos == 0) { t...
2016-03-15 15:34:35 59
java 反射机制应用
[code="java"]public class BaseController { /** * 通过指定的bean处理业务,非核心流程,不能支持java 动态代理对象@transactional注解的类 * @param bean * @throws Throwable */ @SuppressWarnings("unchecked") protec...
2016-03-14 17:04:16 67
原创 Jqgrid表头自动换行
jqgrid表头过长,如果table的header部分字段太多或字段文字太长需要自动换行时,可尝试如下css。[code="css"] th.ui-th-column div { white-space: normal !important; height: auto !important; padding: 0px; ...
2016-03-14 10:06:35 204
数据库配置常量查询
package com.sf.novatar.tpl.util;import java.util.HashMap;import java.util.List;import java.util.Map;import javax.annotation.PostConstruct;import javax.annotation.Resource;import org....
2016-03-12 10:08:10 616
art.dialog本页面下载对话框
[code="js"]function fileDownload(id,imageDataName) { var params ; params = "&content=" + "id:"+id+"|imageDataName:" + imageDataName; params = "&needcontrolprocess=taxFavInfo.downloadImag...
2016-03-11 14:39:40 99
jquery.validate.min.js 非空验证
$("#dataForm").validate({ //debug: true, rules: { attachment:"required" }, messages: { attachment: "附件不能为空" }, errorPlacement: function(error, e...
2016-03-04 10:24:55 359
文件上传、下载
//jsp页面代码 文件上传 var upload = { filetypelist:"doc|docx|xls|xlsx|pdf", n:0, // 自增 用于生成 file id isIE: function() { var isIE = false; var userAgen...
2016-02-18 17:48:33 101
apache commons fileupload 组件上传文件
package com.sf.novatar.plf.controller;import java.io.File;import java.io.IOException;import java.io.PrintWriter;import java.util.Iterator;import java.util.List;import javax.servlet.htt...
2016-02-18 16:04:16 68
原创 导出excel文件
[code="java"]package com.sf.novatar.tpl.util;import java.io.IOException;import java.io.InputStream;import java.io.OutputStream;import java.lang.reflect.InvocationTargetException;import j...
2016-02-17 15:20:04 80
原创 使用apache commons组件发送邮件
[code="java"]package com.sf.novatar.plf.utils;import java.io.File;import java.io.UnsupportedEncodingException;import java.net.MalformedURLException;import java.net.URL;import javax.act...
2016-02-17 11:24:33 114
java 上传解析excel文件
/////////////////页面js代码var planMonth = "${param.planMonth}";function import_rollPlan() { var fileName = $("#excel").val(); if($("#excel").val()==''){ art.dialog({ content : "请选择文件",...
2016-02-17 11:18:12 167
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人