Commit 70150fbe by Neo Turing

优化

parent 4b1207bb
......@@ -242,31 +242,36 @@ namespace Kivii.Third.Scjgj.Entities
/// 经济类型内资
/// 1:国有,2:集体,3:股份合作,4:联营,5:有限责任公司,6:股份有限公司,7:私营,8:其他企业
/// </summary>
public char? ECO_INSIDE { get; set; }
[StringLength(100)]
public string ECO_INSIDE { get; set; }
/// <summary>
/// 生产单位质量认证体系
/// 1:工业产品生产许可证,3:CCC,4:其他,5:强制性产品认证,6:特种设备制造许可
/// </summary>
public char? PRO_QUALITY_PASS { get; set; }
[StringLength(50)]
public string PRO_QUALITY_PASS { get; set; }
/// <summary>
/// 经济类型港澳台
/// 1:合资经营,2:合作经营,3:港澳台独资经营,4:澳台投资股份有限公司
/// </summary>
public char? ECO_HMT { get; set; }
[StringLength(50)]
public string ECO_HMT { get; set; }
/// <summary>
/// 经济类型外资
/// 1:中外合资,2:中外合作,3:外资企业,4:外商投资股份有限公司,5:有限责任公司
/// </summary>
public char? ECO_OUTSIDE { get; set; }
[StringLength(50)]
public string ECO_OUTSIDE { get; set; }
/// <summary>
/// 经济类型个体
/// 1:个体户,2:个人合作,3:个人独资
/// </summary>
public char? ECO_SINGLE { get; set; }
[StringLength(50)]
public string ECO_SINGLE { get; set; }
/// <summary>
/// 生产单位证书编码
......@@ -277,7 +282,8 @@ namespace Kivii.Third.Scjgj.Entities
/// <summary>
/// 生产单位企业规模类型
/// </summary>
public char? PRO_SACLE_TYPE { get; set; }
[StringLength(100)]
public string PRO_SACLE_TYPE { get; set; }
/// <summary>
/// 组织机构代码
......@@ -854,22 +860,23 @@ namespace Kivii.Third.Scjgj.Entities
public class TaskSource : Entity, IEntityIgnoreCreateTable, IEntityInAssemblyDb
{
#region IEntity Ignore
[Ignore]
[PrimaryKey]
[IgnoreUpdate]
[Alias("UUID")]
public new Guid Kvid { get; set; }
[Ignore]
[Alias("CREATEDATE")]
public new DateTime CreateTime { get; set; }
/// <summary>
///// 结果通知日期
/// </summary>
//[Ignore]
[Ignore]
[Alias("NOTICE_TIME")]
public new DateTime UpdateTime { get; set; }
//[Ignore]
[Ignore]
/// <summary>
///// 任务状态(1.未下达 2.已下达 3.已领取 4.已完成 0.已撤回 5.已上传)
/// </summary>
......
......@@ -134,7 +134,8 @@ namespace Kivii.Third.Scjgj.Entities
/// </summary>
[StringLength(20)]
public string TASK_SOURCE { get; set; }
[Ignore]
public TaskSource TaskSource { get; set; }
/// <summary>
/// 实施季度
/// </summary>
......@@ -322,7 +323,7 @@ namespace Kivii.Third.Scjgj.Entities
public new DateTime CreateTime { get; set; }
[Ignore]
public new DateTime UpdateTime { get; set; }
//[Ignore]
[Ignore]
/// 抽检任务状态 0:抽样人员待上传 1:抽样人员已上传 2:抽样信息上传照片未上传 3:抽样信息上传照片已上传 4:已提交(提交省公司) 5:提交审批 6:审批通过 7:驳回 8:无效 9:删除
[Alias("STATE")]
public new int Status { get; set; }
......@@ -346,6 +347,8 @@ namespace Kivii.Third.Scjgj.Entities
[StringLength(30)]
public string PLAN_CODE { get; set; }
[Ignore]
public Plan Plan { get; set; }
/// <summary>
/// 抽检批次号
/// </summary>
......@@ -972,8 +975,9 @@ namespace Kivii.Third.Scjgj.Entities
/// <summary>
/// 直播平台ID
/// </summary>
public int LIVE_ID { get; set; }
public int? LIVE_ID { get; set; }
[Ignore]
public Live Live { get; set; }
/// <summary>
/// 主播展示页面(直播抽样必填)
/// </summary>
......
......@@ -124,6 +124,7 @@ namespace Kivii.Third.Scjgj
}
}
[RequiresAnyRole(MemberRoles.Everyone)]
public class PlanDetailConvert : RestfulExecution<PlanDetail>
{
public string BatchNumber { get; set; }//计划编号PLAN_CODE
......@@ -144,6 +145,7 @@ namespace Kivii.Third.Scjgj
var query = conn.From<PlanDetail>();
query.Where(o => o.PLAN_CODE == BatchNumber && o.LOT_NUM == PlanNumber);
var planDetail = conn.Single(query);
if (planDetail == null) throw new Exception("未找到此任务单");
var result = planDetail.ConvertTo(conn);
rtns.Results.Add(result);
}
......@@ -156,4 +158,18 @@ namespace Kivii.Third.Scjgj
return rtns;
}
}
//[RequiresAnyRole(MemberRoles.Everyone)]
public class PlanDetailConvertToReport : RestfulExecution<PlanDetail>
{
public PlanDetail Item { get; set; }
public override object OnExecution(IRequest req, IResponse res)
{
var rtns = new RestfulReadResponse<Report>();
rtns.Result = Item.ConvertTo();
return rtns;
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment