活动客户端代码提交
This commit is contained in:
parent
c587ad5532
commit
2a2ec2f9b3
@ -186,8 +186,8 @@ public class BaseDao {
|
|||||||
int total=0;
|
int total=0;
|
||||||
Connection connection=getConnection(ip,username,password,portNumber,dataBaseName);
|
Connection connection=getConnection(ip,username,password,portNumber,dataBaseName);
|
||||||
try {
|
try {
|
||||||
String sql="select count(1) from t_pub_plan_detail_b d left join t_pub_plan_master t on " +
|
String sql="select count(1) from t_pub_plan_detail_b d left join t_pub_plan_master m on " +
|
||||||
" d.plan_no =t.plan_no %s";
|
" d.plan_no =m.plan_no %s";
|
||||||
sql=String.format(sql,where);
|
sql=String.format(sql,where);
|
||||||
log.info(sql);
|
log.info(sql);
|
||||||
PreparedStatement ps= connection.prepareStatement(sql);
|
PreparedStatement ps= connection.prepareStatement(sql);
|
||||||
@ -266,7 +266,7 @@ public class BaseDao {
|
|||||||
return total;
|
return total;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getBaseGoodsJoinTotal(String ip, String username, String password,Integer portNumber, String dataBaseName,String where,String stockOperateWhere){
|
public Integer getBaseGoodsJoinTotal(String ip, String username, String password,Integer portNumber, String dataBaseName,String where){
|
||||||
int total=0;
|
int total=0;
|
||||||
Connection connection=getConnection(ip,username,password,portNumber,dataBaseName);
|
Connection connection=getConnection(ip,username,password,portNumber,dataBaseName);
|
||||||
try {
|
try {
|
||||||
@ -278,18 +278,19 @@ public class BaseDao {
|
|||||||
" ROW_NUMBER() OVER(PARTITION BY tib.item_no ORDER BY tib.oper_date DESC) AS rn " +
|
" ROW_NUMBER() OVER(PARTITION BY tib.item_no ORDER BY tib.oper_date DESC) AS rn " +
|
||||||
" FROM t_im_branch_stock tib\n" +
|
" FROM t_im_branch_stock tib\n" +
|
||||||
") " +
|
") " +
|
||||||
"SELECT count(1) " +
|
"SELECT " +
|
||||||
// " b.*, " +
|
" b.*, " +
|
||||||
// " ls.stock_qty, " +
|
" ls.stock_qty, " +
|
||||||
// " ls.oper_date " +
|
" ls.oper_date " +
|
||||||
"FROM ( " +
|
"FROM ( " +
|
||||||
" SELECT " +
|
" SELECT " +
|
||||||
" ROW_NUMBER() OVER(ORDER BY item_clsno) AS rowId, " +
|
" ROW_NUMBER() OVER(ORDER BY item_clsno) AS rowId, " +
|
||||||
" * " +
|
" * " +
|
||||||
" FROM t_bd_item_info shop %s" +
|
" FROM t_bd_item_info " +
|
||||||
") b " +
|
") b " +
|
||||||
"LEFT JOIN LatestStock ls ON b.item_no = ls.item_no AND ls.rn = 1 %s";
|
"LEFT JOIN LatestStock ls ON b.item_no = ls.item_no AND ls.rn = 1 " +
|
||||||
sql=String.format(sql,where,stockOperateWhere);
|
" %s";
|
||||||
|
sql=String.format(sql,where);
|
||||||
log.info(sql);
|
log.info(sql);
|
||||||
PreparedStatement ps= connection.prepareStatement(sql);
|
PreparedStatement ps= connection.prepareStatement(sql);
|
||||||
ResultSet rs=ps.executeQuery();
|
ResultSet rs=ps.executeQuery();
|
||||||
@ -343,8 +344,7 @@ public class BaseDao {
|
|||||||
return resultDto;
|
return resultDto;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ResultDto baseFindGoodsListJoinPage(String ip, String username, String password,Integer portNumber, String dataBaseName, int pageNo, int pageSize,
|
public ResultDto baseFindGoodsListJoinPage(String ip, String username, String password,Integer portNumber, String dataBaseName, int pageNo, int pageSize,String where){
|
||||||
String where,String stockOperateWhere){
|
|
||||||
Connection connection=getConnection(ip,username,password,portNumber,dataBaseName);
|
Connection connection=getConnection(ip,username,password,portNumber,dataBaseName);
|
||||||
int start=(pageNo-1)*pageSize+1;
|
int start=(pageNo-1)*pageSize+1;
|
||||||
int end=pageNo*pageSize;
|
int end=pageNo*pageSize;
|
||||||
@ -357,7 +357,6 @@ public class BaseDao {
|
|||||||
" FROM t_im_branch_stock tib " +
|
" FROM t_im_branch_stock tib " +
|
||||||
") " +
|
") " +
|
||||||
"SELECT " +
|
"SELECT " +
|
||||||
"ROW_NUMBER() OVER (ORDER BY b.rowId) AS rowId, "+//-- 这里重新生成从1开始连续的行号
|
|
||||||
" b.*, " +
|
" b.*, " +
|
||||||
" ls.stock_qty, " +
|
" ls.stock_qty, " +
|
||||||
" ls.oper_date " +
|
" ls.oper_date " +
|
||||||
@ -365,11 +364,11 @@ public class BaseDao {
|
|||||||
" SELECT " +
|
" SELECT " +
|
||||||
" ROW_NUMBER() OVER(ORDER BY item_clsno) AS rowId ," +
|
" ROW_NUMBER() OVER(ORDER BY item_clsno) AS rowId ," +
|
||||||
" * " +
|
" * " +
|
||||||
" FROM t_bd_item_info shop %s" +
|
" FROM t_bd_item_info\n" +
|
||||||
") b " +
|
") b " +
|
||||||
"LEFT JOIN LatestStock ls ON b.item_no = ls.item_no AND ls.rn = 1 " +
|
"LEFT JOIN LatestStock ls ON b.item_no = ls.item_no AND ls.rn = 1 " +
|
||||||
" where b.rowId BETWEEN %s AND %s %s";
|
" %s b.rowId BETWEEN %s AND %s ";
|
||||||
sql=String.format(sql,where,start,end,stockOperateWhere);
|
sql=String.format(sql,where,start,end);
|
||||||
log.info(sql);
|
log.info(sql);
|
||||||
ResultDto resultDto=new ResultDto();
|
ResultDto resultDto=new ResultDto();
|
||||||
ResultSet rs=null;
|
ResultSet rs=null;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user