提交 acf54e0c authored 作者: 李德成's avatar 李德成

更新代码

上级 720e2bd8
......@@ -10,3 +10,8 @@ C:\Users\Administrator\Desktop\danganOrRenli\Code\LQKJ.K3.MES.BusinessPlugIn\obj
C:\Users\Administrator\Desktop\danganOrRenli\Code\LQKJ.K3.MES.BusinessPlugIn\obj\Debug\LQKJ.K3.MES.BusinessPlugIn.csproj.CopyComplete
C:\Users\Administrator\Desktop\danganOrRenli\Code\LQKJ.K3.MES.BusinessPlugIn\obj\Debug\LQKJ.K3.MES.BusinessPlugIn.dll
C:\Users\Administrator\Desktop\danganOrRenli\Code\LQKJ.K3.MES.BusinessPlugIn\obj\Debug\LQKJ.K3.MES.BusinessPlugIn.pdb
C:\Users\Administrator\Desktop\培训+档案\danganOrRenli\Code\LQKJ.K3.MES.BusinessPlugIn\obj\Debug\LQKJ.K3.MES.BusinessPlugIn.csproj.AssemblyReference.cache
C:\Users\Administrator\Desktop\培训+档案\danganOrRenli\Code\LQKJ.K3.MES.BusinessPlugIn\obj\Debug\LQKJ.K3.MES.BusinessPlugIn.csproj.CoreCompileInputs.cache
C:\Users\Administrator\Desktop\培训+档案\danganOrRenli\Code\LQKJ.K3.MES.BusinessPlugIn\obj\Debug\LQKJ.K3.MES.BusinessPlugIn.csproj.CopyComplete
C:\Users\Administrator\Desktop\培训+档案\danganOrRenli\Code\LQKJ.K3.MES.BusinessPlugIn\obj\Debug\LQKJ.K3.MES.BusinessPlugIn.dll
C:\Users\Administrator\Desktop\培训+档案\danganOrRenli\Code\LQKJ.K3.MES.BusinessPlugIn\obj\Debug\LQKJ.K3.MES.BusinessPlugIn.pdb
1aa97981a2c7facf69c3000ea10ba73157f11570
2711b496b56c31fb16c4ca8f3a319de5d68af525
......@@ -22,6 +22,8 @@ namespace LQKJ.K3.PeiXunSystem.WebApi.Models
public DateTime endDate { get; set; }
public DateTime overDate { get; set; }
public string fisFillInfo { get; set; }//是否填写个人信息
public string FSUBSTREETIS { get; set; }//是否填写所属街道
public string FWORKINGIS { get; set; }//是否需填所属党工委
public string fsFillRiding { get; set; }//是否统一乘车
public string FIdCardCheckBox { get; set; }//是否需填写身份证号
public string fisFillArrAngEroom { get; set; }//是否安排单间
......
......@@ -51,13 +51,18 @@ namespace LQKJ.K3.PeiXunSystem.WebApi
SQLResult sqlReselt = new SQLResult();
try
{
string sqlSelect = $@"/*dialect*/ select * from (
string sqlSelect = $@"/*dialect*/select * from (
select A.FITEMID fItemId,classId,className,classArea,planCount,
subCount,startDate,endDate,FDEADLINE as overDate,case
when FDEADLINE>getdate() and planCount>subCount then 0 --正在报名
when FDEADLINE>getdate() and planCount=subCount then 1
else 3
end as classType,case when fisFillInfo=1 then 'true' else 'false' end fisFillInfo ,case when fsFillRiding=1 then 'true' else 'false' end fsFillRiding,case when FIDCARDCHECKBOX=1 then 'true' else 'false' end FIdCardCheckBox
end as classType,
--case when fisFillInfo=1 then 'true' else 'false' end fisFillInfo,--是否填写是否信息
case when FSUBSTREETIS=1 then 'true' else 'false' end FSUBSTREETIS,--是否填写所属街道
case when FWORKINGIS=1 then 'true' else 'false' end FWORKINGIS,--是否需填所属党工委
case when fsFillRiding=1 then 'true' else 'false' end fsFillRiding,
case when FIDCARDCHECKBOX=1 then 'true' else 'false' end FIdCardCheckBox
,case when fisFillArrAngEroom=1 then 'true' else 'false' end fisFillArrAngEroom,case when fisFillCohabItant=1 then 'true' else 'false' end fisFillCohabItant,c.FNUMBER as classNumber,
A.FNUMBER itemNumber,A.FTRAINING as require from
T_PX_TRAININGPROINFO A --培训项目
......@@ -84,7 +89,9 @@ namespace LQKJ.K3.PeiXunSystem.WebApi
classArea = temp.Field<string>("classArea"),
classType = temp.Field<int>("classType"),
planCount = temp.Field<int>("planCount"),
fisFillInfo = temp.Field<string>("fisFillInfo"),
//fisFillInfo = temp.Field<string>("fisFillInfo"),
FSUBSTREETIS = temp.Field<string>("FSUBSTREETIS"),
FWORKINGIS = temp.Field<string>("FWORKINGIS"),
fsFillRiding = temp.Field<string>("fsFillRiding"),
FIdCardCheckBox = temp.Field<string>("FIdCardCheckBox"),
fisFillArrAngEroom = temp.Field<string>("fisFillArrAngEroom"),
......@@ -140,15 +147,38 @@ namespace LQKJ.K3.PeiXunSystem.WebApi
SQLResult sqlResult = new SQLResult();
try
{
string sqlSelect = $@"/*dialect*/ select T3.FCLASSID as classId,T4.FNAME className,FSTARTDATE startDate,FENDDATE endDate,FLOCATION classArea
/*string sqlSelect = $@" select T3.FCLASSID as classId,T4.FNAME className,FSTARTDATE startDate,FENDDATE endDate,FLOCATION classArea
,case when FSTARTDATE>getdate() then 2 when FENDDATE<getdate() then 3
when FSTARTDATE<getdate() and FENDDATE>getdate() then 4 end classType
from T_PX_ADDRESSBOOK T1 left join T_PX_ADDRESSBOOKENTRY T2 on T1.FID=T2.FID
left join T_PX_CLASS T3 on T1.FCLASS=T3.FCLASSID left join T_PX_CLASS_L T4 on T4.FCLASSID=T3.FCLASSID
where FSTUDENTID='{FSTUDENTID}'
";*/
string sqlSelect = $@"/*dialect*/select * from (
select A.FITEMID fItemId,classId,className,classArea,planCount,
subCount,startDate,endDate,FDEADLINE as overDate,
case when startDate>getdate() then 2 when endDate<getdate() then 3
when startDate<getdate() and endDate>getdate() then 4 end classType,
--case when fisFillInfo=1 then 'true' else 'false' end fisFillInfo,--是否填写是否信息
case when FSUBSTREETIS=1 then 'true' else 'false' end FSUBSTREETIS,--是否填写所属街道
case when FWORKINGIS=1 then 'true' else 'false' end FWORKINGIS,--是否需填所属党工委
case when fsFillRiding=1 then 'true' else 'false' end fsFillRiding,
case when FIDCARDCHECKBOX=1 then 'true' else 'false' end FIdCardCheckBox
,case when fisFillArrAngEroom=1 then 'true' else 'false' end fisFillArrAngEroom,case when fisFillCohabItant=1 then 'true' else 'false' end fisFillCohabItant,c.FNUMBER as classNumber,
A.FNUMBER itemNumber,A.FTRAINING as require from
T_PX_TRAININGPROINFO A --培训项目
left join T_PX_TRAININGPROINFOENTRY B on A.FITEMID=B.FITEMID -- 培训项目单据体
left join (select T.FCLASSID as classId,fName as className ,FPLANTY as planCount,FCONFIRMQTY as
subCount,FLOCATION as classArea,
FSTARTDATE as startDate,FENDDATE as endDate
,FNUMBER
from T_PX_CLASS T left join T_PX_CLASS_L T2 on T.FCLASSID=T2.FCLASSID ) C on B.FCLASS=C.CLASSID --班级
where B.FISRELEASE=1 and FDOCUMENTSTATUS='C'
) T where classId in
(select DISTINCT a.FCLASSID from T_PX_CLASS a left join V_PX_ClassStudents b on a.FCLASSID=b.FCLASSID where FSTUDENTID='{FSTUDENTID}') --查该学员是否有已经报名的班级'
";
sqlResult = obj.ExecutDataSet(sqlSelect);
var dataTable = (from temp in ((DataSet)sqlResult.data).Tables[0].AsEnumerable()
/* var dataTable = (from temp in ((DataSet)sqlResult.data).Tables[0].AsEnumerable()
select new Models.Item
{
classId = temp.Field<int>("classId"),
......@@ -157,7 +187,31 @@ namespace LQKJ.K3.PeiXunSystem.WebApi
endDate = temp.Field<DateTime>("endDate"),
classArea = temp.Field<string>("classArea"),
classType = temp.Field<int>("classType")
}).Where(e=>e.className.Contains(Name)).ToList();
}).Where(e=>e.className.Contains(Name)).ToList();*/
var dataTable = (from temp in ((DataSet)sqlResult.data).Tables[0].AsEnumerable()
select new Models.Item
{
classId = temp.Field<int>("classId"),
fItemId = temp.Field<int>("fItemId"),
endDate = temp.Field<DateTime>("endDate"),
className = temp.Field<string>("className"),
startDate = temp.Field<DateTime>("startDate"),
subCount = temp.Field<int>("subCount"),
classArea = temp.Field<string>("classArea"),
classType = temp.Field<int>("classType"),
planCount = temp.Field<int>("planCount"),
//fisFillInfo = temp.Field<string>("fisFillInfo"),
FSUBSTREETIS = temp.Field<string>("FSUBSTREETIS"),
FWORKINGIS = temp.Field<string>("FWORKINGIS"),
fsFillRiding = temp.Field<string>("fsFillRiding"),
FIdCardCheckBox = temp.Field<string>("FIdCardCheckBox"),
fisFillArrAngEroom = temp.Field<string>("fisFillArrAngEroom"),
fisFillCohabItant = temp.Field<string>("fisFillCohabItant"),
classNumber = temp.Field<string>("classNumber"),
overDate = temp.Field<DateTime>("overDate"),
itemNumber = temp.Field<string>("itemNumber"),
require = temp.Field<string>("require")
}).Where(e => e.className.Contains(Name)).ToList();
var result = PaginatedList<Item>.Create(
dataTable, pageIndex ?? 1, pageSize);
sqlResult.msg = "查询成功!";
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论