bugfix
This commit is contained in:
@@ -109,7 +109,7 @@ namespace Ewide.Nbzs.Entity.Extends
|
|||||||
public Guid ID { get; set; }
|
public Guid ID { get; set; }
|
||||||
public string Title { get; set; }
|
public string Title { get; set; }
|
||||||
public string Contents { get; set; }
|
public string Contents { get; set; }
|
||||||
public DateTime? PublicTime { get; set; }
|
public string PublicTime { get; set; }
|
||||||
public string Area { get; set; }
|
public string Area { get; set; }
|
||||||
}
|
}
|
||||||
public class FHPG
|
public class FHPG
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ namespace Ewide.NbzsZheliban.Service
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private async Task<List<Bcxy>> GetBCXYListAsync(IEnumerable<Dcbs> list_dcbs)
|
private async Task<List<Bcxy>> GetBCXYListAsync(IEnumerable<Dcbs> list_dcbs)
|
||||||
{
|
{
|
||||||
var list = _cache.Get<List<Bcxy>>("CacheData-InvestigateTable_Assessment");
|
var list = _cache.Get<List<Bcxy>>("CacheData-ResidentialAgreement");
|
||||||
if (list != null && list.Count > 0)
|
if (list != null && list.Count > 0)
|
||||||
return list.Where(p => list_dcbs.Select(p => p.dcbId).Contains(p.dcbId)).ToList();
|
return list.Where(p => list_dcbs.Select(p => p.dcbId).Contains(p.dcbId)).ToList();
|
||||||
else
|
else
|
||||||
@@ -172,6 +172,9 @@ namespace Ewide.NbzsZheliban.Service
|
|||||||
}
|
}
|
||||||
private async Task<H5IndexModel> GetInfoByCardNoAsync(string cardno, string username)
|
private async Task<H5IndexModel> GetInfoByCardNoAsync(string cardno, string username)
|
||||||
{
|
{
|
||||||
|
var cachedata = _cache.Get("IndexData-" + cardno);
|
||||||
|
if (!string.IsNullOrWhiteSpace(cachedata))
|
||||||
|
return JSON.Deserialize<H5IndexModel>(cachedata);
|
||||||
//var cardno_aes = AESEncryption.Decrypt(cardno, Common.GetHashKey());
|
//var cardno_aes = AESEncryption.Decrypt(cardno, Common.GetHashKey());
|
||||||
var list_zz_dcb = await GetzzDcbsAsync(cardno);
|
var list_zz_dcb = await GetzzDcbsAsync(cardno);
|
||||||
var list_fzz_dcb = await GetfzzDcbsAsync(cardno);
|
var list_fzz_dcb = await GetfzzDcbsAsync(cardno);
|
||||||
@@ -198,11 +201,11 @@ namespace Ewide.NbzsZheliban.Service
|
|||||||
var listPoliciesRegulationsTemp = _cache.Get<List<Nbzs.Entity.PoliciesRegulations>>("CacheData-PoliciesRegulations");
|
var listPoliciesRegulationsTemp = _cache.Get<List<Nbzs.Entity.PoliciesRegulations>>("CacheData-PoliciesRegulations");
|
||||||
if (listPoliciesRegulationsTemp != null && listPoliciesRegulationsTemp.Count > 0)
|
if (listPoliciesRegulationsTemp != null && listPoliciesRegulationsTemp.Count > 0)
|
||||||
{
|
{
|
||||||
list_PoliciesRegulations = listPoliciesRegulationsTemp.Where(a => listAreas.Contains(a.AreaID)).Select(b => new PoliciesRegulation
|
list_PoliciesRegulations = listPoliciesRegulationsTemp.Where(a => listAreas.Contains(a.AreaID) && a.IsPublic && (a.PublicTimeEnd == null || a.PublicTimeEnd.Value > DateTime.Now)).Select(b => new PoliciesRegulation
|
||||||
{
|
{
|
||||||
ID = b.ID,
|
ID = b.ID,
|
||||||
Contents = b.Contents,
|
Contents = b.Contents,
|
||||||
PublicTime = b.PublicTime,
|
PublicTime = b.PublicTime.HasValue ? b.PublicTime.Value.ToString("yyyy-MM-dd") : string.Empty,
|
||||||
Title = b.Title,
|
Title = b.Title,
|
||||||
Area = b.Area
|
Area = b.Area
|
||||||
}).ToList();
|
}).ToList();
|
||||||
@@ -210,15 +213,20 @@ namespace Ewide.NbzsZheliban.Service
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//政策
|
//政策
|
||||||
list_PoliciesRegulations = db.Queryable<Nbzs.Entity.PoliciesRegulations>().Where(a => listAreas.Contains(a.AreaID)).Select(b => new PoliciesRegulation
|
list_PoliciesRegulations = db.Queryable<Nbzs.Entity.PoliciesRegulations>().Where(a => listAreas.Contains(a.AreaID) && a.IsPublic && (a.PublicTimeEnd == null || a.PublicTimeEnd.Value > DateTime.Now)).Select(b => new PoliciesRegulation
|
||||||
{
|
{
|
||||||
ID = b.ID,
|
ID = b.ID,
|
||||||
Contents = b.Contents,
|
Contents = b.Contents,
|
||||||
PublicTime = b.PublicTime,
|
PublicTime = b.PublicTime.HasValue ? b.PublicTime.Value.ToString("yyyy-MM-dd") : string.Empty,
|
||||||
Title = b.Title,
|
Title = b.Title,
|
||||||
Area = b.Area
|
Area = b.Area
|
||||||
}).ToList();
|
}).ToList();
|
||||||
}
|
}
|
||||||
|
//移除没有协议也没有分户评估的项目 (空项目)
|
||||||
|
list_projects.FindAll(a => (a.BcxyList == null || a.BcxyList.Count == 0) && (a.FhpgList == null || a.FhpgList.Count == 0)).ForEach(a =>
|
||||||
|
{
|
||||||
|
list_projects.Remove(a);
|
||||||
|
});
|
||||||
Nbzs.Entity.Extends.H5IndexModel h5IndexModel = new()
|
Nbzs.Entity.Extends.H5IndexModel h5IndexModel = new()
|
||||||
{
|
{
|
||||||
PrjList = list_projects,
|
PrjList = list_projects,
|
||||||
@@ -226,6 +234,7 @@ namespace Ewide.NbzsZheliban.Service
|
|||||||
UserName = username,
|
UserName = username,
|
||||||
PoliciesRegulationsLists = new Nbzs.Entity.Extends.PoliciesRegulations { List = list_PoliciesRegulations, TotalCount = list_PoliciesRegulations.Count }
|
PoliciesRegulationsLists = new Nbzs.Entity.Extends.PoliciesRegulations { List = list_PoliciesRegulations, TotalCount = list_PoliciesRegulations.Count }
|
||||||
};
|
};
|
||||||
|
_cache.Set("IndexData-" + cardno, h5IndexModel, new TimeSpan(0, 5, 0));
|
||||||
return h5IndexModel;
|
return h5IndexModel;
|
||||||
}
|
}
|
||||||
private JObject GetInfoByTicket(string ticket)
|
private JObject GetInfoByTicket(string ticket)
|
||||||
@@ -312,16 +321,40 @@ namespace Ewide.NbzsZheliban.Service
|
|||||||
var ticket = args.GetJsonValue("ticket", isThrowExp: true);
|
var ticket = args.GetJsonValue("ticket", isThrowExp: true);
|
||||||
var id = args.GetJsonGuidValue("id", isThrowExp: true);
|
var id = args.GetJsonGuidValue("id", isThrowExp: true);
|
||||||
JObject userInfoObj = GetInfoByTicket(ticket);
|
JObject userInfoObj = GetInfoByTicket(ticket);
|
||||||
var entity = await db.Queryable<Nbzs.Entity.PoliciesRegulations>().Where(p => p.ID == id).Select(p => new PoliciesRegulation
|
try
|
||||||
|
{
|
||||||
|
var cachedata = _cache.Get("IndexData-" + userInfoObj["idnum"]);
|
||||||
|
if (!string.IsNullOrWhiteSpace(cachedata))
|
||||||
|
return JSON.Deserialize<H5IndexModel>(cachedata).PoliciesRegulationsLists.List.Find(a => a.ID == id);
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
var listPoliciesRegulationsTemp = _cache.Get<List<Nbzs.Entity.PoliciesRegulations>>("CacheData-PoliciesRegulations");
|
||||||
|
if (listPoliciesRegulationsTemp != null && listPoliciesRegulationsTemp.Count > 0)
|
||||||
|
{
|
||||||
|
return listPoliciesRegulationsTemp.Where(p => p.ID == id).Select(p => new PoliciesRegulation
|
||||||
{
|
{
|
||||||
ID = p.ID,
|
ID = p.ID,
|
||||||
Area = p.Area,
|
Area = p.Area,
|
||||||
Contents = p.Contents,
|
Contents = p.Contents,
|
||||||
PublicTime = p.PublicTime,
|
PublicTime = p.PublicTime.HasValue ? p.PublicTime.Value.ToString("yyyy-MM-dd") : string.Empty,
|
||||||
Title = p.Title
|
Title = p.Title
|
||||||
}).FirstAsync();
|
}).First();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var asd = db.Queryable<Nbzs.Entity.PoliciesRegulations>().Where(p => p.ID == id).First();
|
||||||
|
var entity = db.Queryable<Nbzs.Entity.PoliciesRegulations>().Where(p => p.ID == id).Select(p => new PoliciesRegulation
|
||||||
|
{
|
||||||
|
ID = p.ID,
|
||||||
|
Area = p.Area,
|
||||||
|
Contents = p.Contents,
|
||||||
|
PublicTime = p.PublicTime.ToString(),
|
||||||
|
Title = p.Title
|
||||||
|
}).First();
|
||||||
|
entity.PublicTime = Convert.ToDateTime(entity.PublicTime).ToString("yyyy-MM-dd");
|
||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 协议详细
|
/// 协议详细
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -220,8 +220,8 @@ export default {
|
|||||||
// },
|
// },
|
||||||
// { title: "无数据", publicTime: "无数据", area: "无数据" },
|
// { title: "无数据", publicTime: "无数据", area: "无数据" },
|
||||||
// { title: "无数据", publicTime: "无数据", area: "无数据" }
|
// { title: "无数据", publicTime: "无数据", area: "无数据" }
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
// prjList: [{}, {}]
|
// prjList: [{}, {}]
|
||||||
// prjList: [
|
// prjList: [
|
||||||
// {
|
// {
|
||||||
@@ -282,14 +282,23 @@ export default {
|
|||||||
// ]
|
// ]
|
||||||
// }
|
// }
|
||||||
// ]
|
// ]
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
if (!this.$route.query.ticket) {
|
if (!this.$route.query.ticket) {
|
||||||
window.location.replace(
|
// window.location.replace(
|
||||||
"https://puser.zjzwfw.gov.cn/sso/mobile.do?action=oauth&scope=1&servicecode=fwzs"
|
// "https://puser.zjzwfw.gov.cn/sso/mobile.do?action=oauth&scope=1&servicecode=fwzs"
|
||||||
);
|
// );
|
||||||
|
ZWJSBridge.openLink({
|
||||||
|
url: "https://puser.zjzwfw.gov.cn/sso/mobile.do?action=oauth&scope=1&servicecode=fwzs",
|
||||||
|
})
|
||||||
|
.then((result) => {
|
||||||
|
console.log(result);
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
this.onInit();
|
this.onInit();
|
||||||
}
|
}
|
||||||
@@ -318,10 +327,10 @@ export default {
|
|||||||
dataType: "JSON",
|
dataType: "JSON",
|
||||||
type: "POST",
|
type: "POST",
|
||||||
data: {
|
data: {
|
||||||
ticket: this.$route.query.ticket
|
ticket: this.$route.query.ticket,
|
||||||
},
|
},
|
||||||
appKey: "es4b8zmz+2001833218+dehllx",
|
appKey: "es4b8zmz+2001833218+dehllx",
|
||||||
onSuccess: data => {
|
onSuccess: (data) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
window.sessionStorage.setItem("homeData", JSON.stringify(data));
|
window.sessionStorage.setItem("homeData", JSON.stringify(data));
|
||||||
if (data.data.success) {
|
if (data.data.success) {
|
||||||
@@ -336,7 +345,7 @@ export default {
|
|||||||
message: "登录超时,请重新登录",
|
message: "登录超时,请重新登录",
|
||||||
duration: 3000,
|
duration: 3000,
|
||||||
type: "info",
|
type: "info",
|
||||||
center: true
|
center: true,
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.location.replace(
|
window.location.replace(
|
||||||
@@ -348,20 +357,20 @@ export default {
|
|||||||
message: "请求出错",
|
message: "请求出错",
|
||||||
duration: 3000,
|
duration: 3000,
|
||||||
type: "error",
|
type: "error",
|
||||||
center: true
|
center: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onFail: err => {
|
onFail: (err) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$notify({
|
this.$notify({
|
||||||
title: "错误",
|
title: "错误",
|
||||||
message: "请求失败",
|
message: "请求失败",
|
||||||
duration: 3000,
|
duration: 3000,
|
||||||
type: "error"
|
type: "error",
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
toOlderMode() {
|
toOlderMode() {
|
||||||
@@ -391,8 +400,8 @@ export default {
|
|||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "projectSelect",
|
name: "projectSelect",
|
||||||
params: {
|
params: {
|
||||||
type: type
|
type: type,
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 直接跳转分户评估结果页面
|
// 直接跳转分户评估结果页面
|
||||||
@@ -403,8 +412,8 @@ export default {
|
|||||||
name: "evaluatePage",
|
name: "evaluatePage",
|
||||||
params: {
|
params: {
|
||||||
fhpgId: id,
|
fhpgId: id,
|
||||||
type
|
type,
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 直接跳转协议结果pdf
|
// 直接跳转协议结果pdf
|
||||||
@@ -414,8 +423,8 @@ export default {
|
|||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "showPdf",
|
name: "showPdf",
|
||||||
params: {
|
params: {
|
||||||
id
|
id,
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 加载项目数统计信息
|
// 加载项目数统计信息
|
||||||
@@ -430,38 +439,38 @@ export default {
|
|||||||
$("#app").removeClass("old_app3");
|
$("#app").removeClass("old_app3");
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "policyInfo",
|
name: "policyInfo",
|
||||||
params: { id }
|
params: { id },
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
setZwUserAplus(Userid, userName) {
|
setZwUserAplus(Userid, userName) {
|
||||||
// 设置用户信息埋点
|
// 设置用户信息埋点
|
||||||
aplus_queue.push({
|
aplus_queue.push({
|
||||||
action: "aplus.setMetaInfo",
|
action: "aplus.setMetaInfo",
|
||||||
arguments: ["_hold", "BLOCK"]
|
arguments: ["_hold", "BLOCK"],
|
||||||
});
|
});
|
||||||
aplus_queue.push({
|
aplus_queue.push({
|
||||||
action: "aplus.setMetaInfo",
|
action: "aplus.setMetaInfo",
|
||||||
arguments: ["_user_nick", userName] // this.userInfoData.username],
|
arguments: ["_user_nick", userName], // this.userInfoData.username],
|
||||||
});
|
});
|
||||||
aplus_queue.push({
|
aplus_queue.push({
|
||||||
action: "aplus.setMetaInfo",
|
action: "aplus.setMetaInfo",
|
||||||
arguments: ["_user_id", Userid]
|
arguments: ["_user_id", Userid],
|
||||||
});
|
});
|
||||||
aplus_queue.push({
|
aplus_queue.push({
|
||||||
action: "aplus.setMetaInfo",
|
action: "aplus.setMetaInfo",
|
||||||
arguments: ["_hold", "START"]
|
arguments: ["_hold", "START"],
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
setLocationAplus() {
|
setLocationAplus() {
|
||||||
ZWJSBridge.onReady(() => {
|
ZWJSBridge.onReady(() => {
|
||||||
// console.log("初始化完成后,执行bridge方法");
|
// console.log("初始化完成后,执行bridge方法");
|
||||||
ZWJSBridge.getUserType()
|
ZWJSBridge.getUserType()
|
||||||
.then(result1 => {
|
.then((result1) => {
|
||||||
// console.log("getUserType():" + JSON.stringify(result1));
|
// console.log("getUserType():" + JSON.stringify(result1));
|
||||||
// console.log("result1.userType:" + result1.userType);
|
// console.log("result1.userType:" + result1.userType);
|
||||||
//经纬度
|
//经纬度
|
||||||
ZWJSBridge.getLocation()
|
ZWJSBridge.getLocation()
|
||||||
.then(result2 => {
|
.then((result2) => {
|
||||||
// console.log("getLocation():" + JSON.stringify(result2));
|
// console.log("getLocation():" + JSON.stringify(result2));
|
||||||
// console.log("result2.longitude:" + result2.longitude);
|
// console.log("result2.longitude:" + result2.longitude);
|
||||||
// console.log("result2.latitude:" + result2.latitude);
|
// console.log("result2.latitude:" + result2.latitude);
|
||||||
@@ -469,7 +478,7 @@ export default {
|
|||||||
action: "aplus.sendPV",
|
action: "aplus.sendPV",
|
||||||
arguments: [
|
arguments: [
|
||||||
{
|
{
|
||||||
is_auto: false
|
is_auto: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
isMini: true,
|
isMini: true,
|
||||||
@@ -477,16 +486,16 @@ export default {
|
|||||||
miniAppName: "房屋征收",
|
miniAppName: "房屋征收",
|
||||||
long: result2.longitude,
|
long: result2.longitude,
|
||||||
lati: result2.latitude,
|
lati: result2.latitude,
|
||||||
userType: result1.userType
|
userType: result1.userType,
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch((error) => {
|
||||||
// console.log(error);
|
// console.log(error);
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch((error) => {
|
||||||
// console.log(error);
|
// console.log(error);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -494,7 +503,7 @@ export default {
|
|||||||
scan() {
|
scan() {
|
||||||
//扫一扫
|
//扫一扫
|
||||||
ZWJSBridge.scan({ type: "qrCode" })
|
ZWJSBridge.scan({ type: "qrCode" })
|
||||||
.then(data => {
|
.then((data) => {
|
||||||
// data =>{"text" : "扫描到的内容"}
|
// data =>{"text" : "扫描到的内容"}
|
||||||
if (data.text.indexOf("http") > -1) {
|
if (data.text.indexOf("http") > -1) {
|
||||||
window.location.replace(data.text);
|
window.location.replace(data.text);
|
||||||
@@ -503,15 +512,15 @@ export default {
|
|||||||
message: data.text,
|
message: data.text,
|
||||||
duration: 3000,
|
duration: 3000,
|
||||||
type: "info",
|
type: "info",
|
||||||
center: true
|
center: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch((error) => {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user