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