Exemple #1
0
     public dynamic Get(RequestWrapper query)
     {
         if (query["PartTypeCode"] != "")
         {
             query.LoadSettingXmlString(@"
 <settings defaultOrderBy='ID'>
     <select>*</select>
     <from>(select * from SYS_PartType where  PartTypeCode like 'CCC%') as temp</from>
 </settings>");
             var pQuery            = query.ToParamQuery();
             pQuery.GetData().From = pQuery.GetData().From.Replace("CCC", query["PartTypeCode"].ToString());
             var service           = new SYS_PartTypeService();
             var result            = service.GetDynamicListWithPaging(pQuery);
             return(result);
         }
         else
         {
             query.LoadSettingXmlString(@"
 <settings defaultOrderBy='ID'>
     <select>*</select>
     <from>SYS_PartType </from>
     <where defaultForAll='true' defaultCp='equal' defaultIgnoreEmpty='true'>
             <field name='PartTypeCode'       cp='like'></field>
     </where>
 </settings>");
             var pQuery  = query.ToParamQuery();
             var service = new SYS_PartTypeService();
             var result  = service.GetDynamicListWithPaging(pQuery);
             return(result);
         }
     }
        public dynamic Get(RequestWrapper query)
        {
            query.LoadSettingXmlString(@"
<settings defaultOrderBy='BillNo'>
    <select>
        A.*
    </select>
    <from>
        psi_return A
    </from>
    <where defaultForAll='true' defaultCp='equal' defaultIgnoreEmpty='true' >
        <field name='BillNo'            cp='like'      ></field>
        <field name='PickingBillNo'         cp='like'       ></field>
        <field name='ReturnPerson'     cp='like'       ></field>
        <field name='Contract'          cp='like'       ></field>
        <field name='ReturnDate'       cp='daterange'       ></field>
        <field name='CustomNo'            cp='like'></field>
    </where>
</settings>");

            var ReturnService = new psi_returnService();
            var pQuery        = query.ToParamQuery();
            var result        = ReturnService.GetDynamicListWithPaging(pQuery);

            return(result);
        }
Exemple #3
0
        public IEnumerable <dynamic> Get(RequestWrapper req)
        {
            req.SetJson("{orderby:'RoleSeq'}");
            var result = new sys_roleService().GetModelList(req.ToParamQuery());

            return(result);
        }
Exemple #4
0
        public IEnumerable <dynamic> Get(RequestWrapper req)
        {
            req.LoadSettingXmlString("<settings defaultOrderBy='RoleSeq'></settings>");
            var result = new sys_roleService().GetModelList(req.ToParamQuery());

            return(result);
        }
Exemple #5
0
        public dynamic Get(RequestWrapper query)
        {
            query.LoadSettingXmlString(@"
<settings defaultOrderBy='CamaraCode'>
    <select>*</select>
    <from>CamaraInfo</from>
    <where defaultForAll='true' defaultCp='equal' defaultIgnoreEmpty='true' >
        <field name='CamaraCode'		cp='equal'></field>   
        <field name='ViaductStakeID'		cp='equal'></field>   
        <field name='StartStakeCode'		cp='equal'></field>   
        <field name='EndStakeCode'		cp='equal'></field>
        <field name='CamaraIP'		cp='equal'></field>
        <field name='Price'		cp='equal'></field>
        <field name='CamaraTypeID'		cp='equal'></field>
        <field name='Description'		cp='equal'></field>   
        <field name='IsEnable'		cp='equal'></field>   
        <field name='CreatePerson'		cp='equal'></field>   
        <field name='CreateDate'		cp='daterange'></field>   
        <field name='UpdatePerson'		cp='equal'></field>   
        <field name='UpdateDate'		cp='daterange'></field>   
    </where>
</settings>");
            var service = new CamaraInfoService();
            var pQuery  = query.ToParamQuery();
            var result  = service.GetDynamicListWithPaging(pQuery);

            return(result);
        }
Exemple #6
0
        // 地址:GET api/mms/direct
        public override dynamic Get(RequestWrapper query)
        {
            query.LoadSettingXmlString(@"
<settings defaultOrderBy='BillNo'>
    <select>
        A.*, B.ProjectName, C.MaterialTypeName,D.MerchantsName as SupplierName,E.MerchantsName as PickUnitName
    </select>
    <from>
        mms_direct A
        left join mms_project       B on B.ProjectCode      = A.ProjectCode
        left join mms_materialType  C on C.MaterialType     = A.MaterialType
        left join mms_merchants     D on D.MerchantsCode    = A.SupplierCode
        left join mms_merchants     E on E.MerchantsCode    = A.PickUnit
    </from>
    <where defaultForAll='true' defaultCp='equal' defaultIgnoreEmpty='true' >
        <field name='BillNo'                cp='equal'      ></field>
        <field name='ContractCode'           cp='like'       ></field>
        <field name='D.MerchantsName'       cp='like'  variable='SupplierName'     ></field>
        <field name='E.MerchantsName'       cp='like'  variable='PickUnitName'     ></field>
        <field name='A.MaterialType'        cp='equal'      ></field>
        <field name='ArriveDate'            cp='daterange'  ></field>
        <field name='SupplyType'            cp='equal'  ></field>
    </where>
</settings>");

            var pQuery = query.ToParamQuery().AndWhere("A.ProjectCode", MmsHelper.GetCurrentProject());

            return(masterService.GetDynamicListWithPaging(pQuery));
        }
Exemple #7
0
        public override dynamic Get(RequestWrapper query)
        {
            query.SetXml(@"
<settings>
    <select>
        A.*, B.ProjectName
    </select>
    <from>
        mms_deal A
        left join mms_project       B on B.ProjectCode      = A.ProjectCode
    </from>
    <where>
        <c column='BillNo'              symbol='equal'     ignore='empty' ></c>
        <c column='ProjectName'         symbol='like'      ignore='empty' ></c>
        <c column='DoPerson'            symbol='like'      ignore='empty' ></c>
        <c column='DealType'            symbol='equal'     ignore='empty' ></c>
        <c column='DealKind'            symbol='equal'     ignore='empty' ></c>
        <c column='ApplyDate'           symbol='daterange' ignore='empty' ></c>
    </where>
    <orderby>BillNo</orderby>
</settings>");

            var pQuery = query.ToParamQuery().Where("A.ProjectCode", MmsHelper.GetCurrentProject());

            return(masterService.GetDynamicListWithPaging(pQuery));
        }
Exemple #8
0
        public dynamic Get(RequestWrapper query)
        {
            query.LoadSettingXmlString(@"
<settings defaultOrderBy='ID'>
    <select>*</select>
    <from>WMS_BN_RealStock</from>
    <where defaultForAll='true' defaultCp='equal' defaultIgnoreEmpty='true' >
        <field name='ID'		cp='equal'></field>   
        <field name='InventoryCode'		cp='equal'></field>   
        <field name='InventoryName'		cp='equal'></field>  
        <field name='Model'		cp='equal'></field>   
        <field name='RealStock'		cp='equal'></field>   
        <field name='TotalStock'		cp='equal'></field>   
        <field name='LockStock'		cp='equal'></field>   
        <field name='WarehouseCode'		cp='equal'></field>   
        <field name='WarehouseName'		cp='equal'></field>   
        <field name='BatchCode'		cp='equal'></field>   
        <field name='Unit'		cp='equal'></field>   
        <field name='Remark'		cp='equal'></field>   
        <field name='CreatePerson'		cp='equal'></field>   
        <field name='CreateTime'		cp='equal'></field>   
        <field name='ModifyPerson'		cp='equal'></field>   
        <field name='ModifyTime'		cp='equal'></field>   
    </where>
</settings>");
            var service = new WMS_BN_RealStockService();
            var pQuery  = query.ToParamQuery();
            var result  = service.GetDynamicListWithPaging(pQuery);

            return(result);
        }
        public override dynamic Get(RequestWrapper query)
        {
            query.LoadSettingXmlString(@"
<settings defaultOrderBy='BillNo'>
    <select>
        A.*, B.ProjectName, C.MerchantsName
    </select>
    <from>
        mms_rentOut A
        left join mms_project       B on B.ProjectCode      = A.ProjectCode
        left join mms_merchants     C on C.MerchantsCode    = A.SupplierCode
    </from>
    <where defaultForAll='false' defaultCp='equal' defaultIgnoreEmpty='true' >
        <field name='BillNo'             cp='equal'      ></field>
        <field name='ProjectName'        cp='like'       ></field>
        <field name='C.MerchantsName'    cp='like'       ></field>
        <field name='ContractCode'       cp='like'       ></field>
        <field name='RentOutDate'        cp='daterange'  ></field>
    </where>
</settings>");
            var pQuery = query.ToParamQuery().AndWhere("IsTotal", query["IsTotal"],
                                                       x => "true".Equals(x.Value) ? "IsTotal=1" : "isnull(IsTotal,0)<>1");
            var result = masterService.GetDynamicListWithPaging(pQuery);

            return(result);
        }
Exemple #10
0
        // 查询主表:GET api/mms/send
        public override dynamic Get(RequestWrapper query)
        {
            query.SetXml(@"
<settings>
    <select>
        A.*, B.ProjectName, C.MaterialTypeName, D.WarehouseName,E.MerchantsName as PickUnitName
    </select>
    <from>
        mms_send A
        left join mms_project       B on B.ProjectCode      = A.ProjectCode
        left join mms_materialType  C on C.MaterialType = A.MaterialType
        left join mms_warehouse         D on D.WarehouseCode       = A.WarehouseCode
        left join mms_merchants E on E.MerchantsCode=A.PickUnit
    </from>
    <where  >
        <c column='BillNo'              symbol='equal'    ignore='empty'  ></c>
        <c column='ProjectName'         symbol='like'     ignore='empty'  ></c>
        <c column='DoPerson'            symbol='like'     ignore='empty'  ></c>
        <c column='A.WarehouseCode'     symbol='equal'    ignore='empty' values='{WarehouseCode}'      ></c>
        <c column='E.MerchantsName'     symbol='equal'    ignore='empty' values='{PickUnitName}'    ></c>
        <c column='SendDate'            symbol='daterange' ignore='empty'  ></c>
        <c column='PriceKind'           symbol='equal'    ignore='empty'  ></c>
    </where>
    <orderby>BillNo</orderby>
</settings>");

            var pQuery = query.ToParamQuery().Where("A.ProjectCode", MmsHelper.GetCurrentProject());

            return(masterService.GetDynamicListWithPaging(pQuery));
        }
        public dynamic Get(RequestWrapper query)
        {
            query.LoadSettingXmlString(@"
<settings defaultOrderBy='BillNo'>
    <select>
        A.*,B.Name as WarehouseName,C.Name as CustomerName
    </select>
    <from>
        psi_picking A
        left join psi_warehouse B on B.Id = A.Warehouse
        left join psi_customer  C on C.Id = A.CustomNo
        left join psi_customerContract D on D.ContractNo = A.Contract
    </from>
    <where defaultForAll='true' defaultCp='equal' defaultIgnoreEmpty='true' >
        <field name='BillNo'            cp='equal'      ></field>
        <field name='Warehouse'         cp='equal'       ></field>
        <field name='PickingPerson'     cp='like'       ></field>
        <field name='PickingDate'       cp='daterange'       ></field>
        <field name='C.Name'            cp='like' variable='CustomerName'></field>
        <field name='Contract'          cp='like'       ></field>
    </where>
</settings>");

            var PickingService = new psi_pickingService();
            var pQuery         = query.ToParamQuery();
            var result         = PickingService.GetDynamicListWithPaging(pQuery);

            return(result);
        }
        public dynamic Get(RequestWrapper query)
        {
            query.LoadSettingXmlString(@"
<settings defaultOrderBy='BillNo'>
    <select>
        A.*,B.Name as SupplierName,case when A.AuditState='passed' then 'true' else 'false' end as IsEffect
    </select>
    <from>
        psi_purchase A
        left join psi_supplier  B on B.Id = A.Supplier
    </from>
    <where defaultForAll='false' defaultCp='equal' defaultIgnoreEmpty='true' >
        <field name='BillNo'                cp='equal'      ></field>
        <field name='PurchasePerson'        cp='like'      ></field>
        <field name='Contract'              cp='like'       ></field>
        <field name='PurchaseDate'          cp='daterange'    ></field>
        <field name='C.Name'                cp='like' variable='SupplierName'></field>
    </where>
</settings>");

            var PurchaseService = new psi_purchaseService();
            var pQuery          = query.ToParamQuery();

            pQuery.AndWhere("AuditState", query["IsEffect"], x => x.Value == "true"?"AuditState='passed'":"isnull(AuditState,'') <> 'passed'");

            var result = PurchaseService.GetDynamicListWithPaging(pQuery);

            return(result);
        }
Exemple #13
0
        public override dynamic Get(RequestWrapper query)
        {
            query.LoadSettingXmlString(@"
<settings defaultOrderBy='BillNo'>
    <select>
        A.*, B.ProjectName, C.MaterialTypeName, D.WarehouseName
    </select>
    <from>
        mms_check A
        left join mms_project       B on B.ProjectCode      = A.ProjectCode
        left join mms_materialType  C on C.MaterialType = A.MaterialType
        left join mms_warehouse         D on D.WarehouseCode       = A.WarehouseCode
    </from>
    <where defaultForAll='false' defaultCp='equal' defaultIgnoreEmpty='true' >
        <field name='BillNo'             cp='equal'      ></field>
        <field name='ProjectName'        cp='like'       ></field>
        <field name='DoPerson'           cp='like'       ></field>
        <field name='A.WarehouseCode'     cp='equal' variable='WarehouseCode'></field>
        <field name='A.MaterialType' cp='equal'      ></field>
        <field name='CheckDate'          cp='daterange'  ></field>
    </where>
</settings>");
            //if(query["IsShowDiff"] == "true")
            //    var a =0;

            var pQuery = query.ToParamQuery().AndWhere("IsShowDiff", query["IsShowDiff"],
                                                       x => "true".Equals(x.Value) ? "isnull(A.BookMoney,0)<>isnull(A.OperateMoney,0)" : "1=1").AndWhere("A.ProjectCode", MmsHelper.GetCurrentProject());
            //.AndWhere("CheckDate", query["CheckDate"], x => x == null ? "1=1" : string.Format("CheckDate", x.Value));
            var result = masterService.GetDynamicListWithPaging(pQuery);

            return(result);
        }
        public override dynamic Get(RequestWrapper query)
        {
            query.SetXml(@"
<settings >
    <select>
        A.*, B.ProjectName, C.MerchantsName
    </select>
    <from>
        mms_rentOut A
        left join mms_project       B on B.ProjectCode      = A.ProjectCode
        left join mms_merchants     C on C.MerchantsCode    = A.SupplierCode
    </from>
    <where>
        <c column='BillNo'             symbol='equal'      ignore='empty'></c>
        <c column='ProjectName'        symbol='like'       ignore='empty'></c>
        <c column='C.MerchantsName'    symbol='like'       ignore='empty'></c>
        <c column='ContractCode'       symbol='like'       ignore='empty'></c>
        <c column='RentOutDate'        symbol='daterange'  ignore='empty'></c>
    </where>
    <orderby>BillNo</orderby>
</settings>");
            var pQuery = query.ToParamQuery().Where(c => c.Sql(query.GetValue <bool>("IsTotal") ? "IsTotal=1" : "isnull(IsTotal,0)<>1"));
            var result = masterService.GetDynamicListWithPaging(pQuery);

            return(result);
        }
        public dynamic Get(RequestWrapper query)
        {
            query.LoadSettingXmlString(@"
<settings defaultOrderBy='BillNo'>
    <select>
        A.*,B.Name as WarehouseName,C.Name as SupplierName
    </select>
    <from>
        psi_receive A
        left join psi_warehouse B on B.Id = A.Warehouse
        left join psi_supplier  C on C.Id = A.Supplier
    </from>
    <where defaultForAll='true' defaultCp='equal' defaultIgnoreEmpty='true' >
        <field name='BillNo'            cp='equal'      ></field>
        <field name='Warehouse'         cp='equal'       ></field>
        <field name='ReceivePerson'     cp='like'       ></field>
        <field name='Contract'          cp='like'       ></field>
        <field name='ReceiveDate'       cp='daterange'       ></field>
        <field name='C.Name'            cp='like' variable='SupplierName'></field>
    </where>
</settings>");

            var ReceiveService = new psi_receiveService();
            var pQuery         = query.ToParamQuery();
            var result         = ReceiveService.GetDynamicListWithPaging(pQuery);

            return(result);
        }
Exemple #16
0
        public dynamic Get(RequestWrapper query)
        {
            //string ContractCode = query["ContractCode"];
            query.LoadSettingXmlString(@"
<settings defaultOrderBy='a.BatchingCode'>
    <select>a.ContractCode,c.ProjectName,a.RootPartCode,a.IsEnable,
(SELECT TOP 1 PartFigureCode FROM dbo.PRS_Process_BOM WHERE PartCode = a.RootPartCode) RootFigureCode,
(SELECT TOP 1 PartName FROM dbo.PRS_Process_BOM WHERE PartCode = a.RootPartCode) RootPartName,
(SELECT TOP 1 PartFigureCode FROM dbo.PRS_Process_BOM WHERE PartCode = b.PartCode) PartFigureCode,b.PartCode,
(SELECT TOP 1 PartName FROM dbo.PRS_Process_BOM WHERE PartCode = b.PartCode) PartName,
(SELECT TOP 1 MaterialCode FROM dbo.PRS_Process_BOM WHERE PartCode = b.PartCode) MaterialCode,
a.WorkshopCode,(SELECT TOP 1 DepartmentName FROM dbo.SYS_BN_Department WHERE DepartmentCode=a.WorkshopCode) WorkshopName,b.BatchingNum,
b.OutDeptCode,(SELECT WarehouseName FROM SYS_BN_Warehouse WHERE WarehouseCode=b.OutDeptCode) OutDeptName</select>
    <from>MES_WorkshopBatching a LEFT JOIN MES_WorkshopBatchingDetail b ON a.BatchingCode=b.BatchingCode LEFT JOIN PMS_BN_Project c ON c.ContractCode=a.ContractCode</from>
    <where defaultForAll='true' defaultCp='equal' defaultIgnoreEmpty='true' >
        <field name='a.ContractCode'		cp='equal'></field>   
        <field name='a.ProductID'		cp='equal'></field>   
        <field name='b.PartCode'		cp='equal'></field>   
        <field name='a.RootPartCode'		cp='equal'></field>
    </where>
</settings>");
            var service = new MES_WorkshopBatchingService();
            var pQuery  = query.ToParamQuery();
            var result  = service.GetDynamicList(pQuery.AndWhere("a.IsEnable", 1));

            return(result);
        }
Exemple #17
0
        // 查询主表:GET api/mms/send
        public dynamic Get(RequestWrapper query)
        {
            query.LoadSettingXmlString(@"
<settings defaultOrderBy='UserCode'>
    <select>
        *
    </select>
    <from>
        test_user
    </from>
    <where defaultForAll='true' defaultCp='equal' defaultIgnoreEmpty='true' >
        <field name='UserCode'             cp='like'      ></field>
        <field name='UserName'             cp='like'      ></field>
        <field name='Description'             cp='like'      ></field>
        <field name='IsEnable'             cp='equal'      ></field>
        <field name='LoginCount'             cp='equal'      ></field>
        <field name='LastLoginDate'             cp='daterange'      ></field>
    </where>
</settings>");

            var pQuery = query.ToParamQuery();
            var list   = new mms_sendService().GetDynamicListWithPaging(pQuery);

            return(list);
        }
        public dynamic GetPageData(string id)
        {
            var masterService = new Mes_BlankingBoardService();
            var pQuery        = ParamQuery.Instance().AndWhere("ID", id);
            var detail        = new Mes_BlankingResultService().GetDynamicList(ParamQuery.Instance().AndWhere("MainID", id).AndWhere("IsEnable", 1));
            var query         = new RequestWrapper();

            query.LoadSettingXmlString(@"
<settings defaultOrderBy='ID'>
    <select>*</select>
    <from>V__Mes_BlankingResult</from>
</settings>");
            var result = new
            {
                //主表数据
                form       = masterService.GetModel(pQuery),
                scrollKeys = masterService.ScrollKeys("ID", id),

                //明细数据
                tab0 = new Mes_BlankingResultService().GetDynamicListWithPaging(query.ToParamQuery().AndWhere("MainID", id).AndWhere("IsEnable", 1))
                       //new Mes_BlankingResultService().GetDynamicListWithPaging(query.ToParamQuery().AndWhere("MainID", id).AndWhere("IsEnable",1))
            };

            return(result);
        }
Exemple #19
0
        // 查询主表数据列表 GET api/mms/send
        public dynamic Get(RequestWrapper query)
        {
            query.SetXml(@"
<settings>
    <select>
        A.*, B.ProjectName, C.MaterialTypeName, D.WarehouseName as WarehouseName, E.MerchantsName AS SupplierName
    </select>
    <from>
        mms_receive A
        left join mms_project       B on B.ProjectCode      = A.ProjectCode
        left join mms_materialType  C on C.MaterialType     = A.MaterialType
        left join mms_warehouse     D on D.WarehouseCode    = A.WarehouseCode
        left join mms_merchants     E on E.MerchantsCode    = A.SupplierCode
    </from>
    <where>
        <c column='BillNo'                symbol='equal'     ignore='empty'      ></c>
        <c column='DoPerson'              symbol='like'      ignore='empty'      ></c>
        <c column='E.MerchantsName'       symbol='like'      ignore='empty' values='{SupplierName}'></c>
        <c column='A.WarehouseCode'       symbol='equal'     ignore='empty'     ></c>
        <c column='A.MaterialType'        symbol='equal'     ignore='empty'     ></c>
        <c column='ReceiveDate'           symbol='daterange' ignore='empty'     ></c>
        <c column='ContractCode'          symbol='like'      ignore='empty'     ></c>
    </where>
    <orderby>BillNo</orderby>
</settings>");

            var pQuery = query.ToParamQuery().Where("A.ProjectCode", MmsHelper.GetCurrentProject());

            var result = masterService.GetDynamicListWithPaging(pQuery);

            return(result);
            //return base.Get(query);
        }
Exemple #20
0
        public override dynamic Get(RequestWrapper query)
        {
            query.LoadSettingXmlString(@"
<settings defaultOrderBy='BillNo'>
    <select>
        A.*, B.ProjectName
    </select>
    <from>
        mms_deal A
        left join mms_project       B on B.ProjectCode      = A.ProjectCode
    </from>
    <where defaultForAll='true' defaultCp='equal' defaultIgnoreEmpty='true' >
        <field name='BillNo'              cp='equal'      ></field>
        <field name='ProjectName'         cp='like'       ></field>
        <field name='DoPerson'            cp='like'       ></field>
        <field name='DealType'          cp='equal'      ></field>
        <field name='DealKind'          cp='equal'      ></field>
        <field name='ApplyDate'           cp='daterange'  ></field>
    </where>
</settings>");

            var pQuery = query.ToParamQuery().AndWhere("A.ProjectCode", MmsHelper.GetCurrentProject());

            return(masterService.GetDynamicListWithPaging(pQuery));
        }
Exemple #21
0
        // 查询主表:GET api/mms/send
        public dynamic Get(RequestWrapper query)
        {
            query.SetXml(@"
<settings  >
    <select>
        *
    </select>
    <from>
        test_user
    </from>
    <where>
        <c column='UserCode'        ignore='empty'     symbol='like'      ></c>
        <c column='UserName'        ignore='empty'     symbol='like'      ></c>
        <c column='Description'     ignore='empty'     symbol='like'      ></c>
        <c column='IsEnable'        ignore='empty'     symbol='equal'      ></c>
        <c column='LoginCount'      ignore='empty'     symbol='equal'      ></c>
        <c column='LastLoginDate'   ignore='empty'     symbol='daterange'      ></c>
    </where>
    <orderby>UserCode</orderby>
</settings>");

            var pQuery = query.ToParamQuery();
            var list   = new mms_sendService().GetDynamicListWithPaging(pQuery);

            return(list);
        }
Exemple #22
0
        public dynamic Get(RequestWrapper query)
        {
            query.LoadSettingXmlString(@"
            <settings defaultOrderBy='ID'>
                <select>DISTINCT *</select>
                <from>V_APS_ProjectProduceDetial</from>
                <where defaultForAll='false' defaultCp='equal' defaultIgnoreEmpty='true'>
                    <field name='ID'         cp='In'></field>
                    <field name='ContractCode'       cp='equal'></field>
                    <field name='ProjectDetailID'        cp='equal'></field>
                    <field name='PlanType'       cp='equal'></field>
<field name='PlanedStartTime'        cp='daterange'></field>
<field name='PlanedFinishTime'       cp='daterange'></field>
                    <field name='WorkshopID'         cp='equal'></field>
                    <field name='PlanState'          cp='equal'></field>
                    <field name='MonthPlanCode'          cp='equal'></field>
                    <field name='RootPartCode'       cp='equal'></field>
                    <field name='ProcessModelType'       cp='In'></field>
                </where>
            </settings>").ToParamQuery();
            var service = new APS_ProjectProduceDetialService();
            var pQuery  = query.ToParamQuery();
            var result  = service.GetDynamicListWithPaging(pQuery);

            return(result);
        }
        /*
         * public string GetNewKey()
         * {
         *  return new ImageGrabbingService().GetNewKey("ID", "maxplus");
         * }
         */
        public dynamic Get(RequestWrapper query)
        {
            query.LoadSettingXmlString(@"
<settings defaultOrderBy='ID'>
    <select>*</select>
    <from>ImageGrabbing</from>
    <where defaultForAll='true' defaultCp='equal' defaultIgnoreEmpty='true' >
        <field name='ID'		cp='equal'></field>   
        <field name='Serie'		cp='equal'></field>   
        <field name='Type'		cp='equal'></field>   
        <field name='Description'		cp='equal'></field>   
        <field name='IsEnable'		cp='equal'></field>   
        <field name='CreatePerson'		cp='equal'></field>   
        <field name='CreateDate'		cp='daterange'></field>   
        <field name='UpdatePerson'		cp='equal'></field>   
        <field name='UpdateDate'		cp='daterange'></field>   
    </where>
</settings>");
            //var service = new ImageGrabbingService();
            var pQuery = query.ToParamQuery();

            // var result = service.GetDynamicListWithPaging(pQuery);
            // return result;
            return(null);
        }
        //人员
        public dynamic GetPeople(RequestWrapper query)
        {
            query.LoadSettingXmlString(@"
<settings defaultOrderBy='temp.ID'>
    <select>*</select>
    <from>(
select t1.*,t2.TeamCode from SYS_WorkGroupDetail as t1 
inner join SYS_WorkGroup as t2 on t1.MainID=t2.ID
where t2.TeamCode='xxx') as temp</from>
</settings>");
            var service = new SYS_WorkGroupDetailService();
            var pQuery  = query.ToParamQuery();
            var c       = query["TeamCode"].ToString().Length;

            if (c != 0)
            {
                pQuery.GetData().From = pQuery.GetData().From.Replace("xxx", query["TeamCode"].ToString());
            }
            else
            {
                return(null);
            }
            var result = service.GetDynamicListWithPaging(pQuery);

            return(result);
        }
Exemple #25
0
        //设计任务详细查询
        public dynamic GetDesignDetailedData(RequestWrapper query)
        {
            query.LoadSettingXmlString(@"
    <settings defaultOrderBy='ID'>
        <select>*</select>
        <from>PMS_DesignTaskDetail</from>
        <where defaultForAll='true' defaultCp='equal' defaultIgnoreEmpty='true'>
                <field name='ContractCode'       cp='equal'></field>
                <field name='IsEnable'       cp='equal'></field>
        </where>
    </settings>");
            var service = new PMS_DesignTaskDetailService();
            var pQuery  = query.ToParamQuery();
            var result  = service.GetDynamicListWithPaging(pQuery);

            return(result);

            //return null;
            //string where="";
            //if(string.IsNullOrEmpty(contractCode)){
            //    where+=string.Format(" and ContractCode='{0}'",contractCode);
            //}
            // if(string.IsNullOrEmpty(productID)){
            //    where+=string.Format(" and PrductID='{0}'",productID);
            //}

            //using (var db = Db.Context("Mms"))
            //{
            //    string sql = string.Format(@"select * from PMS_DesignTaskDetail where 1=1 {0}", where);
            //    dynamic res = db.Sql(sql).QueryMany<dynamic>();
            //    return res;
            //}
        }
        //工单
        public dynamic Get(RequestWrapper query)
        {
            query.LoadSettingXmlString(@"
<settings defaultOrderBy='temp.ID'>
    <select>*</select>
    <from>(select * from V_APS_ProjectProduceDetial where ContractCode=(select ContractCode from PMS_BN_ProjectPart where PartCode='xxx')
and ProjectDetailID=(select ProjectDetailID from PMS_BN_ProjectPart where PartCode='xxx')) as temp</from>
</settings>");

            var service = new APS_ProjectProduceDetialService();
            var pQuery  = query.ToParamQuery();
            var c       = query["PartCode"].ToString().Length;

            if (c != 0)
            {
                pQuery.GetData().From = pQuery.GetData().From.Replace("xxx", query["PartCode"].ToString());
            }
            else
            {
                return(null);
            }
            var result = service.GetDynamicListWithPaging(pQuery);

            return(result);
        }
        public dynamic GetPageData(string id)
        {
            var masterService = new MES_WorkshopBatchingService();
            //var pQuery = ParamQuery.Instance().AndWhere("BatchingCode", id);
            RequestWrapper query  = new RequestWrapper().LoadSettingXmlString(@"
<settings defaultOrderBy='BatchingCode'>
    <select>*</select>
    <from>(SELECT t1.* ,t2.PartName RootName FROM V_MesWorkshopBatching t1 INNER JOIN dbo.PRS_Process_BOM t2 ON t1.RootPartCode=t2.PartCode) as tmp</from>
    <where defaultForAll='true' defaultCp='equal' defaultIgnoreEmpty='true' >
        <field name='BatchingCode'		cp='like'></field>   
        <field name='ContractCode'		cp='like'></field>   
        <field name='DepartmentName'		cp='like'></field>
    </where>
</settings>");
            ParamQuery     pQuery = query.ToParamQuery();

            pQuery.AndWhere("BatchingCode", id);
            var data   = masterService.GetDynamic(pQuery);
            var result = new
            {
                //主表数据
                form       = data,
                scrollKeys = masterService.ScrollKeys("BatchingCode", id),

                //明细数据
                tab0 = new MES_WorkshopBatchingDetailService().GetDynamicList(ParamQuery.Instance().AndWhere("BatchingCode", id))
            };

            return(result);
        }
Exemple #28
0
        public dynamic Get(RequestWrapper query)
        {
            string MateTypeListId = string.Join(",", MES_BlankingWorkshopSetMateController.MateTypeListId);

            /*
             * --参考:https://bbs.csdn.net/topics/230028389
             *
             * SELECT * FROM dbo.PRS_Process_BOM ORDER BY PartFigureCode
             *
             * SELECT * FROM dbo.PRS_Process_BOM ORDER BY PartFigureCode COLLATE SQL_Latin1_General_CP437_BIN
             *
             * SELECT * FROM dbo.PRS_Process_BOM ORDER BY replace (PartFigureCode,'-','0')
             */

            query.LoadSettingXmlString(@"
    <settings defaultOrderBy=' temp.PartFigureCode COLLATE SQL_Latin1_General_CP437_BIN '>
        <select>*</select>
        <from>
(SELECT ID,PartFigureCode,PartName,MaterialCode,MateType,SetMateName,ContractCode,ProductID,
New_InventoryCode,New_PartName,New_Model,MateParamValue,InPlanceSize,BlankingSize,BlankingNum,SetMateNum
FROM dbo.PRS_Process_BOM_Blanking a WHERE a.MateType IN({0})) as temp
        </from>
        <where defaultForAll='true' defaultCp='equal' defaultIgnoreEmpty='true'>
                <field name='temp.ContractCode'          cp='like'></field>
                <field name='temp.ProductID'         cp='equal'></field>
        </where>
    </settings>", MateTypeListId);
            var service = new PRS_Process_BOM_BlankingService();
            var pQuery  = query.ToParamQuery();
            var result  = service.GetDynamicListWithPaging(pQuery);

            return(result);
        }
Exemple #29
0
        // 查询主表:GET api/mms/send
        public dynamic Get(RequestWrapper query)
        {
            query.LoadSettingXmlString(@"
<settings defaultOrderBy='BillNo'>
    <select>
     A.*
    </select>
    <from>
        mms_drainpipeduct A
    </from>
    <where defaultForAll='true' defaultCp='equal' defaultIgnoreEmpty='true' >
        <field name='BillNo'          cp='equal'      ></field>
        <field name='Address'        cp='like'       ></field>
        <field name='IdentificationCode'            cp='like'       ></field>
        <field name='Category'            cp='like'       ></field>
        <field name='Material'            cp='like'       ></field>
        <field name='PressureType'            cp='like'       ></field>
       <field name='OwnershipUnit'            cp='like'       ></field>
       <field name='Diameter'            cp='like'       ></field>
    </where>
</settings>");
            var service = new mms_drainpipeductService();
            var pQuery  = query.ToParamQuery().AndWhere("A.ProjectCode", MmsHelper.GetCurrentProject());

            return(service.GetDynamicListWithPaging(pQuery));
        }
Exemple #30
0
        public dynamic Get(RequestWrapper query)
        {
            query.LoadSettingXmlString(@"
    <settings defaultOrderBy='ID'>
        <select>*,(select TOP 1 PartFigureCode from PRS_Process_BOM where PartCode=MES_WorkingTicket.PartCode) PartFigureCode</select>
        <from>MES_WorkingTicket</from>
        <where defaultForAll='true' defaultCp='equal' defaultIgnoreEmpty='true'>
                <field name='WorkTicketCode'         cp='like'></field>
                <field name='ApsCode'        cp='like'></field>
                <field name='TeamName'       cp='like'></field>
                <field name='WorkshopName'       cp='like'></field>
                <field name='ProcessName'        cp='like'></field>
                <field name='WorkStepsName'          cp='like'></field>
                <field name='EquipmentName'          cp='like'></field>
        </where>
    </settings>");
            var service = new MES_WorkingTicketService();
            //string WorkshopCodeStr = "'nodata'";
            //var WorkshopCodeList = new SYS_WorkGroupService()
            //    .GetModelList(ParamQuery.Instance()
            //    .Select("DISTINCT b.DepartID")
            //    .From("SYS_WorkGroupDetail a LEFT JOIN SYS_WorkGroup b ON a.MainID=b.ID")
            //    .AndWhere("a.UserCode", MmsHelper.GetUserCode()));
            var user = new SYS_BN_UserService().GetModel(ParamQuery.Instance().AndWhere("IsEnable", 1).AndWhere("UserCode", MmsHelper.GetUserCode()));
            //if (WorkshopCodeList.Count > 0)
            //{
            //    WorkshopCodeStr = "'" + string.Join("','", WorkshopCodeList.Select(a => a.DepartID)) + "'";
            //}
            var pQuery = query.ToParamQuery();
            //var result = service.GetDynamicListWithPaging(pQuery.AndWhere("WorkshopCode", user.DepartmentCode));
            var result = service.GetDynamicListWithPaging(pQuery);

            return(result);
        }