Compare commits

...

2 Commits

Author SHA1 Message Date
路 范
ec259ecaa3 Merge branch 'master' of http://118.178.224.202:3000/ewide/zsxt_nbzs_h5 2021-09-10 15:12:38 +08:00
路 范
36302d2b84 update 前端数据 2021-09-10 15:08:18 +08:00
18 changed files with 110 additions and 55 deletions

View File

@@ -27,6 +27,8 @@ namespace Ewide.NbzsZheliban.Entity.Extends
} }
public class H5IndexModel public class H5IndexModel
{ {
public string UserName { get; set; }
public string IdCard { get; set; }
/// <summary> /// <summary>
/// 项目信息 /// 项目信息
/// </summary> /// </summary>

View File

@@ -18,7 +18,7 @@ using System.Threading.Tasks;
namespace Ewide.NbzsZheliban.Service namespace Ewide.NbzsZheliban.Service
{ {
[ApiDescriptionSettings(Name = "数据接口")] [ApiDescriptionSettings(Name = "数据接口")]
public class DataService : BaseService public class DataService : Furion.DynamicApiController.IDynamicApiController///: BaseService
{ {
private readonly ISqlSugarRepository repository; private readonly ISqlSugarRepository repository;
private readonly SqlSugarClient db; private readonly SqlSugarClient db;
@@ -90,6 +90,7 @@ namespace Ewide.NbzsZheliban.Service
throw Oops.Oh($"ticket接口返回值有误,[{tickerRsltStr}]"); throw Oops.Oh($"ticket接口返回值有误,[{tickerRsltStr}]");
var cardno = userinfoObj["idnum"].ToString(); var cardno = userinfoObj["idnum"].ToString();
var username = userinfoObj["username"].ToString(); var username = userinfoObj["username"].ToString();
#endregion #endregion
//var cardno = args.GetJsonValue("cardno", isThrowExp: true); //var cardno = args.GetJsonValue("cardno", isThrowExp: true);
//住宅调查表 //住宅调查表
@@ -113,7 +114,9 @@ namespace Ewide.NbzsZheliban.Service
}); });
H5IndexModel h5IndexModel = new() H5IndexModel h5IndexModel = new()
{ {
PrjList = list_projects PrjList = list_projects,
IdCard = cardno,
UserName = username
}; };
return h5IndexModel; return h5IndexModel;
} }
@@ -122,5 +125,43 @@ namespace Ewide.NbzsZheliban.Service
throw Oops.Oh("无效访问"); throw Oops.Oh("无效访问");
} }
} }
/// <summary>
/// 被征收人关联的项目列表
/// </summary>
/// <param name="args"></param>
/// <returns></returns>
[HttpPost("/project/list2")]
[Microsoft.AspNetCore.Authorization.AllowAnonymous]
public async Task<dynamic> PrjList2([FromBody] JObject args)
{
var cardno = "341203199206303411";
//var cardno = args.GetJsonValue("cardno", isThrowExp: true);
//住宅调查表
var list_zz_dcb = await db.Ado.SqlQueryAsync<Dcbs>("select ID dcbId,ProjectId PrjId from InvestigateTable b where b.ExpropriatedCardNo=@ExpropriatedCardNo", new List<SugarParameter> { new SugarParameter("ExpropriatedCardNo", cardno, System.Data.DbType.String) }.ToArray());
//非住宅调查表
var list_fzz_dcb = await db.Ado.SqlQueryAsync<Dcbs>("select ID dcbId,ProjectId PrjId from NonResidentialInvestigateTable b where b.PropertyRightCardNo=@ExpropriatedCardNo", new List<SugarParameter> { new SugarParameter("ExpropriatedCardNo", cardno, System.Data.DbType.String) }.ToArray());
//调查表集合
var list_dcbs = list_zz_dcb.Concat(list_fzz_dcb);
//项目列表
var list_projects = await db.Ado.SqlQueryAsync<H5IndexPrjModel>("select a.ID Prjid,a.area,a.HouseAcquisitionDepartment as zsbm,a.CollectDecisionNo1 as year,(isnull(a.CollectDecisionNoHeadName,'')+'['+cast(a.CollectDecisionNo1 as varchar)+']'+ isnull(cast(a.CollectDecisionNo2 as varchar),'')+'号') zsjdh,dbo.get_current_state(a.ID) CurrentState from Projects a where ID in ('" + string.Join("','", list_dcbs.Select(p => p.PrjId)) + "') ");
//分户评估
var InvestigateTableID_param = "'" + string.Join("','", list_dcbs.Select(p => p.dcbId)) + "'";
var list_fhpgs = await db.Ado.SqlQueryAsync<Fhpgs>("select e.ProjectId as PrjId ,d.AssessmentNo,e.HouseAddress,d.countValue from InvestigateTable_Assessment d inner join InvestigateTable e on d.InvestigateTableId=e.ID where d.InvestigateTableID in ( " + InvestigateTableID_param + " ) union all select e.ProjectId as PrjId ,AssessmentNo, e.HouseAddress, d.countValue from NonInvestigateTable_Assessment d inner join NonResidentialInvestigateTable e on d.NonInvestigateTableID = e.ID where d.NonInvestigateTableID in ( " + InvestigateTableID_param + " ) ;");
//补偿协议
var list_bcxys = await db.Ado.SqlQueryAsync<Bcxy>("select isnull(d.CollectDecisionNoHeadName,'')+isnull(d.No1,'')+'-'+isnull(d.No2,'')+(case when (d.No3 is null or d.No3 = '') then '' else ('-'+d.No3) end ) XyNo,d.SwitchProductionWay,e.HouseAddress,d.SummationShouldCompensateMoney,e.ProjectId as PrjId from ResidentialAgreement d inner join InvestigateTable e on d.InvestigateTableId=e.ID where d.InvestigateTableID in ( " + InvestigateTableID_param + " ) union all select isnull(d.CollectDecisionNoHeadName, '') + isnull(d.No2, '') + '-' + isnull(d.No3, '') XyNo , d.SwitchProductionWay, e.HouseAddress, d.SummationShouldCompensateMoney, e.ProjectId as PrjId from NonResidentialAgreement d inner join NonResidentialInvestigateTable e on d.NonInvestigateTableID = e.ID where d.NonInvestigateTableID in ( " + InvestigateTableID_param + " ); ");
list_projects.ForEach(p =>
{
p.FhpgList = list_fhpgs.Where(a => a.PrjId == p.PrjId);
p.BcxyList = list_bcxys.Where(a => a.PrjId == p.PrjId);
});
H5IndexModel h5IndexModel = new()
{
PrjList = list_projects
};
return h5IndexModel;
}
} }
} }

View File

@@ -248,28 +248,63 @@ export default {
name: "home", name: "home",
data() { data() {
return { return {
user: { apidata: {
name: "胡伯钧", success: true,
identityId: "3302041982893743782", code: 200,
}, message: "请求成功",
project: { data: {
name: "曙光一村地块", prjList: [
area: "海曙区", {
department: "宁海县房屋征收管理中心", prjId: "936d98a8-2c8f-410f-b126-68a7568f60c4",
year: "2019", area: "海曙区",
num: "海政发【2021】28号", zsbm: "宁波市海曙区房屋征收管理服务中心",
}, year: 2021.0,
assess: { zsjdh: "海政发[2021]513号",
num: "044", currentState: "项目报结",
address: "宁波市江北区泗洲街16号404", fhpgList: [
amount: "180234", {
}, prjId: "936d98a8-2c8f-410f-b126-68a7568f60c4",
retrievalProtocol: { assessmentNo: "0513",
num: "044", houseAddress: "高桥镇",
address: "宁波市江北区泗洲街16号404", countValue: "137654.00",
compensation: "产权调换", },
amount: "180234", ],
bcxyList: [
{
prjId: "936d98a8-2c8f-410f-b126-68a7568f60c4",
xyNo: "海政发2021513-0513-1",
houseAddress: "高桥镇",
summationShouldCompensateMoney: "137654.00",
},
],
},
],
},
extras: null,
timestamp: 1631256680049,
}, },
// user: {
// name: "加载中...",
// identityId: "加载中...",
// },
// project: {
// name: "加载中...",
// area: "加载中...",
// department: "加载中...",
// year: "加载中...",
// num: "加载中...",
// },
// assess: {
// num: "",
// address: "加载中...",
// amount: "加载中...",
// },
// retrievalProtocol: {
// num: "",
// address: "加载中...",
// compensation: "加载中...",
// amount: "0",
// },
total: "8", total: "8",
list: [ list: [
{ {
@@ -293,46 +328,23 @@ export default {
], ],
loading: false, loading: false,
finished: true, finished: true,
// user: {
// avatar: '',
// name: '',
// role: '',
// account: '',
// mobile: '',
// deptName: '',
// },
// statistics: {
// new: 0, // 新建项目总数
// signing: 0, // 正在签约项目总数
// signed: 0, // 已签约项目总数
// },
}; };
}, },
created() { created() {
this.onInit(); this.onInit();
}, },
methods: { methods: {
onLoad() { onLoad() {},
// 异步更新数据
// setTimeout 仅做示例,真实场景中一般为 ajax 请求
// setTimeout(() => {
// for (let i = 0; i < 3; i++) {
// this.list.push(this.list.length + 1);
// }
// // 加载状态结束
// this.loading = false;
// // 数据全部加载完成
// if (this.list.length >= 3) {
// this.finished = true;
// }
// }, 1000);
},
onInit() { onInit() {
debugger;
// this.onLogin(); // this.onLogin();
//获取当前数据 //获取当前数据
var prjdata = apis.getprjdata({ ticket: this.$route.query.ticket }); // apis.getprjdata({ ticket: this.$route.query.ticket }).then((prjdata) => {
console.log(prjdata); // debugger;
// console.log(prjdata);
// this.user.name = prjdata.data.UserName;
// this.user.identityId = prjdata.data.IdCard;
// });
}, },
gotoProject(type) { gotoProject(type) {
this.$router.push({ name: 'projectSelect', params: { type: type } }); this.$router.push({ name: 'projectSelect', params: { type: type } });