"select sum(TOTAL_COUNT) PLASTIC_FILM_TYPE1 from plastic_film where (to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate}) and PLASTIC_FILM_TYPE=1 "+
"select sum(TOTAL_COUNT) PLASTIC_FILM_TYPE1 from plastic_film where (to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate}) and state =1 and PLASTIC_FILM_TYPE=1 "+
"<if test='name != null '>"+
" and name =#{name} "+
"</if>"+
...
...
@@ -44,7 +45,7 @@ public interface MaterialManagementMapper {
"select sum(TOTAL_COUNT) PLASTIC_FILM_TYPE1 from plastic_film where (to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate}) and PLASTIC_FILM_TYPE=2"+
"select sum(TOTAL_COUNT) PLASTIC_FILM_TYPE1 from plastic_film where (to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate}) and state =1 and PLASTIC_FILM_TYPE=2"+
"<if test='name != null '>"+
" and name =#{name} "+
"</if>"+
...
...
@@ -84,7 +85,7 @@ public interface MaterialManagementMapper {
"select sum(TOTAL_COUNT) cardType1 from CARD_BODY where (to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate}) and CARD_TYPE=1"+
"select sum(TOTAL_COUNT) cardType1 from CARD_BODY where (to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate}) and state =1 and CARD_TYPE=1"+
"<if test='name != null '>"+
" and name =#{name} "+
"</if>"+
...
...
@@ -95,7 +96,7 @@ public interface MaterialManagementMapper {
"select sum(TOTAL_COUNT) cardType2 from CARD_BODY where (to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate}) and CARD_TYPE=2"+
"select sum(TOTAL_COUNT) cardType2 from CARD_BODY where (to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate}) and state =1 and CARD_TYPE=2"+
"<if test='name != null '>"+
" and name =#{name} "+
"</if>"+
...
...
@@ -116,4 +117,77 @@ public interface MaterialManagementMapper {
@Update("update PLASTIC_FILM set state =1 where PLASTIC_FILM_ID = #{id}")
publicbooleanupdatePlasticFilmState(longid);
@Select("<script>"+
"select * from (select name,save_date,CARD_BODY_TYPE,sum(count1) count1 ,sum(count2) count2,rownum rn\n"+
"from (select name,CARD_TYPE,CARD_BODY_TYPE,to_Char(SAVE_DATE,'yyyyMMdd') save_date, decode(card_type,2,0,total_count) count1 ,decode(card_type,1,0,total_count) count2 from CARD_BODY where (to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate}) and state =1 "+
"<if test='name != 0 '>"+
" and name =#{name} "+
"</if>"+
"<if test='typeCode != 0 '>"+
" and card_type =#{typeCode} "+
"</if>"+
"<if test='cardBodyType != 0 '>"+
" and card_Body_Type =#{cardBodyType} "+
"</if>"+
") \n"+
" group by name, save_date,CARD_BODY_TYPE,rownum ORDER BY rownum) where rn BETWEEN #{start} and #{end}"+
"select * from (select name,save_date,CARD_BODY_TYPE,sum(count1) count1 ,sum(count2) count2,rownum rn\n"+
"from (select name,CARD_TYPE,CARD_BODY_TYPE,to_Char(SAVE_DATE,'yyyyMMdd') save_date, decode(card_type,2,0,total_count) count1 ,decode(card_type,1,0,total_count) count2 from CARD_BODY where (to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate}) and state =1 "+
"<if test='name != 0 '>"+
" and name =#{name} "+
"</if>"+
"<if test='typeCode != 0 '>"+
" and card_type =#{typeCode} "+
"</if>"+
"<if test='cardBodyType != 0 '>"+
" and card_Body_Type =#{cardBodyType} "+
"</if>"+
") \n"+
" group by name, save_date,CARD_BODY_TYPE,rownum ORDER BY rownum) "+
"select * from (select name,save_date,sum(count1) count1 ,sum(count2) count2,rownum rn\n"+
"from (select name,CARD_TYPE,to_Char(SAVE_DATE,'yyyyMMdd') save_date, decode(card_type,2,0,total_count) count1 ,decode(card_type,1,0,total_count) count2 from PLASTIC_FILM where (to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate}) and state =1 "+
"<if test='name != 0 '>"+
" and name =#{name} "+
"</if>"+
"<if test='typeCode != 0 '>"+
" and card_type =#{typeCode} "+
"</if>"+
") \n"+
" group by name, save_date,rownum ORDER BY rownum) where rn BETWEEN #{start} and #{end}"+
"select * from (select name,save_date,sum(count1) count1 ,sum(count2) count2,rownum rn\n"+
"from (select name,CARD_TYPE,to_Char(SAVE_DATE,'yyyyMMdd') save_date, decode(card_type,2,0,total_count) count1 ,decode(card_type,1,0,total_count) count2 from PLASTIC_FILM where (to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate}) and state =1 "+
"<if test='name != 0 '>"+
" and name =#{name} "+
"</if>"+
"<if test='typeCode != 0 '>"+
" and card_type =#{typeCode} "+
"</if>"+
") \n"+
" group by name, save_date,rownum ORDER BY rownum) where rn BETWEEN #{start} and #{end}"+