diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AcceptanceController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AcceptanceController.cs index 6a6878213..e2a0a1aec 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AcceptanceController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AcceptanceController.cs @@ -70,7 +70,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers { return View(); } - + #endregion #region 获取数据 @@ -160,7 +160,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers [AjaxOnly] public ActionResult DeleteForm(string keyValue) { - ass_AcceptanceIBLL.DeleteEntity(keyValue); + ass_AcceptanceMainIBLL.DeleteEntity(keyValue); return Success("删除成功!"); } @@ -173,9 +173,13 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers [ValidateAntiForgeryToken] [AjaxOnly] public ActionResult SaveForm(string keyValue, string strEntity, string strass_Ass_AcceptanceList) - { + { Ass_AcceptanceMainEntity entity = strEntity.ToObject(); - entity.Status = 0; + if (string.IsNullOrEmpty(keyValue)) + { + entity.Status = 0; + } + List ass_AcceptanceList = strass_Ass_AcceptanceList.ToObject>(); ass_AcceptanceMainIBLL.SaveEntity(keyValue, entity, ass_AcceptanceList); return Success("保存成功!"); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Form.cshtml index c715ac4d0..0efd837dc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Form.cshtml @@ -30,7 +30,7 @@
明细操作
- + @**@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Form.js index 269a2d086..0148359e4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Form.js @@ -43,19 +43,19 @@ var bootstrap = function ($, learun) { var page = { init: function () { $('.lr-form-wrap').lrscroll(); - $("#detailadd").on('click', function () { - selectedRow = null; - learun.layerForm({ - id: 'formitem', - title: '新增明细', - url: top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/FormItem', - width: 860, - height: 600, - callBack: function (id) { - return top[id].acceptClick(refreshGirdData); - } - }); - }); + //$("#detailadd").on('click', function () { + // selectedRow = null; + // learun.layerForm({ + // id: 'formitem', + // title: '新增明细', + // url: top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/FormItem', + // width: 860, + // height: 600, + // callBack: function (id) { + // return top[id].acceptClick(refreshGirdData); + // } + // }); + //}); $("#detailedit").on('click', function () { var keyValue = $('#Ass_Acceptance').jfGridValue('Id'); selectedRow = $('#Ass_Acceptance').jfGridGet('rowdata'); @@ -67,29 +67,61 @@ var bootstrap = function ($, learun) { width: 860, height: 600, callBack: function (id) { + //return top[id].acceptClick(refreshGirdData); return top[id].acceptClick(refreshGirdData); } }); } }); + $("#detailadd").on('click', function () { + selectedRow = null; + learun.layerFormForPercent({ + id: 'formitem', + title: '新增明细', + url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItem/IndexTwo', + width: "90%", + height: "90%", + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); $("#detaildel").on('click', function () { - var keyValue = $('#Ass_Acceptance').jfGridValue('Id'); + var keyValue = $('#Ass_Acceptance').jfGridValue('AAIId'); if (learun.checkrow(keyValue)) { learun.layerConfirm('是否确认删除该项!', function (res, index) { if (res) { $.each(tempdatra, function (key, val) { - if (tempdatra[key].MainId === keyValue) { - pricecount -= tempdatra[key].TotalPrice; + if (tempdatra[key].AAIId === keyValue) { + pricecount -= tempdatra[key].AAIPrice; tempdatra.splice(key, 1); } }); - $("#Price").val(pricecount); + $("#TotalPrice").val(pricecount); $('#Ass_Acceptance').jfGridSet('refreshdata', tempdatra.sort(sortNumber)); top.layer.close(index); } }); } }); + //$("#detaildel").on('click', function () { + // var keyValue = $('#Ass_Acceptance').jfGridValue('Id'); + // if (learun.checkrow(keyValue)) { + // learun.layerConfirm('是否确认删除该项!', function (res, index) { + // if (res) { + // $.each(tempdatra, function (key, val) { + // if (tempdatra[key].MainId === keyValue) { + // pricecount -= tempdatra[key].TotalPrice; + // tempdatra.splice(key, 1); + // } + // }); + // $("#Price").val(pricecount); + // $('#Ass_Acceptance').jfGridSet('refreshdata', tempdatra.sort(sortNumber)); + // top.layer.close(index); + // } + // }); + // } + //}); page.bind(); page.initData(); }, @@ -98,65 +130,104 @@ var bootstrap = function ($, learun) { $('#CreateUserId')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; $('#CreateUserId').val(learun.clientdata.get(['userinfo']).realName); - //$('#CreateDeptId').lrselect({ - // type: 'tree', - // // 展开最大高度 - // maxHeight: 200, - // // 是否允许搜索 - // allowSearch: true, - // // 访问数据接口地址 - // url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree' - //}); $('#Ass_Acceptance').jfGrid({ headData: [ - { label: "设备名称", name: "Name", width: 100, align: "left" }, - { label: "品牌", name: "Manufacturer", width: 100, align: "left" }, - { label: "规格型号", name: "Model", width: 100, align: "left" }, - { label: "单位", name: "Unit", width: 100, align: "left" }, - { label: "数量", name: "Stock", width: 100, align: "left" }, - { label: "单价", name: "Price", width: 100, align: "left" }, - { label: "总价", name: "TotalPrice", width: 100, align: "left" }, { - label: "使用部门", name: "DepartmentId", width: 100, align: "left", - formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getAsync('department', { + label: '资产编号', name: 'AAICode', width: 150, align: 'left' + }, + { + label: '资产名称', name: 'AAIName', width: 150, align: 'left' + }, + { + label: '资产类别', name: 'AAITId', width: 150, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_AssetsType', key: value, + keyId: 'atid', callback: function (_data) { - callback(_data.name); + callback(_data['aname']); } }); } }, { - label: "使用人", name: "UserID", width: 100, align: "left", - formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getAsyncReal('user', { + label: '单价', name: 'AAIPrice', width: 100, align: 'left' + }, + { + label: '单位', name: 'AAIUnit', width: 80, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { key: value, + code: 'sldw', callback: function (_data) { - callback(_data.name); + callback(_data.text); } }); } }, - { label: "放置地点", name: "Place", width: 100, align: "left" }, - //{ - // label: "状态", name: "Status", width: 100, align: "left", - // formatter: function (cellvalue, row) { - // if (cellvalue === '1') { - // return '审批中'; - // } else if (cellvalue === '2') { - // return '已审核'; - // } else { - // return '草稿'; - // } - // } - //}, - { label: "备注", name: "Remark", width: 100, align: "left" }, + { + label: '英文名称', name: 'AAIEName', width: 100, align: 'left' + }, + { + label: '资产型号', name: 'AAIModel', width: 100, align: 'left' + }, + { + label: '生产厂家', name: 'AAIManufacturer', width: 100, align: 'left' + } ], height: 400, - mainId: 'Id', - reloadSelected: false, + mainId: 'AAIId', + reloadSelected: false }); + //$('#Ass_Acceptance').jfGrid({ + // headData: [ + // { label: "设备名称", name: "Name", width: 100, align: "left" }, + // { label: "品牌", name: "Manufacturer", width: 100, align: "left" }, + // { label: "规格型号", name: "Model", width: 100, align: "left" }, + // { label: "单位", name: "Unit", width: 100, align: "left" }, + // { label: "数量", name: "Stock", width: 100, align: "left" }, + // { label: "单价", name: "Price", width: 100, align: "left" }, + // { label: "总价", name: "TotalPrice", width: 100, align: "left" }, + // { + // label: "使用部门", name: "DepartmentId", width: 100, align: "left", + // formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('department', { + // key: value, + // callback: function (_data) { + // callback(_data.name); + // } + // }); + // } + // }, + // { + // label: "使用人", name: "UserID", width: 100, align: "left", + // formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsyncReal('user', { + // key: value, + // callback: function (_data) { + // callback(_data.name); + // } + // }); + // } + // }, + // { label: "放置地点", name: "Place", width: 100, align: "left" }, + // //{ + // // label: "状态", name: "Status", width: 100, align: "left", + // // formatter: function (cellvalue, row) { + // // if (cellvalue === '1') { + // // return '审批中'; + // // } else if (cellvalue === '2') { + // // return '已审核'; + // // } else { + // // return '草稿'; + // // } + // // } + // //}, + // { label: "备注", name: "Remark", width: 100, align: "left" }, + // ], + // height: 400, + // mainId: 'Id', + // reloadSelected: false, + //}); }, initData: function () { if (!!keyValue) { @@ -182,44 +253,65 @@ var bootstrap = function ($, learun) { }; refreshGirdData = function (temprow) { var ifnewrow = true; - $.each(tempdatra, function (key, val) { - if (tempdatra[key].MainId === temprow.Id) { - tempdatra[key] = temprow; - ifnewrow = false; - } - }); - if (ifnewrow) { - tempdatra.push(temprow); - } + var list = []; //总价计算 pricecount = 0; + $.each(temprow, + function (i, item) { + if (item.AIAssValue) { + pricecount = parseFloat(pricecount) + parseFloat(item.AIAssValue); + } + var entity = { + //AAICode: item.AICode, + AAICode: item.AICodeNumJY, + AAIName: item.AIASSName, + AAITId: item.AIASSClass, + AAIPrice: item.AIAssValue, + AAIUnit: item.AIUnits, + AAIEName: '', + AAIModel: item.AISpecificationtype, + AAIManufacturer: item.AIManufacturer, + AAIId: learun.newGuid() + } + list.push(entity); + + }); + + $.each(list, + function (j, item2) { + $.each(tempdatra, + function (key, val) { + + if (tempdatra[key].AAICode === item2.AAICode) { + tempdatra[key] = item2; + ifnewrow = false; + } + }); + if (ifnewrow) { + tempdatra.push(item2); + } + }); + + //var ifnewrow = true; + //$.each(tempdatra, function (key, val) { + // if (tempdatra[key].MainId === temprow.AICodeNumJY) { + // tempdatra[key] = temprow; + // ifnewrow = false; + // } + //}); + //if (ifnewrow) { + // tempdatra.push(temprow); + //} + for (var i = 0; i < tempdatra.length; i++) { - pricecount = parseFloat(pricecount) +parseFloat(tempdatra[i].TotalPrice); + //pricecount = parseFloat(pricecount) +parseFloat(tempdatra[i].TotalPrice); } $("#TotalPrice").val(pricecount); $('#Ass_Acceptance').jfGridSet('refreshdata', tempdatra.sort(sortNumber)); }; function sortNumber(a, b) { return 1;//a.AAIOrder - b.AAIOrder; - } - // 设置表单数据 - //setFormData = function (processId) { - // if (!!processId) { - // $.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoApply/GetFormDataByProcessId?processId=' + processId, function (data) { - // for (var id in data) { - // if (!!data[id] && data[id].length > 0) { - // $('#' + id).jfGridSet('refreshdata', data[id]); - // } - // else { - // if (id == 'Ass_AcceptanceMain') { - // keyValue = data[id].Id; - // } - // $('[data-table="' + id + '"]').lrSetFormData(data[id]); - // } - // } - // }); - // } - //} + }; // 验证数据是否填写完整 validForm = function () { if (!$('.lr-form-wrap').lrValidform()) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/FormView.js index f2672480e..32092db9c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/FormView.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/FormView.js @@ -109,53 +109,51 @@ var bootstrap = function ($, learun) { //}); $('#Ass_Acceptance').jfGrid({ headData: [ - { label: "设备名称", name: "Name", width: 100, align: "left" }, - { label: "品牌", name: "Manufacturer", width: 100, align: "left" }, - { label: "规格型号", name: "Model", width: 100, align: "left" }, - { label: "单位", name: "Unit", width: 100, align: "left" }, - { label: "数量", name: "Stock", width: 100, align: "left" }, - { label: "单价", name: "Price", width: 100, align: "left" }, - { label: "总价", name: "TotalPrice", width: 100, align: "left" }, { - label: "使用部门", name: "DepartmentId", width: 100, align: "left", - formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getAsync('department', { + label: '资产编号', name: 'AAICode', width: 150, align: 'left' + }, + { + label: '资产名称', name: 'AAIName', width: 150, align: 'left' + }, + { + label: '资产类别', name: 'AAITId', width: 150, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_AssetsType', key: value, + keyId: 'atid', callback: function (_data) { - callback(_data.name); + callback(_data['aname']); } }); } }, { - label: "使用人", name: "UserID", width: 100, align: "left", - formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getAsyncReal('user', { + label: '单价', name: 'AAIPrice', width: 100, align: 'left' + }, + { + label: '单位', name: 'AAIUnit', width: 80, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { key: value, + code: 'sldw', callback: function (_data) { - callback(_data.name); + callback(_data.text); } }); } }, - { label: "放置地点", name: "Place", width: 100, align: "left" }, - //{ - // label: "状态", name: "Status", width: 100, align: "left", - // formatter: function (cellvalue, row) { - // if (cellvalue === '1') { - // return '审批中'; - // } else if (cellvalue === '2') { - // return '已审核'; - // } else { - // return '草稿'; - // } - // } - //}, - { label: "备注", name: "Remark", width: 100, align: "left" }, + { + label: '英文名称', name: 'AAIEName', width: 100, align: 'left' + }, + { + label: '资产型号', name: 'AAIModel', width: 100, align: 'left' + }, + { + label: '生产厂家', name: 'AAIManufacturer', width: 100, align: 'left' + } ], height: 400, - mainId: 'Id', - reloadSelected: false, + mainId: 'AAIId', + reloadSelected: false }); }, initData: function () { @@ -240,7 +238,7 @@ var bootstrap = function ($, learun) { code: 200 }; if (!!callBack) { - callBack(res, {}, i); + callBack(res, i); } //var postData = {}; //var formData = $('[data-table="Ass_AcceptanceMain"]').lrGetFormData(); @@ -253,7 +251,7 @@ var bootstrap = function ($, learun) { //$.lrSaveForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/SaveForm?keyValue=' + keyValue, postData, function (res) { // // 保存成功后才回调 // if (!!callBack) { - // callBack(res, formData, i); + // callBack(res, i); // } //}); }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Index.js index cf83fb196..924ac219d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Index.js @@ -5,6 +5,7 @@ * 描 述:资产验收 */ var refreshGirdData; +var refreshGirdData2; var bootstrap = function ($, learun) { "use strict"; var processId = ''; @@ -92,7 +93,7 @@ var bootstrap = function ($, learun) { // 删除 $('#lr_delete').on('click', function () { - var keyValue = $('#gridtable').jfGridValue('ID'); + var keyValue = $('#gridtable').jfGridValue('Id'); if (learun.checkrow(keyValue)) { var SendFlag = $('#gridtable').jfGridValue('Status'); if (SendFlag != 0) { @@ -102,7 +103,7 @@ var bootstrap = function ($, learun) { learun.layerConfirm('是否确认删除该项!', function (res) { if (res) { learun.deleteForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/DeleteForm', { keyValue: keyValue }, function () { - refreshGirdData(); + refreshGirdData2(); }); } }); @@ -246,5 +247,8 @@ var bootstrap = function ($, learun) { page.search(); } }; + refreshGirdData2 = function () { + page.search(); + }; page.init(); } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/AssetManagementSystem/Ass_AcceptanceMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/AssetManagementSystem/Ass_AcceptanceMap.cs index 56e7fde37..8d6bd9c19 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/AssetManagementSystem/Ass_AcceptanceMap.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/AssetManagementSystem/Ass_AcceptanceMap.cs @@ -18,7 +18,7 @@ namespace Learun.Application.Mapping //表 this.ToTable("ASS_ACCEPTANCE"); //主键 - this.HasKey(t => t.ID); + this.HasKey(t => t.AAIId); #endregion #region 配置关系 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceBLL.cs index c7d278993..0a9115e17 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceBLL.cs @@ -89,31 +89,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem } } } - - /// - /// 获取主表实体数据 - /// - /// 流程实例ID - /// - public Ass_AcceptanceEntity GetEntityByProcessId(string processId) - { - try - { - return ass_AcceptanceService.GetEntityByProcessId(processId); - } - catch (Exception ex) - { - if (ex is ExceptionEx) - { - throw; - } - else - { - throw ExceptionEx.ThrowBusinessException(ex); - } - } - } - + #endregion #region 提交数据 @@ -183,26 +159,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem } } } - - public void ChangeStatusByProcessId(string parameterProcessId, int p1) - { - try - { - ass_AcceptanceService.ChangeStatusByProcessId(parameterProcessId, p1); - } - catch (Exception ex) - { - if (ex is ExceptionEx) - { - throw; - } - else - { - throw ExceptionEx.ThrowBusinessException(ex); - } - } - } - + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceEntity.cs index fc4b9a2bc..ef8885d5e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceEntity.cs @@ -13,92 +13,126 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem /// public class Ass_AcceptanceEntity { - #region 实体成员 + #region 实体成员 /// - /// 编号 + /// AAIId /// - [Column("ID")] - public string ID { get; set; } + [Column("AAIID")] + public string AAIId { get; set; } /// - /// 编号 + /// MAINID /// [Column("MAINID")] public string MainId { get; set; } - /// - /// 设备名称 + /// AAICode /// - [Column("NAME")] - public string Name { get; set; } + [Column("AAICODE")] + public string AAICode { get; set; } /// - /// 品牌 + /// AAIName /// - [Column("MANUFACTURER")] - public string Manufacturer { get; set; } + [Column("AAINAME")] + public string AAIName { get; set; } /// - /// 规格型号 + /// AAITId /// - [Column("MODEL")] - public string Model { get; set; } + [Column("AAITID")] + public string AAITId { get; set; } /// - /// 单位 + /// AAIEName /// - [Column("UNIT")] - public string Unit { get; set; } + [Column("AAIENAME")] + public string AAIEName { get; set; } /// - /// 数量 + /// AAIPhoto /// - [Column("STOCK")] - public int? Stock { get; set; } + [Column("AAIPHOTO")] + public string AAIPhoto { get; set; } /// - /// 单价 + /// AAIContent /// - [Column("PRICE")] - public decimal? Price { get; set; } + [Column("AAICONTENT")] + public string AAIContent { get; set; } /// - /// 总价 + /// AAIOrder /// - [Column("TOTALPRICE")] - public decimal? TotalPrice { get; set; } + [Column("AAIORDER")] + public int? AAIOrder { get; set; } /// - /// 使用部门 + /// AAIModel /// - [Column("DEPARTMENTID")] - public string DepartmentId { get; set; } + [Column("AAIMODEL")] + public string AAIModel { get; set; } /// - /// 放置地点 + /// AAIManufacturer /// - [Column("PLACE")] - public string Place { get; set; } + [Column("AAIMANUFACTURER")] + public string AAIManufacturer { get; set; } /// - /// 使用人 + /// AAISupplierId /// - [Column("USERID")] - public string UserID { get; set; } + [Column("AAISUPPLIERID")] + public string AAISupplierId { get; set; } /// - /// 备注 + /// AAISource /// - [Column("REMARK")] - public string Remark { get; set; } + [Column("AAISOURCE")] + public string AAISource { get; set; } /// - /// 流程id + /// AAIPrice /// - [Column("PROCESSID")] - public string ProcessId { get; set; } + [Column("AAIPRICE")] + public decimal? AAIPrice { get; set; } + + /// + /// AAISTOCK + /// + [Column("AAISTOCK")] + public decimal? AAIStock { get; set; } + /// + /// AAIUNIT + /// + [Column("AAIUNIT")] + public string AAIUnit { get; set; } /// - /// 审核状态 + /// AAIREALNUM /// - [Column("STATUS")] - public string Status { get; set; } + [Column("AAIREALNUM")] + public decimal? AAIRealNum { get; set; } + + /// + /// AAIREALNUM + /// + [Column("AISCHECK")] + public bool? AIsCheck { get; set; } + + /// + /// AResult + /// + [Column("ARESULT")] + public int? AResult { get; set; } + /// + /// ARemark + /// + [Column("AREMARK")] + public string ARemark { get; set; } + /// + /// AAddress + /// + [Column("AADDRESS")] + public string AAddress { get; set; } + + #endregion - #region 扩展操作 + #region 扩展操作 /// /// 新增调用 /// public void Create() { - this.ID = Guid.NewGuid().ToString(); + this.AAIId = Guid.NewGuid().ToString(); } /// /// 编辑调用 @@ -106,10 +140,27 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem /// public void Modify(string keyValue) { - this.ID = keyValue; + this.AAIId = keyValue; + } + + + /// + /// 新增调用 + /// + public void Create(UserInfo userInfo) + { + this.AAIId = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue, UserInfo userInfo) + { + this.AAIId = keyValue; } #endregion - #region 扩展字段 + #region 扩展字段 #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceIBLL.cs index 6efa1614a..4b83ca492 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceIBLL.cs @@ -29,12 +29,6 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem /// 主键 /// Ass_AcceptanceEntity GetAss_AcceptanceEntity(string keyValue); - /// - /// 获取主表实体数据 - /// - /// 流程实例ID - /// - Ass_AcceptanceEntity GetEntityByProcessId(string processId); #endregion #region 提交数据 @@ -53,6 +47,5 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem #endregion void ChangeStatusById(string keyValue, int i, string processId); - void ChangeStatusByProcessId(string parameterProcessId, int p1); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceService.cs index 0d602d828..c6d9d6e66 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Acceptance/Ass_AcceptanceService.cs @@ -32,19 +32,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem var strSql = new StringBuilder(); strSql.Append("SELECT "); strSql.Append(@" - t.ID, - t.Name, - t.Manufacturer, - t.Model, - t.Unit, - t.Stock, - t.Price, - t.TotalPrice, - t.DepartmentId, - t.Place, - t.UserID, - t.Status, - t.Remark + t.* "); strSql.Append(" FROM Ass_Acceptance t "); strSql.Append(" WHERE 1=1 "); @@ -128,31 +116,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem } } } - - /// - /// 获取主表实体数据 - /// - /// 流程实例ID - /// - public Ass_AcceptanceEntity GetEntityByProcessId(string processId) - { - try - { - return this.BaseRepository().FindEntity(t => t.ProcessId == processId); - } - catch (Exception ex) - { - if (ex is ExceptionEx) - { - throw; - } - else - { - throw ExceptionEx.ThrowServiceException(ex); - } - } - } - + #endregion #region 提交数据 @@ -165,7 +129,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem { try { - this.BaseRepository().Delete(t => t.ID == keyValue); + this.BaseRepository().Delete(t => t.AAIId == keyValue); } catch (Exception ex) { @@ -228,23 +192,6 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem } } - public void ChangeStatusByProcessId(string parameterProcessId, int p1) - { - try - { - var entity = this.BaseRepository() - .FindEntity(a => a.ProcessId == parameterProcessId); - if (null != entity) - { - entity.Status = p1.ToString(); - } - - this.BaseRepository().Update(entity); - } - catch (Exception ex) - { - throw ExceptionEx.ThrowServiceException(ex); - } - } + } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AcceptanceMain/Ass_AcceptanceMainService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AcceptanceMain/Ass_AcceptanceMainService.cs index baa82d7f8..f081e5df7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AcceptanceMain/Ass_AcceptanceMainService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AcceptanceMain/Ass_AcceptanceMainService.cs @@ -125,6 +125,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem try { this.BaseRepository().Delete(t => t.Id == keyValue); + this.BaseRepository().Delete(t => t.MainId == keyValue); } catch (Exception ex) {