parent
922acc9840
commit
e1d00109e4
@ -0,0 +1,16 @@
|
||||
<component name="libraryTable">
|
||||
<library name="nls_charset11">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/web/WEB-INF/lib/nls_charset11.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/web/WEB-INF/lib/nls_charset12.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/web/WEB-INF/lib/tomcat-i18n-es.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/web/WEB-INF/lib/tomcat-i18n-es-11.0.0-M14.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/web/WEB-INF/lib/tomcat-i18n-fr.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/web/WEB-INF/lib/tomcat-i18n-fr-11.0.0-M14.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/web/WEB-INF/lib/tomcat-i18n-ja.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/web/WEB-INF/lib/tomcat-i18n-ja-11.0.0-M14.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
||||
@ -1,124 +0,0 @@
|
||||
package com.zky.bjca;
|
||||
|
||||
import cn.org.bjca.client.security.SecurityEngineDeal;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.*;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
public class FileEnDe {
|
||||
public static String encryptFile(@RequestParam("file") MultipartFile file) {
|
||||
try {
|
||||
// 加载证书库
|
||||
SecurityEngineDeal.setProfilePath("D:\\Java\\program\\newProgram\\zhyw\\web\\config\\config2");
|
||||
SecurityEngineDeal sed =
|
||||
SecurityEngineDeal.getInstance("SVSDefault");
|
||||
String key = sed.genRandom(24);
|
||||
|
||||
|
||||
String savePath = "upfiles/";
|
||||
String inFile = file.getOriginalFilename();
|
||||
|
||||
String fileName = file.getOriginalFilename().substring(0, file.getOriginalFilename().lastIndexOf("."));
|
||||
|
||||
File directory = new File(savePath);
|
||||
if (!directory.exists()) {
|
||||
directory.mkdirs();
|
||||
}
|
||||
|
||||
//Path path = Paths.get("upfiles/keys/key"+ inFile);
|
||||
|
||||
Path path = Paths.get("src/main/resources/upfiles/keys/key" + fileName + ".txt");
|
||||
|
||||
Files.write(path, key.getBytes(StandardCharsets.UTF_8));
|
||||
|
||||
System.out.println(key);
|
||||
|
||||
|
||||
String fileinpath = savePath + inFile;
|
||||
FileOutputStream fos = new FileOutputStream(fileinpath);
|
||||
fos.write(file.getBytes());
|
||||
fos.close();
|
||||
System.out.println(fileinpath);
|
||||
String outFile = String.valueOf(new File("src/main/resources/upfiles/fileencode/" + inFile));
|
||||
boolean encRes = sed.encryptFile(key, fileinpath, outFile);
|
||||
System.out.println(encRes);
|
||||
return "文件加密成功";
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return "文件加密失败";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//文件解密
|
||||
public static String decryptFile(MultipartFile file) {
|
||||
try {
|
||||
// 加载证书库
|
||||
SecurityEngineDeal.setProfilePath("D:\\Java\\program\\newProgram\\zhyw\\web\\config\\config2");
|
||||
SecurityEngineDeal sed =
|
||||
SecurityEngineDeal.getInstance("SVSDefault");
|
||||
//String key = sed.genRandom(24);
|
||||
|
||||
String inFile = file.getOriginalFilename();
|
||||
|
||||
String fileName = file.getOriginalFilename().substring(0, file.getOriginalFilename().lastIndexOf("."));
|
||||
|
||||
|
||||
String savePath = "upfiles/";
|
||||
File directory = new File(savePath);
|
||||
if (!directory.exists()) {
|
||||
directory.mkdirs();
|
||||
}
|
||||
String filePath = savePath + inFile;
|
||||
FileOutputStream fos = new FileOutputStream(filePath);
|
||||
fos.write(file.getBytes());
|
||||
fos.close();
|
||||
|
||||
String path = String.valueOf(Paths.get("src/main/resources/upfiles/keys/key" + fileName + ".txt"));
|
||||
String key = readFileToString(path);
|
||||
|
||||
System.out.println(key);
|
||||
System.out.println(filePath);
|
||||
String outFile = String.valueOf(new File("src/main/resources/upfiles/filedecode/" + inFile));
|
||||
boolean decRes = sed.decryptFile(key, filePath, outFile);
|
||||
System.out.println(outFile);
|
||||
System.out.println(decRes);
|
||||
return "文件解密成功";
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return "文件解密失败";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static String readFileToString(String path) {
|
||||
// 定义返回结果
|
||||
String jsonString = "";
|
||||
BufferedReader in = null;
|
||||
try {
|
||||
in = new BufferedReader(new InputStreamReader(new FileInputStream(new File(path)), "UTF-8"));// 读取文件
|
||||
String thisLine = null;
|
||||
while ((thisLine = in.readLine()) != null) {
|
||||
jsonString += thisLine;
|
||||
}
|
||||
in.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if (in != null) {
|
||||
try {
|
||||
in.close();
|
||||
} catch (IOException el) {
|
||||
}
|
||||
}
|
||||
}
|
||||
// 返回拼接好的JSON String
|
||||
return jsonString;
|
||||
}
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
package com.zky.bjca;
|
||||
|
||||
import cn.org.bjca.chaos.jce.provider.BJCAJCEProvider;
|
||||
|
||||
import java.security.MessageDigest;
|
||||
import java.security.Security;
|
||||
|
||||
public final class SM3 {
|
||||
public static byte[] SM3Encrypt(String strSrc){
|
||||
byte[] encrypted = new byte[0];
|
||||
try{
|
||||
if (Security.getProvider("BJCAJCE") == null){
|
||||
Security.addProvider(new BJCAJCEProvider("D:\\Java\\program\\newProgram\\zhyw\\web\\config\\config1"));
|
||||
}
|
||||
MessageDigest instant = MessageDigest.getInstance("SM3","BJCAJCE");
|
||||
encrypted = instant.digest(strSrc.getBytes());//传入原文值
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return encrypted;
|
||||
}
|
||||
}
|
||||
@ -1,83 +0,0 @@
|
||||
package com.zky.bjca;
|
||||
|
||||
import cn.org.bjca.client.exceptions.*;
|
||||
import cn.org.bjca.client.security.SecurityEngineDeal;
|
||||
|
||||
|
||||
public final class Sign {
|
||||
public static byte[] DataSign(String strSrc) {
|
||||
SecurityEngineDeal.setProfilePath("D:\\Java\\program\\newProgram\\zhyw\\web\\config\\config2");
|
||||
SecurityEngineDeal sed;
|
||||
byte[] signedValueByte = new byte[0];
|
||||
try {
|
||||
sed = SecurityEngineDeal.getInstance("SVSDefault");
|
||||
byte[] data = strSrc.getBytes();
|
||||
String signedValue = sed.signData(data);
|
||||
signedValueByte = sed.base64Decode(signedValue);
|
||||
// System.out.println(signedValue);
|
||||
} catch (SVSConnectException | ApplicationNotFoundException | InitException | ParameterTooLongException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return signedValueByte;
|
||||
}
|
||||
|
||||
public static boolean DataSignVerify(String str, String signValue) {
|
||||
//传入两个参数:
|
||||
//第一个参数为需要签名的字符串
|
||||
//第二个参数为签名结果
|
||||
SecurityEngineDeal.setProfilePath("D:\\Java\\program\\newProgram\\zhyw\\web\\config\\config2");
|
||||
SecurityEngineDeal sed;
|
||||
boolean verifyRes = false;
|
||||
try {
|
||||
|
||||
sed = SecurityEngineDeal.getInstance("SVSDefault");
|
||||
String cert = sed.getServerCertificate();
|
||||
System.out.println(cert);
|
||||
|
||||
verifyRes = sed.verifySignedData(cert, str, signValue);
|
||||
System.out.println(verifyRes);
|
||||
} catch (SVSConnectException | ApplicationNotFoundException | InitException | ParameterTooLongException | ParameterInvalidException | UnkownException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return verifyRes;
|
||||
}
|
||||
|
||||
public static byte[] FileSign(String strSrc) {
|
||||
SecurityEngineDeal.setProfilePath("D:\\Java\\program\\newProgram\\zhyw\\web\\config\\config2");
|
||||
SecurityEngineDeal sed;
|
||||
byte[] signedValueByte = new byte[0];
|
||||
try {
|
||||
sed = SecurityEngineDeal.getInstance("SVSDefault");
|
||||
//byte[] data = strSrc.getBytes();
|
||||
String signedValue = sed.signFile(strSrc);
|
||||
signedValueByte = sed.base64Decode(signedValue);
|
||||
// System.out.println(signedValue);
|
||||
} catch (SVSConnectException | ApplicationNotFoundException | InitException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return signedValueByte;
|
||||
}
|
||||
|
||||
|
||||
public static boolean FileSignVerify(String str, String signValue) {
|
||||
SecurityEngineDeal.setProfilePath("D:\\Java\\program\\newProgram\\zhyw\\web\\config\\config2");
|
||||
SecurityEngineDeal sed;
|
||||
boolean verifyRes = false;
|
||||
try {
|
||||
|
||||
sed = SecurityEngineDeal.getInstance("SVSDefault");
|
||||
String cert = sed.getServerCertificate();
|
||||
System.out.println(cert);
|
||||
|
||||
verifyRes = sed.verifySignedFile(cert, str, signValue);
|
||||
System.out.println(verifyRes);
|
||||
} catch (SVSConnectException | ApplicationNotFoundException | InitException | ParameterTooLongException | ParameterInvalidException | UnkownException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return verifyRes;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -1,69 +0,0 @@
|
||||
package com.zky.bjca.cert.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zky.bjca.cert.service.ITdBjcaService;
|
||||
import com.zky.pojo.TdBjca;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
/**
|
||||
* 文件管理Controller
|
||||
*
|
||||
* @author itzky
|
||||
* @date 2023-12-22
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/login")
|
||||
public class TdBjcaController
|
||||
{
|
||||
private String prefix = "login";
|
||||
|
||||
@Autowired
|
||||
private ITdBjcaService tdBjcaService;
|
||||
|
||||
|
||||
@GetMapping()
|
||||
public String bjca()
|
||||
{
|
||||
return prefix + "/bjca";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询文件管理列表
|
||||
*/
|
||||
@PostMapping("/certid")
|
||||
@ResponseBody
|
||||
public TdBjca CertById(Long id) {
|
||||
TdBjca tdBjca = tdBjcaService.selectTdBjcaById(id);
|
||||
return tdBjca;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增文件管理
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存文件管理
|
||||
*/
|
||||
@PostMapping("/login")
|
||||
@ResponseBody
|
||||
public int addSave(TdBjca tdBjca)
|
||||
|
||||
{
|
||||
return tdBjcaService.insertTdBjca(tdBjca);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,58 +0,0 @@
|
||||
package com.zky.bjca.cert.controller;
|
||||
import org.springframework.core.io.FileSystemResource;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@Controller
|
||||
public class loginController {
|
||||
@Controller
|
||||
public class LoginController {
|
||||
|
||||
@GetMapping("/login")
|
||||
public String showLoginForm() {
|
||||
return "login";
|
||||
}
|
||||
|
||||
@PostMapping("/login")
|
||||
public String login(@RequestParam("value") String value) {
|
||||
if (value.equals("证书登录成功") ) {
|
||||
return "redirect:/home";
|
||||
} else {
|
||||
return "login.html";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/static/xtxasyn.js")
|
||||
public ResponseEntity<Resource> downloadFile() throws IOException {
|
||||
Resource fileResource = new FileSystemResource("src/main/resources/static/xtxasyn.js"); // 替换为你的文件路径
|
||||
|
||||
if (!fileResource.exists()) {
|
||||
throw new IllegalArgumentException("File not found");
|
||||
}
|
||||
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.add(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + fileResource.getFilename());
|
||||
|
||||
return ResponseEntity.ok()
|
||||
.headers(headers)
|
||||
.contentLength(fileResource.contentLength())
|
||||
.contentType(MediaType.APPLICATION_OCTET_STREAM)
|
||||
.body(fileResource);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,61 +0,0 @@
|
||||
package com.zky.bjca.cert.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zky.pojo.TdBjca;
|
||||
|
||||
/**
|
||||
* 文件管理Mapper接口
|
||||
*
|
||||
* @author itzky
|
||||
* @date 2023-12-22
|
||||
*/
|
||||
public interface TdBjcaMapper
|
||||
{
|
||||
/**
|
||||
* 查询文件管理
|
||||
*
|
||||
* @param id 文件管理主键
|
||||
* @return 文件管理
|
||||
*/
|
||||
public TdBjca selectTdBjcaById(Long id);
|
||||
|
||||
/**
|
||||
* 查询文件管理列表
|
||||
*
|
||||
* @param tdBjca 文件管理
|
||||
* @return 文件管理集合
|
||||
*/
|
||||
public List<TdBjca> selectTdBjcaList(TdBjca tdBjca);
|
||||
|
||||
/**
|
||||
* 新增文件管理
|
||||
*
|
||||
* @param tdBjca 文件管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTdBjca(TdBjca tdBjca);
|
||||
|
||||
/**
|
||||
* 修改文件管理
|
||||
*
|
||||
* @param tdBjca 文件管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTdBjca(TdBjca tdBjca);
|
||||
|
||||
/**
|
||||
* 删除文件管理
|
||||
*
|
||||
* @param id 文件管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTdBjcaById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除文件管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTdBjcaByIds(String[] ids);
|
||||
}
|
||||
@ -1,39 +0,0 @@
|
||||
package com.zky.bjca.cert.service;
|
||||
|
||||
import com.zky.pojo.TdBjca;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文件管理Service接口
|
||||
*
|
||||
* @author itzky
|
||||
* @date 2023-12-22
|
||||
*/
|
||||
public interface ITdBjcaService
|
||||
{
|
||||
/**
|
||||
* 查询文件管理
|
||||
*
|
||||
* @param id 文件管理主键
|
||||
* @return 文件管理
|
||||
*/
|
||||
public TdBjca selectTdBjcaById(Long id);
|
||||
|
||||
/**
|
||||
* 查询文件管理列表
|
||||
*
|
||||
* @param tdBjca 文件管理
|
||||
* @return 文件管理集合
|
||||
*/
|
||||
public List<TdBjca> selectTdBjcaList(TdBjca tdBjca);
|
||||
|
||||
/**
|
||||
* 新增文件管理
|
||||
*
|
||||
* @param tdBjca 文件管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTdBjca(TdBjca tdBjca);
|
||||
|
||||
}
|
||||
@ -1,59 +0,0 @@
|
||||
package com.zky.bjca.cert.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zky.bjca.cert.mapper.TdBjcaMapper;
|
||||
import com.zky.bjca.cert.service.ITdBjcaService;
|
||||
import com.zky.pojo.TdBjca;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 文件管理Service业务层处理
|
||||
*
|
||||
* @author itzky
|
||||
* @date 2023-12-22
|
||||
*/
|
||||
@Service
|
||||
public class TdBjcaServiceImpl implements ITdBjcaService
|
||||
{
|
||||
@Autowired
|
||||
private TdBjcaMapper tdBjcaMapper;
|
||||
|
||||
/**
|
||||
* 查询文件管理
|
||||
*
|
||||
* @param id 文件管理主键
|
||||
* @return 文件管理
|
||||
*/
|
||||
@Override
|
||||
public TdBjca selectTdBjcaById(Long id)
|
||||
{
|
||||
return tdBjcaMapper.selectTdBjcaById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询管理列表
|
||||
*
|
||||
* @param tdBjca 文件管理
|
||||
* @return 文件管理
|
||||
*/
|
||||
@Override
|
||||
public List<TdBjca> selectTdBjcaList(TdBjca tdBjca)
|
||||
{
|
||||
return tdBjcaMapper.selectTdBjcaList(tdBjca);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增管理
|
||||
*
|
||||
* @param tdBjca 文件管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertTdBjca(TdBjca tdBjca)
|
||||
{
|
||||
return tdBjcaMapper.insertTdBjca(tdBjca);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,14 +0,0 @@
|
||||
package com.zky.bjca.demo;
|
||||
|
||||
import cn.org.bjca.exceptions.CommonClientException;
|
||||
import cn.org.bjca.utils.Base64;
|
||||
import com.zky.bjca.SM4;
|
||||
|
||||
public class sm4demo {
|
||||
public static void main(String[] args) throws CommonClientException {
|
||||
String str = "123456";
|
||||
byte[] bytes = SM4.SM4Encrypt(str);
|
||||
String s = Base64.toBase64String(bytes);
|
||||
System.out.println(s);
|
||||
}
|
||||
}
|
||||
@ -1,220 +0,0 @@
|
||||
package com.zky.manager;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.poi.hssf.usermodel.HSSFCell;
|
||||
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
|
||||
import org.apache.poi.hssf.usermodel.HSSFDataFormat;
|
||||
import org.apache.poi.hssf.usermodel.HSSFFont;
|
||||
import org.apache.poi.hssf.usermodel.HSSFRow;
|
||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.hssf.util.HSSFColor;
|
||||
|
||||
import com.zky.pojo.ClassInfo;
|
||||
import com.zky.pojo.FileInfo;
|
||||
|
||||
public class CreateExcelUtils {
|
||||
public static void exportFileTypeQueryExcel(String fileName,List<FileInfo> files,HttpServletResponse response) throws IOException
|
||||
{
|
||||
response.reset();
|
||||
response.setContentType("application/vnd.ms-excel;charset=UTF-8");
|
||||
response.setHeader("Content-Disposition" ,"attachment;filename="+new String("文件密级统计查询报表.xls".getBytes(),"iso-8859-1"));
|
||||
SimpleDateFormat dateFormat=new SimpleDateFormat("yyyy/MM/dd");
|
||||
HSSFWorkbook workBook=new HSSFWorkbook();
|
||||
OutputStream outputStream=response.getOutputStream();
|
||||
HSSFCellStyle dateStyle=workBook.createCellStyle();
|
||||
dateStyle.setDataFormat(HSSFDataFormat.getBuiltinFormat("yy-MM-dd hh:mm:ss"));
|
||||
int i=0;
|
||||
int k=1;
|
||||
Date createTime;
|
||||
Date updateTime;
|
||||
//SimpleDateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd");
|
||||
//String createTime="";
|
||||
//String updateTime="";
|
||||
String state="";
|
||||
HSSFSheet sheet=workBook.createSheet("文件密级统计查询清单");
|
||||
HSSFRow row=sheet.createRow((short)0);
|
||||
//创建标题栏单元格字体
|
||||
HSSFFont titleFont=workBook.createFont();
|
||||
//创建标题栏样式
|
||||
HSSFCellStyle titleStyle=workBook.createCellStyle();
|
||||
//设置标题栏字体颜色
|
||||
titleFont.setColor(HSSFColor.BLUE.index);
|
||||
//设置标题栏字体样式
|
||||
titleStyle.setFont(titleFont);
|
||||
|
||||
HSSFFont contentFont=workBook.createFont();
|
||||
//创建状态异常的数据行样式
|
||||
HSSFCellStyle contentStyle=workBook.createCellStyle();
|
||||
//设置状态异常的数据行字体颜色
|
||||
contentFont.setColor(HSSFColor.RED.index);
|
||||
//为状态异常的数据行样式设置字体
|
||||
contentStyle.setFont(contentFont);
|
||||
String[] title={"文件编号","文件名称","登记部门","登记员工","文件状态","下发部门","下发员工","下发日期","接收部门","持有部门",
|
||||
"持有人员","持有日期","文件密级","紧急程度","发文层次","发放状态","接收状态","借阅状态","回收状态","提取状态","销毁状态"};
|
||||
for(String titleInfo:title)
|
||||
{
|
||||
HSSFCell cell=row.createCell(i);
|
||||
cell.setCellValue(titleInfo);
|
||||
cell.setCellStyle(titleStyle);
|
||||
i++;
|
||||
}
|
||||
for(Iterator it=files.iterator();it.hasNext();)
|
||||
{
|
||||
FileInfo classDataInfo=(FileInfo)it.next();
|
||||
HSSFRow hssfRow=sheet.createRow(k);
|
||||
hssfRow.createCell(0).setCellValue(classDataInfo.getFileId().toString().trim());
|
||||
hssfRow.createCell(1).setCellValue(classDataInfo.getFileName().toString().trim());
|
||||
hssfRow.createCell(2).setCellValue(classDataInfo.getWriteDepartName().toString().trim());
|
||||
hssfRow.createCell(3).setCellValue(classDataInfo.getWriteEmpName().toString().trim());
|
||||
if(classDataInfo.getFileState().toString().trim().equals("1"))
|
||||
{
|
||||
state="已审核";
|
||||
hssfRow.getCell(4).setCellStyle(contentStyle);
|
||||
}
|
||||
else
|
||||
{
|
||||
state="未审核";
|
||||
}
|
||||
hssfRow.createCell(4).setCellValue(state.toString().trim());
|
||||
hssfRow.createCell(5).setCellValue(classDataInfo.getProvideDepartName().toString().trim());
|
||||
hssfRow.createCell(6).setCellValue(classDataInfo.getProvideEmpName().toString().trim());
|
||||
int createLength=classDataInfo.getProvideDate().indexOf(".");
|
||||
// hssfRow.createCell(15).setCellValue(classDataInfo.getCreateDate().substring(0,createLength));
|
||||
hssfRow.createCell(7).setCellValue(classDataInfo.getProvideDate().substring(0,createLength));
|
||||
hssfRow.getCell(7).setCellStyle(dateStyle);
|
||||
hssfRow.createCell(8).setCellValue(classDataInfo.getTargetDepartName());
|
||||
hssfRow.createCell(10).setCellValue(classDataInfo.getHoldEmpName().toString().trim());
|
||||
int holdLength=classDataInfo.getHoldDate().indexOf(".");
|
||||
hssfRow.createCell(11).setCellValue(classDataInfo.getHoldDate().substring(0,holdLength));
|
||||
hssfRow.getCell(11).setCellStyle(dateStyle);
|
||||
if(classDataInfo.getFileSecret().toString().trim().equals("1"))
|
||||
{
|
||||
state="秘密";
|
||||
}
|
||||
else if(classDataInfo.getFileSecret().toString().trim().equals("2"))
|
||||
{
|
||||
state="机密";
|
||||
}
|
||||
else
|
||||
{
|
||||
state="绝密";
|
||||
}
|
||||
hssfRow.createCell(12).setCellValue(state.toString().trim());
|
||||
|
||||
if(classDataInfo.getInstancyExtent().toString().trim().equals("1"))
|
||||
{
|
||||
state="急件";
|
||||
}
|
||||
else if(classDataInfo.getInstancyExtent().toString().trim().equals("2"))
|
||||
{
|
||||
state="加急";
|
||||
}
|
||||
else
|
||||
{
|
||||
state="普通";
|
||||
}
|
||||
hssfRow.createCell(13).setCellValue(state.toString().trim());
|
||||
if(classDataInfo.getProvideLevel().toString().trim().equals("1"))
|
||||
{
|
||||
state="发往市级";
|
||||
}
|
||||
else
|
||||
{
|
||||
state="发往区县";
|
||||
}
|
||||
hssfRow.createCell(14).setCellValue(state.toString().trim());
|
||||
if(classDataInfo.getProvideState().toString().trim().equals("1"))
|
||||
{
|
||||
state="已发放";
|
||||
hssfRow.getCell(15).setCellStyle(contentStyle);
|
||||
}
|
||||
else
|
||||
{
|
||||
state="未发放";
|
||||
}
|
||||
hssfRow.createCell(15).setCellValue(state.toString().trim());
|
||||
if(classDataInfo.getReceiveState().toString().trim().equals("1"))
|
||||
{
|
||||
state="已接收";
|
||||
hssfRow.getCell(16).setCellStyle(contentStyle);
|
||||
}
|
||||
else
|
||||
{
|
||||
state="未接收";
|
||||
}
|
||||
//int createLength=classDataInfo.getCreateDate().indexOf(".");
|
||||
hssfRow.createCell(16).setCellValue(state.toString().trim());
|
||||
if(classDataInfo.getBorrowState().toString().trim().equals("1"))
|
||||
{
|
||||
state="已借阅";
|
||||
hssfRow.getCell(17).setCellStyle(contentStyle);
|
||||
}
|
||||
else
|
||||
{
|
||||
state="未借阅";
|
||||
}
|
||||
hssfRow.createCell(17).setCellValue(state.toString().trim());
|
||||
if(classDataInfo.getRecoverState().toString().trim().equals("1"))
|
||||
{
|
||||
state="已回收";
|
||||
hssfRow.getCell(18).setCellStyle(contentStyle);
|
||||
}
|
||||
else
|
||||
{
|
||||
state="未回收";
|
||||
}
|
||||
//hssfRow.getCell(15).setCellStyle(dateStyle);
|
||||
//hssfRow.createCell(16).setCellValue(classDataInfo.getCreateTeacherId().toString().trim());
|
||||
hssfRow.createCell(18).setCellValue(state.toString().trim());
|
||||
if(classDataInfo.getExtractState().toString().trim().equals("1"))
|
||||
{
|
||||
state="已提取";
|
||||
hssfRow.getCell(19).setCellStyle(contentStyle);
|
||||
}
|
||||
else
|
||||
{
|
||||
state="未提取";
|
||||
}
|
||||
//int updateLength=classDataInfo.getUpdateTime().indexOf(".");
|
||||
hssfRow.createCell(19).setCellValue(state);
|
||||
if(classDataInfo.getDestoryState().toString().trim().equals("1"))
|
||||
{
|
||||
state="已销毁";
|
||||
hssfRow.getCell(20).setCellStyle(contentStyle);
|
||||
}
|
||||
else
|
||||
{
|
||||
state="未销毁";
|
||||
}
|
||||
//hssfRow.getCell(18).setCellStyle(dateStyle);
|
||||
hssfRow.createCell(20).setCellValue(state.toString().trim());
|
||||
//hssfRow.createCell(20).setCellValue(classDataInfo.getUpdateSchoolId().toString().trim());
|
||||
// if(!classDataInfo.getState().toString().trim().equals("1"))
|
||||
// {
|
||||
// for(int j=0;j<21;j++)
|
||||
// {
|
||||
// HSSFCell contentCell=hssfRow.getCell(j);
|
||||
// contentCell.setCellStyle(contentStyle);
|
||||
// }
|
||||
// }
|
||||
k++;
|
||||
|
||||
}
|
||||
workBook.write(outputStream);
|
||||
outputStream.flush();
|
||||
outputStream.close();
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,26 +0,0 @@
|
||||
|
||||
package com.zky.manager;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.log4j.Logger;
|
||||
import com.zky.pub.DispatchServlet;
|
||||
|
||||
/**
|
||||
* @author dy
|
||||
*
|
||||
* 员工菜单调整
|
||||
*/
|
||||
public class EmpMenuAdjustServlet extends DispatchServlet {
|
||||
private static final Logger log = Logger.getLogger(EmpMenuAdjustServlet.class);
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.zky.pub.DispatchServlet#defaultMethod(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
|
||||
*/
|
||||
public void defaultMethod(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,89 +0,0 @@
|
||||
|
||||
package com.zky.manager;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.servlet.Filter;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.FilterConfig;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import com.zky.pub.Common;
|
||||
|
||||
/**
|
||||
* @author dy
|
||||
*/
|
||||
public class FilterAuthor implements Filter{
|
||||
|
||||
private FilterConfig filterConfig = null;
|
||||
|
||||
|
||||
|
||||
public void init(FilterConfig config) throws ServletException {
|
||||
|
||||
this.filterConfig = config;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
|
||||
|
||||
|
||||
|
||||
String isActive = filterConfig.getInitParameter("Active");
|
||||
if(isActive!=null && isActive.toUpperCase().equals("TRUE"))
|
||||
{
|
||||
|
||||
HttpServletRequest hRequest = (HttpServletRequest)request;
|
||||
HttpServletResponse hResponse = (HttpServletResponse)response;
|
||||
String url = hRequest.getRequestURI();
|
||||
HttpSession session = hRequest.getSession();
|
||||
Login login_obj = (Login)session.getAttribute("login");
|
||||
//验证session是否过期
|
||||
if(login_obj == null)
|
||||
{
|
||||
String ls_url1 = "/error.jsp?errorinfo=" + "<table><tr><td>"+Common.toGb("您尚未登录或已经过期!")+"</td></tr><tr><td align='center'> <a href='/login.jsp' target='_parent'>"+Common.toGb("重新登录")+"</a></td></tr></table>";
|
||||
//outstr1 = new String(ls_url1.getBytes("gb2312"),"iso8859-1");
|
||||
String outstr1 = Common.GbConvertIso(ls_url1);
|
||||
hResponse.sendRedirect(outstr1);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
//验证口令是否验证通过
|
||||
if(login_obj.checkPasstag() == false)
|
||||
{
|
||||
String ls_url1 = "/error.jsp?errorinfo=" +Common.toGb("您没有成功登录!")+"<br> <a href='/login.jsp' target='_parent'>"+Common.toGb("重新登录")+"</a>";
|
||||
//outstr1 = new String(ls_url1.getBytes("gb2312"),"iso8859-1");
|
||||
String outstr1 = Common.GbConvertIso(ls_url1);
|
||||
hResponse.sendRedirect(outstr1);
|
||||
return;
|
||||
}
|
||||
|
||||
if(url.length()>1)
|
||||
{
|
||||
url = url.substring(1,url.length());
|
||||
}
|
||||
//搜索该URL是否对于该用户可视
|
||||
if(login_obj.checkUrl(url) < 0)
|
||||
{
|
||||
|
||||
String errUrl = "/error.jsp?errorinfo="+Common.toGb("你无权访问该页面请与管理员联系!");
|
||||
hResponse.sendRedirect(Common.GbConvertIso(errUrl));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
chain.doFilter(request, response);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void destroy() {
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,64 +0,0 @@
|
||||
|
||||
package com.zky.manager;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.log4j.Logger;
|
||||
import com.zky.pub.Common;
|
||||
import com.zky.pub.DbConn;
|
||||
import com.zky.pub.DispatchServlet;
|
||||
import com.zky.pub.HashFmlBuf;
|
||||
import com.zky.util.PageQuery;
|
||||
import com.zky.util.jdbc.HashFmlBufResultSetHandler;
|
||||
import com.zky.util.jdbc.JDBCUtils;
|
||||
|
||||
/**
|
||||
* @author dy
|
||||
* 地市管理
|
||||
*/
|
||||
|
||||
public class FrameworkServlet extends DispatchServlet {
|
||||
private static final Logger log = Logger.getLogger(DeptManageServlet.class);
|
||||
|
||||
public void query(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||
String frameworkname = request.getParameter("frameworkname");
|
||||
String frameworkid = request.getParameter("frameworkid");
|
||||
|
||||
StringBuffer sql = new StringBuffer("select * from tab_framework a where 1=1 ");
|
||||
if (!Common.isNull(frameworkname)) {
|
||||
sql.append(" and a.frameworkname='" + frameworkname + "'");
|
||||
} else if (!Common.isNull(frameworkid)) {
|
||||
sql.append(" and a.frameworkid = " + frameworkid + "'");
|
||||
}
|
||||
|
||||
Connection conn = null;
|
||||
|
||||
try {
|
||||
conn = DbConn.getConn();
|
||||
//HashFmlBuf buf = (HashFmlBuf)JDBCUtils.query(conn, sql.toString(),new HashFmlBufResultSetHandler());
|
||||
PageQuery pageQuery = new PageQuery(conn,sql.toString(),new HashFmlBufResultSetHandler(),request);
|
||||
HashFmlBuf buf=(HashFmlBuf)pageQuery.query(100);
|
||||
request.setAttribute("framework_info",buf);
|
||||
request.getRequestDispatcher("/manage/Framework.jsp").forward(request,response);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
response.sendRedirect(Common.GbConvertIso("/error.jsp?errorinfo="+Common.toGb("地市资料查询失败!") + e.toString()));
|
||||
} finally {
|
||||
try {
|
||||
if (conn!= null) {
|
||||
conn.close();
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
public void defaultMethod(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,101 +0,0 @@
|
||||
|
||||
package com.zky.manager;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* @author dy
|
||||
*
|
||||
*/
|
||||
public class Global {
|
||||
private static Properties properties = null;
|
||||
private static String sj = null; //省局编码
|
||||
private static String[] sjs = null; //市局编码
|
||||
private static String[] acptsitetype = null;
|
||||
private static String acptsitetypes = "";
|
||||
private static String datasource = "";
|
||||
private static String[] name=null;//得到所有的人员
|
||||
private static String[] depart=null;//得到所有的部门
|
||||
private static Logger log = Logger.getLogger(Global.class);
|
||||
static {
|
||||
properties = new Properties();
|
||||
InputStream stream = Global.class.getResourceAsStream("/system.properties");
|
||||
if (stream == null) {
|
||||
log.error("system.properties not found");
|
||||
} else {
|
||||
String temp = null;
|
||||
try {
|
||||
properties.load(stream);
|
||||
log.info("loaded properties from resource system.properties: " + properties);
|
||||
sj = properties.getProperty("province.frameworkid");
|
||||
temp = properties.getProperty("frameworkids");
|
||||
if (temp != null) {
|
||||
sjs = temp.split(",");
|
||||
} else {
|
||||
sjs = new String[0];
|
||||
}
|
||||
acptsitetypes = properties.getProperty("acptsitetype");
|
||||
if (acptsitetypes != null) {
|
||||
acptsitetype = temp.split(",");
|
||||
} else {
|
||||
acptsitetype = new String[0];
|
||||
}
|
||||
|
||||
datasource = properties.getProperty("datasource");
|
||||
if (datasource == null) {
|
||||
throw new RuntimeException("datasource JNDI name was not specified in system.properties");
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 获得省分分公司编码
|
||||
* @return Returns the frameworkid.
|
||||
*/
|
||||
public static String getSj() {
|
||||
return sj;
|
||||
}
|
||||
/**
|
||||
* @return Returns the properties.
|
||||
*/
|
||||
public static Properties getProperties() {
|
||||
return properties;
|
||||
}
|
||||
/**
|
||||
* 获得市分编码
|
||||
* @return Returns the frameworkids.
|
||||
*/
|
||||
public static String[] getSjs() {
|
||||
return sjs;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获得本系统适用的部门类型
|
||||
* @return Returns the acptsitetype.
|
||||
*/
|
||||
public static String[] getAcptsitetype() {
|
||||
return acptsitetype;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the acptsitetypes.
|
||||
*/
|
||||
public static String getAcptsitetypes() {
|
||||
return acptsitetypes;
|
||||
}
|
||||
public static void main(String args[]) {
|
||||
System.out.print(Global.getSj());
|
||||
|
||||
}
|
||||
|
||||
public static String getDataSourceName(){
|
||||
return datasource;
|
||||
}
|
||||
}
|
||||
@ -1,80 +0,0 @@
|
||||
package com.zky.manager;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.text.ParseException;
|
||||
import java.util.List;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jspsmart.upload.SmartFile;
|
||||
import com.jspsmart.upload.SmartUpload;
|
||||
import com.jspsmart.upload.SmartUploadException;
|
||||
import com.zky.pojo.FileInfo;
|
||||
import com.zky.zhyw.smwj.FileProvideManageServlet;
|
||||
|
||||
public class ImportExcelServlet extends HttpServlet {
|
||||
String excelFile="";
|
||||
String path="";
|
||||
Connection conn=null;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
|
||||
throws ServletException, IOException {
|
||||
doPost(req, resp);
|
||||
}
|
||||
protected void doPost(HttpServletRequest request, HttpServletResponse response)
|
||||
{
|
||||
Login employee=(Login)request.getSession().getAttribute("login");
|
||||
String operate="";
|
||||
try {
|
||||
SmartUpload upload=new SmartUpload();
|
||||
upload.initialize(this.getServletConfig(),request,response);
|
||||
upload.upload("UTF-8");
|
||||
SmartFile smartFile=upload.getFiles().getFile(0);
|
||||
if(smartFile.getFileExt()!=null&&!smartFile.getFileExt().equals(""))
|
||||
{
|
||||
excelFile=upload.getFiles().getFile(0).getFilePathName();
|
||||
List<FileInfo> fileData=FileProvideManageServlet.importFileInfoData(excelFile);
|
||||
if(fileData.size()==0)
|
||||
{
|
||||
response.setContentType("text/html;charset=utf-8");
|
||||
PrintWriter out=response.getWriter();
|
||||
out.print("<script language='javascript'>alert('无文件数据信息,导入失败!');window.location.href='/zhyw/smwj/wjff/fileProvideManage.jsp';</script>");
|
||||
out.close();
|
||||
}
|
||||
else
|
||||
{
|
||||
FileProvideManageServlet.insertFileData(fileData, employee.getDepartid(), request, response);
|
||||
response.setContentType("text/html;charset=utf-8");
|
||||
PrintWriter out=response.getWriter();
|
||||
out.print("<script language='javascript'>alert('文件信息导入成功!');window.location.href='/zhyw/smwj/wjff/fileProvideManage.jsp';</script>");
|
||||
out.close();
|
||||
}
|
||||
}
|
||||
} catch (ServletException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (SmartUploadException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (ParseException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (SQLException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,78 +0,0 @@
|
||||
package com.zky.manager;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.text.ParseException;
|
||||
import java.util.List;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jspsmart.upload.SmartFile;
|
||||
import com.jspsmart.upload.SmartUpload;
|
||||
import com.jspsmart.upload.SmartUploadException;
|
||||
import com.zky.pojo.PropertyInfo;
|
||||
import com.zky.zhyw.smtj.zctj.StatZctjManageServlet;
|
||||
|
||||
public class ImportPropertyExcelServlet extends HttpServlet {
|
||||
String excelFile="";
|
||||
String path="";
|
||||
Connection conn=null;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
|
||||
throws ServletException, IOException {
|
||||
doPost(req, resp);
|
||||
}
|
||||
protected void doPost(HttpServletRequest request, HttpServletResponse response)
|
||||
{
|
||||
Login employee=(Login)request.getSession().getAttribute("login");
|
||||
String operate="";
|
||||
try {
|
||||
SmartUpload upload=new SmartUpload();
|
||||
upload.initialize(this.getServletConfig(),request,response);
|
||||
upload.upload("UTF-8");
|
||||
SmartFile smartFile=upload.getFiles().getFile(0);
|
||||
if(smartFile.getFileExt()!=null&&!smartFile.getFileExt().equals(""))
|
||||
{
|
||||
excelFile=upload.getFiles().getFile(0).getFilePathName();
|
||||
List<PropertyInfo> fileData=StatZctjManageServlet.importPropertyInfoData(excelFile);
|
||||
if(fileData.size()==0)
|
||||
{
|
||||
response.setContentType("text/html;charset=utf-8");
|
||||
PrintWriter out=response.getWriter();
|
||||
out.print("<script language='javascript'>alert('无文件数据信息,导入失败!');window.location.href='/zhyw/smtj/zctj/StatSmsb.jsp';</script>");
|
||||
out.close();
|
||||
}
|
||||
else
|
||||
{
|
||||
StatZctjManageServlet.insertPropertyData(fileData, request, response);
|
||||
response.setContentType("text/html;charset=utf-8");
|
||||
PrintWriter out=response.getWriter();
|
||||
out.print("<script language='javascript'>alert('文件信息导入成功!');window.location.href='window.location.href='/zhyw/smtj/zctj/StatSmsb.jsp';</script>");
|
||||
out.close();
|
||||
}
|
||||
}
|
||||
} catch (ServletException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (SmartUploadException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (ParseException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (SQLException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,81 +0,0 @@
|
||||
package com.zky.manager;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.text.ParseException;
|
||||
import java.util.List;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jspsmart.upload.SmartFile;
|
||||
import com.jspsmart.upload.SmartUpload;
|
||||
import com.jspsmart.upload.SmartUploadException;
|
||||
import com.zky.pojo.PropertyInfo;
|
||||
import com.zky.zhyw.smtj.zdtj.StatZdtjManageServlet;
|
||||
|
||||
public class ImportPropertyNetExcelServlet extends HttpServlet {
|
||||
String excelFile="";
|
||||
String path="";
|
||||
Connection conn=null;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
|
||||
throws ServletException, IOException {
|
||||
doPost(req, resp);
|
||||
}
|
||||
protected void doPost(HttpServletRequest request, HttpServletResponse response)
|
||||
{
|
||||
//涉密网络导入
|
||||
try {
|
||||
SmartUpload upload=new SmartUpload();
|
||||
upload.initialize(this.getServletConfig(),request,response);
|
||||
upload.upload("UTF-8");
|
||||
SmartFile smartFile=upload.getFiles().getFile(0);
|
||||
if(smartFile.getFileExt()!=null&&!smartFile.getFileExt().equals(""))
|
||||
{
|
||||
excelFile=upload.getFiles().getFile(0).getFilePathName();
|
||||
List<PropertyInfo> fileData=StatZdtjManageServlet.importPropertyzdInfoData(excelFile);
|
||||
if(fileData.size()==0)
|
||||
{
|
||||
response.setContentType("text/html;charset=utf-8");
|
||||
PrintWriter out=response.getWriter();
|
||||
out.print("<script language='javascript'>alert('无文件数据信息,导入失败!');window.location.href='/zhyw/smtj/zdtj/StatTma.jsp';</script>");
|
||||
out.close();
|
||||
}
|
||||
else
|
||||
{
|
||||
StatZdtjManageServlet.insertPropertyzdData(fileData, request, response);
|
||||
response.setContentType("text/html;charset=utf-8");
|
||||
PrintWriter out=response.getWriter();
|
||||
out.print("<script language='javascript'>alert('文件信息导入成功!');window.location.href='window.location.href='/zhyw/smtj/zdtj/StatTma.jsp';</script>");
|
||||
out.close();
|
||||
}
|
||||
}
|
||||
} catch (ServletException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (SmartUploadException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (ParseException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (SQLException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,78 +0,0 @@
|
||||
package com.zky.manager;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.text.ParseException;
|
||||
import java.util.List;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jspsmart.upload.SmartFile;
|
||||
import com.jspsmart.upload.SmartUpload;
|
||||
import com.jspsmart.upload.SmartUploadException;
|
||||
import com.zky.pojo.Questionexam;
|
||||
import com.zky.zhyw.smsj.ExamManageServlet;
|
||||
|
||||
public class ImportPropertyQuestionExcelServlet extends HttpServlet {
|
||||
String excelFile="";
|
||||
String path="";
|
||||
Connection conn=null;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
|
||||
throws ServletException, IOException {
|
||||
doPost(req, resp);
|
||||
}
|
||||
protected void doPost(HttpServletRequest request, HttpServletResponse response)
|
||||
{
|
||||
//涉密网络导入
|
||||
try {
|
||||
SmartUpload upload=new SmartUpload();
|
||||
upload.initialize(this.getServletConfig(),request,response);
|
||||
upload.upload("UTF-8");
|
||||
SmartFile smartFile=upload.getFiles().getFile(0);
|
||||
if(smartFile.getFileExt()!=null&&!smartFile.getFileExt().equals(""))
|
||||
{
|
||||
excelFile=upload.getFiles().getFile(0).getFilePathName();
|
||||
List<Questionexam> fileData=ExamManageServlet.importQuestionInfoData(excelFile);
|
||||
if(fileData.size()==0)
|
||||
{
|
||||
response.setContentType("text/html;charset=utf-8");
|
||||
PrintWriter out=response.getWriter();
|
||||
out.print("<script language='javascript'>alert('无文件数据信息,导入失败!');window.location.href='/zhyw/smsj/QuestionManage.jsp';</script>");
|
||||
out.close();
|
||||
}
|
||||
else
|
||||
{
|
||||
ExamManageServlet.insertQuestionData(fileData, request, response);
|
||||
response.setContentType("text/html;charset=utf-8");
|
||||
PrintWriter out=response.getWriter();
|
||||
out.print("<script language='javascript'>alert('文件信息导入成功!');window.location.href='window.location.href='/zhyw/smsj/QuestionManage.jsp';</script>");
|
||||
out.close();
|
||||
}
|
||||
}
|
||||
} catch (ServletException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (SmartUploadException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (ParseException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (SQLException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,82 +0,0 @@
|
||||
package com.zky.manager;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.text.ParseException;
|
||||
import java.util.List;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jspsmart.upload.SmartFile;
|
||||
import com.jspsmart.upload.SmartUpload;
|
||||
import com.jspsmart.upload.SmartUploadException;
|
||||
import com.zky.pojo.PropertyInfo;
|
||||
import com.zky.zhyw.smtj.wltj.StatWltjManageServlet;
|
||||
import com.zky.zhyw.smtj.zctj.StatZctjManageServlet;
|
||||
|
||||
public class ImportPropertywlExcelServlet extends HttpServlet {
|
||||
String excelFile="";
|
||||
String path="";
|
||||
Connection conn=null;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
|
||||
throws ServletException, IOException {
|
||||
doPost(req, resp);
|
||||
}
|
||||
protected void doPost(HttpServletRequest request, HttpServletResponse response)
|
||||
{
|
||||
Login employee=(Login)request.getSession().getAttribute("login");
|
||||
String operate="";
|
||||
try {
|
||||
SmartUpload upload=new SmartUpload();
|
||||
upload.initialize(this.getServletConfig(),request,response);
|
||||
upload.upload("UTF-8");
|
||||
SmartFile smartFile=upload.getFiles().getFile(0);
|
||||
if(smartFile.getFileExt()!=null&&!smartFile.getFileExt().equals(""))
|
||||
{
|
||||
excelFile=upload.getFiles().getFile(0).getFilePathName();
|
||||
List<PropertyInfo> fileData=StatWltjManageServlet.importPropertyNetInfoData(excelFile);
|
||||
if(fileData.size()==0)
|
||||
{
|
||||
response.setContentType("text/html;charset=utf-8");
|
||||
PrintWriter out=response.getWriter();
|
||||
out.print("<script language='javascript'>alert('无文件数据信息,导入失败!');window.location.href='/zhyw/smtj/wltj/StatNet.jsp';</script>");
|
||||
out.close();
|
||||
}
|
||||
else
|
||||
{
|
||||
StatWltjManageServlet.insertPropertyNetData(fileData, request, response);
|
||||
response.setContentType("text/html;charset=utf-8");
|
||||
PrintWriter out=response.getWriter();
|
||||
out.print("<script language='javascript'>alert('文件信息导入成功!');window.location.href='window.location.href='/zhyw/smtj/wltj/StatNet.jsp';</script>");
|
||||
out.close();
|
||||
}
|
||||
}
|
||||
} catch (ServletException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (SmartUploadException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (ParseException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (SQLException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,108 +0,0 @@
|
||||
|
||||
package com.zky.manager;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.log4j.Logger;
|
||||
import com.zky.pub.Common;
|
||||
import com.zky.pub.DbConn;
|
||||
import com.zky.pub.DispatchServlet;
|
||||
import com.zky.pub.HashFmlBuf;
|
||||
import com.zky.util.PageQuery;
|
||||
import com.zky.util.jdbc.HashFmlBufResultSetHandler;
|
||||
|
||||
/**
|
||||
* @author dy
|
||||
*
|
||||
* 日志管理
|
||||
*/
|
||||
public class LogonLogServlet extends DispatchServlet {
|
||||
private static final Logger log = Logger.getLogger(DeptManageServlet.class);
|
||||
|
||||
public void query(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||
String departid = request.getParameter("departid");
|
||||
String empid = request.getParameter("empid");
|
||||
String empidbegindate = request.getParameter("begindate");
|
||||
String empidenddate = request.getParameter("enddate");
|
||||
|
||||
StringBuffer sql = new StringBuffer("select a.optrid,a.acptsiteid ,c.empid,c.empname,a.ipaddr,a.logontime, b.departid, b.departname from tf_l_logonlog a left join tab_department b "
|
||||
+ "on a.acptsiteid=b.departname left join tab_employee c on a.optrid=c.empname where 1=1 order by logontime desc");
|
||||
if (!Common.isNull(empid)) {
|
||||
sql.append(" and a.optrid like '%" + empid + "%'");
|
||||
}
|
||||
if (!Common.isNull(departid)) {
|
||||
sql.append(" and a.acptsiteid like '%" + departid + "%' ");
|
||||
}
|
||||
if (!Common.isNull(empidbegindate)&&!Common.isNull(empidenddate)) {
|
||||
sql.append("and date_format(a.logontime,'%Y-%m-%d')>='").append(empidbegindate).append("'");
|
||||
sql.append("and date_format(a.logontime,'%Y-%m-%d')<='").append(empidenddate).append("'");
|
||||
}
|
||||
Connection conn = null;
|
||||
|
||||
try {
|
||||
conn = DbConn.getConn();
|
||||
PageQuery pageQuery = new PageQuery(conn,sql.toString(),new HashFmlBufResultSetHandler(),request);
|
||||
HashFmlBuf buf=(HashFmlBuf)pageQuery.query(100);
|
||||
request.setAttribute("logonlog_info",buf);
|
||||
request.getRequestDispatcher("/manage/LogonLog.jsp").forward(request,response);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
response.sendRedirect(Common.GbConvertIso("/error.jsp?errorinfo="+Common.toGb("日志资料查询失败!") + e.toString()));
|
||||
} finally {
|
||||
try {
|
||||
if (conn!= null) {
|
||||
conn.close();
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
public void queryOperate(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||
String departid = request.getParameter("departname");
|
||||
String empid = request.getParameter("empname");
|
||||
String empidbegindate = request.getParameter("begindate");
|
||||
String empidenddate = request.getParameter("enddate");
|
||||
|
||||
StringBuffer sql = new StringBuffer("select IPADDR,OPTRID,OPERAESITEID,OPERAEMENUITEM,OPERAEGN,OPERAETIME from tf_l_operaelog a where 1=1 order by OPERAETIME desc ");
|
||||
if (!Common.isNull(departid)) {
|
||||
sql.append(" and a.optrid like '%" + departid + "%'");
|
||||
}
|
||||
if (!Common.isNull(empid)) {
|
||||
sql.append(" and a.operaesiteid like '%" + empid + "%' ");
|
||||
}
|
||||
if (!Common.isNull(empidbegindate)&&!Common.isNull(empidenddate)) {
|
||||
sql.append("and date_format(a.operaetime,'%Y-%m-%d')>='").append(empidbegindate).append("'");
|
||||
sql.append("and date_format(a.operaetime,'%Y-%m-%d')<='").append(empidenddate).append("'");
|
||||
}
|
||||
Connection conn = null;
|
||||
|
||||
try {
|
||||
conn = DbConn.getConn();
|
||||
//HashFmlBuf buf = (HashFmlBuf)JDBCUtils.query(conn, sql.toString(),new HashFmlBufResultSetHandler());
|
||||
PageQuery pageQuery = new PageQuery(conn,sql.toString(),new HashFmlBufResultSetHandler(),request);
|
||||
HashFmlBuf buf=(HashFmlBuf)pageQuery.query(100);
|
||||
request.setAttribute("operatelog_info",buf);
|
||||
request.getRequestDispatcher("/manage/OperateLog.jsp").forward(request,response);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
response.sendRedirect(Common.GbConvertIso("/error.jsp?errorinfo="+Common.toGb("日志资料查询失败!") + e.toString()));
|
||||
} finally {
|
||||
try {
|
||||
if (conn!= null) {
|
||||
conn.close();
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void defaultMethod(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,273 +0,0 @@
|
||||
package com.zky.manager;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import javax.servlet.jsp.PageContext;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
||||
import com.jspsmart.upload.SmartFile;
|
||||
import com.jspsmart.upload.SmartUpload;
|
||||
import com.jspsmart.upload.SmartUploadException;
|
||||
import com.zky.manager.Login;
|
||||
import com.zky.pub.*;
|
||||
import com.zky.util.jdbc.HashFmlBufResultSetHandler;
|
||||
import com.zky.util.jdbc.JDBCUtils;
|
||||
|
||||
import java.sql.*;
|
||||
|
||||
|
||||
/**
|
||||
* @author LHT
|
||||
*
|
||||
* 管理
|
||||
*/
|
||||
|
||||
public class ManagerServlet extends DispatchServlet {
|
||||
private static final Logger log = Logger
|
||||
.getLogger(ManagerServlet.class);
|
||||
|
||||
|
||||
StudentPullulate stu=new StudentPullulate();
|
||||
|
||||
|
||||
|
||||
|
||||
public void readPul(HttpServletRequest request, HttpServletResponse response)throws Exception{
|
||||
|
||||
HashFmlBuf buf=stu.readStudent(request,response);
|
||||
|
||||
request.setAttribute("student_info",buf);
|
||||
request.getRequestDispatcher("/one/smbx/pullmanager.jsp").forward(request,response);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void readPuls(HttpServletRequest request, HttpServletResponse response)throws Exception{
|
||||
|
||||
HashFmlBuf buf=stu.readStudent(request,response);
|
||||
|
||||
request.setAttribute("student_info",buf);
|
||||
request.getRequestDispatcher("/one/smbx/pullmanager2.jsp").forward(request,response);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void readStudent(HttpServletRequest request, HttpServletResponse response){
|
||||
|
||||
String op="";
|
||||
op=request.getParameter("op");
|
||||
|
||||
String classid=request.getParameter("classid");
|
||||
|
||||
|
||||
HashFmlBuf buf=stu.readStudents(request, response);
|
||||
try {
|
||||
|
||||
//readZy
|
||||
if(op!=null && op.equals("readZy")){
|
||||
|
||||
request.setAttribute("buf",buf);
|
||||
request.setAttribute("clid", classid);
|
||||
request.getRequestDispatcher("/one/zfzy/zymanager.jsp").forward(request, response);
|
||||
|
||||
}else if(op!=null && op.equals("zyClass")){
|
||||
|
||||
request.setAttribute("buf",buf);
|
||||
request.setAttribute("clid", classid);
|
||||
request.getRequestDispatcher("/one/zfzy/zycreate.jsp").forward(request, response);
|
||||
|
||||
}else if(op!=null && op.equals("readydjk")){
|
||||
|
||||
request.setAttribute("buf",buf);
|
||||
request.setAttribute("clid", classid);
|
||||
request.getRequestDispatcher("/one/ydjk/ydjkmanager.jsp").forward(request, response);
|
||||
|
||||
}else if(op!=null && op.equals("ydjkclass")){
|
||||
|
||||
request.setAttribute("buf",buf);
|
||||
request.setAttribute("clid", classid);
|
||||
request.getRequestDispatcher("/one/ydjk/ydjkcreate.jsp").forward(request, response);
|
||||
|
||||
}else if(op!=null && op.equals("readgmsy")){
|
||||
|
||||
request.setAttribute("buf",buf);
|
||||
request.setAttribute("clid", classid);
|
||||
request.getRequestDispatcher("/one/gmsy/gmsymanager.jsp").forward(request, response);
|
||||
|
||||
}else if(op!=null && op.equals("gmsyclass")){
|
||||
|
||||
request.setAttribute("buf",buf);
|
||||
request.setAttribute("clid", classid);
|
||||
request.getRequestDispatcher("/one/gmsy/gmsycreate.jsp").forward(request, response);
|
||||
|
||||
}else if(op!=null && op.equals("readsmbx")){
|
||||
request.setAttribute("buf",buf);
|
||||
request.setAttribute("clid", classid);
|
||||
request.getRequestDispatcher("/one/smbx/smbxmanager.jsp").forward(request, response);
|
||||
|
||||
|
||||
|
||||
}else if(op!=null && op.equals("smbxclass")){
|
||||
request.setAttribute("buf",buf);
|
||||
request.setAttribute("clid", classid);
|
||||
request.getRequestDispatcher("/one/smbx/smbxcreate.jsp").forward(request, response);
|
||||
|
||||
}else if(op!=null && op.equals("classtu2")){
|
||||
request.setAttribute("buf",buf);
|
||||
request.setAttribute("clid", classid);
|
||||
request.getRequestDispatcher("/one/smbx/pullmanager2.jsp").forward(request, response);
|
||||
}else if(op!=null && op.equals("classtu")){
|
||||
request.setAttribute("buf",buf);
|
||||
request.setAttribute("clid", classid);
|
||||
request.getRequestDispatcher("/one/smbx/pullmanager.jsp").forward(request, response);
|
||||
}else{
|
||||
request.setAttribute("buf",buf);
|
||||
request.setAttribute("clid", classid);
|
||||
request.getRequestDispatcher("/one/smbx/studentpullulate.jsp").forward(request, response);
|
||||
}
|
||||
|
||||
|
||||
} catch (ServletException e) {
|
||||
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void readStudentName(HttpServletRequest request, HttpServletResponse response){
|
||||
|
||||
HashFmlBuf bufname=stu.readStudentName(request, response);
|
||||
|
||||
try {
|
||||
request.setAttribute("bufname", bufname);
|
||||
request.getRequestDispatcher("/one/smbx/studentpullulate.jsp").forward(request, response);
|
||||
} catch (ServletException e) {
|
||||
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//查询一条信息
|
||||
|
||||
public void readOneStud(HttpServletRequest request, HttpServletResponse response)throws Exception{
|
||||
|
||||
|
||||
String studentid=request.getParameter("studentid");
|
||||
|
||||
String grade=request.getParameter("grade");
|
||||
|
||||
HashFmlBuf buf=stu.readPullulate(studentid,grade);
|
||||
request.setAttribute("stuone", buf);
|
||||
request.getRequestDispatcher("/one/smbx/pullulatepreview.jsp").forward(request, response);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//验证菜单表中是否存在此记录
|
||||
public HashFmlBuf readTabMenuItem(String menuitem,String frameworkid)throws Exception{
|
||||
|
||||
String sql="select t.menuitem from TAB_MENUITEM t where t.menuitem=? and frameworkid=?";
|
||||
|
||||
Connection conn=null;
|
||||
conn = DbConn.getConn();
|
||||
|
||||
try {
|
||||
|
||||
HashFmlBuf buf = (HashFmlBuf) JDBCUtils.query(conn, sql, menuitem,frameworkid,new HashFmlBufResultSetHandler());
|
||||
|
||||
if (buf != null && buf.getRowCount() > 0) {
|
||||
|
||||
return buf;
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}finally{
|
||||
|
||||
try {
|
||||
if (conn!= null) {
|
||||
conn.close();
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//验证岗位表中是否存在此记录
|
||||
public HashFmlBuf readJob(String frameworkid,String jobcode)throws Exception{
|
||||
|
||||
String sql="select t.jobcode from TAB_JOB t where frameworkid=? and jobcode=?";
|
||||
|
||||
Connection conn=null;
|
||||
conn = DbConn.getConn();
|
||||
|
||||
try {
|
||||
|
||||
HashFmlBuf buf = (HashFmlBuf) JDBCUtils.query(conn, sql,frameworkid,jobcode,new HashFmlBufResultSetHandler());
|
||||
|
||||
if (buf != null && buf.getRowCount() > 0) {
|
||||
|
||||
return buf;
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}finally{
|
||||
|
||||
try {
|
||||
if (conn!= null) {
|
||||
conn.close();
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void defaultMethod(HttpServletRequest request,
|
||||
HttpServletResponse response) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -1,201 +0,0 @@
|
||||
|
||||
package com.zky.manager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import org.apache.log4j.Logger;
|
||||
import com.zky.pub.HashFmlBuf;
|
||||
|
||||
/**
|
||||
* @author dy
|
||||
*
|
||||
*/
|
||||
public class MenuTree {
|
||||
private static final Logger log = Logger.getLogger(MenuTree.class);
|
||||
private String companyId;
|
||||
private String areaId;
|
||||
private String treeId;
|
||||
private String treeName;
|
||||
private final List menuList;
|
||||
|
||||
public MenuTree() {
|
||||
menuList = new ArrayList();
|
||||
}
|
||||
public MenuTree(String companyId,String areaId, String treeId, String treeName) {
|
||||
this.companyId = companyId;
|
||||
this.areaId = areaId;
|
||||
this.treeId = treeId;
|
||||
this.treeName = treeName;
|
||||
menuList = new ArrayList();
|
||||
}
|
||||
|
||||
public void addMenu(MenuBean menu) {
|
||||
// menu.setMenuLevel(1);
|
||||
menu.setUpMenuId(this.treeId);
|
||||
menuList.add(menu);
|
||||
}
|
||||
|
||||
public void addMenu(String upMenuId, MenuBean menu) {
|
||||
MenuBean upMenu = getMenuById(upMenuId);
|
||||
if (upMenu!=null) {
|
||||
upMenu.addChild(menu);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 删除下级菜单结点
|
||||
*
|
||||
* @param menuId
|
||||
* @return
|
||||
*/
|
||||
public MenuBean removeMenu(String menuId) {
|
||||
MenuBean menu = null;
|
||||
for (int i=0; i<size(); i++) {
|
||||
menu = getMenu(i);
|
||||
if (menuId.equals(menu.getMenuId())) {
|
||||
menuList.remove(i);
|
||||
return menu;
|
||||
}
|
||||
}
|
||||
return menu;
|
||||
}
|
||||
|
||||
public MenuBean getMenu(int pos) {
|
||||
return (MenuBean)menuList.get(pos);
|
||||
}
|
||||
public int size() {
|
||||
return menuList.size();
|
||||
}
|
||||
public String toString() {
|
||||
StringBuffer treeBuf = new StringBuffer();
|
||||
treeBuf.append("\n<script>");
|
||||
treeBuf.append("\nif (document.getElementById){");
|
||||
treeBuf.append("\nvar ")
|
||||
.append("tree")
|
||||
.append(treeId)
|
||||
.append("=new WebFXTree('")
|
||||
.append(treeName).append("',\"").append(getAction()).append("\");");
|
||||
treeBuf
|
||||
.append("\ntree")
|
||||
.append(treeId)
|
||||
.append(".setBehavior('classic');");
|
||||
for (int i=0; i<size(); i++) {
|
||||
treeBuf.append(getMenu(i).toString());
|
||||
}
|
||||
treeBuf.append("\ndocument.write(tree").append(treeId).append(");");
|
||||
treeBuf.append("\ntree").append(treeId).append(".expandAll();");
|
||||
treeBuf.append("\n}");
|
||||
treeBuf.append("\n</script>");
|
||||
return treeBuf.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得鼠标点击节点时的响应动作
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getAction() {
|
||||
String action = "oper('" + treeId + "','" + treeName + "','','0')";
|
||||
return action;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据传入的HashFmlBuf中的值初始化菜单树
|
||||
*
|
||||
* @param buf
|
||||
* @return
|
||||
*/
|
||||
public MenuTree init(HashFmlBuf buf) {
|
||||
if (buf.getRowCount() == 0) {
|
||||
return null;
|
||||
}
|
||||
MenuTree tree = new MenuTree();
|
||||
tree.setTreeId(buf.fget("menuitem",0));
|
||||
tree.setTreeName(buf.fget("menuitemname",0));
|
||||
tree.setCompanyId(buf.fget("frameworkid",0));
|
||||
List list = new LinkedList();
|
||||
for (int i=0; i<buf.getRowCount();i++) {
|
||||
if (buf.fget("uplevel",i).equals(tree.getTreeId())) {
|
||||
tree.addMenu(getMenuBean(buf, i, list));
|
||||
}
|
||||
}
|
||||
return tree;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据传入的HashFmlBuf中的值获得菜单bean
|
||||
*
|
||||
* @param buf
|
||||
* @param pos
|
||||
* @return
|
||||
*/
|
||||
private MenuBean getMenuBean(HashFmlBuf buf, int pos, List list) {
|
||||
String type = buf.fget("type",pos);
|
||||
MenuBean menu = new MenuBean(buf.fget("menuid",pos),buf.fget("menuname",pos),type);
|
||||
list.add(menu);
|
||||
if (type.equals("0")) {
|
||||
for (int i=0; i<buf.getRowCount(); i++) {
|
||||
if (buf.fget("uplevel",i).equals(menu.getMenuId())) {
|
||||
menu.addChild(getMenuBean(buf,i,list));
|
||||
}
|
||||
}
|
||||
}
|
||||
return menu;
|
||||
}
|
||||
/**
|
||||
* @return Returns the companyId.
|
||||
*/
|
||||
public String getCompanyId() {
|
||||
return this.companyId;
|
||||
}
|
||||
public String getAreaId() {
|
||||
return this.areaId;
|
||||
}
|
||||
/**
|
||||
* @param companyId The companyId to set.
|
||||
*/
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
public void setAreaId(String areaId) {
|
||||
this.areaId = areaId;
|
||||
}
|
||||
/**
|
||||
* @return Returns the treeId.
|
||||
*/
|
||||
public String getTreeId() {
|
||||
return this.treeId;
|
||||
}
|
||||
/**
|
||||
* @param treeId The treeId to set.
|
||||
*/
|
||||
public void setTreeId(String treeId) {
|
||||
this.treeId = treeId;
|
||||
}
|
||||
/**
|
||||
* @return Returns the treeName.
|
||||
*/
|
||||
public String getTreeName() {
|
||||
return this.treeName;
|
||||
}
|
||||
/**
|
||||
* @param treeName The treeName to set.
|
||||
*/
|
||||
public void setTreeName(String treeName) {
|
||||
this.treeName = treeName;
|
||||
}
|
||||
/**
|
||||
* @param menuId
|
||||
* @return
|
||||
*/
|
||||
public MenuBean getMenuById(String menuId) {
|
||||
MenuBean menu = null;
|
||||
for (int i=0; i<size(); i++) {
|
||||
menu = getMenu(i).getMenuById(menuId);
|
||||
if (menu != null) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return menu;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,87 +0,0 @@
|
||||
|
||||
package com.zky.manager;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import org.apache.log4j.Logger;
|
||||
import com.zky.pub.DbConn;
|
||||
import com.zky.util.jdbc.JDBCUtils;
|
||||
|
||||
|
||||
public class PopupMsg {
|
||||
private static final Logger log = Logger.getLogger(PopupMsg.class);
|
||||
private Login login;
|
||||
public PopupMsg(Login login){
|
||||
this.login = login;
|
||||
}
|
||||
|
||||
public List getMsg(){
|
||||
List msg = new LinkedList();
|
||||
long t;
|
||||
/*
|
||||
if((t=addMsgCardApply())>0){
|
||||
msg.add("有" + t + "条制卡申请未审核,请处理。");
|
||||
}
|
||||
if((t=addMsgDb())>0){
|
||||
msg.add("有" + t+ "库存操作需要接收,请处理。");
|
||||
}
|
||||
*/
|
||||
return msg;
|
||||
}
|
||||
|
||||
|
||||
private long addMsgCardApply(){
|
||||
if (!login.departlvlid.equals("0")) {
|
||||
//非省分员工,不需要处理。
|
||||
return 0 ;
|
||||
}
|
||||
Connection conn = DbConn.getConn() ;
|
||||
String sql = "select count(*) from tab_cardapply where AUDITFLAG = '01'";
|
||||
//已提交申请的
|
||||
try {
|
||||
List list = JDBCUtils.queryToList(conn,sql);
|
||||
Object obj[] = (Object[])list.get(0);
|
||||
return Integer.parseInt((obj[0]).toString());
|
||||
|
||||
} catch (SQLException e) {
|
||||
log.error(e);
|
||||
}finally{
|
||||
JDBCUtils.close(conn);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long addMsgDb(){
|
||||
//卡接受
|
||||
|
||||
Connection conn = DbConn.getConn() ;
|
||||
//未入库、未返销
|
||||
StringBuffer sql = new StringBuffer("SELECT count(*) FROM tab_outtrade t WHERE t.inflag = '0' AND t.cancelflag = '0' ");
|
||||
sql.append(" and companyid = '" + login.frameworkid +"'");
|
||||
if(login.departlvlid.equals("0") ||login.departlvlid.equals("1")){
|
||||
//省分、地市分公司
|
||||
sql.append(" and areaid is null and deptid is null");
|
||||
}else if (login.departlvlid.equals("2")){
|
||||
//区县
|
||||
sql.append(" and areaid = '" + login.getAreaid() +"' and deptid is null");
|
||||
}else if(login.departlvlid.equals("3")){
|
||||
//营业厅
|
||||
sql.append(" and areaid = '" + login.getAreaid() +"' and deptid='" + login.getDepartid()+"'");
|
||||
}
|
||||
//log.debug(sql);
|
||||
try {
|
||||
List list = JDBCUtils.queryToList(conn,sql.toString());
|
||||
Object obj[] = (Object[])list.get(0);
|
||||
//System.out.println(obj[0].getClass().getName());
|
||||
return Integer.parseInt((obj[0]).toString());
|
||||
|
||||
} catch (SQLException e) {
|
||||
log.error(e);
|
||||
}finally{
|
||||
JDBCUtils.close(conn);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -1,40 +0,0 @@
|
||||
package com.zky.manager;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class RandomCode {
|
||||
|
||||
public String getRandomCode() {
|
||||
return new RandomCode().getRandStr(2) + new RandomCode().getRandNum(2)
|
||||
+ new RandomCode().randomInt(0, 99);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成字母
|
||||
* */
|
||||
public String getRandStr(int charCount) {
|
||||
String charValue = "";
|
||||
for (int i = 0; i < charCount; i++) {
|
||||
char c = (char) (randomInt(0, 26) + 'a');
|
||||
charValue += String.valueOf(c);
|
||||
}
|
||||
return charValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成数字
|
||||
* */
|
||||
public String getRandNum(int charCount) {
|
||||
String charValue = "";
|
||||
for (int i = 0; i < charCount; i++) {
|
||||
char c = (char) (randomInt(0, 10) + '0');
|
||||
charValue += String.valueOf(c);
|
||||
}
|
||||
return charValue;
|
||||
}
|
||||
|
||||
public int randomInt(int from, int to) {
|
||||
Random r = new Random();
|
||||
return from + r.nextInt(to - from);
|
||||
}
|
||||
}
|
||||
@ -1,51 +0,0 @@
|
||||
|
||||
package com.zky.manager;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.log4j.Logger;
|
||||
import com.zky.manager.Login;
|
||||
import com.zky.para.Para;
|
||||
import com.zky.para.SyncPara;
|
||||
|
||||
/**
|
||||
* @author dy
|
||||
*
|
||||
*/
|
||||
public class SelectParaServlet extends HttpServlet {
|
||||
private Logger log = Logger.getLogger(SelectParaServlet.class);
|
||||
protected void doGet(HttpServletRequest request,
|
||||
HttpServletResponse response) throws ServletException, IOException {
|
||||
doPost(request, response);
|
||||
}
|
||||
|
||||
public void doPost(HttpServletRequest request, HttpServletResponse response)
|
||||
throws ServletException, IOException {
|
||||
String selectStr = "";
|
||||
String select = request.getParameter("select");
|
||||
if (select == null) {
|
||||
|
||||
} else if (select.equals("menu")) {
|
||||
String companyid = request.getParameter("companyid");
|
||||
selectStr = Para.getSelectMenuitem(companyid);
|
||||
} else if (select.equals("area")) {
|
||||
String frameworkid = request.getParameter("frameworkid");
|
||||
SyncPara para = (SyncPara) this.getServletContext().getAttribute("getPara");
|
||||
Login login_obj = (Login) request.getSession().getAttribute("login");
|
||||
selectStr = Para.getSelectArea(para, login_obj, frameworkid);
|
||||
} else if (select.equals("department")) {
|
||||
String parentdeptid = request.getParameter("parentdeptid");
|
||||
String departtypeid = request.getParameter("departtypeid");
|
||||
selectStr = Para.getSelectDept(parentdeptid,departtypeid);
|
||||
}
|
||||
response.setContentType("text/xml; charset=UTF-8");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
PrintWriter pw = response.getWriter();
|
||||
pw.write(selectStr);
|
||||
pw.close();
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,34 +0,0 @@
|
||||
package com.zky.manager;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import com.zky.pub.DbConn;
|
||||
import com.zky.pub.HashFmlBuf;
|
||||
import com.zky.util.jdbc.HashFmlBufResultSetHandler;
|
||||
import com.zky.util.jdbc.JDBCUtils;
|
||||
|
||||
public class Util {
|
||||
public static HashFmlBuf readStatic(String filed) {
|
||||
String sql="select * from TD_S_STATIC t where t.type_code=? order by t.data_code ";
|
||||
|
||||
Connection conn = DbConn.getConn();
|
||||
|
||||
try {
|
||||
|
||||
HashFmlBuf buf = (HashFmlBuf) JDBCUtils.query(conn, sql, filed, new HashFmlBufResultSetHandler());
|
||||
|
||||
|
||||
if (buf != null && buf.getRowCount() > 0) {
|
||||
|
||||
return buf;
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,29 +0,0 @@
|
||||
package com.zky.para;
|
||||
/**
|
||||
* @author dy
|
||||
*
|
||||
*/
|
||||
public class Row {
|
||||
private String display = null;
|
||||
private String value = null;
|
||||
|
||||
public Row() {
|
||||
}
|
||||
public Row(String dataCol,String displayCol) {
|
||||
this.value = dataCol;
|
||||
this.display = displayCol;
|
||||
}
|
||||
public String getDisplay() {
|
||||
return display;
|
||||
}
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
public void setDisplay(String string) {
|
||||
display = string;
|
||||
}
|
||||
public void setValue(String string) {
|
||||
value = string;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,19 +0,0 @@
|
||||
package com.zky.pojo;
|
||||
|
||||
public class Areadef {
|
||||
private int areaid;
|
||||
private String areadefname;
|
||||
public int getAreaid() {
|
||||
return areaid;
|
||||
}
|
||||
public void setAreaid(int areaid) {
|
||||
this.areaid = areaid;
|
||||
}
|
||||
public String getAreadefname() {
|
||||
return areadefname;
|
||||
}
|
||||
public void setAreadefname(String areadefname) {
|
||||
this.areadefname = areadefname;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,77 +0,0 @@
|
||||
package com.zky.pojo;
|
||||
|
||||
public class Check {
|
||||
|
||||
public String checkId;
|
||||
public String checkName;
|
||||
public String checkType;
|
||||
public String address;
|
||||
public String checkstate;
|
||||
public String checkStartTime;
|
||||
public String checkEndTime;
|
||||
public String checkContent;
|
||||
public String getCheckEndTime() {
|
||||
return checkEndTime;
|
||||
}
|
||||
public void setCheckEndTime(String checkEndTime) {
|
||||
this.checkEndTime = checkEndTime;
|
||||
}
|
||||
public String getCheckId() {
|
||||
return checkId;
|
||||
}
|
||||
public void setCheckId(String checkId) {
|
||||
this.checkId = checkId;
|
||||
}
|
||||
public String getCheckName() {
|
||||
return checkName;
|
||||
}
|
||||
public void setCheckName(String checkName) {
|
||||
this.checkName = checkName;
|
||||
}
|
||||
public String getCheckType() {
|
||||
return checkType;
|
||||
}
|
||||
public void setCheckType(String checkType) {
|
||||
this.checkType = checkType;
|
||||
}
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
public String getCheckstate() {
|
||||
return checkstate;
|
||||
}
|
||||
public void setCheckstate(String checkstate) {
|
||||
this.checkstate = checkstate;
|
||||
}
|
||||
public String getCheckStartTime() {
|
||||
return checkStartTime;
|
||||
}
|
||||
public void setCheckStartTime(String checkStartTime) {
|
||||
this.checkStartTime = checkStartTime;
|
||||
}
|
||||
public String getCheckContent() {
|
||||
return checkContent;
|
||||
}
|
||||
public void setCheckContent(String checkContent) {
|
||||
this.checkContent = checkContent;
|
||||
}
|
||||
public Check() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
public Check(String checkId, String checkName, String checkType,
|
||||
String address, String checkstate, String checkStartTime,
|
||||
String checkContent) {
|
||||
super();
|
||||
this.checkId = checkId;
|
||||
this.checkName = checkName;
|
||||
this.checkType = checkType;
|
||||
this.address = address;
|
||||
this.checkstate = checkstate;
|
||||
this.checkStartTime = checkStartTime;
|
||||
this.checkContent = checkContent;
|
||||
}
|
||||
}
|
||||
@ -1,191 +0,0 @@
|
||||
package com.zky.pojo;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class ClassInfo implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String classId;
|
||||
private String className;
|
||||
private String schoolId;
|
||||
private String schoolName;
|
||||
private int classNumber;
|
||||
private String classMaster;
|
||||
private String monitor;
|
||||
private String ganger;
|
||||
private String state;
|
||||
private String createDate;
|
||||
private String createTeacherId;
|
||||
private String createSchoolId;
|
||||
private String classEthos;
|
||||
private String classTrain;
|
||||
private String schoolMate;
|
||||
private String teacher;
|
||||
private String classAim;
|
||||
private String contribute;
|
||||
private String updateTime;
|
||||
private String updateTeacherId;
|
||||
private String updateSchoolId;
|
||||
public String getClassId() {
|
||||
return classId;
|
||||
}
|
||||
public void setClassId(String classId) {
|
||||
this.classId = classId;
|
||||
}
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
public String getSchoolId() {
|
||||
return schoolId;
|
||||
}
|
||||
public void setSchoolId(String schoolId) {
|
||||
this.schoolId = schoolId;
|
||||
}
|
||||
public String getSchoolName() {
|
||||
return schoolName;
|
||||
}
|
||||
public void setSchoolName(String schoolName) {
|
||||
this.schoolName = schoolName;
|
||||
}
|
||||
public int getClassNumber() {
|
||||
return classNumber;
|
||||
}
|
||||
public void setClassNumber(int classNumber) {
|
||||
this.classNumber = classNumber;
|
||||
}
|
||||
public String getClassMaster() {
|
||||
return classMaster;
|
||||
}
|
||||
public void setClassMaster(String classMaster) {
|
||||
this.classMaster = classMaster;
|
||||
}
|
||||
public String getMonitor() {
|
||||
return monitor;
|
||||
}
|
||||
public void setMonitor(String monitor) {
|
||||
this.monitor = monitor;
|
||||
}
|
||||
public String getGanger() {
|
||||
return ganger;
|
||||
}
|
||||
public void setGanger(String ganger) {
|
||||
this.ganger = ganger;
|
||||
}
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
public String getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
public void setCreateDate(String createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
public String getCreateTeacherId() {
|
||||
return createTeacherId;
|
||||
}
|
||||
public void setCreateTeacherId(String createTeacherId) {
|
||||
this.createTeacherId = createTeacherId;
|
||||
}
|
||||
public String getCreateSchoolId() {
|
||||
return createSchoolId;
|
||||
}
|
||||
public void setCreateSchoolId(String createSchoolId) {
|
||||
this.createSchoolId = createSchoolId;
|
||||
}
|
||||
public String getClassEthos() {
|
||||
return classEthos;
|
||||
}
|
||||
public void setClassEthos(String classEthos) {
|
||||
this.classEthos = classEthos;
|
||||
}
|
||||
public String getClassTrain() {
|
||||
return classTrain;
|
||||
}
|
||||
public void setClassTrain(String classTrain) {
|
||||
this.classTrain = classTrain;
|
||||
}
|
||||
public String getSchoolMate() {
|
||||
return schoolMate;
|
||||
}
|
||||
public void setSchoolMate(String schoolMate) {
|
||||
this.schoolMate = schoolMate;
|
||||
}
|
||||
public String getTeacher() {
|
||||
return teacher;
|
||||
}
|
||||
public void setTeacher(String teacher) {
|
||||
this.teacher = teacher;
|
||||
}
|
||||
public String getClassAim() {
|
||||
return classAim;
|
||||
}
|
||||
public void setClassAim(String classAim) {
|
||||
this.classAim = classAim;
|
||||
}
|
||||
public String getContribute() {
|
||||
return contribute;
|
||||
}
|
||||
public void setContribute(String contribute) {
|
||||
this.contribute = contribute;
|
||||
}
|
||||
public String getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
public void setUpdateTime(String updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
public String getUpdateTeacherId() {
|
||||
return updateTeacherId;
|
||||
}
|
||||
public void setUpdateTeacherId(String updateTeacherId) {
|
||||
this.updateTeacherId = updateTeacherId;
|
||||
}
|
||||
public String getUpdateSchoolId() {
|
||||
return updateSchoolId;
|
||||
}
|
||||
public void setUpdateSchoolId(String updateSchoolId) {
|
||||
this.updateSchoolId = updateSchoolId;
|
||||
}
|
||||
public ClassInfo(String classId, String className, String schoolId,
|
||||
String schoolName, int classNumber, String classMaster, String monitor,
|
||||
String ganger, String state, String createDate, String createTeacherId,
|
||||
String createSchoolId, String classEthos, String classTrain,
|
||||
String schoolMate, String teacher, String classAim, String contribute,
|
||||
String updateTime, String updateTeacherId, String updateSchoolId) {
|
||||
super();
|
||||
this.classId = classId;
|
||||
this.className = className;
|
||||
this.schoolId = schoolId;
|
||||
this.schoolName = schoolName;
|
||||
this.classNumber = classNumber;
|
||||
this.classMaster = classMaster;
|
||||
this.monitor = monitor;
|
||||
this.ganger = ganger;
|
||||
this.state = state;
|
||||
this.createDate = createDate;
|
||||
this.createTeacherId = createTeacherId;
|
||||
this.createSchoolId = createSchoolId;
|
||||
this.classEthos = classEthos;
|
||||
this.classTrain = classTrain;
|
||||
this.schoolMate = schoolMate;
|
||||
this.teacher = teacher;
|
||||
this.classAim = classAim;
|
||||
this.contribute = contribute;
|
||||
this.updateTime = updateTime;
|
||||
this.updateTeacherId = updateTeacherId;
|
||||
this.updateSchoolId = updateSchoolId;
|
||||
}
|
||||
public ClassInfo() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,225 +0,0 @@
|
||||
package com.zky.pojo;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class Department implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
public String departId;
|
||||
public String departName;
|
||||
public String departTypeId;
|
||||
public String departAddr;
|
||||
public String departPhone;
|
||||
public String departRepName;
|
||||
public String departRepPhone;
|
||||
public String departRepMobPhone;
|
||||
public String departRepEmail;
|
||||
public String departRepFax;
|
||||
public String departState;
|
||||
public String departStateDate;
|
||||
public String departLvlId;
|
||||
public String areaId;
|
||||
public String frameworkId;
|
||||
public String parentDeptId;
|
||||
public String netAddress;
|
||||
public String postCode;
|
||||
public String createTime;
|
||||
public String createTeacher;
|
||||
public String createSchool;
|
||||
public String updateTime;
|
||||
public String updateTeacher;
|
||||
public String updateSchool;
|
||||
public String areaDef;
|
||||
public String getAreaDef() {
|
||||
return areaDef;
|
||||
}
|
||||
public void setAreaDef(String areaDef) {
|
||||
this.areaDef = areaDef;
|
||||
}
|
||||
public String getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
public void setUpdateTime(String updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
public String getUpdateTeacher() {
|
||||
return updateTeacher;
|
||||
}
|
||||
public void setUpdateTeacher(String updateTeacher) {
|
||||
this.updateTeacher = updateTeacher;
|
||||
}
|
||||
public String getUpdateSchool() {
|
||||
return updateSchool;
|
||||
}
|
||||
public void setUpdateSchool(String updateSchool) {
|
||||
this.updateSchool = updateSchool;
|
||||
}
|
||||
public String getDepartId() {
|
||||
return departId;
|
||||
}
|
||||
public void setDepartId(String departId) {
|
||||
this.departId = departId;
|
||||
}
|
||||
public String getDepartName() {
|
||||
return departName;
|
||||
}
|
||||
public void setDepartName(String departName) {
|
||||
this.departName = departName;
|
||||
}
|
||||
public String getDepartTypeId() {
|
||||
return departTypeId;
|
||||
}
|
||||
public void setDepartTypeId(String departTypeId) {
|
||||
this.departTypeId = departTypeId;
|
||||
}
|
||||
public String getDepartAddr() {
|
||||
return departAddr;
|
||||
}
|
||||
public void setDepartAddr(String departAddr) {
|
||||
this.departAddr = departAddr;
|
||||
}
|
||||
public String getDepartPhone() {
|
||||
return departPhone;
|
||||
}
|
||||
public void setDepartPhone(String departPhone) {
|
||||
this.departPhone = departPhone;
|
||||
}
|
||||
public String getDepartRepName() {
|
||||
return departRepName;
|
||||
}
|
||||
public void setDepartRepName(String departRepName) {
|
||||
this.departRepName = departRepName;
|
||||
}
|
||||
public String getDepartRepPhone() {
|
||||
return departRepPhone;
|
||||
}
|
||||
public void setDepartRepPhone(String departRepPhone) {
|
||||
this.departRepPhone = departRepPhone;
|
||||
}
|
||||
public String getDepartRepMobPhone() {
|
||||
return departRepMobPhone;
|
||||
}
|
||||
public void setDepartRepMobPhone(String departRepMobPhone) {
|
||||
this.departRepMobPhone = departRepMobPhone;
|
||||
}
|
||||
public String getDepartRepEmail() {
|
||||
return departRepEmail;
|
||||
}
|
||||
public void setDepartRepEmail(String departRepEmail) {
|
||||
this.departRepEmail = departRepEmail;
|
||||
}
|
||||
public String getDepartRepFax() {
|
||||
return departRepFax;
|
||||
}
|
||||
public void setDepartRepFax(String departRepFax) {
|
||||
this.departRepFax = departRepFax;
|
||||
}
|
||||
public String getDepartState() {
|
||||
return departState;
|
||||
}
|
||||
public void setDepartState(String departState) {
|
||||
this.departState = departState;
|
||||
}
|
||||
public String getDepartStateDate() {
|
||||
return departStateDate;
|
||||
}
|
||||
public void setDepartStateDate(String departStateDate) {
|
||||
this.departStateDate = departStateDate;
|
||||
}
|
||||
public String getDepartLvlId() {
|
||||
return departLvlId;
|
||||
}
|
||||
public void setDepartLvlId(String departLvlId) {
|
||||
this.departLvlId = departLvlId;
|
||||
}
|
||||
public String getAreaId() {
|
||||
return areaId;
|
||||
}
|
||||
public void setAreaId(String areaId) {
|
||||
this.areaId = areaId;
|
||||
}
|
||||
public String getFrameworkId() {
|
||||
return frameworkId;
|
||||
}
|
||||
public void setFrameworkId(String frameworkId) {
|
||||
this.frameworkId = frameworkId;
|
||||
}
|
||||
public String getParentDeptId() {
|
||||
return parentDeptId;
|
||||
}
|
||||
public void setParentDeptId(String parentDeptId) {
|
||||
this.parentDeptId = parentDeptId;
|
||||
}
|
||||
public String getNetAddress() {
|
||||
return netAddress;
|
||||
}
|
||||
public void setNetAddress(String netAddress) {
|
||||
this.netAddress = netAddress;
|
||||
}
|
||||
public String getPostCode() {
|
||||
return postCode;
|
||||
}
|
||||
public void setPostCode(String postCode) {
|
||||
this.postCode = postCode;
|
||||
}
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
public String getCreateTeacher() {
|
||||
return createTeacher;
|
||||
}
|
||||
public void setCreateTeacher(String createTeacher) {
|
||||
this.createTeacher = createTeacher;
|
||||
}
|
||||
public String getCreateSchool() {
|
||||
return createSchool;
|
||||
}
|
||||
public void setCreateSchool(String createSchool) {
|
||||
this.createSchool = createSchool;
|
||||
}
|
||||
public Department(String departId, String departName, String departTypeId,
|
||||
String departAddr, String departPhone, String departRepName,
|
||||
String departRepPhone, String departRepMobPhone, String departRepEmail,
|
||||
String departRepFax, String departState, String departStateDate,
|
||||
String departLvlId, String areaId, String frameworkId,
|
||||
String parentDeptId, String netAddress, String postCode,
|
||||
String createTime, String createTeacher, String createSchool,
|
||||
String updateTime,String updateTeacher,String updateSchool,String areaDef) {
|
||||
super();
|
||||
this.departId = departId;
|
||||
this.departName = departName;
|
||||
this.departTypeId = departTypeId;
|
||||
this.departAddr = departAddr;
|
||||
this.departPhone = departPhone;
|
||||
this.departRepName = departRepName;
|
||||
this.departRepPhone = departRepPhone;
|
||||
this.departRepMobPhone = departRepMobPhone;
|
||||
this.departRepEmail = departRepEmail;
|
||||
this.departRepFax = departRepFax;
|
||||
this.departState = departState;
|
||||
this.departStateDate = departStateDate;
|
||||
this.departLvlId = departLvlId;
|
||||
this.areaId = areaId;
|
||||
this.frameworkId = frameworkId;
|
||||
this.parentDeptId = parentDeptId;
|
||||
this.netAddress = netAddress;
|
||||
this.postCode = postCode;
|
||||
this.createTime = createTime;
|
||||
this.createTeacher = createTeacher;
|
||||
this.createSchool = createSchool;
|
||||
this.updateTime=updateTime;
|
||||
this.updateTeacher=updateTeacher;
|
||||
this.updateSchool=updateSchool;
|
||||
this.areaDef=areaDef;
|
||||
}
|
||||
public Department() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,286 +0,0 @@
|
||||
package com.zky.pojo;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class Employee implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String empId;
|
||||
private String empName;
|
||||
private String certName;
|
||||
private String certId;
|
||||
private String departId;
|
||||
private String sex;
|
||||
private String empState;
|
||||
private String birthday;
|
||||
private String nation;
|
||||
private String address;
|
||||
private String qq;
|
||||
private String email;
|
||||
private String bloodType;
|
||||
public String updateUserId;
|
||||
public String updateSchoolId;
|
||||
public String updateDate;
|
||||
public String submitbtn;
|
||||
public String empage;
|
||||
public String emphabby;
|
||||
public String empjob;
|
||||
public String empeducational;
|
||||
public String empfamname;
|
||||
public String empfamage;
|
||||
public String empfamrelate;
|
||||
public String empfamjob;
|
||||
public String empschool;
|
||||
public String emppolitics;
|
||||
public String emphomeAddress;
|
||||
public String radioresult;
|
||||
public String jobename;
|
||||
public String departname;
|
||||
public String empstarttime;
|
||||
public String phone;
|
||||
public String radioresult1;
|
||||
public int id;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
public String getRadioresult1() {
|
||||
return radioresult1;
|
||||
}
|
||||
public void setRadioresult1(String radioresult1) {
|
||||
this.radioresult1 = radioresult1;
|
||||
}
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
public String getEmpstarttime() {
|
||||
return empstarttime;
|
||||
}
|
||||
public void setEmpstarttime(String empstarttime) {
|
||||
this.empstarttime = empstarttime;
|
||||
}
|
||||
public String getDepartname() {
|
||||
return departname;
|
||||
}
|
||||
public void setDepartname(String departname) {
|
||||
this.departname = departname;
|
||||
}
|
||||
public String getJobename() {
|
||||
return jobename;
|
||||
}
|
||||
public void setJobename(String jobename) {
|
||||
this.jobename = jobename;
|
||||
}
|
||||
public String getRadioresult() {
|
||||
return radioresult;
|
||||
}
|
||||
public void setRadioresult(String radioresult) {
|
||||
this.radioresult = radioresult;
|
||||
}
|
||||
public String getEmpId() {
|
||||
return empId;
|
||||
}
|
||||
public void setEmpId(String empId) {
|
||||
this.empId = empId;
|
||||
}
|
||||
public String getEmpName() {
|
||||
return empName;
|
||||
}
|
||||
public void setEmpName(String empName) {
|
||||
this.empName = empName;
|
||||
}
|
||||
public String getDepartId() {
|
||||
return departId;
|
||||
}
|
||||
public void setDepartId(String departId) {
|
||||
this.departId = departId;
|
||||
}
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
public String getEmpState() {
|
||||
return empState;
|
||||
}
|
||||
public void setEmpState(String empState) {
|
||||
this.empState = empState;
|
||||
}
|
||||
public String getBirthday() {
|
||||
return birthday;
|
||||
}
|
||||
public void setBirthday(String birthday) {
|
||||
this.birthday = birthday;
|
||||
}
|
||||
public String getNation() {
|
||||
return nation;
|
||||
}
|
||||
public void setNation(String nation) {
|
||||
this.nation = nation;
|
||||
}
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
public String getQq() {
|
||||
return qq;
|
||||
}
|
||||
public void setQq(String qq) {
|
||||
this.qq = qq;
|
||||
}
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
public String getBloodType() {
|
||||
return bloodType;
|
||||
}
|
||||
public void setBloodType(String bloodType) {
|
||||
this.bloodType = bloodType;
|
||||
}
|
||||
public String getUpdateUserId() {
|
||||
return updateUserId;
|
||||
}
|
||||
public void setUpdateUserId(String updateUserId) {
|
||||
this.updateUserId = updateUserId;
|
||||
}
|
||||
public String getUpdateSchoolId() {
|
||||
return updateSchoolId;
|
||||
}
|
||||
public void setUpdateSchoolId(String updateSchoolId) {
|
||||
this.updateSchoolId = updateSchoolId;
|
||||
}
|
||||
public String getUpdateDate() {
|
||||
return updateDate;
|
||||
}
|
||||
public void setUpdateDate(String updateDate) {
|
||||
this.updateDate = updateDate;
|
||||
}
|
||||
public String getSubmitbtn() {
|
||||
return submitbtn;
|
||||
}
|
||||
public void setSubmitbtn(String submitbtn) {
|
||||
this.submitbtn = submitbtn;
|
||||
}
|
||||
public String getEmpage() {
|
||||
return empage;
|
||||
}
|
||||
public void setEmpage(String empage) {
|
||||
this.empage = empage;
|
||||
}
|
||||
public String getEmphabby() {
|
||||
return emphabby;
|
||||
}
|
||||
public void setEmphabby(String emphabby) {
|
||||
this.emphabby = emphabby;
|
||||
}
|
||||
public String getEmpjob() {
|
||||
return empjob;
|
||||
}
|
||||
public void setEmpjob(String empjob) {
|
||||
this.empjob = empjob;
|
||||
}
|
||||
public String getEmpeducational() {
|
||||
return empeducational;
|
||||
}
|
||||
public void setEmpeducational(String empeducational) {
|
||||
this.empeducational = empeducational;
|
||||
}
|
||||
public String getEmpfamname() {
|
||||
return empfamname;
|
||||
}
|
||||
public void setEmpfamname(String empfamname) {
|
||||
this.empfamname = empfamname;
|
||||
}
|
||||
public String getEmpfamage() {
|
||||
return empfamage;
|
||||
}
|
||||
public void setEmpfamage(String empfamage) {
|
||||
this.empfamage = empfamage;
|
||||
}
|
||||
public String getEmpfamrelate() {
|
||||
return empfamrelate;
|
||||
}
|
||||
public void setEmpfamrelate(String empfamrelate) {
|
||||
this.empfamrelate = empfamrelate;
|
||||
}
|
||||
public String getEmpfamjob() {
|
||||
return empfamjob;
|
||||
}
|
||||
public void setEmpfamjob(String empfamjob) {
|
||||
this.empfamjob = empfamjob;
|
||||
}
|
||||
public String getEmpschool() {
|
||||
return empschool;
|
||||
}
|
||||
public void setEmpschool(String empschool) {
|
||||
this.empschool = empschool;
|
||||
}
|
||||
public String getEmppolitics() {
|
||||
return emppolitics;
|
||||
}
|
||||
public void setEmppolitics(String emppolitics) {
|
||||
this.emppolitics = emppolitics;
|
||||
}
|
||||
public String getEmphomeAddress() {
|
||||
return emphomeAddress;
|
||||
}
|
||||
public void setEmphomeAddress(String emphomeAddress) {
|
||||
this.emphomeAddress = emphomeAddress;
|
||||
}
|
||||
public static long getSerialversionuid() {
|
||||
return serialVersionUID;
|
||||
}
|
||||
public Employee(String empId, String empName, String departId, String sex,
|
||||
String empState, String birthday, String nation, String address,
|
||||
String qq, String email, String bloodType, String updateUserId,
|
||||
String updateSchoolId, String updateDate, String submitbtn,
|
||||
String empage, String emphabby, String empjob,
|
||||
String empeducational, String empfamname, String empfamage,
|
||||
String empfamrelate, String empfamjob, String empschool,
|
||||
String emppolitics, String emphomeAddress,String radioresult) {
|
||||
super();
|
||||
this.empId = empId;
|
||||
this.empName = empName;
|
||||
this.departId = departId;
|
||||
this.sex = sex;
|
||||
this.empState = empState;
|
||||
this.birthday = birthday;
|
||||
this.nation = nation;
|
||||
this.address = address;
|
||||
this.qq = qq;
|
||||
this.email = email;
|
||||
this.bloodType = bloodType;
|
||||
this.updateUserId = updateUserId;
|
||||
this.updateSchoolId = updateSchoolId;
|
||||
this.updateDate = updateDate;
|
||||
this.submitbtn = submitbtn;
|
||||
this.empage = empage;
|
||||
this.emphabby = emphabby;
|
||||
this.empjob = empjob;
|
||||
this.empeducational = empeducational;
|
||||
this.empfamname = empfamname;
|
||||
this.empfamage = empfamage;
|
||||
this.empfamrelate = empfamrelate;
|
||||
this.empfamjob = empfamjob;
|
||||
this.empschool = empschool;
|
||||
this.emppolitics = emppolitics;
|
||||
this.emphomeAddress = emphomeAddress;
|
||||
this.radioresult=radioresult;
|
||||
}
|
||||
public Employee() {
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,278 +0,0 @@
|
||||
package com.zky.pojo;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class FileInfo implements Serializable {
|
||||
private String provideId;
|
||||
private String fileName;
|
||||
private String writeDepartName;
|
||||
private String writeEmpName;
|
||||
private String provideDepartName;
|
||||
private String provideDate;
|
||||
private String fileState;
|
||||
private String targetDepartName;
|
||||
private String targetDepartId;
|
||||
private String provideEmpName;
|
||||
private String holdEmpName;
|
||||
private String holdDate;
|
||||
private String fileSecret;
|
||||
private String instancyExtent;
|
||||
private String targetDepartid;
|
||||
private String provideState;
|
||||
private String receiveState;
|
||||
private String borrowState;
|
||||
private String recoverState;
|
||||
private String extractState;
|
||||
private String destoryState;
|
||||
private String fileId;
|
||||
private String provideLevel;
|
||||
private String fileNum;
|
||||
private String empname;
|
||||
private String provideCount;
|
||||
private String releaseSecretid;
|
||||
private String fileSecretyj;
|
||||
private int filesId;
|
||||
private String frameWorkName;
|
||||
private String areadef;
|
||||
private String departName;
|
||||
public int id;
|
||||
public String getFileSecretyj() {
|
||||
return fileSecretyj;
|
||||
}
|
||||
public void setFileSecretyj(String fileSecretyj) {
|
||||
this.fileSecretyj = fileSecretyj;
|
||||
}
|
||||
public String getReleaseSecretid() {
|
||||
return releaseSecretid;
|
||||
}
|
||||
public void setReleaseSecretid(String releaseSecretid) {
|
||||
this.releaseSecretid = releaseSecretid;
|
||||
}
|
||||
public String getProvideCount() {
|
||||
return provideCount;
|
||||
}
|
||||
public void setProvideCount(String provideCount) {
|
||||
this.provideCount = provideCount;
|
||||
}
|
||||
public String getEmpname() {
|
||||
return empname;
|
||||
}
|
||||
public void setEmpname(String empname) {
|
||||
this.empname = empname;
|
||||
}
|
||||
public String getFileNum() {
|
||||
return fileNum;
|
||||
}
|
||||
public void setFileNum(String fileNum) {
|
||||
this.fileNum = fileNum;
|
||||
}
|
||||
public String getTargetDepartId() {
|
||||
return targetDepartId;
|
||||
}
|
||||
public void setTargetDepartId(String targetDepartId) {
|
||||
this.targetDepartId = targetDepartId;
|
||||
}
|
||||
public FileInfo() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
public FileInfo(String provideId, String fileName, String provideDepartName,
|
||||
String provideDate, String fileState, String provideEmpName,
|
||||
String holdDepartName, String holdEmpName, String holdDate,
|
||||
String fileSecret, String instancyExtent, String targetDepartid,
|
||||
String provideState,String receiveState, String borrowState,
|
||||
String recoverState,String extractState, String destoryState,String writeDepartName,String writeEmpName,String targetDepartName,String fileId,String provideLevel,
|
||||
int filesId,String frameWorkName,String areadef,String departName,int id) {
|
||||
super();
|
||||
this.provideId = provideId;
|
||||
this.fileName = fileName;
|
||||
this.provideDepartName = provideDepartName;
|
||||
this.provideDate = provideDate;
|
||||
this.fileState = fileState;
|
||||
this.provideEmpName = provideEmpName;
|
||||
this.holdEmpName = holdEmpName;
|
||||
this.holdDate = holdDate;
|
||||
this.fileSecret = fileSecret;
|
||||
this.instancyExtent = instancyExtent;
|
||||
this.targetDepartid = targetDepartid;
|
||||
this.provideState = provideState;
|
||||
this.receiveState = receiveState;
|
||||
this.borrowState = borrowState;
|
||||
this.recoverState = recoverState;
|
||||
this.extractState = extractState;
|
||||
this.destoryState = destoryState;
|
||||
this.writeDepartName=writeDepartName;
|
||||
this.writeEmpName=writeEmpName;
|
||||
this.targetDepartName=targetDepartName;
|
||||
this.fileId=fileId;
|
||||
this.provideLevel=provideLevel;
|
||||
this.filesId=filesId;
|
||||
this.frameWorkName=frameWorkName;
|
||||
this.areadef=areadef;
|
||||
this.departName=departName;
|
||||
this.id=id;
|
||||
}
|
||||
|
||||
public String getFileId() {
|
||||
return fileId;
|
||||
}
|
||||
public void setFileId(String fileId) {
|
||||
this.fileId = fileId;
|
||||
}
|
||||
public String getWriteDepartName() {
|
||||
return writeDepartName;
|
||||
}
|
||||
public void setWriteDepartName(String writeDepartName) {
|
||||
this.writeDepartName = writeDepartName;
|
||||
}
|
||||
public String getWriteEmpName() {
|
||||
return writeEmpName;
|
||||
}
|
||||
public void setWriteEmpName(String writeEmpName) {
|
||||
this.writeEmpName = writeEmpName;
|
||||
}
|
||||
public String getProvideId() {
|
||||
return provideId;
|
||||
}
|
||||
public void setProvideId(String provideId) {
|
||||
this.provideId = provideId;
|
||||
}
|
||||
public String getFileName() {
|
||||
return fileName;
|
||||
}
|
||||
public void setFileName(String fileName) {
|
||||
this.fileName = fileName;
|
||||
}
|
||||
public String getProvideDepartName() {
|
||||
return provideDepartName;
|
||||
}
|
||||
public void setProvideDepartName(String provideDepartName) {
|
||||
this.provideDepartName = provideDepartName;
|
||||
}
|
||||
public String getProvideDate() {
|
||||
return provideDate;
|
||||
}
|
||||
public void setProvideDate(String provideDate) {
|
||||
this.provideDate = provideDate;
|
||||
}
|
||||
public String getFileState() {
|
||||
return fileState;
|
||||
}
|
||||
public void setFileState(String fileState) {
|
||||
this.fileState = fileState;
|
||||
}
|
||||
public String getProvideEmpName() {
|
||||
return provideEmpName;
|
||||
}
|
||||
public void setProvideEmpName(String provideEmpName) {
|
||||
this.provideEmpName = provideEmpName;
|
||||
}
|
||||
public String getHoldEmpName() {
|
||||
return holdEmpName;
|
||||
}
|
||||
public void setHoldEmpName(String holdEmpName) {
|
||||
this.holdEmpName = holdEmpName;
|
||||
}
|
||||
public String getHoldDate() {
|
||||
return holdDate;
|
||||
}
|
||||
public void setHoldDate(String holdDate) {
|
||||
this.holdDate = holdDate;
|
||||
}
|
||||
public String getFileSecret() {
|
||||
return fileSecret;
|
||||
}
|
||||
public void setFileSecret(String fileSecret) {
|
||||
this.fileSecret = fileSecret;
|
||||
}
|
||||
public String getInstancyExtent() {
|
||||
return instancyExtent;
|
||||
}
|
||||
public void setInstancyExtent(String instancyExtent) {
|
||||
this.instancyExtent = instancyExtent;
|
||||
}
|
||||
public String getTargetDepartid() {
|
||||
return targetDepartid;
|
||||
}
|
||||
public void setTargetDepartid(String targetDepartid) {
|
||||
this.targetDepartid = targetDepartid;
|
||||
}
|
||||
public String getProvideState() {
|
||||
return provideState;
|
||||
}
|
||||
public void setProvideState(String provideState) {
|
||||
this.provideState = provideState;
|
||||
}
|
||||
public String getReceiveState() {
|
||||
return receiveState;
|
||||
}
|
||||
public void setReceiveState(String receiveState) {
|
||||
this.receiveState = receiveState;
|
||||
}
|
||||
public String getBorrowState() {
|
||||
return borrowState;
|
||||
}
|
||||
public void setBorrowState(String borrowState) {
|
||||
this.borrowState = borrowState;
|
||||
}
|
||||
public String getRecoverState() {
|
||||
return recoverState;
|
||||
}
|
||||
public void setRecoverState(String recoverState) {
|
||||
this.recoverState = recoverState;
|
||||
}
|
||||
public String getExtractState() {
|
||||
return extractState;
|
||||
}
|
||||
public void setExtractState(String extractState) {
|
||||
this.extractState = extractState;
|
||||
}
|
||||
public String getDestoryState() {
|
||||
return destoryState;
|
||||
}
|
||||
public void setDestoryState(String destoryState) {
|
||||
this.destoryState = destoryState;
|
||||
}
|
||||
public String getTargetDepartName() {
|
||||
return targetDepartName;
|
||||
}
|
||||
public void setTargetDepartName(String targetDepartName) {
|
||||
this.targetDepartName = targetDepartName;
|
||||
}
|
||||
public String getProvideLevel() {
|
||||
return provideLevel;
|
||||
}
|
||||
public void setProvideLevel(String provideLevel) {
|
||||
this.provideLevel = provideLevel;
|
||||
}
|
||||
public int getFilesId() {
|
||||
return filesId;
|
||||
}
|
||||
public void setFilesId(int filesId) {
|
||||
this.filesId = filesId;
|
||||
}
|
||||
public String getFrameWorkName() {
|
||||
return frameWorkName;
|
||||
}
|
||||
public void setFrameWorkName(String frameWorkName) {
|
||||
this.frameWorkName = frameWorkName;
|
||||
}
|
||||
public String getAreadef() {
|
||||
return areadef;
|
||||
}
|
||||
public void setAreadef(String areadef) {
|
||||
this.areadef = areadef;
|
||||
}
|
||||
public String getDepartName() {
|
||||
return departName;
|
||||
}
|
||||
public void setDepartName(String departName) {
|
||||
this.departName = departName;
|
||||
}
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
}
|
||||
@ -1,20 +0,0 @@
|
||||
package com.zky.pojo;
|
||||
|
||||
public class Framework {
|
||||
|
||||
private int funid;
|
||||
private String funname;
|
||||
public int getFunid() {
|
||||
return funid;
|
||||
}
|
||||
public void setFunid(int funid) {
|
||||
this.funid = funid;
|
||||
}
|
||||
public String getFunname() {
|
||||
return funname;
|
||||
}
|
||||
public void setFunname(String funname) {
|
||||
this.funname = funname;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,27 +0,0 @@
|
||||
package com.zky.pojo;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
|
||||
public abstract class MyUtils {
|
||||
|
||||
public static String getTimeString(){
|
||||
SimpleDateFormat sdf=new SimpleDateFormat("HH:mm:ss");
|
||||
Calendar cal=Calendar.getInstance();
|
||||
return sdf.format(cal.getTime());
|
||||
}
|
||||
public static String getDateString(){
|
||||
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar cal=Calendar.getInstance();
|
||||
return sdf.format(cal.getTime());
|
||||
}
|
||||
public static String getDate22String(){
|
||||
SimpleDateFormat sdf=new SimpleDateFormat("yyyymmddhhmmss");
|
||||
Calendar cal=Calendar.getInstance();
|
||||
return sdf.format(cal.getTime());
|
||||
}
|
||||
public static String gettimeeString(){
|
||||
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Calendar cal=Calendar.getInstance();
|
||||
return sdf.format(cal.getTime());
|
||||
}
|
||||
}
|
||||
@ -1,477 +0,0 @@
|
||||
package com.zky.pojo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class PropertyInfo implements Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String provideId;
|
||||
private String id;
|
||||
private int idd;
|
||||
private String useId;
|
||||
private String propertyName;
|
||||
private String useEmpName;
|
||||
private String useDepartName;
|
||||
private String useDate;
|
||||
private String provideDepartName;
|
||||
private String provideStaffName;
|
||||
private String provideDate;
|
||||
private String maintain_departid;
|
||||
private String maintain_staffid;
|
||||
private String maintain_state;
|
||||
private String maintain_date;
|
||||
private Date maintain_date1;
|
||||
private String propertyType;
|
||||
private String propertyNo;
|
||||
private String propertyUnit;
|
||||
private String provideState;
|
||||
private String receiveState;
|
||||
private String recoverState;
|
||||
private String recoverType;
|
||||
private String maintainState;
|
||||
private String extractState;
|
||||
private String scrapState;
|
||||
private String destoryState;
|
||||
private String propertyBrand;
|
||||
private String propertyMac;
|
||||
private String propertySn;
|
||||
private String property_soffwe;
|
||||
private String property_soff;
|
||||
private String waiter;
|
||||
private String remark;
|
||||
private String destory_departid;
|
||||
private String destory_staffid;
|
||||
private String destory_date;
|
||||
private String destory_type;
|
||||
private String destory_state;
|
||||
private String yesno;
|
||||
private String yesnosoftwereone;
|
||||
private String yesnosoftweretwo;
|
||||
private String yesnosoftwerethree;
|
||||
private String yesnosoftwerefour;
|
||||
private String framework_id;
|
||||
private String area_id;
|
||||
private String recover_departid;
|
||||
private String recover_staffid;
|
||||
private String recover_date;
|
||||
private String sercent;
|
||||
private String finallyNum;
|
||||
private String netName;
|
||||
private String netData;
|
||||
private String netNum;
|
||||
private String netrecover_departid;
|
||||
private String importData;
|
||||
private String part;
|
||||
private String property_netw;
|
||||
private String airtight;
|
||||
private String partyaohai;
|
||||
private String pecover_infoname;
|
||||
|
||||
|
||||
public String getPecover_infoname() {
|
||||
return pecover_infoname;
|
||||
}
|
||||
public void setPecover_infoname(String pecover_infoname) {
|
||||
this.pecover_infoname = pecover_infoname;
|
||||
}
|
||||
public String getPartyaohai() {
|
||||
return partyaohai;
|
||||
}
|
||||
public void setPartyaohai(String partyaohai) {
|
||||
this.partyaohai = partyaohai;
|
||||
}
|
||||
public String getAirtight() {
|
||||
return airtight;
|
||||
}
|
||||
public void setAirtight(String airtight) {
|
||||
this.airtight = airtight;
|
||||
}
|
||||
public String getProperty_netw() {
|
||||
return property_netw;
|
||||
}
|
||||
public void setProperty_netw(String property_netw) {
|
||||
this.property_netw = property_netw;
|
||||
}
|
||||
public String getPart() {
|
||||
return part;
|
||||
}
|
||||
public void setPart(String part) {
|
||||
this.part = part;
|
||||
}
|
||||
public String getImportData() {
|
||||
return importData;
|
||||
}
|
||||
public void setImportData(String importData) {
|
||||
this.importData = importData;
|
||||
}
|
||||
public String getNetrecover_departid() {
|
||||
return netrecover_departid;
|
||||
}
|
||||
public void setNetrecover_departid(String netrecover_departid) {
|
||||
this.netrecover_departid = netrecover_departid;
|
||||
}
|
||||
public String getNetNum() {
|
||||
return netNum;
|
||||
}
|
||||
public void setNetNum(String netNum) {
|
||||
this.netNum = netNum;
|
||||
}
|
||||
public String getNetData() {
|
||||
return netData;
|
||||
}
|
||||
public void setNetData(String netData) {
|
||||
this.netData = netData;
|
||||
}
|
||||
public String getNetName() {
|
||||
return netName;
|
||||
}
|
||||
public void setNetName(String netName) {
|
||||
this.netName = netName;
|
||||
}
|
||||
public String getFinallyNum() {
|
||||
return finallyNum;
|
||||
}
|
||||
public void setFinallyNum(String finallyNum) {
|
||||
this.finallyNum = finallyNum;
|
||||
}
|
||||
public String getSercent() {
|
||||
return sercent;
|
||||
}
|
||||
public void setSercent(String sercent) {
|
||||
this.sercent = sercent;
|
||||
}
|
||||
public Date getMaintain_date1() {
|
||||
return maintain_date1;
|
||||
}
|
||||
public void setMaintain_date1(Date maintain_date1) {
|
||||
this.maintain_date1 = maintain_date1;
|
||||
}
|
||||
public String getFramework_id() {
|
||||
return framework_id;
|
||||
}
|
||||
public void setFramework_id(String framework_id) {
|
||||
this.framework_id = framework_id;
|
||||
}
|
||||
public String getArea_id() {
|
||||
return area_id;
|
||||
}
|
||||
public void setArea_id(String area_id) {
|
||||
this.area_id = area_id;
|
||||
}
|
||||
public String getRecover_departid() {
|
||||
return recover_departid;
|
||||
}
|
||||
public void setRecover_departid(String recover_departid) {
|
||||
this.recover_departid = recover_departid;
|
||||
}
|
||||
public String getRecover_staffid() {
|
||||
return recover_staffid;
|
||||
}
|
||||
public void setRecover_staffid(String recover_staffid) {
|
||||
this.recover_staffid = recover_staffid;
|
||||
}
|
||||
public String getRecover_date() {
|
||||
return recover_date;
|
||||
}
|
||||
public void setRecover_date(String recover_date) {
|
||||
this.recover_date = recover_date;
|
||||
}
|
||||
public String getYesno() {
|
||||
return yesno;
|
||||
}
|
||||
public void setYesno(String yesno) {
|
||||
this.yesno = yesno;
|
||||
}
|
||||
public String getYesnosoftwereone() {
|
||||
return yesnosoftwereone;
|
||||
}
|
||||
public void setYesnosoftwereone(String yesnosoftwereone) {
|
||||
this.yesnosoftwereone = yesnosoftwereone;
|
||||
}
|
||||
public String getYesnosoftweretwo() {
|
||||
return yesnosoftweretwo;
|
||||
}
|
||||
public void setYesnosoftweretwo(String yesnosoftweretwo) {
|
||||
this.yesnosoftweretwo = yesnosoftweretwo;
|
||||
}
|
||||
public String getYesnosoftwerethree() {
|
||||
return yesnosoftwerethree;
|
||||
}
|
||||
public void setYesnosoftwerethree(String yesnosoftwerethree) {
|
||||
this.yesnosoftwerethree = yesnosoftwerethree;
|
||||
}
|
||||
public String getYesnosoftwerefour() {
|
||||
return yesnosoftwerefour;
|
||||
}
|
||||
public void setYesnosoftwerefour(String yesnosoftwerefour) {
|
||||
this.yesnosoftwerefour = yesnosoftwerefour;
|
||||
}
|
||||
public String getDestory_departid() {
|
||||
return destory_departid;
|
||||
}
|
||||
public void setDestory_departid(String destory_departid) {
|
||||
this.destory_departid = destory_departid;
|
||||
}
|
||||
public String getDestory_staffid() {
|
||||
return destory_staffid;
|
||||
}
|
||||
public void setDestory_staffid(String destory_staffid) {
|
||||
this.destory_staffid = destory_staffid;
|
||||
}
|
||||
public String getDestory_date() {
|
||||
return destory_date;
|
||||
}
|
||||
public void setDestory_date(String destory_date) {
|
||||
this.destory_date = destory_date;
|
||||
}
|
||||
public String getDestory_type() {
|
||||
return destory_type;
|
||||
}
|
||||
public void setDestory_type(String destory_type) {
|
||||
this.destory_type = destory_type;
|
||||
}
|
||||
public String getDestory_state() {
|
||||
return destory_state;
|
||||
}
|
||||
public void setDestory_state(String destory_state) {
|
||||
this.destory_state = destory_state;
|
||||
}
|
||||
public String getWaiter() {
|
||||
return waiter;
|
||||
}
|
||||
public void setWaiter(String waiter) {
|
||||
this.waiter = waiter;
|
||||
}
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
public String getMaintain_departid() {
|
||||
return maintain_departid;
|
||||
}
|
||||
public void setMaintain_departid(String maintain_departid) {
|
||||
this.maintain_departid = maintain_departid;
|
||||
}
|
||||
public String getMaintain_staffid() {
|
||||
return maintain_staffid;
|
||||
}
|
||||
public void setMaintain_staffid(String maintain_staffid) {
|
||||
this.maintain_staffid = maintain_staffid;
|
||||
}
|
||||
public String getMaintain_state() {
|
||||
return maintain_state;
|
||||
}
|
||||
public void setMaintain_state(String maintain_state) {
|
||||
this.maintain_state = maintain_state;
|
||||
}
|
||||
public String getMaintain_date() {
|
||||
return maintain_date;
|
||||
}
|
||||
public void setMaintain_date(String maintain_date) {
|
||||
this.maintain_date = maintain_date;
|
||||
}
|
||||
public String getProperty_soffwe() {
|
||||
return property_soffwe;
|
||||
}
|
||||
public void setProperty_soffwe(String property_soffwe) {
|
||||
this.property_soffwe = property_soffwe;
|
||||
}
|
||||
public String getProperty_soff() {
|
||||
return property_soff;
|
||||
}
|
||||
public void setProperty_soff(String property_soff) {
|
||||
this.property_soff = property_soff;
|
||||
}
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
public String getPropertyBrand() {
|
||||
return propertyBrand;
|
||||
}
|
||||
public void setPropertyBrand(String propertyBrand) {
|
||||
this.propertyBrand = propertyBrand;
|
||||
}
|
||||
public String getPropertyMac() {
|
||||
return propertyMac;
|
||||
}
|
||||
public void setPropertyMac(String propertyMac) {
|
||||
this.propertyMac = propertyMac;
|
||||
}
|
||||
public String getPropertySn() {
|
||||
return propertySn;
|
||||
}
|
||||
public void setPropertySn(String propertySn) {
|
||||
this.propertySn = propertySn;
|
||||
}
|
||||
public String getProvideId() {
|
||||
return provideId;
|
||||
}
|
||||
public void setProvideId(String provideId) {
|
||||
this.provideId = provideId;
|
||||
}
|
||||
public String getUseId() {
|
||||
return useId;
|
||||
}
|
||||
public void setUseId(String useId) {
|
||||
this.useId = useId;
|
||||
}
|
||||
public String getPropertyName() {
|
||||
return propertyName;
|
||||
}
|
||||
public void setPropertyName(String propertyName) {
|
||||
this.propertyName = propertyName;
|
||||
}
|
||||
public String getUseEmpName() {
|
||||
return useEmpName;
|
||||
}
|
||||
public void setUseEmpName(String useEmpName) {
|
||||
this.useEmpName = useEmpName;
|
||||
}
|
||||
public String getUseDepartName() {
|
||||
return useDepartName;
|
||||
}
|
||||
public void setUseDepartName(String useDepartName) {
|
||||
this.useDepartName = useDepartName;
|
||||
}
|
||||
public String getUseDate() {
|
||||
return useDate;
|
||||
}
|
||||
public void setUseDate(String useDate) {
|
||||
this.useDate = useDate;
|
||||
}
|
||||
public String getProvideDepartName() {
|
||||
return provideDepartName;
|
||||
}
|
||||
public void setProvideDepartName(String provideDepartName) {
|
||||
this.provideDepartName = provideDepartName;
|
||||
}
|
||||
public String getProvideStaffName() {
|
||||
return provideStaffName;
|
||||
}
|
||||
public void setProvideStaffName(String provideStaffName) {
|
||||
this.provideStaffName = provideStaffName;
|
||||
}
|
||||
public String getProvideDate() {
|
||||
return provideDate;
|
||||
}
|
||||
public void setProvideDate(String provideDate) {
|
||||
this.provideDate = provideDate;
|
||||
}
|
||||
public String getPropertyType() {
|
||||
return propertyType;
|
||||
}
|
||||
public void setPropertyType(String propertyType) {
|
||||
this.propertyType = propertyType;
|
||||
}
|
||||
public String getPropertyNo() {
|
||||
return propertyNo;
|
||||
}
|
||||
public void setPropertyNo(String propertyNo) {
|
||||
this.propertyNo = propertyNo;
|
||||
}
|
||||
public String getPropertyUnit() {
|
||||
return propertyUnit;
|
||||
}
|
||||
public void setPropertyUnit(String propertyUnit) {
|
||||
this.propertyUnit = propertyUnit;
|
||||
}
|
||||
public String getProvideState() {
|
||||
return provideState;
|
||||
}
|
||||
public void setProvideState(String provideState) {
|
||||
this.provideState = provideState;
|
||||
}
|
||||
public String getReceiveState() {
|
||||
return receiveState;
|
||||
}
|
||||
public void setReceiveState(String receiveState) {
|
||||
this.receiveState = receiveState;
|
||||
}
|
||||
public String getRecoverState() {
|
||||
return recoverState;
|
||||
}
|
||||
public void setRecoverState(String recoverState) {
|
||||
this.recoverState = recoverState;
|
||||
}
|
||||
public String getRecoverType() {
|
||||
return recoverType;
|
||||
}
|
||||
public void setRecoverType(String recoverType) {
|
||||
this.recoverType = recoverType;
|
||||
}
|
||||
public String getMaintainState() {
|
||||
return maintainState;
|
||||
}
|
||||
public void setMaintainState(String maintainState) {
|
||||
this.maintainState = maintainState;
|
||||
}
|
||||
public String getExtractState() {
|
||||
return extractState;
|
||||
}
|
||||
public void setExtractState(String extractState) {
|
||||
this.extractState = extractState;
|
||||
}
|
||||
public String getScrapState() {
|
||||
return scrapState;
|
||||
}
|
||||
|
||||
public int getIdd() {
|
||||
return idd;
|
||||
}
|
||||
public void setIdd(int idd) {
|
||||
this.idd = idd;
|
||||
}
|
||||
public void setScrapState(String scrapState) {
|
||||
this.scrapState = scrapState;
|
||||
}
|
||||
public String getDestoryState() {
|
||||
return destoryState;
|
||||
}
|
||||
public void setDestoryState(String destoryState) {
|
||||
this.destoryState = destoryState;
|
||||
}
|
||||
public PropertyInfo(String provideId, String useId, String propertyName,
|
||||
String useEmpName, String useDepartName, String useDate,
|
||||
String provideDepartName, String provideStaffName,
|
||||
String provideDate, String propertyType,
|
||||
String propertyNo, String propertyUnit, String provideState,
|
||||
String receiveState, String recoverState, String recoverType,
|
||||
String maintainState, String extractState, String scrapState,
|
||||
String destoryState,String holdStaffName,String holdDate) {
|
||||
super();
|
||||
this.provideId = provideId;
|
||||
this.useId = useId;
|
||||
this.propertyName = propertyName;
|
||||
this.useEmpName = useEmpName;
|
||||
this.useDepartName = useDepartName;
|
||||
this.useDate = useDate;
|
||||
this.provideDepartName = provideDepartName;
|
||||
this.provideStaffName = provideStaffName;
|
||||
this.provideDate = provideDate;
|
||||
this.propertyType = propertyType;
|
||||
this.propertyNo = propertyNo;
|
||||
this.propertyUnit = propertyUnit;
|
||||
this.provideState = provideState;
|
||||
this.receiveState = receiveState;
|
||||
this.recoverState = recoverState;
|
||||
this.recoverType = recoverType;
|
||||
this.maintainState = maintainState;
|
||||
this.extractState = extractState;
|
||||
this.scrapState = scrapState;
|
||||
this.destoryState = destoryState;
|
||||
}
|
||||
public PropertyInfo() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,85 +0,0 @@
|
||||
package com.zky.pojo;
|
||||
|
||||
public class Questionexam {
|
||||
|
||||
private String id;
|
||||
private String TYPEID;
|
||||
private String Q_SUBJECT;
|
||||
private String Q_ANSWER;
|
||||
private String OPTIONA;
|
||||
private String OPTIONB;
|
||||
private String OPTIONC;
|
||||
private String OPTIOND;
|
||||
private String NOTE;
|
||||
private String CREATEPERSON;
|
||||
private String CREATEDATE;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
public String getTYPEID() {
|
||||
return TYPEID;
|
||||
}
|
||||
public void setTYPEID(String tYPEID) {
|
||||
TYPEID = tYPEID;
|
||||
}
|
||||
public String getQ_SUBJECT() {
|
||||
return Q_SUBJECT;
|
||||
}
|
||||
public void setQ_SUBJECT(String q_SUBJECT) {
|
||||
Q_SUBJECT = q_SUBJECT;
|
||||
}
|
||||
public String getQ_ANSWER() {
|
||||
return Q_ANSWER;
|
||||
}
|
||||
public void setQ_ANSWER(String q_ANSWER) {
|
||||
Q_ANSWER = q_ANSWER;
|
||||
}
|
||||
public String getOPTIONA() {
|
||||
return OPTIONA;
|
||||
}
|
||||
public void setOPTIONA(String oPTIONA) {
|
||||
OPTIONA = oPTIONA;
|
||||
}
|
||||
public String getOPTIONB() {
|
||||
return OPTIONB;
|
||||
}
|
||||
public void setOPTIONB(String oPTIONB) {
|
||||
OPTIONB = oPTIONB;
|
||||
}
|
||||
public String getOPTIONC() {
|
||||
return OPTIONC;
|
||||
}
|
||||
public void setOPTIONC(String oPTIONC) {
|
||||
OPTIONC = oPTIONC;
|
||||
}
|
||||
public String getOPTIOND() {
|
||||
return OPTIOND;
|
||||
}
|
||||
public void setOPTIOND(String oPTIOND) {
|
||||
OPTIOND = oPTIOND;
|
||||
}
|
||||
public String getNOTE() {
|
||||
return NOTE;
|
||||
}
|
||||
public void setNOTE(String nOTE) {
|
||||
NOTE = nOTE;
|
||||
}
|
||||
public String getCREATEPERSON() {
|
||||
return CREATEPERSON;
|
||||
}
|
||||
public void setCREATEPERSON(String cREATEPERSON) {
|
||||
CREATEPERSON = cREATEPERSON;
|
||||
}
|
||||
public String getCREATEDATE() {
|
||||
return CREATEDATE;
|
||||
}
|
||||
public void setCREATEDATE(String cREATEDATE) {
|
||||
CREATEDATE = cREATEDATE;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -1,51 +0,0 @@
|
||||
package com.zky.pojo;
|
||||
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* 文件管理对象 td_bjca
|
||||
*
|
||||
* @author itzky
|
||||
* @date 2023-12-22
|
||||
*/
|
||||
@ToString
|
||||
public class TdBjca {
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 证书持有者 */
|
||||
private String cert;
|
||||
|
||||
/** 证书id */
|
||||
private String certId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setCert(String cert)
|
||||
{
|
||||
this.cert = cert;
|
||||
}
|
||||
|
||||
public String getCert()
|
||||
{
|
||||
return cert;
|
||||
}
|
||||
public void setCertId(String certId)
|
||||
{
|
||||
this.certId = certId;
|
||||
}
|
||||
|
||||
public String getCertId()
|
||||
{
|
||||
return certId;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,37 +0,0 @@
|
||||
package com.zky.pojo;
|
||||
|
||||
public class Train {
|
||||
|
||||
public String trianId;
|
||||
public String trainName;
|
||||
public String trianNum;
|
||||
public String getTrianId() {
|
||||
return trianId;
|
||||
}
|
||||
public void setTrianId(String trianId) {
|
||||
this.trianId = trianId;
|
||||
}
|
||||
public String getTrainName() {
|
||||
return trainName;
|
||||
}
|
||||
public void setTrainName(String trainName) {
|
||||
this.trainName = trainName;
|
||||
}
|
||||
public String getTrianNum() {
|
||||
return trianNum;
|
||||
}
|
||||
public void setTrianNum(String trianNum) {
|
||||
this.trianNum = trianNum;
|
||||
}
|
||||
public Train(String trianId, String trainName, String trianNum) {
|
||||
super();
|
||||
this.trianId = trianId;
|
||||
this.trainName = trainName;
|
||||
this.trianNum = trianNum;
|
||||
}
|
||||
public Train() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,178 +0,0 @@
|
||||
|
||||
package com.zky.pub;
|
||||
|
||||
import java.text.ParsePosition;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author dy
|
||||
*
|
||||
*/
|
||||
public class DateTime {
|
||||
/**
|
||||
* 输出 yyyy-mm-dd格式的日期字符串
|
||||
* @param date
|
||||
* @return
|
||||
*/
|
||||
public static String DateToStr(Date date){
|
||||
return Date2Str(date,"yyyy-MM-dd");
|
||||
}
|
||||
/**
|
||||
* 将日期类型转化为字符串
|
||||
* @param date 日期
|
||||
* @param format 格式化字符串 如 yyyy-MM-dd yyyyMMddHHmmss
|
||||
* @return
|
||||
*/
|
||||
public static String Date2Str(Date date,String format){
|
||||
if (date == null)
|
||||
return "";
|
||||
return new SimpleDateFormat(format,java.util.Locale.US).format(date);
|
||||
}
|
||||
/**
|
||||
* 将yyyy-mm-dd格式日期字符串转化为日期
|
||||
* @param str
|
||||
* @return
|
||||
*/
|
||||
public static Date StrToDate(String str){
|
||||
return Str2Date(str,"yyyy-MM-dd");
|
||||
}
|
||||
/**
|
||||
* 转化字符串为日期
|
||||
* @param str 输入字符串
|
||||
* @param format 输入字符串的格式 如yyyy-MM-dd yyyyMMddHHmmss
|
||||
* @return
|
||||
*/
|
||||
public static Date Str2Date(String str,String format){
|
||||
if (str == null || str.trim().equals(""))
|
||||
return null;
|
||||
SimpleDateFormat sdf = new SimpleDateFormat(format);
|
||||
return sdf.parse(str, new ParsePosition(0));
|
||||
}
|
||||
|
||||
public static int monthSubtraction(String beginDate, String endDate){
|
||||
String [] bd = beginDate.split("-");
|
||||
String [] ed = endDate.split("-");
|
||||
|
||||
int yearSub = Integer.parseInt(bd[0]) - Integer.parseInt(ed[0]);
|
||||
int monthSub = Integer.parseInt(bd[1]) - Integer.parseInt(ed[1]);
|
||||
|
||||
return (yearSub*12+monthSub);
|
||||
}
|
||||
|
||||
public static int monthSubtraction(Date beginDate, Date endDate){
|
||||
return monthSubtraction(DateToStr(new Date()),DateToStr(beginDate));
|
||||
}
|
||||
|
||||
public static int daySubtraction(Date beginDate, Date endDate){
|
||||
long l1 = beginDate.getTime();
|
||||
long l2 = endDate.getTime();
|
||||
|
||||
return (int) ((l2 - l1)/(60*60*24*1000));
|
||||
}
|
||||
|
||||
public static int daySubtraction(String beginDate, String endDate){
|
||||
Date bd = StrToDate(beginDate);
|
||||
Date ed = StrToDate(endDate);
|
||||
long l1 = bd.getTime();
|
||||
long l2 = ed.getTime();
|
||||
|
||||
return (int) ((l2 - l1)/(60*60*24*1000));
|
||||
}
|
||||
public static Date addDays(Date date,int days){
|
||||
//long l = date.getTime();
|
||||
//return new Date(l + (days * 60 * 60 * 24 * 1000));
|
||||
long l = date.getTime();
|
||||
long day;
|
||||
day = days;
|
||||
l = l + (day * 60 * 60 * 24 * 1000);
|
||||
return new Date(l);
|
||||
}
|
||||
|
||||
public static String addDays(String date, int adddays)
|
||||
{
|
||||
return Date2Str(addDays(Str2Date(date,"yyyyMMdd"),adddays),"yyyyMMdd");
|
||||
}
|
||||
/**
|
||||
* 获得起止时间相差的时分秒
|
||||
* @param start
|
||||
* @param end
|
||||
* @return 相差的“x小时x分x秒”
|
||||
*/
|
||||
public static String between(Date start,Date end) {
|
||||
long time = end.getTime() - start.getTime();
|
||||
long h = time/3600000;
|
||||
long min = (time%3600000)/60000;
|
||||
float s = (time%60000)/1000f;
|
||||
return h+"小时"+min+"分"+s+"秒";
|
||||
}
|
||||
|
||||
/**
|
||||
* @param endDate
|
||||
* @param string
|
||||
* @return
|
||||
*/
|
||||
public static Date setTime(String date, String time) {
|
||||
String temp = date + time;
|
||||
return Str2Date(temp,"yyyy-MM-ddHHmmss");
|
||||
}
|
||||
|
||||
/**
|
||||
* @param endDate
|
||||
* @param string
|
||||
* @return
|
||||
*/
|
||||
public static Date setTime(Date date, String time) {
|
||||
String temp = DateToStr(date) + time;
|
||||
return Str2Date(temp,"yyyy-MM-ddHHmmss");
|
||||
}
|
||||
/**
|
||||
* @param birthday "yyyyMMdd"
|
||||
* @return
|
||||
*/
|
||||
public static String getAge(String birthday) {
|
||||
if (birthday == null || birthday.length()<6) {
|
||||
return "";
|
||||
}
|
||||
String year = Date2Str(new Date(),"yyyy");
|
||||
String birthyear = birthday.substring(0,4);
|
||||
int age = Integer.parseInt(year) - Integer.parseInt(birthyear);
|
||||
return Integer.toString(age);
|
||||
}
|
||||
|
||||
public static Date addMonths(Date date,int arg){
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.setTime(date);
|
||||
c.add(Calendar.MONTH, arg);
|
||||
|
||||
return c.getTime();
|
||||
}
|
||||
|
||||
public static String addMonths(String date,int arg){
|
||||
return Date2Str(addMonths(Str2Date(date,"yyyyMMddHHmmss"),arg),"yyyyMMddHHmmss");
|
||||
}
|
||||
public static void main(String args[]){
|
||||
|
||||
//System.out.println(Date2Str(addMonths(Str2Date("20061022000000","yyyyMMddHHmmss"),-1),"yyyyMMdd"));
|
||||
//System.out.println(addMonths("20061022000000",-1));
|
||||
//System.out.println(DateAdd("20060222",60));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 把 yyyymmdd 格式的日期字符串变成 yyyy-mm-dd 格式的字符串
|
||||
* @param datestr
|
||||
* @return
|
||||
*/
|
||||
public static String formatDateStr(String datestr) {
|
||||
String tempstr = datestr;
|
||||
if (tempstr!=null) {
|
||||
tempstr = tempstr.substring(0,4) + "-" +
|
||||
tempstr.substring(4,6) + "-" + tempstr.substring(6);
|
||||
} else {
|
||||
tempstr = "";
|
||||
}
|
||||
return tempstr;
|
||||
}
|
||||
}
|
||||
@ -1,44 +0,0 @@
|
||||
|
||||
package com.zky.pub;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import javax.naming.*;
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import com.zky.manager.Global;
|
||||
|
||||
/**
|
||||
* @author dy
|
||||
*
|
||||
*/
|
||||
public class DbConn {
|
||||
|
||||
private final static DataSource ds ;
|
||||
static{
|
||||
try {
|
||||
InitialContext context = new InitialContext();
|
||||
ds = (DataSource) context.lookup(Global.getDataSourceName());
|
||||
}
|
||||
catch (NamingException e) {
|
||||
e.printStackTrace();
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 用来获取数据库的连接
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static Connection getConn() {
|
||||
try {
|
||||
Connection conn = ds.getConnection();
|
||||
conn.setAutoCommit(false);
|
||||
return conn;
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,56 +0,0 @@
|
||||
|
||||
package com.zky.pub;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.ResourceBundle;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* @author dy
|
||||
*
|
||||
*/
|
||||
public abstract class DispatchServlet extends HttpServlet {
|
||||
protected static final Logger log = Logger.getLogger(DispatchServlet.class);
|
||||
public void doGet(HttpServletRequest request,
|
||||
HttpServletResponse response) throws ServletException, IOException {
|
||||
doPost(request, response);
|
||||
}
|
||||
|
||||
public void doPost(HttpServletRequest request, HttpServletResponse response)
|
||||
throws ServletException, IOException {
|
||||
String operate = request.getParameter("operate");
|
||||
if (Common.isNull(operate)) {
|
||||
operate = "defaultMethod";
|
||||
}
|
||||
try {
|
||||
Class[] types = new Class[]{HttpServletRequest.class,HttpServletResponse.class};
|
||||
Method method = getClass().getMethod(operate, types);
|
||||
try {
|
||||
method.invoke(this, new Object[]{request,response});
|
||||
} catch (IllegalArgumentException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
} catch (InvocationTargetException e) {
|
||||
//e.getTargetException().printStackTrace();
|
||||
response.sendRedirect(Common.GbConvertIso("/error.jsp?errorinfo="+ e.getTargetException().toString()));
|
||||
}
|
||||
} catch (SecurityException e) {
|
||||
e.printStackTrace();
|
||||
} catch (NoSuchMethodException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public abstract void defaultMethod(HttpServletRequest request, HttpServletResponse response) throws Exception;
|
||||
}
|
||||
@ -1,140 +0,0 @@
|
||||
package com.zky.pub;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.Hashtable;
|
||||
import java.util.Vector;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author dy
|
||||
*
|
||||
*/
|
||||
public class HashFmlBuf implements Serializable {
|
||||
private Hashtable hm = new Hashtable();
|
||||
private String Key = "";
|
||||
private String Value = "";
|
||||
private int RowCount = -1;
|
||||
private int ResultRowCount = -1;//最终结果行数,自己手工设置
|
||||
|
||||
public Vector keys(int row) {
|
||||
Enumeration tmp;
|
||||
String tk = "";
|
||||
Vector res = new Vector();
|
||||
if (row > RowCount || row <= 0)
|
||||
return null;
|
||||
tmp = hm.keys();
|
||||
while (tmp.hasMoreElements()) {
|
||||
tk = (String) tmp.nextElement();
|
||||
int p = tk.indexOf("_" + String.valueOf(row));
|
||||
if (p != -1) {
|
||||
res.add(tk.substring(0, p));
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
private void fdel(String field, int pos) {
|
||||
Key = new StringBuffer(field.trim()).append("_").append(
|
||||
Integer.toString(pos)).toString();
|
||||
hm.remove(Key);
|
||||
}
|
||||
|
||||
/**
|
||||
* 该方法模拟的tuxedo FML 函数中的 Fchg
|
||||
*
|
||||
* @param field
|
||||
* @param pos
|
||||
* @param value
|
||||
*/
|
||||
public void fchg(String field, int pos, String value) {
|
||||
Key = new StringBuffer((field.toUpperCase()).trim()).append("_")
|
||||
.append(Integer.toString(pos)).toString();
|
||||
hm.put(Key, Common.convertNull(value));
|
||||
if (pos >= RowCount) {
|
||||
RowCount = pos + 1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 该方法模拟的tuxedo FML 函数中的 Fget
|
||||
*
|
||||
* @param field
|
||||
* @param pos
|
||||
* @return String
|
||||
* @throws FieldNotFoundException
|
||||
*/
|
||||
public String fget(String field, int pos) /* throws FieldNotFoundException */{
|
||||
Key = new StringBuffer((field.toUpperCase()).trim()).append("_")
|
||||
.append(Integer.toString(pos)).toString();
|
||||
Value = (String) hm.get(Key);
|
||||
return Value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 该方法模拟的tuxedo FML 函数中的 Finit
|
||||
*
|
||||
*/
|
||||
public void finit() {
|
||||
hm.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索一个域中是否存在某个值
|
||||
*
|
||||
* @param field
|
||||
* @param value
|
||||
* @return -1表示没有搜索到 否则返回该值所在的行数
|
||||
*/
|
||||
public int find(String field, String value) {
|
||||
int i;
|
||||
field = field.toUpperCase();
|
||||
for (i = 0; i < RowCount; i++) {
|
||||
Key = new StringBuffer(field.trim()).append("_").append(
|
||||
Integer.toString(i)).toString();
|
||||
Value = (String) hm.get(Key);
|
||||
if (Value == null) {
|
||||
continue;
|
||||
}
|
||||
if (Value.equals(value)) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public int find(String field) {
|
||||
int i;
|
||||
int ret = 0;
|
||||
for (i = 0; i < RowCount; i++) {
|
||||
Key = new StringBuffer(field.trim()).append("_").append(
|
||||
Integer.toString(i)).toString();
|
||||
Value = (String) hm.get(Key);
|
||||
if (Value == null) {
|
||||
ret = 0;
|
||||
continue;
|
||||
}
|
||||
ret = 1;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
public void setRowCount(int rc) {
|
||||
this.RowCount = rc;
|
||||
}
|
||||
|
||||
public int getRowCount() {
|
||||
return RowCount;
|
||||
}
|
||||
public void setResultRowCount(int rc) {
|
||||
this.ResultRowCount = rc;
|
||||
}
|
||||
|
||||
public int getResultRowCount() {
|
||||
return ResultRowCount;
|
||||
}
|
||||
|
||||
public void add(String train_address, Object query) {
|
||||
}
|
||||
}
|
||||
@ -1,246 +0,0 @@
|
||||
|
||||
package com.zky.pub;
|
||||
import java.sql.*;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* @author dy
|
||||
*
|
||||
*/
|
||||
public class ProcedureCall {
|
||||
|
||||
//buf.fget("ProcedureName",0)获得存储过程名
|
||||
//buf.fget("InCount",0)获得输入参数个数
|
||||
//buf.fget("InPara",i)获得第i个输入参数
|
||||
//buf.fget("OutCount",0)获得返回结果个数
|
||||
//buf.fget("OutPara",i)获得第i个返回结果
|
||||
private HashFmlBuf buf = null;
|
||||
private String procedureName = null;
|
||||
private int inCount = 0;
|
||||
private int outCount = 0;
|
||||
private Connection conn = null;
|
||||
private CallableStatement cstmt = null;
|
||||
private boolean autoacommit = true;//自动提交标志
|
||||
private String dataSourceName = null;
|
||||
private String resultType = "string";//string:返回值为字符;cursor:返回是结果集(暂时支持返回一个结果集)
|
||||
|
||||
public ProcedureCall(String name,int inParmCount,int outParmCount,String datasourcename)//需要自动提交时用此构照函数,需要传入数据源名称
|
||||
{
|
||||
buf = new HashFmlBuf();
|
||||
buf.setRowCount(0);//初始实际输入参数个数为0
|
||||
procedureName = name;
|
||||
inCount = inParmCount;
|
||||
outCount = outParmCount;
|
||||
conn = null;
|
||||
autoacommit = true;
|
||||
dataSourceName = datasourcename;
|
||||
}
|
||||
|
||||
public ProcedureCall(String name,int inParmCount,int outParmCount,Connection con)//不需要自动提交时用此构照函数
|
||||
{
|
||||
buf = new HashFmlBuf();
|
||||
buf.setRowCount(0);//初始实际输入参数个数为0
|
||||
procedureName = name;
|
||||
inCount = inParmCount;
|
||||
outCount = outParmCount;
|
||||
conn = con;
|
||||
autoacommit = false;
|
||||
}
|
||||
|
||||
public void Call() throws Exception
|
||||
{
|
||||
String callStr = "{call ";
|
||||
String type= "";
|
||||
|
||||
try{
|
||||
if (inCount != buf.getRowCount())
|
||||
{
|
||||
throw new Exception("存储过程("+procedureName+")设定的输入参数个数("+inCount+")与实际输入参数个数("+buf.getRowCount()+")不符!");
|
||||
}
|
||||
|
||||
callStr += procedureName + "(";
|
||||
int i =0 ;
|
||||
for (i=0;i<inCount+outCount;i++)
|
||||
{
|
||||
callStr += "?,";
|
||||
}
|
||||
callStr = callStr.substring(0,callStr.length()-1);
|
||||
callStr += ")}";
|
||||
|
||||
if (autoacommit == true)
|
||||
{
|
||||
conn = DbConn.getConn();
|
||||
conn.setAutoCommit(false);
|
||||
}
|
||||
|
||||
cstmt = conn.prepareCall(callStr);
|
||||
for (i=0;i<inCount;i++)
|
||||
{
|
||||
type = buf.fget("InParaType",i);
|
||||
if (type != null && type.equals("number"))
|
||||
{
|
||||
java.math.BigDecimal num = new java.math.BigDecimal(Float.parseFloat(buf.fget("InPara",i)));
|
||||
cstmt.setBigDecimal(i+1,num);
|
||||
//System.out.println(i+":"+num);
|
||||
}
|
||||
else if (type != null && type.equals("date"))
|
||||
{
|
||||
String pattern = "yyyy/MM/dd HH24:mi";
|
||||
SimpleDateFormat formater = new SimpleDateFormat(pattern);
|
||||
|
||||
Date dt = formater.parse(buf.fget("InPara",i));
|
||||
|
||||
//cstmt.setDate(i+1,dt);
|
||||
//cstmt.setDate(i+1,date);
|
||||
}
|
||||
else
|
||||
{
|
||||
cstmt.setString(i+1,buf.fget("InPara",i));
|
||||
}
|
||||
}
|
||||
|
||||
for (i=0;i<outCount;i++)
|
||||
{
|
||||
cstmt.registerOutParameter(inCount+1+i, Types.VARCHAR);
|
||||
}
|
||||
cstmt.execute();
|
||||
if (autoacommit == true)
|
||||
{
|
||||
conn.commit();
|
||||
}
|
||||
|
||||
//取出返回值
|
||||
for (i=0;i<outCount;i++)
|
||||
{
|
||||
buf.fchg("OutPara",i,cstmt.getString(inCount+1+i));
|
||||
}
|
||||
|
||||
}catch(Exception e){
|
||||
try{
|
||||
if (conn != null) conn.rollback();
|
||||
}catch (Exception ex)
|
||||
{
|
||||
throw new Exception(ex.toString());
|
||||
}
|
||||
throw new Exception("存储过程"+procedureName+"调用错误,请检查数据库连接或该存储过程!"+e.toString());
|
||||
}finally{
|
||||
try{
|
||||
if (cstmt != null)
|
||||
{
|
||||
cstmt.close();
|
||||
cstmt = null;
|
||||
}
|
||||
if (autoacommit == true)
|
||||
{
|
||||
if (conn != null) conn.close();
|
||||
{
|
||||
conn = null;
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
//e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setInParm(int i,String value) throws Exception
|
||||
{
|
||||
if (buf.fget("InPara",i) != null)
|
||||
{
|
||||
throw new Exception("第"+i+"位输入参数被重复设定!");
|
||||
}
|
||||
if (i+1>inCount)
|
||||
{
|
||||
throw new Exception("存储过程:"+procedureName+" 只有"+inCount+"个输入参数!");
|
||||
}
|
||||
int actualInParmCount = buf.getRowCount();
|
||||
buf.fchg("InPara",i,value);
|
||||
|
||||
//System.out.println("InPara"+i+":"+value);
|
||||
buf.setRowCount(actualInParmCount+1);
|
||||
}
|
||||
|
||||
public void setInParm(int i,String value,String type) throws Exception
|
||||
{
|
||||
if (buf.fget("InPara",i) != null)
|
||||
{
|
||||
throw new Exception("第"+i+"位输入参数被重复设定!");
|
||||
}
|
||||
if (i+1>inCount)
|
||||
{
|
||||
throw new Exception("存储过程:"+procedureName+" 只有"+inCount+"个输入参数!");
|
||||
}
|
||||
int actualInParmCount = buf.getRowCount();
|
||||
buf.fchg("InPara",i,value);
|
||||
if (type.toLowerCase().equals("number"))
|
||||
{
|
||||
buf.fchg("InParaType",i,type.toLowerCase());
|
||||
}
|
||||
buf.setRowCount(actualInParmCount+1);
|
||||
}
|
||||
|
||||
public String getOutParm(int i)
|
||||
{
|
||||
return buf.fget("OutPara",i);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
try{
|
||||
|
||||
/*
|
||||
ProcedureCall p_bt_tradefeemodify = new ProcedureCall("p_bt_tradefeemodify",23,2,"zhyz_ts");
|
||||
p_bt_tradefeemodify.setInParm(0,"2005051100015114");
|
||||
p_bt_tradefeemodify.setInParm(1,"1");
|
||||
p_bt_tradefeemodify.setInParm(2,"01000");
|
||||
|
||||
|
||||
for (int i=0;i<10;i++)
|
||||
{
|
||||
p_bt_tradefeemodify.setInParm(3+i*2,"L");
|
||||
//p_bt_tradefeemodify.setInParm(3+i*2,s_code[i+1]);
|
||||
//p_bt_tradefeemodify.setInParm(4+i*2,Double.toString(s_fee[i+1]));
|
||||
p_bt_tradefeemodify.setInParm(4+i*2,Double.toString(7.9));
|
||||
}
|
||||
|
||||
p_bt_tradefeemodify.Call();
|
||||
String err = p_bt_tradefeemodify.getOutParm(0);
|
||||
String res = p_bt_tradefeemodify.getOutParm(1);
|
||||
|
||||
System.out.println(res);
|
||||
System.out.println(err);
|
||||
|
||||
if (res != null && res.equals("-1"))
|
||||
{
|
||||
throw new Exception(err);
|
||||
}
|
||||
|
||||
|
||||
String procedureName = "p_bt_tradefeemodify";
|
||||
int inCount = 23,outCount=2;
|
||||
|
||||
Connection conn = null;
|
||||
CallableStatement cstmt = null;
|
||||
conn = DbConn.getConn();
|
||||
String callStr = "{call ";
|
||||
callStr += procedureName + "(";
|
||||
int i =0 ;
|
||||
for (i=0;i<inCount+outCount;i++)
|
||||
{
|
||||
callStr += "?,";
|
||||
}
|
||||
callStr = callStr.substring(0,callStr.length()-1);
|
||||
callStr += ")}";
|
||||
|
||||
cstmt = conn.prepareCall(callStr);
|
||||
|
||||
*/
|
||||
|
||||
String fusp ="1234";
|
||||
System.out.println(fusp.substring(fusp.length()-2,fusp.length()));
|
||||
|
||||
}catch(Exception e){
|
||||
System.out.println(e.toString());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,113 +0,0 @@
|
||||
|
||||
package com.zky.pub;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.Filter;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.FilterConfig;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
|
||||
|
||||
public class SetCharacterEncodingFilter implements Filter {
|
||||
|
||||
// ----------------------------------------------------- Instance Variables
|
||||
|
||||
/**
|
||||
* The default character encoding to set for requests that pass through
|
||||
* this filter.
|
||||
*/
|
||||
protected String encoding = null;
|
||||
|
||||
/**
|
||||
* The filter configuration object we are associated with. If this value
|
||||
* is null, this filter instance is not currently configured.
|
||||
*/
|
||||
protected FilterConfig filterConfig = null;
|
||||
|
||||
/**
|
||||
* Should a character encoding specified by the client be ignored?
|
||||
*/
|
||||
protected boolean ignore = true;
|
||||
|
||||
// --------------------------------------------------------- Public Methods
|
||||
|
||||
/**
|
||||
* Take this filter out of service.
|
||||
*/
|
||||
public void destroy() {
|
||||
this.encoding = null;
|
||||
this.filterConfig = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Select and set (if specified) the character encoding to be used to
|
||||
* interpret request parameters for this request.
|
||||
*
|
||||
* @param request The servlet request we are processing
|
||||
* @param result The servlet response we are creating
|
||||
* @param chain The filter chain we are processing
|
||||
*
|
||||
* @exception IOException if an input/output error occurs
|
||||
* @exception ServletException if a servlet error occurs
|
||||
*/
|
||||
public void doFilter(
|
||||
ServletRequest request,
|
||||
ServletResponse response,
|
||||
FilterChain chain)
|
||||
throws IOException, ServletException {
|
||||
|
||||
// Conditionally select and set the character encoding to be used
|
||||
if (ignore || (request.getCharacterEncoding() == null)) {
|
||||
String encoding = selectEncoding(request);
|
||||
if (encoding != null)
|
||||
request.setCharacterEncoding(encoding);
|
||||
}
|
||||
|
||||
// Pass control on to the next filter
|
||||
chain.doFilter(request, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Place this filter into service.
|
||||
*
|
||||
* @param filterConfig The filter configuration object
|
||||
*/
|
||||
public void init(FilterConfig filterConfig) throws ServletException {
|
||||
|
||||
this.filterConfig = filterConfig;
|
||||
this.encoding = filterConfig.getInitParameter("encoding");
|
||||
String value = filterConfig.getInitParameter("ignore");
|
||||
if (value == null)
|
||||
this.ignore = true;
|
||||
else if (value.equalsIgnoreCase("true"))
|
||||
this.ignore = true;
|
||||
else if (value.equalsIgnoreCase("yes"))
|
||||
this.ignore = true;
|
||||
else
|
||||
this.ignore = false;
|
||||
|
||||
}
|
||||
|
||||
// ------------------------------------------------------ Protected Methods
|
||||
|
||||
/**
|
||||
* Select an appropriate character encoding to be used, based on the
|
||||
* characteristics of the current request and/or filter initialization
|
||||
* parameters. If no character encoding should be set, return
|
||||
* <code>null</code>.
|
||||
* <p>
|
||||
* The default implementation unconditionally returns the value configured
|
||||
* by the <strong>encoding</strong> initialization parameter for this
|
||||
* filter.
|
||||
*
|
||||
* @param request The servlet request we are processing
|
||||
*/
|
||||
protected String selectEncoding(ServletRequest request) {
|
||||
|
||||
return (this.encoding);
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,50 +0,0 @@
|
||||
package com.zky.util;
|
||||
|
||||
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.servlet.Filter;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.FilterConfig;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
public class CharFilter implements Filter {
|
||||
String encoding = "utf-8";
|
||||
|
||||
public void destroy() {
|
||||
}
|
||||
@SuppressWarnings("rawtypes")
|
||||
public void doFilter(ServletRequest req, ServletResponse res,
|
||||
FilterChain chain) throws IOException, ServletException {
|
||||
HttpServletRequest request = (HttpServletRequest) req;
|
||||
if (request.getMethod().equalsIgnoreCase("POST")) {
|
||||
request.setCharacterEncoding(encoding);
|
||||
} else {
|
||||
|
||||
Map map = request.getParameterMap();
|
||||
Set entryset = map.entrySet();
|
||||
for (Object object : entryset) {
|
||||
Map.Entry entry = (Map.Entry) object;
|
||||
String[] value = (String[]) entry.getValue();
|
||||
for (int i = 0; i < value.length; i++) {
|
||||
value[i] = new String(value[i].getBytes("UTF-8"),
|
||||
encoding);
|
||||
}
|
||||
}
|
||||
}
|
||||
chain.doFilter(request, res);
|
||||
}
|
||||
|
||||
public void init(FilterConfig arg0) throws ServletException {
|
||||
String s = arg0.getInitParameter("encoding");
|
||||
if (s != null && s.length() > 0) {
|
||||
encoding = s;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,87 +0,0 @@
|
||||
package com.zky.util;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Font;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import java.util.Random;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.sun.image.codec.jpeg.JPEGCodec;
|
||||
import com.sun.image.codec.jpeg.JPEGEncodeParam;
|
||||
import com.sun.image.codec.jpeg.JPEGImageEncoder;
|
||||
|
||||
|
||||
public class CheckCoderTool extends HttpServlet {
|
||||
|
||||
/**
|
||||
* 生成登录验证码.
|
||||
* 验证码的数据从客户的session中的属性c中获取<br>
|
||||
* 生成的验证码以JPEG图片方式输出.
|
||||
*/
|
||||
public void doGet(HttpServletRequest request, HttpServletResponse response)
|
||||
throws ServletException, IOException {
|
||||
response.setContentType("image/jpeg");
|
||||
String c = (String) request.getSession().getAttribute("c");
|
||||
if (c == null)c = "";
|
||||
int width = c.length() * 8 + 20;
|
||||
int height = 22;
|
||||
int startX = 8;
|
||||
int startY = 15;
|
||||
BufferedImage bi = new BufferedImage(width, height,BufferedImage.TYPE_INT_BGR);
|
||||
Graphics2D g = bi.createGraphics();
|
||||
g.setColor(Color.black);
|
||||
g.setBackground(Color.GRAY);
|
||||
g.setFont(new Font("Times New Roman",Font.BOLD,18));
|
||||
g.clearRect(0, 0, width, height);
|
||||
g.drawString(c, startX, startY);
|
||||
JPEGImageEncoder encoder = null;
|
||||
JPEGEncodeParam param = null;
|
||||
|
||||
try {
|
||||
encoder = JPEGCodec.createJPEGEncoder(response.getOutputStream());
|
||||
param = encoder.getDefaultJPEGEncodeParam(bi);
|
||||
param.setQuality(0.9f, false);
|
||||
encoder.encode(bi);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
bi = null;
|
||||
g = null;
|
||||
c = null;
|
||||
encoder = null;
|
||||
param = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 生成随机字符串. <br>
|
||||
* 随机字符串的内容包含[0-9]的字符. <br>
|
||||
*
|
||||
* @param randomLength
|
||||
* 随机字符串的长度
|
||||
* @return 随机字符串.
|
||||
*/
|
||||
public static String randomChars(int randomLength) {
|
||||
char[] randoms = { '0','1', '2', '3', '4', '5', '6', '7', '8', '9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z' };
|
||||
Random random = new Random();
|
||||
StringBuffer ret = new StringBuffer();
|
||||
for (int i = 0; i < randomLength; i++) {
|
||||
ret.append(randoms[random.nextInt(randoms.length)]);
|
||||
}
|
||||
random = null;
|
||||
return ret.toString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -1,77 +0,0 @@
|
||||
|
||||
package com.zky.util;
|
||||
|
||||
import org.jdom.Element;
|
||||
|
||||
/**
|
||||
* @author dy
|
||||
*
|
||||
*/
|
||||
public class OptionBean {
|
||||
private String text = "";
|
||||
private String value = "";
|
||||
private String selected = "";
|
||||
|
||||
public OptionBean(String value, String text, boolean selected) {
|
||||
this.text = text;
|
||||
this.value = value;
|
||||
if (selected) {
|
||||
this.selected = "selected";
|
||||
}
|
||||
}
|
||||
public OptionBean(String value, String text) {
|
||||
this.text = text;
|
||||
this.value = value;
|
||||
}
|
||||
/**
|
||||
* @return Returns the selected.
|
||||
*/
|
||||
public String getSelected() {
|
||||
return this.selected;
|
||||
}
|
||||
/**
|
||||
* @param selected The selected to set.
|
||||
*/
|
||||
public void setSelected(boolean selected) {
|
||||
if (selected) {
|
||||
this.selected = "selected";
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @return Returns the text.
|
||||
*/
|
||||
public String getText() {
|
||||
return this.text;
|
||||
}
|
||||
/**
|
||||
* @param text The text to set.
|
||||
*/
|
||||
public void setText(String text) {
|
||||
this.text = text;
|
||||
}
|
||||
/**
|
||||
* @return Returns the value.
|
||||
*/
|
||||
public String getValue() {
|
||||
return this.value;
|
||||
}
|
||||
/**
|
||||
* @param value The value to set.
|
||||
*/
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public Element toXML() {
|
||||
return new Element("option")
|
||||
.setAttribute("value",value)
|
||||
.setAttribute("text",text)
|
||||
.setAttribute("selected",selected);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return new StringBuffer("<option value=\"")
|
||||
.append(value).append("' ").append(selected).append(">")
|
||||
.append(text).append("</option>").toString();
|
||||
}
|
||||
}
|
||||
@ -1,50 +0,0 @@
|
||||
|
||||
package com.zky.util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.jdom.Element;
|
||||
|
||||
/**
|
||||
* @author dy
|
||||
*
|
||||
*/
|
||||
public class OptionsBean {
|
||||
private List list = null;
|
||||
private String id = "";
|
||||
|
||||
public OptionsBean() {
|
||||
this.list = new ArrayList();
|
||||
}
|
||||
|
||||
public OptionsBean(String id) {
|
||||
this.id = id;
|
||||
this.list = new ArrayList();
|
||||
}
|
||||
|
||||
public OptionsBean addOption(OptionBean option) {
|
||||
list.add(option);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Element toXML() {
|
||||
Element options = new Element("options").setAttribute("id",id);
|
||||
for (int i=0; i<list.size(); i++) {
|
||||
options.addContent(((OptionBean) list.get(i)).toXML());
|
||||
}
|
||||
return options;
|
||||
}
|
||||
|
||||
public int size() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
StringBuffer buf = new StringBuffer();
|
||||
for (int i=0; i<list.size(); i++) {
|
||||
buf.append((OptionBean) list.get(i));
|
||||
}
|
||||
return buf.toString();
|
||||
}
|
||||
}
|
||||
@ -1,76 +0,0 @@
|
||||
|
||||
package com.zky.util;
|
||||
|
||||
/**
|
||||
* @author dy
|
||||
*
|
||||
*/
|
||||
public class PageBean {
|
||||
private int pageNum = 0;
|
||||
private int pageSize = 50;
|
||||
private int rowcount = -1; //总记录数
|
||||
private int curRowcount = 0; //当前页记录数
|
||||
private int pageCount = 0; //总页数
|
||||
|
||||
/**
|
||||
* @return Returns the curRowcount.
|
||||
*/
|
||||
|
||||
public int getCurRowcount() {
|
||||
return this.curRowcount;
|
||||
}
|
||||
/**
|
||||
* @param curRowcount The curRowcount to set.
|
||||
*/
|
||||
public void setCurRowcount(int curRowcount) {
|
||||
this.curRowcount = curRowcount;
|
||||
}
|
||||
/**
|
||||
* @return Returns the pageCount.
|
||||
*/
|
||||
public int getPageCount() {
|
||||
return this.pageCount;
|
||||
}
|
||||
/**
|
||||
* @param pageCount The pageCount to set.
|
||||
*/
|
||||
public void setPageCount(int pageCount) {
|
||||
this.pageCount = pageCount;
|
||||
}
|
||||
/**
|
||||
* @return Returns the pageNum.
|
||||
*/
|
||||
public int getPageNum() {
|
||||
return this.pageNum;
|
||||
}
|
||||
/**
|
||||
* @param pageNum The pageNum to set.
|
||||
*/
|
||||
public void setPageNum(int pageNum) {
|
||||
this.pageNum = pageNum;
|
||||
}
|
||||
/**
|
||||
* @return Returns the pageSize.
|
||||
*/
|
||||
public int getPageSize() {
|
||||
return this.pageSize;
|
||||
}
|
||||
/**
|
||||
* @param pageSize The pageSize to set.
|
||||
*/
|
||||
public void setPageSize(int pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
/**
|
||||
* @return Returns the rowcount.
|
||||
*/
|
||||
public int getRowcount() {
|
||||
return this.rowcount;
|
||||
}
|
||||
/**
|
||||
* @param rowcount The rowcount to set.
|
||||
*/
|
||||
public void setRowcount(int rowcount) {
|
||||
this.rowcount = rowcount;
|
||||
}
|
||||
}
|
||||
@ -1,300 +0,0 @@
|
||||
package com.zky.util;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author dy
|
||||
* 记录分页显示时的导航Tag
|
||||
*/
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import javax.servlet.jsp.JspTagException;
|
||||
import javax.servlet.jsp.JspWriter;
|
||||
import javax.servlet.jsp.PageContext;
|
||||
import javax.servlet.jsp.tagext.TagSupport;
|
||||
|
||||
public class PageLinkTag extends TagSupport {
|
||||
/**
|
||||
* 每页记录数
|
||||
*/
|
||||
private int pageRowCount;
|
||||
/**
|
||||
* 当前页
|
||||
*/
|
||||
private int curPage;
|
||||
|
||||
/**
|
||||
* 本页记录数
|
||||
*/
|
||||
private int curRowcount;
|
||||
|
||||
/**
|
||||
* 总记录数
|
||||
*/
|
||||
private int rowcount;
|
||||
|
||||
/**
|
||||
* 总页数
|
||||
*/
|
||||
private int pageCount;
|
||||
|
||||
private String scope;
|
||||
private String operate;
|
||||
private String width;
|
||||
private String align;
|
||||
|
||||
private ServletRequest request ;
|
||||
private HttpSession session;
|
||||
|
||||
|
||||
/**
|
||||
* @param pageRowCount 每页记录记录数量
|
||||
* @param request 请求
|
||||
*/
|
||||
public PageLinkTag(int pageRowCount,ServletRequest request) {
|
||||
super();
|
||||
this.pageRowCount = pageRowCount;
|
||||
this.request = request;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
public PageLinkTag(){
|
||||
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public int doEndTag() throws JspTagException{
|
||||
if(getPageInfo()) {
|
||||
print();
|
||||
}
|
||||
return EVAL_PAGE;
|
||||
|
||||
}
|
||||
/**
|
||||
* 获取页面信息
|
||||
*
|
||||
*/
|
||||
private boolean getPageInfo(){
|
||||
PageBean pageBean = null;
|
||||
if (this.scope.equals("request"))
|
||||
pageBean = (PageBean)request.getAttribute("PageBean");
|
||||
else
|
||||
pageBean = (PageBean)session.getAttribute("PageBean");
|
||||
if (pageBean == null) {
|
||||
return false;
|
||||
}
|
||||
pageRowCount = pageBean.getPageSize();
|
||||
curRowcount = pageBean.getCurRowcount();
|
||||
rowcount = pageBean.getRowcount();
|
||||
pageCount = pageBean.getPageCount();
|
||||
try {
|
||||
curPage = pageBean.getPageNum();
|
||||
}catch(NumberFormatException e){
|
||||
curPage = 1;
|
||||
}
|
||||
if(curPage <= 0){
|
||||
curPage = 1;
|
||||
}
|
||||
|
||||
//设置查询调用的方法的名字
|
||||
if (operate == null) {
|
||||
operate = "query";
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public void print() throws JspTagException {
|
||||
JspWriter out ;
|
||||
StringBuffer buf ;
|
||||
out = pageContext.getOut();
|
||||
try {
|
||||
if (width == null || width.equals("")) {
|
||||
width = "90%";
|
||||
}
|
||||
if (align == null || align.equals("")) {
|
||||
align = "left";
|
||||
}
|
||||
|
||||
buf= new StringBuffer("");
|
||||
out.println("<table width='" + width + "' align='" + align + "'>");
|
||||
out.println("<tr><td align='left' width='40%'>");
|
||||
buf.append("当前第").append(curPage).append("/").append(pageCount)
|
||||
.append("页 每页")
|
||||
.append(pageRowCount).append("条")
|
||||
// .append(" 本页").append(curRowcount).append("条")
|
||||
.append(" 共").append(rowcount).append("条");;
|
||||
out.println(buf);
|
||||
out.println("</td>");
|
||||
out.println("<td align='right' width='70%'>");
|
||||
|
||||
|
||||
buf = new StringBuffer("");
|
||||
out.println();
|
||||
|
||||
//首页的连接
|
||||
buf.append(" <a href='javascript:viewPage(1")
|
||||
.append(",\"").append(operate)
|
||||
.append("\")' title='首页'><font face=webdings>9</font></a>");
|
||||
//上一页的连接
|
||||
if (curPage > 1) {
|
||||
buf.append(" <a href='javascript:viewPage(")
|
||||
.append(curPage-1).append(",\"").append(operate)
|
||||
.append("\")' title='上一页'><font face=webdings>7</font></a>");
|
||||
}
|
||||
//下一页的连接
|
||||
if (curPage < pageCount) {
|
||||
buf.append(" <a href='javascript:viewPage(")
|
||||
.append(curPage +1).append(",\"").append(operate)
|
||||
.append("\")' title='下一页'><font face=webdings>8</font></a>");
|
||||
}
|
||||
//尾页的连接
|
||||
buf.append(" <a href=# onclick='viewPage(")
|
||||
.append(pageCount).append(",\"").append(operate)
|
||||
.append("\")' title='尾页'><font face=webdings>:</font></a>");
|
||||
|
||||
out.println(buf);
|
||||
|
||||
out.println(" 转到<input type=text name='pageno' size=3 maxlength=9 class='DigitFormat'>");
|
||||
out.println("<input type='button' value='Go' onclick='viewPage(pageno.value,\""+ operate +"\")' class=\"box_button\">");
|
||||
out.println("</td></tr></table>");
|
||||
|
||||
out.println("<script>");
|
||||
out.println("function viewPage(pageno,method){");
|
||||
out.println("var form = document.forms[0];");
|
||||
out.println("form.operate.value= method;");
|
||||
out.println("form.pageno.value = pageno;");
|
||||
out.println("var result=form.pageno.value.match(/^(-|\\+)?\\d+$/);");
|
||||
out.println("if(result==null) {");
|
||||
out.println("alert('必须输入数字!');");
|
||||
out.println("form.pageno.value = '';");
|
||||
out.println("return false;");
|
||||
out.println("}");
|
||||
out.println("form.submit();");
|
||||
out.println("}");
|
||||
out.println("</script>");
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public void setPageContext(PageContext arg0) {
|
||||
super.setPageContext(arg0);
|
||||
this.request = arg0.getRequest();
|
||||
this.session = arg0.getSession();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the action.
|
||||
*/
|
||||
public String getOperate() {
|
||||
return operate;
|
||||
}
|
||||
/**
|
||||
* @param action The action to set.
|
||||
*/
|
||||
public void setOperate(String operate) {
|
||||
this.operate = operate;
|
||||
}
|
||||
/**
|
||||
* @return Returns the curPage.
|
||||
*/
|
||||
public long getCurPage() {
|
||||
return curPage;
|
||||
}
|
||||
/**
|
||||
* @param curPage The curPage to set.
|
||||
*/
|
||||
public void setCurPage(int curPage) {
|
||||
this.curPage = curPage;
|
||||
}
|
||||
/**
|
||||
* @return Returns the pageRowCount.
|
||||
*/
|
||||
public int getPageRowCount() {
|
||||
return pageRowCount;
|
||||
}
|
||||
/**
|
||||
* @param pageRowCount The pageRowCount to set.
|
||||
*/
|
||||
public void setPageRowCount(int pageRowCount) {
|
||||
this.pageRowCount = pageRowCount;
|
||||
}
|
||||
/**
|
||||
* @return Returns the request.
|
||||
*/
|
||||
public ServletRequest getRequest() {
|
||||
return request;
|
||||
}
|
||||
/**
|
||||
* @param request The request to set.
|
||||
*/
|
||||
public void setRequest(ServletRequest request) {
|
||||
this.request = request;
|
||||
}
|
||||
/**
|
||||
* @return Returns the scope.
|
||||
*/
|
||||
public String getScope() {
|
||||
return scope;
|
||||
}
|
||||
/**
|
||||
* @param scope The scope to set.
|
||||
*/
|
||||
public void setScope(String scope) {
|
||||
this.scope = scope;
|
||||
}
|
||||
/**
|
||||
* @return Returns the session.
|
||||
*/
|
||||
public HttpSession getSession() {
|
||||
return session;
|
||||
}
|
||||
/**
|
||||
* @param session The session to set.
|
||||
*/
|
||||
public void setSession(HttpSession session) {
|
||||
this.session = session;
|
||||
}
|
||||
/**
|
||||
* @return Returns the width.
|
||||
*/
|
||||
public String getWidth() {
|
||||
return width;
|
||||
}
|
||||
/**
|
||||
* @param width The width to set.
|
||||
*/
|
||||
public void setWidth(String width) {
|
||||
this.width = width;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return 返回 curRowCount。
|
||||
*/
|
||||
public int getCurRowcount() {
|
||||
return curRowcount;
|
||||
}
|
||||
/**
|
||||
* @param curRowCount 要设置的 curRowCount。
|
||||
*/
|
||||
public void setCurRowcount(int curRowCount) {
|
||||
this.curRowcount = curRowCount;
|
||||
}
|
||||
/**
|
||||
* @return Returns the align.
|
||||
*/
|
||||
public String getAlign() {
|
||||
return this.align;
|
||||
}
|
||||
/**
|
||||
* @param align The align to set.
|
||||
*/
|
||||
public void setAlign(String align) {
|
||||
this.align = align;
|
||||
}
|
||||
}
|
||||
@ -1,93 +0,0 @@
|
||||
|
||||
package com.zky.util;
|
||||
|
||||
import java.sql.Connection;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import org.apache.log4j.Logger;
|
||||
import com.zky.pub.Common;
|
||||
import com.zky.util.jdbc.JDBCPageQuery;
|
||||
import com.zky.util.jdbc.ResultSetHandler;
|
||||
|
||||
/**
|
||||
* @author dy
|
||||
*
|
||||
*/
|
||||
public class PageQuery {
|
||||
private static final Logger log = Logger.getLogger(PageQuery.class);
|
||||
private Pageable pageQuery = null;
|
||||
private HttpServletRequest request = null;
|
||||
private int pageNo;
|
||||
|
||||
public PageQuery(Pageable pageQuery, HttpServletRequest request) {
|
||||
this.pageQuery = pageQuery;
|
||||
this.request = request;
|
||||
//如果页码不空,则设置页码及总记录数
|
||||
String pageno = request.getParameter("pageno");
|
||||
if (!Common.isNull(pageno)) {
|
||||
pageNo = Integer.parseInt(pageno);
|
||||
} else {
|
||||
pageNo = 1;
|
||||
}
|
||||
}
|
||||
|
||||
public PageQuery(Connection conn, String sql, Object[] params, ResultSetHandler handler, HttpServletRequest request) {
|
||||
this(new JDBCPageQuery(conn,sql,params,handler), request);
|
||||
}
|
||||
|
||||
public PageQuery(Connection conn, String sql, Object param, ResultSetHandler handler, HttpServletRequest request) {
|
||||
this(new JDBCPageQuery(conn,sql,param,handler), request);
|
||||
}
|
||||
|
||||
public PageQuery(Connection conn, String sql, ResultSetHandler handler, HttpServletRequest request) {
|
||||
this(new JDBCPageQuery(conn,sql,handler), request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询页面数据
|
||||
* @param pageSize 每页显示的记录数
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object query(int pageSize) throws Exception{
|
||||
try {
|
||||
PageBean pageBean = new PageBean();
|
||||
pageQuery.setPageSize(pageSize);
|
||||
|
||||
Object obj = pageQuery.query(pageNo);
|
||||
//设置页面显示数据
|
||||
pageBean.setPageSize(pageQuery.getPageSize()); //页面大小
|
||||
pageBean.setPageCount(pageQuery.getPageCount()); //总页数
|
||||
pageBean.setRowcount(pageQuery.getRowcount()); //总记录数
|
||||
pageBean.setPageNum(pageNo); //页码
|
||||
// pageBean.setCurRowcount(pageQuery.getCurRowcount()); //当前页记录数
|
||||
request.setAttribute("PageBean", pageBean);
|
||||
return obj;
|
||||
} catch (Exception e) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询页面数据
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object query() throws Exception{
|
||||
try {
|
||||
PageBean pageBean = new PageBean();
|
||||
|
||||
Object obj = pageQuery.query(pageNo);
|
||||
//设置页面显示数据
|
||||
pageBean.setPageSize(pageQuery.getPageSize()); //页面大小
|
||||
pageBean.setPageCount(pageQuery.getPageCount()); //总页数
|
||||
pageBean.setRowcount(pageQuery.getRowcount()); //总记录数
|
||||
pageBean.setPageNum(pageNo); //页码
|
||||
// pageBean.setCurRowcount(pageQuery.getCurRowcount()); //当前页记录数
|
||||
request.setAttribute("PageBean", pageBean);
|
||||
return obj;
|
||||
} catch (Exception e) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,29 +0,0 @@
|
||||
|
||||
package com.zky.util;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author dy
|
||||
*
|
||||
* 分页查询接口
|
||||
*/
|
||||
|
||||
public interface Pageable {
|
||||
|
||||
public Object query(int pageNum) throws Exception;
|
||||
|
||||
public int getRowcount() throws Exception;
|
||||
|
||||
|
||||
// public int getCurRowcount();
|
||||
|
||||
public int getPageCount() throws Exception;
|
||||
|
||||
public void setPageSize(int pageSize);
|
||||
|
||||
public int getPageSize();
|
||||
|
||||
//public List getPageDataBlur(int pageNo) throws Exception;
|
||||
}
|
||||
@ -1,44 +0,0 @@
|
||||
package com.zky.util;
|
||||
|
||||
|
||||
public class Test {
|
||||
public static void backup(String dbName, String filePath) {
|
||||
try {
|
||||
@SuppressWarnings("unused")
|
||||
Process process = Runtime.getRuntime().exec(
|
||||
"cmd /c mysqldump -uroot -proot " + dbName + " > "
|
||||
+ filePath + "/" + new java.util.Date().getTime()
|
||||
+ ".sql");
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
System.out.println("备份数据库");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
// 恢复数据库
|
||||
public static void load(String dbName, String filePath) {
|
||||
try {
|
||||
@SuppressWarnings("unused")
|
||||
Process process = Runtime.getRuntime().exec(
|
||||
"cmd /c mysql -uroot -psa " + dbName + " < " + filePath);
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
System.out.println("恢复数据库");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
backup("orcl","d:/");
|
||||
//oad("test", "d:/1259138711453.sql");
|
||||
System.out.println("ok");
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
e.getMessage();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,30 +0,0 @@
|
||||
|
||||
package com.zky.util.jdbc;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class BatchParam {
|
||||
private List list = new LinkedList();
|
||||
private long num = -1;
|
||||
|
||||
public BatchParam(){
|
||||
|
||||
}
|
||||
|
||||
public void addParam(Object[] param) throws SQLException{
|
||||
if(num == -1){
|
||||
num = param.length;
|
||||
}
|
||||
if (num != param.length) {
|
||||
throw new SQLException("param length error");
|
||||
}
|
||||
list.add(param);
|
||||
}
|
||||
|
||||
public List getBatchAll(){
|
||||
return list;
|
||||
}
|
||||
}
|
||||
@ -1,35 +0,0 @@
|
||||
|
||||
package com.zky.util.jdbc;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.ResultSetMetaData;
|
||||
import java.sql.SQLException;
|
||||
import com.zky.pub.Common;
|
||||
import com.zky.pub.HashFmlBuf;
|
||||
|
||||
/**
|
||||
* @author dy
|
||||
*
|
||||
*/
|
||||
public class HashFmlBufResultSetHandler implements ResultSetHandler {
|
||||
|
||||
public Object handle(ResultSet rs) throws SQLException {
|
||||
HashFmlBuf buf = new HashFmlBuf();
|
||||
ResultSetMetaData meta = rs.getMetaData();
|
||||
int cols = meta.getColumnCount();
|
||||
String[] colNames = new String[cols];
|
||||
for (int i=0;i<cols;i++) {
|
||||
colNames[i] = rs.getMetaData().getColumnName(i+1);
|
||||
}
|
||||
int pos = 0;
|
||||
while (rs.next()) {
|
||||
for (int i=0; i<cols; i++) {
|
||||
buf.fchg(colNames[i],pos,Common.convertNull(rs.getString(colNames[i])));
|
||||
}
|
||||
pos ++;
|
||||
}
|
||||
buf.setResultRowCount(pos);
|
||||
return buf;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,172 +0,0 @@
|
||||
|
||||
package com.zky.util.jdbc;
|
||||
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import org.apache.log4j.Logger;
|
||||
import com.zky.util.Pageable;
|
||||
|
||||
/**
|
||||
* @author dy
|
||||
*
|
||||
*/
|
||||
|
||||
public class JDBCPageQuery implements Pageable{
|
||||
private static final Logger log = Logger.getLogger(JDBCPageQuery.class);
|
||||
|
||||
private int pageSize = 30;
|
||||
private int rowcount =-1; //总记录数
|
||||
//private int curRowcount = 0; //当前页记录数
|
||||
|
||||
private Connection conn = null;
|
||||
private String sql = null;
|
||||
private Object[] params = null;
|
||||
private ResultSetHandler handler = null;
|
||||
|
||||
public JDBCPageQuery(Connection conn, String sql, Object[] params, ResultSetHandler handler) {
|
||||
this.conn = conn;
|
||||
this.sql = sql;
|
||||
this.params = params;
|
||||
this.handler = handler;
|
||||
}
|
||||
|
||||
public JDBCPageQuery(Connection conn, String sql, Object param, ResultSetHandler handler) {
|
||||
this(conn,sql,new Object[]{param},handler);
|
||||
}
|
||||
|
||||
public JDBCPageQuery(Connection conn, String sql, ResultSetHandler handler) {
|
||||
this(conn,sql,(Object[])null,handler);
|
||||
}
|
||||
|
||||
public final Object query(int pageNum) throws SQLException {
|
||||
if (pageSize <= 0) {
|
||||
return null;
|
||||
}
|
||||
final int pos = pageSize * (pageNum -1);
|
||||
String pageSql = getLimitSql(sql, pos , pos + pageSize);
|
||||
PreparedStatement stmt = null;
|
||||
ResultSet rs = null;
|
||||
try {
|
||||
stmt = conn.prepareStatement(pageSql);
|
||||
JDBCUtils.setParams(stmt, params);
|
||||
rs = stmt.executeQuery();
|
||||
if(handler!=null){
|
||||
return handler.handle(rs);
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
throw e;
|
||||
|
||||
} finally {
|
||||
JDBCUtils.close(rs);
|
||||
JDBCUtils.close(stmt);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得总记录数
|
||||
*
|
||||
* @return
|
||||
* @throws SQLException
|
||||
*/
|
||||
public int getRowcount() throws SQLException {
|
||||
if (rowcount !=-1) {
|
||||
return rowcount;
|
||||
}
|
||||
|
||||
final String countSql = getCountSql(sql);
|
||||
PreparedStatement stmt = null;
|
||||
ResultSet rs = null;
|
||||
try {
|
||||
stmt = conn.prepareStatement(countSql);
|
||||
JDBCUtils.setParams(stmt, params);
|
||||
rs = stmt.executeQuery();
|
||||
if(rs.next()){
|
||||
rowcount = rs.getInt(1);
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
throw e;
|
||||
|
||||
} finally {
|
||||
JDBCUtils.close(rs);
|
||||
JDBCUtils.close(stmt);
|
||||
}
|
||||
return rowcount;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得总页数
|
||||
*
|
||||
* @return
|
||||
* @throws HibernateException
|
||||
* @throws SQLException
|
||||
*/
|
||||
public int getPageCount() throws SQLException {
|
||||
int rowcount = getRowcount();
|
||||
int totalPage = rowcount / pageSize;
|
||||
if ((rowcount % pageSize) == 0){
|
||||
return totalPage;
|
||||
} else {
|
||||
return totalPage + 1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the pageSize.
|
||||
*/
|
||||
public int getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
/**
|
||||
* @param pageSize The pageSize to set.
|
||||
*/
|
||||
public void setPageSize(int pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @return 返回 curRowcount。
|
||||
// */
|
||||
// public int getCurRowcount() {
|
||||
// return curRowcount;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获得分页查询sql
|
||||
* @param sql
|
||||
* @param first 第一条记录的位置
|
||||
* @param last 最后一条记录的位置
|
||||
* @return
|
||||
*/
|
||||
private final String getLimitSql(String sql, int first, int last) {
|
||||
StringBuffer pageSql = new StringBuffer( sql.length()+100 );
|
||||
//Oracle
|
||||
// pageSql
|
||||
// .append("select * from ( select rownum rownum_, row_.* from ( ")
|
||||
// .append(sql)
|
||||
// .append(" ) row_ where rownum <= ").append(last).append(") where rownum_ >= ").append(first)
|
||||
// .append("as b");
|
||||
//
|
||||
//Mysql
|
||||
pageSql.append("select * from (")
|
||||
.append(sql)
|
||||
.append(") as b LIMIT ")
|
||||
.append(first).append(", ").append(last);
|
||||
return pageSql.toString();
|
||||
}
|
||||
|
||||
private final String getCountSql(String sql) {
|
||||
StringBuffer countSql = new StringBuffer(sql.length()+100);
|
||||
//ORACLE
|
||||
//countSql.append("select count(*) from (").append(sql).append(")");
|
||||
///Mysql
|
||||
countSql.append("select count(*) from (").append(sql).append(") as f");
|
||||
|
||||
return countSql.toString();
|
||||
}
|
||||
}
|
||||
@ -1,28 +0,0 @@
|
||||
|
||||
package com.zky.util.jdbc;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.ResultSetMetaData;
|
||||
import java.sql.SQLException;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @author dy
|
||||
*
|
||||
* 生成下拉列表选项字符串
|
||||
*/
|
||||
public class OptionsResultSetHandler implements ResultSetHandler {
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.zky.util.jdbc.ResultSetHandler#handle(java.sql.ResultSet)
|
||||
*/
|
||||
public Object handle(ResultSet rs) throws SQLException {
|
||||
StringBuffer buf = new StringBuffer();
|
||||
while(rs.next()){
|
||||
buf.append("\n<option value=\"").append(rs.getString(1)).append("\">").append(rs.getString(2)).append("("+rs.getString(1)+")").append("</option>");
|
||||
}
|
||||
return buf.toString();
|
||||
}
|
||||
}
|
||||
@ -1,15 +0,0 @@
|
||||
|
||||
package com.zky.util.jdbc;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
/**
|
||||
* 将ResultSet转换成其他对象
|
||||
* @author dy
|
||||
*
|
||||
*/
|
||||
public interface ResultSetHandler {
|
||||
public Object handle(ResultSet rs) throws SQLException;
|
||||
|
||||
}
|
||||
@ -1,23 +0,0 @@
|
||||
|
||||
package com.zky.util.jdbc;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
/**
|
||||
* @author dy
|
||||
*
|
||||
*/
|
||||
public class SingleStringRSHandler implements ResultSetHandler {
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.zky.util.jdbc.ResultSetHandler#handle(java.sql.ResultSet)
|
||||
*/
|
||||
public Object handle(ResultSet rs) throws SQLException {
|
||||
if (rs.next()) {
|
||||
return rs.getString(1);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,38 +0,0 @@
|
||||
|
||||
package com.zky.util.jdbc;
|
||||
import com.zky.pub.HashFmlBuf;
|
||||
/**
|
||||
* @author dy
|
||||
*
|
||||
*/
|
||||
public class SqlBuf {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private int rowCount=0;
|
||||
private HashFmlBuf buf=null;
|
||||
public SqlBuf() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
rowCount=0;
|
||||
buf=new HashFmlBuf();
|
||||
}
|
||||
public void setZero(){
|
||||
rowCount=0;
|
||||
}
|
||||
public int getRowCount(){
|
||||
return rowCount;
|
||||
}
|
||||
public void addSql(String sqlstr){
|
||||
buf.fchg("SQL"+Integer.toString(rowCount++),0,sqlstr);
|
||||
}
|
||||
public String getSql(int i){
|
||||
if (i>=rowCount){
|
||||
return "";
|
||||
}
|
||||
else{
|
||||
return buf.fget("SQL"+Integer.toString(i),0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,61 +0,0 @@
|
||||
package com.zky.zhyw.smhd;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import com.zky.pub.DbConn;
|
||||
import com.zky.pub.HashFmlBuf;
|
||||
import com.zky.util.jdbc.HashFmlBufResultSetHandler;
|
||||
import com.zky.util.jdbc.JDBCUtils;
|
||||
|
||||
public class QueryUtils
|
||||
{
|
||||
public static String getDepartNameByDepartId(String departId) throws SQLException
|
||||
{
|
||||
String sql="select departname from tab_department where departId=?";
|
||||
Connection conn=null;
|
||||
try {
|
||||
conn=DbConn.getConn();
|
||||
HashFmlBuf buf = (HashFmlBuf) JDBCUtils.query(conn, sql, departId, new HashFmlBufResultSetHandler());
|
||||
if(buf!=null && buf.getRowCount()>0)
|
||||
{
|
||||
return buf.fget("departname",0);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
e.printStackTrace();
|
||||
}
|
||||
finally
|
||||
{
|
||||
if(conn!=null)
|
||||
{
|
||||
conn.close();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
public static String getEmpNameByEmpId(String employeeId) throws SQLException
|
||||
{
|
||||
String sql="select empname from tab_employee where empid=?";
|
||||
Connection conn=null;
|
||||
try {
|
||||
conn=DbConn.getConn();
|
||||
HashFmlBuf buf = (HashFmlBuf) JDBCUtils.query(conn, sql, employeeId, new HashFmlBufResultSetHandler());
|
||||
if(buf!=null && buf.getRowCount()>0)
|
||||
{
|
||||
return buf.fget("empname",0);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
e.printStackTrace();
|
||||
}
|
||||
finally
|
||||
{
|
||||
if(conn!=null)
|
||||
{
|
||||
conn.close();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue