Commit 6aa57898 by linboxuan

opneedInfo update

parent df69fd15
...@@ -39,6 +39,16 @@ class diagnosisDao extends Dao { ...@@ -39,6 +39,16 @@ class diagnosisDao extends Dao {
}, },
attributes: [ attributes: [
"diagnosis_no", "diagnosis_no",
"corporate_name",
"diagnosis_type_name",
"publish_mobile",
"main_class",
"corporate_type_name",
"created_at",
"qualifications_pic",
"brand_pic",
"industry_pic",
"diagnosis_result",
"diagnosis_result_name", "diagnosis_result_name",
"diagnosis_result_data"], "diagnosis_result_data"],
raw: true raw: true
......
...@@ -96,12 +96,19 @@ class DiagnosisService extends ServiceBase { ...@@ -96,12 +96,19 @@ class DiagnosisService extends ServiceBase {
let res = await this.dao.findAndCountAll(query) let res = await this.dao.findAndCountAll(query)
return system.getResultSuccess(res); return system.getResultSuccess(res);
} }
// 过滤数组 筛选出选择过的资质
checkIsChoice(obj) {
console.log(obj)
return obj.isChoice == true;
}
async diagnosisDetail(pobj) { async diagnosisDetail(pobj) {
if(!pobj.actionBody.diagnosisNo) { if(!pobj.actionBody.diagnosisNo) {
return system.getResultFail(-5008, "诊断单号不能为空"); return system.getResultFail(-5008, "诊断单号不能为空");
} }
let diagnosisResult = await this.dao.findOneByDiagnosisNo(pobj.actionBody.diagnosisNo) let diagnosisResult = await this.dao.findOneByDiagnosisNo(pobj.actionBody.diagnosisNo)
diagnosisResult.needQualifications_pic = diagnosisResult.qualifications_pic.filter(this.checkIsChoice);
diagnosisResult.needBrand_pic = diagnosisResult.brand_pic.filter(this.checkIsChoice);
diagnosisResult.needIndustry_pic = diagnosisResult.industry_pic.filter(this.checkIsChoice);
return system.getResultSuccess(diagnosisResult); return system.getResultSuccess(diagnosisResult);
} }
......
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