Commit c90b99d8 by wkliang

fix

parent 75055007
......@@ -18,7 +18,8 @@ class diagnosisneedbusService extends ServiceBase {
'publish_name',
'publish_mobile',
'status',
'status_name'
'status_name',
'updated_at'
],
order: [["updated_at", 'desc']]
}
......@@ -26,18 +27,27 @@ class diagnosisneedbusService extends ServiceBase {
if (data.diagnosisNo) {
where.diagnosis_no = { [this.db.Op.like]: `%${data.diagnosisNo}%` }
}
if (data.diagnosisTypeName) {
where.diagnosis_type_name = { [this.db.Op.like]: `%${data.diagnosisTypeName}%` }
}
if (data.publishMobile) {
where.publish_mobile = { [this.db.Op.like]: `%${data.publishMobile}%` }
}
if (data.status) {
where.status = data.status
}
if (data.publishName) {
where.publish_name = { [this.db.Op.like]: `%${data.publishName}%` }
}
if (data.updatedAt) {
where.updated_at = { [this.db.Op.between]: data.updatedAt }
if (data.stdate && data.endate) {
where.updated_at = { [this.db.Op.between]: [data.stdate, data.endate]}
}
if (data.corporateType) {
where.corporate_type = data.corporateType
}
if (data.diagnosis_mode) {
where.diagnosis_mode = data.diagnosis_mode
}
if (Object.keys(where).length > 0) {
query.where = where
}
......@@ -52,6 +62,9 @@ class diagnosisneedbusService extends ServiceBase {
async getDetail (pobj, id) {
try {
let res = await this.dao.findById(id)
if (res) {
res.auth_result_name = res.diagnosis_result == 'tg' ? '已认证' : '未认证'
}
return System.getResultSuccess(res)
} catch (error) {
return System.getResultFail(-1, error.message)
......
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