[Ext.Net]易飞IQC来料批次分析与MsChart 使用双轴显示
涉及到ERP系统数据分析:三个数据分析表,三个图形展示。前台EXT.NET1.5 +MSCHARTIQC来料情况表:存储过程:[sql]-- =============================================-- Author: <David Gong>-- Create date: <2013-03-08>-- Description: <IQC来料批次情况表>-- =============================================ALTER Proc [dbo].[UF_ZEIQCReport](@year as varchar(4))as begin--IQC检验情况--创建临时表create table #Tmp --创建临时表#Tmp(Item varchar(20),Jan decimal(9,2),Feb decimal(9,2),Mar decimal(9,2),Apr decimal(9,2),May decimal(9,2),Jun decimal(9,2),Jul decimal(9,2),Aug decimal(9,2),Sep decimal(9,2),Oct decimal(9,2),Nov decimal(9,2),[Dec] decimal(9,2))declare @Rate as decimal(10,2)select @Rate=Goal from OA.dbo.IQCGoal where Company='ZE' AND [Year]=@yearInsert into #Tmp(Item,Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec) select * from(SELECT '检验批数' AS Item,sum(case when substring(TA004,5,2)='01' then 1 else 0 end) as Jan,sum(case when substring(TA004,5,2)='02' then 1 else 0 end) as Feb,sum(case when substring(TA004,5,2)='03' then 1 else 0 end) as Mar,sum(case when substring(TA004,5,2)='04' then 1 else 0 end) as Apr,sum(case when substring(TA004,5,2)='05' then 1 else 0 end) as May,sum(case when substring(TA004,5,2)='06' then 1 else 0 end) as Jun,sum(case when substring(TA004,5,2)='07' then 1 else 0 end) as Jul,sum(case when substring(TA004,5,2)='08' then 1 else 0 end) as Aug,sum(case when substring(TA004,5,2)='09' then 1 else 0 end) as Sep,sum(case when substring(TA004,5,2)='10' then 1 else 0 end) as Oct,sum(case when substring(TA004,5,2)='11' then 1 else 0 end) as Nov,sum(case when substring(TA004,5,2)='12' then 1 else 0 end) as DecFROM QMSTAwhere left(TA004,4)=@yearUNION ALLSELECT '合格批数' AS Item,sum(case when substring(TA004,5,2)='01' then 1 else 0 end) as Jan,sum(case when substring(TA004,5,2)='02' then 1 else 0 end) as Feb,sum(case when substring(TA004,5,2)='03' then 1 else 0 end) as Mar,sum(case when substring(TA004,5,2)='04' then 1 else 0 end) as Apr,sum(case when substring(TA004,5,2)='05' then 1 else 0 end) as May,sum(case when substring(TA004,5,2)='06' then 1 else 0 end) as Jun,sum(case when substring(TA004,5,2)='07' then 1 else 0 end) as Jul,sum(case when substring(TA004,5,2)='08' then 1 else 0 end) as Aug,sum(case when substring(TA004,5,2)='09' then 1 else 0 end) as Sep,sum(case when substring(TA004,5,2)='10' then 1 else 0 end) as Oct,sum(case when substring(TA004,5,2)='11' then 1 else 0 end) as Nov,sum(case when substring(TA004,5,2)='12' then 1 else 0 end) as DecFROM QMSTAwhere left(TA004,4)=@year AND TA011='2'UNION ALLSELECT '不合格批数' AS Item,sum(case when substring(TA004,5,2)='01' then 1 else 0 end) as Jan,sum(case when substring(TA004,5,2)='02' then 1 else 0 end) as Feb,sum(case when substring(TA004,5,2)='03' then 1 else 0 end) as Mar,sum(case when substring(TA004,5,2)='04' then 1 else 0 end) as Apr,sum(case when substring(TA004,5,2)='05' then 1 else 0 end) as May,sum(case when substring(TA004,5,2)='06' then 1 else 0 end) as Jun,sum(case when substring(TA004,5,2)='07' then 1 else 0 end) as Jul,sum(case when substring(TA004,5,2)='08' then 1 else 0 end) as Aug,sum(case when substring(TA004,5,2)='09' then 1 else 0 end) as Sep,sum(case when substring(TA004,5,2)='10' then 1 else 0 end) as Oct,sum(case when substring(TA004,5,2)='11' then 1 else 0 end) as Nov,sum(case when substring(TA004,5,2)='12' then 1 else 0 end) as DecFROM QMSTAwhere left(TA004,4)=@year AND TA011 in ('3','4')UNION ALLSELECT '退货' AS Item,sum(case when substring(TA004,5,2)='01' then 1 else 0 end) as Jan,sum(case when substring(TA004,5,2)='02' then 1 else 0 end) as Feb,sum(case when substring(TA004,5,2)='03' then 1 else 0 end) as Mar,sum(case when substring(TA004,5,2)='04' then 1 else 0 end) as Apr,sum(case when substring(TA004,5,2)='05' then 1 else 0 end) as May,sum(case when substring(TA004,5,2)='06' then 1 else 0 end) as Jun,sum(case when substring(TA004,5,2)='07' then 1 else 0 end) as Jul,sum(case when substring(TA004,5,2)='08' then 1 else 0 end) as Aug,sum(case when substring(TA004,5,2)='09' then 1 else 0 end) as Sep,sum(case when substring(TA004,5,2)='10' then 1 else 0 end) as Oct,sum(case when substring(TA004,5,2)='11' then 1 else 0 end) as Nov,sum(case when substring(TA004,5,2)='12' then 1 else 0 end) as DecFROM QMSTAwhere left(TA004,4)=@year AND TA011='3'UNION ALLSELECT '特采' AS Item,sum(case when substring(TA004,5,2)='01' then 1 else 0 end) as Jan,sum(case when substring(TA004,5,2)='02' then 1 else 0 end) as Feb,sum(case when substring(TA004,5,2)='03' then 1 else 0 end) as Mar,sum(case when substring(TA004,5,2)='04' then 1 else 0 end) as Apr,sum(case when substring(TA004,5,2)='05' then 1 else 0 end) as May,sum(case when substring(TA004,5,2)='06' then 1 else 0 end) as Jun,sum(case when substring(TA004,5,2)='07' then 1 else 0 end) as Jul,sum(case when substring(TA004,5,2)='08' then 1 else 0 end) as Aug,sum(case when subst补充:Web开发 , ASP.Net ,
上一个:ASP.NET 上传文件
下一个:.NET操作XML文件---[读取]
- 更多asp疑问解答:
- asp正则过滤重复字符串的代码
- 用asp过滤全部html但保留br类似的符号
- 会asp,但感觉asp要过点,想学php。但我一般做的都是小公司的站,用access数
- PHP的空间可以用ASP的源代码吗?
- 以前做asp程序,现在应该怎样发展?是学.net还是php
- 以前做asp程序,现在应该怎样发展?是学.net还是php
- 想做一个市级的人才网acess,sql数据库,语言asp,jsp,php分别用哪种好
- jsp,asp,php 区别
- 我想找一个有比较多漏洞的网站的源码,比如可以asp,php注入等都可以。供学习研究用。请提供下载地址。。
- 现在候找人做个网站,用ASP,还是PHP语言去做好
- asp,php ,jsp,.net 对于做网站前台的重要吗?
- asp和php的区别是什么?
- 我是新手SEO菜鸟 请问wp dw php asp cms myspl dede 这些软件应该如何区分呀?
- 网页制作相关的三种语言:ASP JSP PHP那个好点,简单点?
- 网页制作相关的三种语言:ASP JSP PHP那个好点,简单点?