|
@@ -414,7 +414,7 @@ class CompilationController extends BaseController {
|
|
// 先存入工程专业标准库表
|
|
// 先存入工程专业标准库表
|
|
let engineeringLibModel = new EngineeringLibModel();
|
|
let engineeringLibModel = new EngineeringLibModel();
|
|
let result = await engineeringLibModel.addLib(engineerId, request.body);
|
|
let result = await engineeringLibModel.addLib(engineerId, request.body);
|
|
-
|
|
|
|
|
|
+ console.log(result);
|
|
if (!result) {
|
|
if (!result) {
|
|
throw "保存失败";
|
|
throw "保存失败";
|
|
}
|
|
}
|
|
@@ -1019,6 +1019,25 @@ class CompilationController extends BaseController {
|
|
response.json({ error: 1, message: "更新数据错误", data: null });
|
|
response.json({ error: 1, message: "更新数据错误", data: null });
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 更改编办地区
|
|
|
|
+ *
|
|
|
|
+ * @param request
|
|
|
|
+ * @param response
|
|
|
|
+ * @return {Promise.<void>}
|
|
|
|
+ */
|
|
|
|
+ async setCompilationArea(request, response) {
|
|
|
|
+ let compilationId = request.body.id;
|
|
|
|
+ let compilationArea = request.body.compilationArea;
|
|
|
|
+ try {
|
|
|
|
+ let compilationModel = new CompilationModel();
|
|
|
|
+ await compilationModel.setCompilationArea(compilationId, compilationArea);
|
|
|
|
+ response.json({ err: 0, msg: "", data: null });
|
|
|
|
+ } catch (err) {
|
|
|
|
+ response.json({ err: 1, msg: err, data: null });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
export default CompilationController;
|
|
export default CompilationController;
|