首页修改

This commit is contained in:
李超 2023-07-26 10:12:33 +08:00
parent f0b0eca670
commit 8f97e47b42
14 changed files with 795 additions and 612 deletions

View File

@ -0,0 +1,2 @@
Alter TABLE [dbo].[Base_Project]add
[ConstructionNum] [int] NULL

View File

@ -58,7 +58,22 @@ namespace BLL
}
}
#endregion
#region
/// <summary>
/// 获取培训级别
/// </summary>
/// <returns></returns>
public static Model.Project_ProjectUnit ProjectUnit(string projectUnitId)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var getDataLists = from x in db.Project_ProjectUnit
where x.ProjectUnitId == projectUnitId
select x;
return getDataLists.FirstOrDefault();
}
}
#endregion
#region
/// <summary>
/// 获取项目列表

View File

@ -1,4 +1,5 @@
using EmitMapper;
using Model;
using System.Collections.Generic;
using System.Linq;

View File

@ -135,6 +135,7 @@
Province = project.Province,
City = project.City,
EnglishRemark = project.EnglishRemark,
ConstructionNum= project.ConstructionNum,
Progress = project.Progress,
};
db.Base_Project.InsertOnSubmit(newProject);
@ -181,6 +182,7 @@
newProject.Province = project.Province;
newProject.City = project.City;
newProject.EnglishRemark = project.EnglishRemark;
newProject.ConstructionNum= project.ConstructionNum;
newProject.Progress = project.Progress;
db.SubmitChanges();
HSEDataCollectService.ProjectHSEDataCollectSubmission(newProject);

View File

@ -102,7 +102,14 @@
<f:FormRow>
<Items>
<f:NumberBox runat="server" ID="txtProjectMoney" Label="合同额(万元)" NoNegative="true" ></f:NumberBox>
<f:NumberBox runat="server" ID="txtConstructionMoney" Label="施工合同额(万元)" LabelWidth="150px"
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:NumberBox runat="server" ID="txtConstructionMoney" Label="年度施工合同额(万元)" LabelWidth="160px"
NoNegative="true" ></f:NumberBox>
<f:NumberBox runat="server" ID="txtConstructionNum" Label="年度施工合同数" LabelWidth="150px"
NoNegative="true" ></f:NumberBox>
</Items>
</f:FormRow>

View File

