リビジョン 194
請求まとめ(工事詳細台帳での初期表示)
※登録処理で行番号の振り直しが必要なため、暫定コミット。
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSummaryList/FrmRequestSummaryList.cs | ||
---|---|---|
676 | 676 |
|
677 | 677 |
// SQL?? |
678 | 678 |
sql = new StringBuilder(); |
679 |
sql.AppendLine("select "); |
|
680 |
sql.AppendLine(" Bd.SEQNO, "); |
|
681 |
sql.AppendLine(" Bdd.LINECOUNT, "); |
|
682 |
sql.AppendLine(" Bdd.COMPANYCODE, "); |
|
683 |
sql.AppendLine(" Scm.COMPANYNAME, "); |
|
684 |
sql.AppendLine(" Scm.DisplayOrder, "); |
|
685 |
sql.AppendLine(" Bdd.CONSTRUCTIONCODE, "); |
|
686 |
sql.AppendLine(" Bdd.FIELDNAME, "); |
|
687 |
sql.AppendLine(" Bdd.BILLPRICE, "); |
|
688 |
sql.AppendLine(" Bdd.HIGHWPRICE, "); |
|
689 |
sql.AppendLine(" Bdd.HARDWPRICE, "); |
|
690 |
sql.AppendLine(" Bdd.INDSWASTETAX, "); |
|
691 |
sql.AppendLine(" DATE_FORMAT(Bdd.UpdateDate, '%Y/%m/%d %H:%i:%s') as UpdateDate, "); |
|
692 |
sql.AppendLine(" ifnull(Bdd.Note,'') as Bikou, "); |
|
693 |
sql.AppendLine("ifnull(Pdd.BILLPRICE,0) as KojiSeikyu, "); |
|
694 |
sql.AppendLine("ifnull(Pdd.DiscountPrice,0) as KojiNebiki, "); |
|
695 |
sql.AppendLine("ifnull(Pdd.OffsetPrice,0) as KojiSousai, "); |
|
696 |
sql.AppendLine("ifnull(Pdd.NextCoPrice,0) as JikaiKurikosi, "); |
|
697 |
sql.AppendLine("ifnull(Pdd.HIGHWPRICE,0) as KojiKousoku, "); |
|
698 |
sql.AppendLine("ifnull(Pdd.HARDWPRICE,0) as KojiKanamono, "); |
|
699 |
sql.AppendLine("ifnull(Pdd.INDSWASTETAX,0) as KojiSannhaiZei, "); |
|
700 |
sql.AppendLine("ifnull(Pdd.CnstrPrice,0) as CnstrPrice, "); |
|
701 |
sql.AppendLine("ifnull(Pdd.CNSTRPRICEEXIST,-1) as CNSTRPRICEEXIST, "); |
|
702 |
sql.AppendLine("ifnull(Pdd.ApprovalPersonCode,0) as ApprovalPersonCode, "); |
|
703 |
sql.AppendLine("ifnull(Picm.SealPrintName,'') as TantoNM, "); |
|
704 |
sql.AppendLine(" DATE_FORMAT(ifnull(Pdd.ApprovalDate,'2001/01/01'), '%Y/%m/%d') as ApprovalDate, "); // 2001.01.01??????l |
|
705 |
sql.AppendLine(" ifnull(Pdd.ApprovalEndFlg,0) as ApprovalEndFlg, "); |
|
706 |
sql.AppendLine(" ifnull(Cbi.SalesPersonCode,0) as SalesPersonCode, "); /*?c??S????*/ |
|
707 |
sql.AppendLine(" ifnull(Cbi.ConstructionPersonCode,0) as ConstructionPersonCode, "); /*?H???S????*/ |
|
708 |
sql.AppendLine(" ifnull(Cbi.ConstrSubPersonCode,0) as ConstrSubPersonCode, "); /*?H?????S????*/ |
|
709 |
sql.AppendLine(" ifnull(Cbi.ConstructionInstructor,0) as ConstructionInstructor, "); /*?H???w????*/ |
|
710 |
sql.AppendLine(" Picm2.DepartmentCode, "); /*?H???S????????R?[?h*/ |
|
711 |
sql.AppendLine(" case ifnull(Cbi.PurchaseOrderMailingDate,'') when '' then '' "); |
|
712 |
sql.AppendLine(" when '2001/01/01' then '?~' "); |
|
713 |
sql.AppendLine(" else '??' "); |
|
714 |
sql.AppendLine(" end as PurchaseOrderMailingDate, "); |
|
715 |
sql.AppendLine(" case ifnull(Cbi.PurchaseOrderReturnDate,'') when '' then '' "); |
|
716 |
sql.AppendLine(" when '2001/01/01' then '?~' "); |
|
717 |
sql.AppendLine(" else '??' "); |
|
718 |
sql.AppendLine(" end as PurchaseOrderReturnDate, "); |
|
719 |
sql.AppendLine(" case ifnull(Pa.PERSONCODE,0) when 0 then case Bdd.CONSTRUCTIONCODE when 0 then '' "); |
|
720 |
sql.AppendLine(" else '?~' "); |
|
721 |
sql.AppendLine(" end "); |
|
722 |
sql.AppendLine(" else '??' "); |
|
723 |
sql.AppendLine(" end as PaData "); |
|
679 |
sql.Append("select "); |
|
680 |
sql.Append(" ifnull(Bd.SEQNO, 1) as SEQNO "); |
|
681 |
sql.Append(" , ifnull(Bdd.LINECOUNT, 0) as LINECOUNT "); |
|
682 |
sql.Append(" , ifnull(Bdd.COMPANYCODE, CLD.CompanyCode) as COMPANYCODE "); |
|
683 |
sql.Append(" , ifnull(Scm.COMPANYNAME, CLD.CompanyName) as COMPANYNAME "); |
|
684 |
sql.Append(" , Sc.DisplayOrder as DisplayOrder "); |
|
685 |
sql.Append(" , ifnull(Bdd.CONSTRUCTIONCODE, CL.ConstructionCode) as CONSTRUCTIONCODE "); |
|
686 |
sql.Append(" , ifnull(Bdd.FIELDNAME, CBD.DetailString) as FIELDNAME "); |
|
687 |
sql.Append(" , Bdd.BILLPRICE as BILLPRICE "); |
|
688 |
sql.Append(" , Bdd.HIGHWPRICE as HIGHWPRICE "); |
|
689 |
sql.Append(" , Bdd.HARDWPRICE as HARDWPRICE "); |
|
690 |
sql.Append(" , Bdd.INDSWASTETAX as INDSWASTETAX "); |
|
691 |
sql.Append(" , DATE_FORMAT(Bdd.UpdateDate, '%Y/%m/%d %H:%i:%s') as UpdateDate "); |
|
692 |
sql.Append(" , ifnull(Bdd.Note, '') as Bikou "); |
|
693 |
sql.Append(" , ifnull(Pdd.BILLPRICE, 0) as KojiSeikyu "); |
|
694 |
sql.Append(" , ifnull(Pdd.DiscountPrice, 0) as KojiNebiki "); |
|
695 |
sql.Append(" , ifnull(Pdd.OffsetPrice, 0) as KojiSousai "); |
|
696 |
sql.Append(" , ifnull(Pdd.NextCoPrice, 0) as JikaiKurikosi "); |
|
697 |
sql.Append(" , ifnull(Pdd.HIGHWPRICE, 0) as KojiKousoku "); |
|
698 |
sql.Append(" , ifnull(Pdd.HARDWPRICE, 0) as KojiKanamono "); |
|
699 |
sql.Append(" , ifnull(Pdd.INDSWASTETAX, 0) as KojiSannhaiZei "); |
|
700 |
sql.Append(" , ifnull(Pdd.CnstrPrice, 0) as CnstrPrice "); |
|
701 |
sql.Append(" , ifnull(Pdd.CNSTRPRICEEXIST, - 1) as CNSTRPRICEEXIST "); |
|
702 |
sql.Append(" , ifnull(Pdd.ApprovalPersonCode, 0) as ApprovalPersonCode "); |
|
703 |
sql.Append(" , ifnull(Picm.SealPrintName, '') as TantoNM "); |
|
704 |
sql.Append(" , DATE_FORMAT( "); |
|
705 |
sql.Append(" ifnull(Pdd.ApprovalDate, '2001/01/01') "); |
|
706 |
sql.Append(" , '%Y/%m/%d' "); |
|
707 |
sql.Append(" ) as ApprovalDate "); |
|
708 |
sql.Append(" , ifnull(Pdd.ApprovalEndFlg, 0) as ApprovalEndFlg "); |
|
709 |
sql.Append(" , ifnull(Cbi.SalesPersonCode, 0) as SalesPersonCode "); |
|
710 |
sql.Append(" , ifnull(Cbi.ConstructionPersonCode, 0) as ConstructionPersonCode "); |
|
711 |
sql.Append(" , ifnull(Cbi.ConstrSubPersonCode, 0) as ConstrSubPersonCode "); |
|
712 |
sql.Append(" , ifnull(Cbi.ConstructionInstructor, 0) as ConstructionInstructor "); |
|
713 |
sql.Append(" , Picm2.DepartmentCode "); |
|
714 |
sql.Append(" , case ifnull(Cbi.PurchaseOrderMailingDate, '') "); |
|
715 |
sql.Append(" when '' then '' "); |
|
716 |
sql.Append(" when '2001/01/01' then '?~' "); |
|
717 |
sql.Append(" else '??' "); |
|
718 |
sql.Append(" end as PurchaseOrderMailingDate "); |
|
719 |
sql.Append(" , case ifnull(Cbi.PurchaseOrderReturnDate, '') "); |
|
720 |
sql.Append(" when '' then '' "); |
|
721 |
sql.Append(" when '2001/01/01' then '?~' "); |
|
722 |
sql.Append(" else '??' "); |
|
723 |
sql.Append(" end as PurchaseOrderReturnDate "); |
|
724 |
sql.Append(" , case ifnull(Pa.PERSONCODE, 0) "); |
|
725 |
sql.Append(" when 0 then case Bdd.CONSTRUCTIONCODE "); |
|
726 |
sql.Append(" when 0 then '' "); |
|
727 |
sql.Append(" else '?~' "); |
|
728 |
sql.Append(" end "); |
|
729 |
sql.Append(" else '??' "); |
|
730 |
sql.Append(" end as PaData "); |
|
731 |
sql.Append(" , CLD.GroupCount as GroupCount"); |
|
732 |
sql.Append(" , CLD.LineCount as LinePoint "); |
|
733 |
sql.AppendFormat(" , PERIOD_DIFF({0} ,DATE_FORMAT(CL.ConstructionStart, '%Y%m')) + {1} AS ColPoint ", m_Select_TargetDate, Enum.GetNames(typeof(FrmConstructionLedger.GridColumn)).Length - 1); |
|
734 |
sql.Append("from "); |
|
735 |
sql.Append(" ConstructionLedgerDetail as CLD "); |
|
736 |
sql.Append(" inner join ConstructionLedger as CL on CL.ConstructionCode = CLD.ConstructionCode "); |
|
737 |
sql.Append(" and CL.ComplateFlg = 0 "); |
|
738 |
sql.Append(" inner join ConstructionBaseinfoDetail as CBD on CBD.ConstructionCode = CLD.ConstructionCode "); |
|
739 |
sql.Append(" and CBD.DetailNo = 2 "); |
|
740 |
sql.Append(" inner join SubContractorMaster as Sc on Sc.COMPANYCODE = CLD.COMPANYCODE "); |
|
741 |
sql.AppendFormat(" and Sc.LABOURKIND = {0} ", m_Labourkind); |
|
742 |
sql.Append(" left join ConstructionLedgerExcute AS CLE on CLE.ConstructionCode = CLD.ConstructionCode "); |
|
743 |
sql.Append(" and CLE.GroupCount = CLD.GroupCount "); |
|
744 |
sql.Append(" and CLE.LineCount = CLD.LineCount "); |
|
745 |
sql.AppendFormat(" and CLE.ColumnCount = (PERIOD_DIFF({0} ,DATE_FORMAT(CL.ConstructionStart, '%Y%m')) + {1}) ", m_Select_TargetDate, Enum.GetNames(typeof(FrmConstructionLedger.GridColumn)).Length - 1); |
|
746 |
sql.Append(" left join ( "); |
|
747 |
sql.Append(" BillingData as Bd join ( "); |
|
748 |
sql.Append(" BillingDataDetail as Bdd join SubContractorMaster as Scm "); |
|
749 |
sql.Append(" on Bdd.COMPANYCODE = Scm.COMPANYCODE "); |
|
750 |
sql.AppendFormat(" and Scm.LABOURKIND = {0} ", m_Labourkind); |
|
751 |
sql.Append(" left join ( "); |
|
752 |
sql.Append(" PaymentDataDetail as Pdd "); |
|
753 |
sql.Append(" left join PersonInChargeMaster as Picm "); |
|
754 |
sql.Append(" on ifnull(Pdd.ApprovalPersonCode, - 1) = Picm.PERSONCODE "); |
|
755 |
sql.Append(" ) "); |
|
756 |
sql.Append(" on Bdd.COMPANYCODE = Pdd.COMPANYCODE "); |
|
757 |
sql.Append(" and Bdd.TARGETDATE = Pdd.TARGETDATE "); |
|
758 |
sql.Append(" and Bdd.SEQNO = Pdd.SEQNO "); |
|
759 |
sql.Append(" and Bdd.LINECOUNT = Pdd.LINECOUNT "); |
|
760 |
sql.Append(" left join ( "); |
|
761 |
sql.Append(" ConstructionBaseInfo as Cbi "); |
|
762 |
sql.Append(" left join ( "); |
|
763 |
sql.Append(" PersonInChargeMaster as Picm2 "); |
|
764 |
sql.Append(" left join ApprovalMaster as Am "); |
|
765 |
sql.Append(" on Picm2.DEPARTMENTCODE = Am.DEPARTMENTCODE "); |
|
766 |
sql.Append(" and Am.ApprovalCode = 3 "); |
|
767 |
sql.Append(" and ApprovalAuthority = 1 "); |
|
768 |
sql.Append(" ) "); |
|
769 |
sql.Append(" on Cbi.ConstructionPersonCode = Picm2.PERSONCODE "); |
|
770 |
sql.Append(" left join ProcessApproval as Pa "); |
|
771 |
sql.Append(" on Cbi.CONSTRUCTIONCODE = Pa.CONSTRUCTIONCODE "); |
|
772 |
sql.Append(" and Am.APPROVALPERSON = Pa.PERSONCODE "); |
|
773 |
sql.Append(" and Pa.SEQNO > 1 "); |
|
774 |
sql.Append(" and Pa.APPROVALSTATUS = 2 "); |
|
775 |
sql.Append(" ) "); |
|
776 |
sql.Append(" on Bdd.CONSTRUCTIONCODE = Cbi.CONSTRUCTIONCODE "); |
|
777 |
sql.Append(" ) "); |
|
778 |
sql.Append(" on Bd.COMPANYCODE = BdD.COMPANYCODE "); |
|
779 |
sql.Append(" and Bd.TARGETDATE = BdD.TARGETDATE "); |
|
780 |
sql.Append(" and Bd.SEQNO = BdD.SEQNO "); |
|
781 |
sql.AppendFormat(" and Bd.TARGETDATE = {0} ", m_Select_TargetDate); |
|
782 |
sql.Append(") on Bd.COMPANYCODE = CLD.CompanyCode "); |
|
783 |
sql.Append("and Bdd.CONSTRUCTIONCODE = CLD.CONSTRUCTIONCODE "); |
|
784 |
sql.Append("where "); |
|
785 |
sql.Append(" CLD.GroupCount = 2 "); |
|
786 |
sql.Append(" and CLD.CompanyCode > 0 "); |
|
787 |
sql.AppendFormat(" and CLD.CompanyType = {0}", m_Labourkind); |
|
788 |
sql.Append(" "); |
|
789 |
sql.Append("union "); |
|
790 |
sql.Append(" "); |
|
791 |
sql.Append("select "); |
|
792 |
sql.Append(" ifnull(Bd.SEQNO, 1) as SEQNO "); |
|
793 |
sql.Append(" , ifnull(Bdd.LINECOUNT, 0) as LINECOUNT "); |
|
794 |
sql.Append(" , ifnull(Bdd.COMPANYCODE, 0) as COMPANYCODE "); |
|
795 |
sql.Append(" , ifnull(Scm.COMPANYNAME, \"\") as COMPANYNAME "); |
|
796 |
sql.Append(" , Scm.DisplayOrder as DisplayOrder "); |
|
797 |
sql.Append(" , Bdd.CONSTRUCTIONCODE as CONSTRUCTIONCODE "); |
|
798 |
sql.Append(" , Bdd.FIELDNAME as FIELDNAME "); |
|
799 |
sql.Append(" , Bdd.BILLPRICE as BILLPRICE "); |
|
800 |
sql.Append(" , Bdd.HIGHWPRICE as HIGHWPRICE "); |
|
801 |
sql.Append(" , Bdd.HARDWPRICE as HARDWPRICE "); |
|
802 |
sql.Append(" , Bdd.INDSWASTETAX as INDSWASTETAX "); |
|
803 |
sql.Append(" , DATE_FORMAT(Bdd.UpdateDate, '%Y/%m/%d %H:%i:%s') as UpdateDate "); |
|
804 |
sql.Append(" , ifnull(Bdd.Note, '') as Bikou "); |
|
805 |
sql.Append(" , ifnull(Pdd.BILLPRICE, 0) as KojiSeikyu "); |
|
806 |
sql.Append(" , ifnull(Pdd.DiscountPrice, 0) as KojiNebiki "); |
|
807 |
sql.Append(" , ifnull(Pdd.OffsetPrice, 0) as KojiSousai "); |
|
808 |
sql.Append(" , ifnull(Pdd.NextCoPrice, 0) as JikaiKurikosi "); |
|
809 |
sql.Append(" , ifnull(Pdd.HIGHWPRICE, 0) as KojiKousoku "); |
|
810 |
sql.Append(" , ifnull(Pdd.HARDWPRICE, 0) as KojiKanamono "); |
|
811 |
sql.Append(" , ifnull(Pdd.INDSWASTETAX, 0) as KojiSannhaiZei "); |
|
812 |
sql.Append(" , ifnull(Pdd.CnstrPrice, 0) as CnstrPrice "); |
|
813 |
sql.Append(" , ifnull(Pdd.CNSTRPRICEEXIST, - 1) as CNSTRPRICEEXIST "); |
|
814 |
sql.Append(" , ifnull(Pdd.ApprovalPersonCode, 0) as ApprovalPersonCode "); |
|
815 |
sql.Append(" , ifnull(Picm.SealPrintName, '') as TantoNM "); |
|
816 |
sql.Append(" , DATE_FORMAT( "); |
|
817 |
sql.Append(" ifnull(Pdd.ApprovalDate, '2001/01/01') "); |
|
818 |
sql.Append(" , '%Y/%m/%d' "); |
|
819 |
sql.Append(" ) as ApprovalDate "); |
|
820 |
sql.Append(" , ifnull(Pdd.ApprovalEndFlg, 0) as ApprovalEndFlg "); |
|
821 |
sql.Append(" , ifnull(Cbi.SalesPersonCode, 0) as SalesPersonCode "); |
|
822 |
sql.Append(" , ifnull(Cbi.ConstructionPersonCode, 0) as ConstructionPersonCode "); |
|
823 |
sql.Append(" , ifnull(Cbi.ConstrSubPersonCode, 0) as ConstrSubPersonCode "); |
|
824 |
sql.Append(" , ifnull(Cbi.ConstructionInstructor, 0) as ConstructionInstructor "); |
|
825 |
sql.Append(" , Picm2.DepartmentCode "); |
|
826 |
sql.Append(" , case ifnull(Cbi.PurchaseOrderMailingDate, '') "); |
|
827 |
sql.Append(" when '' then '' "); |
|
828 |
sql.Append(" when '2001/01/01' then '?~' "); |
|
829 |
sql.Append(" else '??' "); |
|
830 |
sql.Append(" end as PurchaseOrderMailingDate "); |
|
831 |
sql.Append(" , case ifnull(Cbi.PurchaseOrderReturnDate, '') "); |
|
832 |
sql.Append(" when '' then '' "); |
|
833 |
sql.Append(" when '2001/01/01' then '?~' "); |
|
834 |
sql.Append(" else '??' "); |
|
835 |
sql.Append(" end as PurchaseOrderReturnDate "); |
|
836 |
sql.Append(" , case ifnull(Pa.PERSONCODE, 0) "); |
|
837 |
sql.Append(" when 0 then case Bdd.CONSTRUCTIONCODE "); |
|
838 |
sql.Append(" when 0 then '' "); |
|
839 |
sql.Append(" else '?~' "); |
|
840 |
sql.Append(" end "); |
|
841 |
sql.Append(" else '??' "); |
|
842 |
sql.Append(" end as PaData "); |
|
843 |
sql.Append(" , null as GroupCount "); |
|
844 |
sql.Append(" , null as LinePoint "); |
|
845 |
sql.Append(" , null as ColPoint "); |
|
846 |
sql.Append("from "); |
|
847 |
sql.Append(" BillingData as Bd join ( "); |
|
848 |
sql.Append(" BillingDataDetail as Bdd join SubContractorMaster as Scm "); |
|
849 |
sql.Append(" on Bdd.COMPANYCODE = Scm.COMPANYCODE "); |
|
850 |
sql.AppendFormat(" and Scm.LABOURKIND = {0} ", m_Labourkind); |
|
851 |
sql.Append(" left join ( "); |
|
852 |
sql.Append(" PaymentDataDetail as Pdd "); |
|
853 |
sql.Append(" left join PersonInChargeMaster as Picm "); |
|
854 |
sql.Append(" on ifnull(Pdd.ApprovalPersonCode, - 1) = Picm.PERSONCODE "); |
|
855 |
sql.Append(" ) "); |
|
856 |
sql.Append(" on Bdd.COMPANYCODE = Pdd.COMPANYCODE "); |
|
857 |
sql.Append(" and Bdd.TARGETDATE = Pdd.TARGETDATE "); |
|
858 |
sql.Append(" and Bdd.SEQNO = Pdd.SEQNO "); |
|
859 |
sql.Append(" and Bdd.LINECOUNT = Pdd.LINECOUNT "); |
|
860 |
sql.Append(" left join ( "); |
|
861 |
sql.Append(" ConstructionBaseInfo as Cbi "); |
|
862 |
sql.Append(" left join ( "); |
|
863 |
sql.Append(" PersonInChargeMaster as Picm2 "); |
|
864 |
sql.Append(" left join ApprovalMaster as Am "); |
|
865 |
sql.Append(" on Picm2.DEPARTMENTCODE = Am.DEPARTMENTCODE "); |
|
866 |
sql.Append(" and Am.ApprovalCode = 3 "); |
|
867 |
sql.Append(" and ApprovalAuthority = 1 "); |
|
868 |
sql.Append(" ) "); |
|
869 |
sql.Append(" on Cbi.ConstructionPersonCode = Picm2.PERSONCODE "); |
|
870 |
sql.Append(" left join ProcessApproval as Pa "); |
|
871 |
sql.Append(" on Cbi.CONSTRUCTIONCODE = Pa.CONSTRUCTIONCODE "); |
|
872 |
sql.Append(" and Am.APPROVALPERSON = Pa.PERSONCODE "); |
|
873 |
sql.Append(" and Pa.SEQNO > 1 "); |
|
874 |
sql.Append(" and Pa.APPROVALSTATUS = 2 "); |
|
875 |
sql.Append(" ) "); |
|
876 |
sql.Append(" on Bdd.CONSTRUCTIONCODE = Cbi.CONSTRUCTIONCODE "); |
|
877 |
sql.Append(" ) "); |
|
878 |
sql.Append(" on Bd.COMPANYCODE = BdD.COMPANYCODE "); |
|
879 |
sql.Append(" and Bd.TARGETDATE = BdD.TARGETDATE "); |
|
880 |
sql.Append(" and Bd.SEQNO = BdD.SEQNO "); |
|
881 |
sql.AppendFormat(" and Bd.TARGETDATE = {0} ", m_Select_TargetDate); |
|
882 |
sql.Append(" and Bdd.CONSTRUCTIONCODE = 0 "); |
|
883 |
sql.Append(" "); |
|
884 |
sql.Append("group by "); |
|
885 |
sql.Append(" SEQNO "); |
|
886 |
sql.Append(" , LINECOUNT "); |
|
887 |
sql.Append(" , COMPANYCODE "); |
|
888 |
sql.Append(" , COMPANYNAME "); |
|
889 |
sql.Append(" , DisplayOrder "); |
|
890 |
sql.Append(" , CONSTRUCTIONCODE "); |
|
891 |
sql.Append(" , FIELDNAME "); |
|
892 |
sql.Append(" , BILLPRICE "); |
|
893 |
sql.Append(" , HIGHWPRICE "); |
|
894 |
sql.Append(" , HARDWPRICE "); |
|
895 |
sql.Append(" , INDSWASTETAX "); |
|
896 |
sql.Append(" , UpdateDate "); |
|
897 |
sql.Append(" , Bikou "); |
|
898 |
sql.Append(" , BILLPRICE "); |
|
899 |
sql.Append(" , DiscountPrice "); |
|
900 |
sql.Append(" , OffsetPrice "); |
|
901 |
sql.Append(" , NextCoPrice "); |
|
902 |
sql.Append(" , HIGHWPRICE "); |
|
903 |
sql.Append(" , HARDWPRICE "); |
|
904 |
sql.Append(" , INDSWASTETAX "); |
|
905 |
sql.Append(" , CnstrPrice "); |
|
906 |
sql.Append(" , CNSTRPRICEEXIST "); |
|
907 |
sql.Append(" , ApprovalPersonCode "); |
|
908 |
sql.Append(" , TantoNM "); |
|
909 |
sql.Append(" , ApprovalDate "); |
|
910 |
sql.Append(" , ApprovalEndFlg "); |
|
911 |
sql.Append(" , SalesPersonCode "); |
|
912 |
sql.Append(" , ConstructionPersonCode "); |
|
913 |
sql.Append(" , ConstrSubPersonCode "); |
|
914 |
sql.Append(" , ConstructionInstructor "); |
|
915 |
sql.Append(" , DepartmentCode "); |
|
916 |
sql.Append(" , PurchaseOrderMailingDate "); |
|
917 |
sql.Append(" , PurchaseOrderReturnDate "); |
|
918 |
sql.Append(" , PaData "); |
|
919 |
sql.Append(" , GroupCount "); |
|
920 |
sql.Append(" , LinePoint "); |
|
921 |
sql.Append(" , ColPoint "); |
|
724 | 922 |
|
725 |
sql.AppendLine("from BillingData as Bd join (BillingDataDetail as Bdd join SubContractorMaster as Scm on Bdd.COMPANYCODE = Scm.COMPANYCODE "); |
|
726 |
sql.AppendFormat(" and Scm.LABOURKIND={0}", m_Labourkind); |
|
727 |
sql.AppendLine(" left join (PaymentDataDetail as Pdd left join PersonInChargeMaster as Picm on ifnull(Pdd.ApprovalPersonCode,-1) = Picm.PERSONCODE ) on Bdd.COMPANYCODE = Pdd.COMPANYCODE and Bdd.TARGETDATE = Pdd.TARGETDATE and Bdd.SEQNO = Pdd.SEQNO and Bdd.LINECOUNT = Pdd.LINECOUNT "); |
|
728 |
sql.AppendLine(" left join (ConstructionBaseInfo as Cbi left join (PersonInChargeMaster as Picm2 left join ApprovalMaster as Am on Picm2.DEPARTMENTCODE = Am.DEPARTMENTCODE and Am.ApprovalCode = 3 and ApprovalAuthority = 1) "); |
|
729 |
sql.AppendLine(" on Cbi.ConstructionPersonCode = Picm2.PERSONCODE "); |
|
730 |
sql.AppendLine(" left join ProcessApproval as Pa on Cbi.CONSTRUCTIONCODE = Pa.CONSTRUCTIONCODE and Am.APPROVALPERSON = Pa.PERSONCODE and Pa.SEQNO > 1 and Pa.APPROVALSTATUS = 2) "); |
|
731 |
sql.AppendLine(" on Bdd.CONSTRUCTIONCODE = Cbi.CONSTRUCTIONCODE) "); |
|
732 |
sql.AppendLine(" on Bd.COMPANYCODE = BdD.COMPANYCODE "); |
|
733 |
sql.AppendLine(" and Bd.TARGETDATE = BdD.TARGETDATE "); |
|
734 |
sql.AppendLine(" and Bd.SEQNO = BdD.SEQNO "); |
|
735 |
|
|
736 |
sql.AppendFormat("where Bd.TARGETDATE = {0} ", m_Select_TargetDate); |
|
737 |
|
|
738 |
sql.AppendLine("group by "); |
|
739 |
sql.AppendLine(" Bd.SEQNO, "); |
|
740 |
sql.AppendLine(" Bdd.LINECOUNT, "); |
|
741 |
sql.AppendLine(" Bdd.COMPANYCODE, "); |
|
742 |
sql.AppendLine(" Scm.COMPANYNAME, "); |
|
743 |
sql.AppendLine(" Scm.DisplayOrder, "); |
|
744 |
sql.AppendLine(" Bdd.CONSTRUCTIONCODE, "); |
|
745 |
sql.AppendLine(" Bdd.FIELDNAME, "); |
|
746 |
sql.AppendLine(" Bdd.BILLPRICE, "); |
|
747 |
sql.AppendLine(" Bdd.HIGHWPRICE, "); |
|
748 |
sql.AppendLine(" Bdd.HARDWPRICE, "); |
|
749 |
sql.AppendLine(" Bdd.INDSWASTETAX, "); |
|
750 |
sql.AppendLine(" Bdd.UpdateDate, "); |
|
751 |
sql.AppendLine(" Bdd.Note, "); |
|
752 |
sql.AppendLine("Pdd.BILLPRICE, "); |
|
753 |
sql.AppendLine("Pdd.DiscountPrice, "); |
|
754 |
sql.AppendLine("Pdd.OffsetPrice, "); |
|
755 |
sql.AppendLine("Pdd.NextCoPrice, "); |
|
756 |
sql.AppendLine("Pdd.HIGHWPRICE, "); |
|
757 |
sql.AppendLine("Pdd.HARDWPRICE, "); |
|
758 |
sql.AppendLine("Pdd.INDSWASTETAX, "); |
|
759 |
sql.AppendLine("Pdd.CnstrPrice, "); |
|
760 |
sql.AppendLine("Pdd.CNSTRPRICEEXIST, "); |
|
761 |
sql.AppendLine("Pdd.ApprovalPersonCode, "); |
|
762 |
sql.AppendLine("Picm.SealPrintName, "); |
|
763 |
sql.AppendLine(" Pdd.ApprovalDate, "); |
|
764 |
sql.AppendLine(" Pdd.ApprovalEndFlg, "); |
|
765 |
sql.AppendLine(" Cbi.SalesPersonCode, "); /*?c??S????*/ |
|
766 |
sql.AppendLine(" Cbi.ConstructionPersonCode, "); /*?H???S????*/ |
|
767 |
sql.AppendLine(" Cbi.ConstrSubPersonCode, "); /*?H?????S????*/ |
|
768 |
sql.AppendLine(" Cbi.ConstructionInstructor, "); /*?H???w????*/ |
|
769 |
sql.AppendLine(" Picm2.DepartmentCode, "); /*?H???S????????R?[?h*/ |
|
770 |
sql.AppendLine(" Cbi.PurchaseOrderMailingDate, "); /*???????X????*/ |
|
771 |
sql.AppendLine(" Cbi.PurchaseOrderReturnDate, "); /*???????????*/ |
|
772 |
sql.AppendLine(" Pa.PERSONCODE "); // ?\?Z?? |
|
773 |
|
|
774 | 923 |
if (dgvCompany.Visible == true) // ???P??\?? |
775 | 924 |
{ |
776 |
sql.AppendLine("order by Scm.COMPANYCODE ASC, Bdd.SEQNO DESC, case when Bdd.CONSTRUCTIONCODE = 0 Then 2099999999 else Bdd.LINECOUNT end ");
|
|
925 |
sql.AppendLine("order by COMPANYCODE ASC, SEQNO DESC, case when CONSTRUCTIONCODE = 0 Then 2099999999 else LINECOUNT end ");
|
|
777 | 926 |
} |
778 | 927 |
else if (dgvProject.Visible == true) // ????P??\?? |
779 | 928 |
{ |
780 |
sql.AppendLine("order by Cbi.ConstructionPersonCode ASC, Bdd.CONSTRUCTIONCODE DESC, Scm.DISPLAYORDER ASC, Bdd.SEQNO ASC, Bdd.LINECOUNT ASC ");
|
|
929 |
sql.AppendLine("order by ConstructionPersonCode ASC, CONSTRUCTIONCODE DESC, DISPLAYORDER ASC, SEQNO ASC, LINECOUNT ASC ");
|
|
781 | 930 |
} |
782 | 931 |
|
783 | 932 |
// ?f?[?^???@???v?E???v???v?Z?????A?S???f?[?^???????? |
... | ... | |
3759 | 3908 |
//???????t?? |
3760 | 3909 |
if (m_viewTarget == 0) |
3761 | 3910 |
{ |
3762 |
DisporderCol = (int)DispColumn.CompanyDispOrder;
|
|
3911 |
DisporderCol = (int)DispColumn_Company.SubConstractorCode;
|
|
3763 | 3912 |
|
3764 | 3913 |
var OrderRows = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) == 0 |
3765 | 3914 |
&& CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowVisible].Value) == 1) |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSummaryList/FrmRequestSummaryList.designer.cs | ||
---|---|---|
836 | 836 |
// |
837 | 837 |
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; |
838 | 838 |
this.Project_Column5.DefaultCellStyle = dataGridViewCellStyle3; |
839 |
this.Project_Column5.HeaderText = " 現場名";
|
|
839 |
this.Project_Column5.HeaderText = "現場名"; |
|
840 | 840 |
this.Project_Column5.Name = "Project_Column5"; |
841 | 841 |
this.Project_Column5.ReadOnly = true; |
842 | 842 |
this.Project_Column5.Resizable = System.Windows.Forms.DataGridViewTriState.False; |
... | ... | |
859 | 859 |
// |
860 | 860 |
// Project_Column7 |
861 | 861 |
// |
862 |
this.Project_Column7.HeaderText = " 業者名";
|
|
862 |
this.Project_Column7.HeaderText = "業者名"; |
|
863 | 863 |
this.Project_Column7.Name = "Project_Column7"; |
864 | 864 |
this.Project_Column7.ReadOnly = true; |
865 | 865 |
this.Project_Column7.Resizable = System.Windows.Forms.DataGridViewTriState.False; |
他の形式にエクスポート: Unified diff