Selaa lähdekoodia

Merge branch '长阳分支中职' of http://123.57.209.16:3000/bjquanjiang/DigitalScholl into 长阳分支中职

临城职教中职
zhangli 2 vuotta sitten
vanhempi
commit
bdd329c6a8
12 muutettua tiedostoa jossa 119 lisäystä ja 98 poistoa
  1. +29
    -9
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextbookInOutController.cs
  2. +17
    -14
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/Form.cshtml
  3. +18
    -10
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/Form.js
  4. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/Index.cshtml
  5. +8
    -10
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/Index.js
  6. +4
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  7. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextbookInOutMap.cs
  8. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutBLL.cs
  9. +7
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutEntity.cs
  10. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutIBLL.cs
  11. +27
    -46
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutService.cs
  12. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj

+ 29
- 9
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextbookInOutController.cs Näytä tiedosto

@@ -1,4 +1,5 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using Learun.Util; using Learun.Util;
using System.Data; using System.Data;
using System.Web.Mvc; using System.Web.Mvc;
@@ -12,9 +13,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
/// 日 期:2022-03-02 10:37 /// 日 期:2022-03-02 10:37
/// 描 述:教材库存表 /// 描 述:教材库存表
/// </summary> /// </summary>
public class TextbookInOutController : MvcControllerBase
public class TextBookInOutController : MvcControllerBase
{ {
private TextbookInOutIBLL textbookInOutIBLL = new TextbookInOutBLL();
private TextBookInOutIBLL textbookInOutIBLL = new TextbookInOutBLL();


#region 视图功能 #region 视图功能


@@ -25,7 +26,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
[HttpGet] [HttpGet]
public ActionResult Index() public ActionResult Index()
{ {
return View();
return View();
} }
/// <summary> /// <summary>
/// 表单页 /// 表单页
@@ -34,7 +35,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
[HttpGet] [HttpGet]
public ActionResult Form() public ActionResult Form()
{ {
return View();
ViewBag.BookCode = "KC" + DateTime.Now.ToString("yyyyMMddHHmm");
return View();
} }
#endregion #endregion


@@ -47,7 +49,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
[AjaxOnly] [AjaxOnly]
public ActionResult GetList( string queryJson )
public ActionResult GetList(string queryJson)
{ {
var data = textbookInOutIBLL.GetList(queryJson); var data = textbookInOutIBLL.GetList(queryJson);
return Success(data); return Success(data);
@@ -82,8 +84,12 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
[AjaxOnly] [AjaxOnly]
public ActionResult GetFormData(string keyValue) public ActionResult GetFormData(string keyValue)
{ {
var data = textbookInOutIBLL.GetEntity(keyValue);
return Success(data);
var TextBookInOutData = textbookInOutIBLL.GetEntity(keyValue);
var jsonData = new
{
TextBookInOut = TextBookInOutData,
};
return Success(jsonData);
} }
#endregion #endregion


@@ -110,8 +116,22 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
[HttpPost] [HttpPost]
[ValidateAntiForgeryToken] [ValidateAntiForgeryToken]
[AjaxOnly] [AjaxOnly]
public ActionResult SaveForm(string keyValue,TextbookInOutEntity entity)
public ActionResult SaveForm(string keyValue, string strEntity)
{ {
var loginUserInfo = LoginUserInfo.Get();
TextbookInOutEntity entity = strEntity.ToObject<TextbookInOutEntity>();
if (string.IsNullOrEmpty(keyValue))
{
entity.IsDel = 0;
entity.FinallyNum = 0;
entity.CreateTime = DateTime.Now;
entity.CrateUserID = loginUserInfo.userId;
}
else
{
entity.UpTime =DateTime.Now ;
entity.UpUserID = loginUserInfo.userId;
}
textbookInOutIBLL.SaveEntity(keyValue, entity); textbookInOutIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!"); return Success("保存成功!");
} }


+ 17
- 14
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/Form.cshtml Näytä tiedosto

@@ -2,50 +2,53 @@
ViewBag.Title = "教材库存表"; ViewBag.Title = "教材库存表";
Layout = "~/Views/Shared/_Form.cshtml"; Layout = "~/Views/Shared/_Form.cshtml";
} }
<div class="lr-form-wrap" id="body">
<div class="col-xs-6 lr-form-item" data-table="TextbookInOut">
<script>
var BookCode = "@ViewBag.BookCode";
</script>
<div class="lr-form-wrap" id="form">
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">库存编码<font face="宋体">*</font></div> <div class="lr-form-item-title">库存编码<font face="宋体">*</font></div>
<input id="BookCode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull " />
<input id="BookCode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull " readonly />
</div> </div>
<div class="col-xs-6 lr-form-item" data-table="TextbookInOut">
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">课程<font face="宋体">*</font></div> <div class="lr-form-item-title">课程<font face="宋体">*</font></div>
<div id="LessonNo" isvalid="yes" checkexpession="NotNull"></div> <div id="LessonNo" isvalid="yes" checkexpession="NotNull"></div>
</div> </div>
<div class="col-xs-12 lr-form-item" data-table="TextbookInOut">
<div class="col-xs-12 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">教材</div> <div class="lr-form-item-title">教材</div>
<input id="TextBookName" type="text" class="form-control" /> <input id="TextBookName" type="text" class="form-control" />
</div> </div>
<div class="col-xs-6 lr-form-item" data-table="TextbookInOut">
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">教材号</div> <div class="lr-form-item-title">教材号</div>
<input id="TextBookNo" type="text" class="form-control" readonly /> <input id="TextBookNo" type="text" class="form-control" readonly />
</div> </div>
<div class="col-xs-6 lr-form-item" data-table="TextbookInOut">
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">出版号</div> <div class="lr-form-item-title">出版号</div>
<input id="PublishNo" type="text" class="form-control" readonly /> <input id="PublishNo" type="text" class="form-control" readonly />
</div> </div>
<div class="col-xs-6 lr-form-item" data-table="TextbookInOut">
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">第一作者</div> <div class="lr-form-item-title">第一作者</div>
<input id="FirstAuthor" type="text" class="form-control" readonly /> <input id="FirstAuthor" type="text" class="form-control" readonly />
</div> </div>
<div class="col-xs-6 lr-form-item" data-table="TextbookInOut">
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">其他作者</div> <div class="lr-form-item-title">其他作者</div>
<input id="OtherAuthor" type="text" class="form-control" readonly /> <input id="OtherAuthor" type="text" class="form-control" readonly />
</div> </div>
<div class="col-xs-6 lr-form-item" data-table="TextbookInOut">
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">出版社</div> <div class="lr-form-item-title">出版社</div>
<input id="Publisher" type="text" class="form-control" readonly /> <input id="Publisher" type="text" class="form-control" readonly />
</div> </div>
<div class="col-xs-6 lr-form-item" data-table="TextbookInOut">
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">版次</div> <div class="lr-form-item-title">版次</div>
<input id="Edition" type="text" class="form-control" readonly /> <input id="Edition" type="text" class="form-control" readonly />
</div> </div>
<div class="col-xs-6 lr-form-item" data-table="TextbookInOut">
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">印次</div> <div class="lr-form-item-title">印次</div>
<input id="Impression" type="text" class="form-control" /> <input id="Impression" type="text" class="form-control" />
</div> </div>
<div class="col-xs-12 lr-form-item" data-table="TextbookInOut">
<div class="col-xs-12 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">备注</div> <div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height:100px;"></textarea> <textarea id="Remark" class="form-control" style="height:100px;"></textarea>
</div> </div>
</div> </div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextbookInOut/Form.js")
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookInOut/Form.js")

+ 18
- 10
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/Form.js Näytä tiedosto

@@ -74,27 +74,35 @@ var bootstrap = function ($, learun) {
$("#Impression").val(item.impression); $("#Impression").val(item.impression);
} }
}); });
$('#IsDel').val(0);
$('#FinallyNum').val(0);
$('#CreateTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
$('#CreateUserID')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
$('#CreateUserID').val(learun.clientdata.get(['userinfo']).realName);
}, },
initData: function () { initData: function () {
if (!!selectedRow) {
$('#form').lrSetFormData(selectedRow);
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookInOut/GetFormData?keyValue=' + keyValue, function (data) {
console.log(data);
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
} else {
$("#BookCode").val(BookCode);
} }
} }
}; };
// 保存数据 // 保存数据
acceptClick = function (callBack) { acceptClick = function (callBack) {
if (!$('form').lrValidform()) {
if (!$('body').lrValidform()) {
return false; return false;
} }
var postData = { var postData = {
strEntity: JSON.stringify($('form').lrGetFormData())
strEntity: JSON.stringify($('body').lrGetFormData())
}; };
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/TextbookInOut/SaveForm?keyValue=' + keyValue, postData, function (res) {
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/TextBookInOut/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调 // 保存成功后才回调
if (!!callBack) { if (!!callBack) {
callBack(); callBack();


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/Index.cshtml Näytä tiedosto

@@ -29,4 +29,4 @@
</div> </div>
</div> </div>
</div> </div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextbookInOut/Index.js")
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookInOut/Index.js")

+ 8
- 10
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/Index.js Näytä tiedosto

@@ -4,7 +4,6 @@
* 日 期:2022-03-02 10:37 * 日 期:2022-03-02 10:37
* 描 述:教材库存表 * 描 述:教材库存表
*/ */
var selectedRow;
var refreshGirdData; var refreshGirdData;
var bootstrap = function ($, learun) { var bootstrap = function ($, learun) {
"use strict"; "use strict";
@@ -26,13 +25,12 @@ var bootstrap = function ($, learun) {
}); });
// 新增 // 新增
$('#lr_add').on('click', function () { $('#lr_add').on('click', function () {
selectedRow = null;
learun.layerForm({ learun.layerForm({
id: 'form', id: 'form',
title: '新增', title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/TextbookInOut/Form',
url: top.$.rootUrl + '/EducationalAdministration/TextBookInOut/Form',
width: 700, width: 700,
height: 400,
height: 500,
callBack: function (id) { callBack: function (id) {
return top[id].acceptClick(refreshGirdData); return top[id].acceptClick(refreshGirdData);
} }
@@ -41,14 +39,13 @@ var bootstrap = function ($, learun) {
// 编辑 // 编辑
$('#lr_edit').on('click', function () { $('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID'); var keyValue = $('#gridtable').jfGridValue('ID');
selectedRow = $('#gridtable').jfGridGet('rowdata');
if (learun.checkrow(keyValue)) { if (learun.checkrow(keyValue)) {
learun.layerForm({ learun.layerForm({
id: 'form', id: 'form',
title: '编辑', title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/TextbookInOut/Form?keyValue=' + keyValue,
url: top.$.rootUrl + '/EducationalAdministration/TextBookInOut/Form?keyValue=' + keyValue,
width: 700, width: 700,
height: 400,
height: 500,
callBack: function (id) { callBack: function (id) {
return top[id].acceptClick(refreshGirdData); return top[id].acceptClick(refreshGirdData);
} }
@@ -61,7 +58,7 @@ var bootstrap = function ($, learun) {
if (learun.checkrow(keyValue)) { if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) { learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) { if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/TextbookInOut/DeleteForm', { keyValue: keyValue }, function () {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/TextBookInOut/DeleteForm', { keyValue: keyValue }, function () {
}); });
} }
}); });
@@ -70,7 +67,7 @@ var bootstrap = function ($, learun) {
}, },
initGird: function () { initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({ $('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/TextbookInOut/GetPageList',
url: top.$.rootUrl + '/EducationalAdministration/TextBookInOut/GetPageList',
headData: [ headData: [
{ label: '库存单号', name: 'BookCode', width: 200, align: "left" }, { label: '库存单号', name: 'BookCode', width: 200, align: "left" },
{ {
@@ -104,7 +101,8 @@ var bootstrap = function ($, learun) {


], ],
mainId: 'ID', mainId: 'ID',
isPage: true
isPage: true,
sidx: 'CreateTime desc'
}); });
page.search(); page.search();
}, },


+ 4
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Näytä tiedosto

@@ -6664,10 +6664,10 @@
<Content Include="Areas\EducationalAdministration\Views\TextBookSolSubDetail\Index.js" /> <Content Include="Areas\EducationalAdministration\Views\TextBookSolSubDetail\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookSolSubDetail\Form.cshtml" /> <Content Include="Areas\EducationalAdministration\Views\TextBookSolSubDetail\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookSolSubDetail\Form.js" /> <Content Include="Areas\EducationalAdministration\Views\TextBookSolSubDetail\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\TextbookInOut\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextbookInOut\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\TextbookInOut\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextbookInOut\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookInOut\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookInOut\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookInOut\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookInOut\Form.js" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElectivePre\" /> <Folder Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElectivePre\" />


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextbookInOutMap.cs Näytä tiedosto

@@ -10,9 +10,9 @@ namespace Learun.Application.Mapping
/// 日 期:2022-03-02 10:37 /// 日 期:2022-03-02 10:37
/// 描 述:教材库存表 /// 描 述:教材库存表
/// </summary> /// </summary>
public class TextbookInOutMap : EntityTypeConfiguration<TextbookInOutEntity>
public class TextBookInOutMap : EntityTypeConfiguration<TextbookInOutEntity>
{ {
public TextbookInOutMap()
public TextBookInOutMap()
{ {
#region 表、主键 #region 表、主键
//表 //表


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutBLL.cs Näytä tiedosto

@@ -12,7 +12,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// 日 期:2022-03-02 10:37 /// 日 期:2022-03-02 10:37
/// 描 述:教材库存表 /// 描 述:教材库存表
/// </summary> /// </summary>
public class TextbookInOutBLL : TextbookInOutIBLL
public class TextbookInOutBLL : TextBookInOutIBLL
{ {
private TextbookInOutService textbookInOutService = new TextbookInOutService(); private TextbookInOutService textbookInOutService = new TextbookInOutService();




+ 7
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutEntity.cs Näytä tiedosto

@@ -134,6 +134,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <returns></returns> /// <returns></returns>
[Column("REMARK")] [Column("REMARK")]
public string Remark { get; set; } public string Remark { get; set; }
/// <summary>
/// IsDel
/// </summary>
/// <returns></returns>
[Column("ISDEL")]
public int? IsDel { get; set; }
#endregion #endregion


#region 扩展操作 #region 扩展操作


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutIBLL.cs Näytä tiedosto

@@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// 日 期:2022-03-02 10:37 /// 日 期:2022-03-02 10:37
/// 描 述:教材库存表 /// 描 述:教材库存表
/// </summary> /// </summary>
public interface TextbookInOutIBLL
public interface TextBookInOutIBLL
{ {
#region 获取数据 #region 获取数据




+ 27
- 46
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutService.cs Näytä tiedosto

@@ -17,39 +17,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// </summary> /// </summary>
public class TextbookInOutService : RepositoryFactory public class TextbookInOutService : RepositoryFactory
{ {
#region 构造函数和属性

private string fieldSql;
/// <summary>
/// 构造方法
/// </summary>
public TextbookInOutService()
{
fieldSql=@"
t.ID,
t.InorOut,
t.BookCode,
t.LessonNo,
t.PublishNo,
t.TextBookNo,
t.TextBookName,
t.FirstAuthor,
t.OtherAuthor,
t.Pubdate,
t.Publisher,
t.Edition,
t.Impression,
t.CreateTime,
t.CrateUserID,
t.UpTime,
t.UpUserID,
t.FinallyNum,
t.variate,
t.Remark
";
}
#endregion

#region 获取数据 #region 获取数据


/// <summary> /// <summary>
@@ -57,19 +24,18 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// </summary> /// </summary>
/// <param name="queryJson">条件参数</param> /// <param name="queryJson">条件参数</param>
/// <returns></returns> /// <returns></returns>
public IEnumerable<TextbookInOutEntity> GetList( string queryJson )
public IEnumerable<TextbookInOutEntity> GetList(string queryJson)
{ {
try try
{ {
//参考写法 //参考写法
//var queryParam = queryJson.ToJObject();
// 虚拟参数
//var dp = new DynamicParameters(new { });
//dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
var queryParam = queryJson.ToJObject();
//虚拟参数
var dp = new DynamicParameters(new { });
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
var strSql = new StringBuilder(); var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(fieldSql);
strSql.Append(" FROM TextbookInOut t ");
strSql.Append("SELECT *");
strSql.Append(" FROM TextbookInOut t where 1=1 and ISDEl = 0 ");
return this.BaseRepository("CollegeMIS").FindList<TextbookInOutEntity>(strSql.ToString()); return this.BaseRepository("CollegeMIS").FindList<TextbookInOutEntity>(strSql.ToString());
} }
catch (Exception ex) catch (Exception ex)
@@ -96,10 +62,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
try try
{ {
var strSql = new StringBuilder(); var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(fieldSql);
strSql.Append(" FROM TextbookInOut t ");
return this.BaseRepository("CollegeMIS").FindList<TextbookInOutEntity>(strSql.ToString(), pagination);
strSql.Append("SELECT *");
strSql.Append(" FROM TextbookInOut t where 1=1 and IsDel = 0 ");
var queryParam = queryJson.ToJObject();
var dp = new DynamicParameters(new { });
if (!queryParam["keyword"].IsEmpty())
{
strSql.Append(" and ( t.TextBookNo like @keyword or t.TextBookName like @keyword or t.FirstAuthor like @keyword )");
dp.Add("keyword", "%" + queryParam["keyword"].ToString() + "%", DbType.String);
}
return this.BaseRepository("CollegeMIS").FindList<TextbookInOutEntity>(strSql.ToString(), dp, pagination);
} }
catch (Exception ex) catch (Exception ex)
{ {
@@ -148,12 +120,21 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="keyValue">主键</param> /// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue) public void DeleteEntity(string keyValue)
{ {
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try try
{ {
this.BaseRepository("CollegeMIS").Delete<TextbookInOutEntity>(t=>t.ID == keyValue);
var keyValueArr = keyValue.Split(',');
foreach (var item in keyValueArr)
{
var entity = BaseRepository("CollegeMIS").FindEntity<TextbookInOutEntity>(x => x.ID == item);
entity.IsDel = 1;
db.Update(entity);
}
db.Commit();
} }
catch (Exception ex) catch (Exception ex)
{ {
db.Rollback();
if (ex is ExceptionEx) if (ex is ExceptionEx)
{ {
throw; throw;


+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj Näytä tiedosto

@@ -1814,6 +1814,10 @@
<Compile Include="EducationalAdministration\TextBookSolSubDetail\TextBookSolSubDetailService.cs" /> <Compile Include="EducationalAdministration\TextBookSolSubDetail\TextBookSolSubDetailService.cs" />
<Compile Include="EducationalAdministration\TextBookSolSubDetail\TextBookSolSubDetailBLL.cs" /> <Compile Include="EducationalAdministration\TextBookSolSubDetail\TextBookSolSubDetailBLL.cs" />
<Compile Include="EducationalAdministration\TextBookSolSubDetail\TextBookSolSubDetailIBLL.cs" /> <Compile Include="EducationalAdministration\TextBookSolSubDetail\TextBookSolSubDetailIBLL.cs" />
<Compile Include="EducationalAdministration\TextBookInOut\TextBookInOutEntity.cs" />
<Compile Include="EducationalAdministration\TextBookInOut\TextBookInOutService.cs" />
<Compile Include="EducationalAdministration\TextBookInOut\TextBookInOutIBLL.cs" />
<Compile Include="EducationalAdministration\TextBookInOut\TextBookInOutBLL.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> <ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


Ladataan…
Peruuta
Tallenna