@ -148,6 +148,7 @@ namespace FineUIPro.Web.ProjectData
this.txtMapCoordinates.Text = project.MapCoordinates;
this.txtProjectMoney.Text = project.ProjectMoney.ToString();
this.txtConstructionMoney.Text = project.ConstructionMoney.ToString();
this.txtConstructionNum.Text = project.ConstructionNum.ToString();
this.txtTelephone.Text = project.Telephone;
if (!string.IsNullOrEmpty(project.Country))
{
@ -191,6 +192,7 @@ namespace FineUIPro.Web.ProjectData
ProjectState = this.drpProjectState.SelectedValue,
ProjectMoney = Funs.GetNewDecimal(this.txtProjectMoney.Text),
ConstructionMoney = Funs.GetNewDecimal(this.txtConstructionMoney.Text),
ConstructionNum = Funs.GetNewInt(this.txtConstructionNum.Text),
Remark = this.txtRemark.Text.Trim(),
Telephone = this.txtTelephone.Text.Trim(),

View File

@ -248,6 +248,15 @@ namespace FineUIPro.Web.ProjectData
/// </remarks>
protected global::FineUIPro.NumberBox txtConstructionMoney;
/// <summary>
/// txtConstructionNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtConstructionNum;
/// <summary>
/// txtTelephone 控件。
/// </summary>

View File

@ -69,7 +69,12 @@
<f:FormRow>
<Items>
<f:TextBox runat="server" ID="txtProjectMoney" Label="合同额(万元)" Readonly="true" LabelWidth="150px"></f:TextBox>
<f:TextBox runat="server" ID="txtConstructionMoney" Label="施工合同额(万元)" LabelWidth="140px" Readonly="true"></f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox runat="server" ID="txtConstructionMoney" Label="年度施工合同额(万)" LabelWidth="150px" Readonly="true"></f:TextBox>
<f:TextBox runat="server" ID="txtConstructionNum" Label="年度施工合同个数" LabelWidth="150px" Readonly="true"></f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>

View File

@ -92,6 +92,7 @@ namespace FineUIPro.Web.ProjectData
this.txtMapCoordinates.Text = project.MapCoordinates;
this.txtDuration.Text = project.Duration.ToString();
this.txtProjectMoney.Text = project.ProjectMoney.ToString();
this.txtConstructionNum.Text = project.ConstructionNum.ToString();
this.txtConstructionMoney.Text = project.ConstructionMoney.ToString();
this.txtTelephone.Text = project.Telephone;
this.txtCountry.Text = project.Country;

View File

@ -212,6 +212,15 @@ namespace FineUIPro.Web.ProjectData
/// </remarks>
protected global::FineUIPro.TextBox txtConstructionMoney;
/// <summary>
/// txtConstructionNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtConstructionNum;
/// <summary>
/// txtTelephone 控件。
/// </summary>

View File

@ -182,19 +182,33 @@ namespace FineUIPro.Web.common
#region
private void getHTContract()
{
var ConstructionNum = Funs.DB.Base_Project.Sum(x => x.ConstructionNum);
var ConstructionMoney = Funs.DB.Base_Project.Sum(x => x.ConstructionMoney);
//var getC = (from x in Funs.DB.PHTGL_ContractReview
// join y in Funs.DB.PHTGL_Approve on x.ContractReviewId equals y.ContractId
// join z in Funs.DB.PHTGL_Contract on x.ContractId equals z.ContractId
// where x.State == 5 && Convert.ToDateTime(y.ApproveDate).Year == DateTime.Now.Year
// select new { x.ContractReviewId, z.ContractAmount }).Distinct();
this.divHTNum.InnerHtml ="0";
if (ConstructionNum.HasValue)
{
this.divHTNum.InnerHtml = ConstructionNum.Value.ToString();
}
decimal d = 0;
//foreach (var item in getC)
//{
// d += item.ContractAmount ?? 0;
//}
if (ConstructionMoney.HasValue)
{
this.divHTAmount.InnerHtml = ConstructionMoney.Value.ToString("0.####");
}
else
{
this.divHTAmount.InnerHtml = Math.Round((d / 100000000), 4).ToString();
}
}
#endregion
#region

View File

@ -7573,6 +7573,14 @@ namespace Model
}
}
public System.Data.Linq.Table<Sheet1_> Sheet1_
{
get
{
return this.GetTable<Sheet1_>();
}
}
public System.Data.Linq.Table<SitePerson_AskForLeave> SitePerson_AskForLeave
{
get
@ -24813,6 +24821,8 @@ namespace Model
private string _ProjectAttribute;
private System.Nullable<int> _ConstructionNum;
private EntitySet<Accident_AccidentHandle> _Accident_AccidentHandle;
private EntitySet<Accident_AccidentPersonRecord> _Accident_AccidentPersonRecord;
@ -25467,6 +25477,8 @@ namespace Model
partial void OnIsDeleteChanged();
partial void OnProjectAttributeChanging(string value);
partial void OnProjectAttributeChanged();
partial void OnConstructionNumChanging(System.Nullable<int> value);
partial void OnConstructionNumChanged();
#endregion
public Base_Project()
@ -26491,6 +26503,26 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionNum", DbType="Int")]
public System.Nullable<int> ConstructionNum
{
get
{
return this._ConstructionNum;
}
set
{
if ((this._ConstructionNum != value))
{
this.OnConstructionNumChanging(value);
this.SendPropertyChanging();
this._ConstructionNum = value;
this.SendPropertyChanged("ConstructionNum");
this.OnConstructionNumChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Accident_AccidentHandle_Base_Project", Storage="_Accident_AccidentHandle", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")]
public EntitySet<Accident_AccidentHandle> Accident_AccidentHandle
{
@ -312937,6 +312969,69 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Sheet1$")]
public partial class Sheet1_
{
private string _序号;
private string _岗位;
private string _总包;
public Sheet1_()
{
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_序号", DbType="NVarChar(255)")]
public string
{
get
{
return this._序号;
}
set
{
if ((this._序号 != value))
{
this._序号 = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_岗位", DbType="NVarChar(255)")]
public string
{
get
{
return this._岗位;
}
set
{
if ((this._岗位 != value))
{
this._岗位 = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_总包", DbType="NVarChar(255)")]
public string
{
get
{
return this._总包;
}
set
{
if ((this._总包 != value))
{
this._总包 = value;
}
}
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.SitePerson_AskForLeave")]
public partial class SitePerson_AskForLeave : INotifyPropertyChanging, INotifyPropertyChanged
{

View File

@ -1,4 +1,5 @@
using BLL;
using Model;
using System;
using System.Linq;
using System.Web.Http;
@ -833,6 +834,26 @@ namespace WebAPI.Controllers
}
#endregion
/// <summary>
///
/// </summary>
/// <param name="projectUnitId"></param>
/// <returns></returns>
public Model.ResponeData getProjectIdAndUnitId(string projectUnitId)
{
var responeData = new Model.ResponeData();
try
{
var projectUnit = APIBaseInfoService.ProjectUnit(projectUnitId);
responeData.data = new { ProjectId = projectUnit.ProjectId, UnitId = projectUnit.UnitId };
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#region
/// <summary>