Переглянути джерело

【修改】勤工俭学管理-岗位管理:完善表字段、列、按钮、;

master
dyy 3 роки тому
джерело
коміт
8ec55699d5
11 змінених файлів з 262 додано та 59 видалено
  1. +22
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/WorkStudyPositionController.cs
  2. +23
    -7
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPosition/Form.cshtml
  3. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPosition/Form.js
  4. +7
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPosition/Index.cshtml
  5. +76
    -14
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPosition/Index.js
  6. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  7. +4
    -4
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM
  8. +24
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WorkStudyPosition/WorkStudyPositionBLL.cs
  9. +69
    -16
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WorkStudyPosition/WorkStudyPositionEntity.cs
  10. +7
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WorkStudyPosition/WorkStudyPositionIBLL.cs
  11. +27
    -10
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WorkStudyPosition/WorkStudyPositionService.cs

+ 22
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/WorkStudyPositionController.cs Переглянути файл

@@ -3,6 +3,7 @@ using System.Data;
using Learun.Application.TwoDevelopment.PersonnelManagement;
using System.Web.Mvc;
using System.Collections.Generic;
using System;

namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
{
@@ -26,7 +27,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
[HttpGet]
public ActionResult Index()
{
return View();
return View();
}
/// <summary>
/// 表单页
@@ -35,7 +36,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
[HttpGet]
public ActionResult Form()
{
return View();
return View();
}
#endregion

@@ -69,8 +70,9 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var WorkStudyPositionData = workStudyPositionIBLL.GetWorkStudyPositionEntity( keyValue );
var jsonData = new {
var WorkStudyPositionData = workStudyPositionIBLL.GetWorkStudyPositionEntity(keyValue);
var jsonData = new
{
WorkStudyPosition = WorkStudyPositionData,
};
return Success(jsonData);
@@ -102,9 +104,24 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
public ActionResult SaveForm(string keyValue, string strEntity)
{
WorkStudyPositionEntity entity = strEntity.ToObject<WorkStudyPositionEntity>();
workStudyPositionIBLL.SaveEntity(keyValue,entity);
entity.CreateUserId = LoginUserInfo.Get().userId;
entity.CreateTime = DateTime.Now;
workStudyPositionIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}

/// <summary>
/// 发布实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DoPublish(string keyValue, string status)
{
workStudyPositionIBLL.DoPublish(keyValue, status);
return Success("操作成功!");
}
#endregion

}


+ 23
- 7
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPosition/Form.cshtml Переглянути файл

@@ -3,21 +3,37 @@
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap">
<div class="col-xs-12 lr-form-item" data-table="WorkStudyPosition" >
<div class="col-xs-12 lr-form-item" data-table="WorkStudyPosition">
<div class="lr-form-item-title">岗位名称<font face="宋体">*</font></div>
<input id="Name" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="WorkStudyPosition" >
<div class="col-xs-12 lr-form-item" data-table="WorkStudyPosition">
<div class="lr-form-item-title">需要人数<font face="宋体">*</font></div>
<input id="NeedNum" type="text" class="form-control" isvalid="yes" checkexpession="PositiveInteger" />
</div>
<div class="col-xs-12 lr-form-item" data-table="WorkStudyPosition">
<div class="lr-form-item-title">学期</div>
<input id="Semester" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="WorkStudyPosition">
<div class="lr-form-item-title">薪资(元/月)<font face="宋体">*</font></div>
<input id="Salary" type="text" class="form-control" isvalid="yes" checkexpession="PositiveFloatintZero" />
</div>
<div class="col-xs-12 lr-form-item" data-table="WorkStudyPosition">
<div class="lr-form-item-title">是否面试<font face="宋体">*</font></div>
<div id="IsInterview" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="WorkStudyPosition">
<div class="lr-form-item-title">岗位内容<font face="宋体">*</font></div>
<textarea id="Content" class="form-control" style="height:100px;" isvalid="yes" checkexpession="NotNull" ></textarea>
<textarea id="Content" class="form-control" style="height:100px;" isvalid="yes" checkexpession="NotNull"></textarea>
</div>
<div class="col-xs-12 lr-form-item" data-table="WorkStudyPosition" >
<div class="col-xs-12 lr-form-item" data-table="WorkStudyPosition">
<div class="lr-form-item-title">岗位要求</div>
<textarea id="Require" class="form-control" style="height:100px;" ></textarea>
<textarea id="Require" class="form-control" style="height:100px;"></textarea>
</div>
<div class="col-xs-12 lr-form-item" data-table="WorkStudyPosition" >
<div class="col-xs-12 lr-form-item" data-table="WorkStudyPosition">
<div class="lr-form-item-title">备注</div>
<input id="Remark" type="text" class="form-control" />
<input id="Remark" type="text" class="form-control" />
</div>
</div>
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/WorkStudyPosition/Form.js")

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPosition/Form.js Переглянути файл

@@ -15,6 +15,7 @@ var bootstrap = function ($, learun) {
page.initData();
},
bind: function () {
$('#IsInterview').lrDataItemSelect({ code: 'YesOrNoBit' });
},
initData: function () {
if (!!keyValue) {


+ 7
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPosition/Index.cshtml Переглянути файл

@@ -2,7 +2,7 @@
ViewBag.Title = "岗位管理";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout " >
<div class="lr-layout ">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
@@ -23,10 +23,14 @@
<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_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></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>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_publish" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;发布</a>
<a id="lr_cancelPublish" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;取消发布</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>


+ 76
- 14
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPosition/Index.js Переглянути файл

@@ -22,12 +22,12 @@ var bootstrap = function ($, learun) {
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/PersonnelManagement/WorkStudyPosition/Form',
width: 600,
height: 400,
width: 800,
height: 600,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
@@ -37,12 +37,17 @@ var bootstrap = function ($, learun) {
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status == 1) {
learun.alert.warning("当前项已发布!");
return false;
}
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/PersonnelManagement/WorkStudyPosition/Form?keyValue=' + keyValue,
width: 600,
height: 400,
width: 800,
height: 600,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
@@ -53,9 +58,50 @@ var bootstrap = function ($, learun) {
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status == 1) {
learun.alert.warning("当前项已发布!");
return false;
}
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/WorkStudyPosition/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
// 发布
$('#lr_publish').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status == 1) {
learun.alert.warning("当前项已发布!");
return false;
}
learun.layerConfirm('是否确认发布该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/PersonnelManagement/WorkStudyPosition/DoPublish', { keyValue: keyValue, status: "1" }, function () {
refreshGirdData();
});
}
});
}
});
// 取消发布
$('#lr_cancelPublish').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status != 1) {
learun.alert.warning("当前项未发布!");
return false;
}
learun.layerConfirm('是否确认取消发布该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/WorkStudyPosition/DeleteForm', { keyValue: keyValue}, function () {
learun.postForm(top.$.rootUrl + '/PersonnelManagement/WorkStudyPosition/DoPublish', { keyValue: keyValue, status: "0" }, function () {
refreshGirdData();
});
}
@@ -68,19 +114,35 @@ var bootstrap = function ($, learun) {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/PersonnelManagement/WorkStudyPosition/GetPageList',
headData: [
{ label: "岗位名称", name: "Name", width: 100, align: "left"},
{ label: "岗位内容", name: "Content", width: 100, align: "left"},
{ label: "岗位要求", name: "Require", width: 100, align: "left"},
{ label: "备注", name: "Remark", width: 100, align: "left"},
{ label: '岗位名称', name: 'Name', width: 100, align: "left" },
{ label: '岗位内容', name: 'Content', width: 200, align: "left" },
{ label: '岗位要求', name: 'Require', width: 200, align: "left" },
{ label: '需要人数', name: 'NeedNum', width: 100, align: "left" },
{ label: '已录用人数', name: 'EmployNum', width: 100, align: "left" },
{ label: '学期', name: 'Semester', width: 100, align: "left" },
{ label: '薪资(元/月)', name: 'Salary', width: 100, align: "left" },
{
label: '是否面试', name: 'IsInterview', width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == true ? "是" : "否";
}
},
{
label: '发布状态', name: 'Status', width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == 1 ? "已发布" : "未发布";
}
},
],
mainId:'Id',
isPage: true
mainId: 'Id',
isPage: true,
sidx: 'CreateTime desc'
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Переглянути файл

