Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
Education
Commits
6ada2c23
Commit
6ada2c23
authored
Apr 30, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
58b29509
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
30 deletions
+15
-30
DutyModule.cs
Edu.Module.Duty/DutyModule.cs
+11
-25
RB_Duty_FrequencyRepository.cs
Edu.Repository/Duty/RB_Duty_FrequencyRepository.cs
+1
-1
DutyController.cs
Edu.WebApi/Controllers/Duty/DutyController.cs
+3
-4
No files found.
Edu.Module.Duty/DutyModule.cs
View file @
6ada2c23
...
@@ -23,9 +23,9 @@ namespace Edu.Module.Duty
...
@@ -23,9 +23,9 @@ namespace Edu.Module.Duty
/// </summary>
/// </summary>
/// <param name="query"></param>
/// <param name="query"></param>
/// <returns></returns>
/// <returns></returns>
public
List
<
RB_Duty_Item_ViewModel
>
GetDutyItem
Repository
(
RB_Duty_Item_ViewModel
query
)
public
List
<
RB_Duty_Item_ViewModel
>
GetDutyItem
ListExtModule
(
RB_Duty_Item_ViewModel
query
)
{
{
return
dutyItemRepository
.
GetDutyItemRepository
(
query
);
return
dutyItemRepository
.
GetDutyItem
ListExt
Repository
(
query
);
}
}
/// <summary>
/// <summary>
...
@@ -42,8 +42,6 @@ namespace Edu.Module.Duty
...
@@ -42,8 +42,6 @@ namespace Edu.Module.Duty
return
dutyItemRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Duty_Item_ViewModel
.
Id
),
Id
));
return
dutyItemRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Duty_Item_ViewModel
.
Id
),
Id
));
}
}
/// <summary>
/// <summary>
/// 新增/修改值班事项信息
/// 新增/修改值班事项信息
/// </summary>
/// </summary>
...
@@ -64,7 +62,7 @@ namespace Edu.Module.Duty
...
@@ -64,7 +62,7 @@ namespace Edu.Module.Duty
{
nameof
(
RB_Duty_Item_ViewModel
.
Shifts
),
model
.
Shifts
},
{
nameof
(
RB_Duty_Item_ViewModel
.
Shifts
),
model
.
Shifts
},
{
nameof
(
RB_Duty_Item_ViewModel
.
ItemSchools
),
model
.
ItemSchools
},
{
nameof
(
RB_Duty_Item_ViewModel
.
ItemSchools
),
model
.
ItemSchools
},
{
nameof
(
RB_Duty_Item_ViewModel
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Duty_Item_ViewModel
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Duty_Item_ViewModel
.
UpdateTime
),
model
.
UpdateTime
},
{
nameof
(
RB_Duty_Item_ViewModel
.
UpdateTime
),
model
.
UpdateTime
},
};
};
return
dutyItemRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Duty_Item_ViewModel
.
Id
),
model
.
Id
));
return
dutyItemRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Duty_Item_ViewModel
.
Id
),
model
.
Id
));
}
}
...
@@ -115,7 +113,6 @@ namespace Edu.Module.Duty
...
@@ -115,7 +113,6 @@ namespace Edu.Module.Duty
return
list
;
return
list
;
}
}
/// <summary>
/// <summary>
/// 获取值班设置列表
/// 获取值班设置列表
/// </summary>
/// </summary>
...
@@ -126,7 +123,6 @@ namespace Edu.Module.Duty
...
@@ -126,7 +123,6 @@ namespace Edu.Module.Duty
return
dutyConfigRepository
.
GetDutyConfigList
(
query
);
return
dutyConfigRepository
.
GetDutyConfigList
(
query
);
}
}
/// <summary>
/// <summary>
/// 删除值班设置
/// 删除值班设置
/// </summary>
/// </summary>
...
@@ -141,8 +137,6 @@ namespace Edu.Module.Duty
...
@@ -141,8 +137,6 @@ namespace Edu.Module.Duty
return
dutyConfigRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Duty_Config_ViewModel
.
Id
),
Id
));
return
dutyConfigRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Duty_Config_ViewModel
.
Id
),
Id
));
}
}
/// <summary>
/// <summary>
/// 新增/修改班次信息
/// 新增/修改班次信息
/// </summary>
/// </summary>
...
@@ -163,7 +157,8 @@ namespace Edu.Module.Duty
...
@@ -163,7 +157,8 @@ namespace Edu.Module.Duty
{
nameof
(
RB_Duty_Config_ViewModel
.
MachineCode
),
model
.
MachineCode
},
{
nameof
(
RB_Duty_Config_ViewModel
.
MachineCode
),
model
.
MachineCode
},
{
nameof
(
RB_Duty_Config_ViewModel
.
School_Id
),
model
.
School_Id
},
{
nameof
(
RB_Duty_Config_ViewModel
.
School_Id
),
model
.
School_Id
},
{
nameof
(
RB_Duty_Config_ViewModel
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Duty_Config_ViewModel
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Duty_Config_ViewModel
.
UpdateTime
),
model
.
UpdateTime
},
{
nameof
(
RB_Duty_Config_ViewModel
.
UpdateTime
),
model
.
UpdateTime
},
{
nameof
(
RB_Duty_Config_ViewModel
.
SendEmployeeIds
),
model
.
SendEmployeeIds
},
};
};
return
dutyConfigRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Duty_Config_ViewModel
.
Id
),
model
.
Id
));
return
dutyConfigRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Duty_Config_ViewModel
.
Id
),
model
.
Id
));
}
}
...
@@ -177,28 +172,21 @@ namespace Edu.Module.Duty
...
@@ -177,28 +172,21 @@ namespace Edu.Module.Duty
/// </summary>
/// </summary>
/// <param name="query"></param>
/// <param name="query"></param>
/// <returns></returns>
/// <returns></returns>
public
List
<
RB_Duty_Frequency_ViewModel
>
GetDutyFrequency
Repository
(
RB_Duty_Frequency_ViewModel
query
)
public
List
<
RB_Duty_Frequency_ViewModel
>
GetDutyFrequency
Module
(
RB_Duty_Frequency_ViewModel
query
)
{
{
var
list
=
dutyFrequencyRepository
.
GetDutyFrequencyRepository
(
query
);
return
dutyFrequencyRepository
.
GetDutyFrequencyRepository
(
query
);
return
list
;
}
}
/// <summary>
/// <summary>
/// 获取班次设置列表
/// 获取班次设置列表
/// </summary>
/// </summary>
/// <param name="query"></param>
/// <param name="query"></param>
/// <returns></returns>
/// <returns></returns>
public
List
<
RB_Duty_Frequency_ViewModel
>
GetDutyFrequencyBySchoolIds
(
int
Group_Id
,
string
SchoolIds
)
public
List
<
RB_Duty_Frequency_ViewModel
>
GetDutyFrequencyBySchoolIds
Module
(
int
Group_Id
,
string
SchoolIds
)
{
{
return
dutyFrequencyRepository
.
GetDutyFrequencyBySchoolIds
(
Group_Id
,
SchoolIds
);
return
dutyFrequencyRepository
.
GetDutyFrequencyBySchoolIds
Repository
(
Group_Id
,
SchoolIds
);
}
}
/// <summary>
/// <summary>
/// 删除班次
/// 删除班次
/// </summary>
/// </summary>
...
@@ -213,14 +201,12 @@ namespace Edu.Module.Duty
...
@@ -213,14 +201,12 @@ namespace Edu.Module.Duty
return
dutyFrequencyRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Duty_Frequency_ViewModel
.
Id
),
Id
));
return
dutyFrequencyRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Duty_Frequency_ViewModel
.
Id
),
Id
));
}
}
/// <summary>
/// <summary>
/// 新增/修改班次信息
/// 新增/修改班次信息
/// </summary>
/// </summary>
/// <param name="model"></param>
/// <param name="model"></param>
/// <returns></returns>
/// <returns></returns>
public
bool
SetFrequencyMod
el
(
RB_Duty_Frequency_ViewModel
model
)
public
bool
SetFrequencyMod
ule
(
RB_Duty_Frequency_ViewModel
model
)
{
{
if
(
model
.
Id
==
0
)
if
(
model
.
Id
==
0
)
{
{
...
@@ -235,7 +221,7 @@ namespace Edu.Module.Duty
...
@@ -235,7 +221,7 @@ namespace Edu.Module.Duty
{
nameof
(
RB_Duty_Frequency_ViewModel
.
EndTime
),
model
.
EndTime
},
{
nameof
(
RB_Duty_Frequency_ViewModel
.
EndTime
),
model
.
EndTime
},
{
nameof
(
RB_Duty_Frequency_ViewModel
.
School_Ids
),
model
.
School_Ids
},
{
nameof
(
RB_Duty_Frequency_ViewModel
.
School_Ids
),
model
.
School_Ids
},
{
nameof
(
RB_Duty_Frequency_ViewModel
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Duty_Frequency_ViewModel
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Duty_Frequency_ViewModel
.
UpdateTime
),
model
.
UpdateTime
},
{
nameof
(
RB_Duty_Frequency_ViewModel
.
UpdateTime
),
model
.
UpdateTime
},
};
};
return
dutyFrequencyRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Duty_Frequency_ViewModel
.
Id
),
model
.
Id
));
return
dutyFrequencyRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Duty_Frequency_ViewModel
.
Id
),
model
.
Id
));
}
}
...
...
Edu.Repository/Duty/RB_Duty_FrequencyRepository.cs
View file @
6ada2c23
...
@@ -45,7 +45,7 @@ namespace Edu.Repository.Duty
...
@@ -45,7 +45,7 @@ namespace Edu.Repository.Duty
/// </summary>
/// </summary>
/// <param name="query"></param>
/// <param name="query"></param>
/// <returns></returns>
/// <returns></returns>
public
List
<
RB_Duty_Frequency_ViewModel
>
GetDutyFrequencyBySchoolIds
(
int
Group_Id
,
string
SchoolIds
)
public
List
<
RB_Duty_Frequency_ViewModel
>
GetDutyFrequencyBySchoolIds
Repository
(
int
Group_Id
,
string
SchoolIds
)
{
{
StringBuilder
builder
=
new
StringBuilder
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@" SELECT * from rb_duty_frequency where `Status`=0"
);
builder
.
AppendFormat
(
@" SELECT * from rb_duty_frequency where `Status`=0"
);
...
...
Edu.WebApi/Controllers/Duty/DutyController.cs
View file @
6ada2c23
...
@@ -151,7 +151,7 @@ namespace Edu.WebApi.Controllers.Duty
...
@@ -151,7 +151,7 @@ namespace Edu.WebApi.Controllers.Duty
{
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
Group_Id
=
base
.
UserInfo
.
Group_Id
,
};
};
var
list
=
dutyModule
.
GetDutyItem
Repository
(
query
);
var
list
=
dutyModule
.
GetDutyItem
ListExtModule
(
query
);
foreach
(
var
item
in
list
)
foreach
(
var
item
in
list
)
{
{
if
(
item
.
CreateBy
>
0
)
if
(
item
.
CreateBy
>
0
)
...
@@ -173,7 +173,6 @@ namespace Edu.WebApi.Controllers.Duty
...
@@ -173,7 +173,6 @@ namespace Edu.WebApi.Controllers.Duty
{
{
var
query
=
new
RB_Duty_Item_ViewModel
()
var
query
=
new
RB_Duty_Item_ViewModel
()
{
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
Group_Id
=
base
.
UserInfo
.
Group_Id
,
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
};
};
...
@@ -181,7 +180,7 @@ namespace Edu.WebApi.Controllers.Duty
...
@@ -181,7 +180,7 @@ namespace Edu.WebApi.Controllers.Duty
{
{
return
ApiResult
.
Failed
(
"请传入值班事项Id"
);
return
ApiResult
.
Failed
(
"请传入值班事项Id"
);
}
}
var
model
=
dutyModule
.
GetDutyItem
Repository
(
query
).
FirstOrDefault
();
var
model
=
dutyModule
.
GetDutyItem
ListExtModule
(
query
).
FirstOrDefault
();
if
(
model
==
null
||
model
.
Id
<=
0
)
if
(
model
==
null
||
model
.
Id
<=
0
)
{
{
return
ApiResult
.
Failed
(
"数据不存在"
);
return
ApiResult
.
Failed
(
"数据不存在"
);
...
@@ -282,7 +281,7 @@ namespace Edu.WebApi.Controllers.Duty
...
@@ -282,7 +281,7 @@ namespace Edu.WebApi.Controllers.Duty
public
ApiResult
GetDutyFrequencyBySchoolIds
()
public
ApiResult
GetDutyFrequencyBySchoolIds
()
{
{
var
SchoolIds
=
base
.
ParmJObj
.
GetStringValue
(
"SchoolIds"
);
var
SchoolIds
=
base
.
ParmJObj
.
GetStringValue
(
"SchoolIds"
);
var
list
=
dutyModule
.
GetDutyFrequencyBySchoolIds
(
base
.
UserInfo
.
Group_Id
,
SchoolIds
);
var
list
=
dutyModule
.
GetDutyFrequencyBySchoolIds
Module
(
base
.
UserInfo
.
Group_Id
,
SchoolIds
);
var
result
=
list
.
Select
(
x
=>
new
var
result
=
list
.
Select
(
x
=>
new
{
{
x
.
Id
,
x
.
Id
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment