Browse Source

授权管理

release_0.0.1
巴林闲侠 2 years ago
parent
commit
6f4dcd76d0
  1. 2
      api/.vscode/launch.json
  2. 71
      api/app/lib/controllers/approval/index.js
  3. 65
      api/app/lib/controllers/auth/index.js
  4. 116
      api/app/lib/controllers/common/contants.js
  5. 63
      api/app/lib/controllers/common/index.js
  6. 72
      api/app/lib/controllers/data/vehicle.js
  7. 25
      api/app/lib/controllers/department/index.js
  8. 87
      api/app/lib/controllers/organization/authority.js
  9. 152
      api/app/lib/controllers/organization/department.js
  10. 151
      api/app/lib/controllers/organization/user.js
  11. 612
      api/app/lib/controllers/placeSecurityRecord/index.js
  12. 91
      api/app/lib/controllers/places/index.js
  13. 140
      api/app/lib/controllers/report/compile.js
  14. 173
      api/app/lib/controllers/report/config.js
  15. 87
      api/app/lib/controllers/report/index.js
  16. 342
      api/app/lib/controllers/statistic/index.js
  17. 483
      api/app/lib/controllers/wxReport/index.js
  18. 23
      api/app/lib/index.js
  19. 97
      api/app/lib/models/department.js
  20. 61
      api/app/lib/models/places.js
  21. 47
      api/app/lib/models/post.js
  22. 51
      api/app/lib/models/post_resource.js
  23. 34
      api/app/lib/models/region_type.js
  24. 88
      api/app/lib/models/report_collection.js
  25. 74
      api/app/lib/models/report_configition.js
  26. 69
      api/app/lib/models/report_countyCollect.js
  27. 82
      api/app/lib/models/report_downManage.js
  28. 115
      api/app/lib/models/report_rectify.js
  29. 33
      api/app/lib/models/report_type.js
  30. 44
      api/app/lib/models/resource.js
  31. 201
      api/app/lib/models/user.js
  32. 311
      api/app/lib/models/user_placeSecurityRecord.js
  33. 61
      api/app/lib/models/user_resource.js
  34. 76
      api/app/lib/models/user_token.js
  35. 43
      api/app/lib/models/vehicle.js
  36. 13
      api/app/lib/routes/approval/index.js
  37. 19
      api/app/lib/routes/auth/index.js
  38. 9
      api/app/lib/routes/common/index.js
  39. 15
      api/app/lib/routes/data/index.js
  40. 13
      api/app/lib/routes/department/index.js
  41. 2
      api/app/lib/routes/index.js
  42. 28
      api/app/lib/routes/organization/authority.js
  43. 34
      api/app/lib/routes/organization/index.js
  44. 32
      api/app/lib/routes/organization/user.js
  45. 70
      api/app/lib/routes/placeSecurityRecord/index.js
  46. 30
      api/app/lib/routes/places/index.js
  47. 41
      api/app/lib/routes/report/index.js
  48. 28
      api/app/lib/routes/statistic/index.js
  49. 78
      api/app/lib/routes/wxReport/index.js
  50. 816
      api/log/development.log
  51. 15
      api/node_modules/.bin/_mocha
  52. 7
      api/node_modules/.bin/_mocha.cmd
  53. 15
      api/node_modules/.bin/acorn
  54. 7
      api/node_modules/.bin/acorn.cmd
  55. 15
      api/node_modules/.bin/adler32
  56. 7
      api/node_modules/.bin/adler32.cmd
  57. 15
      api/node_modules/.bin/codepage
  58. 7
      api/node_modules/.bin/codepage.cmd
  59. 15
      api/node_modules/.bin/crc32
  60. 7
      api/node_modules/.bin/crc32.cmd
  61. 15
      api/node_modules/.bin/detect-libc
  62. 7
      api/node_modules/.bin/detect-libc.cmd
  63. 15
      api/node_modules/.bin/escodegen
  64. 7
      api/node_modules/.bin/escodegen.cmd
  65. 15
      api/node_modules/.bin/esgenerate
  66. 7
      api/node_modules/.bin/esgenerate.cmd
  67. 15
      api/node_modules/.bin/esparse
  68. 7
      api/node_modules/.bin/esparse.cmd
  69. 15
      api/node_modules/.bin/esvalidate
  70. 7
      api/node_modules/.bin/esvalidate.cmd
  71. 15
      api/node_modules/.bin/flat
  72. 7
      api/node_modules/.bin/flat.cmd
  73. 15
      api/node_modules/.bin/handlebars
  74. 7
      api/node_modules/.bin/handlebars.cmd
  75. 15
      api/node_modules/.bin/he
  76. 7
      api/node_modules/.bin/he.cmd
  77. 15
      api/node_modules/.bin/js-yaml
  78. 7
      api/node_modules/.bin/js-yaml.cmd
  79. 15
      api/node_modules/.bin/mime
  80. 7
      api/node_modules/.bin/mime.cmd
  81. 15
      api/node_modules/.bin/mkdirp
  82. 7
      api/node_modules/.bin/mkdirp.cmd
  83. 15
      api/node_modules/.bin/mocha
  84. 7
      api/node_modules/.bin/mocha.cmd
  85. 15
      api/node_modules/.bin/os-name
  86. 7
      api/node_modules/.bin/os-name.cmd
  87. 15
      api/node_modules/.bin/osx-release
  88. 7
      api/node_modules/.bin/osx-release.cmd
  89. 15
      api/node_modules/.bin/prebuild-install
  90. 7
      api/node_modules/.bin/prebuild-install.cmd
  91. 15
      api/node_modules/.bin/printj
  92. 7
      api/node_modules/.bin/printj.cmd
  93. 15
      api/node_modules/.bin/rc
  94. 7
      api/node_modules/.bin/rc.cmd
  95. 15
      api/node_modules/.bin/resolve
  96. 7
      api/node_modules/.bin/resolve.cmd
  97. 15
      api/node_modules/.bin/rimraf
  98. 7
      api/node_modules/.bin/rimraf.cmd
  99. 15
      api/node_modules/.bin/semver
  100. 7
      api/node_modules/.bin/semver.cmd

2
api/.vscode/launch.json

@ -15,7 +15,7 @@
"args": [
"-p 14000",
"-f http://localhost:14000",
"-g postgres://postgres:123@10.8.30.32:5432/yinjiguanli",
"-g postgres://postgres:123@10.8.30.32:5432/highways4good",
]
},
{

71
api/app/lib/controllers/approval/index.js

@ -1,71 +0,0 @@
'use strict';
/**
* 提交审批驳回修改
* body {
* action:1驳回修改 2审批通过
* userRegionType:提交用户所属区域级别3乡镇级2区县级
* userId:提交用户id
* rejectReasons:驳回意见
* correctiveAction:采取措施区县复核时提交内容
* punishment:实施处罚强制措施情况区县复核时提交内容
* }
*/
const moment = require('moment');
async function submitApproval (ctx) {
try {
const data = ctx.request.body;
const models = ctx.fs.dc.models;
let oldData = await models.UserPlaceSecurityRecord.findOne({ where: { id: data.id } })
if (oldData == null) {
ctx.status = 400;
ctx.body = { name: `message`, message: `该条填报数据不存在` };
} else {
if ((data.action == 1 || data.action == 2) && (data.userRegionType == 3 || data.userRegionType == 2)) {
let dataSave = {}
if (data.action == 1) {//驳回
dataSave = {
rejectManId: data.userId,
rejectReasons: data.rejectReasons,
type: false,//是否重新发起true默认false可以重新发起
rejectTime: moment()
}
if (data.userRegionType == 2) {//区县复核,14、15项可修改
dataSave.correctiveAction = data.correctiveAction;
dataSave.punishment = data.punishment;
}
} else {//通过
if (data.userRegionType == 3) {
dataSave = {
audit1ManId: data.userId,
audit1ManIdTime: moment().format()
}
} else {
dataSave = {//区县复核,14、15项可修改
correctiveAction: data.correctiveAction,
punishment: data.punishment,
audit2ManId: data.userId,
audit2ManIdTime: moment().format()
}
}
}
await models.UserPlaceSecurityRecord.update(dataSave, { where: { id: data.id } });
ctx.status = 200;
ctx.body = { name: `message`, message: `提交成功` };
} else {
ctx.status = 400;
ctx.body = { name: `message`, message: `提交数据有误` };
}
}
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
"message": { name: `message`, message: `提交审批、驳回修改数据失败` }
}
}
}
module.exports = {
submitApproval
};

65
api/app/lib/controllers/auth/index.js

@ -4,7 +4,7 @@ const MD5 = require('crypto-js/md5');
const moment = require('moment');
const uuid = require('uuid');
async function login(ctx, next) {
async function login (ctx, next) {
const transaction = await ctx.fs.dc.orm.transaction();
try {
const models = ctx.fs.dc.models;
@ -17,11 +17,7 @@ async function login(ctx, next) {
password: password,
delete: false,
},
attributes: { exclude: ['password'] },
include: [{
attributes: ["resourceId"],
model: models.UserResource
}]
attributes: { exclude: ['password', 'delete'] },
});
if (!userRes) {
@ -43,8 +39,6 @@ async function login(ctx, next) {
let userRslt = Object.assign(userRes.dataValues, {
authorized: true,
token: token,
userResources: userRes.userResources.map(r => r.resourceId),
type: deptInfo.type
});
await models.UserToken.create({
@ -71,7 +65,7 @@ async function login(ctx, next) {
* 微信小程序登录
* @@requires.body {phone-手机号, password-密码} ctx
*/
async function wxLogin(ctx, next) {
async function wxLogin (ctx, next) {
const transaction = await ctx.fs.dc.orm.transaction();
try {
const models = ctx.fs.dc.models;
@ -83,7 +77,7 @@ async function wxLogin(ctx, next) {
password: password,
delete: false,
},
attributes: { exclude: ['password'] }
attributes: { exclude: ['password', 'delete'] },
});
if (!userRes) {
ctx.status = 400;
@ -93,27 +87,7 @@ async function wxLogin(ctx, next) {
ctx.body = { message: "该用户已被禁用" }
} else {
const token = uuid.v4();
//获取用户关注区域信息
const departmentRes = await models.Department.findOne({ where: { id: userRes.departmentId } });
let attentionRegion = departmentRes;
while (attentionRegion.dependence && attentionRegion.type != 1) {
const departmentParent = await models.Department.findOne({ where: { id: attentionRegion.dependence } });
attentionRegion = {
...departmentParent.dataValues,
nextRegin: attentionRegion
}
}
//获取用户权限信息
const resourceRes = await models.UserResource.findAll({
where: {
userId: userRes.id
},
include: [{
model: models.Resource,
attributes: ['code', 'name'],
}],
attributes: []
});
let userRslt = Object.assign({
authorized: true,
token: token,
@ -127,9 +101,6 @@ async function wxLogin(ctx, next) {
ctx.status = 200;
ctx.body = Object.assign({
...userRslt,
userRegionType: departmentRes.type,//1-市级,2-区县级,3-乡镇级,4-村级
attentionRegion: attentionRegion,
resources: resourceRes.map(r => r.resource)
});
}
await transaction.commit();
@ -143,7 +114,7 @@ async function wxLogin(ctx, next) {
}
}
async function logout(ctx) {
async function logout (ctx) {
try {
const { token, code } = ctx.request.body;
const models = ctx.fs.dc.models;
@ -164,32 +135,8 @@ async function logout(ctx) {
}
}
/**
* 微信小程序登出
* @request.body {token-用户登录Token} ctx
*/
async function wxLogout(ctx) {
try {
const { token } = ctx.request.body;
const models = ctx.fs.dc.models;
await models.UserToken.destroy({
where: {
token: token,
},
});
ctx.status = 204;
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
"message": "登出失败"
}
}
}
module.exports = {
login,
wxLogin,
logout,
wxLogout
};

116
api/app/lib/controllers/common/contants.js

@ -1,116 +0,0 @@
function deepCompare(x, y) {
var i, l, leftChain, rightChain;
function compare2Objects(x, y) {
var p;
// remember that NaN === NaN returns false
// and isNaN(undefined) returns true
if (isNaN(x) && isNaN(y) && typeof x === 'number' && typeof y === 'number') {
return true;
}
// Compare primitives and functions.
// Check if both arguments link to the same object.
// Especially useful on the step where we compare prototypes
if (x === y) {
return true;
}
// Works in case when functions are created in constructor.
// Comparing dates is a common scenario. Another built-ins?
// We can even handle functions passed across iframes
if ((typeof x === 'function' && typeof y === 'function') ||
(x instanceof Date && y instanceof Date) ||
(x instanceof RegExp && y instanceof RegExp) ||
(x instanceof String && y instanceof String) ||
(x instanceof Number && y instanceof Number)) {
return x.toString() === y.toString();
}
// At last checking prototypes as good as we can
if (!(x instanceof Object && y instanceof Object)) {
return false;
}
if (x.isPrototypeOf(y) || y.isPrototypeOf(x)) {
return false;
}
if (x.constructor !== y.constructor) {
return false;
}
if (x.prototype !== y.prototype) {
return false;
}
// Check for infinitive linking loops
if (leftChain.indexOf(x) > -1 || rightChain.indexOf(y) > -1) {
return false;
}
// Quick checking of one object being a subset of another.
// todo: cache the structure of arguments[0] for performance
for (p in y) {
if (y.hasOwnProperty(p) !== x.hasOwnProperty(p)) {
return false;
} else if (typeof y[p] !== typeof x[p]) {
return false;
}
}
for (p in x) {
if (y.hasOwnProperty(p) !== x.hasOwnProperty(p)) {
return false;
} else if (typeof y[p] !== typeof x[p]) {
return false;
}
switch (typeof (x[p])) {
case 'object':
case 'function':
leftChain.push(x);
rightChain.push(y);
if (!compare2Objects(x[p], y[p])) {
return false;
}
leftChain.pop();
rightChain.pop();
break;
default:
if (x[p] !== y[p]) {
return false;
}
break;
}
}
return true;
}
if (arguments.length < 1) {
return true; //Die silently? Don't know how to handle such case, please help...
// throw "Need two or more arguments to compare";
}
for (i = 1, l = arguments.length; i < l; i++) {
leftChain = []; //Todo: this can be cached
rightChain = [];
if (!compare2Objects(arguments[0], arguments[i])) {
return false;
}
}
return true;
}
module.exports = {
deepCompare
}

63
api/app/lib/controllers/common/index.js

@ -1,63 +0,0 @@
//获取固化数据接口
async function getDataDictionary(ctx) {
try {
const models = ctx.fs.dc.models;
const { model } = ctx.params;
const { where, attributes, order } = ctx.query;
let findObj = {};
if (where) {
let whereJson = JSON.parse(where);
findObj.where = whereJson;
}
if (order) {
findObj.order = [JSON.parse(order)];
}
if (attributes) {
attributes = attributes.split(',');
}
let rslt = await models[model].findAll(findObj);
ctx.status = 200;
ctx.body = rslt;
} catch (error) {
console.log(error)
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
"message": "获取数据字典失败"
}
}
}
//基础修改接口
async function putDataDictionary(ctx) {
const transaction = await ctx.fs.dc.orm.transaction();
try {
const models = ctx.fs.dc.models;
let errMsg = "修改失败";
const { model } = ctx.params;
const { where, dataToSave } = ctx.request.body;
const oldData = await models[model].findOne({ where: where });
if (oldData) {
await models[model].update(dataToSave, { where: where, transaction });
} else {
errMsg = "未找到需要修改的数据";
ctx.throw(400)
}
ctx.status = 204;
await transaction.commit();
} catch (error) {
await transaction.rollback();
console.log(error)
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
"message": errMsg
}
}
}
module.exports = {
getDataDictionary,
putDataDictionary
};

72
api/app/lib/controllers/data/vehicle.js

@ -0,0 +1,72 @@
'use strict';
async function get (ctx) {
try {
const models = ctx.fs.dc.models;
const vehicleRes = await models.Vehicle.findAll()
ctx.status = 200;
ctx.body = vehicleRes
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
message: typeof error == 'string' ? error : undefined
}
}
}
async function edit (ctx) {
try {
const models = ctx.fs.dc.models;
const { vehicleId, name, count } = ctx.request.body;
if (!vehicleId) {
const vehicleRes = await models.Vehicle.create({
name, count
})
} else {
const vehicleRes = await models.Vehicle.update({
name, count
}, {
where: {
id: vehicleId
}
})
}
ctx.status = 204
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
message: typeof error == 'string' ? error : undefined
}
}
}
async function del (ctx) {
try {
const models = ctx.fs.dc.models;
const { vehicleId } = ctx.params;
const vehicleRes = await models.Vehicle.destroy({
where: {
id: vehicleId
}
})
ctx.status = 204
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
message: typeof error == 'string' ? error : undefined
}
}
}
module.exports = {
get, edit, del,
};

25
api/app/lib/controllers/department/index.js

@ -1,25 +0,0 @@
'use strict';
//获取南昌市下所有区县
async function getCountiesList(ctx) {
try {
const models = ctx.fs.dc.models;
let rslt = await models.Department.findAll({
where: { type: 2 },
order: [['id', 'asc']],
});
ctx.status = 200;
ctx.body = rslt;
} catch (error) {
console.log(error)
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
"message": "获取南昌市下所有区县失败"
}
}
}
module.exports = {
getCountiesList,
};

87
api/app/lib/controllers/organization/authority.js

@ -1,87 +0,0 @@
async function getResource(ctx, next) {
try {
const models = ctx.fs.dc.models;
const res = await models.Resource.findAll({
where: { parentResource: null },
include: [{
model: models.Resource,
}]
})
ctx.body = res;
ctx.status = 200;
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
"message": "查询所有权限数据失败"
}
}
}
async function getUserResource(ctx, next) {
try {
const models = ctx.fs.dc.models;
const { userId } = ctx.query;
const res = await models.UserResource.findAll({
where: { userId: userId },
include: [{
model: models.Resource,
}]
})
ctx.body = res;
ctx.status = 200;
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
"message": "查询用户权限数据失败"
}
}
}
async function updateUserRes(ctx, next) {
const transaction = await ctx.fs.dc.orm.transaction();
try {
const models = ctx.fs.dc.models;
const { userId, resCode } = ctx.request.body;
const res = await models.UserResource.findAll({
attributes: ["resourceId"],
raw: true,
where: { userId: userId }
})
const addRes = resCode.filter(r => !res.some(rr => rr.resourceId == r)).map(r => { return { userId: userId, resourceId: r } });
const delRes = res.filter(r => !resCode.includes(r.resourceId)).map(r => r.resourceId);
addRes.length && await models.UserResource.bulkCreate(addRes, { transaction: transaction });
delRes.length && await models.UserResource.destroy({
where: {
resourceId: { $in: delRes },
userId: userId
},
transaction: transaction
})
ctx.status = 204;
await transaction.commit();
} catch (error) {
await transaction.rollback();
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
"message": "更新用户权限数据失败"
}
}
}
module.exports = {
getResource,
getUserResource,
updateUserRes
};

152
api/app/lib/controllers/organization/department.js

@ -0,0 +1,152 @@
'use strict';
async function getdep (ctx) {
try {
const { fs: { api: { userInfo } } } = ctx
const models = ctx.fs.dc.models;
let depLevel0 = await models.Department.findAll({
order: [['id', 'asc']],
where: {
// id: userInfo.departmentId
dependence: null,
delete: false
},
})
let depRslt = []
const getDep = async (d) => {
let subordinate = []
let depRes = await models.Department.findAll({
order: [['id', 'asc']],
where: {
dependence: d.id,
delete: false
},
})
if (depRes.length)
for (let d of depRes) {
let dep = d.dataValues
dep.subordinate = await getDep(d.dataValues)
subordinate.push(dep)
}
return subordinate
}
for (let d of depLevel0) {
let dep0 = d.dataValues
dep0.subordinate = await getDep(d.dataValues)
depRslt.push(dep0)
}
ctx.status = 200;
ctx.body = depRslt
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {}
}
}
async function editDep (ctx) {
try {
const models = ctx.fs.dc.models;
const { depId, name, dependence } = ctx.request.body;
if (dependence) {
let dep = await models.Department.findOne({
where: {
id: dependence,
delete: false
},
})
if (!dep) {
ctx.status = 400;
ctx.body = {
"message": "上级部门不存在"
}
return
}
}
if (depId) {
await models.Department.update({
name: name,
dependence: dependence || null,
}, {
where: {
id: depId
}
})
} else {
await models.Department.create({
name: name,
dependence: dependence || null,
})
}
ctx.status = 204;
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {}
}
}
async function delDep (ctx) {
const transaction = await ctx.fs.dc.orm.transaction();
try {
const models = ctx.fs.dc.models;
const { depId } = ctx.params;
let depIds = []
let depLevel0 = await models.Department.findAll({
where: {
id: depId
},
})
const getDep = async (d) => {
let depRes = await models.Department.findAll({
where: {
dependence: d.id,
delete: false
},
})
if (depRes.length)
for (let d of depRes) {
depIds.push(d.dataValues.id)
await getDep(d.dataValues)
}
}
for (let d of depLevel0) {
depIds.push(d.id)
getDep(d.dataValues)
}
await models.Department.update({
delete: true,
}, {
where: {
id: { $in: depId },
},
transaction
})
await models.User.update({
delete: true,
}, {
where: {
departmentId: { $in: depId },
},
transaction
})
await transaction.commit();
ctx.status = 204;
} catch (error) {
await transaction.rollback();
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {}
}
}
module.exports = {
getdep, editDep, delDep,
};

151
api/app/lib/controllers/organization/user.js

@ -2,65 +2,6 @@
const Hex = require('crypto-js/enc-hex');
const MD5 = require('crypto-js/md5');
async function getDepMessage (ctx, next) {
try {
const { fs: { api: { userInfo } } } = ctx
const models = ctx.fs.dc.models;
let depType1 = await models.Department.findAll({
order: [['id', 'asc']],
// include: [{
// model: models.User,
// required: false,
// where: { delete: false },
// attributes: { exclude: ['password'] },
// }],
where: {
// type: 1,
id: userInfo.departmentId
},
})
let depRslt = []
const getDep = async (d) => {
let subordinate = []
let depRes = await models.Department.findAll({
order: [['id', 'asc']],
// include: [{
// model: models.User,
// required: false,
// where: { delete: false },
// attributes: { exclude: ['password'] },
// }],
where: {
dependence: d.id
},
})
if (depRes.length)
for (let d of depRes) {
let dep = d.dataValues
dep.subordinate = await getDep(d.dataValues)
subordinate.push(dep)
}
return subordinate
}
for (let d of depType1) {
let dep_1 = d.dataValues
dep_1.subordinate = await getDep(d.dataValues)
depRslt.push(dep_1)
}
ctx.status = 200;
ctx.body = depRslt
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
"message": "获取部门信息失败"
}
}
}
async function getUser (ctx, next) {
try {
const models = ctx.fs.dc.models;
@ -70,7 +11,7 @@ async function getUser (ctx, next) {
departmentId: parseInt(depId),
delete: false
},
attributes: { exclude: ['password'] },
attributes: { exclude: ['password', 'delete'] },
order: [['id', 'asc']],
})
@ -86,33 +27,31 @@ async function getUser (ctx, next) {
}
async function creatUser (ctx, next) {
let errMsg = "新建用户失败"
try {
const models = ctx.fs.dc.models;
const data = ctx.request.body;
let repeatUserNameCount = await models.User.count({
where: {
username: data.phone,
username: data.username,
delete: false
}
})
if (repeatUserNameCount) {
errMsg = '已有当前用户名'
throw errMsg
throw '已有当前用户名'
}
await models.User.create({
name: data.name,
username: data.phone,
username: data.username,
password: Hex.stringify(MD5(data.password)),
departmentId: data.departmentId,
email: data.email,
enable: data.enable,
delete: false,
phone: data.phone,
post: data.post,
remark: 'th',
})
ctx.status = 204;
@ -120,7 +59,7 @@ async function creatUser (ctx, next) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
"message": errMsg
message: typeof error == 'string' ? error : undefined
}
}
}
@ -131,31 +70,31 @@ async function updateUser (ctx, next) {
try {
const models = ctx.fs.dc.models;
const data = ctx.request.body;
const { id } = ctx.params;
const { userId } = ctx.params;
let repeatUserNameCount = await models.User.count({
where: {
username: data.username
username: data.username,
delete: false,
id: { $ne: userId }
}
})
if (repeatUserNameCount) {
errMsg = '已有当前用户名'
throw errMsg
throw '已有当前用户名'
}
await models.User.update({
name: data.name,
username: data.phone,
username: data.username,
departmentId: data.departmentId,
email: data.email,
enable: data.enable,
delete: false,
phone: data.phone,
post: data.post,
}, {
where: {
id: id
id: userId
}
});
@ -164,7 +103,7 @@ async function updateUser (ctx, next) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
"message": errMsg
message: typeof error == 'string' ? error : undefined
}
}
}
@ -172,13 +111,13 @@ async function updateUser (ctx, next) {
async function deleteUser (ctx, next) {
try {
const models = ctx.fs.dc.models;
const { ids } = ctx.params;
const userIds = ids.split(',');
const { userIds } = ctx.params;
const userIds_ = userIds.split(',');
await models.User.update({
delete: true,
}, {
where: {
id: { $in: userIds },
id: { $in: userIds_ },
}
});
ctx.status = 204;
@ -191,34 +130,29 @@ async function deleteUser (ctx, next) {
}
}
async function resetPwd (ctx, next) {
try {
const models = ctx.fs.dc.models;
const { id } = ctx.params;
const data = ctx.request.body;
await models.User.update({
password: Hex.stringify(MD5(data.password)),
}, {
where: {
id: id,
}
});
ctx.status = 204;
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
"message": "重置用户密码失败"
}
}
}
/**
* 修改用户密码
* @params {userId-用户Id} ctx
* @request.body {password-用户新密码} ctx
*/
async function updateUserPassword (ctx, next) {
// async function resetPwd (ctx, next) {
// try {
// const models = ctx.fs.dc.models;
// const { id } = ctx.params;
// const data = ctx.request.body;
// await models.User.update({
// password: Hex.stringify(MD5(data.password)),
// }, {
// where: {
// id: id,
// }
// });
// ctx.status = 204;
// } catch (error) {
// ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
// ctx.status = 400;
// ctx.body = {
// "message": "重置用户密码失败"
// }
// }
// }
async function setPassword (ctx, next) {
try {
const models = ctx.fs.dc.models;
const { userId } = ctx.params;
@ -254,11 +188,10 @@ async function updateUserPassword (ctx, next) {
module.exports = {
getDepMessage,
getUser,
creatUser,
updateUser,
deleteUser,
resetPwd,
updateUserPassword
// resetPwd,
setPassword
}

612
api/app/lib/controllers/placeSecurityRecord/index.js

@ -1,612 +0,0 @@
'use strict';
const moment = require('moment');
/**
* 提交填报信息/保存填报草稿
* @requires.body {
* isDraft-是否草稿
* userId-用户id填报人
* placeName-场所id
* placeType-场所性质
* regionId-所属县/
* address-场所地址
* placeOwner-场所负责人
* phone-负责人手机号
* dimension-面积
* floors-多少层
* numberOfPeople-常住人数
* location-经纬度
* isEnable-是否为合用场所
* localtionDescribe-经纬度定位描述
* hiddenDangerItem12-12项隐患信息,格式[{
* itemIndex-隐患项序号,
* value-是否存在隐患,
* description-隐患具体信息描述,
* photos-隐患图片(多张图片以 , 隔开)"
* }],
* description-存在具体问题描述
* correctiveAction-采取整改措施
* punishment-实施处罚强制措施情况
* } ctx
*/
async function addPlaceSecurityRecord (ctx, next) {
const transaction = await ctx.fs.dc.orm.transaction();
try {
const models = ctx.fs.dc.models;
const body = ctx.request.body;
let ifRightRegion = true;
if (body.regionId) {
//判断填报信息所属乡镇/区县是否存在
let region = await models.Department.findOne({ where: { id: body.regionId } });
if (!region) {
ifRightRegion = false;
}
}
if (ifRightRegion) {
let placeId = null;
if (body.placeName) {
//判断“场所名称”是否存在,不存在则“新建场所”
let place = await models.Places.findOne({ where: { name: body.placeName, userId: ctx.fs.api.userId } });
if (place) {
placeId = place.id
} else {
const newPlace = await models.Places.create({
name: body.placeName,
userId: ctx.fs.api.userId
}, { transaction: transaction });
placeId = newPlace.id;
}
}
//创建填报信息/填报草稿
const userPlaceSecurityRecord = await models.UserPlaceSecurityRecord.create({
isDraft: body.isDraft,//是否草稿
userId: ctx.fs.api.userId,//用户id,填报人
time: moment(),//录入时间
placeId: placeId,//场所id
placeType: body.placeType,//场所性质
regionId: body.regionId,//所属县/区
address: body.address,//场所地址
placeOwner: body.placeOwner,//场所负责人
phone: body.phone,//负责人手机号
dimension: body.dimension,//面积
floors: body.floors,//多少层
numberOfPeople: body.numberOfPeople,//常住人数
location: body.location,//经纬度
isEnable: body.isEnable,//是否为合用场所
localtionDescribe: body.localtionDescribe,//经纬度定位描述
hiddenDangerItem12: body.hiddenDangerItem12,//12项隐患信息
description: body.description,//存在具体问题描述
correctiveAction: body.correctiveAction,//采取措施
type: true,//是否重新发起true默认false可以重新发起
punishment: body.punishment,//实施处罚,强制措施情况
departmentId: body.departmentId
}, { transaction: transaction });
ctx.body = {
id: userPlaceSecurityRecord.id,
"message": "新增填报信息成功"
};
ctx.status = 200;
} else {
ctx.status = 400;
ctx.body = {
"message": "所选地址不存在!"
}
}
await transaction.commit();
} catch (error) {
await transaction.rollback();
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
"message": "新增填报信息失败"
}
}
}
/**
* 编辑填报信息
* @param {id-填报信息ID} ctx
* @requires.body {
* isDraft-是否草稿
* userId-用户id填报人
* placeName-场所id
* placeType-场所性质
* regionId-所属县/
* address-场所地址
* placeOwner-场所负责人
* phone-负责人手机号
* dimension-面积
* floors-多少层
* numberOfPeople-常住人数
* location-经纬度
* isEnable-是否为合用场所
* localtionDescribe-经纬度定位描述
* hiddenDangerItem12-12项隐患信息,格式[{
* itemIndex-隐患项序号,
* value-是否存在隐患,
* description-隐患具体信息描述,
* photos-隐患图片(多张图片以 , 隔开)"
* }],
* description-存在具体问题描述
* correctiveAction-采取整改措施
* punishment-实施处罚强制措施情况
* } ctx
*/
async function editPlaceSecurityRecord (ctx, next) {
const transaction = await ctx.fs.dc.orm.transaction();
try {
const models = ctx.fs.dc.models;
const { id } = ctx.params;
//判断该填报信息是否存在
let userPlaceSecurityRecord = await models.UserPlaceSecurityRecord.findOne({ where: { id: id } });
if (userPlaceSecurityRecord) {
const body = ctx.request.body;
let ifRightRegion = true;
if (body.regionId) {
//判断填报信息所属乡镇/区县是否存在
let region = await models.Department.findOne({ where: { id: body.regionId } });
if (!region) {
ifRightRegion = false;
}
}
if (ifRightRegion) {
let placeId = null;
if (body.placeName) {
//判断“场所名称”是否存在,不存在则“新建场所”
let place = await models.Places.findOne({ where: { name: body.placeName, userId: ctx.fs.api.userId } });
if (place) {
placeId = place.id
} else {
const newPlace = await models.Places.create({
name: body.placeName,
userId: ctx.fs.api.userId
}, { transaction: transaction });
placeId = newPlace.id;
}
}
//修改填报信息
await models.UserPlaceSecurityRecord.update({
isDraft: body.isDraft,//是否草稿
userId: ctx.fs.api.userId,//用户id,填报人
time: moment(),//录入时间
placeId: placeId,//场所id
placeType: body.placeType,//场所性质
regionId: body.regionId,//所属县/区
address: body.address,//场所地址
placeOwner: body.placeOwner,//场所负责人
phone: body.phone,//负责人手机号
dimension: body.dimension,//面积
floors: body.floors,//多少层
numberOfPeople: body.numberOfPeople,//常住人数
location: body.location,//经纬度
isEnable: body.isEnable,//是否为合用场所
localtionDescribe: body.localtionDescribe,//经纬度定位描述
hiddenDangerItem12: body.hiddenDangerItem12,//12项隐患信息
description: body.description,//存在具体问题描述
correctiveAction: body.correctiveAction,//采取措施
punishment: body.punishment,//实施处罚,强制措施情况
departmentId: body.departmentId
}, { where: { id: id, }, transaction: transaction });
ctx.body = { "message": "修改填报信息成功" };
ctx.status = 200;
} else {
ctx.status = 400;
ctx.body = { "message": "所选地址不存在!" }
}
} else {
ctx.status = 400;
ctx.body = { "message": "该填报信息不存在!" }
}
await transaction.commit();
} catch (error) {
await transaction.rollback();
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = { "message": "修改填报信息失败" }
}
}
/**
* 修改type字段
* @param {*} ctx
* @param {*} next
*/
async function updateType (ctx, next) {
const models = ctx.fs.dc.models;
const { id } = ctx.params;
try {
await models.UserPlaceSecurityRecord.update({
type: true,//是否重新发起true默认false可以重新发起
}, { where: { id: id, } })
ctx.body = { "message": "修改信息成功" };
ctx.status = 200;
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = { "message": "修改信息失败" }
}
}
/**
* 删除填报信息
* @param {id-填报信息ID} ctx
*/
async function deletePlaceSecurityRecord (ctx, next) {
const transaction = await ctx.fs.dc.orm.transaction();
try {
const models = ctx.fs.dc.models;
const { id } = ctx.params;
//判断该填报信息是否存在
let userPlaceSecurityRecord = await models.UserPlaceSecurityRecord.findOne({ where: { id: id } });
if (userPlaceSecurityRecord) {
await models.UserPlaceSecurityRecord.destroy({ where: { id: id }, transaction: transaction });
ctx.body = { "message": "删除填报信息成功" };
ctx.status = 200;
} else {
ctx.status = 400;
ctx.body = { "message": "该填报信息不存在!" }
}
await transaction.commit();
} catch (error) {
await transaction.rollback();
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = { "message": "删除填报信息失败" }
}
}
/**
* 根据填报信息ID查询填报信息
* @param {id-填报信息ID} ctx
*/
async function getPlaceSecurityRecordById (ctx, next) {
try {
const models = ctx.fs.dc.models;
const { id } = ctx.params;
//判断该填报信息是否存在
let userPlaceSecurityRecord = await models.UserPlaceSecurityRecord.findOne({ where: { id: id } });
if (userPlaceSecurityRecord) {
let userPlaceSecurityRecord = await models.UserPlaceSecurityRecord.findOne({
where: { id: id },
include: [{
model: models.Places,
}, {
model: models.User,
as: 'user',
attributes: ['id', 'name', 'username', 'phone']
}, {
model: models.User,
as: 'audit1ManUser',
attributes: ['id', 'name', 'username', 'phone']
}, {
model: models.User,
as: 'audit2ManUser',
attributes: ['id', 'name', 'username', 'phone']
}, {
model: models.User,
as: 'rejectManUser',
attributes: ['id', 'name', 'username', 'phone']
}]
});
ctx.body = userPlaceSecurityRecord;
ctx.status = 200;
} else {
ctx.status = 400;
ctx.body = { "message": "该填报信息不存在!" }
}
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = { "message": "查询填报信息失败" }
}
}
/**
* 根据场所ID获取该场所最近用户填报信息
* @param {placeId-场所信息ID} ctx
*/
async function getRecentlyPlaceSecurityRecordByPlaceId (ctx, next) {
try {
const models = ctx.fs.dc.models;
const { placeId } = ctx.params;
//判断该场所信息是否存在
let place = await models.Places.findOne({ where: { id: placeId } });
if (place) {
let userPlaceSecurityRecord = await models.UserPlaceSecurityRecord.findAll({
where: { placeId: placeId, userId: place.userId },
include: [{
model: models.Places,
}],
limit: 1,
order: [["id", "desc"]],
});
ctx.status = 200;
ctx.body = userPlaceSecurityRecord.length ? userPlaceSecurityRecord[0] : null;
} else {
ctx.status = 400;
ctx.body = { "message": "该场所不存在!" }
}
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = { "message": "获取场所最近用户填报信息失败" }
}
}
/**
* 根据筛选条件获取用户填报信息
* @query {
* isDraft-是否草稿
* userId-用户ID
* timeRange-录入时间范围
* regionId-区域ID
* placeId-场所ID
* state-审批状态
* pageIndex-页码
* pageSize-页宽
* } ctx
*/
async function getPlaceSecurityRecords (ctx, next) {
try {
const models = ctx.fs.dc.models;
const { isDraft, userId, timeRange, regionId, placeId, state, pageIndex, pageSize } = ctx.query;
let whereCondition = {};
if (userId) {
let user = await models.User.findOne({ where: { id: userId } });
if (user) {
whereCondition.userId = userId;
} else {
ctx.status = 400;
ctx.body = { "message": "用户不存在!" }
return;
}
}
if (regionId) {
let region = await models.Department.findOne({ where: { id: regionId } });
if (region) {
whereCondition.regionId = regionId;
} else {
ctx.status = 400;
ctx.body = { "message": "区域不存在!" }
return;
}
}
if (placeId) {
let place = await models.Places.findOne({ where: { id: placeId } });
if (place) {
whereCondition.placeId = placeId;
} else {
ctx.status = 400;
ctx.body = { "message": "场所不存在!" };
return;
}
}
if (isDraft) { whereCondition.isDraft = isDraft; }
let times = timeRange;
if (timeRange && timeRange.indexOf(',')) { times = timeRange.split(',') }
if (times && times.length > 0) {
const len = times.length;
whereCondition.time = {
$between: [
moment(times[0]).startOf('day').format('YYYY-MM-DD HH:mm:ss'),
moment(times[len - 1]).endOf('day').format('YYYY-MM-DD HH:mm:ss')
]
};
}
switch (Number(state)) {
case 1: //待审批:未审核 或者 已审核+未复核
whereCondition.$or = [
{ '$audit1ManId$': null },
{ '$audit2ManId$': null }
];
whereCondition.rejectManId = null;
break;
case 2://已审批:已审批+已复核
whereCondition.audit1ManId = { $not: null };
whereCondition.audit2ManId = { $not: null };
break;
case 3: //驳回
whereCondition.rejectManId = { $not: null };
break;
default: break;
}
let findObj = {
where: whereCondition,
order: [["id", "desc"]],
include: [{
model: models.Places,
}, {
model: models.User,
as: 'user',
attributes: ['id', 'name', 'username', 'phone']
}, {
model: models.User,
as: 'audit1ManUser',
attributes: ['id', 'name', 'username', 'phone']
}, {
model: models.User,
as: 'audit2ManUser',
attributes: ['id', 'name', 'username', 'phone']
}, {
model: models.User,
as: 'rejectManUser',
attributes: ['id', 'name', 'username', 'phone']
}]
};
if (Number(pageSize) > 0 && Number(pageIndex) >= 0) {
findObj.limit = Number(pageSize);
findObj.offset = Number(pageIndex) * Number(pageSize);
}
let userPlaceSecurityRecords = await models.UserPlaceSecurityRecord.findAndCountAll(findObj);
ctx.status = 200;
ctx.body = userPlaceSecurityRecords;
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = { "message": "获取用户填报信息失败" }
}
}
/**
* 根据筛选条件获取用户审批填报信息
* @query {
* approveUserId-审批人ID
* timeRange-录入时间范围
* regionId-区域ID
* placeId-场所ID
* state-审批状态
* pageIndex-页码
* pageSize-页宽
* } ctx
*/
async function getApprovePlaceSecurityRecords (ctx, next) {
try {
const models = ctx.fs.dc.models;
const { approveUserId, timeRange, regionId, placeId, state, pageIndex, pageSize } = ctx.query;
let whereCondition = { isDraft: false };
if (approveUserId) {
let approveUser = await models.User.findOne({ where: { id: approveUserId } });
if (approveUser) {
//获取审批人管辖区域内所有用户ID(注:市级人员查看所有用户数据)
const departmentRes = await models.Department.findOne({ where: { id: approveUser.departmentId } });
if (departmentRes.dependence) {
let attentionRegionIds = [departmentRes.id];
let regionType = departmentRes.type;
while (attentionRegionIds.length && regionType && regionType < 4) {
const departmentChilds = await models.Department.findAll({ where: { dependence: { $in: attentionRegionIds } } });
regionType = departmentChilds.length ? departmentChilds[0].type : null;
attentionRegionIds = departmentChilds.map(d => d.id);
}
let users = await models.User.findAll({ where: { departmentId: { $in: attentionRegionIds } }, attributes: ['id'] });
if (users.length) {
let userIds = users.map(u => u.id);
whereCondition.userId = { $in: userIds };
} else {
ctx.status = 200;
ctx.body = {
"count": 0,
"rows": []
}
return;
}
}
if (regionId) {
let region = await models.Department.findOne({ where: { id: regionId } });
if (region) {
whereCondition.regionId = regionId;
} else {
ctx.status = 400;
ctx.body = { "message": "区域不存在!" }
return;
}
}
if (placeId) {
let place = await models.Places.findOne({ where: { id: placeId } });
if (place) {
whereCondition.placeId = placeId;
} else {
ctx.status = 400;
ctx.body = { "message": "场所不存在!" };
return;
}
}
let times = timeRange;
if (timeRange && timeRange.indexOf(',')) { times = timeRange.split(',') }
if (times && times.length > 0) {
const len = times.length;
whereCondition.time = {
$between: [
moment(times[0]).startOf('day').format('YYYY-MM-DD HH:mm:ss'),
moment(times[len - 1]).endOf('day').format('YYYY-MM-DD HH:mm:ss')
]
};
}
switch (Number(state)) {
case 1: //待审批
if (departmentRes.type == 2) {
//区县待审:已审核+未复核
whereCondition.audit1ManId = { $not: null };
whereCondition.audit2ManId = null;
} else {
//乡镇待审:未审核+未复核
whereCondition.audit1ManId = null;
whereCondition.audit2ManId = null;
}
whereCondition.rejectManId = null;
break;
case 2://已审批:
if (departmentRes.type == 3) {
//乡镇已审:已审核
whereCondition.audit1ManId = { $not: null };
} else {
//区域已审:已审批+已复核
whereCondition.audit1ManId = { $not: null };
whereCondition.audit2ManId = { $not: null };
}
whereCondition.rejectManId = null;
break;
case 3: //驳回
whereCondition.rejectManId = { $not: null };
break;
default:
if (departmentRes.type == 2) {
//区县查看数据:去除未审核
whereCondition.audit1ManId = { $not: null };
}
break;
}
let findObj = {
where: whereCondition,
include: [{
model: models.Places,
}, {
model: models.User,
as: 'user',
attributes: ['id', 'name', 'username', 'phone']
}, {
model: models.User,
as: 'audit1ManUser',
attributes: ['id', 'name', 'username', 'phone']
}, {
model: models.User,
as: 'audit2ManUser',
attributes: ['id', 'name', 'username', 'phone']
}, {
model: models.User,
as: 'rejectManUser',
attributes: ['id', 'name', 'username', 'phone']
}],
order: [["id", "desc"]]
};
if (Number(pageSize) > 0 && Number(pageIndex) >= 0) {
findObj.limit = Number(pageSize);
findObj.offset = Number(pageIndex) * Number(pageSize);
}
let userPlaceSecurityRecords = await models.UserPlaceSecurityRecord.findAndCountAll(findObj);
ctx.status = 200;
ctx.body = userPlaceSecurityRecords;
} else {
ctx.status = 400;
ctx.body = { "message": "用户不存在!" }
}
} else {
ctx.status = 400;
ctx.body = { "message": "请传用户参数!" }
}
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = { "message": "获取用户填报信息失败" }
}
}
module.exports = {
addPlaceSecurityRecord,
editPlaceSecurityRecord,
deletePlaceSecurityRecord,
getPlaceSecurityRecordById,
getRecentlyPlaceSecurityRecordByPlaceId,
getPlaceSecurityRecords,
getApprovePlaceSecurityRecords,
updateType
};

91
api/app/lib/controllers/places/index.js

@ -1,91 +0,0 @@
'use strict';
/**
* 根据用户ID获取该用户创建的所有场所信息
* @param {userId-用户ID} ctx
*/
async function getPlacesByUserId(ctx, next) {
try {
const models = ctx.fs.dc.models;
const { userId } = ctx.params;
let places = await models.Places.findAll({ where: { userId: userId }, attributes: ['id', 'name'] });
ctx.status = 200;
ctx.body = places;
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = { "message": "查询用户场所信息失败" }
}
}
/**
* 根据审批用户ID获取该审批用户范围内填报人创建的场所信息
* @param {approveUserId-审批用户ID} ctx
*/
async function getPlacesByApproveUserId(ctx, next) {
try {
const models = ctx.fs.dc.models;
const { approveUserId } = ctx.params;
let approveUser = await models.User.findOne({ where: { id: approveUserId } });
if (approveUser) {
let whereCondition = {};
//获取审批人管辖区域内所有用户ID
const departmentRes = await models.Department.findOne({ where: { id: approveUser.departmentId } });
if (departmentRes.dependence) {
let regionType = departmentRes.type;
if (regionType == 4) {
whereCondition.userId = approveUserId;
} else {
let attentionRegionIds = [departmentRes.id];
while (attentionRegionIds.length && regionType && regionType < 4) {
const departmentChilds = await models.Department.findAll({ where: { dependence: { $in: attentionRegionIds } } });
regionType = departmentChilds.length ? departmentChilds[0].type : null;
attentionRegionIds = departmentChilds.map(d => d.id);
}
let users = await models.User.findAll({ where: { departmentId: { $in: attentionRegionIds } }, attributes: ['id'] });
if (users.length) {
let userIds = users.map(u => u.id);
whereCondition.userId = { $in: userIds };
} else {
ctx.status = 200;
ctx.body = [];
return;
}
}
}
let places = await models.Places.findAll({ where: whereCondition, attributes: ['id', 'name'] });
ctx.status = 200;
ctx.body = places;
} else {
ctx.status = 400;
ctx.body = { "message": "用户不存在!" }
}
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = { "message": "查询用户区域内场所信息失败" }
}
}
/**
* 获取所有场所信息
*/
async function getAllPlaces(ctx, next) {
try {
const models = ctx.fs.dc.models;
let places = await models.Places.findAll();
ctx.status = 200;
ctx.body = places;
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = { "message": "获取场所信息失败" }
}
}
module.exports = {
getPlacesByUserId,
getPlacesByApproveUserId,
getAllPlaces
};

140
api/app/lib/controllers/report/compile.js

@ -1,140 +0,0 @@
const moment = require('moment')
async function getReportRectify(ctx, next) {
try {
const models = ctx.fs.dc.models;
const { fs: { api: { userInfo } } } = ctx
const { startTime, endTime } = ctx.query
// 查找自己所属的区县数据 type == 2
let userDepRes = await models.Department.findOne({
order: [['id', 'asc']],
where: {
id: userInfo.departmentId
},
})
let depRes = []
if (userDepRes.dataValues.type == 1) {
depRes = await models.Department.findAll({
where: {
type: 2,
}
})
} else if (userDepRes.dataValues.type == 2) {
depRes = [userDepRes]
}
let rectifyReportList = []
let calDay = moment(startTime).startOf('day')
let endDay = moment(endTime).endOf('day')
let today = moment().endOf('day')
while (calDay.isBefore(endDay) && calDay.isBefore(today)) {
let curDay_ = calDay.clone();
for (let d of depRes) {
let reportCount = await models.ReportRectify.count({
where: {
regionId: d.dataValues.id,
userId:{$not:null},
dateTime: {
$between: [
curDay_.startOf('day').format('YYYY-MM-DD HH:mm:ss'),
curDay_.endOf('day').format('YYYY-MM-DD HH:mm:ss')
]
}
}
})
let detailCount = await models.ReportRectify.count({
where: {
regionId: d.dataValues.id,
dateTime: {
$between: [
curDay_.startOf('day').format('YYYY-MM-DD HH:mm:ss'),
curDay_.endOf('day').format('YYYY-MM-DD HH:mm:ss')
]
}
}
})
if (detailCount > 0)
rectifyReportList.push({
day: calDay.format('YYYY-MM-DD'),
region: d.dataValues.name,
name: d.dataValues.name + '合用场所安全隐患排查整治汇总表',
reportBool: reportCount > 0,
depId: d.id,
})
}
calDay.add(1, 'day')
}
ctx.body = rectifyReportList;
ctx.status = 200;
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
"message": "获取合用场所安全隐患排查整治汇总表列表失败"
}
}
}
async function getReportRectifyDetail(ctx, next) {
try {
const models = ctx.fs.dc.models;
const { day, depId } = ctx.query
let searchDay = moment(day)
let reportRes = await models.ReportRectify.findAll({
where: {
regionId: depId,
dateTime: {
$between: [
searchDay.startOf('day').format('YYYY-MM-DD HH:mm:ss'),
searchDay.endOf('day').format('YYYY-MM-DD HH:mm:ss')
]
}
}
})
ctx.body = reportRes;
ctx.status = 200;
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
"message": "获取合用场所安全隐患排查整治汇总表详情失败"
}
}
}
async function compileReportRectifyDetail(ctx, next) {
const t = await ctx.fs.dc.orm.transaction();
try {
const models = ctx.fs.dc.models;
const data = ctx.request.body
for (let d of data) {
await models.ReportRectify.update(d, {
transaction: t,
where: {
id: d.id
}
})
}
await t.commit();
ctx.status = 204;
} catch (error) {
await t.rollback();
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
"message": "保存合用场所安全隐患排查整治汇总表详情失败"
}
}
}
module.exports = {
getReportRectify,
getReportRectifyDetail,
compileReportRectifyDetail,
};

173
api/app/lib/controllers/report/config.js

@ -1,173 +0,0 @@
async function getAreas (ctx, next) {
try {
const { fs: { api: { userInfo } } } = ctx
const models = ctx.fs.dc.models;
let userDepRes = await models.Department.findOne({
order: [['id', 'asc']],
where: {
id: userInfo.departmentId
},
})
let rslt = []
if (userDepRes) {
if (userDepRes.dataValues.type == 1) {
rslt = await models.Department.findAll({
order: [['id', 'asc']],
where: {
type: 2
}
})
} else if (userDepRes.dataValues.type == 2) {
rslt = [userDepRes.dataValues]
}
}
ctx.body = rslt;
ctx.status = 200;
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
"message": "查询区域数据失败"
}
}
}
async function addReportConfig (ctx) {
let errMsg = "添加报表配置失败"
try {
const data = ctx.request.body
const models = ctx.fs.dc.models;
const repeatRes = await models.ReportConfigition.find({
where: {
regionId: data.regionId,
reportTypeId: data.reportTypeId,
excuteTime: data.excuteTime,
}
})
if (repeatRes) {
errMsg = '已有相同配置信息';
throw errMsg
}
const res = await models.ReportConfigition.create(data)
ctx.body = res;
ctx.status = 200;
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
"message": errMsg
}
}
}
async function getReportConfig (ctx) {
try {
const { fs: { api: { userInfo } } } = ctx
const models = ctx.fs.dc.models;
// 查找自己所属的区县数据 type == 2
let userDepRes = await models.Department.findOne({
order: [['id', 'asc']],
where: {
id: userInfo.departmentId
},
})
let depRes = []
if (userDepRes.dataValues.type == 1) {
depRes = await models.Department.findAll({
where: {
type: 2,
}
})
} else if (userDepRes.dataValues.type == 2) {
depRes = [userDepRes]
}
const res = await models.ReportConfigition.findAll({
where: {
regionId: { $in: depRes.map(d => d.dataValues.id) }
}
})
ctx.body = res;
ctx.status = 200;
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
"message": "获取报表配置失败"
}
}
}
async function editReportConfig (ctx) {
try {
const models = ctx.fs.dc.models;
const data = ctx.request.body
const { reportId } = ctx.params
const repeatRes = await models.ReportConfigition.find({
where: {
id: { $ne: parseInt(reportId) },
regionId: data.regionId,
reportTypeId: data.reportTypeId,
excuteTime: data.excuteTime,
}
})
if (repeatRes) {
errMsg = '已有相同配置信息';
throw errMsg
}
await models.ReportConfigition.update(data, {
where: {
id: parseInt(reportId)
}
})
ctx.status = 204;
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
"message": "编辑报表配置失败"
}
}
}
async function delReportConfig (ctx) {
try {
const models = ctx.fs.dc.models;
const { reportId } = ctx.params
await models.ReportConfigition.destroy({
where: {
id: parseInt(reportId)
}
})
ctx.status = 204;
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
"message": "删除报表配置失败"
}
}
}
module.exports = {
getAreas,
addReportConfig,
getReportConfig,
editReportConfig,
delReportConfig,
};

87
api/app/lib/controllers/report/index.js

@ -1,87 +0,0 @@
const moment = require('moment');
async function getReportList (ctx, next) {
try {
const { fs: { api: { userInfo } } } = ctx
const models = ctx.fs.dc.models;
const { creatTime, reportName, regionName, limit, offset } = ctx.query;
let where = {
$and: {
reportName: { $notLike: '%填报信息导出%' }
}
};
if (creatTime) {
where.creatTime = {
$gte: moment(creatTime[0]).format('YYYY-MM-DD HH:mm:ss'),
$lte: moment(creatTime[1]).format('YYYY-MM-DD HH:mm:ss')
}
}
if (reportName) {
where.reportName = {
$iLike: `%${reportName}%`
}
}
if (regionName && regionName != -1) {
where.regionId = regionName
} else {
let userDepRes = await models.Department.findOne({
order: [['id', 'asc']],
where: {
id: userInfo.departmentId
},
})
let userDep = []
if (userDepRes) {
if (userDepRes.dataValues.type == 1) {
userDep = await models.Department.findAll({
order: [['id', 'asc']],
where: {
type: 2
}
})
} else if (userDepRes.dataValues.type == 2) {
userDep = [userDepRes]
}
}
where.regionId = { $in: userDep.map(u => u.dataValues.id) }
}
let findObj = {
include: [{
model: models.ReportType,
attributes: ['name']
}, {
model: models.Department,
attributes: ['name']
}],
where: where,
order: [['creatTime', 'desc']],
};
if (Number(limit) > 0 && Number(offset) >= 0) {
findObj.limit = Number(limit);
findObj.offset = Number(offset);
}
const res = await models.ReportDownManage.findAndCountAll(findObj)
ctx.body = res;
ctx.status = 200;
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
"message": "查询报表数据失败"
}
}
}
module.exports = {
getReportList,
};

342
api/app/lib/controllers/statistic/index.js

@ -1,342 +0,0 @@
const moment = require('moment');
const { QueryTypes } = require('sequelize');
async function reportDailyStatistic (ctx, next) {
const rslt = {
added: 0, //今日新增
checked: 0, //今日已审填报
unChecked: 0, //未审填报
danger_place: 0, //隐患场所总数
history: 0, //历史填报
date: {}
};
try {
const models = ctx.fs.dc.models;
const curDay_ = moment();
const sequelize = ctx.fs.dc.orm;
rslt.added = await models.UserPlaceSecurityRecord.count({
where: {
time: {
$between: [
curDay_.startOf('day').format('YYYY-MM-DD HH:mm:ss'),
curDay_.endOf('day').format('YYYY-MM-DD HH:mm:ss')
]
}
}
})
rslt.unChecked = await models.UserPlaceSecurityRecord.count({
where: {
$or: [
{
audit2ManId: { $eq: null },
rejectManId: { $eq: null },
},
// {
// audit2ManId: { $ne: null },
// rejectManId: { $eq: null },
// },
{
audit1ManId: { $eq: null },
rejectManId: { $eq: null },
}
]
}
});
rslt.checked = await models.UserPlaceSecurityRecord.count({
where: {
$or: [
{
audit2ManId: { $ne: null },
audit2ManIdTime: {
$between: [
curDay_.startOf('day').format('YYYY-MM-DD HH:mm:ss'),
curDay_.endOf('day').format('YYYY-MM-DD HH:mm:ss')
]
}
},
{
rejectManId: { $ne: null },
rejectTime: {
$between: [
curDay_.startOf('day').format('YYYY-MM-DD HH:mm:ss'),
curDay_.endOf('day').format('YYYY-MM-DD HH:mm:ss')
]
}
}
]
}
});
const list = await sequelize.query(`SELECT count(*) AS "count" FROM "user_placeSecurityRecord" AS "userPlaceSecurityRecord"
WHERE ("userPlaceSecurityRecord"."correctiveAction" IS NOT NULL AND "userPlaceSecurityRecord"."punishment" IS NOT NULL) AND "audit2ManId" IS NOT NULL GROUP BY "placeId";`, { type: QueryTypes.SELECT })
rslt.danger_place = list.length;
rslt.history = await models.UserPlaceSecurityRecord.count();
// seven days data
const startDay = moment().startOf('day');
for (let d = 1; d <= 7; d++) {
const START_DAY = moment(startDay).add(-d, 'day');
const date = START_DAY.format('YYYY-MM-DD');
const num = await models.UserPlaceSecurityRecord.count({
where: {
time: {
$between: [
START_DAY.startOf('day').format('YYYY-MM-DD HH:mm:ss'),
START_DAY.endOf('day').format('YYYY-MM-DD HH:mm:ss')
]
}
}
})
rslt.date[date] = num;
}
ctx.status = 200;
ctx.body = rslt;
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
"message": "获取数据中台数据失败"
}
}
}
async function reportAreaStatistic (ctx, next) {
let rslt = [], relationRegion = {};
try {
const { startDate, endDate } = ctx.query;
const models = ctx.fs.dc.models;
const sequelize = ctx.fs.dc.orm;
const list = await sequelize.query(`select "regionId", count("regionId") from "user_placeSecurityRecord" WHERE "time" BETWEEN '${moment(startDate).startOf('day').format('YYYY-MM-DD HH:mm:ss')}' AND '${moment(endDate).endOf('day').format('YYYY-MM-DD HH:mm:ss')}' AND "hiddenDangerItem12" IS NOT NULL GROUP BY "regionId" `, { type: QueryTypes.SELECT })
// let regionIds = []
// list.map(item => {
// if (item.regionId && item.regionId != '') {
// regionIds.push(item.regionId);
// }
// });
// const depts = await sequelize.query(`SELECT "id", "name", "type", "dependence" FROM "department" AS "department" WHERE "department"."id" IN (${regionIds.toString()});`, { type: QueryTypes.SELECT });
const deptRelation = await sequelize.query(`SELECT "id", "name", "type", "dependence" FROM "department" AS "department";`, { type: QueryTypes.SELECT });
const quArea = deptRelation.filter(f => f.type == 2);
quArea.map(item => {
relationRegion[item.id] = {};
const xiang = deptRelation.filter(f => f.type == 3 && f.dependence == item.id).map(item => item.id);
const cun = deptRelation.filter(f => f.type == 4 && xiang.some(ss => ss == f.dependence)).map(item => item.id);
relationRegion[item.id]['regionIds'] = [item.id, ...xiang, ...cun];
relationRegion[item.id]['name'] = item.name;
})
Object.keys(relationRegion).map(key => {
const { regionIds, name } = relationRegion[key];
let data = list.filter(item => regionIds.some(id => id == item.regionId))
let obj = {};
obj['name'] = name;
obj['count'] = 0;
obj['regionId'] = key;
data.map(item => {
obj['count'] += Number(item.count)
})
rslt.push(obj)
})
ctx.status = 200;
ctx.body = rslt;
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
"message": "获取数据中台数据失败"
}
}
}
async function dangerAreaQuery (ctx, next) {
const { userId } = ctx.fs.api
let rslt = { rows: [], count: 0, ids: [] }, relationRegion = {};
try {
const { startDate, endDate, placeType, regionId, placeName, offset = 0, limit = 20 } = ctx.query;
const models = ctx.fs.dc.models;
const sequelize = ctx.fs.dc.orm;
let options = {
audit2ManId: { $ne: null },
}, places = [], dep4Ids = [];
if (startDate && endDate) {
options.time = {
$between: [
moment(startDate).startOf('day').format('YYYY-MM-DD HH:mm:ss'),
moment(endDate).endOf('day').format('YYYY-MM-DD HH:mm:ss')
]
}
}
if (placeName) {
places = await models.Places.findAll({
where: {
name: { $like: `%${placeName}%` }
}
})
options.placeId = {
$in: places.map(item => item.id)
}
} else {
places = await models.Places.findAll()
}
if (regionId && regionId != -1) {
let idList = [];
const curDeptRelation = await sequelize.query(`SELECT "id", "name", "type", "dependence" FROM "department" WHERE "id" in (${regionId});`, { type: QueryTypes.SELECT });
const type = curDeptRelation[0].type
if (type != 1) {
const deptRelation = await sequelize.query(`SELECT "id", "name", "type", "dependence" FROM "department" AS "department";`, { type: QueryTypes.SELECT });
const quArea = deptRelation.filter(f => f.type == 2);
quArea.map(item => {
relationRegion[item.id] = {};
deptRelation.filter(f => f.type == 3 && f.dependence == item.id).map(x => {
relationRegion[item.id][x.id] = deptRelation.filter(f => f.type == 4 && x.id == f.dependence).map(cun => cun.id);
});
})
if (type == 2) {
const quList = [regionId];
const xiangList = Object.keys(relationRegion[regionId])
let cunList = xiangList.map(key => {
return relationRegion[regionId][key]
})
idList = quList.concat(xiangList).concat(cunList.flat(Infinity))
options.regionId = { $in: idList };
}
if (type == 3) {
Object.keys(relationRegion).map(quKey => {
Object.keys(relationRegion[quKey]).map(xiangKey => {
if (xiangKey == regionId) {
const xiangList = [xiangKey];
const cunList = relationRegion[quKey][xiangKey]
idList = xiangList.concat(cunList);
}
})
})
dep4Ids = idList
}
if (type == 4) {
const curUser = await models.User.findOne({ where: { id: userId } })
const corUserDepId = curUser.departmentId
const corUseUserDepRes = await models.Department.findOne({ where: { id: corUserDepId } })
if(corUseUserDepRes.type < 4){
dep4Ids = [regionId]
} else {
options.userId = userId
}
// idList = [regionId]
// options.userId = userId
}
// options.departmentId = { $in: idList };
}
}
if (placeType != null && placeType != -1) {
if (placeType == 0) {
options = Object.assign({}, options, {
$or: [
{
correctiveAction: { $ne: null },
},
{
punishment: { $ne: null },
}
]
})
}
if (placeType == 1)
options = Object.assign({}, options, {
$or: [
{
correctiveAction: { $eq: null },
},
{
punishment: { $eq: null },
}
],
hiddenDangerItem12: {
$ne: null
}
})
if (placeType == 2)
options.hiddenDangerItem12 = {
$eq: null
}
}
let findOption = {
where: options,
offset: offset,
limit: limit,
order: [['time', 'DESC']],
}
if (dep4Ids.length) {
findOption.include = [{
required: true,
model: models.User,
as: 'user',
where: {
departmentId: { $in: dep4Ids }
}
}]
}
const list = await models.UserPlaceSecurityRecord.findAll(findOption)
for (let item of list) {
const { name } = places.filter(p => p.id == item.placeId)[0] || {};
const checkAreaName = await sequelize.query(`SELECT "dpt"."name" FROM "department" as "dpt" WHERE "dpt"."id" in (SELECT "department_id" FROM "user" WHERE "id" = ${item.userId} );`, { type: QueryTypes.SELECT })
const checkUser = await sequelize.query(`SELECT "name", "phone" FROM "user" WHERE "id" = ${item.userId}`, { type: QueryTypes.SELECT })
rslt.rows.push(Object.assign({}, item.dataValues, { placeName: name, checkAreaName: (checkAreaName[0] || {}).name || '', checkUserName: (checkUser[0] || {}).name || '', checkUserPhone: (checkUser[0] || {}).phone }))
}
delete findOption.offset
delete findOption.limit
delete findOption.order
findOption.attributes = ['id']
const dataAll = await models.UserPlaceSecurityRecord.findAll(
findOption
// {
// attributes: ['id'],
// where: options,
// }
);
rslt.count = dataAll.length;
rslt.ids = dataAll.map(item => item.dataValues.id);
ctx.status = 200;
ctx.body = rslt;
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
"message": "获取数据中台数据失败"
}
}
}
module.exports = {
reportDailyStatistic,
reportAreaStatistic,
dangerAreaQuery,
}

483
api/app/lib/controllers/wxReport/index.js

@ -1,483 +0,0 @@
'use strict';
const moment = require('moment');
//获取每日汇总
async function getDayReport(ctx) {
try {
const { date, areaId } = ctx.query;
const models = ctx.fs.dc.models;
let range = [moment(date).startOf('day').format("YYYY-MM-DD HH:mm:ss"), moment(date).endOf('day').format("YYYY-MM-DD HH:mm:ss")]
let rslt = await models.ReportCollection.findAll({
where: {
dateTime: {
$between: range
},
regionId: areaId
},
include: [{
required: true,
model: models.User,
attributes: ['name', 'username', 'phone']
}, {
required: false,
model: models.Department,
attributes: ['name']
}]
});
ctx.status = 200;
ctx.body = rslt;
} catch (error) {
console.log(error)
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
"message": "获取全市每日汇总表失败"
}
}
}
//获取排查整治汇总表
async function getGovern(ctx) {
try {
const { date, areaId } = ctx.query;
const models = ctx.fs.dc.models;
let range = [moment(date).startOf('day').format("YYYY-MM-DD HH:mm:ss"), moment(date).endOf('day').format("YYYY-MM-DD HH:mm:ss")]
let rslt = await models.ReportRectify.findAndCountAll({
where: {
dateTime: {
$between: range
},
regionId: areaId
},
include: [{
required: true,
model: models.User,
attributes: ['id', 'name', 'username', 'phone']
}, {
required: false,
model: models.Department,
attributes: ['id', 'name']
}],
limit: 1
});
ctx.status = 200;
let obj = { count: 0 }
if (rslt.count > 0) {
obj.area = rslt.rows[0].department;
obj.dateTime = rslt.rows[0].dateTime;
obj.count = rslt.count;
obj.user = rslt.rows[0].user;
obj.isAudit = rslt.rows[0].isAudit
}
ctx.body = obj;
} catch (error) {
console.log(error)
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
"message": "获取排查整治汇总表失败"
}
}
}
//获取排查整治汇总详情
async function getGovernDetail(ctx) {
try {
const { name, date, areaId, pageSize, pageIndex } = ctx.query;
const models = ctx.fs.dc.models;
let range = [moment(date).startOf('day').format("YYYY-MM-DD HH:mm:ss"), moment(date).endOf('day').format("YYYY-MM-DD HH:mm:ss")]
let whereObj = {
dateTime: {
$between: range
},
regionId: areaId
};
if (name) {
whereObj.name = { $like: `%${name}%` }
}
let findObj = {
where: whereObj,
include: [{
required: true,
model: models.User,
attributes: ['id', 'name', 'username', 'phone']
}, {
required: false,
model: models.Department,
attributes: ['id', 'name']
}],
order: [['dateTime', 'desc']]
};
if (Number(pageSize) > 0 && Number(pageIndex) >= 0) {
findObj.limit = Number(pageSize);
findObj.offset = Number(pageIndex) * Number(pageSize);
}
let rslt = await models.ReportRectify.findAndCountAll(findObj);
ctx.status = 200;
ctx.body = rslt;
} catch (error) {
console.log(error)
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
"message": "获取排查整治汇总详情失败"
}
}
}
/**
* 确认整治汇总场所数据
* body {
* governDetailIds:'1,2'
* }
*/
async function operateGovern(ctx, next) {
try {
const data = ctx.request.body;
const models = ctx.fs.dc.models;
if (data.governDetailIds && data.governDetailIds.length > 0) {
await models.ReportRectify.update({
isAudit: true
}, { where: { id: { $in: data.governDetailIds.split(',') } } });
ctx.body = { "message": "确认整治汇总下场所数据成功" };
ctx.status = 200;
} else {
ctx.body = { "message": "确认参数有误" };
ctx.status = 400;
}
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = { "message": "确认整治汇总下场所数据失败" }
}
}
//获取安全隐患排查详细数据列表
async function getSecurityRiskList(ctx) {
try {
const { name, date, areaId, pageSize, pageIndex } = ctx.query;
const models = ctx.fs.dc.models;
let whereObj = {};
let wheres = {
audit1ManId: { $not: null },
audit2ManId: { $not: null }
}
if (areaId) {
wheres.regionId = areaId;
}
if (name)
whereObj = { name: { $like: `%${name}%` } }
let findObj = {
attributes: ['id', 'time', 'placeId', 'userId'],
where:
// time: {
// $between: range
// },
// regionId: areaId,
// audit1ManId: { $not: null },
// audit2ManId: { $not: null }
wheres
,
include: [{
required: true,
model: models.Places,
attributes: ['id', 'name'],
where: whereObj
}, {
required: true,
model: models.User,
as: 'user',
attributes: ['id', 'name', 'username', 'phone']
}],
order: [['time', 'desc']]
};
if (date) {
let range = [moment(date).startOf('day').format("YYYY-MM-DD HH:mm:ss"), moment(date).endOf('day').format("YYYY-MM-DD HH:mm:ss")]
findObj.where.time = {
$between: range
}
}
if (areaId) {
findObj.where.regionId = areaId
}
if (Number(pageSize) > 0 && Number(pageIndex) >= 0) {
findObj.limit = Number(pageSize);
findObj.offset = Number(pageIndex) * Number(pageSize);
}
let rslt = await models.UserPlaceSecurityRecord.findAndCountAll(findObj);
ctx.status = 200;
ctx.body = rslt;
} catch (error) {
console.log(error)
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
"message": "获取安全隐患排查详细数据列表失败"
}
}
}
//获取待处理数量
async function getHomeCount(ctx) {
try {
let { userId, departmentId, userRegionType } = ctx.params;
const models = ctx.fs.dc.models;
const departmentRes = await models.Department.findOne({ where: { id: departmentId } });
if (userRegionType != 2 && userRegionType != 3 && !departmentRes) {
ctx.body = { "message": "请求参数有误" };
ctx.status = 400;
} else {
//获取当前用户数据范围管辖区域内所有用户ID
let attentionRegionIds = [departmentRes.id];
let regionType = departmentRes.type;
while (attentionRegionIds.length && regionType && regionType < 4) {
const departmentChilds = await models.Department.findAll({ where: { dependence: { $in: attentionRegionIds } } });
regionType = departmentChilds.length ? departmentChilds[0].type : null;
attentionRegionIds = departmentChilds.map(d => d.id);
}
let users = await models.User.findAll({ where: { departmentId: { $in: attentionRegionIds } }, attributes: ['id'] });
let userIds = users.map(u => u.id);
let rslt = { recordCount: 0, reportCount: null }
if (userIds.length) {
let whereObj = {
userId: { $in: userIds },
rejectManId: null,
isDraft: false
}
if (userRegionType == 3) {
whereObj.audit1ManId = null;
} else {
whereObj.audit1ManId = { $not: null };
whereObj.audit2ManId = null;
}
let recordCount = await models.UserPlaceSecurityRecord.count({
where: whereObj
});
rslt.recordCount = recordCount;
if (userRegionType == 2) {
let reportCount = await models.ReportCollection.count({
where: {
userId: null,
regionId: departmentId
}
});
let reportRectify = await models.ReportRectify.findAll({
where: {
userId: null,
regionId: departmentId
}
});
let dateArr = [];
reportRectify.map(r => {
let date = moment(r.dateTime).format("YYYY-MM-DD");
if (!dateArr.includes(date)) {
dateArr.push(date)
}
})
rslt.reportCount = reportCount + dateArr.length;
}
}
ctx.status = 200;
ctx.body = rslt;
}
} catch (error) {
console.log(error)
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
"message": "获取待处理数量失败"
}
}
}
//每日汇总表上报
async function operateReport(ctx, next) {
try {
let { id, userId } = ctx.params;
const models = ctx.fs.dc.models;
await models.ReportCollection.update({
userId: userId
}, { where: { id: id } });
ctx.body = { "message": "每日汇总表上报成功" };
ctx.status = 200;
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = { "message": "每日汇总表上报失败" }
}
}
/**
* 根据筛选条件获取用户审核报表信息
* @query {
* approveUserId-审批人ID
* reportType-报表类型(1-整治汇总表,2-每日汇总表,null-整治汇总表+每日汇总表)
* timeRange-时间范围
* regionId-区域ID
* state-审批状态
* pageIndex-页码
* pageSize-页宽
* } ctx
*/
async function getApproveReportCollections(ctx, next) {
try {
const models = ctx.fs.dc.models;
const { approveUserId, reportType, timeRange, regionId, state, pageIndex, pageSize } = ctx.query;
let whereCondition = {};
if (approveUserId) {
let approveUser = await models.User.findOne({ where: { id: approveUserId } });
if (approveUser) {
//市级用户可以看到所有报表数据
const departmentRes = await models.Department.findOne({ where: { id: approveUser.departmentId } });
if (departmentRes.dependence) {
if (departmentRes.type = 2) {
//区县人员只能看见自己区县下的报表信息
whereCondition.regionId = departmentRes.id;
} else {
//其它层级无报表信息
ctx.status = 200;
ctx.body = {
"count": 0,
"rows": []
};
return;
}
}
if (regionId) {
let region = await models.Department.findOne({ where: { id: regionId } });
if (region) {
if (whereCondition.regionId && whereCondition.regionId != regionId) {
//区县人员只能看见自己区县下的报表信息
ctx.status = 200;
ctx.body = {
"count": 0,
"rows": []
};
return;
} else {
whereCondition.regionId = regionId;
}
} else {
ctx.status = 400;
ctx.body = { "message": "区域不存在!" }
return;
}
}
let times = timeRange;
if (timeRange && timeRange.indexOf(',')) { times = timeRange.split(',') }
if (times && times.length > 0) {
const len = times.length;
whereCondition.dateTime = {
$between: [
moment(times[0]).startOf('day').format('YYYY-MM-DD HH:mm:ss'),
moment(times[len - 1]).endOf('day').format('YYYY-MM-DD HH:mm:ss')
]
};
}
switch (Number(state)) {
case 1: //待审批:无审核人员
whereCondition.userId = null;
break;
case 2://已审批:有审核人员
whereCondition.userId = { $not: null };
break;
default: break;
}
let findObj = {
where: whereCondition,
order: [["id", "desc"]],
include: [{
model: models.User,
attributes: ['name', 'username', 'phone']
}, {
model: models.Department,
attributes: ['id', 'name']
}]
};
if (Number(pageSize) > 0 && Number(pageIndex) >= 0) {
findObj.limit = Number(pageSize);
findObj.offset = Number(pageIndex) * Number(pageSize);
}
switch (Number(reportType)) {
case 1: //整治汇总表
ctx.body = await models.ReportRectify.findAndCountAll(findObj);
break;
case 2://每日汇总表
ctx.body = await models.ReportCollection.findAndCountAll(findObj);
break;
default: //整治汇总表+每日汇总表
const rectifies = await models.ReportRectify.findAndCountAll(findObj);
const collections = await models.ReportCollection.findAndCountAll(findObj);
ctx.body = {
"totalCount": rectifies.count + collections.count,
"totalRows": {
"rectify": rectifies,
"collection": collections
}
};
break;
}
ctx.status = 200;
} else {
ctx.status = 400;
ctx.body = { "message": "用户不存在!" }
}
} else {
ctx.status = 400;
ctx.body = { "message": "请传用户参数!" }
}
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = { "message": "获取审批报表信息失败" }
}
}
/**
* 上报排查整治汇总表
* query{
* userId:1,//上报用户
* }
* body {
* governDetailIds:'1,2' //排查整治汇总返回数据id字符串
* }
*/
async function operateGovernReport(ctx, next) {
try {
let { userId } = ctx.params;
const data = ctx.request.body;
const models = ctx.fs.dc.models;
if (data.governDetailIds && data.governDetailIds.length > 0) {
await models.ReportRectify.update({
userId: userId
}, { where: { id: { $in: data.governDetailIds.split(',') } } });
ctx.body = { "message": "上报排查整治汇总表成功" };
ctx.status = 200;
} else {
ctx.body = { "message": "上报排查整治汇总表参数有误" };
ctx.status = 400;
}
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = { "message": "上报排查整治汇总表失败" }
}
}
module.exports = {
getDayReport,
getGovern,
getGovernDetail,
operateGovern,
getSecurityRiskList,
getHomeCount,
operateReport,
getApproveReportCollections,
operateGovernReport
};

23
api/app/lib/index.js

@ -1,6 +1,8 @@
'use strict';
const routes = require('./routes');
const fs = require('fs');
const path = require('path');
const authenticator = require('./middlewares/authenticator');
// const apiLog = require('./middlewares/api-log');
const businessRest = require('./middlewares/business-rest');
@ -20,17 +22,12 @@ module.exports.entry = function (app, router, opts) {
};
module.exports.models = function (dc) { // dc = { orm: Sequelize对象, ORM: Sequelize, models: {} }
require('./models/user')(dc);
require('./models/user_token')(dc);
require('./models/department')(dc);
require('./models/resource')(dc);
require('./models/user_resource')(dc);
require('./models/places')(dc);
require('./models/user_placeSecurityRecord')(dc);
require('./models/report_type')(dc);
require('./models/report_downManage')(dc);
require('./models/department')(dc);
require('./models/report_configition')(dc);
require('./models/report_collection')(dc);
require('./models/report_rectify')(dc);
fs.readdirSync(path.join(__dirname, '/models')).forEach((filename) => {
require(`./models/${filename}`)(dc)
});
const { User, Department } = dc.models;
User.belongsTo(Department, { foreignKey: 'departmentId', targetKey: 'id' });
Department.hasMany(User, { foreignKey: 'departmentId', sourceKey: 'id' });
};

97
api/app/lib/models/department.js

@ -2,56 +2,53 @@
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const Department = sequelize.define("department", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "id",
autoIncrement: true,
unique: "department_id_uindex"
},
name: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "name",
autoIncrement: false
},
dependence: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: "上级部门/从属",
primaryKey: false,
field: "dependence",
autoIncrement: false
},
type: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: "市1,区县2,乡镇3,村4",
primaryKey: false,
field: "type",
autoIncrement: false
}
}, {
tableName: "department",
comment: "",
indexes: []
});
dc.models.Department = Department;
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const Department = sequelize.define("department", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "id",
autoIncrement: true,
unique: "department_id_uindex"
},
name: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "name",
autoIncrement: false
},
dependence: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: "上级部门/从属",
primaryKey: false,
field: "dependence",
autoIncrement: false
},
delete: {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "delete",
autoIncrement: false
},
}, {
tableName: "department",
comment: "",
indexes: []
});
dc.models.Department = Department;
const User = dc.models.User;
User.belongsTo(Department, { foreignKey: 'departmentId', targetKey: 'id' });
Department.hasMany(User, { foreignKey: 'departmentId', sourceKey: 'id' });
return Department;
return Department;
};

61
api/app/lib/models/places.js

@ -1,61 +0,0 @@
/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const Places = sequelize.define("places", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "id",
autoIncrement: true,
unique: "places_id_uindex"
},
name: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: "场所名称",
primaryKey: false,
field: "name",
autoIncrement: false
},
describe: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "描述",
primaryKey: false,
field: "describe",
autoIncrement: false
},
userId: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "userId",
autoIncrement: false,
references: {
key: "id",
model: "user"
}
},
}, {
tableName: "places",
comment: "",
indexes: []
});
dc.models.Places = Places;
const User = dc.models.User;
Places.belongsTo(User, { foreignKey: 'userId', targetKey: 'id' });
User.hasMany(Places, { foreignKey: 'userId', sourceKey: 'id' });
return Places;
};

47
api/app/lib/models/post.js

@ -1,47 +0,0 @@
/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const Post = sequelize.define("post", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "id",
autoIncrement: true,
unique: "post_id_uindex"
},
name: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "name",
autoIncrement: false
},
departmentId: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "department_id",
autoIncrement: false,
references: {
key: "id",
model: "department"
}
}
}, {
tableName: "post",
comment: "",
indexes: []
});
dc.models.Post = Post;
return Post;
};

51
api/app/lib/models/post_resource.js

@ -1,51 +0,0 @@
/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const PostResource = sequelize.define("postResource", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "id",
autoIncrement: true,
unique: "post_resource_id_uindex"
},
postId: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "post_id",
autoIncrement: false,
references: {
key: "id",
model: "post"
}
},
resource: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "resource",
autoIncrement: false,
references: {
key: "code",
model: "resource"
}
}
}, {
tableName: "post_resource",
comment: "",
indexes: []
});
dc.models.PostResource = PostResource;
return PostResource;
};

34
api/app/lib/models/region_type.js

@ -1,34 +0,0 @@
/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const RegionType = sequelize.define("regionType", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "id",
autoIncrement: true,
unique: "region_type_id_uindex"
},
type: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "type",
autoIncrement: false
}
}, {
tableName: "region_type",
comment: "",
indexes: []
});
dc.models.RegionType = RegionType;
return RegionType;
};

88
api/app/lib/models/report_collection.js

@ -1,88 +0,0 @@
/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const ReportCollection = sequelize.define("reportCollection", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "id",
autoIncrement: true,
unique: "report_collection_id_uindex"
},
regionId: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: "县区(id)",
primaryKey: false,
field: "regionId",
autoIncrement: false
},
dateTime: {
type: DataTypes.DATE,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "dateTime",
autoIncrement: false
},
placeCount: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: "场所总数",
primaryKey: false,
field: "placeCount",
autoIncrement: false
},
hiddenDangerCount: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: "排查隐患总数",
primaryKey: false,
field: "hiddenDangerCount",
autoIncrement: false
},
hiddenDangerItem12Count: {
type: DataTypes.JSON,
allowNull: true,
defaultValue: null,
comment: "排查隐患详细类目 1-12 项 总数",
primaryKey: false,
field: "hiddenDangerItem12Count",
autoIncrement: false
},
userId: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: "填报人(县区联络员)",
primaryKey: false,
field: "userId",
autoIncrement: false
}
}, {
tableName: "report_collection",
comment: "",
indexes: []
});
dc.models.ReportCollection = ReportCollection;
const User = dc.models.User;
ReportCollection.belongsTo(User, { foreignKey: 'userId', targetKey: 'id' });
User.hasMany(ReportCollection, { foreignKey: 'userId', sourceKey: 'id' });
const Department = dc.models.Department;
ReportCollection.belongsTo(Department, { foreignKey: 'regionId', targetKey: 'id' });
Department.hasMany(ReportCollection, { foreignKey: 'regionId', sourceKey: 'id' });
return ReportCollection;
};

74
api/app/lib/models/report_configition.js

@ -1,74 +0,0 @@
/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const ReportConfigition = sequelize.define("reportConfigition", {
reportName: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "报表名称",
primaryKey: false,
field: "reportName",
autoIncrement: false
},
regionId: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: "区域id",
primaryKey: false,
field: "regionId",
autoIncrement: false
},
reportTypeId: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: "报表类型",
primaryKey: false,
field: "reportTypeId",
autoIncrement: false,
references: {
key: "id",
model: "reportType"
}
},
excuteTime: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "生成时间 cron表达式",
primaryKey: false,
field: "excuteTime",
autoIncrement: false
},
isEnable: {
type: DataTypes.BOOLEAN,
allowNull: true,
defaultValue: null,
comment: "启用状态",
primaryKey: false,
field: "isEnable",
autoIncrement: false
},
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: "序号",
primaryKey: true,
field: "id",
autoIncrement: true,
unique: "report_configition_id_uindex"
}
}, {
tableName: "report_configition",
comment: "",
indexes: []
});
dc.models.ReportConfigition = ReportConfigition;
return ReportConfigition;
};

69
api/app/lib/models/report_countyCollect.js

@ -1,69 +0,0 @@
/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const ReportCountyCollect = sequelize.define("reportCountyCollect", {
id: {
type: DataTypes.BIGINT,
allowNull: true,
defaultValue: null,
comment: "序号",
primaryKey: false,
field: "id",
autoIncrement: false
},
name: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "名称",
primaryKey: false,
field: "name",
autoIncrement: false
},
address: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "地址",
primaryKey: false,
field: "address",
autoIncrement: false
},
hiddenDanger: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "排查发现隐患",
primaryKey: false,
field: "hiddenDanger",
autoIncrement: false
},
correctiveAction: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "采取措施",
primaryKey: false,
field: "correctiveAction",
autoIncrement: false
},
punishment: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "实施处罚,强制措施情况",
primaryKey: false,
field: "punishment",
autoIncrement: false
}
}, {
tableName: "report_countyCollect",
comment: "",
indexes: []
});
dc.models.ReportCountyCollect = ReportCountyCollect;
return ReportCountyCollect;
};

82
api/app/lib/models/report_downManage.js

@ -1,82 +0,0 @@
/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const ReportDownManage = sequelize.define("reportDownManage", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: "nextval(\"report_downManage_id_seq\"::regclass)",
comment: null,
primaryKey: true,
field: "id",
autoIncrement: false,
unique: "report_downmanage_id_uindex"
},
reportName: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: "报表名称",
primaryKey: false,
field: "reportName",
autoIncrement: false
},
regionId: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: "区域id",
primaryKey: false,
field: "regionId",
autoIncrement: false,
references: {
key: "id",
model: "department"
}
},
reportTypeId: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: "报表类型id\n1.整治表\n2.汇总表",
primaryKey: false,
field: "reportTypeId",
autoIncrement: false,
references: {
key: "id",
model: "reportType"
}
},
filePath: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: "文件路径",
primaryKey: false,
field: "filePath",
autoIncrement: false,
},
creatTime: {
type: DataTypes.DATE,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "creatTime",
autoIncrement: false
}
}, {
tableName: "report_downManage",
comment: "",
indexes: []
});
dc.models.ReportDownManage = ReportDownManage;
const { ReportType, Department } = dc.models;
ReportDownManage.belongsTo(ReportType, { foreignKey: 'reportTypeId', targetKey: 'id' });
ReportDownManage.belongsTo(Department, { foreignKey: 'regionId', targetKey: 'id' });
return ReportDownManage;
};

115
api/app/lib/models/report_rectify.js

@ -1,115 +0,0 @@
/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const ReportRectify = sequelize.define("reportRectify", {
id: {
type: DataTypes.BIGINT,
allowNull: true,
defaultValue: "nextval(\"report_countyCollect_id_seq\"::regclass)",
comment: "序号",
primaryKey: true,
field: "id",
autoIncrement: false,
unique: "report_countycollect_id_uindex"
},
regionId: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: "县区(id)",
primaryKey: false,
field: "regionId",
autoIncrement: false
},
dateTime: {
type: DataTypes.DATE,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "dateTime",
autoIncrement: false
},
name: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "名称",
primaryKey: false,
field: "name",
autoIncrement: false
},
address: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "地址",
primaryKey: false,
field: "address",
autoIncrement: false
},
hiddenDanger: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "排查发现隐患",
primaryKey: false,
field: "hiddenDanger",
autoIncrement: false
},
correctiveAction: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "采取措施",
primaryKey: false,
field: "correctiveAction",
autoIncrement: false
},
punishment: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "实施处罚,强制措施情况",
primaryKey: false,
field: "punishment",
autoIncrement: false
},
userId: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: "web端上报",
primaryKey: false,
field: "userId",
autoIncrement: false
},
isAudit: {
type: DataTypes.BOOLEAN,
allowNull: true,
defaultValue: null,
comment: "市级 确认审核",
primaryKey: false,
field: "isAudit",
autoIncrement: false
},
}, {
tableName: "report_rectify",
comment: "",
indexes: []
});
dc.models.ReportRectify = ReportRectify;
const User = dc.models.User;
ReportRectify.belongsTo(User, { foreignKey: 'userId', targetKey: 'id' });
User.hasMany(ReportRectify, { foreignKey: 'userId', sourceKey: 'id' });
const Department = dc.models.Department;
ReportRectify.belongsTo(Department, { foreignKey: 'regionId', targetKey: 'id' });
Department.hasMany(ReportRectify, { foreignKey: 'regionId', sourceKey: 'id' });
return ReportRectify;
};

33
api/app/lib/models/report_type.js

@ -1,33 +0,0 @@
/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const ReportType = sequelize.define("reportType", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "id",
autoIncrement: false
},
name: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "name",
autoIncrement: false
}
}, {
tableName: "report_type",
comment: "",
indexes: []
});
dc.models.ReportType = ReportType;
return ReportType;
};

44
api/app/lib/models/resource.js

@ -1,44 +0,0 @@
/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const Resource = sequelize.define("resource", {
code: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "code",
autoIncrement: false,
unique: "resource_code_uindex"
},
name: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "name",
autoIncrement: false,
unique: "resource_name_uindex"
},
parentResource: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "parent_resource",
autoIncrement: false
}
}, {
tableName: "resource",
comment: "",
indexes: []
});
dc.models.Resource = Resource;
return Resource;
};

201
api/app/lib/models/user.js

@ -2,107 +2,106 @@
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const User = sequelize.define("user", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "id",
autoIncrement: true,
unique: "user_id_uindex"
},
name: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "name",
autoIncrement: false
},
username: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: "用户名 账号",
primaryKey: false,
field: "username",
autoIncrement: false
},
password: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "password",
autoIncrement: false
},
departmentId: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: "部门id",
primaryKey: false,
field: "department_id",
autoIncrement: false
},
email: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "email",
autoIncrement: false
},
enable: {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: null,
comment: "启用状态",
primaryKey: false,
field: "enable",
autoIncrement: false
},
delete: {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "delete",
autoIncrement: false
},
phone: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: "手机号(小程序使用手机号登录)",
primaryKey: false,
field: "phone",
autoIncrement: false
},
post: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "职位",
primaryKey: false,
field: "post",
autoIncrement: false
}
}, {
tableName: "user",
comment: "",
indexes: []
});
dc.models.User = User;
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const User = sequelize.define("user", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "id",
autoIncrement: true,
unique: "user_id_uindex"
},
name: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "name",
autoIncrement: false
},
username: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: "用户名 账号",
primaryKey: false,
field: "username",
autoIncrement: false
},
password: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "password",
autoIncrement: false
},
departmentId: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: "部门id",
primaryKey: false,
field: "department_id",
autoIncrement: false
},
email: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "email",
autoIncrement: false
},
enable: {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: null,
comment: "启用状态",
primaryKey: false,
field: "enable",
autoIncrement: false
},
delete: {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "delete",
autoIncrement: false
},
phone: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: "手机号(小程序使用手机号登录)",
primaryKey: false,
field: "phone",
autoIncrement: false
},
remark: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
primaryKey: false,
field: "remark",
autoIncrement: false
},
}, {
tableName: "user",
comment: "",
indexes: []
});
dc.models.User = User;
return User;
return User;
};

311
api/app/lib/models/user_placeSecurityRecord.js

@ -1,311 +0,0 @@
/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const UserPlaceSecurityRecord = sequelize.define("userPlaceSecurityRecord", {
id: {
type: DataTypes.BIGINT,
allowNull: false,
defaultValue: null,
comment: "id",
primaryKey: true,
field: "id",
autoIncrement: true,
unique: "user_placesecurityrecord_id_uindex"
},
time: {
type: DataTypes.DATE,
allowNull: true,
defaultValue: null,
comment: "录入时间",
primaryKey: false,
field: "time",
autoIncrement: false
},
placeId: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: "场所id",
primaryKey: false,
field: "placeId",
autoIncrement: false,
references: {
key: "id",
model: "places"
}
},
hiddenDangerItem12: {
type: DataTypes.JSON,
allowNull: true,
defaultValue: null,
comment: "12项隐患信息",
primaryKey: false,
field: "hiddenDangerItem12",
autoIncrement: false
},
description: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "存在具体问题描述",
primaryKey: false,
field: "description",
autoIncrement: false
},
audit1ManId: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: "乡镇人审核",
primaryKey: false,
field: "audit1ManId",
autoIncrement: false,
references: {
key: "id",
model: "user"
}
},
audit2ManId: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: "区县人复核",
primaryKey: false,
field: "audit2ManId",
autoIncrement: false,
references: {
key: "id",
model: "user"
}
},
regionId: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: "所属县/区",
primaryKey: false,
field: "regionId",
autoIncrement: false,
references: {
key: "id",
model: "department"
}
},
userId: {
type: DataTypes.BIGINT,
allowNull: true,
defaultValue: null,
comment: "用户id,填报人",
primaryKey: false,
field: "userId",
autoIncrement: false
},
placeType: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "场所性质",
primaryKey: false,
field: "placeType",
autoIncrement: false
},
address: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "场所地址",
primaryKey: false,
field: "address",
autoIncrement: false
},
phone: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: "负责人手机号",
primaryKey: false,
field: "phone",
autoIncrement: false
},
dimension: {
type: DataTypes.REAL,
allowNull: true,
defaultValue: null,
comment: "面积",
primaryKey: false,
field: "dimension",
autoIncrement: false
},
floors: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: "多少层",
primaryKey: false,
field: "floors",
autoIncrement: false
},
numberOfPeople: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: "常住人数",
primaryKey: false,
field: "numberOfPeople",
autoIncrement: false
},
location: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "经纬度",
primaryKey: false,
field: "location",
autoIncrement: false
},
isEnable: {
type: DataTypes.BOOLEAN,
allowNull: true,
defaultValue: null,
comment: "是否为合用场所",
primaryKey: false,
field: "isEnable",
autoIncrement: false
},
rejectManId: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: "驳回人",
primaryKey: false,
field: "rejectManId",
autoIncrement: false,
references: {
key: "id",
model: "user"
}
},
rejectReasons: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "驳回意见",
primaryKey: false,
field: "rejectReasons",
autoIncrement: false
},
isDraft: {
type: DataTypes.BOOLEAN,
allowNull: true,
defaultValue: null,
comment: "是否草稿",
primaryKey: false,
field: "isDraft",
autoIncrement: false
},
placeOwner: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "场所负责人",
primaryKey: false,
field: "placeOwner",
autoIncrement: false
},
localtionDescribe: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "经纬度定位描述",
primaryKey: false,
field: "localtionDescribe",
autoIncrement: false
},
correctiveAction: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "采取措施",
primaryKey: false,
field: "correctiveAction",
autoIncrement: false
},
type: {
type: DataTypes.BOOLEAN,
allowNull: true,
defaultValue: null,
comment: "是否重新发起",
primaryKey: false,
field: "type",
autoIncrement: false
},
punishment: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "实施处罚,强制措施情况",
primaryKey: false,
field: "punishment",
autoIncrement: false
},
audit1ManIdTime: {
type: DataTypes.DATE,
allowNull: true,
defaultValue: null,
comment: "乡镇人审核时间",
primaryKey: false,
field: "audit1ManIdTime",
autoIncrement: false
},
audit2ManIdTime: {
type: DataTypes.DATE,
allowNull: true,
defaultValue: null,
comment: "区县人复核时间",
primaryKey: false,
field: "audit2ManIdTime",
autoIncrement: false
},
rejectTime: {
type: DataTypes.DATE,
allowNull: true,
defaultValue: null,
comment: "驳回日期",
primaryKey: false,
field: "rejectTime",
autoIncrement: false
},
departmentId: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
primaryKey: false,
field: "department_id",
autoIncrement: false,
},
}, {
tableName: "user_placeSecurityRecord",
comment: "",
indexes: []
});
dc.models.UserPlaceSecurityRecord = UserPlaceSecurityRecord;
const Places = dc.models.Places;
UserPlaceSecurityRecord.belongsTo(Places, { foreignKey: 'placeId', targetKey: 'id' });
Places.hasMany(UserPlaceSecurityRecord, { foreignKey: 'placeId', sourceKey: 'id' });
const User = dc.models.User;
UserPlaceSecurityRecord.belongsTo(User, { as: 'user', foreignKey: 'userId', targetKey: 'id' });
User.hasMany(UserPlaceSecurityRecord, { foreignKey: 'userId', sourceKey: 'id' });
UserPlaceSecurityRecord.belongsTo(User, { as: 'audit1ManUser', foreignKey: 'audit1ManId', targetKey: 'id' });
UserPlaceSecurityRecord.belongsTo(User, { as: 'audit2ManUser', foreignKey: 'audit2ManId', targetKey: 'id' });
UserPlaceSecurityRecord.belongsTo(User, { as: 'rejectManUser', foreignKey: 'rejectManId', targetKey: 'id' });
return UserPlaceSecurityRecord;
};

61
api/app/lib/models/user_resource.js

@ -1,61 +0,0 @@
/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const UserResource = sequelize.define("userResource", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "id",
autoIncrement: true,
unique: "post_resource_id_uindex"
},
userId: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "user_id",
autoIncrement: false,
references: {
key: "id",
model: "post"
}
},
resourceId: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "resource",
autoIncrement: false,
references: {
key: "code",
model: "resource"
}
}
}, {
tableName: "user_resource",
comment: "",
indexes: []
});
dc.models.UserResource = UserResource;
const User = dc.models.User;
UserResource.belongsTo(User, { foreignKey: 'userId', targetKey: 'id' });
User.hasMany(UserResource, { foreignKey: 'userId', sourceKey: 'id' });
const Resource = dc.models.Resource;
UserResource.belongsTo(Resource, { foreignKey: 'resourceId', targetKey: 'code' });
Resource.hasMany(UserResource, { foreignKey: 'resourceId', sourceKey: 'code' });
Resource.hasMany(Resource, { foreignKey: 'parentResource', sourceKey: 'code' });
return UserResource;
};

76
api/app/lib/models/user_token.js

@ -2,42 +2,42 @@
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const UserToken = sequelize.define("userToken", {
token: {
type: DataTypes.UUIDV4,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "token",
autoIncrement: false,
unique: "user_token_token_uindex"
},
userInfo: {
type: DataTypes.JSONB,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "user_info",
autoIncrement: false
},
expired: {
type: DataTypes.DATE,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "expired",
autoIncrement: false
}
}, {
tableName: "user_token",
comment: "",
indexes: []
});
dc.models.UserToken = UserToken;
return UserToken;
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const UserToken = sequelize.define("userToken", {
token: {
type: DataTypes.UUIDV4,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "token",
autoIncrement: false,
unique: "user_token_token_uindex"
},
userInfo: {
type: DataTypes.JSONB,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "user_info",
autoIncrement: false
},
expired: {
type: DataTypes.DATE,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "expired",
autoIncrement: false
}
}, {
tableName: "user_token",
comment: "",
indexes: []
});
dc.models.UserToken = UserToken;
return UserToken;
};

43
api/app/lib/models/vehicle.js

@ -0,0 +1,43 @@
/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const Vehicle = sequelize.define("vehicle", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "id",
autoIncrement: true,
unique: "vehicle_id_uindex"
},
name: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "name",
autoIncrement: false
},
count: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: "0",
comment: null,
primaryKey: false,
field: "count",
autoIncrement: false
}
}, {
tableName: "vehicle",
comment: "",
indexes: []
});
dc.models.Vehicle = Vehicle;
return Vehicle;
};

13
api/app/lib/routes/approval/index.js

@ -1,13 +0,0 @@
'use strict';
const Approval = require('../../controllers/approval/index');
module.exports = function (app, router, opts) {
/**
* @api {POST} approval/submit 提交审批驳回修改.
* @apiVersion 1.0.0
* @apiGroup Approval
*/
app.fs.api.logAttr['GET/approval/submit'] = { content: '提交审批、驳回修改', visible: true };
router.post('/approval/submit', Approval.submitApproval);
};

19
api/app/lib/routes/auth/index.js

@ -3,30 +3,13 @@
const auth = require('../../controllers/auth');
module.exports = function (app, router, opts) {
/**
* @api {Post} login 登录.
* @apiVersion 1.0.0
* @apiGroup Auth
*/
app.fs.api.logAttr['POST/login'] = { content: '登录', visible: true };
router.post('/login', auth.login);
/**
* @api {POST} wxLogin 微信小程序登录.使用手机号密码登录
* @apiVersion 1.0.0
* @apiGroup Auth
*/
app.fs.api.logAttr['POST/wxLogin'] = { content: '微信小程序登录', visible: true };
router.post('/wxLogin', auth.wxLogin);
app.fs.api.logAttr['PUT/logout'] = { content: '登出', visible: false };
router.put('/logout', auth.logout);
/**
* @api {PUT} wxLogout 微信小程序登出
* @apiVersion 1.0.0
* @apiGroup Auth
*/
app.fs.api.logAttr['PUT/wxLogout'] = { content: '登出', visible: false };
router.put('/wxLogout', auth.wxLogout);
};

9
api/app/lib/routes/common/index.js

@ -1,9 +0,0 @@
'use strict';
const common = require('../../controllers/common');
module.exports = function (app, router, opts) {
router.get('/data-dictionary/:model', common.getDataDictionary);
router.put('/data-dictionary/:model', common.putDataDictionary);
};

15
api/app/lib/routes/data/index.js

@ -0,0 +1,15 @@
'use strict';
const vehicle = require('../../controllers/data/vehicle');
module.exports = function (app, router, opts) {
app.fs.api.logAttr['GET/vehicle'] = { content: '获取运政列表', visible: true };
router.get('/vehicle', vehicle.get);
app.fs.api.logAttr['put/vehicle'] = { content: '编辑运政数据', visible: true };
router.put('/vehicle', vehicle.edit);
app.fs.api.logAttr['DEL/vehicle/:vehicleId'] = { content: '删除运政数据', visible: false };
router.del('/vehicle/:vehicleId', vehicle.del);
};

13
api/app/lib/routes/department/index.js

@ -1,13 +0,0 @@
'use strict';
const Department = require('../../controllers/department/index');
module.exports = function (app, router, opts) {
/**
* @api {GET} counties/list 获取南昌市下所有区县.
* @apiVersion 1.0.0
* @apiGroup Department
*/
app.fs.api.logAttr['GET/counties/list'] = { content: '获取南昌市下所有区县', visible: true };
router.get('/counties/list', Department.getCountiesList);
};

2
api/app/lib/routes/index.js