@@ -1394,6 +1394,7 @@
<Content Include="Areas\PersonnelManagement\Views\ContractManagement\FormRenew.js" />
<Content Include="Areas\PersonnelManagement\Views\FundExaminer\Form.js" />
<Content Include="Areas\PersonnelManagement\Views\FundExaminer\Index.js" />
<Content Include="Areas\PersonnelManagement\Views\LeagueMember\ModifyForm.js" />
<Content Include="Areas\PersonnelManagement\Views\MeetingManagement\FormView.js" />
<Content Include="Areas\PersonnelManagement\Views\MeetingManagement\IndexOfMyApply.js" />
<Content Include="Areas\PersonnelManagement\Views\MeetingManagement\IndexOfMyJoin.js" />
@@ -7220,6 +7221,7 @@
<Content Include="Areas\EducationalAdministration\Views\Dispatch\Print.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoSemster\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoSemster\Index.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\LeagueMember\ModifyForm.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<Content Include="Areas\PersonnelManagement\Views\MeetingManagement\IndexOfMyJoin.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\MeetingSignInRecord\IndexAttendance.cshtml" />


+ 4
- 4
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM Переглянути файл

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<?PowerDesigner AppLocale="UTF16" ID="{88086B01-C9E1-11D4-9552-0090277716A9}" Label="" LastModificationDate="1624612603" Name="Physical Data Model 1" Objects="3558" Symbols="402" Target="Microsoft SQL Server 2008" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
<?PowerDesigner AppLocale="UTF16" ID="{88086B01-C9E1-11D4-9552-0090277716A9}" Label="" LastModificationDate="1624615891" Name="Physical Data Model 1" Objects="3558" Symbols="402" Target="Microsoft SQL Server 2008" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
<!-- do not edit this file -->

<Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
@@ -35804,11 +35804,11 @@ B9AF
<a:Code>Salary</a:Code>
<a:CreationDate>1624611298</a:CreationDate>
<a:Creator>edz</a:Creator>
<a:ModificationDate>1624611584</a:ModificationDate>
<a:ModificationDate>1624615891</a:ModificationDate>
<a:Modifier>edz</a:Modifier>
<a:Comment>薪资(元/月)</a:Comment>
<a:DataType>decimal(5,2)</a:DataType>
<a:Length>5</a:Length>
<a:DataType>decimal(10,2)</a:DataType>
<a:Length>10</a:Length>
<a:Precision>2</a:Precision>
</o:Column>
<o:Column Id="o2249">


+ 24
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WorkStudyPosition/WorkStudyPositionBLL.cs Переглянути файл

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

/// <summary>
/// 发布实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void DoPublish(string keyValue, string status)
{
try
{
workStudyPositionService.DoPublish(keyValue, status);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}


+ 69
- 16
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WorkStudyPosition/WorkStudyPositionEntity.cs Переглянути файл

@@ -13,32 +13,85 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
/// </summary>
public class WorkStudyPositionEntity
{
#region 实体成员
/// <summary>
/// 主键
/// </summary>
#region 实体成员
/// <summary>
/// 主键
/// </summary>
/// <returns></returns>
[Column("ID")]
public string Id { get; set; }
/// <summary>
/// 岗位名称
/// </summary>
/// <summary>
/// 岗位名称
/// </summary>
/// <returns></returns>
[Column("NAME")]
public string Name { get; set; }
/// <summary>
/// 岗位内容
/// </summary>
/// <summary>
/// 岗位内容
/// </summary>
/// <returns></returns>
[Column("CONTENT")]
public string Content { get; set; }
/// <summary>
/// 岗位要求
/// </summary>
/// <summary>
/// 岗位要求
/// </summary>
/// <returns></returns>
[Column("REQUIRE")]
public string Require { get; set; }
/// <summary>
/// 备注
/// </summary>
/// <summary>
/// 备注
/// </summary>
/// <returns></returns>
[Column("REMARK")]
public string Remark { get; set; }
/// <summary>
/// 需要人数
/// </summary>
/// <returns></returns>
[Column("NEEDNUM")]
public int? NeedNum { get; set; }
/// <summary>
/// 已录用人数
/// </summary>
/// <returns></returns>
[Column("EMPLOYNUM")]
public int? EmployNum { get; set; }
/// <summary>
/// 学期
/// </summary>
/// <returns></returns>
[Column("SEMESTER")]
public string Semester { get; set; }
/// <summary>
/// 薪资(元/月)
/// </summary>
/// <returns></returns>
[Column("SALARY")]
public decimal? Salary { get; set; }
/// <summary>
/// 是否面试
/// </summary>
/// <returns></returns>
[Column("ISINTERVIEW")]
public bool? IsInterview { get; set; }
/// <summary>
/// 发布状态
/// </summary>
/// <returns></returns>
[Column("STATUS")]
public string Status { get; set; }
/// <summary>
/// 创建用户
/// </summary>
/// <returns></returns>
[Column("CREATEUSERID")]
public string CreateUserId { get; set; }
/// <summary>
/// 创建时间
/// </summary>
/// <returns></returns>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
#endregion

#region 扩展操作


+ 7
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WorkStudyPosition/WorkStudyPositionIBLL.cs Переглянути файл

@@ -43,6 +43,13 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
/// <summary>
/// <returns></returns>
void SaveEntity(string keyValue, WorkStudyPositionEntity entity);

/// <summary>
/// 发布实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
void DoPublish(string keyValue, string status);
#endregion

}


+ 27
- 10
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WorkStudyPosition/WorkStudyPositionService.cs Переглянути файл

@@ -29,14 +29,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.Id,
t.Name,
t.Content,
t.Require,
t.Remark
");
strSql.Append("SELECT t.*");
strSql.Append(" FROM WorkStudyPosition t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
@@ -47,7 +40,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
dp.Add("Name", "%" + queryParam["Name"].ToString() + "%", DbType.String);
strSql.Append(" AND t.Name Like @Name ");
}
return this.BaseRepository("CollegeMIS").FindList<WorkStudyPositionEntity>(strSql.ToString(),dp, pagination);
return this.BaseRepository("CollegeMIS").FindList<WorkStudyPositionEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
@@ -99,7 +92,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
try
{
this.BaseRepository("CollegeMIS").Delete<WorkStudyPositionEntity>(t=>t.Id == keyValue);
this.BaseRepository("CollegeMIS").Delete<WorkStudyPositionEntity>(t => t.Id == keyValue);
}
catch (Exception ex)
{
@@ -147,6 +140,30 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
}

/// <summary>
/// 发布实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void DoPublish(string keyValue, string status)
{
try
{
this.BaseRepository("CollegeMIS").ExecuteBySql("update WorkStudyPosition set Status='" + status + "' where Id='" + keyValue + "' ");
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}


Завантаження…
Відмінити
Зберегти