Ejemplo n.º 1
0
        public override dynamic GetDetail(string id)
        {
            var query = RequestWrapper
                        .InstanceFromRequest()
                        .SetRequestData("BillNo", id)
                        .LoadSettingXmlString(@"
<settings defaultOrderBy='MaterialCode'>
    <select>
        A.*, B.MaterialName,B.Model,B.Material,C.MerchantsName as UseUnitName
    </select>
    <from>
        mms_rentInDetail A
        left join mms_material B on B.MaterialCode      = A.MaterialCode
        left join mms_merchants C on C.MerchantsCode    = A.UseUnit
    </from>
    <where>
        <field name='BillNo' cp='equal'></field>
    </where>
</settings>");

            var pQuery = query.ToParamQuery();
            var result = masterService.GetDynamicListWithPaging(pQuery);

            return(result);
        }
Ejemplo n.º 2
0
        public override dynamic GetDetail(string id)
        {
            var query = RequestWrapper
                        .InstanceFromRequest()
                        .SetRequestData("BillNo", id)
                        .LoadSettingXmlString(@"
<settings defaultOrderBy='MaterialCode'>
    <select>
        A.*, B.MaterialName,B.Model,B.Material,C.UnitPrice as SrcUnitPrice,C.Num as SrcNum
    </select>
    <from>
        mms_refundDetail A
        left join mms_material B on B.MaterialCode = A.MaterialCode
        left join mms_sendDetail C on C.BillNo =  A.SrcBillNo and C.RowId = A.SrcRowId
    </from>
    <where>
        <field name='A.BillNo' cp='equal'></field>
    </where>
</settings>");

            var pQuery = query.ToParamQuery();
            var result = masterService.GetDynamicListWithPaging(pQuery);

            return(result);
        }
Ejemplo n.º 3
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);
        }
