ww664853070 2 years ago
parent
commit
5f805296e5
  1. 8
      api/Dockerfile
  2. 3
      api/app/lib/models/salePerformance.js
  3. 17
      api/jenkinsfile
  4. 11
      jenkinsfile_poms_api
  5. 3
      web/client/src/sections/business/containers/performanceReport/invoicingDetails.jsx

8
api/Dockerfile

@ -25,12 +25,14 @@
FROM repository.anxinyun.cn/base-images/nodejs12:20.10.12.2
MAINTAINER liuxinyi "liu.xinyi@free-sun.com.cn"
COPY . /var/app
WORKDIR /var/app
EXPOSE 8080
RUN npm cache clean -f && npm install --production --force --registry http://10.8.30.22:7000
CMD ["-u", "http://localhost:8088"]
RUN rm -rf package-lock.json
ENTRYPOINT [ "node", "server.js" ]
CMD [ "node", "server.js" ]

3
api/app/lib/models/salePerformance.js

@ -56,7 +56,8 @@ module.exports = dc => {
tableName: "sale_performance",
});
const { sale } = dc.models;
sale.hasMany(salePerformance, { foreighKey: 'saleName', targetKey: "sale" })
sale.hasMany(salePerformance, { foreignKey: 'saleName', sourceKey: "sale" })
dc.models.salePerformance = salePerformance;
return salePerformance;

17
api/jenkinsfile

@ -0,0 +1,17 @@
pipeline {
agent {
node{
label 'jnlp-slave'
}
}
stages {
stage('Testing dc api......') {
steps {
buildName '#${BUILD_NUMBER} ~/pep/${JOB_NAME}:${IMAGE_VERSION}'
buildDescription 'harbor.anxinyun.cn/pep/${JOB_NAME}:${IMAGE_VERSION}'
sh 'nerdctl build -t harbor.anxinyun.cn/pep/${JOB_NAME}:${IMAGE_VERSION} .'
sh 'nerdctl push harbor.anxinyun.cn/pep/${JOB_NAME}:${IMAGE_VERSION}'
}}
}
}

11
jenkinsfile_poms_api

@ -6,13 +6,12 @@ pipeline {
}
stages {
stage('Testing pep-report-api ......') {
stage('Testing dc api......') {
steps {
sh 'switch-auth.sh anxinyun'
buildName "#${BUILD_NUMBER} ~/fs-cloud/${JOB_NAME}:${IMAGE_VERSION}"
buildDescription "registry.cn-hangzhou.aliyuncs.com/${CLOUD}/${JOB_NAME}:${IMAGE_VERSION}"
sh 'docker build -t registry.cn-hangzhou.aliyuncs.com/${CLOUD}/${JOB_NAME}:${IMAGE_VERSION} ./api'
sh 'docker push registry.cn-hangzhou.aliyuncs.com/${CLOUD}/${JOB_NAME}:${IMAGE_VERSION}'
buildName '#${BUILD_NUMBER} ~/pep/dc-api/${JOB_NAME}:${IMAGE_VERSION}'
buildDescription 'harbor.anxinyun.cn/pep/dc-api/${JOB_NAME}:${IMAGE_VERSION}'
sh 'nerdctl build -t harbor.anxinyun.cn/pep/dc-api/${JOB_NAME}:${IMAGE_VERSION} ./api'
sh 'nerdctl push harbor.anxinyun.cn/pep/dc-api/${JOB_NAME}:${IMAGE_VERSION}'
}
}
}

3
web/client/src/sections/business/containers/performanceReport/invoicingDetails.jsx

@ -204,7 +204,8 @@ const InvoicingDetails = (props) => {
pageSizeOpts={[10, 20, 30, 40]}
onChange={(currentPage, pageSize) => {
setQuery({ limit: pageSize, page: currentPage - 1 });
page.current = currentPage - 1
getInvoicingDetailData({ limit: pageSize, page: currentPage - 1 });
page.current = currentPage - 1;
}}
/>
</div>

Loading…
Cancel
Save