diff --git a/api/app/lib/controllers/data/vehicle.js b/api/app/lib/controllers/data/vehicle.js index 59aa5408..8dd38fe0 100644 --- a/api/app/lib/controllers/data/vehicle.js +++ b/api/app/lib/controllers/data/vehicle.js @@ -7,8 +7,8 @@ async function get(ctx) { const { type } = ctx.request.body; const { name } = ctx.query; const sequelize = ctx.fs.dc.orm - const sqlStr = `select sum(p.road_marking) 标线,sum(p.roadside_ditch) 边沟, - sum(p.guardrail) 护栏, sum(p.roadside_trees) 行道树,sum(p.wrong_lane) 错车道 + const sqlStr = `select sum(p.road_marking) "标线(米)",sum(p.roadside_ditch) "边沟(米)", + sum(p.guardrail) "护栏(米)", sum(p.roadside_trees) "行道树(棵)",sum(p.wrong_lane) "错车道(个)" from ( select t.*,row_number() over (partition by t.luduan order by t.time desc ) rn from ( select code_road||'-'||road_section_start||'-'||road_section_end luduan, diff --git a/jenkinsfilenew_node b/jenkinsfilenew_node new file mode 100644 index 00000000..317b5a5a --- /dev/null +++ b/jenkinsfilenew_node @@ -0,0 +1,21 @@ +podTemplate { + node('pod-templ-jenkins-slave-common') { + + env.IMAGE_NAME = "${IOT_IMAGES_REGISTRY}/${SMARTCITY}/${JOB_NAME}" + env.IMAGE_NAME_SHORT = "${SMARTCITY}/${JOB_NAME}" + env.CODE_ADDR = "${GIT_ADDRESS}/free-sun/Highways4Good.git" + + stage('Run shell') { + git branch: 'dev', credentialsId: 'gitea-builder', url: "${CODE_ADDR}" + + container('image-builder') { + sh''' + /kaniko/executor --context=${BUILD_WORKSPACE} --dockerfile=./scripts/1.3.1/data/1_insert_report_data/Dockerfilenew --destination=${IMAGE_NAME}:${IMAGE_VERSION} --cache=false --cleanup + ''' + } + + buildName "${IMAGE_NAME_SHORT}:${IMAGE_VERSION}" + buildDescription "${IMAGE_NAME}:${IMAGE_VERSION}" + } + } +} \ No newline at end of file diff --git a/scripts/1.3.1/data/1_insert_report_data/Dockerfilenew b/scripts/1.3.1/data/1_insert_report_data/Dockerfilenew new file mode 100644 index 00000000..dba16607 --- /dev/null +++ b/scripts/1.3.1/data/1_insert_report_data/Dockerfilenew @@ -0,0 +1,7 @@ +FROM repository.anxinyun.cn/base-images/nodejs12:20.10.12.2 +COPY ./scripts/1.3.1/data/1_insert_report_data /var/app +WORKDIR /var/app +RUN npm cache clean -f +RUN rm -rf package-lock.json +RUN npm install --registry https://nexus.ngaiot.com/repository/fs-npm/ +CMD ["node", "index.js"] \ No newline at end of file diff --git a/scripts/1.3.1/data/1_insert_report_data/index.js b/scripts/1.3.1/data/1_insert_report_data/index.js index 6f5303d4..af8c191a 100644 --- a/scripts/1.3.1/data/1_insert_report_data/index.js +++ b/scripts/1.3.1/data/1_insert_report_data/index.js @@ -6,13 +6,13 @@ try { // 测试环境 const pool = new Pool({ - user: 'postgres', - host: '10.8.30.32', - database: 'highways4good', - password: '123', + user: 'FashionAdmin', + host: '10.8.40.223', + database: 'sihaotest', + password: 'Fas123_', port: 5432, }) - const userId = 5 + const userId = 21 // 商用环境 // const pool = new Pool({ diff --git a/weapp/src/packages/patrol/index.jsx b/weapp/src/packages/patrol/index.jsx index ab002782..088de738 100644 --- a/weapp/src/packages/patrol/index.jsx +++ b/weapp/src/packages/patrol/index.jsx @@ -1444,12 +1444,14 @@ const Index = () => { isSuperAdmin && (wait === 'wait' || kind === 'handle') && { handleState === '待处理' && <> - { - setIsAppoint(e.detail.value === '指派' ? true : false) - }}> - 指派 - 不处理 - + + { + setIsAppoint(e.detail.value === '指派' ? true : false) + }}> + 指派 + 不处理 + + { isAppoint && <> @@ -1463,13 +1465,15 @@ const Index = () => { -