Esempio n. 1
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);
        }
Esempio n. 2
0
        // 地址:GET api/mms/send/getdetail 功能:取得收料单明细信息
        public dynamic GetDetail(string id)
        {
            var query = RequestWrapper
                        .InstanceFromRequest()
                        .SetRequestData("BillNo", id)
                        .LoadSettingXmlString(@"
<settings defaultOrderBy='MaterialCode'>
    <select>
        A.*, B.MaterialName,B.Model,B.Material
    </select>
    <from>
        mms_receiveDetail A
        left join mms_materialInfo B on B.MaterialCode = A.MaterialCode
    </from>
    <where>
        <field name='BillNo' cp='equal'></field>
    </where>
</settings>");

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

            return(result);
        }
        public dynamic Get(RequestWrapper query)
        {
            query.SetXml(@"
<settings>
    <select>*</select>
    <from>mms_receive</from>
    <where>
        <c column='BillNo'		symbol='equal' ignore='empty'></c>   
        <c column='BillDate'		symbol='equal' ignore='empty'></c>   
        <c column='ProjectCode'		symbol='equal' ignore='empty'></c>   
        <c column='DoPerson'		symbol='equal' ignore='empty'></c>   
        <c column='SupplierCode'		symbol='equal' ignore='empty'></c>   
        <c column='ReceiveDate'		symbol='equal' ignore='empty'></c>   
    </where>
    <orderby>BillNo</orderby>
</settings>");
            var service = new mms_receiveService();
            var pQuery = query.ToParamQuery();
            var result = service.GetDynamicListWithPaging(pQuery);
            return result;
        }
Esempio n. 4
0
        public dynamic Get(RequestWrapper query)
        {
            query.SetXml(@"
<settings>
    <select>*</select>
    <from>mms_receive</from>
    <where>
        <c column='BillNo'		symbol='equal' ignore='empty'></c>   
        <c column='BillDate'		symbol='equal' ignore='empty'></c>   
        <c column='ProjectCode'		symbol='equal' ignore='empty'></c>   
        <c column='DoPerson'		symbol='equal' ignore='empty'></c>   
        <c column='SupplierCode'		symbol='equal' ignore='empty'></c>   
        <c column='ReceiveDate'		symbol='equal' ignore='empty'></c>   
    </where>
    <orderby>BillNo</orderby>
</settings>");
            var service = new mms_receiveService();
            var pQuery  = query.ToParamQuery();
            var result  = service.GetDynamicListWithPaging(pQuery);

            return(result);
        }
        // 地址:GET api/mms/send/getdetail 功能:取得收料单明细信息
         public dynamic GetDetail(string id)
        {
            var query = RequestWrapper
                .InstanceFromRequest()
                .SetRequestData("BillNo",id)
                .LoadSettingXmlString(@"
<settings defaultOrderBy='MaterialCode'>
    <select>
        A.*, B.MaterialName,B.Model,B.Material
    </select>
    <from>
        mms_receiveDetail A
        left join mms_materialInfo B on B.MaterialCode = A.MaterialCode
    </from>
    <where>
        <field name='BillNo' cp='equal'></field>
    </where>
</settings>");

            var pQuery = query.ToParamQuery();
            var ReceiveService = new mms_receiveService();
            var result = ReceiveService.GetDynamicListWithPaging(pQuery);
            return result;
        }