package com.kingsoft.main;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
import java.io.Serializable;
import java.sql.*;
import java.util.ArrayList;
import java.sql.Date;
import java.text.SimpleDateFormat;
import java.util.Calendar;
public class JavaExcel implements Serializable{
static Connection conn = null;
static PreparedStatement pstmt = null;
public static void updateLineCNT() throws SQLException{
long startTime = System.currentTimeMillis();
// System.out.println("updateLineCNT startTime:"+startTime);
ArrayList al = getLineCNT();
try {
for (int j = 0; j < al.size(); j++) {
String sql = "update ops$e21team4_ro.RPT_WFX_MONTHLY "
+ "set LINE_CNT=?"
+ "where MON=?";
pstmt = conn.prepareStatement(sql);
int i = 1;
pstmt.setInt(i++, ((JeDO) al.get(j)).getLineCNT());
pstmt.setString(i++, ((JeDO)al.get(j)).getMonth());
int cnt= pstmt.executeUpdate();
System.out.println("updateLineCNT sql:"+sql);
System.out.println("updateLineCNT:"+cnt);
pstmt.close();
}
long stopTime = System.currentTimeMillis();
// System.out.println("updateLineCNT stopTime:"+stopTime);
System.out.println("updateLineCNT 总共运行时长为:"+(stopTime-startTime));
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
System.out.println(e.getMessage());
}
}
public static void updateNewLineCNT() throws SQLException{
long startTime = System.currentTimeMillis();
// System.out.println("updateNewLineCNT startTime:"+startTime);
ArrayList al = getNewLineCNT();
try {
for (int j = 0; j < al.size(); j++) {
String sql = "update ops$e21team4_ro.RPT_WFX_MONTHLY "
+ "set NEW_LINE_CNT=?"
+ "where MON=?";
pstmt = conn.prepareStatement(sql);
int i = 1;
pstmt.setInt(i++, ((JeDO) al.get(j)).getNewLineCNT());
pstmt.setString(i++, ((JeDO)al.get(j)).getMonth());
int cnt= pstmt.executeUpdate();
System.out.println("updateNewLineCNT sql:"+sql);
System.out.println("updateNewLineCNT:"+cnt);
pstmt.close();
}
long stopTime = System.currentTimeMillis();
// System.out.println("updateNewLineCNT stopTime:"+stopTime);
System.out.println("updateNewLineCNT 总共运行时长为:"+(stopTime-startTime));
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
System.out.println(e.getMessage());
}
}
public static void updateTmnLineCNT() throws SQLException{
long startTime = System.currentTimeMillis();
// System.out.println("updateTmnLineCNT startTime:"+startTime);
ArrayList al = getTmnLineCNT();
try {
for (int j = 0; j < al.size(); j++) {
String sql = "update ops$e21team4_ro.RPT_WFX_MONTHLY "
+ "set TMN_LINE_CNT=?"
+ "where MON=?";
pstmt = conn.prepareStatement(sql);
int i = 1;
pstmt.setInt(i++, ((JeDO) al.get(j)).getTmnLineCNT());
pstmt.setString(i++, ((JeDO)al.get(j)).getMonth());
int cnt= pstmt.executeUpdate();
System.out.println("updateTmnLineCNT sql:"+sql);
System.out.println("updateTmnLineCNT:"+cnt);
pstmt.close();
}
long stopTime = System.currentTimeMillis();
// System.out.println("updateTmnLineCNT stopTime:"+stopTime);
System.out.println("updateTmnLineCNT 总共运行时长为:"+(stopTime-startTime));
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
System.out.println(e.getMessage());
}
}
public static void updateSuspendLineCNT() throws SQLException{
long startTime = System.currentTimeMillis();
// System.out.println("updateSuspendLineCNT startTime:"+startTime);
ArrayList al = getSuspendLineCNT();
try {
for (int j = 0; j < al.size(); j++) {
String sql = "update ops$e21team4_ro.RPT_WFX_MONTHLY "
+ "set SUSPEND_LINE_CNT=?"
+ "where MON=?";
pstmt = conn.prepareStatement(sql);
int i = 1;
pstmt.setInt(i++, ((JeDO) al.get(j)).getSuspendLineCNT());
pstmt.setString(i++, ((JeDO)al.get(j)).getMonth());
int cnt= pstmt.executeUpdate();
System.out.println("updateSuspendLineCNT sql:"+sql);
System.out.println("updateSuspendLineCNT:"+cnt);
pstmt.close();
}
long stopTime = System.currentTimeMillis();
// System.out.println("updateSuspendLineCNT stopTime:"+stopTime);
System.out.println("updateSuspendLineCNT 总共运行时长为:"+(stopTime-startTime));
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
System.out.println(e.getMessage());
}
}
public static void updateResumeLineCNT() throws SQLException{
long startTime = System.currentTimeMillis();
// System.out.println("updateResumeLineCNT startTime:"+startTime);
ArrayList al = getResumeLineCNT();
try {
for (int j = 0; j < al.size(); j++) {
String sql = "update ops$e21team4_ro.RPT_WFX_MONTHLY "
+ "set RESUME_LINE_CNT=?"
+ "where MON=?";
pstmt = conn.prepareStatement(sql);
int i = 1;
pstmt.setInt(i++, ((JeDO) al.get(j)).getResumeLineCNT());
pstmt.setString(i++, ((JeDO)al.get(j)).getMonth());
int cnt= pstmt.executeUpdate();
System.out.println("updateResumeLineCNT sql:"+sql);
System.out.println("updateResumeLineCNT:"+cnt);
pstmt.close();
}
long stopTime = System.currentTimeMillis();
// System.out.println("updateResumeLineCNT stopTime:"+stopTime);
System.out.println("updateResumeLineCNT 总共运行时长为:"+(stopTime-startTime));
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
System.out.println(e.getMessage());
}
}
public static void clearAll() throws SQLException{
long startTime = System.currentTimeMillis();
// System.out.println("clearAll startTime:"+startTime);
ArrayList al = getLineCNT();
try {
for (int j = 0; j < al.size(); j++) {
String sql = "update ops$e21team4_ro.RPT_WFX_MONTHLY set LINE_CNT='',NEW_LINE_CNT='',TMN_LINE_CNT='',SUSPEND_LINE_CNT='',RESUME_LINE_CNT='',LINE_SUM=''";
pstmt = conn.prepareStatement(sql);
int cnt= pstmt.executeUpdate();
pstmt.close();
}
System.out.println("Clear All is Success");
long stopTime = System.currentTimeMillis();
// System.out.println("clearAll stopTime:"+stopTime);
System.out.println("clearAll 总共运行时长为:"+(stopTime-startTime));
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
System.out.println(e.getMessage());
}
}
public static ArrayList getLineCNT() throws SQLException{
long startTime = System.currentTimeMillis();
// System.out.println("getLineCNT startTime:"+startTime);
ArrayList result = new ArrayList();
String sql = "select to_char(TRUNC(SERV_STRT_DATE,'MM'),'yyyymm') AS MONTH, " +
"COUNT(DISTINCT LINE_NO) AS LINE_NO " +
"From lis_line_subscription where prod_id = 789 and sts<>'I' " +
"GROUP BY TRUNC(SERV_STRT_DATE,'MM') ";
pstmt = conn.prepareStatement(sql);
ResultSet rs = pstmt.executeQuery();
while(rs.next()){
JeDO bean = new JeDO();
bean.setMonth(rs.getString(1));
bean.setLineCNT(rs.getInt(2));
result.add(bean);
}
/*
for(int i=0;i<result.size();i++){
System.out.println(">>>>>>>>>>>>"+((JeDO) result.get(i)).getLineNo());
System.out.println("<<<<<<<<<<<<"+((JeDO) result.get(i)).getMonth());
}
*/
long stopTime = System.currentTimeMillis();
// System.out.println("getLineCNT stopTime:"+stopTime);
System.out.println("getLineCNT 总共运行时长为:"+(stopTime-startTime));
pstmt.close();
return result;
}
public static ArrayList getNewLineCNT() throws SQLException{
long startTime = System.currentTimeMillis();
ArrayList result = new ArrayList();
String sql = "select /*+rule*/ to_char(TRUNC(SIC.NWT_ASG_RFS_DATE,'MM'),'yyyymm') AS MONTH,count(line_no) AS NEW_LINE " +
"from soh_service_order_header soh,sic_so_line_info sic, oty_order_type oty " +
"where soh.ORD_TYPE_ID = oty.ORD_TYPE_id and oty.ORD_TYPE_CD='N' " +
"and soh.so_no = sic.so_no " +
"and sic.SO_LINE_STS_CD = 'PO' " +
"and OTY.PROD_ID = 789 " +
"AND SIC.PROD_CD ='WFX' " +
"GROUP BY " +
"TRUNC(SIC.NWT_ASG_RFS_DATE,'MM') ";
pstmt = conn.prepareStatement(sql);
ResultSet rs = pstmt.executeQuery();
while(rs.next()){
JeDO bean = new JeDO();
bean.setMonth(rs.getString(1));
bean.setNewLineCNT(rs.getInt(2));
result.add(bean);
}
long stopTime = System.currentTimeMillis();
System.out.println("getNewLineCNT 总共运行时长为:"+(stopTime-startTime));
pstmt.close();
return result;
}
public static ArrayList getTmnLineCNT() throws SQLException{
long startTime = System.currentTimeMillis();
// System.out.println("getTmnLineCNT startTime:"+startTime);
ArrayList result = new ArrayList();
String sql = "select /*+rule*/ to_char(TRUNC(SIC.NWT_ASG_RFS_DATE,'MM'),'yyyymm') AS MONTH,count(line_no) AS TERM_LINE " +
"from soh_service_order_header soh,sic_so_line_info sic, oty_order_type oty " +
"where soh.ORD_TYPE_ID = oty.ORD_TYPE_id and oty.ORD_TYPE_CD='T' " +
"and soh.so_no = sic.so_no " +
"and sic.SO_LINE_STS_CD = 'PO' " +
"and OTY.PROD_ID = 789 " +
"AND SIC.PROD_CD ='WFX' " +
"GROUP BY " +
"TRUNC(SIC.NWT_ASG_RFS_DATE,'MM')";
pstmt = conn.prepareStatement(sql);
ResultSet rs = pstmt.executeQuery();
while(rs.next()){
JeDO bean = new JeDO();
bean.setMonth(rs.getString(1));
bean.setTmnLineCNT(rs.getInt(2));
result.add(bean);
}
long stopTime = System.currentTimeMillis();
// System.out.println("getTmnLineCNT stopTime:"+stopTime);
System.out.println("getTmnLineCNT 总共运行时长为:"+(stopTime-startTime));
pstmt.close();
return result;
}
public static ArrayList getSuspendLineCNT() throws SQLException{
long startTime = System.currentTimeMillis();
// System.out.println("getSuspendLineCNT startTime:"+startTime);
ArrayList result = new ArrayList();
String sql = "SELECT to_char(TRUNC(SRP.LAST_UPD_DATE,'MM'),'yyyymm'),COUNT(LINE_NO) " +
"fROM SRR_SUSPEND_RESUME_REQUEST SRP,SRD_SUSPEND_RESUME_DETAIL SRD " +
"WHERE SRP.SUS_RES_REQ_ID = SRD.SUS_RES_REQ_ID " +
"AND PROD_ID = 789 " +
"AND SRP.REQ_STS='CP' " +
"AND REQ_ACTION = 'S' " +
"GROUP BY TRUNC(SRP.LAST_UPD_DATE,'MM')";
pstmt = conn.prepareStatement(sql);
ResultSet rs = pstmt.executeQuery();
while(rs.next()){
JeDO bean = new JeDO();
bean.setMonth(rs.getString(1));
bean.setSuspendLineCNT(rs.getInt(2));
result.add(bean);
}
long stopTime = System.currentTimeMillis();
// System.out.println("getSuspendLineCNT stopTime:"+stopTime);
System.out.println("getSuspendLineCNT 总共运行时长为:"+(stopTime-startTime));
pstmt.close();
return result;
}
public static ArrayList getResumeLineCNT() throws SQLException{
long startTime = System.currentTimeMillis();
// System.out.println("getResumeLineCNT startTime:"+startTime);
ArrayList result = new ArrayList();
String sql = "SELECT to_char(TRUNC(SRP.LAST_UPD_DATE,'MM'),'yyyymm'),COUNT(LINE_NO) " +
"fROM SRR_SUSPEND_RESUME_REQUEST SRP,SRD_SUSPEND_RESUME_DETAIL SRD " +
"WHERE SRP.SUS_RES_REQ_ID = SRD.SUS_RES_REQ_ID " +
"AND PROD_ID = 789 " +
"AND SRP.REQ_STS='CP' " +
"AND REQ_ACTION = 'R' " +
"GROUP BY TRUNC(SRP.LAST_UPD_DATE,'MM')";
pstmt = conn.prepareStatement(sql);
ResultSet rs = pstmt.executeQuery();
while(rs.next()){
JeDO bean = new JeDO();
bean.setMonth(rs.getString(1));
bean.setResumeLineCNT(rs.getInt(2));
result.add(bean);
}
long stopTime = System.currentTimeMillis();
// System.out.println("getResumeLineCNT stopTime:"+stopTime);
System.out.println("getResumeLineCNT 总共运行时长为:"+(stopTime-startTime));
pstmt.close();
return result;
}
public static void updateLineSUM() throws SQLException{
long startTime = System.currentTimeMillis();
try {
String sql = "UPDATE ops$e21team4_ro.RPT_WFX_MONTHLY SET LINE_SUM=NEW_LINE_CNT-TMN_LINE_CNT";
pstmt = conn.prepareStatement(sql);
int cnt= pstmt.executeUpdate();
System.out.println("updateResumeLineCNT sql:"+sql);
System.out.println("updateResumeLineCNT:"+cnt);
pstmt.close();
long stopTime = System.currentTimeMillis();
System.out.println("updateLineSUM 总共运行时长为:"+(stopTime-startTime));
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
System.out.println(e.getMessage());
}
}
public static void updateSumLineCNT() throws SQLException{
long startTime = System.currentTimeMillis();
try {
String sql = "UPDATE ops$e21team4_ro.RPT_WFX_MONTHLY " +
"SET LINE_CNT=(SELECT SUM(LINE_CNT) FROM ops$e21team4_ro.RPT_WFX_MONTHLY where mon<>'SUM') " +
"WHERE MON='SUM'";
pstmt = conn.prepareStatement(sql);
int cnt= pstmt.executeUpdate();
System.out.println("updateResumeLineCNT sql:"+sql);
System.out.println("updateResumeLineCNT:"+cnt);
pstmt.close();
long stopTime = System.currentTimeMillis();
System.out.println("updateSumLineCNT 总共运行时长为:"+(stopTime-startTime));
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
System.out.println(e.getMessage());
}
}
public static void updateSumNewLineCNT() throws SQLException{
long startTime = System.currentTimeMillis();
try {
String sql = "UPDATE ops$e21team4_ro.RPT_WFX_MONTHLY " +
"SET NEW_LINE_CNT=(SELECT SUM(NEW_LINE_CNT) FROM ops$e21team4_ro.RPT_WFX_MONTHLY where mon<>'SUM') " +
"WHERE MON='SUM'";
pstmt = conn.prepareStatement(sql);
int cnt= pstmt.executeUpdate();
System.out.println("updateResumeLineCNT sql:"+sql);
System.out.println("updateResumeLineCNT:"+cnt);
pstmt.close();
long stopTime = System.currentTimeMillis();
System.out.println("updateSumNewLineCNT 总共运行时长为:"+(stopTime-startTime));
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
System.out.println(e.getMessage());
}
}
public static void updateSumTmnLineCNT() throws SQLException{
long startTime = System.currentTimeMillis();
try {
String sql = "UPDATE ops$e21team4_ro.RPT_WFX_MONTHLY " +
"SET TMN_LINE_CNT=(SELECT SUM(TMN_LINE_CNT) FROM ops$e21team4_ro.RPT_WFX_MONTHLY where mon<>'SUM') " +
"WHERE MON='SUM'";
pstmt = conn.prepareStatement(sql);
int cnt= pstmt.executeUpdate();
System.out.println("updateResumeLineCNT sql:"+sql);
System.out.println("updateResumeLineCNT:"+cnt);
pstmt.close();
long stopTime = System.currentTimeMillis();
System.out.println("updateSumTmnLineCNT 总共运行时长为:"+(stopTime-startTime));
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
System.out.println(e.getMessage());
}
}
public static void updateSumSuspendLineCNT() throws SQLException{
long startTime = System.currentTimeMillis();
try {
String sql = "UPDATE ops$e21team4_ro.RPT_WFX_MONTHLY " +
"SET SUSPEND_LINE_CNT=(SELECT SUM(SUSPEND_LINE_CNT) FROM ops$e21team4_ro.RPT_WFX_MONTHLY where mon<>'SUM') " +
"WHERE MON='SUM'";
pstmt = conn.prepareStatement(sql);
int cnt= pstmt.executeUpdate();
System.out.println("updateResumeLineCNT sql:"+sql);
System.out.println("updateResumeLineCNT:"+cnt);
pstmt.close();
long stopTime = System.currentTimeMillis();
System.out.println("updateSumSuspendLineCNT 总共运行时长为:"+(stopTime-startTime));
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
System.out.println(e.getMessage());
}
}
public static void updateSumResumeLineCNT() throws SQLException{
long startTime = System.currentTimeMillis();
try {
String sql = "UPDATE ops$e21team4_ro.RPT_WFX_MONTHLY " +
"SET RESUME_LINE_CNT=(SELECT SUM(RESUME_LINE_CNT) FROM ops$e21team4_ro.RPT_WFX_MONTHLY where mon<>'SUM') " +
"WHERE MON='SUM'";
pstmt = conn.prepareStatement(sql);
int cnt= pstmt.executeUpdate();
System.out.println("updateResumeLineCNT sql:"+sql);
System.out.println("updateResumeLineCNT:"+cnt);
pstmt.close();
long stopTime = System.currentTimeMillis();
System.out.println("updateSumResumeLineCNT 总共运行时长为:"+(stopTime-startTime));
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
System.out.println(e.getMessage());
}
}
public static ArrayList getAll() throws SQLException{
long startTime = System.currentTimeMillis();
ArrayList sb = new ArrayList();
String sql = "select mon,LINE_CNT,NEW_LINE_CNT,TMN_LINE_CNT,SUSPEND_LINE_CNT,RESUME_LINE_CNT,LINE_SUM " +
"from ops$e21team4_ro.RPT_WFX_MONTHLY " +
"where mon<=to_char(TRUNC(sysdate,'MM'),'yyyymm') or mon='SUM' order by mon asc";
pstmt = conn.prepareStatement(sql);
System.out.println(sql);
ResultSet rs = pstmt.executeQuery();
while(rs.next()){
JeDO jdo = new JeDO();
jdo.setMonth(rs.getString(1));
jdo.setLineCNT(rs.getInt(2));
jdo.setNewLineCNT(rs.getInt(3));
jdo.setTmnLineCNT(rs.getInt(4));
jdo.setSuspendLineCNT(rs.getInt(5));
jdo.setResumeLineCNT(rs.getInt(6));
jdo.setLineSum(rs.getInt(7));
sb.add(jdo);
}
long stopTime = System.currentTimeMillis();
System.out.println("getAll 总共运行时长为:"+(stopTime-startTime));
/*
for(int j=0;j<sb.size();j++){
System.out.println("-----------"+((JeDO) sb.get(j)).getMonth());
System.out.println("+++++++++++"+((JeDO) sb.get(j)).getLineCNT());
System.out.println("..........."+((JeDO) sb.get(j)).getNewLineCNT());
System.out.println("```````````"+((JeDO) sb.get(j)).getTmnLineCNT());
System.out.println("***********"+((JeDO) sb.get(j)).getSuspendLineCNT());
System.out.println("$$$$$$$$$$$"+((JeDO) sb.get(j)).getResumeLineCNT());
System.out.println("@@@@@@@@@@@"+((JeDO) sb.get(j)).getLineSum());
}
*/
pstmt.close();
return sb;
}
public static void outputCSV() throws Exception{
ArrayList al = getAll();
FileOutputStream fos = new FileOutputStream("webfax_reports.csv");
OutputStreamWriter pw = new OutputStreamWriter(fos,"UTF8");
java.util.Date d = new java.util.Date();
pw.write("REPORT DATE :"+d);
StringBuffer sb1 = new StringBuffer("MONTH");
StringBuffer sb2 = new StringBuffer("LINE_NO");
StringBuffer sb3 = new StringBuffer("NEW LINE");
StringBuffer sb4 = new StringBuffer("TERM LINE");
StringBuffer sb5 = new StringBuffer("NEW-TERM");
StringBuffer sb6 = new StringBuffer("SUSPEND");
StringBuffer sb7 = new StringBuffer("RESUME");
for(int j=0;j<al.size();j++){
String a = ((JeDO) al.get(j)).getMonth();
if(a == null){
sb1.append(",");
}else{
sb1.append(","+a);
}
int b = ((JeDO) al.get(j)).getLineCNT();
if(b == 0){
sb2.append(",");
}else{
sb2.append(","+b);
}
int c = ((JeDO) al.get(j)).getNewLineCNT();
if(c == 0){
sb3.append(",");
}else{
sb3.append(","+c);
}
int e = ((JeDO) al.get(j)).getTmnLineCNT();
if(e == 0){
sb4.append(",");
}else{
sb4.append(","+e);
}
int f = ((JeDO) al.get(j)).getLineSum();
if(f == 0){
sb5.append(",");
}else{
sb5.append(","+f);
}
int k = ((JeDO) al.get(j)).getSuspendLineCNT();
if(k == 0){
sb6.append(",");
}else{
sb6.append(","+k);
}
int h = ((JeDO) al.get(j)).getResumeLineCNT();
if(h == 0){
sb7.append(",");
}else{
sb7.append(","+h);
}
}
pw.write("\n"+sb1.toString());
pw.write("\n"+sb2.toString());
pw.write("\n"+sb3.toString());
pw.write("\n"+sb4.toString());
pw.write("\n"+sb5.toString());
pw.write("\n");
pw.write("\n"+sb6.toString());
pw.write("\n"+sb7.toString());
pw.flush();
pw.close();
System.out.println("outputCSV is success!");
}
public static void getConnection(){
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
}catch(java.lang.ClassNotFoundException e){
System.out.println(e.getMessage());
}
try {
String url = "jdbc:oracle:thin:@neptune:1523:E21DB2";
String user = "ops$e21team4_ro";
String password = "abcapr";
conn = DriverManager.getConnection(url, user, password);
} catch (Exception e) {
// TODO: handle exception
System.out.println(e.getMessage());
}
}
public static void updateTabel() throws Exception{
updateLineCNT();
updateNewLineCNT();
updateTmnLineCNT();
updateSuspendLineCNT();
updateResumeLineCNT();
updateSumLineCNT();
updateSumNewLineCNT();
updateSumTmnLineCNT();
updateSumSuspendLineCNT();
updateSumResumeLineCNT();
updateLineSUM();
}
public static void main(String[] args) throws Exception{
long kl = System.currentTimeMillis();
getConnection();
clearAll();
updateTabel();
outputCSV();
long st = System.currentTimeMillis();
System.out.println("Time is running:"+(st-kl));
}
}
class JeDO implements Serializable{
int lineCNT;
int newLineCNT;
int tmnLineCNT;
int suspendLineCNT;
int resumeLineCNT;
int lineSum;
String month;
public int getLineSum() {
return lineSum;
}
public void setLineSum(int lineSum) {
this.lineSum = lineSum;
}
public int getLineCNT() {
return lineCNT;
}
public void setLineCNT(int lineCNT) {
this.lineCNT = lineCNT;
}
public int getNewLineCNT() {
return newLineCNT;
}
public void setNewLineCNT(int newLineCNT) {
this.newLineCNT = newLineCNT;
}
public int getTmnLineCNT() {
return tmnLineCNT;
}
public void setTmnLineCNT(int tmnLineCNT) {
this.tmnLineCNT = tmnLineCNT;
}
public int getSuspendLineCNT() {
return suspendLineCNT;
}
public void setSuspendLineCNT(int suspendLineCNT) {
this.suspendLineCNT = suspendLineCNT;
}
public int getResumeLineCNT() {
return resumeLineCNT;
}
public void setResumeLineCNT(int resumeLineCNT) {
this.resumeLineCNT = resumeLineCNT;
}
public String getMonth() {
return month;
}
public void setMonth(String month) {
this.month = month;
}
}
分享到:
相关推荐
文件为c程序文件,实现功能:C语言输出csv文件,测量数据形成表格
一个很好用的CSV文件读写的类,CSV文件用于程序的配置文件很方便
c++实现的读写csv文件
linux c++csv文件读写,linux c++csv文件读写的代码的实现。
在vs2015下的mfc的csv文件读写操作例程,可以修改对应行列数据
在做项目的时候,发现使用POI无法解析以csv文件结尾的文件,虽然csv文件能用Excel打开,但是csv文件没有像Excel一样有规定的电子表格形式,故使用POI无法解析csv文件,在网上找了一下,发现java有提供java csv文件来...
方法写得非常好,代码也写得非常简洁,很合适在实际项目中使用。经本人测试,只要把上面的代码CSVOperator.h、CSVOperator.cpp和StringParser.h拷贝到项目中,就可以直接使用。在CSV_OP.cpp文件中,main方法里面有...
基于c++的简易csv快速读写文件(.cpp),可对大型csv文件进行短时间的读写操作,使用时更改csv路径即可,注释栏内可用于计算操作完成时间
文件中包括读取excel、csv文件,同时可以将读取出的文件内容保存在另外一个excel或csv中。注意excel2003和excel2007调用的jar包也不一样,需要将代码进行修改。2007版的将HSSF改成XSSF,2003相反。csv文件用XSSF
里面有NPOI读写Excel的代码,方法都是封装好的,直接调用,也还有第三方的dll读写CSV文件,还配上了所有的dll文件,免了找dll的时间,我自己写的,肯定可以,之前传了一个有人评论说报错。
最近公司项目用到读写CSV文件,作为一个菜鸟,我借鉴了很多前辈们的经典案例,也拿出来与大家分享下。。。
C语言下STM32F103RCT6通过CH376S读写CSV文件
java读写csv文件
本接口 可以 处理 csv文件 能实现csv文件的读和写,另外还提供相应的数据转化。可以实现对csv文件的修改,具有插入,删除,替换等操作接口。
c++实现读写csv文件.
本作品主要是利用Labview将获取的信息存储进CSV格式文件中,CSV格式文件比较通用,方便以后的操作。
csv大文件打开器,可快速查看大型csv文件
C# Winform在DataGridView控件中读写csv文件。
VC++6.0编译通过的读写CSV文件的代码及实例 在VC++6.0中编译通过,实测可用 通用性很不错 包含CSV读取的实例
用Qt写的生成csv的程序,使用方法在文件的注释里