@ -6,7 +6,9 @@ const fs = require('fs');
module.exports = function (app, router, opts) {
fs.readdirSync(__dirname).forEach((filename) => {
if (filename.indexOf('.') !== 0 &&fs.lstatSync(path.join(__dirname, filename)).isDirectory()) {
console.log(filename);
fs.readdirSync(path.join(__dirname, filename)).forEach((api) => {
console.log(api);
if (api.indexOf('.') == 0 || api.indexOf('.js') == -1) return;
require(`./${filename}/${api}`)(app, router, opts);
});

28
api/app/lib/routes/organization/authority.js

@ -1,28 +0,0 @@
'use strict';
const Authority = require('../../controllers/organization/authority');
module.exports = function (app, router, opts) {
/**
* @api {GET} resource 查询所有权限码.
* @apiVersion 1.0.0
* @apiGroup Org
*/
app.fs.api.logAttr['GET/resource'] = { content: '查询所有权限码', visible: true };
router.get('resource', Authority.getResource);
/**
* @api {GET} user/resource 查询用户权限.
* @apiVersion 1.0.0
* @apiGroup Org
*/
app.fs.api.logAttr['GET/user/resource'] = { content: '查询用户权限', visible: true };
router.get('user/resource', Authority.getUserResource);
/**
* @api {POST} user/resource 更新用户权限.
* @apiVersion 1.0.0
* @apiGroup Org
*/
app.fs.api.logAttr['POST/user/resource'] = { content: '更新用户权限', visible: true };
router.post('user/resource', Authority.updateUserRes);
};

34
api/app/lib/routes/organization/index.js

@ -0,0 +1,34 @@
'use strict';
const Department = require('../../controllers/organization/department')
const user = require('../../controllers/organization/user');
module.exports = function (app, router, opts) {
app.fs.api.logAttr['GET/department'] = { content: '获取部门列表', visible: false };
router.get('/department', Department.getdep);
app.fs.api.logAttr['PUT/department'] = { content: '编辑部门信息', visible: false };
router.put('/department', Department.editDep);
app.fs.api.logAttr['DEL/department/:depId'] = { content: '删除部门信息', visible: false };
router.del('/department/:depId', Department.delDep);
app.fs.api.logAttr['GET/department/:depId/user'] = { content: '获取部门下用户信息', visible: false };
router.get('/department/:depId/user', user.getUser);
app.fs.api.logAttr['POST/department/user'] = { content: '创建部门下用户信息', visible: false };
router.post('/department/user', user.creatUser);
app.fs.api.logAttr['PUT/department/user/:userId'] = { content: '修改部门下用户信息', visible: false };
router.put('/department/user/:userId', user.updateUser);
app.fs.api.logAttr['DEL/department/user/:userIds'] = { content: '删除部门下用户信息', visible: false };
router.del('/department/user/:userIds', user.deleteUser);
// app.fs.api.logAttr['PUT/department/user/:userId/resetPwd'] = { content: '重置用户密码', visible: false };
// router.put('/department/user/:userId/resetPwd', user.resetPwd);
app.fs.api.logAttr['PUT/department/user/:userId/password'] = { content: '修改用户密码', visible: false };
router.put('/department/user/:userId/password', user.setPassword);
};

32
api/app/lib/routes/organization/user.js

@ -1,32 +0,0 @@
'use strict';
const user = require('../../controllers/organization/user');
module.exports = function (app, router, opts) {
app.fs.api.logAttr['GET/organization/department'] = { content: '获取部门信息', visible: false };
router.get('/organization/department', user.getDepMessage);
app.fs.api.logAttr['GET/organization/department/:depId/user'] = { content: '获取部门下用户信息', visible: false };
router.get('/organization/department/:depId/user', user.getUser);
app.fs.api.logAttr['POST/organization/department/user'] = { content: '创建部门下用户信息', visible: false };
router.post('/organization/department/user', user.creatUser);
app.fs.api.logAttr['PUT/organization/department/user/:id'] = { content: '修改部门下用户信息', visible: false };
router.put('/organization/department/user/:id', user.updateUser);
app.fs.api.logAttr['DEL/organization/department/user/:ids'] = { content: '删除部门下用户信息', visible: false };
router.del('/organization/department/user/:ids', user.deleteUser);
app.fs.api.logAttr['PUT/organization/department/user/resetPwd/:id'] = { content: '重置用户密码', visible: false };
router.put('/organization/department/user/resetPwd/:id', user.resetPwd);
/**
* @api {PUT} user/password/:id 修改用户密码
* @apiVersion 1.0.0
* @apiGroup Organization
*/
app.fs.api.logAttr['PUT/user/password/:userId'] = { content: '修改用户密码', visible: false };
router.put('/user/password/:userId', user.updateUserPassword);
};

70
api/app/lib/routes/placeSecurityRecord/index.js

@ -1,70 +0,0 @@
'use strict';
const placeSecurityRecord = require('../../controllers/placeSecurityRecord');
module.exports = function (app, router, opts) {
/**
* @api {POST} /add/placeSecurityRecord 提交填报信息/保存填报草稿.
* @apiVersion 1.0.0
* @apiGroup placeSecurityRecord
*/
app.fs.api.logAttr['POST/add/placeSecurityRecord'] = { content: '提交填报信息/保存填报草稿', visible: true };
router.post('/add/placeSecurityRecord', placeSecurityRecord.addPlaceSecurityRecord);
/**
* @api {PUT} /placeSecurityRecord/:id 编辑填报信息.
* @apiVersion 1.0.0
* @apiGroup placeSecurityRecord
*/
app.fs.api.logAttr['PUT/placeSecurityRecord/:id'] = { content: '编辑填报信息', visible: true };
router.put('/placeSecurityRecord/:id', placeSecurityRecord.editPlaceSecurityRecord);
/**
* @api {PUT} /placeSecurityRecord/:id 修改type字段
* @apiVersion 1.0.0
* @apiGroup placeSecurityRecord
*/
app.fs.api.logAttr['PUT/updateType/:id'] = { content: '修改type字段', visible: true };
router.put('/updateType/:id', placeSecurityRecord.updateType);
/**
* @api {DELETE} /placeSecurityRecord/:id 删除填报信息.
* @apiVersion 1.0.0
* @apiGroup placeSecurityRecord
*/
app.fs.api.logAttr['DELETE/placeSecurityRecord/:id'] = { content: '删除填报信息', visible: true };
router.del('/placeSecurityRecord/:id', placeSecurityRecord.deletePlaceSecurityRecord);
/**
* @api {GET} /placeSecurityRecord/:id 根据填报信息ID查询填报信息.
* @apiVersion 1.0.0
* @apiGroup placeSecurityRecord
*/
app.fs.api.logAttr['GET/placeSecurityRecord/:id'] = { content: '根据填报信息ID查询填报信息', visible: true };
router.get('/placeSecurityRecord/:id', placeSecurityRecord.getPlaceSecurityRecordById);
/**
* @api {GET} /recently/placeSecurityRecord/:placeId 根据场所ID获取该场所最近用户填报信息.
* @apiVersion 1.0.0
* @apiGroup placeSecurityRecord
*/
app.fs.api.logAttr['GET/recently/placeSecurityRecord/:placeId'] = { content: '根据场所ID获取该场所最近用户填报信息', visible: true };
router.get('/recently/placeSecurityRecord/:placeId', placeSecurityRecord.getRecentlyPlaceSecurityRecordByPlaceId);
/**
* @api {GET} /placeSecurityRecords 根据筛选条件获取用户填报信息.
* @apiVersion 1.0.0
* @apiGroup placeSecurityRecord
*/
app.fs.api.logAttr['GET/placeSecurityRecords'] = { content: '根据筛选条件获取用户填报信息', visible: true };
router.get('/placeSecurityRecords', placeSecurityRecord.getPlaceSecurityRecords);
/**
* @api {GET} /approve/placeSecurityRecords 根据筛选条件获取用户审批填报信息.
* @apiVersion 1.0.0
* @apiGroup placeSecurityRecord
*/
app.fs.api.logAttr['GET/approve/placeSecurityRecords'] = { content: '根据筛选条件获取用户审批填报信息', visible: true };
router.get('/approve/placeSecurityRecords', placeSecurityRecord.getApprovePlaceSecurityRecords);
};

30
api/app/lib/routes/places/index.js

@ -1,30 +0,0 @@
'use strict';
const places = require('../../controllers/places');
module.exports = function (app, router, opts) {
/**
* @api {GET} /user/places/:userId 根据用户ID获取该用户创建的所有场所信息.
* @apiVersion 1.0.0
* @apiGroup places
*/
app.fs.api.logAttr['GET/user/places/:userId'] = { content: '根据用户ID获取该用户创建的所有场所信息', visible: true };
router.get('/user/places/:userId', places.getPlacesByUserId);
/**
* @api {GET} /approveUser/places/:approveUserId 根据审批用户ID获取该审批用户范围内填报人创建的场所信息.
* @apiVersion 1.0.0
* @apiGroup places
*/
app.fs.api.logAttr['GET/approveUser/places/:approveUserId'] = { content: '根据审批用户ID获取该审批用户范围内填报人创建的场所信息', visible: true };
router.get('/approveUser/places/:approveUserId', places.getPlacesByApproveUserId);
/**
* @api {GET} /all/places 获取所有场所信息.
* @apiVersion 1.0.0
* @apiGroup places
*/
app.fs.api.logAttr['GET/all/places'] = { content: '获取所有场所信息', visible: true };
router.get('/all/places', places.getAllPlaces);
};

41
api/app/lib/routes/report/index.js

@ -1,41 +0,0 @@
'use strict';
const report = require('../../controllers/report');
const reportConfig = require('../../controllers/report/config')
const reportRectify = require('../../controllers/report/compile')
module.exports = function (app, router, opts) {
/**
* @api {GET} report 报表.
* @apiVersion 1.0.0
* @apiGroup report
*/
app.fs.api.logAttr['GET/report/list'] = { content: '报表下载列表', visible: true };
router.get('/report/list', report.getReportList);
// 报表配置
app.fs.api.logAttr['GET/allAreas'] = { content: '获取全部区域', visible: true };
router.get('/allAreas', reportConfig.getAreas);
app.fs.api.logAttr['POST/report/config'] = { content: '添加报表配置', visible: true };
router.post('/report/config', reportConfig.addReportConfig);
app.fs.api.logAttr['GET/report/config'] = { content: '获取报表配置', visible: true };
router.get('/report/config', reportConfig.getReportConfig);
app.fs.api.logAttr['PUT/report/:reportId/config'] = { content: '编辑报表配置', visible: true };
router.put('/report/:reportId/config', reportConfig.editReportConfig);
app.fs.api.logAttr['DEL/report/:reportId/config'] = { content: '删除报表配置', visible: true };
router.del('/report/:reportId/config', reportConfig.delReportConfig);
// 报表编辑
app.fs.api.logAttr['GET/report/rectify'] = { content: '获取合用场所安全隐患排查整治汇总表', visible: true };
router.get('/report/rectify', reportRectify.getReportRectify);
app.fs.api.logAttr['GET/report/rectify/detail'] = { content: '获取合用场所安全隐患排查整治汇总表详情', visible: true };
router.get('/report/rectify/detail', reportRectify.getReportRectifyDetail);
app.fs.api.logAttr['POST/report/rectify/detail'] = { content: '保存合用场所安全隐患排查整治汇总表编辑信息', visible: true };
router.post('/report/rectify/detail', reportRectify.compileReportRectifyDetail);
};

28
api/app/lib/routes/statistic/index.js

@ -1,28 +0,0 @@
'use strict';
const statistic = require('../../controllers/statistic')
module.exports = function (app, router, opts) {
/**
* @api {GET} getGovern 获取数据中台.
* @apiVersion 1.0.0
* @apiGroup wxReport
*/
app.fs.api.logAttr['GET/daily/report/data/statistic'] = { content: '获取数据中台', visible: true };
router.get('/daily/report/data/statistic', statistic.reportDailyStatistic);
/**
* @api {GET} getGovern 获取数据中台地区填报数量.
* @apiVersion 1.0.0
* @apiGroup wxReport
*/
app.fs.api.logAttr['GET/daily/report/area/statistic'] = { content: '获取数据中台地区填报数量', visible: true };
router.get('/daily/report/area/statistic', statistic.reportAreaStatistic);
/**
* @api {GET} getGovern 获取填报管理数据.
* @apiVersion 1.0.0
* @apiGroup wxReport
*/
app.fs.api.logAttr['GET/report/management/statistic'] = { content: '获取填报管理数据', visible: true };
router.get('/report/management/statistic', statistic.dangerAreaQuery);
}

78
api/app/lib/routes/wxReport/index.js

@ -1,78 +0,0 @@
'use strict';
const wxReport = require('../../controllers/wxReport/index');
module.exports = function (app, router, opts) {
/*******************首页-市级***************************/
/**
* @api {GET} getDayReport 获取每日汇总.
* @apiVersion 1.0.0
* @apiGroup wxReport
*/
app.fs.api.logAttr['GET/getDayReport'] = { content: '获取每日汇总', visible: true };
router.get('/getDayReport', wxReport.getDayReport);
/**
* @api {GET} getGovern 获取排查整治汇总.
* @apiVersion 1.0.0
* @apiGroup wxReport
*/
app.fs.api.logAttr['GET/getGovern'] = { content: '获取排查整治汇总', visible: true };
router.get('/getGovern', wxReport.getGovern);
/**
* @api {GET} getGovernDetail 获取排查整治汇总详情.
* @apiVersion 1.0.0
* @apiGroup wxReport
*/
app.fs.api.logAttr['GET/getGovernDetail'] = { content: '获取排查整治汇总详情', visible: true };
router.get('/getGovernDetail', wxReport.getGovernDetail);
/**
* @api {PUT} /operateGovern 确认整治汇总场所数据.
* @apiVersion 1.0.0
* @apiGroup wxReport
*/
app.fs.api.logAttr['PUT/operateGovern'] = { content: '确认整治汇总场所数据', visible: true };
router.put('/operateGovern', wxReport.operateGovern);
/**
* @api {GET} getSecurityRiskList 获取安全隐患排查详细数据列表.
* @apiVersion 1.0.0
* @apiGroup wxReport
*/
app.fs.api.logAttr['GET/getSecurityRiskList'] = { content: '获取安全隐患排查详细数据列表', visible: true };
router.get('/getSecurityRiskList', wxReport.getSecurityRiskList);
/**
* @api {GET} /getHomeCount/:userId/:departmentId/:userRegionType 获取待处理数量.
* @apiVersion 1.0.0
* @apiGroup wxReport
*/
app.fs.api.logAttr['GET/getHomeCount/:userId/:departmentId/:userRegionType'] = { content: '获取待处理数量', visible: true };
router.get('/getHomeCount/:userId/:departmentId/:userRegionType', wxReport.getHomeCount);
/**
* @api {PUT} /operateReport/:id/:userId 每日汇总表上报.
* @apiVersion 1.0.0
* @apiGroup wxReport
*/
app.fs.api.logAttr['PUT/operateReport/:id/:userId'] = { content: '每日汇总表上报', visible: true };
router.put('/operateReport/:id/:userId', wxReport.operateReport);
/**
* @api {GET} /approve/reportCollections 根据筛选条件获取用户审核报表信息.
* @apiVersion 1.0.0
* @apiGroup wxReport
*/
app.fs.api.logAttr['GET/approve/reportCollections'] = { content: '根据筛选条件获取用户审核报表信息', visible: true };
router.get('/approve/reportCollections', wxReport.getApproveReportCollections);
/**
* @api {PUT} /operateGovernReport/:userId 上报排查整治汇总表.
* @apiVersion 1.0.0
* @apiGroup wxReport
*/
app.fs.api.logAttr['PUT/operateGovernReport/:userId'] = { content: '上报排查整治汇总表', visible: true };
router.put('/operateGovernReport/:userId', wxReport.operateGovernReport);
}

816
api/log/development.log

@ -6709,3 +6709,819 @@
>>>>>>> .theirs2022-05-17 09:54:28.415 - debug: [FS-LOGGER] Init.
2022-05-17 09:54:28.497 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-05-17 09:54:28.498 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-19 11:50:16.266 - debug: [FS-LOGGER] Init.
2022-07-19 11:50:16.320 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-19 11:50:16.320 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-19 11:50:16.327 - error: [app]
{
message: "Cannot find module '../../controllers/organization/authority'\n" +
'Require stack:\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\config.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\server.js',
stack: "Error: Cannot find module '../../controllers/organization/authority'\n" +
'Require stack:\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\config.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\server.js\n' +
' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:667:27)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js:3:19)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:11:17\n' +
' at Array.forEach (<anonymous>)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:9:60\n' +
' at Array.forEach (<anonymous>)\n' +
' at module.exports (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:7:31)\n' +
' at Object.module.exports.entry (c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js:21:14)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' +
' at Array.forEach (<anonymous>)\n' +
' at scaffold (c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-web-server-scaffold\\index.js:71:16)\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\server.js:12:18)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)',
code: 'MODULE_NOT_FOUND',
requireStack: [
'c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js',
'c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js',
'c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js',
'c:\\_WorkCode\\四好公路\\api\\app\\index.js',
'c:\\_WorkCode\\四好公路\\api\\config.js',
'c:\\_WorkCode\\四好公路\\api\\server.js'
]
}
2022-07-19 13:36:40.363 - error: path: /login, error: TypeError: Cannot read property 'getTableName' of undefined
2022-07-19 13:37:38.837 - debug: [FS-LOGGER] Init.
2022-07-19 13:37:38.904 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-19 13:37:38.904 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-19 13:37:38.913 - error: [app]
{
message: "Cannot find module '../../controllers/organization/authority'\n" +
'Require stack:\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\config.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\server.js',
stack: "Error: Cannot find module '../../controllers/organization/authority'\n" +
'Require stack:\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\config.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\server.js\n' +
' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:667:27)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js:3:19)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:11:17\n' +
' at Array.forEach (<anonymous>)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:9:60\n' +
' at Array.forEach (<anonymous>)\n' +
' at module.exports (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:7:31)\n' +
' at Object.module.exports.entry (c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js:21:14)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' +
' at Array.forEach (<anonymous>)\n' +
' at scaffold (c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-web-server-scaffold\\index.js:71:16)\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\server.js:12:18)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)',
code: 'MODULE_NOT_FOUND',
requireStack: [
'c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js',
'c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js',
'c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js',
'c:\\_WorkCode\\四好公路\\api\\app\\index.js',
'c:\\_WorkCode\\四好公路\\api\\config.js',
'c:\\_WorkCode\\四好公路\\api\\server.js'
]
}
2022-07-19 13:37:44.414 - error: path: /login, error: TypeError: Cannot read property 'type' of null
2022-07-19 13:37:50.663 - error: path: /login, error: TypeError: Cannot read property 'type' of null
2022-07-19 13:38:27.574 - debug: [FS-LOGGER] Init.
2022-07-19 13:38:27.634 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-19 13:38:27.634 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-19 13:38:27.658 - error: [app]
{
message: "Cannot find module '../../controllers/organization/authority'\n" +
'Require stack:\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\config.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\server.js',
stack: "Error: Cannot find module '../../controllers/organization/authority'\n" +
'Require stack:\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\config.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\server.js\n' +
' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:667:27)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js:3:19)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:11:17\n' +
' at Array.forEach (<anonymous>)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:9:60\n' +
' at Array.forEach (<anonymous>)\n' +
' at module.exports (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:7:31)\n' +
' at Object.module.exports.entry (c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js:21:14)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' +
' at Array.forEach (<anonymous>)\n' +
' at scaffold (c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-web-server-scaffold\\index.js:71:16)\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\server.js:12:18)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)',
code: 'MODULE_NOT_FOUND',
requireStack: [
'c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js',
'c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js',
'c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js',
'c:\\_WorkCode\\四好公路\\api\\app\\index.js',
'c:\\_WorkCode\\四好公路\\api\\config.js',
'c:\\_WorkCode\\四好公路\\api\\server.js'
]
}
2022-07-19 13:42:12.018 - debug: [FS-LOGGER] Init.
2022-07-19 13:42:12.079 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-19 13:42:12.079 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-19 13:42:12.103 - error: [app]
{
message: "Cannot find module '../../controllers/organization/authority'\n" +
'Require stack:\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\config.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\server.js',
stack: "Error: Cannot find module '../../controllers/organization/authority'\n" +
'Require stack:\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\config.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\server.js\n' +
' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:667:27)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js:3:19)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:11:17\n' +
' at Array.forEach (<anonymous>)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:9:60\n' +
' at Array.forEach (<anonymous>)\n' +
' at module.exports (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:7:31)\n' +
' at Object.module.exports.entry (c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js:21:14)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' +
' at Array.forEach (<anonymous>)\n' +
' at scaffold (c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-web-server-scaffold\\index.js:71:16)\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\server.js:12:18)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)',
code: 'MODULE_NOT_FOUND',
requireStack: [
'c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js',
'c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js',
'c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js',
'c:\\_WorkCode\\四好公路\\api\\app\\index.js',
'c:\\_WorkCode\\四好公路\\api\\config.js',
'c:\\_WorkCode\\四好公路\\api\\server.js'
]
}
2022-07-19 13:44:53.996 - debug: [FS-LOGGER] Init.
2022-07-19 13:44:54.054 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-19 13:44:54.055 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-19 13:44:54.078 - error: [app]
{
message: "Cannot find module '../../controllers/organization/authority'\n" +
'Require stack:\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\config.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\server.js',
stack: "Error: Cannot find module '../../controllers/organization/authority'\n" +
'Require stack:\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\config.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\server.js\n' +
' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:667:27)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js:3:19)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:11:17\n' +
' at Array.forEach (<anonymous>)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:9:60\n' +
' at Array.forEach (<anonymous>)\n' +
' at module.exports (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:7:31)\n' +
' at Object.module.exports.entry (c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js:21:14)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' +
' at Array.forEach (<anonymous>)\n' +
' at scaffold (c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-web-server-scaffold\\index.js:71:16)\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\server.js:12:18)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)',
code: 'MODULE_NOT_FOUND',
requireStack: [
'c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js',
'c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js',
'c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js',
'c:\\_WorkCode\\四好公路\\api\\app\\index.js',
'c:\\_WorkCode\\四好公路\\api\\config.js',
'c:\\_WorkCode\\四好公路\\api\\server.js'
]
}
2022-07-19 13:56:09.853 - debug: [FS-LOGGER] Init.
2022-07-19 13:56:09.931 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-19 13:56:09.931 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-19 13:56:09.956 - error: [app]
{
message: 'getCountiesList is not defined',
stack: 'ReferenceError: getCountiesList is not defined\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\controllers\\department\\index.js:48:5)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\department\\index.js:3:20)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:11:17\n' +
' at Array.forEach (<anonymous>)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:9:60\n' +
' at Array.forEach (<anonymous>)\n' +
' at module.exports (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:7:31)\n' +
' at Object.module.exports.entry (c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js:21:14)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' +
' at Array.forEach (<anonymous>)'
}
2022-07-19 13:58:02.586 - debug: [FS-LOGGER] Init.
2022-07-19 13:58:02.648 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-19 13:58:02.648 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-19 13:58:02.671 - error: [app]
{
message: 'getCountiesList is not defined',
stack: 'ReferenceError: getCountiesList is not defined\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\controllers\\department\\index.js:48:5)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\department\\index.js:3:20)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:11:17\n' +
' at Array.forEach (<anonymous>)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:9:60\n' +
' at Array.forEach (<anonymous>)\n' +
' at module.exports (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:7:31)\n' +
' at Object.module.exports.entry (c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js:21:14)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' +
' at Array.forEach (<anonymous>)'
}
2022-07-19 13:58:16.925 - debug: [FS-LOGGER] Init.
2022-07-19 13:58:16.986 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-19 13:58:16.986 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-19 13:58:17.009 - error: [app]
{
message: "Cannot find module '../../controllers/organization/authority'\n" +
'Require stack:\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\config.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\server.js',
stack: "Error: Cannot find module '../../controllers/organization/authority'\n" +
'Require stack:\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\config.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\server.js\n' +
' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:667:27)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js:3:19)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:11:17\n' +
' at Array.forEach (<anonymous>)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:9:60\n' +
' at Array.forEach (<anonymous>)\n' +
' at module.exports (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:7:31)\n' +
' at Object.module.exports.entry (c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js:21:14)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' +
' at Array.forEach (<anonymous>)\n' +
' at scaffold (c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-web-server-scaffold\\index.js:71:16)\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\server.js:12:18)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)',
code: 'MODULE_NOT_FOUND',
requireStack: [
'c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js',
'c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js',
'c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js',
'c:\\_WorkCode\\四好公路\\api\\app\\index.js',
'c:\\_WorkCode\\四好公路\\api\\config.js',
'c:\\_WorkCode\\四好公路\\api\\server.js'
]
}
2022-07-19 13:58:33.391 - debug: [FS-LOGGER] Init.
2022-07-19 13:58:33.458 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-19 13:58:33.458 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-19 13:58:33.501 - error: [app]
{
message: "Cannot find module '../../controllers/organization/authority'\n" +
'Require stack:\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\config.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\server.js',
stack: "Error: Cannot find module '../../controllers/organization/authority'\n" +
'Require stack:\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\config.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\server.js\n' +
' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:667:27)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js:3:19)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:11:17\n' +
' at Array.forEach (<anonymous>)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:9:60\n' +
' at Array.forEach (<anonymous>)\n' +
' at module.exports (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:7:31)\n' +
' at Object.module.exports.entry (c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js:21:14)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' +
' at Array.forEach (<anonymous>)\n' +
' at scaffold (c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-web-server-scaffold\\index.js:71:16)\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\server.js:12:18)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)',
code: 'MODULE_NOT_FOUND',
requireStack: [
'c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js',
'c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js',
'c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js',
'c:\\_WorkCode\\四好公路\\api\\app\\index.js',
'c:\\_WorkCode\\四好公路\\api\\config.js',
'c:\\_WorkCode\\四好公路\\api\\server.js'
]
}
2022-07-19 13:59:24.291 - debug: [FS-LOGGER] Init.
2022-07-19 13:59:24.357 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-19 13:59:24.358 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-19 13:59:24.402 - error: [app]
{
message: "Cannot find module '../../controllers/organization/authority'\n" +
'Require stack:\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\config.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\server.js',
stack: "Error: Cannot find module '../../controllers/organization/authority'\n" +
'Require stack:\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\config.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\server.js\n' +
' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:667:27)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js:3:19)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:11:17\n' +
' at Array.forEach (<anonymous>)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:9:60\n' +
' at Array.forEach (<anonymous>)\n' +
' at module.exports (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:7:31)\n' +
' at Object.module.exports.entry (c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js:21:14)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' +
' at Array.forEach (<anonymous>)\n' +
' at scaffold (c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-web-server-scaffold\\index.js:71:16)\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\server.js:12:18)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)',
code: 'MODULE_NOT_FOUND',
requireStack: [
'c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js',
'c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js',
'c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js',
'c:\\_WorkCode\\四好公路\\api\\app\\index.js',
'c:\\_WorkCode\\四好公路\\api\\config.js',
'c:\\_WorkCode\\四好公路\\api\\server.js'
]
}
2022-07-19 13:59:51.538 - debug: [FS-LOGGER] Init.
2022-07-19 13:59:51.619 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-19 13:59:51.619 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-19 13:59:51.672 - error: [app]
{
message: "Cannot find module '../../controllers/organization/authority'\n" +
'Require stack:\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\config.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\server.js',
stack: "Error: Cannot find module '../../controllers/organization/authority'\n" +
'Require stack:\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\app\\index.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\config.js\n' +
'- c:\\_WorkCode\\四好公路\\api\\server.js\n' +
' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:667:27)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js:3:19)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:11:17\n' +
' at Array.forEach (<anonymous>)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:9:60\n' +
' at Array.forEach (<anonymous>)\n' +
' at module.exports (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:7:31)\n' +
' at Object.module.exports.entry (c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js:21:14)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' +
' at Array.forEach (<anonymous>)\n' +
' at scaffold (c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-web-server-scaffold\\index.js:71:16)\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\server.js:12:18)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)',
code: 'MODULE_NOT_FOUND',
requireStack: [
'c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\authority.js',
'c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js',
'c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js',
'c:\\_WorkCode\\四好公路\\api\\app\\index.js',
'c:\\_WorkCode\\四好公路\\api\\config.js',
'c:\\_WorkCode\\四好公路\\api\\server.js'
]
}
2022-07-19 14:15:05.528 - debug: [FS-LOGGER] Init.
2022-07-19 14:15:05.600 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-19 14:15:05.601 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-19 14:15:05.624 - error: [app]
{
message: 'getDepMessage is not defined',
stack: 'ReferenceError: getDepMessage is not defined\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\controllers\\organization\\user.js:198:5)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\department.js:4:14)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:11:17\n' +
' at Array.forEach (<anonymous>)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:9:60\n' +
' at Array.forEach (<anonymous>)\n' +
' at module.exports (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:7:31)\n' +
' at Object.module.exports.entry (c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js:21:14)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' +
' at Array.forEach (<anonymous>)'
}
2022-07-19 14:15:55.473 - debug: [FS-LOGGER] Init.
2022-07-19 14:15:55.534 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-19 14:15:55.534 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-19 14:15:55.558 - error: [app]
{
message: 'getDepMessage is not defined',
stack: 'ReferenceError: getDepMessage is not defined\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\controllers\\organization\\user.js:198:5)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\department.js:4:14)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:11:17\n' +
' at Array.forEach (<anonymous>)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:9:60\n' +
' at Array.forEach (<anonymous>)\n' +
' at module.exports (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:7:31)\n' +
' at Object.module.exports.entry (c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js:21:14)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' +
' at Array.forEach (<anonymous>)'
}
2022-07-19 14:16:55.151 - debug: [FS-LOGGER] Init.
2022-07-19 14:16:55.210 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-19 14:16:55.211 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-19 14:16:55.234 - error: [app]
{
message: 'getDepMessage is not defined',
stack: 'ReferenceError: getDepMessage is not defined\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\controllers\\organization\\user.js:198:5)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\department.js:4:14)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:11:17\n' +
' at Array.forEach (<anonymous>)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:9:60\n' +
' at Array.forEach (<anonymous>)\n' +
' at module.exports (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:7:31)\n' +
' at Object.module.exports.entry (c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js:21:14)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' +
' at Array.forEach (<anonymous>)'
}
2022-07-19 14:17:30.634 - debug: [FS-LOGGER] Init.
2022-07-19 14:17:30.691 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-19 14:17:30.691 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-19 14:17:30.714 - error: [app]
{
message: 'getDepMessage is not defined',
stack: 'ReferenceError: getDepMessage is not defined\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\controllers\\organization\\user.js:198:5)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\department.js:4:14)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:11:17\n' +
' at Array.forEach (<anonymous>)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:9:60\n' +
' at Array.forEach (<anonymous>)\n' +
' at module.exports (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:7:31)\n' +
' at Object.module.exports.entry (c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js:21:14)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' +
' at Array.forEach (<anonymous>)'
}
2022-07-19 14:19:48.860 - debug: [FS-LOGGER] Init.
2022-07-19 14:19:48.919 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-19 14:19:48.919 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-19 14:19:48.942 - error: [app]
{
message: 'getDepMessage is not defined',
stack: 'ReferenceError: getDepMessage is not defined\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\controllers\\organization\\user.js:198:5)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\department.js:4:14)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:11:17\n' +
' at Array.forEach (<anonymous>)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:9:60\n' +
' at Array.forEach (<anonymous>)\n' +
' at module.exports (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:7:31)\n' +
' at Object.module.exports.entry (c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js:21:14)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' +
' at Array.forEach (<anonymous>)'
}
2022-07-19 14:20:06.035 - debug: [FS-LOGGER] Init.
2022-07-19 14:20:06.096 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-19 14:20:06.096 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-19 14:20:06.121 - error: [app]
{
message: 'getDepMessage is not defined',
stack: 'ReferenceError: getDepMessage is not defined\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\controllers\\organization\\user.js:198:5)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\department.js:4:14)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:11:17\n' +
' at Array.forEach (<anonymous>)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:9:60\n' +
' at Array.forEach (<anonymous>)\n' +
' at module.exports (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:7:31)\n' +
' at Object.module.exports.entry (c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js:21:14)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' +
' at Array.forEach (<anonymous>)'
}
2022-07-19 14:20:49.675 - debug: [FS-LOGGER] Init.
2022-07-19 14:20:49.734 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-19 14:20:49.734 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-19 14:20:49.760 - error: [app]
{
message: 'getDepMessage is not defined',
stack: 'ReferenceError: getDepMessage is not defined\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\controllers\\organization\\user.js:198:5)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\index.js:4:14)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:11:17\n' +
' at Array.forEach (<anonymous>)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:9:60\n' +
' at Array.forEach (<anonymous>)\n' +
' at module.exports (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:7:31)\n' +
' at Object.module.exports.entry (c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js:21:14)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' +
' at Array.forEach (<anonymous>)'
}
2022-07-19 14:21:05.070 - debug: [FS-LOGGER] Init.
2022-07-19 14:21:05.131 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-19 14:21:05.131 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-19 14:21:05.156 - error: [app]
{
message: 'getDepMessage is not defined',
stack: 'ReferenceError: getDepMessage is not defined\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\controllers\\organization\\user.js:198:5)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\index.js:4:14)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:11:17\n' +
' at Array.forEach (<anonymous>)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:9:60\n' +
' at Array.forEach (<anonymous>)\n' +
' at module.exports (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:7:31)\n' +
' at Object.module.exports.entry (c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js:21:14)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' +
' at Array.forEach (<anonymous>)'
}
2022-07-19 14:21:40.524 - debug: [FS-LOGGER] Init.
2022-07-19 14:21:40.581 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-19 14:21:40.582 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-19 14:21:40.605 - error: [app]
{
message: 'getDepMessage is not defined',
stack: 'ReferenceError: getDepMessage is not defined\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\controllers\\organization\\user.js:198:5)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at Object.<anonymous> (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\organization\\index.js:4:14)\n' +
' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' +
' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' +
' at Module.load (internal/modules/cjs/loader.js:863:32)\n' +
' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' +
' at Module.require (internal/modules/cjs/loader.js:887:19)\n' +
' at require (internal/modules/cjs/helpers.js:74:18)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:13:17\n' +
' at Array.forEach (<anonymous>)\n' +
' at c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:10:60\n' +
' at Array.forEach (<anonymous>)\n' +
' at module.exports (c:\\_WorkCode\\四好公路\\api\\app\\lib\\routes\\index.js:7:31)\n' +
' at Object.module.exports.entry (c:\\_WorkCode\\四好公路\\api\\app\\lib\\index.js:21:14)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' +
' at Array.forEach (<anonymous>)'
}
2022-07-19 14:22:47.393 - debug: [FS-LOGGER] Init.
2022-07-19 14:22:47.451 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-19 14:22:47.451 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-19 15:41:23.305 - debug: [FS-LOGGER] Init.
2022-07-19 15:41:23.388 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-19 15:41:23.388 - info: [FS-AUTH] Inject auth and api mv into router.

15
api/node_modules/.bin/_mocha

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../mocha/bin/_mocha" "$@"
ret=$?
else
node "$basedir/../mocha/bin/_mocha" "$@"
ret=$?
fi
exit $ret

7
api/node_modules/.bin/_mocha.cmd

@ -0,0 +1,7 @@
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\mocha\bin\_mocha" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\mocha\bin\_mocha" %*
)

15
api/node_modules/.bin/acorn

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../acorn/bin/acorn" "$@"
ret=$?
else
node "$basedir/../acorn/bin/acorn" "$@"
ret=$?
fi
exit $ret

7
api/node_modules/.bin/acorn.cmd

@ -0,0 +1,7 @@
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\acorn\bin\acorn" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\acorn\bin\acorn" %*
)

15
api/node_modules/.bin/adler32

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../adler-32/bin/adler32.njs" "$@"
ret=$?
else
node "$basedir/../adler-32/bin/adler32.njs" "$@"
ret=$?
fi
exit $ret

7
api/node_modules/.bin/adler32.cmd

@ -0,0 +1,7 @@
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\adler-32\bin\adler32.njs" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\adler-32\bin\adler32.njs" %*
)

15
api/node_modules/.bin/codepage

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../codepage/bin/codepage.njs" "$@"
ret=$?
else
node "$basedir/../codepage/bin/codepage.njs" "$@"
ret=$?
fi
exit $ret

7
api/node_modules/.bin/codepage.cmd

@ -0,0 +1,7 @@
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\codepage\bin\codepage.njs" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\codepage\bin\codepage.njs" %*
)

