import java.io.*;
import java.sql.*;
import java.text.*;
import java.util.Date;
public class Expiration {
Connection con;
Statement stmt;
RandomAccessFile inOjb;
BufferedReader br;
ResultSet rs1;
ResultSet rs2;
Db db;
String url;
String user;
String password;
public Expiration(String url,String user,String password)
{
this.url=url;
this.user=user;
this.password=password;
db=new Db(url,user,password);
}
public String start()
{
Iniread inir=new Iniread(url,user,password);
String addr=inir.getaddress("POINT_JNL_CSV");
return addr;
/* try{
inOjb=new RandomAccessFile(addr,"rw");
}
catch(IOException e){
} */
}
public int getobj(Date date)
{
String tenpo;
try {
DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
int dtime1=Integer.parseInt(dateFormat.format(date));
String temp="SELECT MEMBER_CODE,NYUKAI_YMD,MUKOU_KBN FROM FSPTB_MEMBER WHERE MUKOU_KBN=0";
con=DriverManager.getConnection(url,user,password);
stmt=con.createStatement();;
//String test="INSERT INTO FSPTB_POINT(MEMBER_CODE,NOW_POINT,KAIAGE_R,KAIAGE_F,MUKOU_KBN) VALUES ('1234567890123',12345678.9,'20060502',0,'0')";
//stmt.executeUpdate(test);
rs1=stmt.executeQuery(temp);
while(rs1.next())
{
//if(rs1!=null) System.out.println("nuullll");
String membercode1=rs1.getString("MEMBER_CODE");
int dtime2=Integer.parseInt(rs1.getString("NYUKAI_YMD"));
if(dtime1>=dtime2)
{
temp="SELECT MEMBER_CODE,NOW_POINT,KAIAGE_R,KAIAGE_F,MUKOU_KBN FROM FSPTB_POINT WHERE MUKOU_KBN=0";
Connection con2=DriverManager.getConnection(url,user,password);
//Statement stmt=con.createStatement();;
Statement stmtx=con2.createStatement();
rs2=stmtx.executeQuery(temp);
while(rs2.next())
{
String membercode2=rs2.getString("MEMBER_CODE");
float nowpoint=rs2.getFloat("NOW_POINT");
//System.out.println(now);
//System.out.println(rs2.getString("KAIAGE_R"));
int dtime3=Integer.parseInt(rs2.getString("KAIAGE_R"));
int kaiage=rs2.getInt("KAIAGE_F");
//System.out.println(dtime3+"+"+kaiage+"+"+membercode1+"+"+membercode2);
if(membercode1.equals(membercode2)&&nowpoint!=0&&(dtime1>=dtime3||kaiage==0))
{
this.pointupdate(membercode1);
tenpo=this.getmemberdata(membercode1);
String k=this.pointrireki(membercode1);
this.pointjournalupdate(membercode1);
this.pointrirekiupdate(k,membercode1);
this.memberstatus(membercode1);
this.csvfilemade(membercode1,this.start());
}
}
}
}
con.close();
return 1;
}
catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return 1;
}
}
private void pointupdate(String member)
{
try {
DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
DateFormat format1 = new SimpleDateFormat("hhmmss");
Date date=new Date();
String Dateformat=dateFormat.format(date)+format1.format(date);
con=DriverManager.getConnection(url,user,password);
stmt=con.createStatement();
String temp="UPDATE FSPTB_POINT SET OUT_RUIKEI_POINT=OUT_RUIKEI_POINT+NOW_POINT,NOW_POINT=0,UPD_TANTOU='NULL',SYSTEM_UPD_YMDHMS='"+Dateformat+"' WHERE MEMBER_CODE='"+member+"'";
stmt.executeUpdate(temp);
con.close();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
private String getmemberdata(String member)
{
try {
con=DriverManager.getConnection(url,user,password);
stmt=con.createStatement();
String temp="SELECT MEMBER_CODE,TENPO_CODE FROM FSPTB_MEMBER WHERE MEMBER_CODE='"+member+"'";
ResultSet rs=stmt.executeQuery(temp);
rs.next();
String tenpo=rs.getString("TENPO_CODE");
if(tenpo==null)
{
Db db=new Db(url,user,password);
String temp2="店舗コードが設定されていません。メンバーコード:"+member;
String temp1="INSERT INTO FSPTB_LOG(P_Sel,P_Msg,P_AppNM,P_FuncNM,P_JobNM,p_ErrDetail,P_InIFile) VALUES('L','エラーログ','店舗コード取得エラー','Expiration','"+temp2+"','FSP.INIアクセスエラー','FSP.INI')";
db.insert(temp1);
return "1";
}
else
return tenpo;
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return "1";
}
}
private String pointrireki (String member)
{
try {
con=DriverManager.getConnection(url,user,password);
stmt=con.createStatement();
String temp="SELECT MEMBER_CODE,YMD FROM FSPTB_POINT_RIREKI WHERE MEMBER_CODE='"+member+"'";
ResultSet rs=stmt.executeQuery(temp);
while (rs.next())
{
Date date=new Date();
DateFormat dateFormat = new SimpleDateFormat("yyyymmdd");
int time1=Integer.parseInt(dateFormat.format(date));
int time2=Integer.parseInt(rs.getString("YMD"));
if(time1>time2)
{
return "";
}
}
return "EOF";
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return "";
}
}
private int pointjournalupdate (String member)
{
try {
Connection con1=DriverManager.getConnection(url,user,password);
Statement stmt1=con1.createStatement();
Connection con2=DriverManager.getConnection(url,user,password);
Statement stmt2=con2.createStatement();
Connection con3=DriverManager.getConnection(url,user,password);
Statement stmt3=con3.createStatement();
//String temp="SELECT MEMBER_CODE FROM FSPTB_POINT_JNL ";
//ResultSet rs=stmt.executeQuery(temp);
String temp="SELECT * FROM FSPTB_MEMBER WHERE MEMBER_CODE='"+member+"'";
ResultSet rs11=stmt1.executeQuery(temp);
temp="SELECT * FROM FSPTB_POINT WHERE MEMBER_CODE='"+member+"'";
ResultSet rs22=stmt2.executeQuery(temp);
temp="SELECT * FROM FSPTB_POINT_RIREKI WHERE MEMBER_CODE='"+member+"'";
ResultSet rs33=stmt3.executeQuery(temp);
rs11.next();
String tenpo_code=rs11.getString("TENPO_CODE");
int i=Integer.parseInt(tenpo_code.substring(3,6));
String tenpocode;
if(i<10)
{
tenpocode=" "+String.valueOf(i);
}
else if(i<100)
{
tenpocode=" "+String.valueOf(i);
}
else
tenpocode=" "+String.valueOf(i);
rs22.next();
Float nowpoint2=rs22.getFloat("NOW_POINT");
DateFormat dateFormat = new SimpleDateFormat("yyyymmdd");
DateFormat format1 = new java.text.SimpleDateFormat("hhmmss");
Date date=new Date();
long Time=(date.getTime()/1000)-60*60*24;
date.setTime(Time*1000);
String Dateformat=dateFormat.format(date)+format1.format(date);
if(rs33.next())
{
//System.out.println(1);
Float bounspoint=rs33.getFloat("BONUS_POINT");
Float addpoint=rs33.getFloat("ADD_POINT");
Float outpoint=rs33.getFloat("OUT_POINT");
Float nowpoint1=rs33.getFloat("NOW_POINT");
String update="UPDATE FSPTB_POINT_JNL SET TENPO_CODE='"+tenpocode+"',CLIENT_NO='',ADD_POINT_B="+addpoint+",OUT_POINT_B="+outpoint+",NOW_POINT_B="+nowpoint1
+",BONUS_POINT_B="+bounspoint+",OUT_KAIAGE_M_B=0,TUKI_KAIAGE_M_B=0,ADD_POINT_A="+addpoint+",ADD_RIYU_CODE='',OUT_POINT_A="+nowpoint2+",OUT_RIYU_CODE='04',NOW_POINT_A=0,BONUS_POINT_A="+
bounspoint+",OUT_KAIAGE_M_A=0,ADD_KAIAGE_M_A=0,TUKI_KAIAGE_M_A=0,KURIKOSHI_POINT=0,TODAY_POINT=0,UPD_YMDHMS='"+Dateformat+"' WHERE MEMBER_CODE='"+member+"'";
stmt.executeUpdate(update);
rs11.close();rs22.close();rs33.close();
con1.close();
con2.close();
con3.close();
return 1;
}
else
{
//System.out.println(2);
String add="INSERT INTO FSPTB_POINT_JNL (TENPO_CODE,MEMBER_CODE,ADD_POINT_B,OUT_POINT_B,NOW_POINT_B,BONUS_POINT_B,OUT_KAIAGE_M_B,ADD_KAIAGE_M_B,TUKI_KAIAGE_M_B,ADD_POINT_A,OUT_POINT_A,OUT_RIYU_CODE,NOW_POINT_A,BONUS_POINT_A"+
",OUT
没有合适的资源?快使用搜索试试~ 我知道了~
JAVA某店POS积分管理系统(源代码).zip
共84个文件
svn-base:31个
class:14个
java:14个
0 下载量 137 浏览量
2023-04-24
19:32:18
上传
评论
收藏 71KB ZIP 举报
温馨提示
JAVA某店POS积分管理系统(源代码).zipJAVA某店POS积分管理系统(源代码).zipJAVA某店POS积分管理系统(源代码).zipJAVA某店POS积分管理系统(源代码).zipJAVA某店POS积分管理系统(源代码).zipJAVA某店POS积分管理系统(源代码).zipJAVA某店POS积分管理系统(源代码).zipJAVA某店POS积分管理系统(源代码).zipJAVA某店POS积分管理系统(源代码).zipJAVA某店POS积分管理系统(源代码).zipJAVA某店POS积分管理系统(源代码).zipJAVA某店POS积分管理系统(源代码).zipJAVA某店POS积分管理系统(源代码).zipJAVA某店POS积分管理系统(源代码).zipJAVA某店POS积分管理系统(源代码).zipJAVA某店POS积分管理系统(源代码).zipJAVA某店POS积分管理系统(源代码).zipJAVA某店POS积分管理系统(源代码).zipJAVA某店POS积分管理系统(源代码).zipJAVA某店POS积分管理系统(源代码).zipJAVA某店POS积分管理系统(源代码)
资源推荐
资源详情
资源评论
收起资源包目录
JAVA某店POS积分管理系统(源代码).zip (84个子文件)
FSPB1310
Str.class 3KB
.classpath 226B
Db.class 1KB
Databunseki.java 4KB
FSP.INI 2KB
Db.java 913B
Iniread.java 5KB
Iniread.class 3KB
Startlogoutput.java 461B
FSPB1310.class 1KB
.svn
prop-base
text-base
.project.svn-base 384B
FSPB1310.java.svn-base 751B
Iniread.java.svn-base 5KB
FSP.INI.svn-base 2KB
Startlogoutput.java.svn-base 461B
.classpath.svn-base 226B
Str.java.svn-base 3KB
Db.java.svn-base 913B
Databunseki.java.svn-base 4KB
props
tmp
prop-base
text-base
props
format 2B
entries 1KB
all-wcprops 948B
Str.java 3KB
.project 384B
Startlogoutput.class 907B
Databunseki.class 4KB
log
Version_Number 4B
Logfile.1 8B
.svn
prop-base
Logfile.1.svn-base 53B
Snapshot.1.svn-base 53B
Version_Number.svn-base 53B
text-base
Logfile.1.svn-base 8B
Snapshot.1.svn-base 229B
Version_Number.svn-base 4B
props
tmp
prop-base
text-base
props
format 2B
entries 581B
all-wcprops 380B
Snapshot.1 229B
FSPB1310.java 751B
FSPB1400
FSP1.INI 2KB
startlog_output.class 1KB
.classpath 567B
startlog_output.java 600B
Db.class 1KB
FSP.INI 2KB
iniread.class 3KB
Db.java 913B
Endlogoutput.class 882B
Endlogoutput.java 442B
Datecheck.java 2KB
FSPB1400.class 2KB
Startlogoutput.java 599B
Expiration.java 13KB
FSPB1400.java 1KB
.svn
prop-base
text-base
.project.svn-base 384B
Iniread.java.svn-base 5KB
Expiration.java.svn-base 13KB
FSP.INI.svn-base 2KB
FSPB1400.java.svn-base 1KB
Datecheck.java.svn-base 2KB
Endlogoutput.java.svn-base 442B
Startlogoutput.java.svn-base 599B
.classpath.svn-base 567B
Db.java.svn-base 913B
props
tmp
prop-base
text-base
props
format 2B
entries 1KB
all-wcprops 1KB
Datecheck.class 2KB
iniread.java 5KB
.project 384B
Startlogoutput.class 1KB
Expiration.class 11KB
log
Version_Number 4B
Logfile.1 8B
.svn
prop-base
Logfile.1.svn-base 53B
Snapshot.1.svn-base 53B
Version_Number.svn-base 53B
text-base
Logfile.1.svn-base 8B
Snapshot.1.svn-base 229B
Version_Number.svn-base 4B
props
tmp
prop-base
text-base
props
format 2B
entries 581B
all-wcprops 380B
Snapshot.1 229B
共 84 条
- 1
资源评论
一杯烟火
- 粉丝: 3110
- 资源: 1308
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 英语的核心素养.doc
- 幼儿.园家长开放日活动方案.doc
- MATLAB仿真16QAM载波调制信号在AWGN信道下的误码率 形式:程序 程序实现功能:仿真16QAM载波调制信号在AWGN信道下的误码率和误比特率性能,并与理论值相比较 运行版本2014
- 自学考试计算机系统结构问答题汇总.doc
- 幼儿园防止小学化自查报告.doc
- 中级财务管理试题和答案.doc
- 专科《组织行为学》形成性考核册答案.doc
- 剑桥少儿英语考级要求.doc
- 剑桥少儿英语考级要求内容.doc
- 教师职称竞聘述职述廉报告.doc
- 竞选学生会申请书(精选多篇).doc
- 教科版科学四年级(上册)教学案物质在水中是若何溶解的.doc
- 临床医学专业临床肿瘤学课程试题资料讲解.doc
- 练习册翻译答案新编英语教程5第三版.doc
- 跨境电商初级人才考试试题.doc
- 罗宾斯管理学案例分析题答案详细讲解.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功