|
|
@@ -22,36 +22,38 @@ import java.util.Map;
|
|
22
|
22
|
@Repository
|
|
23
|
23
|
public interface TableDataMapper extends MyMapper<Map> {
|
|
24
|
24
|
|
|
25
|
|
- @Select({"<script> SELECT * FROM ( "
|
|
26
|
|
- + "SELECT t.*,rownum num FROM ${tableName} t where is_upload = 0 "
|
|
27
|
|
- + "and rownum <= #{pageSize}",
|
|
|
25
|
+ @Select({"<script>"
|
|
|
26
|
+ + "SELECT t.* FROM ${tableName} t where is_upload = 0 ",
|
|
28
|
27
|
"<if test = 'startTime != null'>",
|
|
29
|
|
- "and to_date(zhgxsj,'yyyy-MM-dd HH24:MI:SS') >= to_date(#{startTime},'yyyy-MM-dd HH24:MI:SS')",
|
|
|
28
|
+ /*"and str_to_date(zhgxsj,'yyyy-MM-dd HH24:MI:SS') >= str_to_date(#{startTime},'yyyy-MM-dd HH24:MI:SS')",*/
|
|
|
29
|
+ "and (zhgxsj) >= (#{startTime})",
|
|
30
|
30
|
"</if>",
|
|
31
|
31
|
"<if test = 'endTime != null'>",
|
|
32
|
|
- "and to_date(zhgxsj,'yyyy-MM-dd HH24:MI:SS') <= to_date(#{endTime},'yyyy-MM-dd HH24:MI:SS')",
|
|
|
32
|
+ /*"and str_to_date(zhgxsj,'yyyy-MM-dd HH24:MI:SS') <= str_to_date(#{endTime},'yyyy-MM-dd HH24:MI:SS')",*/
|
|
|
33
|
+ "and (zhgxsj) <= (#{endTime})",
|
|
33
|
34
|
"</if>",
|
|
34
|
35
|
"<if test = 'depDwdm != null'>",
|
|
35
|
36
|
"and ${selectByDwdmOfCol} like #{depDwdm}",
|
|
36
|
37
|
"</if>",
|
|
37
|
|
- ") where num > #{pageIndex}",
|
|
|
38
|
+ "limit #{pageIndex},#{pageSize}",
|
|
38
|
39
|
"</script>"})
|
|
39
|
40
|
List<Map> findAllByLoadDate(Map params);
|
|
40
|
41
|
|
|
41
|
42
|
@Select({"<script> SELECT * FROM ( "
|
|
42
|
43
|
+ "SELECT t.*,rownum num FROM ${tableName} t where is_upload = 0 and id = #{busId}"
|
|
43
|
|
- + " and rownum <= #{pageSize} ",
|
|
44
|
|
- " ) where num > #{pageIndex} ",
|
|
|
44
|
+ +" ) a limit #{pageIndex},#{pageSize}",
|
|
45
|
45
|
"</script>"})
|
|
46
|
46
|
List<Map> findById(@Param("tableName") String tableName, @Param("busId") String busId,
|
|
47
|
47
|
@Param("pageSize") Integer pageSize, @Param("pageIndex") Integer pageIndex);
|
|
48
|
48
|
|
|
49
|
49
|
@Select({"<script> SELECT count(*) FROM ${tableName} where is_upload = 0 ",
|
|
50
|
50
|
"<if test = 'startTime != null'>",
|
|
51
|
|
- "and to_date(zhgxsj,'yyyy-MM-dd HH24:MI:SS') >= to_date(#{startTime},'yyyy-MM-dd HH24:MI:SS')",
|
|
|
51
|
+ /*"and str_to_date(zhgxsj,'yyyy-MM-dd HH24:MI:SS') >= str_to_date(#{startTime},'yyyy-MM-dd HH24:MI:SS')",*/
|
|
|
52
|
+ "and (zhgxsj) >= (#{startTime})",
|
|
52
|
53
|
"</if>",
|
|
53
|
54
|
"<if test = 'endTime != null'>",
|
|
54
|
|
- "and to_date(zhgxsj,'yyyy-MM-dd HH24:MI:SS') <= to_date(#{endTime},'yyyy-MM-dd HH24:MI:SS')",
|
|
|
55
|
+ /*"and str_to_date(zhgxsj,'yyyy-MM-dd HH24:MI:SS') <= str_to_date(#{endTime},'yyyy-MM-dd HH24:MI:SS')",*/
|
|
|
56
|
+ "and (zhgxsj) <= (#{endTime})",
|
|
55
|
57
|
"</if>",
|
|
56
|
58
|
"<if test = 'depDwdm != null'>",
|
|
57
|
59
|
"and ${selectByDwdmOfCol} like #{depDwdm} ",
|
|
|
@@ -85,19 +87,20 @@ public interface TableDataMapper extends MyMapper<Map> {
|
|
85
|
87
|
*/
|
|
86
|
88
|
@Select({"<script> SELECT * FROM ( "
|
|
87
|
89
|
+ "SELECT t.WSDJCDH,t.JCSJ,t.HWDM,t.CFWW,t.CFWS,t.CFNW,t.CFNS,t.LSZGW,t.LSZDW,t.LSPJW,REPLACE(t.LSSDZJH,CHR(0),'') as LSSDZJH,t.CZBZ,t.ZHGXSJ,"
|
|
88
|
|
- + "t.id,t.IS_UPLOAD,t.LOAD_DATE,t.DEP_DWDM,t.DEP_KQDM,t.TYHWBM,REPLACE(t.LSWDZJH,CHR(0),'') as LSWDZJH,"
|
|
89
|
|
- +"rownum num FROM ${tableName} t where is_upload = 0 "
|
|
90
|
|
- + "and rownum <= #{pageSize}",
|
|
|
90
|
+ + "t.id,t.IS_UPLOAD,t.LOAD_DATE,t.DEP_DWDM,t.DEP_KQDM,t.TYHWBM,REPLACE(t.LSWDZJH,CHR(0),'') as LSWDZJH"
|
|
|
91
|
+ +"FROM ${tableName} t where is_upload = 0 ",
|
|
91
|
92
|
"<if test = 'startTime != null'>",
|
|
92
|
|
- "and to_date(zhgxsj,'yyyy-MM-dd HH24:MI:SS') >= to_date(#{startTime},'yyyy-MM-dd HH24:MI:SS')",
|
|
|
93
|
+ /*"and str_to_date(zhgxsj,'yyyy-MM-dd HH24:MI:SS') >= str_to_date(#{startTime},'yyyy-MM-dd HH24:MI:SS')",*/
|
|
|
94
|
+ "and (zhgxsj) >= (#{startTime})",
|
|
93
|
95
|
"</if>",
|
|
94
|
96
|
"<if test = 'endTime != null'>",
|
|
95
|
|
- "and to_date(zhgxsj,'yyyy-MM-dd HH24:MI:SS') <= to_date(#{endTime},'yyyy-MM-dd HH24:MI:SS')",
|
|
|
97
|
+ /*"and str_to_date(zhgxsj,'yyyy-MM-dd HH24:MI:SS') <= str_to_date(#{endTime},'yyyy-MM-dd HH24:MI:SS')",*/
|
|
|
98
|
+ "and (zhgxsj) <= (#{endTime})",
|
|
96
|
99
|
"</if>",
|
|
97
|
100
|
"<if test = 'depDwdm != null'>",
|
|
98
|
101
|
"and ${selectByDwdmOfCol} like #{depDwdm}",
|
|
99
|
102
|
"</if>",
|
|
100
|
|
- ") where num > #{pageIndex}",
|
|
|
103
|
+ ") a limit #{pageIndex},#{pageSize}",
|
|
101
|
104
|
"</script>"})
|
|
102
|
105
|
List<Map> findAllByLoadDateLOB(Map params);
|
|
103
|
106
|
|
|
|
@@ -105,10 +108,9 @@ public interface TableDataMapper extends MyMapper<Map> {
|
|
105
|
108
|
|
|
106
|
109
|
@Select({"<script> SELECT * FROM ( "
|
|
107
|
110
|
+ "SELECT t.WSDJCDH,t.JCSJ,t.HWDM,t.CFWW,t.CFWS,t.CFNW,t.CFNS,t.LSZGW,t.LSZDW,t.LSPJW,REPLACE(t.LSSDZJH,CHR(0),'') as LSSDZJH,t.CZBZ,t.ZHGXSJ,"
|
|
108
|
|
- + "t.id,t.IS_UPLOAD,t.LOAD_DATE,t.DEP_DWDM,t.DEP_KQDM,t.TYHWBM,REPLACE(t.LSWDZJH,CHR(0),'') as LSWDZJH,"
|
|
109
|
|
- + "rownum num FROM ${tableName} t where is_upload = 0 and id = #{busId}"
|
|
110
|
|
- + " and rownum <= #{pageSize} ",
|
|
111
|
|
- " ) where num > #{pageIndex} ",
|
|
|
111
|
+ + "t.id,t.IS_UPLOAD,t.LOAD_DATE,t.DEP_DWDM,t.DEP_KQDM,t.TYHWBM,REPLACE(t.LSWDZJH,CHR(0),'') as LSWDZJH"
|
|
|
112
|
+ + "FROM ${tableName} t where is_upload = 0 and id = #{busId}",
|
|
|
113
|
+ " ) a limit #{pageIndex},#{pageSize}",
|
|
112
|
114
|
"</script>"})
|
|
113
|
115
|
List<Map> findByIdLOB(@Param("tableName") String tableName, @Param("busId") String busId,
|
|
114
|
116
|
@Param("pageSize") Integer pageSize, @Param("pageIndex") Integer pageIndex);
|
|
|
@@ -119,10 +121,9 @@ public interface TableDataMapper extends MyMapper<Map> {
|
|
119
|
121
|
+ "SELECT QTNDJCDH,JCSJ,HWDM,CZBZ,ZHGXSJ,id,IS_UPLOAD,LOAD_DATE,DEP_DWDM,DEP_KQDM,ZYLX,TYHWBM,"
|
|
120
|
122
|
+"REPLACE(t.YQHLZJH,CHR(0),'') as YQHLZJH,REPLACE(t.EYHTHLZJH,CHR(0),'') as EYHTHLZJH,"
|
|
121
|
123
|
+"REPLACE(t.LXFNDZJH,CHR(0),'') as LXFNDZJH,REPLACE(t.LHQNDZJH,CHR(0),'') as LHQNDZJH,"
|
|
122
|
|
- +"REPLACE(t.YYHDHLZJH,CHR(0),'') as YYHDHLZJH,REPLACE(t.YYHTHLZJH,CHR(0),'') as YYHTHLZJH,"
|
|
123
|
|
- + "rownum num FROM ${tableName} t where is_upload = 0 and id = #{busId}"
|
|
124
|
|
- + " and rownum <= #{pageSize} ",
|
|
125
|
|
- " ) where num > #{pageIndex} ",
|
|
|
124
|
+ +"REPLACE(t.YYHDHLZJH,CHR(0),'') as YYHDHLZJH,REPLACE(t.YYHTHLZJH,CHR(0),'') as YYHTHLZJH"
|
|
|
125
|
+ + "FROM ${tableName} t where is_upload = 0 and id = #{busId}",
|
|
|
126
|
+ " )a limit #{pageIndex},#{pageSize}",
|
|
126
|
127
|
"</script>"})
|
|
127
|
128
|
List<Map> findByIdQt(@Param("tableName") String tableName, @Param("busId") String busId,
|
|
128
|
129
|
@Param("pageSize") Integer pageSize, @Param("pageIndex") Integer pageIndex);
|
|
|
@@ -132,19 +133,20 @@ public interface TableDataMapper extends MyMapper<Map> {
|
|
132
|
133
|
+ "SELECT QTNDJCDH,JCSJ,HWDM,CZBZ,ZHGXSJ,id,IS_UPLOAD,LOAD_DATE,DEP_DWDM,DEP_KQDM,ZYLX,TYHWBM,"
|
|
133
|
134
|
+"REPLACE(t.YQHLZJH,CHR(0),'') as YQHLZJH,REPLACE(t.EYHTHLZJH,CHR(0),'') as EYHTHLZJH,"
|
|
134
|
135
|
+"REPLACE(t.LXFNDZJH,CHR(0),'') as LXFNDZJH,REPLACE(t.LHQNDZJH,CHR(0),'') as LHQNDZJH,"
|
|
135
|
|
- +"REPLACE(t.YYHDHLZJH,CHR(0),'') as YYHDHLZJH,REPLACE(t.YYHTHLZJH,CHR(0),'') as YYHTHLZJH,"
|
|
136
|
|
- +"rownum num FROM ${tableName} t where is_upload = 0 "
|
|
137
|
|
- + "and rownum <= #{pageSize}",
|
|
|
136
|
+ +"REPLACE(t.YYHDHLZJH,CHR(0),'') as YYHDHLZJH,REPLACE(t.YYHTHLZJH,CHR(0),'') as YYHTHLZJH"
|
|
|
137
|
+ +"FROM ${tableName} t where is_upload = 0 ",
|
|
138
|
138
|
"<if test = 'startTime != null'>",
|
|
139
|
|
- "and to_date(zhgxsj,'yyyy-MM-dd HH24:MI:SS') >= to_date(#{startTime},'yyyy-MM-dd HH24:MI:SS')",
|
|
|
139
|
+ /*"and str_to_date(zhgxsj,'yyyy-MM-dd HH24:MI:SS') >= str_to_date(#{startTime},'yyyy-MM-dd HH24:MI:SS')",*/
|
|
|
140
|
+ "and (zhgxsj) >= (#{startTime})",
|
|
140
|
141
|
"</if>",
|
|
141
|
142
|
"<if test = 'endTime != null'>",
|
|
142
|
|
- "and to_date(zhgxsj,'yyyy-MM-dd HH24:MI:SS') <= to_date(#{endTime},'yyyy-MM-dd HH24:MI:SS')",
|
|
|
143
|
+ /*"and str_to_date(zhgxsj,'yyyy-MM-dd HH24:MI:SS') <= str_to_date(#{endTime},'yyyy-MM-dd HH24:MI:SS')",*/
|
|
|
144
|
+ "and (zhgxsj) <= (#{endTime})",
|
|
143
|
145
|
"</if>",
|
|
144
|
146
|
"<if test = 'depDwdm != null'>",
|
|
145
|
147
|
"and ${selectByDwdmOfCol} like #{depDwdm}",
|
|
146
|
148
|
"</if>",
|
|
147
|
|
- ") where num > #{pageIndex}",
|
|
|
149
|
+ ") a limit #{pageIndex},#{pageSize}",
|
|
148
|
150
|
"</script>"})
|
|
149
|
151
|
List<Map> findAllByLoadDateQt(Map params);
|
|
150
|
152
|
|