Browse Source

【修改】合同类别管理、合同台账管理:列表改成读取Java表的数据;开具发票:项目名称列的绑定;

yanshi
dyy 2 years ago
parent
commit
4faa032773
17 changed files with 395 additions and 45 deletions
  1. +22
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/ContractStandingBookController.cs
  2. +5
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/ContractStandingBook/Index.cshtml
  3. +34
    -21
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/ContractStandingBook/Index.js
  4. +10
    -10
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtInvoice/Index.js
  5. +21
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ContractCategoryController.cs
  6. +4
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ContractCategory/Index.cshtml
  7. +4
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ContractCategory/Index.js
  8. +25
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/ContractStandingBook/ContractStandingBookBLL.cs
  9. +121
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/ContractStandingBook/ContractStandingBookEntity.cs
  10. +8
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/ContractStandingBook/ContractStandingBookIBLL.cs
  11. +39
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/ContractStandingBook/ContractStandingBookService.cs
  12. +10
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtInvoice/DtInvoiceEntity.cs
  13. +4
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtInvoice/DtInvoiceService.cs
  14. +24
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ContractCategory/ContractCategoryBLL.cs
  15. +21
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ContractCategory/ContractCategoryEntity.cs
  16. +7
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ContractCategory/ContractCategoryIBLL.cs
  17. +36
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ContractCategory/ContractCategoryService.cs

+ 22
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/ContractStandingBookController.cs View File

@@ -80,6 +80,28 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers
};
return Success(jsonData);
}

/// <summary>
/// 获取页面显示列表数据【MySQL】
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList2(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = contractStandingBookIBLL.GetPageList2(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>


+ 5
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/ContractStandingBook/Index.cshtml View File

@@ -12,9 +12,9 @@
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">合同名称</div>
<div id="ContractId"></div>
<input id="ContractId" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
@*<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">合同已支付金额</div>
<input id="PayAmount" type="text" class="form-control" />
</div>
@@ -25,7 +25,7 @@
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">合同份数</div>
<input id="Num" type="text" class="form-control" />
</div>
</div>*@
</div>
</div>
</div>
@@ -35,10 +35,10 @@
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
@*<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>*@
</div>
</div>
</div>


+ 34
- 21
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/ContractStandingBook/Index.js View File

@@ -16,7 +16,7 @@ var bootstrap = function ($, learun) {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#ContractId').lrDataSourceSelect({ code: 'ContractInfo',value: 'id',text: 'name' });
//$('#ContractId').lrDataSourceSelect({ code: 'ContractInfo',value: 'id',text: 'name' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
@@ -70,28 +70,41 @@ var bootstrap = function ($, learun) {
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/CustomFunction/ContractStandingBook/GetPageList',
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/CustomFunction/ContractStandingBook/GetPageList2',
headData: [
{ label: "合同名称", name: "ContractId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'ContractInfo',
key: value,
keyId: 'id',
callback: function (_data) {
callback(_data['name']);
}
});
}},
{ label: "合同已支付金额", name: "PayAmount", width: 100, align: "left"},
{ label: "合同余款", name: "Balance", width: 100, align: "left"},
{ label: "合同份数", name: "Num", width: 100, align: "left"},
{ label: "合同履行情况", name: "Desc", width: 100, align: "left"},
{ label: "备注", name: "Remark", width: 100, align: "left"},
{ label: "合同类别", name: "contract_category_name", width: 100, align: "left"},
{ label: "项目名称", name: "project_name", width: 300, align: "left"},
{ label: "合同名称", name: "contract_name", width: 100, align: "left"},
{ label: "单位名称", name: "unit_name", width: 100, align: "left"},
{ label: "合同人数", name: "contract_population", width: 100, align: "left"},
{ label: "公司名称", name: "company_name", width: 100, align: "left"},
{ label: "合同金额", name: "contract_money", width: 100, align: "left"},
{ label: "人均费用", name: "per_cost", width: 100, align: "left"},
{ label: "签署日期", name: "signing_date", width: 100, align: "left"},
{ label: "培训天数", name: "day", width: 100, align: "left"},
{
label: "状态", name: "status", width: 100, align: "left", formatter: function (cellvalue) {
if (cellvalue == 5) {
return '<span class=\"label label-default\" style=\"cursor: pointer;\">草稿</span>';
} else if (cellvalue == 0) {
return '<span class=\"label label-warning\" style=\"cursor: pointer;\">待审</span>';
} else if (cellvalue == 1) {
return '<span class=\"label label-warning\" style=\"cursor: pointer;\">审核中</span>';
} else if (cellvalue == 2) {
return '<span class=\"label label-success\" style=\"cursor: pointer;\">已审核</span>';
} else if (cellvalue == 3) {
return '<span class=\"label label-danger\" style=\"cursor: pointer;\">已驳回</span>';
} else if (cellvalue == 4) {
return '<span class=\"label label-danger\" style=\"cursor: pointer;\">已撤销</span>';
}
}
},
],
mainId:'Id',
isPage: true
mainId:'id',
isPage: true,
sidx: 'signing_date',
sord:'desc'
});
page.search();
},