Ejemplo n.º 4
0
        // 地址:GET api/mms/deal/getdetail
        public override dynamic GetDetail(string id)
        {
            var query = RequestWrapper
                        .InstanceFromRequest()
                        .SetRequestData("BillNo", id)
                        .LoadSettingXmlString(@"
<settings defaultOrderBy='RowId'>
    <select>
        A.*, C.MaterialName,C.Model,C.Material,D.Num as StockNum,D.UnitPrice as StockUnitPrice
    </select>
    <from>
        mms_LossReportDetail A
        left join mms_LossReport B on B.BillNo = A.BillNo
        left join mms_material C on C.MaterialCode = A.MaterialCode
        left join mms_warehouseStock D on D.WarehouseCode = B.WarehouseCode and D.MaterialCode = A.MaterialCode
    </from>
    <where>
        <field name='A.BillNo' cp='equal'></field>
    </where>
</settings>");

            var pQuery = query.ToParamQuery();
            var result = detailService.GetDynamicListWithPaging(pQuery);

            return(result);
        }
Ejemplo n.º 5
0
        public dynamic GetDetail(string id)
        {
            var query = RequestWrapper
                        .InstanceFromRequest()
                        .SetRequestData("BillNo", id)
                        .LoadSettingXmlString(@"
<settings defaultOrderBy='RowId'>
    <select>
        A.*, B.Name,B.Catagory,B.Brand,B.Model,B.Unit
    </select>
    <from>
        psi_pickingGoods A
        left join psi_goods B on B.Id = A.GoodNo
    </from>
    <where>
        <field name='BillNo' cp='equal'></field>
    </where>
</settings>");

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

            return(result);
        }
Ejemplo n.º 6
0
        public dynamic GetDetail(string id)
        {
            var ReceiveService = new psi_customerService();
            var query          = RequestWrapper
                                 .InstanceFromRequest()
                                 .SetRequestData("CustomerId", id)
                                 .LoadSettingXmlString(@"
<settings defaultOrderBy='UpdateDate desc'>
    <select>
        A.*
    </select>
    <from>
        psi_customerContract A
    </from>
    <where>
        <field name='CustomerId' cp='equal'></field>
    </where>
</settings>");

            var pQuery1 = query.ToParamQuery();

            query.LoadSettingXmlString(@"
<settings defaultOrderBy='VisitId desc'>
    <select>
        A.*
    </select>
    <from>
        psi_customerVisit A
    </from>
    <where>
        <field name='CustomerId' cp='equal'></field>
    </where>
</settings>");

            var pQuery2 = query.ToParamQuery();

            //var result = new {
            //    contract: ReceiveService.GetDynamicListWithPaging(pQuery1),
            //    visit:ReceiveService.GetDynamicListWithPaging(pQuery2)
            //};
            var result = ReceiveService.GetDynamicListWithPaging(pQuery1);

            return(result);
        }
Ejemplo n.º 7
0
        // 地址:GET api/mms/repair/getdetail
        public override dynamic GetDetail(string id)
        {
            var query = RequestWrapper
                        .InstanceFromRequest()
                        .SetRequestData("BillNo", id)
                        .LoadSettingXmlString(@"
<settings defaultOrderBy='RepairNo'>
    <select>
        *
    </select>
    <from>
        mms_repairDetail 
    </from>
    <where>
        <field name='BillNo' cp='equal'></field>
    </where>
</settings>");

            var pQuery = query.ToParamQuery();
            var result = detailService.GetDynamicListWithPaging(pQuery);

            return(result);
        }
Ejemplo n.º 8
0
        // 查询明细表 GET api/mms/send/getdetail
        public virtual 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>
        {0} A
        left join mms_material B on B.MaterialCode = A.MaterialCode
    </from>
    <where>
        <field name='BillNo' cp='equal'></field>
    </where>
</settings>", typeof(TDetailModel).Name);

            var pQuery = query.ToParamQuery();
            var result = masterService.GetDynamicListWithPaging(pQuery);

            return(result);
        }
Ejemplo n.º 9
0
        // 地址:GET api/mms/deal/getdetail
        public override dynamic GetDetail(string id)
        {
            var query = RequestWrapper
                        .InstanceFromRequest()
                        .SetRequestData("BillNo", id)
                        .LoadSettingXmlString(@"
<settings defaultOrderBy='RowId'>
    <select>
        A.*,B.MerchantsName as ExpendCompanyName
    </select>
    <from>
        mms_dealDetail A
        left join mms_merchants B on B.MerchantsCode = A.ExpendCompany
    </from>
    <where>
        <field name='BillNo' cp='equal'></field>
    </where>
</settings>");

            var pQuery = query.ToParamQuery();
            var result = detailService.GetDynamicListWithPaging(pQuery);

            return(result);
        }
Ejemplo n.º 10
0
        // 地址:GET api/mms/deal/getdetail
        public override dynamic GetDetail(string id)
        {
            var sfrom = @" 
    select 'receive' as SrcBillType
    ,A.BillNo as SrcBillNo
    ,A.RowId as SrcRowId
    ,B.ReceiveDate as SrcDate
    ,B.WarehouseCode
    ,B.ProjectCode
    ,A.RemainNum
    ,A.UnitPrice as SrcUnitPrice
    ,C.*
    from mms_receiveDetail as A
    left join mms_receive as B ON A.BillNo=B.BillNo
    left join mms_material as C ON A.MaterialCode=C.MaterialCode

    union

    select 'refund' as SrcBillType
    ,A.BillNo as SrcBillNo
    ,A.RowId as SrcRowId
    ,B.RefundDate as SrcDate
    ,B.WarehouseCode
    ,B.ProjectCode
    ,A.RemainNum
    ,A.UnitPrice as SrcUnitPrice
    ,C.*
    from mms_refundDetail as A
    left join mms_refund as B ON A.BillNo=B.BillNo
    left join mms_material as C ON A.MaterialCode=C.MaterialCode

    union

    select 'adjust' as SrcBillType
    ,A.BillNo as SrcBillNo
    ,A.RowId as SrcRowId
    ,B.EffectDate as SrcDate
    ,B.WarehouseCode
    ,B.ProjectCode
    ,A.RemainNum
    ,A.UnitPrice as SrcUnitPrice
    ,C.*
    from mms_stockAdjustDetail as A
    left join mms_stockAdjust as B ON A.BillNo=B.BillNo
    left join mms_material as C ON A.MaterialCode=C.MaterialCode
 ";

            var query = RequestWrapper
                        .InstanceFromRequest()
                        .SetRequestData("BillNo", id)
                        .LoadSettingXmlString(@"
<settings defaultOrderBy='RowId'>
    <select>
        A.*, C.MaterialName,C.Model,C.Material,D.Num as StockNum,D.UnitPrice as StockUnitPrice,T.RemainNum,T.SrcUnitPrice
    </select>
    <from>
        mms_transferDetail A
        left join mms_transfer B on B.BillNo = A.BillNo
        left join mms_material C on C.MaterialCode = A.MaterialCode
        left join mms_warehouseStock D on D.WarehouseCode = B.WarehouseCode and D.MaterialCode = A.MaterialCode
        left join ({0}) T on T.SrcBillType=A.SrcBillType and T.SrcBillNo=A.SrcBillNo and T.SrcRowId = A.SrcRowId
    </from>
    <where>
        <field name='A.BillNo' cp='equal'></field>
    </where>
</settings>", sfrom);

            var pQuery = query.ToParamQuery();
            var result = detailService.GetDynamicListWithPaging(pQuery);

            return(result);
        }