Commit 3f1feab9 by wkliang

诊断 新建方案

parent 81d7406e
......@@ -40,12 +40,12 @@ class DiagnosisNeedBusAPI extends APIBase {
case 'getNeedDetail': // 需求详情
opResult = await this.needSve.getItemByNeedNo(pobj);
break
case 'addCase':
opResult = await this.dnbSve.addCase(pobj)
case 'addCase': // 新建方案
opResult = await this.dnbSve.addCase(pobj, pobj.actionBody)
break
default:
opResult = system.getResult(null, "actionType参数错误");
break;
break
}
return opResult;
}
......
......@@ -2,10 +2,10 @@
module.exports = function(sequelize, DataTypes) {
return sequelize.define('diagnosisneedsolution', {
diagnosisNo: DataTypes.STRING,
solutionContent: DataTypes.JSON,
creatorId: DataTypes.INTEGER,
updatorId: DataTypes.INTEGER,
diagnosis_no: DataTypes.STRING,
solution_content: DataTypes.JSON,
creator_id: DataTypes.INTEGER,
updator_id: DataTypes.INTEGER,
}, {
tableName: 'n_zzzd_need_solution',
paranoid: true,//假的删除
......
......@@ -102,8 +102,11 @@ class diagnosisneedbusService extends ServiceBase {
let param = {
diagnosis_no: data.diagnosisNo,
solution_content: data.solutionContent,
creator_id: pobj.userInfo.id,
updator_id: pobj.userInfo.id
}
if (pobj.userInfo && pobj.userInfo.id) {
param.creator_id = pobj.userInfo.id,
param.updator_id = pobj.userInfo.id
}
let res = await this.solDao.create(param)
return System.getResultSuccess(res)
......
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