+ 10
- 10
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtInvoice/Index.js View File

@@ -88,32 +88,32 @@ var bootstrap = function ($, learun) {
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGridLei({
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/DtInvoice/GetPageList2',
headData: [
{ label: "项目名称", name: "InvoiceName", width: 100, align: "left"},
{ label: "项目名称", name: "project_name", width: 300, align: "left"},
{ label: "合同", name: "contract_name", width: 100, align: "left" },
{ label: "发票号", name: "InvoiceNo", width: 100, align: "left"},
{ label: "开票日期", name: "InvoiceDate", width: 100, align: "left" },
{ label: "金额", name: "Amount", width: 100, align: "left" },
{ label: "发票金额", name: "Amount", width: 100, align: "left" },
{ label: "税率", name: "TaxRateFormat", width: 100, align: "left" },
{ label: "不含税价格", name: "unitPrice", width: 100, align: "left" },
{ label: "税费", name: "shuifei", width: 100, align: "left" },
{
label: "发票类型", name: "InvoiceType", width: 100, align: "left", formatter: function (value) {
return value == "0" ? "普票" : "专票";
}
},
{ label: "对方单位", name: "UnitName", width: 100, align: "left"},
{ label: "备注", name: "Remark", width: 100, align: "left"},
{ label: "对方单位", name: "UnitName", width: 100, align: "left" },
{
label: "是否开票", name: "zftype", width: 100, align: "left", formatter: function (value) {
return value == "0" ? "未开票" : "已开票";
}
},
{ label: "合同ID", name: "innvoicesettingsid", width: 100, align: "left"},
{ label: "开票日期", name: "InvoiceDate", width: 100, align: "left" },
{ label: "附件", name: "files", width: 100, align: "left"},
{ label: "税费", name: "shuifei", width: 100, align: "left"},
{ label: "到账日期", name: "date", width: 100, align: "left"},
{ label: "回款金额", name: "dzmoney", width: 100, align: "left"},
{ label: "备注", name: "Remark", width: 100, align: "left"},
//{ label: "到账日期", name: "date", width: 100, align: "left"},
//{ label: "回款金额", name: "dzmoney", width: 100, align: "left"},

//{ label: "发票类型", name: "InvoiceType", width: 100, align: "left",
// formatterAsync: function (callback, value, row, op,$cell) {


+ 21
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ContractCategoryController.cs View File

@@ -61,6 +61,27 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
};
return Success(jsonData);
}

/// <summary>
/// 获取页面显示列表数据【MySQL】
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList2(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = contractCategoryIBLL.GetPageList2(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// <summary>


+ 4
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ContractCategory/Index.cshtml View File

@@ -10,10 +10,10 @@
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
@*<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">类别编号</div>
<input id="Code" type="text" class="form-control" />
</div>
</div>*@
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">类别名称</div>
<input id="Name" type="text" class="form-control" />
@@ -27,9 +27,9 @@
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
@*<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>*@
</div>
</div>
</div>


+ 4
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ContractCategory/Index.js View File

@@ -65,12 +65,12 @@ var bootstrap = function ($, learun) {
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/PersonnelManagement/ContractCategory/GetPageList',
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/PersonnelManagement/ContractCategory/GetPageList2',
headData: [
{ label: "类别编号", name: "Code", width: 100, align: "left"},
{ label: "类别名称", name: "Name", width: 200, align: "left"},
{ label: "类别描述", name: "Description", width: 200, align: "left"},
{ label: "备注", name: "Description", width: 200, align: "left"},
{ label: "创建时间", name: "create_time", width: 150, align: "left"},
],
mainId:'Id',
isPage: true


+ 25
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/ContractStandingBook/ContractStandingBookBLL.cs View File

@@ -43,6 +43,31 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
}
}

/// <summary>
/// 获取页面显示列表数据【MySQL】
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<ContractStandingBookEntity> GetPageList2(Pagination pagination, string queryJson)
{
try
{
return contractStandingBookService.GetPageList2(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取ContractStandingBook表实体数据
/// </summary>


+ 121
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/ContractStandingBook/ContractStandingBookEntity.cs View File

@@ -113,6 +113,127 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
}
#endregion
#region 扩展字段
//mysql字段
/// <summary>
/// id
/// </summary>
[NotMapped]
public string id { get; set; }
/// <summary>
/// 合同类别id
/// </summary>
[NotMapped]
public string contract_category_id { get; set; }
/// <summary>
/// 合同类别名称
/// </summary>
[NotMapped]
public string contract_category_name { get; set; }
/// <summary>
/// 立项id
/// </summary>
[NotMapped]
public string project_information_id { get; set; }
/// <summary>
/// 项目名称
/// </summary>
[NotMapped]
public string project_name { get; set; }
/// <summary>
/// 合同名称
/// </summary>
[NotMapped]
public string contract_name { get; set; }
/// <summary>
/// 单位名称
/// </summary>
[NotMapped]
public string unit_name { get; set; }
/// <summary>
/// 人均费用
/// </summary>
[NotMapped]
public decimal? per_cost { get; set; }
/// <summary>
/// 天数
/// </summary>
[NotMapped]
public string day { get; set; }
/// <summary>
/// 公司名称
/// </summary>
[NotMapped]
public string company_name { get; set; }
/// <summary>
/// 合同金额
/// </summary>
[NotMapped]
public decimal? contract_money { get; set; }
/// <summary>
/// 合同人数
/// </summary>
[NotMapped]
public int? contract_population { get; set; }
/// <summary>
/// 签署日期
/// </summary>
[NotMapped]
public DateTime? signing_date { get; set; }
/// <summary>
/// 上传附件
/// </summary>
[NotMapped]
public string attachment { get; set; }
/// <summary>
/// 备注
/// </summary>
[NotMapped]
public string remark { get; set; }
/// <summary>
/// 创建人
/// </summary>
[NotMapped]
public string create_user { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[NotMapped]
public DateTime? create_time { get; set; }
/// <summary>
/// 修改人
/// </summary>
[NotMapped]
public string update_user { get; set; }
/// <summary>
/// 更新时间
/// </summary>
[NotMapped]
public DateTime? update_time { get; set; }
/// <summary>
/// 0、待审 1、审核中 2、已审核 3、已驳回 4、已撤销 5、草稿
/// </summary>
[NotMapped]
public int? status { get; set; }
/// <summary>
/// 是否已删除
/// </summary>
[NotMapped]
public int? is_deleted { get; set; }
/// <summary>
/// 租户
/// </summary>
[NotMapped]
public string tenant_id { get; set; }
/// <summary>
/// 合同执行开始时间
/// </summary>
[NotMapped]
public DateTime? start_date { get; set; }
/// <summary>
/// 合同执行结束时间
/// </summary>
[NotMapped]
public DateTime? end_date { get; set; }
#endregion
}
}


+ 8
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/ContractStandingBook/ContractStandingBookIBLL.cs View File

@@ -21,6 +21,14 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<ContractStandingBookEntity> GetPageList(Pagination pagination, string queryJson);

/// <summary>
/// 获取页面显示列表数据【MySQL】
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<ContractStandingBookEntity> GetPageList2(Pagination pagination, string queryJson);
/// <summary>
/// 获取ContractStandingBook表实体数据
/// </summary>


+ 39
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/ContractStandingBook/ContractStandingBookService.cs View File

@@ -96,6 +96,45 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
}
}

/// <summary>
/// 获取页面显示列表数据【MySQL】
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<ContractStandingBookEntity> GetPageList2(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT t.*,c.name as contract_category_name,p.name as project_name ");
strSql.Append(" FROM sw_contract_management t ");
strSql.Append(" left join sw_contract_category c on t.contract_category_id=c.id ");
strSql.Append(" left join sw_project_plan p on t.project_information_id=p.id ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["ContractId"].IsEmpty())
{
dp.Add("ContractId", "%" + queryParam["ContractId"].ToString() + "%", DbType.String);
strSql.Append(" AND t.contract_name Like @ContractId ");
}
return this.BaseRepository("waydbString").FindList<ContractStandingBookEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取ContractStandingBook表实体数据
/// </summary>


+ 10
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtInvoice/DtInvoiceEntity.cs View File

@@ -135,6 +135,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// </summary>
[NotMapped]
public string TaxRateFormat { get; set; }
/// <summary>
/// 项目名称
/// </summary>
[NotMapped]
public string project_name { get; set; }
/// <summary>
/// 合同名称
/// </summary>
[NotMapped]
public string contract_name { get; set; }
#endregion
}
}


+ 4
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtInvoice/DtInvoiceService.cs View File

@@ -103,10 +103,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
t.information as 'UnitName',
t.bz as 'Remark',
t.zftype,t.innvoicesettingsid,t.files,t.shuifei,t.date,t.dzmoney,
b.dict_value as 'TaxRateFormat'
b.dict_value as 'TaxRateFormat',
p.name as project_name,c.contract_name
");
strSql.Append(" FROM sw_invoice t ");
strSql.Append(" left join blade_dict b on t.people=b.dict_key ");
strSql.Append(" left join sw_project_plan p on t.name=p.id ");
strSql.Append(" left join sw_contract_management c on t.innvoicesettingsid=c.id ");
strSql.Append(" WHERE 1=1 and b.code='people' ");
var queryParam = queryJson.ToJObject();
// 虚拟参数


+ 24
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ContractCategory/ContractCategoryBLL.cs View File

@@ -42,6 +42,30 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
}

/// <summary>
/// 获取页面显示列表数据【MySQL】
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<ContractCategoryEntity> GetPageList2(Pagination pagination, string queryJson)
{
try
{
return contractCategoryService.GetPageList2(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取ContractCategory表实体数据
/// <param name="keyValue">主键</param>


+ 21
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ContractCategory/ContractCategoryEntity.cs View File

@@ -59,6 +59,27 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
#endregion
#region 扩展字段
//mysql字段
[NotMapped]
public string create_user { get; set; }
[NotMapped]
public DateTime? create_time { get; set; }
[NotMapped]
public string update_user { get; set; }
[NotMapped]
public DateTime? update_time { get; set; }
[NotMapped]
public int? status { get; set; }
/// <summary>
/// 是否已删除
/// </summary>
[NotMapped]
public int? is_deleted { get; set; }
/// <summary>
/// 租户
/// </summary>
[NotMapped]
public string tenant_id { get; set; }
#endregion
}
}


+ 7
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ContractCategory/ContractCategoryIBLL.cs View File

@@ -21,6 +21,13 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<ContractCategoryEntity> GetPageList(Pagination pagination, string queryJson);

/// <summary>
/// 获取页面显示列表数据【MySQL】
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<ContractCategoryEntity> GetPageList2(Pagination pagination, string queryJson);
/// <summary>
/// 获取ContractCategory表实体数据
/// <param name="keyValue">主键</param>


+ 36
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ContractCategory/ContractCategoryService.cs View File

@@ -60,6 +60,42 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
}

/// <summary>
/// 获取页面显示列表数据【MySQL】
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<ContractCategoryEntity> GetPageList2(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT t.id as Id,t.name as Name,t.remark as Description,t.create_user,t.create_time,t.update_user,t.update_time,t.status,t.is_deleted,t.tenant_id ");
strSql.Append(" FROM sw_contract_category t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["Name"].IsEmpty())
{
dp.Add("Name", "%" + queryParam["Name"].ToString() + "%", DbType.String);
strSql.Append(" AND t.name Like @Name ");
}
return this.BaseRepository("waydbString").FindList<ContractCategoryEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取ContractCategory表实体数据
/// <param name="keyValue">主键</param>


Loading…
Cancel
Save