15
api/node_modules/.bin/crc32

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../crc32/bin/runner.js" "$@"
ret=$?
else
node "$basedir/../crc32/bin/runner.js" "$@"
ret=$?
fi
exit $ret

7
api/node_modules/.bin/crc32.cmd

@ -0,0 +1,7 @@
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\crc32\bin\runner.js" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\crc32\bin\runner.js" %*
)

15
api/node_modules/.bin/detect-libc

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../detect-libc/bin/detect-libc.js" "$@"
ret=$?
else
node "$basedir/../detect-libc/bin/detect-libc.js" "$@"
ret=$?
fi
exit $ret

7
api/node_modules/.bin/detect-libc.cmd

@ -0,0 +1,7 @@
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\detect-libc\bin\detect-libc.js" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\detect-libc\bin\detect-libc.js" %*
)

15
api/node_modules/.bin/escodegen

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../escodegen/bin/escodegen.js" "$@"
ret=$?
else
node "$basedir/../escodegen/bin/escodegen.js" "$@"
ret=$?
fi
exit $ret

7
api/node_modules/.bin/escodegen.cmd

@ -0,0 +1,7 @@
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\escodegen\bin\escodegen.js" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\escodegen\bin\escodegen.js" %*
)

15
api/node_modules/.bin/esgenerate

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../escodegen/bin/esgenerate.js" "$@"
ret=$?
else
node "$basedir/../escodegen/bin/esgenerate.js" "$@"
ret=$?
fi
exit $ret

7
api/node_modules/.bin/esgenerate.cmd

@ -0,0 +1,7 @@
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\escodegen\bin\esgenerate.js" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\escodegen\bin\esgenerate.js" %*
)

15
api/node_modules/.bin/esparse

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../esprima/bin/esparse.js" "$@"
ret=$?
else
node "$basedir/../esprima/bin/esparse.js" "$@"
ret=$?
fi
exit $ret

7
api/node_modules/.bin/esparse.cmd

@ -0,0 +1,7 @@
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\esprima\bin\esparse.js" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\esprima\bin\esparse.js" %*
)

15
api/node_modules/.bin/esvalidate

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../esprima/bin/esvalidate.js" "$@"
ret=$?
else
node "$basedir/../esprima/bin/esvalidate.js" "$@"
ret=$?
fi
exit $ret

7
api/node_modules/.bin/esvalidate.cmd

@ -0,0 +1,7 @@
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\esprima\bin\esvalidate.js" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\esprima\bin\esvalidate.js" %*
)

15
api/node_modules/.bin/flat

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../flat/cli.js" "$@"
ret=$?
else
node "$basedir/../flat/cli.js" "$@"
ret=$?
fi
exit $ret

7
api/node_modules/.bin/flat.cmd

@ -0,0 +1,7 @@
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\flat\cli.js" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\flat\cli.js" %*
)

15
api/node_modules/.bin/handlebars

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../handlebars/bin/handlebars" "$@"
ret=$?
else
node "$basedir/../handlebars/bin/handlebars" "$@"
ret=$?
fi
exit $ret

7
api/node_modules/.bin/handlebars.cmd

@ -0,0 +1,7 @@
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\handlebars\bin\handlebars" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\handlebars\bin\handlebars" %*
)

15
api/node_modules/.bin/he

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../he/bin/he" "$@"
ret=$?
else
node "$basedir/../he/bin/he" "$@"
ret=$?
fi
exit $ret

7
api/node_modules/.bin/he.cmd

@ -0,0 +1,7 @@
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\he\bin\he" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\he\bin\he" %*
)

15
api/node_modules/.bin/js-yaml

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../@apidevtools/json-schema-ref-parser/node_modules/js-yaml/bin/js-yaml.js" "$@"
ret=$?
else
node "$basedir/../@apidevtools/json-schema-ref-parser/node_modules/js-yaml/bin/js-yaml.js" "$@"
ret=$?
fi
exit $ret

7
api/node_modules/.bin/js-yaml.cmd

@ -0,0 +1,7 @@
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\@apidevtools\json-schema-ref-parser\node_modules\js-yaml\bin\js-yaml.js" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\@apidevtools\json-schema-ref-parser\node_modules\js-yaml\bin\js-yaml.js" %*
)

15
api/node_modules/.bin/mime

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../mime/cli.js" "$@"
ret=$?
else
node "$basedir/../mime/cli.js" "$@"
ret=$?
fi
exit $ret

7
api/node_modules/.bin/mime.cmd

@ -0,0 +1,7 @@
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\mime\cli.js" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\mime\cli.js" %*
)

15
api/node_modules/.bin/mkdirp

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../mkdirp/bin/cmd.js" "$@"
ret=$?
else
node "$basedir/../mkdirp/bin/cmd.js" "$@"
ret=$?
fi
exit $ret

7
api/node_modules/.bin/mkdirp.cmd

@ -0,0 +1,7 @@
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\mkdirp\bin\cmd.js" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\mkdirp\bin\cmd.js" %*
)

15
api/node_modules/.bin/mocha

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../mocha/bin/mocha" "$@"
ret=$?
else
node "$basedir/../mocha/bin/mocha" "$@"
ret=$?
fi
exit $ret

7
api/node_modules/.bin/mocha.cmd

@ -0,0 +1,7 @@
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\mocha\bin\mocha" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\mocha\bin\mocha" %*
)

15
api/node_modules/.bin/os-name

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../os-name/cli.js" "$@"
ret=$?
else
node "$basedir/../os-name/cli.js" "$@"
ret=$?
fi
exit $ret

7
api/node_modules/.bin/os-name.cmd

@ -0,0 +1,7 @@
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\os-name\cli.js" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\os-name\cli.js" %*
)

15
api/node_modules/.bin/osx-release

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../osx-release/cli.js" "$@"
ret=$?
else
node "$basedir/../osx-release/cli.js" "$@"
ret=$?
fi
exit $ret

7
api/node_modules/.bin/osx-release.cmd

@ -0,0 +1,7 @@
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\osx-release\cli.js" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\osx-release\cli.js" %*
)

15
api/node_modules/.bin/prebuild-install

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../prebuild-install/bin.js" "$@"
ret=$?
else
node "$basedir/../prebuild-install/bin.js" "$@"
ret=$?
fi
exit $ret

7
api/node_modules/.bin/prebuild-install.cmd

@ -0,0 +1,7 @@
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\prebuild-install\bin.js" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\prebuild-install\bin.js" %*
)

15
api/node_modules/.bin/printj

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../printj/bin/printj.njs" "$@"
ret=$?
else
node "$basedir/../printj/bin/printj.njs" "$@"
ret=$?
fi
exit $ret

7
api/node_modules/.bin/printj.cmd

@ -0,0 +1,7 @@
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\printj\bin\printj.njs" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\printj\bin\printj.njs" %*
)

15
api/node_modules/.bin/rc

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../rc/cli.js" "$@"
ret=$?
else
node "$basedir/../rc/cli.js" "$@"
ret=$?
fi
exit $ret

7
api/node_modules/.bin/rc.cmd

@ -0,0 +1,7 @@
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\rc\cli.js" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\rc\cli.js" %*
)

15
api/node_modules/.bin/resolve

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../resolve/bin/resolve" "$@"
ret=$?
else
node "$basedir/../resolve/bin/resolve" "$@"
ret=$?
fi
exit $ret

7
api/node_modules/.bin/resolve.cmd

@ -0,0 +1,7 @@
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\resolve\bin\resolve" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\resolve\bin\resolve" %*
)

15
api/node_modules/.bin/rimraf

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../rimraf/bin.js" "$@"
ret=$?
else
node "$basedir/../rimraf/bin.js" "$@"
ret=$?
fi
exit $ret

7
api/node_modules/.bin/rimraf.cmd

@ -0,0 +1,7 @@
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\rimraf\bin.js" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\rimraf\bin.js" %*
)

15
api/node_modules/.bin/semver

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../@fs/attachment/node_modules/semver/bin/semver.js" "$@"
ret=$?
else
node "$basedir/../@fs/attachment/node_modules/semver/bin/semver.js" "$@"
ret=$?
fi
exit $ret

7
api/node_modules/.bin/semver.cmd

@ -0,0 +1,7 @@
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\@fs\attachment\node_modules\semver\bin\semver.js" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\@fs\attachment\node_modules\semver\bin\semver.js" %*
)

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save