|
@@ -770,38 +770,21 @@ public class PmItemDaoImpl extends BaseDaoImpl<t_pm_item> implements PmItemDao {
|
770
|
770
|
+ " LEFT JOIN t_pm_item t1 on t.table_id=t1.kid "
|
771
|
771
|
+ " where t.status_pay=? and t.business_type=? ";
|
772
|
772
|
NeParamList params = NeParamList.makeParams();
|
773
|
|
- String created1 = srh.getString("created1");
|
774
|
|
- String created2 = srh.getString("created2");
|
775
|
|
- long creat1 = 0;
|
776
|
|
- long creat2 = 0;
|
777
|
|
- try {
|
778
|
|
- if (StringUtils.isNotBlank(created1)){
|
779
|
|
- creat1 = DateTools.getstrDate3(created1);
|
780
|
|
- }
|
781
|
|
- if (StringUtils.isNotBlank(created2)){
|
782
|
|
- creat2 = DateTools.getstrDate3(created2);
|
783
|
|
- }
|
784
|
|
- } catch (ParseException e) {
|
785
|
|
- e.printStackTrace();
|
786
|
|
- }
|
787
|
773
|
params.add(srh.getString("status_pay"));
|
788
|
774
|
params.add(srh.getString("business_type"));
|
789
|
|
- if (creat1>0 && creat2>0){
|
790
|
|
- sql+=" and (t.created>=? and t.created<=?) ";
|
791
|
|
- params.add(creat1);
|
792
|
|
- params.add(creat2);
|
793
|
|
- }else if (creat1>0){
|
794
|
|
- sql+=" and t.created>=? ";
|
795
|
|
- params.add(creat1);
|
796
|
|
- }else if (creat2>0){
|
797
|
|
- sql+=" and t.created<=? ";
|
798
|
|
- params.add(creat2);
|
|
775
|
+ if (StringUtils.isNotBlank(srh.getString("item_name"))){
|
|
776
|
+ sql +=" and t1.item_name like '%"+srh.getString("item_name")+"%'";
|
|
777
|
+ }
|
|
778
|
+ if (StringUtils.isNotBlank(srh.getString("created"))){
|
|
779
|
+ sql +=" and t1.created like '%"+srh.getString("created").replace("-","")+"%'";
|
799
|
780
|
}
|
|
781
|
+ sql+=" ORDER BY t.created desc ";
|
800
|
782
|
List<Map<String, Object>> list = bs.findList(sql, params, sort_param, page);
|
801
|
783
|
pagePackage.setData(list);
|
802
|
784
|
return pagePackage;
|
803
|
785
|
}
|
804
|
786
|
|
|
787
|
+
|
805
|
788
|
@Override
|
806
|
789
|
public void auto_start() {
|
807
|
790
|
long time_opening = System.currentTimeMillis();
|
|
@@ -979,7 +962,7 @@ public class PmItemDaoImpl extends BaseDaoImpl<t_pm_item> implements PmItemDao {
|
979
|
962
|
|
980
|
963
|
JSONObject srh = pagePackage.getSrh();
|
981
|
964
|
String sql = "SELECT t1.item_name,t.* FROM t_pay_no t LEFT JOIN t_pm_item t1 on t.table_id=t1.kid where (t1.item_name like '%"
|
982
|
|
- + srh.getString("item_name") + "%') group by t.table_id,t.user_id,t.status_pay ";
|
|
965
|
+ + srh.getString("item_name") + "%') group by t.table_id,t.user_id,t.status_pay ORDER BY t.created desc ";
|
983
|
966
|
List<Map<String, Object>> list = jt.queryForList(sql);
|
984
|
967
|
List<String> l = new LinkedList<String>();
|
985
|
968
|
for (int i = 0; i < list.size(); i++) {
|
|
@@ -1008,15 +991,6 @@ public class PmItemDaoImpl extends BaseDaoImpl<t_pm_item> implements PmItemDao {
|
1008
|
991
|
return list;
|
1009
|
992
|
}
|
1010
|
993
|
|
1011
|
|
- public static void main(String[] args) {
|
1012
|
|
- List<String> list = new ArrayList<String>();
|
1013
|
|
- list.add("1");
|
1014
|
|
- list.add("2");
|
1015
|
|
- list.add("3");
|
1016
|
|
- list.add("4");
|
1017
|
|
- list.remove(0);
|
1018
|
|
- }
|
1019
|
|
-
|
1020
|
994
|
@Override
|
1021
|
995
|
public void set_price(@RequestBody t_pm_item pm_item) {
|
1022
|
996
|
BigDecimal price_start = pm_item.getPrice_start();
|