web添加页面

This commit is contained in:
2023-07-27 14:26:39 +08:00
parent 8f97e47b42
commit 6b420b5bd8
17 changed files with 1198 additions and 1094 deletions
+144 -138
View File
@@ -9,157 +9,163 @@ using System.Web.Mvc;
namespace WebAPI.Controllers
{
/// <summary>
/// 首页
/// </summary>
public class HomeController : Controller
{
/// <summary>
///
/// </summary>
/// <returns></returns>
public ActionResult Index()
{
/// <summary>
/// 首页
/// </summary>
public class HomeController : Controller
{
/// <summary>
///
/// </summary>
/// <returns></returns>
public ActionResult Index()
{
var welder = APIWelderService.GetWelderByIdCard("370322198609181310", "b54d4274-0bb6-4e04-b03a-9165b2a062fb");
if (welder != null)
{
var installtion1 = APIBaseInfoService.GetInstallationList("b54d4274-0bb6-4e04-b03a-9165b2a062fb", welder.WED_Unit);
var method = APIWelderService.GetWelderMethod(welder.WED_ID);
var steel = APIWelderService.GetWelderBSSteel(welder.WED_ID);
var consumables = APIWelderService.GetConsumables();
//var welder = APIWelderService.GetWelderByIdCard("370322198609181310", "b54d4274-0bb6-4e04-b03a-9165b2a062fb");
//if (welder != null)
//{
// var installtion1 = APIBaseInfoService.GetInstallationList("b54d4274-0bb6-4e04-b03a-9165b2a062fb", welder.WED_Unit);
// var method = APIWelderService.GetWelderMethod(welder.WED_ID);
// var steel = APIWelderService.GetWelderBSSteel(welder.WED_ID);
// var consumables = APIWelderService.GetConsumables();
}
//}
//APICommonService.getaccess_token();
//APICommonService.getaccess_token();
//string url = "108.608963,21.724714|108.611963,21.715027|108.619114,21.70962|108.629911,21.710544|108.628186,21.714657|108.624827,21.719073|108.62339,21.723052|108.621701,21.725721|108.615359,21.726527";
//string url = "108.608963,21.724714|108.611963,21.715027|108.619114,21.70962|108.629911,21.710544|108.628186,21.714657|108.624827,21.719073|108.62339,21.723052|108.621701,21.725721|108.615359,21.726527";
//string location = "108.61684,21.71513";
//string[] area = url.Split('|');
//Gpslocation myLocation = new Gpslocation();
//string[] myp = location.Split(',');
//myLocation.lat = float.Parse(myp[0]);
//myLocation.lng = float.Parse(myp[1]);
//List<Gpslocation> gpsLoactions = new List<Gpslocation>();
//foreach (var po in area)
//{
// Gpslocation gp = new Gpslocation();
// string[] p = po.Split(',');
// gp.lat = float.Parse(p[0]);
// gp.lng = float.Parse(p[1]);
// gpsLoactions.Add(gp);
//string location = "108.61684,21.71513";
//string[] area = url.Split('|');
//Gpslocation myLocation = new Gpslocation();
//string[] myp = location.Split(',');
//myLocation.lat = float.Parse(myp[0]);
//myLocation.lng = float.Parse(myp[1]);
//List<Gpslocation> gpsLoactions = new List<Gpslocation>();
//foreach (var po in area)
//{
// Gpslocation gp = new Gpslocation();
// string[] p = po.Split(',');
// gp.lat = float.Parse(p[0]);
// gp.lng = float.Parse(p[1]);
// gpsLoactions.Add(gp);
//}
//GpsPolygonHelper.isPointInPolygon(myLocation, gpsLoactions);
//string location = "108.61684,21.71513";
//using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
//{
// var person = db.SitePerson_Person.Where(u => u.IdentityCard == "342401199502012298" && u.ProjectId == "59fe12ee-a986-4a60-b288-2c33a241dc28").FirstOrDefault();
// if (person != null)
// {
// string inOrOutS = "进门";
//}
//GpsPolygonHelper.isPointInPolygon(myLocation, gpsLoactions);
//string location = "108.61684,21.71513";
//using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
//{
// var person = db.SitePerson_Person.Where(u => u.IdentityCard == "342401199502012298" && u.ProjectId == "59fe12ee-a986-4a60-b288-2c33a241dc28").FirstOrDefault();
// if (person != null)
// {
// string inOrOutS = "进门";
// Model.t_d_facerecordItem newFacerecordItem = new Model.t_d_facerecordItem()
// {
// ProjectId = person.ProjectId,
// ID = 0,
// EmployName = person.PersonName,
// DepartmentID = person.TeamGroupId,
// DepartName = TeamGroupService.GetTeamGroupNameByTeamGroupId(person.TeamGroupId),
// EmployNO = person.IdentityCard,
// RoleID = "微信端",
// DateTimeRecord = DateTime.Now,
// RecordDes = "微信端:",
// InOrOut = inOrOutS,
// Des1 = "",
// Des2 = "",
// };
// var getfacerecord = db.T_d_facerecord.Where(x => x.ProjectId == person.ProjectId);
// if (getfacerecord.Count() > 0)
// {
// newFacerecordItem.ID = getfacerecord.Max(x => x.ID) + 1;
// }
// var area = db.WxProjectGpsPoint.Where(u => u.ProjectId == person.ProjectId).OrderBy(x=>x.Orders).ToList();
// if (area != null && area.Count > 0)
// {
// // string points = area.Point;
// //if (!string.IsNullOrEmpty(points))
// //{
// // string[] ps = points.Split('|');
// Gpslocation myLocation = new Gpslocation();
// string[] myp = location.Split(',');
// myLocation.lat = double.Parse(myp[1]);
// myLocation.lng = double.Parse(myp[0]);
// List<Gpslocation> gpsLoactions = new List<Gpslocation>();
// foreach (var po in area)
// {
// Gpslocation gp = new Gpslocation();
// string[] p = po.Point.Split(',');
// gp.lat = double.Parse(p[1]) ;
// gp.lng = double.Parse(p[0]);
// gpsLoactions.Add(gp);
// Model.t_d_facerecordItem newFacerecordItem = new Model.t_d_facerecordItem()
// {
// ProjectId = person.ProjectId,
// ID = 0,
// EmployName = person.PersonName,
// DepartmentID = person.TeamGroupId,
// DepartName = TeamGroupService.GetTeamGroupNameByTeamGroupId(person.TeamGroupId),
// EmployNO = person.IdentityCard,
// RoleID = "微信端",
// DateTimeRecord = DateTime.Now,
// RecordDes = "微信端:",
// InOrOut = inOrOutS,
// Des1 = "",
// Des2 = "",
// };
// var getfacerecord = db.T_d_facerecord.Where(x => x.ProjectId == person.ProjectId);
// if (getfacerecord.Count() > 0)
// {
// newFacerecordItem.ID = getfacerecord.Max(x => x.ID) + 1;
// }
// var area = db.WxProjectGpsPoint.Where(u => u.ProjectId == person.ProjectId).OrderBy(x=>x.Orders).ToList();
// if (area != null && area.Count > 0)
// {
// // string points = area.Point;
// //if (!string.IsNullOrEmpty(points))
// //{
// // string[] ps = points.Split('|');
// Gpslocation myLocation = new Gpslocation();
// string[] myp = location.Split(',');
// myLocation.lat = double.Parse(myp[1]);
// myLocation.lng = double.Parse(myp[0]);
// List<Gpslocation> gpsLoactions = new List<Gpslocation>();
// foreach (var po in area)
// {
// Gpslocation gp = new Gpslocation();
// string[] p = po.Point.Split(',');
// gp.lat = double.Parse(p[1]) ;
// gp.lng = double.Parse(p[0]);
// gpsLoactions.Add(gp);
// }
// //不规则图像x坐标集合
// List<double> xList = gpsLoactions.Select(x => x.lat).ToList();
// //不规则图像y坐标集合
// List<double> yList = gpsLoactions.Select(x => x.lng).ToList();
// GpsPolygonHelper. PositionPnpoly(gpsLoactions.Count, xList,yList, myLocation.lat, myLocation.lng);
// }
// //不规则图像x坐标集合
// List<double> xList = gpsLoactions.Select(x => x.lat).ToList();
// //不规则图像y坐标集合
// List<double> yList = gpsLoactions.Select(x => x.lng).ToList();
// GpsPolygonHelper. PositionPnpoly(gpsLoactions.Count, xList,yList, myLocation.lat, myLocation.lng);
// if (GpsPolygonHelper.isPointInPolygon(myLocation, gpsLoactions))
// {
// newFacerecordItem.RecordDes += "打卡成功";
// //APIPersonService.getPersonInOut(person.ProjectId, person.IdentityCard, isIn, DateTime.Now);
// if (GpsPolygonHelper.isPointInPolygon(myLocation, gpsLoactions))
// {
// newFacerecordItem.RecordDes += "打卡成功";
// //APIPersonService.getPersonInOut(person.ProjectId, person.IdentityCard, isIn, DateTime.Now);
// }
// else
// {
// newFacerecordItem.RecordDes += "识别成功,不在项目区域内打卡";
// //responeData.code = 0;
// }
// }
// }
//}
// //List<SgManager.AI.faceResult> kqFace = null;
//try
//{
// kqFace = (List<SgManager.AI.faceResult>)SgManager.AI.FaceClass.SearchFileFace("d://6.jpg");
// }
// else
// {
// newFacerecordItem.RecordDes += "识别成功,不在项目区域内打卡";
// //responeData.code = 0;
// }
// }
// }
//}
// //List<SgManager.AI.faceResult> kqFace = null;
//try
//{
// kqFace = (List<SgManager.AI.faceResult>)SgManager.AI.FaceClass.SearchFileFace("d://6.jpg");
//}
//catch (Exception e)
//{
//}
//catch (Exception e)
//{
//}
//APICommonService.SendSubscribeMessage("C4A62EC0-E5D3-4EBF-A5FA-E56AA89633C0", "人员信息待您审核", "123", string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now));
//}
//APICommonService.SendSubscribeMessage("C4A62EC0-E5D3-4EBF-A5FA-E56AA89633C0", "人员信息待您审核", "123", string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now));
ViewBag.Title = "Home Page";
// var db = Funs.DB;
//var getInfoList = (from x in db.License_LicenseManager
// where (x.WorkStates == "1" || x.WorkStates == "0")
// orderby x.StartDate
// select new Model.LicenseDataItem
// {
// LicenseId = x.LicenseManagerId,
// MenuId = Const.ProjectLicenseManagerMenuId,
// MenuName = db.Base_LicenseType.FirstOrDefault(y => y.LicenseTypeId == x.LicenseTypeId).LicenseTypeName,
// LicenseTypeId = x.LicenseTypeId,
// ProjectId = x.ProjectId,
// LicenseCode = x.LicenseManagerCode,
// ApplyUnitId = x.UnitId,
// ApplyUnitName = db.Base_Unit.First(u => u.UnitId == x.UnitId).UnitName,
// ApplyManId = x.CompileMan,
// ApplyManName = x.ApplicantMan,
// ApplyDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.CompileDate),
// WorkPalce = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
// ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.StartDate),
// ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.EndDate),
// States = x.WorkStates,
ViewBag.Title = "Home Page";
// var db = Funs.DB;
//var getInfoList = (from x in db.License_LicenseManager
// where (x.WorkStates == "1" || x.WorkStates == "0")
// orderby x.StartDate
// select new Model.LicenseDataItem
// {
// LicenseId = x.LicenseManagerId,
// MenuId = Const.ProjectLicenseManagerMenuId,
// MenuName = db.Base_LicenseType.FirstOrDefault(y => y.LicenseTypeId == x.LicenseTypeId).LicenseTypeName,
// LicenseTypeId = x.LicenseTypeId,
// ProjectId = x.ProjectId,
// LicenseCode = x.LicenseManagerCode,
// ApplyUnitId = x.UnitId,
// ApplyUnitName = db.Base_Unit.First(u => u.UnitId == x.UnitId).UnitName,
// ApplyManId = x.CompileMan,
// ApplyManName = x.ApplicantMan,
// ApplyDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.CompileDate),
// WorkPalce = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
// ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.StartDate),
// ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.EndDate),
// States = x.WorkStates,
// AttachUrl = APIUpLoadFileService.getFileUrl(x.LicenseManagerId, null),
// }).ToList();
return View();
}
}
// AttachUrl = APIUpLoadFileService.getFileUrl(x.LicenseManagerId, null),
// }).ToList();
return View();
}
public ActionResult PersonInfo(string id)
{
return View();
}
}
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-index-index"],{"6da9":function(t,n,e){"use strict";e("7a82"),Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a={data:function(){return{title:"Hello"}},onLoad:function(){},methods:{skip1:function(){uni.navigateTo({url:"/pages/add_personnel/add_personnel?id=abb8cb7d-6e4d-4167-8080-7caba46c9c8b"})}}};n.default=a},a113:function(t,n,e){"use strict";var a=e("aa65"),i=e.n(a);i.a},aa65:function(t,n,e){var a=e("cc71");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var i=e("4f06").default;i("edb87922",a,!0,{sourceMap:!1,shadowMode:!1})},bb44:function(t,n,e){"use strict";e.d(n,"b",(function(){return i})),e.d(n,"c",(function(){return o})),e.d(n,"a",(function(){return a}));var a={uButton:e("eb0a").default},i=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("v-uni-view",{staticClass:"content"},[e("u-button",{on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.skip1.apply(void 0,arguments)}}},[t._v("人员信息")])],1)},o=[]},bff3:function(t,n,e){"use strict";e.r(n);var a=e("6da9"),i=e.n(a);for(var o in a)["default"].indexOf(o)<0&&function(t){e.d(n,t,(function(){return a[t]}))}(o);n["default"]=i.a},cc71:function(t,n,e){var a=e("24fb");n=a(!1),n.push([t.i,".content[data-v-c43814d0]{display:flex;flex-direction:column;align-items:center;justify-content:center}.logo[data-v-c43814d0]{height:%?200?%;width:%?200?%;margin-top:%?200?%;margin-left:auto;margin-right:auto;margin-bottom:%?50?%}.text-area[data-v-c43814d0]{display:flex;justify-content:center}.title[data-v-c43814d0]{font-size:%?36?%;color:#8f8f94}",""]),t.exports=n},e696:function(t,n,e){"use strict";e.r(n);var a=e("bb44"),i=e("bff3");for(var o in i)["default"].indexOf(o)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(o);e("a113");var c=e("f0c5"),u=Object(c["a"])(i["default"],a["b"],a["c"],!1,null,"c43814d0",null,!1,a["a"],void 0);n["default"]=u.exports}}]);
+21
View File
@@ -0,0 +1,21 @@
@{
Layout = null;
}
<!DOCTYPE html>
<html lang=zh-CN>
<head>
<meta charset=utf-8>
<meta http-equiv=X-UA-Compatible content="IE=edge">
<title>项目人员录入</title>
<script>
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script>
<link rel=stylesheet href=./static/index.97465e7b.css>
</head>
<body>
<noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div>
<script src=./static/js/chunk-vendors.243f9a1a.js></script>
<script src=./static/js/index.588a1ec2.js></script>
</body>
</html>
+11
View File
@@ -299,6 +299,10 @@
<Content Include="favicon.ico" />
<Content Include="fonts\glyphicons-halflings-regular.svg" />
<Content Include="Global.asax" />
<Content Include="Home\static\js\index.03a2f39a.js" />
<Content Include="Home\static\js\index.588a1ec2.js" />
<Content Include="Home\static\js\pages-add_personnel-add_personnel.bad7c7eb.js" />
<Content Include="Home\static\js\pages-add_personnel-add_personnel.ff016799.js" />
<Content Include="Scripts\bootstrap.js" />
<Content Include="Scripts\bootstrap.min.js" />
<Content Include="Areas\HelpPage\Views\Web.config" />
@@ -327,6 +331,12 @@
<Content Include="Scripts\jquery-3.3.1.slim.js" />
<Content Include="Scripts\jquery-3.3.1.slim.min.js" />
<Content Include="Scripts\modernizr-2.8.3.js" />
<Content Include="Home\static\index.97465e7b.css" />
<Content Include="Home\static\js\chunk-vendors.243f9a1a.js" />
<Content Include="Home\static\js\index.5b55bafe.js" />
<Content Include="Home\static\js\pages-add_personnel-add_personnel.01ea8e3f.js" />
<Content Include="Home\static\js\pages-add_personnel-add_personnel~pages-index-index.a29b9044.js" />
<Content Include="Home\static\js\pages-index-index.49fa6205.js" />
<Content Include="Web.config">
<SubType>Designer</SubType>
</Content>
@@ -343,6 +353,7 @@
<Content Include="Views\Home\Index.cshtml" />
<Content Include="Views\Shared\Error.cshtml" />
<Content Include="Views\Shared\_Layout.cshtml" />
<Content Include="Views\Home\PersonInfo.cshtml" />
</ItemGroup>
<ItemGroup>
<Folder Include="App_Data\" />