@@ -89,6 +89,20 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers | |||||
return Success(data); | return Success(data); | ||||
} | } | ||||
/// <summary> | |||||
/// 获取列表不带分页 | |||||
/// </summary> | |||||
/// <param name="queryJson"></param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetListHaoCai(string queryJson) | |||||
{ | |||||
var data = ass_AssetsInfoIBLL.GetListHaoCai(queryJson); | |||||
return Success(data); | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取左侧树形数据 | /// 获取左侧树形数据 | ||||
/// <summary> | /// <summary> | ||||
@@ -60,7 +60,7 @@ | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | ||||
<div class="lr-form-item-title">数量单位</div> | <div class="lr-form-item-title">数量单位</div> | ||||
<div id="AAIUnit" readonly="readonly"></div> | |||||
<div id="AAIUnit" ></div> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | ||||
<div class="lr-form-item-title">排序<font face="宋体">*</font></div> | <div class="lr-form-item-title">排序<font face="宋体">*</font></div> | ||||
@@ -60,7 +60,6 @@ var bootstrap = function ($, learun) { | |||||
if (values && values.length > 0) { | if (values && values.length > 0) { | ||||
//绑定 | //绑定 | ||||
$("#AAICode").attr("readonly", "readonly"); | $("#AAICode").attr("readonly", "readonly"); | ||||
$("#AAIUnit").attr("readonly", "readonly"); | |||||
$.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfo/GetFormData?keyValue=' + values[0], function (data) { | $.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfo/GetFormData?keyValue=' + values[0], function (data) { | ||||
data = data.Ass_AssetsInfo; | data = data.Ass_AssetsInfo; | ||||
for (var id in data) { | for (var id in data) { | ||||
@@ -80,7 +79,6 @@ var bootstrap = function ($, learun) { | |||||
unknowselect: function () { | unknowselect: function () { | ||||
$("#AAOldCode").find('span').text(""); | $("#AAOldCode").find('span').text(""); | ||||
$("#AAICode").removeAttr("readonly"); | $("#AAICode").removeAttr("readonly"); | ||||
$("#AAIUnit").removeAttr("readonly"); | |||||
$('#AAITId').lrselectSet(selectedRow.AAITId); | $('#AAITId').lrselectSet(selectedRow.AAITId); | ||||
$('#AAICode').val(""); | $('#AAICode').val(""); | ||||
$('#AAIName').val(selectedRow.AAIName); | $('#AAIName').val(selectedRow.AAIName); | ||||
@@ -71,7 +71,7 @@ var bootstrap = function ($, learun) { | |||||
treeParentId: 'atptid', | treeParentId: 'atptid', | ||||
treeValueId: 'atid', | treeValueId: 'atid', | ||||
treeTextId: 'aname', | treeTextId: 'aname', | ||||
dataUrl: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfo/GetList', | |||||
dataUrl: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfo/GetListHaoCai', | |||||
dataTreeId: 'ATId', | dataTreeId: 'ATId', | ||||
dataValueId: 'AId', | dataValueId: 'AId', | ||||
dataTextId: 'AName', | dataTextId: 'AName', | ||||
@@ -101,6 +101,10 @@ var bootstrap = function ($, learun) { | |||||
$.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfo/GetFormData?keyValue=' + values[0], function (data) { | $.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfo/GetFormData?keyValue=' + values[0], function (data) { | ||||
data = data.Ass_AssetsInfo; | data = data.Ass_AssetsInfo; | ||||
var rowIndex = $et.attr('rowindex'); | var rowIndex = $et.attr('rowindex'); | ||||
if (data.AAssType != 1) { | |||||
learun.alert.warning('请选择耗材属性的资产'); | |||||
return; | |||||
} | |||||
$input.val(data.AName); | $input.val(data.AName); | ||||
//$('#Ass_ReceiveItem')[0].dfop.running.rowdata[rowIndex]['jfgridRowData']['AName'] = data.AName; | //$('#Ass_ReceiveItem')[0].dfop.running.rowdata[rowIndex]['jfgridRowData']['AName'] = data.AName; | ||||
//$('.jfgrid-data-cell[colname="AName"][rowIndex="' + rowIndex + '"]').attr('title', data.AName).html(data.AName); | //$('.jfgrid-data-cell[colname="AName"][rowIndex="' + rowIndex + '"]').attr('title', data.AName).html(data.AName); | ||||
@@ -9,16 +9,16 @@ | |||||
<add name="CollegeMIS" connectionString="Server=192.168.2.126;Initial Catalog=CollegeMIS;User ID=sa;Password=bjqj@2015!" providerName="System.Data.SqlClient" /> | <add name="CollegeMIS" connectionString="Server=192.168.2.126;Initial Catalog=CollegeMIS;User ID=sa;Password=bjqj@2015!" providerName="System.Data.SqlClient" /> | ||||
<add name="hangfireString" connectionString="Server=192.168.2.126;Initial Catalog=Hangfire;User ID=sa;Password=bjqj@2015!" providerName="System.Data.SqlClient" />--> | <add name="hangfireString" connectionString="Server=192.168.2.126;Initial Catalog=Hangfire;User ID=sa;Password=bjqj@2015!" providerName="System.Data.SqlClient" />--> | ||||
<!--西昌--> | <!--西昌--> | ||||
<!--<add name="BaseDb" connectionString="Server=112.45.152.8;Initial Catalog=adms7ultimate2;User ID=sa;Password=qj@2018" providerName="System.Data.SqlClient" /> | |||||
<add name="BaseDb" connectionString="Server=112.45.152.8;Initial Catalog=adms7ultimate2;User ID=sa;Password=qj@2018" providerName="System.Data.SqlClient" /> | |||||
<add name="CollegeMIS" connectionString="Server=112.45.152.8;Initial Catalog=NewCollegeMIS;User ID=sa;Password=qj@2018" providerName="System.Data.SqlClient" /> | <add name="CollegeMIS" connectionString="Server=112.45.152.8;Initial Catalog=NewCollegeMIS;User ID=sa;Password=qj@2018" providerName="System.Data.SqlClient" /> | ||||
<add name="hangfireString" connectionString="Server=112.45.152.8;Initial Catalog=HangFire;User ID=sa;Password=qj@2018" providerName="System.Data.SqlClient" />--> | |||||
<add name="hangfireString" connectionString="Server=112.45.152.8;Initial Catalog=HangFire;User ID=sa;Password=qj@2018" providerName="System.Data.SqlClient" /> | |||||
<!--demo.quanjiang.com--> | <!--demo.quanjiang.com--> | ||||
<!--<add name="BaseDb" connectionString="Server=123.57.209.16;Initial Catalog=adms7ultimate2;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | <!--<add name="BaseDb" connectionString="Server=123.57.209.16;Initial Catalog=adms7ultimate2;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | ||||
<add name="CollegeMIS" connectionString="Server=123.57.209.16;Initial Catalog=CollegeMIS;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | <add name="CollegeMIS" connectionString="Server=123.57.209.16;Initial Catalog=CollegeMIS;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | ||||
<add name="hangfireString" connectionString="Server=123.57.209.16;Initial Catalog=Hangfire;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />--> | <add name="hangfireString" connectionString="Server=123.57.209.16;Initial Catalog=Hangfire;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />--> | ||||
<add name="BaseDb" connectionString="Server=123.57.209.16;Initial Catalog=adms7ultimate2_西昌;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | |||||
<!--<add name="BaseDb" connectionString="Server=123.57.209.16;Initial Catalog=adms7ultimate2_西昌;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | |||||
<add name="CollegeMIS" connectionString="Server=123.57.209.16;Initial Catalog=CollegeMIS_西昌;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | <add name="CollegeMIS" connectionString="Server=123.57.209.16;Initial Catalog=CollegeMIS_西昌;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | ||||
<add name="hangfireString" connectionString="Server=123.57.209.16;Initial Catalog=Hangfire;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | |||||
<add name="hangfireString" connectionString="Server=123.57.209.16;Initial Catalog=Hangfire;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />--> | |||||
<!--<add name="BaseDb" connectionString="Server=123.57.209.16;Initial Catalog=adms7ultimate2_20200403test;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | <!--<add name="BaseDb" connectionString="Server=123.57.209.16;Initial Catalog=adms7ultimate2_20200403test;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | ||||
<add name="CollegeMIS" connectionString="Server=123.57.209.16;Initial Catalog=CollegeMIS_20200403test;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | <add name="CollegeMIS" connectionString="Server=123.57.209.16;Initial Catalog=CollegeMIS_20200403test;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | ||||
@@ -201,6 +201,24 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||||
} | } | ||||
} | } | ||||
} | } | ||||
public IEnumerable<Ass_AssetsInfoEntity> GetListHaoCai(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return ass_AssetsInfoService.GetListHaoCai(queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public Ass_AssetsInfoEntity GetAss_AssetsInfoEntityByCode(string code) | public Ass_AssetsInfoEntity GetAss_AssetsInfoEntityByCode(string code) | ||||
@@ -57,6 +57,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||||
#endregion | #endregion | ||||
IEnumerable<Ass_AssetsInfoEntity> GetList(string queryJson); | IEnumerable<Ass_AssetsInfoEntity> GetList(string queryJson); | ||||
IEnumerable<Ass_AssetsInfoEntity> GetListHaoCai(string queryJson); | |||||
Ass_AssetsInfoEntity GetAss_AssetsInfoEntityByCode(string code); | Ass_AssetsInfoEntity GetAss_AssetsInfoEntityByCode(string code); | ||||
IEnumerable<Ass_AssetsInfoEntity> GetListByIds(List<string> ids); | IEnumerable<Ass_AssetsInfoEntity> GetListByIds(List<string> ids); | ||||
} | } | ||||
@@ -430,6 +430,58 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||||
} | } | ||||
} | } | ||||
} | } | ||||
public IEnumerable<Ass_AssetsInfoEntity> GetListHaoCai(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT top 100 "); | |||||
strSql.Append(@" | |||||
t.AId, | |||||
t.ACode, | |||||
t.AName, | |||||
t.ATId, | |||||
t.AEName, | |||||
t.AModel, | |||||
t.AManufacturer, | |||||
t.ASource, | |||||
t.APrice, | |||||
t.AStock, | |||||
t.AUnit, | |||||
t.HasDetail, | |||||
t.AOrder, | |||||
t.APhoto, | |||||
t.AContent | |||||
"); | |||||
strSql.Append(" FROM Ass_AssetsInfo t "); | |||||
strSql.Append(" WHERE 1=1 and AAssType=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["keyword"].IsEmpty()) | |||||
{ | |||||
dp.Add("ACode", "%" + queryParam["keyword"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND (t.ACode Like @ACode or t.AName Like @ACode) "); | |||||
} | |||||
if (!queryParam["ATId"].IsEmpty()) | |||||
{ | |||||
dp.Add("ATId", queryParam["ATId"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.ATId = @ATId "); | |||||
} | |||||
return this.BaseRepository().FindList<Ass_AssetsInfoEntity>(strSql.ToString(), dp); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
public Ass_AssetsInfoEntity GetAss_AssetsInfoEntityByCode(string code) | public Ass_AssetsInfoEntity GetAss_AssetsInfoEntityByCode(string code) | ||||
{ | { | ||||
@@ -277,10 +277,14 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||||
//读入库申请记录 | //读入库申请记录 | ||||
var assinfoapp = db.FindEntity<Ass_AssetsInfoApplyEntity>(m => m.AAProcessId == processId); | var assinfoapp = db.FindEntity<Ass_AssetsInfoApplyEntity>(m => m.AAProcessId == processId); | ||||
var assPurchase = db.FindEntity<Ass_PurchaseEntity>(a => a.PId == assinfoapp.PId); | var assPurchase = db.FindEntity<Ass_PurchaseEntity>(a => a.PId == assinfoapp.PId); | ||||
//通知申请人 | |||||
var purchaseApplyEntity = db.FindEntity<Ass_PurchaseApplyEntity>(a => a.PAId == assPurchase.PAId); | |||||
purchaseApplyEntity.PIsInStorage = "已入库"; | |||||
db.Update(purchaseApplyEntity); | |||||
if (null != assPurchase) | |||||
{ | |||||
//通知申请人 | |||||
var purchaseApplyEntity = db.FindEntity<Ass_PurchaseApplyEntity>(a => a.PAId == assPurchase.PAId); | |||||
purchaseApplyEntity.PIsInStorage = "已入库"; | |||||
db.Update(purchaseApplyEntity); | |||||
} | |||||
if (null != assPurchase) | if (null != assPurchase) | ||||
{ | { | ||||
assPurchase.PStoregeStatus = 2; | assPurchase.PStoregeStatus = 2; | ||||
@@ -424,12 +428,12 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||||
insertassinfoitem.AICodeNum = i + 1; | insertassinfoitem.AICodeNum = i + 1; | ||||
insertassinfoitem.AICode = insertAss_AssetsInfo.ACode + "_" + insertassinfoitem.AICodeNum.ToString(); | insertassinfoitem.AICode = insertAss_AssetsInfo.ACode + "_" + insertassinfoitem.AICodeNum.ToString(); | ||||
insertassinfoitem.AICodeNumJY = insertAss_AssetsInfo.ACode + "_" + insertassinfoitem.AICodeNum.ToString(); | insertassinfoitem.AICodeNumJY = insertAss_AssetsInfo.ACode + "_" + insertassinfoitem.AICodeNum.ToString(); | ||||
insertassinfoitem.AIAssValue = assinfoitem.APrice;//价值 | |||||
insertassinfoitem.AIUnits = assinfoitem.AUnit;//单位 | |||||
insertassinfoitem.AISpecificationtype = assinfoitem.AModel;//型号 | |||||
insertassinfoitem.AIManufacturer = assinfoitem.AManufacturer;//厂家 | |||||
insertassinfoitem.AIUse = assinfoitem.AUse;//用途 | |||||
insertassinfoitem.AISpecification = assinfoitem.ASpecification;//规格 | |||||
insertassinfoitem.AIAssValue = assitemapp.AAIPrice;//价值 | |||||
insertassinfoitem.AIUnits = assitemapp.AAIUnit;//单位 | |||||
insertassinfoitem.AISpecificationtype = assitemapp.AAIModel;//型号 | |||||
insertassinfoitem.AIManufacturer = assitemapp.AAIManufacturer;//厂家 | |||||
insertassinfoitem.AIUse = assitemapp.AAIUse;//用途 | |||||
insertassinfoitem.AISpecification = assitemapp.AAISpecification;//规格 | |||||
insertassinfoitem.AIASSName = assitemapp.AAIName; | insertassinfoitem.AIASSName = assitemapp.AAIName; | ||||
insertassinfoitem.AIIStorageId = assitemapp.AAIStorageId; | insertassinfoitem.AIIStorageId = assitemapp.AAIStorageId; | ||||
insertassinfoitem.AIAssType = assinfoapp.AAAssType; | insertassinfoitem.AIAssType = assinfoapp.AAAssType; | ||||
@@ -487,12 +491,12 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||||
insertassinfoitem.AICodeNum = 1; | insertassinfoitem.AICodeNum = 1; | ||||
insertassinfoitem.AICode = insertAss_AssetsInfo.ACode + "_" + insertassinfoitem.AICodeNum.ToString(); | insertassinfoitem.AICode = insertAss_AssetsInfo.ACode + "_" + insertassinfoitem.AICodeNum.ToString(); | ||||
insertassinfoitem.AICodeNumJY = insertAss_AssetsInfo.ACode + "_" + insertassinfoitem.AICodeNum.ToString(); | insertassinfoitem.AICodeNumJY = insertAss_AssetsInfo.ACode + "_" + insertassinfoitem.AICodeNum.ToString(); | ||||
insertassinfoitem.AIAssValue = assinfoitem.APrice;//价值 | |||||
insertassinfoitem.AIUnits = assinfoitem.AUnit;//单位 | |||||
insertassinfoitem.AISpecificationtype = assinfoitem.AModel;//型号 | |||||
insertassinfoitem.AIManufacturer = assinfoitem.AManufacturer;//厂家 | |||||
insertassinfoitem.AIUse = assinfoitem.AUse;//用途 | |||||
insertassinfoitem.AISpecification = assinfoitem.ASpecification;//规格 | |||||
insertassinfoitem.AIAssValue = assitemapp.AAIPrice;//价值 | |||||
insertassinfoitem.AIUnits = assitemapp.AAIUnit;//单位 | |||||
insertassinfoitem.AISpecificationtype = assitemapp.AAIModel;//型号 | |||||
insertassinfoitem.AIManufacturer = assitemapp.AAIManufacturer;//厂家 | |||||
insertassinfoitem.AIUse = assitemapp.AAIUse;//用途 | |||||
insertassinfoitem.AISpecification = assitemapp.AAISpecification;//规格 | |||||
insertassinfoitem.AIASSName = assitemapp.AAIName; | insertassinfoitem.AIASSName = assitemapp.AAIName; | ||||
insertassinfoitem.AIIStorageId = assitemapp.AAIStorageId; | insertassinfoitem.AIIStorageId = assitemapp.AAIStorageId; | ||||
insertassinfoitem.AIAssType = assinfoapp.AAAssType; | insertassinfoitem.AIAssType = assinfoapp.AAAssType; | ||||