diff --git a/bin/.gitignore b/bin/.gitignore new file mode 100644 index 0000000..549e00a --- /dev/null +++ b/bin/.gitignore @@ -0,0 +1,33 @@ +HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ diff --git a/bin/Dockerfile-gz b/bin/Dockerfile-gz new file mode 100644 index 0000000..982ea9b --- /dev/null +++ b/bin/Dockerfile-gz @@ -0,0 +1,7 @@ +FROM harbor.dcos.guangzhou.unicom.local/eshop/skywalking_agent_springboot_8.1.0:v1.0 +ENV LC_ALL=zh_CN.utf8 +ENV LANG=zh_CN.utf8 +ENV LANGUAGE=zh_CN.utf8 +RUN localedef -c -f UTF-8 -i zh_CN zh_CN.utf8 +ADD /target/biz_service_ebtp_extend-0.0.1.jar /biz_service_ebtp_extend-0.0.1.jar +ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "/biz_service_ebtp_extend-0.0.1.jar"] diff --git a/bin/README.md b/bin/README.md new file mode 100644 index 0000000..33c31eb --- /dev/null +++ b/bin/README.md @@ -0,0 +1,10 @@ +# 扩展功能微服务组件 + + 公告通知功能、共享文档... + +## 组件模块 + + 1. 包名:功能 + 2. 包名:功能 + 3. 包名:功能 + diff --git a/bin/config-gz b/bin/config-gz new file mode 100644 index 0000000..6fe3b43 --- /dev/null +++ b/bin/config-gz @@ -0,0 +1,17 @@ +apiVersion: v1 +clusters: +- cluster: + insecure-skip-tls-verify: true + server: https://10.125.164.35:48662 + name: demok8s +contexts: +- context: + cluster: demok8s + user: cluster-admin + name: default +current-context: default +kind: Config +users: +- name: cluster-admin + user: + token: df5e4896a4f6d1b1447b2584ca7405f7 diff --git a/bin/deployment-gz.yaml b/bin/deployment-gz.yaml new file mode 100644 index 0000000..ae3756b --- /dev/null +++ b/bin/deployment-gz.yaml @@ -0,0 +1,83 @@ +# 接口版本 +apiVersion: apps/v1 +# 接口类型 +kind: Deployment +metadata: + name: biz-service-ebtp-extend + namespace: default + labels: + app: biz-service-ebtp-extend + +# 必选,详细定义 +spec: + # pod 副本数量 + replicas: 1 + + # 滚动升级配置信息 + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 1 + + # 选择器,匹配pod模板 + selector: + matchLabels: + app: biz-service-ebtp-extend + + template: + metadata: + labels: + # 模板名称 + app: biz-service-ebtp-extend + + # 定义容器模板,该模板可以包含多个容器 + spec: + # 挂载日志存储 + volumes: + - name: log + persistentVolumeClaim: + claimName: log-pvc + readOnly: false + - name: storage + persistentVolumeClaim: + claimName: file-pvc + readOnly: false + + # 必选,Pod中容器列表 + containers: + - name: biz-service-ebtp-extend + image: harbor.dcos.guangzhou.unicom.local/eshop/biz-service-ebtp-extend:latest + # 在容器中挂载日志存储区 + volumeMounts: + - name: log + mountPath: /log + - name: storage + mountPath: /storage + # 需要暴露的端口库号列表 + ports: + - containerPort: 18018 + # 容器运行前需设置的环境变量列表 + env: + # Apollo 配置中心变量设置 + - name: APOLLO_CONFIGSERVICE + value: http://10.242.31.158:6001 +--- +kind: Service +apiVersion: v1 +metadata: + name: biz-service-ebtp-extend + namespace: default + labels: + app: biz-service-ebtp-extend + annotations: + lb.cke.tg.unicom/target-vports: 18018-18018 +spec: + ports: + - port: 18018 + targetPort: 18018 + selector: + app: biz-service-ebtp-extend +status: + loadBalancer: {} + +--- \ No newline at end of file diff --git a/bin/pom.xml b/bin/pom.xml new file mode 100644 index 0000000..f696803 --- /dev/null +++ b/bin/pom.xml @@ -0,0 +1,117 @@ + + + 4.0.0 + + + com.chinaunicom.ebtp + mall-ebtp-cloud-parent + 0.0.1-SNAPSHOT + + + com.chinaunicom.mall.ebtp + biz_service_ebtp_extend + 0.0.1 + biz_service_ebtp_extend + + + + + com.chinaunicom.mall.ebtp + uboot-core + 0.0.2-SNAPSHOT + + + com.chinaunicom.ebtp + mall-ebtp-cloud-security-starter + + + + + + com.chinaunicom.ebtp + mall-ebtp-cloud-attachment-sdk + + + + com.chinaunicom.ebtp + mall-ebtp-cloud-eureka-starter + + + + com.chinaunicom.ebtp + mall-ebtp-cloud-feign-starter + + + + com.chinaunicom.ebtp + mall-ebtp-cloud-apollo-starter + + + + com.chinaunicom.ebtp + mall-ebtp-cloud-jpa-starter + + + mysql + mysql-connector-java + + + org.apache.shardingsphere + sharding-jdbc-spring-boot-starter + + + + com.chinaunicom.ebtp + mall-ebtp-cloud-seata-starter + + + + com.chinaunicom.ebtp + mall-ebtp-cloud-swagger-starter + + + + com.chinaunicom.ebtp + mall-ebtp-cloud-redis-starter + + + + + + + maven-snapshot-local + maven-snapshot-local + http://ccp.tianti.tg.unicom.local/artifactory/tianti-maven-snapshot-local/ + + false + + + true + + + + + + + + src/main/resources + true + + + src/main/java + + **/mapper/*Mapper.xml + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + \ No newline at end of file diff --git a/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/BizServiceEbtpExtendApplication.class b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/BizServiceEbtpExtendApplication.class new file mode 100644 index 0000000..7a2e252 Binary files /dev/null and b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/BizServiceEbtpExtendApplication.class differ diff --git a/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/column/BizBidNoticeField.class b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/column/BizBidNoticeField.class new file mode 100644 index 0000000..2835866 Binary files /dev/null and b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/column/BizBidNoticeField.class differ diff --git a/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/controller/BizBidNoticeController.class b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/controller/BizBidNoticeController.class new file mode 100644 index 0000000..070b781 Binary files /dev/null and b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/controller/BizBidNoticeController.class differ diff --git a/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/dao/BizBidNoticeMapper.class b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/dao/BizBidNoticeMapper.class new file mode 100644 index 0000000..81acf5f Binary files /dev/null and b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/dao/BizBidNoticeMapper.class differ diff --git a/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/dao/mapper/BizBidNoticeMapper.xml b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/dao/mapper/BizBidNoticeMapper.xml new file mode 100644 index 0000000..8f15396 --- /dev/null +++ b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/dao/mapper/BizBidNoticeMapper.xml @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + select id,notice_name, notice_title, notice_content, notice_file,notice_release,notice_top, create_by, + create_date, update_by, update_date,tenant_id,tenant_name,last_update_time, delete_flag from biz_bid_notice + + + + + + + + + + + + update biz_bid_notice + set + delete_flag="deleted" + where notice_id=#{notice_id} limit #{pageIndex},#{pageSize} + + + + update biz_bid_notice + set + notice_release="open" + where id=#{id} + + + + update biz_bid_notice + set + notice_release="close" + where id=#{id} + + + + update biz_bid_notice + set + notice_top="0" + where id=#{id} + + + + update biz_bid_notice + set + notice_top="1" + where id=#{id} + + + + + update biz_bid_notice + + notice_name = #{noticeName}, + notice_title = #{noticeTitle}, + notice_content = #{noticeContent}, + notice_file = #{noticeFile}, + notice_release=#{noticeRelease} + notice_top=#{noticeTop} + update_by = #{updatBy}, + update_date = #{updateDate}, + tenant_id = #{tenantId}, + tenant_name = #{tenantName}, + last_update_time = #{lastTpdateTime}, + + where ID=#{id} + + + + + update biz_bid_notice + set + delete_flag="deleted" + where ID=#{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/entity/BizBidNotice.class b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/entity/BizBidNotice.class new file mode 100644 index 0000000..ca14646 Binary files /dev/null and b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/entity/BizBidNotice.class differ diff --git a/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/service/IBizBidNoticeService.class b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/service/IBizBidNoticeService.class new file mode 100644 index 0000000..cc0488d Binary files /dev/null and b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/service/IBizBidNoticeService.class differ diff --git a/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/service/impl/BizBidNoticeServiceImpl.class b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/service/impl/BizBidNoticeServiceImpl.class new file mode 100644 index 0000000..220aa23 Binary files /dev/null and b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/service/impl/BizBidNoticeServiceImpl.class differ diff --git a/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/column/BizBidSharedField.class b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/column/BizBidSharedField.class new file mode 100644 index 0000000..451a0a0 Binary files /dev/null and b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/column/BizBidSharedField.class differ diff --git a/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/controller/BizBidSharedController.class b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/controller/BizBidSharedController.class new file mode 100644 index 0000000..07a5e17 Binary files /dev/null and b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/controller/BizBidSharedController.class differ diff --git a/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/dao/BizBidSharedMapper.class b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/dao/BizBidSharedMapper.class new file mode 100644 index 0000000..9e0cee1 Binary files /dev/null and b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/dao/BizBidSharedMapper.class differ diff --git a/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/dao/mapper/BizBidSharedMapper.xml b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/dao/mapper/BizBidSharedMapper.xml new file mode 100644 index 0000000..8d7b42b --- /dev/null +++ b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/dao/mapper/BizBidSharedMapper.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + select id,shared_id, shared_name, shared_role, shared_file,shared_remarks, create_by, + create_date, update_by, update_date,tenant_id,tenant_name,last_update_time, delete_flag from biz_bid_shared + + + + + + + + + update biz_bid_shared + set + delete_flag="deleted" + where ID=#{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/entity/BizBidShared.class b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/entity/BizBidShared.class new file mode 100644 index 0000000..854decc Binary files /dev/null and b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/entity/BizBidShared.class differ diff --git a/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/service/IBizBidSharedService.class b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/service/IBizBidSharedService.class new file mode 100644 index 0000000..2326bd0 Binary files /dev/null and b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/service/IBizBidSharedService.class differ diff --git a/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/service/impl/BizBidSharedServiceImpl.class b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/service/impl/BizBidSharedServiceImpl.class new file mode 100644 index 0000000..3f8c163 Binary files /dev/null and b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/service/impl/BizBidSharedServiceImpl.class differ diff --git a/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidsharedrecord/column/BizBidSharedRecordField.class b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidsharedrecord/column/BizBidSharedRecordField.class new file mode 100644 index 0000000..0ea0ee8 Binary files /dev/null and b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidsharedrecord/column/BizBidSharedRecordField.class differ diff --git a/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidsharedrecord/controller/BizBidSharedRecordController.class b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidsharedrecord/controller/BizBidSharedRecordController.class new file mode 100644 index 0000000..4fb7070 Binary files /dev/null and b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidsharedrecord/controller/BizBidSharedRecordController.class differ diff --git a/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidsharedrecord/dao/BizBidSharedRecordMapper.class b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidsharedrecord/dao/BizBidSharedRecordMapper.class new file mode 100644 index 0000000..d061086 Binary files /dev/null and b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidsharedrecord/dao/BizBidSharedRecordMapper.class differ diff --git a/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidsharedrecord/dao/mapper/BizBidSharedRecordMapper.xml b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidsharedrecord/dao/mapper/BizBidSharedRecordMapper.xml new file mode 100644 index 0000000..ed9b47a --- /dev/null +++ b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidsharedrecord/dao/mapper/BizBidSharedRecordMapper.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + select id,record_id, record_role, record_name, record_staff,record_account, create_by, + create_date, update_by, update_date,tenant_id,tenant_name,last_update_time, delete_flag from biz_bid_shared_record + + + + + + + + + + update biz_bid_shared_record + set + delete_flag="deleted" + where ID=#{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidsharedrecord/entity/BizBidSharedRecord.class b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidsharedrecord/entity/BizBidSharedRecord.class new file mode 100644 index 0000000..285db34 Binary files /dev/null and b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidsharedrecord/entity/BizBidSharedRecord.class differ diff --git a/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidsharedrecord/service/IBizBidSharedRecordService.class b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidsharedrecord/service/IBizBidSharedRecordService.class new file mode 100644 index 0000000..578d6ec Binary files /dev/null and b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidsharedrecord/service/IBizBidSharedRecordService.class differ diff --git a/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidsharedrecord/service/impl/BizBidSharedRecordServiceImpl.class b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidsharedrecord/service/impl/BizBidSharedRecordServiceImpl.class new file mode 100644 index 0000000..8cf9c28 Binary files /dev/null and b/bin/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidsharedrecord/service/impl/BizBidSharedRecordServiceImpl.class differ diff --git a/bin/src/main/resources/application-dev.yml b/bin/src/main/resources/application-dev.yml new file mode 100644 index 0000000..7d976f2 --- /dev/null +++ b/bin/src/main/resources/application-dev.yml @@ -0,0 +1,194 @@ +server: + port: 18018 + servlet: + context-path: / + +# 对应 apollo 配置中心的应用名 +app: + id: biz-service-ebtp-extend + +# Apollo 配置信息 +apollo: + meta: http://10.242.31.158:6001/ + bootstrap: + namespace: application + enabled: true + eagerLoad: + enabled: true + +spring: + aop: + auto: true #开启spring的aop配置 + proxy-target-class: true + + application: + name: biz-service-ebtp-extend + + shardingsphere: + datasource: + names: ds0 + ds0: + type: com.alibaba.druid.pool.DruidDataSource + driver-class-name: com.mysql.cj.jdbc.Driver + username: root + password: root + jdbc-url: jdbc:mysql://10.242.31.158:3033/ebtp_mall_extend?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true + url: jdbc:mysql://10.242.31.158:3033/ebtp_mall_extend?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true + filters: stat,wall,log4j + maxActive: 20 + initialSize: 1 + maxWait: 60000 + minIdle: 1 + timeBetweenEvictionRunsMillis: 60000 + minEvictableIdleTimeMillis: 300000 + validationQuery: select 'x' + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + poolPreparedStatements: true + maxOpenPreparedStatements: 20 + connection-properties: druid.stat.merggSql=ture;druid.stat.slowSqlMillis=5000 + props: + sql: + show: true + + jackson: + date-format: yyyy-MM-dd HH:mm:ss + time-zone: GMT+8 + serialization: + write-dates-as-timestamps: false + + # 天宫Kafka增加了安全认证,需要配置安全属性 + kafka: + bootstrap-servers: 10.125.164.192:32005,10.125.164.193:32005,10.125.164.194:32005 + template: + default-topic: jl_test + + # 生产者配置参数 + producer: + client-id: core-service-ebtp-crypt + properties: + security.protocol: SASL_PLAINTEXT + sasl.mechanism: SCRAM-SHA-256 + sasl.jaas.config: org.apache.kafka.common.security.scram.ScramLoginModule required username="jltest" password="Unicom#123"; + + # 消费者配置参数 + consumer: + group-id: core-service-ebtp-crypt-consumer + auto-offset-reset: latest + properties: + security.protocol: SASL_PLAINTEXT + sasl.mechanism: SCRAM-SHA-256 + sasl.jaas.config: org.apache.kafka.common.security.scram.ScramLoginModule required username="jltest" password="Unicom#123"; + + # 天宫 redis 需要使用哨兵进行访问 + redis: + sentinel: + master: eshop-redis + nodes: 10.125.164.124:32718, 10.125.164.118:32716, 10.125.164.121:32716 + password: Unicom#135 + + lettuce: + # jedis: + pool: + maxTotal: 50 + minIdle: 1 + maxWaitMillis: 5000 + maxIdle: 5 + testOnBorrow: true + testOnReturn: true + testWhileIdle: true + token: + database: 0 + host: 125.32.114.204 + port: 16379 + password: redis@CC1234 + timeout: 6000 + uuid: + database: 1 + host: 125.32.114.204 + port: 16379 + password: redis@CC1234 + timeout: 6000 + cache: + database: 2 + host: 125.32.114.204 + port: 16379 + password: redis@CC1234 + timeout: 6000 + +# 天宫Eureka配置 +eureka: + client: + service-url: + defaultZone: http://10.242.31.158:5001/eureka,http://10.242.31.158:5002/eureka,http://10.242.31.158:5003/eureka + instance: + prefer-ip-address: true + hostname: ${spring.cloud.client.ip-address} + instance-ip: ${spring.cloud.client.ip-address}:${server.port} + +mybatis-plus: + configuration: + # 是否开启自动驼峰命名规则映射:从数据库列名到Java属性驼峰命名的类似映射 + map-underscore-to-camel-case: true + auto-mapping-behavior: full + # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用 + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + mapper-locations: classpath*:com/chinaunicom/mall/ebtp/**/mapper/*Mapper.xml + global-config: + # 逻辑删除配置 + db-config: + # logic-delete-field: flag # 全局逻辑删除的实体字段名(since 3.3.0,配置后可以忽略不配置步骤2) @TableLogic + logic-delete-value: deleted # 逻辑已删除值 + logic-not-delete-value: normal # 逻辑未删除值 + +# --------------feign ------------ +feign: + httpclient: + enabled: false + okhttp: + enabled: true + client: + config: + default: + connect-timeout: 20000 + read-timeout: 20000 + +hystrix: + command: + default: + execution: + timeout: + enabled: true + isolation: + strategy: SEMAPHORE + thread: + timeoutInMilliseconds: 200000 #熔断超时时间 + circuitBreaker: + sleepWindowInMilliseconds: 20000 + forceClosed: true +ribbon: + ReadTimeout: 20000 #请求处理的超时时间 + ConnectTimeout: 20000 #请求连接超时时间 + MaxAutoRetries: 0 #对当前实例的重试次数 + MaxAutoRetriesNextServer: 1 #切换实例的重试次数 1 + +mconfig: + workerId: 1 + datacenterId: 1 + remote: + approval: true #是否需要提交公告审批 + media: true #是否需要发送到媒体 + + #中国联通电子商城外网接入平台 相关参数 + token: + userName: zbgg + password: eip_13579 + file-wjpt-storage-path: http://111.198.162.67:8081/enr/api/base/file/cgDownload/ #测试地址 + #获取file地址 + file: + address: http://125.32.114.204:8760/api/core-service-ebtp-updownload/v1/download/oid/ + #提交审批相关字段 + approve: + wfSectionNo: 002 + wfSectionName: 采购审批 diff --git a/bin/src/main/resources/application.yml b/bin/src/main/resources/application.yml new file mode 100644 index 0000000..caf4dfc --- /dev/null +++ b/bin/src/main/resources/application.yml @@ -0,0 +1,3 @@ +spring: + profiles: + active: dev \ No newline at end of file diff --git a/bin/src/main/resources/file.conf b/bin/src/main/resources/file.conf new file mode 100644 index 0000000..d591bab --- /dev/null +++ b/bin/src/main/resources/file.conf @@ -0,0 +1,66 @@ +transport { + # tcp udt unix-domain-socket + type = "TCP" + #NIO NATIVE + server = "NIO" + #enable heartbeat + heartbeat = true + # the client batch send request enable + enableClientBatchSendRequest = true + #thread factory for netty + threadFactory { + bossThreadPrefix = "NettyBoss" + workerThreadPrefix = "NettyServerNIOWorker" + serverExecutorThread-prefix = "NettyServerBizHandler" + shareBossWorker = false + clientSelectorThreadPrefix = "NettyClientSelector" + clientSelectorThreadSize = 1 + clientWorkerThreadPrefix = "NettyClientWorkerThread" + # netty boss thread size,will not be used for UDT + bossThreadSize = 1 + #auto default pin or 8 + workerThreadSize = "default" + } + shutdown { + # when destroy server, wait seconds + wait = 3 + } + serialization = "seata" + compressor = "none" +} +service { + #transaction service group mapping + vgroupMapping.biz-service-ebtp-expenses-fescar-service-group = "default" + #only support when registry.type=file, please don't set multiple addresses + default.grouplist = "127.0.0.1:8091" + #degrade, current not support + enableDegrade = false + #disable seata + disableGlobalTransaction = false +} + +client { + rm { + asyncCommitBufferLimit = 10000 + lock { + retryInterval = 10 + retryTimes = 30 + retryPolicyBranchRollbackOnConflict = true + } + reportRetryCount = 5 + tableMetaCheckEnable = false + reportSuccessEnable = false + } + tm { + commitRetryCount = 5 + rollbackRetryCount = 5 + } + undo { + dataValidation = true + logSerialization = "jackson" + logTable = "undo_log" + } + log { + exceptionRate = 100 + } +} \ No newline at end of file diff --git a/bin/src/main/resources/logback.xml b/bin/src/main/resources/logback.xml new file mode 100644 index 0000000..62285f5 --- /dev/null +++ b/bin/src/main/resources/logback.xml @@ -0,0 +1,89 @@ + + + + + + + ${logback.appname} + + + + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} %contextName [%thread] %-5level %logger{50} - %msg%n + + + + + + + + + ERROR + + DENY + + ACCEPT + + + ${logback.logdir}/info.${logback.appname}.log + + + + ${logback.logdir}/info.${logback.appname}.%d{yyyy-MM-dd}.log + + 3 + + true + + + + + + UTF-8 + %d [%thread] %-5level %logger{64} %line - %msg%n + + + + + + + Error + + + ${logback.logdir}/error.${logback.appname}.log + + + + ${logback.logdir}/error.${logback.appname}.%d{yyyy-MM-dd}.log + + 3 + + true + + + + + + UTF-8 + %d [%thread] %-5level %logger{128} %line - %msg%n + + + + + + + + + + + + diff --git a/bin/src/main/resources/registry.conf b/bin/src/main/resources/registry.conf new file mode 100644 index 0000000..bd724ed --- /dev/null +++ b/bin/src/main/resources/registry.conf @@ -0,0 +1,79 @@ +registry { + # file 、nacos 、eureka、redis、zk、consul、etcd3、sofa + type = "eureka" + + nacos { + application = "seata-server" + serverAddr = "localhost" + namespace = "" + username = "" + password = "" + } + eureka { + serviceUrl = "http://10.242.31.158:5001/eureka,http://10.242.31.158:5002/eureka,http://10.242.31.158:5003/eureka" + weight = "1" + } + redis { + serverAddr = "localhost:6379" + db = "0" + password = "" + timeout = "0" + } + zk { + serverAddr = "127.0.0.1:2181" + sessionTimeout = 6000 + connectTimeout = 2000 + username = "" + password = "" + } + consul { + serverAddr = "127.0.0.1:8500" + } + etcd3 { + serverAddr = "http://localhost:2379" + } + sofa { + serverAddr = "127.0.0.1:9603" + region = "DEFAULT_ZONE" + datacenter = "DefaultDataCenter" + group = "SEATA_GROUP" + addressWaitTime = "3000" + } + file { + name = "file.conf" + } +} + +config { + # file、nacos 、apollo、zk、consul、etcd3、springCloudConfig + type = "file" + + nacos { + serverAddr = "localhost" + namespace = "" + group = "SEATA_GROUP" + username = "" + password = "" + } + consul { + serverAddr = "127.0.0.1:8500" + } + apollo { + appId = "seata-server" + apolloMeta = "http://192.168.1.204:8801" + namespace = "application" + } + zk { + serverAddr = "127.0.0.1:2181" + sessionTimeout = 6000 + connectTimeout = 2000 + username = "" + password = "" + } + etcd3 { + serverAddr = "http://localhost:2379" + } + file { + name = "file.conf" + } +} diff --git a/src/main/resources/seata.conf b/bin/src/main/resources/seata.conf similarity index 100% rename from src/main/resources/seata.conf rename to bin/src/main/resources/seata.conf diff --git a/bin/src/main/resources/swagger-configuration.properties b/bin/src/main/resources/swagger-configuration.properties new file mode 100644 index 0000000..6624bf1 --- /dev/null +++ b/bin/src/main/resources/swagger-configuration.properties @@ -0,0 +1,7 @@ +unifast.swagger.basePackage=com.chinaunicom.mall.ebtp.extend +unifast.swagger.title=\u6d4b\u8bd5\u63a5\u53e3\u6587\u6863 +unifast.swagger.contactName=\u5409\u6797\u9879\u76ee\u7ec4 +unifast.swagger.contactUrl=http://chinaunicom.com +unifast.swagger.contactEmail=chinaunicom@chinaunicom.com +unifast.swagger.version=0.0.1 +unifast.swagger.description=\u7840\u540e\u53f0\u529f\u80fd\u6846\u67b6 \ No newline at end of file diff --git a/deployment-gz.yaml b/deployment-gz.yaml index ae3756b..cf47903 100644 --- a/deployment-gz.yaml +++ b/deployment-gz.yaml @@ -29,6 +29,9 @@ spec: labels: # 模板名称 app: biz-service-ebtp-extend + annotations: + prometheus.io/port: '18018' + prometheus.io/jl-pod: 'true' # 定义容器模板,该模板可以包含多个容器 spec: @@ -71,6 +74,8 @@ metadata: app: biz-service-ebtp-extend annotations: lb.cke.tg.unicom/target-vports: 18018-18018 + prometheus.io/port: '18018' + prometheus.io/jl-svc: 'true' spec: ports: - port: 18018 diff --git a/pom.xml b/pom.xml index f696803..c947128 100644 --- a/pom.xml +++ b/pom.xml @@ -20,13 +20,7 @@ com.chinaunicom.mall.ebtp uboot-core - 0.0.2-SNAPSHOT - - - com.chinaunicom.ebtp - mall-ebtp-cloud-security-starter - - + 0.0.1-SNAPSHOT @@ -34,49 +28,45 @@ mall-ebtp-cloud-attachment-sdk - - com.chinaunicom.ebtp - mall-ebtp-cloud-eureka-starter - - - - com.chinaunicom.ebtp - mall-ebtp-cloud-feign-starter - - com.chinaunicom.ebtp mall-ebtp-cloud-apollo-starter - - com.chinaunicom.ebtp - mall-ebtp-cloud-jpa-starter - mysql mysql-connector-java + org.apache.shardingsphere sharding-jdbc-spring-boot-starter - - - com.chinaunicom.ebtp - mall-ebtp-cloud-seata-starter - - - - com.chinaunicom.ebtp - mall-ebtp-cloud-swagger-starter - - - - com.chinaunicom.ebtp - mall-ebtp-cloud-redis-starter - + + com.deepoove + poi-tl + 1.9.1 + + + + org.apache.poi + poi + 4.1.2 + + + + org.apache.poi + poi-ooxml + 4.1.2 + + + + org.apache.poi + poi-ooxml-schemas + 4.1.2 + + @@ -89,6 +79,7 @@ true + always diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/BizServiceEbtpExtendApplication.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/BizServiceEbtpExtendApplication.java index 4cdccbc..0468653 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/BizServiceEbtpExtendApplication.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/BizServiceEbtpExtendApplication.java @@ -1,14 +1,19 @@ package com.chinaunicom.mall.ebtp.extend; -import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; +import org.springframework.boot.actuate.autoconfigure.metrics.MeterRegistryCustomizer; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.cloud.netflix.eureka.EnableEurekaClient; import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; +import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure; + +import io.micrometer.core.instrument.MeterRegistry; + @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class, DruidDataSourceAutoConfigure.class @@ -22,5 +27,10 @@ public class BizServiceEbtpExtendApplication { public static void main(String[] args) { SpringApplication.run(BizServiceEbtpExtendApplication.class, args); } + + @Bean + public MeterRegistryCustomizer configurer() { + return (registry) -> registry.config().commonTags("application", "biz-service-ebtp-extend"); + } } diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/controller/BizBidNoticeController.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/controller/BizBidNoticeController.java index 5266a1a..73a2cf2 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/controller/BizBidNoticeController.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/controller/BizBidNoticeController.java @@ -25,7 +25,7 @@ import io.swagger.annotations.ApiParam; @RestController @Api(tags = "通知公告管理") -@RequestMapping("/api/biz-service-ebtp-extend/v1/bizbidnotice") +@RequestMapping("/v1/bizbidnotice") public class BizBidNoticeController { @Resource @@ -126,7 +126,7 @@ public class BizBidNoticeController { */ @ApiOperation("发布数据") @PostMapping("/fabu/{id}") - public BaseResponse fabu(@ApiParam(value = "主键id", required = true) @PathVariable Long id) { + public BaseResponse fabu(@ApiParam(value = "主键id", required = true) @PathVariable String id) { return BaseResponse.success(ibizBidNoticeService.fabu(id)); } @@ -140,7 +140,7 @@ public class BizBidNoticeController { */ @ApiOperation("发布数据") @PostMapping("/qxfabu/{id}") - public BaseResponse qxfabu(@ApiParam(value = "主键id", required = true) @PathVariable Long id) { + public BaseResponse qxfabu(@ApiParam(value = "主键id", required = true) @PathVariable String id) { return BaseResponse.success(ibizBidNoticeService.qxfabu(id)); } @@ -154,7 +154,7 @@ public class BizBidNoticeController { */ @ApiOperation("置顶数据") @PostMapping("/top/{id}") - public BaseResponse top(@ApiParam(value = "主键id", required = true) @PathVariable Long id) { + public BaseResponse top(@ApiParam(value = "主键id", required = true) @PathVariable String id) { return BaseResponse.success(ibizBidNoticeService.top(id)); } @@ -168,7 +168,7 @@ public class BizBidNoticeController { */ @ApiOperation("取消置顶数据") @PostMapping("/qxtop/{id}") - public BaseResponse qxtop(@ApiParam(value = "主键id", required = true) @PathVariable Long id) { + public BaseResponse qxtop(@ApiParam(value = "主键id", required = true) @PathVariable String id) { return BaseResponse.success(ibizBidNoticeService.qxtop(id)); } @@ -182,7 +182,7 @@ public class BizBidNoticeController { */ @ApiOperation("查询数据") @GetMapping("/select/{id}") - public BaseResponse get(@ApiParam(value = "主键id", required = true) @PathVariable Long id) { + public BaseResponse get(@ApiParam(value = "主键id", required = true) @PathVariable String id) { return BaseResponse.success(ibizBidNoticeService.getById(id)); } @@ -195,7 +195,7 @@ public class BizBidNoticeController { */ @ApiOperation("删除数据") @PostMapping("/delete/{id}") - public BaseResponse delete(@ApiParam(value = "主键id", required = true) @PathVariable Long id) { + public BaseResponse delete(@ApiParam(value = "主键id", required = true) @PathVariable String id) { return BaseResponse.success(ibizBidNoticeService.deleteOff(id)); } diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/dao/BizBidNoticeMapper.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/dao/BizBidNoticeMapper.java index de94fd2..0cb0f3b 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/dao/BizBidNoticeMapper.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/dao/BizBidNoticeMapper.java @@ -10,7 +10,7 @@ import com.chinaunicom.mall.ebtp.extend.bizbidnotice.entity.BizBidNotice; public interface BizBidNoticeMapper extends IBaseMapper { - public int deleteOff(Long id); + public int deleteOff(String id); public List getList(@Param("noticeTitle")String noticeTitle,@Param("noticeName") String noticeName, @Param("createDate")LocalDateTime createDate,@Param("noticeRelease") String noticeRelease, @Param("pageIndex") Integer getPageNo,@Param("pageSize") Integer pageSize); @@ -20,11 +20,11 @@ public interface BizBidNoticeMapper extends IBaseMapper { public List getAllListByTitle(@Param("noticeTitle")String noticeTitle,@Param("pageIndex") Integer getPageNo,@Param("pageSize") Integer pageSize); - public Boolean fabu(@Param("id")Long id); + public Boolean fabu(@Param("id")String id); - public Boolean qxfabu(@Param("id")Long id); + public Boolean qxfabu(@Param("id")String id); - public Boolean top(@Param("id")Long id); + public Boolean top(@Param("id")String id); - public Boolean qxtop(@Param("id")Long id); + public Boolean qxtop(@Param("id")String id); } diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/dao/mapper/BizBidNoticeMapper.xml b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/dao/mapper/BizBidNoticeMapper.xml index 8f15396..186091e 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/dao/mapper/BizBidNoticeMapper.xml +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/dao/mapper/BizBidNoticeMapper.xml @@ -77,28 +77,28 @@ where notice_id=#{notice_id} limit #{pageIndex},#{pageSize} - + update biz_bid_notice set notice_release="open" where id=#{id} - + update biz_bid_notice set notice_release="close" where id=#{id} - + update biz_bid_notice set notice_top="0" where id=#{id} - + update biz_bid_notice set notice_top="1" @@ -125,7 +125,7 @@ - + update biz_bid_notice set delete_flag="deleted" diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/entity/BizBidNotice.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/entity/BizBidNotice.java index 504084d..132d7a5 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/entity/BizBidNotice.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/entity/BizBidNotice.java @@ -29,7 +29,7 @@ public class BizBidNotice extends BaseEntity implements Serializable { */ @ApiModelProperty(value = "ID") @TableId(value = "id", type = IdType.AUTO) - private Long id; + private String id; /** * @@ -93,11 +93,11 @@ public class BizBidNotice extends BaseEntity implements Serializable { this.pageSize = pageSize; } - public Long getId() { + public String getId() { return id; } - public void setId(Long id) { + public void setId(String id) { this.id = id; } diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/service/IBizBidNoticeService.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/service/IBizBidNoticeService.java index 899eb57..3f7c76e 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/service/IBizBidNoticeService.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/service/IBizBidNoticeService.java @@ -13,7 +13,7 @@ import com.chinaunicom.mall.ebtp.extend.bizbidnotice.entity.BizBidNotice; */ public interface IBizBidNoticeService extends IBaseService{ - public int deleteOff(Long id); + public int deleteOff(String id); public List getlist(BizBidNotice bizBidNotice); @@ -23,11 +23,11 @@ public interface IBizBidNoticeService extends IBaseService{ public List getAllListByTitle(BizBidNotice bizBidNotice); - public Boolean fabu(Long id); + public Boolean fabu(String id); - public Boolean qxfabu(Long id); + public Boolean qxfabu(String id); - public Boolean top(Long id); + public Boolean top(String id); - public Boolean qxtop(Long id); + public Boolean qxtop(String id); } diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/service/impl/BizBidNoticeServiceImpl.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/service/impl/BizBidNoticeServiceImpl.java index 236b7a6..89496a6 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/service/impl/BizBidNoticeServiceImpl.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidnotice/service/impl/BizBidNoticeServiceImpl.java @@ -23,7 +23,7 @@ public class BizBidNoticeServiceImpl extends BaseServiceImpl get(@ApiParam(value = "主键id", required = true) @PathVariable Long id){ + public BaseResponse get(@ApiParam(value = "主键id", required = true) @PathVariable String id){ BizBidShared bizBidShared = ibizBidSharedService.getById(id); @@ -112,7 +112,7 @@ public class BizBidSharedController{ */ @ApiOperation("删除数据") @PostMapping("/delete/{id}") - public BaseResponse delete(@ApiParam(value = "主键id", required = true) @PathVariable Long id) { + public BaseResponse delete(@ApiParam(value = "主键id", required = true) @PathVariable String id) { return BaseResponse.success(ibizBidSharedService.deleteOff(id)); } diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/dao/BizBidSharedMapper.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/dao/BizBidSharedMapper.java index d27607d..7bac004 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/dao/BizBidSharedMapper.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/dao/BizBidSharedMapper.java @@ -15,5 +15,7 @@ public interface BizBidSharedMapper extends IBaseMapper { List getList(@Param("sharedName")String sharedName, @Param("sharedRole")String sharedRole,@Param("LocalDateTime") LocalDateTime localDateTime,@Param("pageIndex") Integer current,@Param("pageSize") Integer pageSize); + int deleteOff(String id); + } diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/dao/mapper/BizBidSharedMapper.xml b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/dao/mapper/BizBidSharedMapper.xml index 8d7b42b..3710820 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/dao/mapper/BizBidSharedMapper.xml +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/dao/mapper/BizBidSharedMapper.xml @@ -45,7 +45,7 @@ - + update biz_bid_shared set delete_flag="deleted" diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/entity/BizBidShared.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/entity/BizBidShared.java index aa58d8b..539b70c 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/entity/BizBidShared.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/entity/BizBidShared.java @@ -35,7 +35,7 @@ public class BizBidShared extends BaseEntity implements Serializable { */ @ApiModelProperty(value = "ID") @TableId(value = "id", type = IdType.AUTO) - private Long id; + private String id; /** * @@ -95,11 +95,11 @@ public class BizBidShared extends BaseEntity implements Serializable { this.pageSize = pageSize; } - public Long getId() { + public String getId() { return id; } - public void setId(Long id) { + public void setId(String id) { this.id = id; } diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/service/IBizBidSharedService.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/service/IBizBidSharedService.java index cb429ff..01997a5 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/service/IBizBidSharedService.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/service/IBizBidSharedService.java @@ -13,7 +13,7 @@ import com.chinaunicom.mall.ebtp.extend.bizbidshared.entity.BizBidShared; */ public interface IBizBidSharedService extends IBaseService{ - public int deleteOff(Long id); + public int deleteOff(String id); public List getlist(BizBidShared bizBidNotice); diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/service/impl/BizBidSharedServiceImpl.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/service/impl/BizBidSharedServiceImpl.java index 966d372..3096908 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/service/impl/BizBidSharedServiceImpl.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/service/impl/BizBidSharedServiceImpl.java @@ -23,7 +23,7 @@ public class BizBidSharedServiceImpl extends BaseServiceImpl> getList(@PathVariable("id") String id,@ApiParam(value = "对象数据", required = true)@RequestBody @Valid BizBidSharedRecord bizBidShared){ + public BaseResponse> getList(@PathVariable("id") String id, + @ApiParam(value = "对象数据", required = true) @RequestBody @Valid BizBidSharedRecord bizBidShared) { bizBidShared.setRecordId(id); return BaseResponse.success(ibizBidSharedRecordService.getlist(bizBidShared)); } - + /** * 插入新数据 * * @param bizBidSharedRecord - * + * * @return */ @ApiOperation("插入新数据") @PostMapping("/add") - public BaseResponse insert(@ApiParam(value = "对象数据", required = true) @RequestBody @Valid BizBidShared bizBidShared){ - Long userId = iBaseCacheUserService.getCacheUser().getUserId(); - BizBidSharedRecord bizBidSharedRecord=new BizBidSharedRecord(); + public BaseResponse insert( + @ApiParam(value = "对象数据", required = true) @RequestBody @Valid BizBidShared bizBidShared) { + BizBidSharedRecord bizBidSharedRecord = new BizBidSharedRecord(); bizBidSharedRecord.setId(null); - bizBidSharedRecord.setCreateBy(userId); bizBidSharedRecord.setRecordId(bizBidShared.getId().toString()); boolean save = ibizBidSharedRecordService.save(bizBidSharedRecord); - + return BaseResponse.success(save); } - + /** * 修改数据 * * @param bizBidSharedRecord - * + * * @return */ @ApiOperation("修改数据") @PutMapping("") - public BaseResponse update(@ApiParam(value = "对象数据", required = true) @RequestBody BizBidSharedRecord bizBidSharedRecord){ + public BaseResponse update( + @ApiParam(value = "对象数据", required = true) @RequestBody BizBidSharedRecord bizBidSharedRecord) { return BaseResponse.success(ibizBidSharedRecordService.saveOrUpdate(bizBidSharedRecord)); } - } diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidsharedrecord/dao/mapper/BizBidSharedRecordMapper.xml b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidsharedrecord/dao/mapper/BizBidSharedRecordMapper.xml index ed9b47a..a7c42e2 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidsharedrecord/dao/mapper/BizBidSharedRecordMapper.xml +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidsharedrecord/dao/mapper/BizBidSharedRecordMapper.xml @@ -57,7 +57,7 @@ - + update biz_bid_shared_record set delete_flag="deleted" diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidsharedrecord/entity/BizBidSharedRecord.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidsharedrecord/entity/BizBidSharedRecord.java index 9a1937a..ea4fa88 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidsharedrecord/entity/BizBidSharedRecord.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidsharedrecord/entity/BizBidSharedRecord.java @@ -31,7 +31,7 @@ public class BizBidSharedRecord extends BaseEntity implements Serializable { * */ @ApiModelProperty(value = "ID") - private Long id; + private String id; /** * @@ -94,11 +94,11 @@ public class BizBidSharedRecord extends BaseEntity implements Serializable { this.pageSize = pageSize; } - public Long getId() { + public String getId() { return id; } - public void setId(Long id) { + public void setId(String id) { this.id = id; } diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/BidEarlyWarn.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/BidEarlyWarn.java new file mode 100644 index 0000000..4f84e02 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/BidEarlyWarn.java @@ -0,0 +1,71 @@ +package com.chinaunicom.mall.ebtp.extend.export.bean; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.chinaunicom.mall.ebtp.common.base.entity.BaseEntity; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; + +/** + *

+ * 有效供应商少于3家提醒说明 + *

+ * + * @author dino + * @since 2021-01-14 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@ApiModel(value="BidEarlyWarn对象", description="有效供应商少于3家提醒说明") +@TableName(value = "biz_rsms_bid_early_warn",autoResultMap = true) +public class BidEarlyWarn extends BaseEntity implements Serializable { + + private static final Long serialVersionUID = 1L; + + @TableId + @ApiModelProperty(value = "编号") + @JsonSerialize(using = ToStringSerializer.class) + private String id; + + @ApiModelProperty(value = "是否继续:1是0否") + @TableField(value = "is_continue") + private Integer continueStatus; + + @ApiModelProperty(value = "说明") + private String remarks; + + @ApiModelProperty(value = "附件ID") + private String fileId; + + @ApiModelProperty(value = "项目id") + @JsonSerialize(using = ToStringSerializer.class) + private String projectId; + + @ApiModelProperty(value = "标包id") + @JsonSerialize(using = ToStringSerializer.class) + private String sectionId; + + @ApiModelProperty(value = "评审室Id") + @JsonSerialize(using = ToStringSerializer.class) + private String assessRoomId; + + @ApiModelProperty(value = "评审室序号") + private Integer assessRoomSort; + + @ApiModelProperty(value = "轮次ID") + @JsonSerialize(using = ToStringSerializer.class) + private String reviewTurnId; + + @ApiModelProperty(value = "轮次数") + private Integer reviewTurnSort; + +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/BidEvalDetail.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/BidEvalDetail.java new file mode 100644 index 0000000..0505d1b --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/BidEvalDetail.java @@ -0,0 +1,179 @@ +package com.chinaunicom.mall.ebtp.extend.export.bean; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.chinaunicom.mall.ebtp.common.base.entity.BaseEntity; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; + +/** + *

+ * 评标详细评审表 + *

+ * + * @author dino + * @since 2020-11-19 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@ApiModel(value="BidEvalDetail对象", description="评标详细评审表") +@TableName(value = "biz_rsms_bid_eval_detail",autoResultMap = true) +public class BidEvalDetail extends BaseEntity implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId + @ApiModelProperty(value = "编号") + @JsonSerialize(using = ToStringSerializer.class) + private String id; + + @ApiModelProperty(value = "报名表id(biz_bid_register)") + @JsonSerialize(using = ToStringSerializer.class) + private String supplierRegisterId; + + @ApiModelProperty(value = "评标主表ID(biz_eval_rvw)") + @JsonSerialize(using = ToStringSerializer.class) + private String bidEvalId; + + @ApiModelProperty(value = "评标类别表ID(biz_rsms_bid_eval_category)") + @JsonSerialize(using = ToStringSerializer.class) + private String bidEvalCategoryId; + + @ApiModelProperty(value = "评审配置类别表ID(biz_rsms_review_config_category)") + @JsonSerialize(using = ToStringSerializer.class) + private String categoryId; + + @ApiModelProperty(value = "详审项类别:0:报价;1:商务;2:技术;4:工程报价 ;5:服务。初审项类别:0:形式评审;1:资格审查项;2:响应性评审;3:商务审查项;4: 技术审查项;5: 服务审查项;6: 其他审查项") + private String category; + + @ApiModelProperty(value = "评分细则表ID(biz_rsms_review_config_detail)") + @JsonSerialize(using = ToStringSerializer.class) + private String detailId; + + @ApiModelProperty(value = "详细评分标准ID(biz_rsms_bid_eval_standard)") + @JsonSerialize(using = ToStringSerializer.class) + private String standardId; + + @ApiModelProperty(value = "结果值:初审1:合格;2不合格。详审:合计") + private String resultValue; + + @ApiModelProperty(value = "评分详情") + private String detailValue; + + @ApiModelProperty(value = "权重") + private Float weights; + + @ApiModelProperty(value = "备注") + private String remarks; + + + + + public static long getSerialVersionUID() { + return serialVersionUID; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getSupplierRegisterId() { + return supplierRegisterId; + } + + public void setSupplierRegisterId(String supplierRegisterId) { + this.supplierRegisterId = supplierRegisterId; + } + + public String getBidEvalId() { + return bidEvalId; + } + + public void setBidEvalId(String bidEvalId) { + this.bidEvalId = bidEvalId; + } + + public String getBidEvalCategoryId() { + return bidEvalCategoryId; + } + + public void setBidEvalCategoryId(String bidEvalCategoryId) { + this.bidEvalCategoryId = bidEvalCategoryId; + } + + public String getCategoryId() { + return categoryId; + } + + public void setCategoryId(String categoryId) { + this.categoryId = categoryId; + } + + public String getCategory() { + return category; + } + + public void setCategory(String category) { + this.category = category; + } + + public String getDetailId() { + return detailId; + } + + public void setDetailId(String detailId) { + this.detailId = detailId; + } + + public String getStandardId() { + return standardId; + } + + public void setStandardId(String standardId) { + this.standardId = standardId; + } + + public String getResultValue() { + return resultValue; + } + + public void setResultValue(String resultValue) { + this.resultValue = resultValue; + } + + public String getDetailValue() { + return detailValue; + } + + public void setDetailValue(String detailValue) { + this.detailValue = detailValue; + } + + public Float getWeights() { + return weights; + } + + public void setWeights(Float weights) { + this.weights = weights; + } + + public String getRemarks() { + return remarks; + } + + public void setRemarks(String remarks) { + this.remarks = remarks; + } +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/BidEvalDetailDTO.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/BidEvalDetailDTO.java new file mode 100644 index 0000000..86f911a --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/BidEvalDetailDTO.java @@ -0,0 +1,105 @@ +package com.chinaunicom.mall.ebtp.extend.export.bean; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.util.List; + +/** + *

+ * 评标详细评审表 + *

+ * + * @author dino + * @since 2020-11-19 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@ApiModel(value="BidEvalDetailDTO对象", description="评标详细评审表DTO") +public class BidEvalDetailDTO extends BidEvalDetail implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "评审轮次ID") + @JsonSerialize(using = ToStringSerializer.class) + private String reviewTurnId; + + @ApiModelProperty(value = "轮次数") + private Integer reviewTurnSort; + + @ApiModelProperty(value = "评审室Id") + @JsonSerialize(using = ToStringSerializer.class) + private String assessRoomId; + + @ApiModelProperty(value = "评审室序号") + @JsonSerialize(using = ToStringSerializer.class) + private Integer assessRoomSort; + + @ApiModelProperty(value = "评审类型(1:初审,2:详细评审)") + private String reviewType; + + @JsonInclude(value = JsonInclude.Include.NON_EMPTY) + @ApiModelProperty(value = "供应商ID") + private List supplierRegisterIds; + + + public static long getSerialversionuid() { + return serialVersionUID; + } + + public String getReviewTurnId() { + return reviewTurnId; + } + + public void setReviewTurnId(String reviewTurnId) { + this.reviewTurnId = reviewTurnId; + } + + public Integer getReviewTurnSort() { + return reviewTurnSort; + } + + public void setReviewTurnSort(Integer reviewTurnSort) { + this.reviewTurnSort = reviewTurnSort; + } + + public String getAssessRoomId() { + return assessRoomId; + } + + public void setAssessRoomId(String assessRoomId) { + this.assessRoomId = assessRoomId; + } + + public Integer getAssessRoomSort() { + return assessRoomSort; + } + + public void setAssessRoomSort(Integer assessRoomSort) { + this.assessRoomSort = assessRoomSort; + } + + public String getReviewType() { + return reviewType; + } + + public void setReviewType(String reviewType) { + this.reviewType = reviewType; + } + + public List getSupplierRegisterIds() { + return supplierRegisterIds; + } + + public void setSupplierRegisterIds(List supplierRegisterIds) { + this.supplierRegisterIds = supplierRegisterIds; + } +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/BidEvalInfo.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/BidEvalInfo.java new file mode 100644 index 0000000..8ef5000 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/BidEvalInfo.java @@ -0,0 +1,154 @@ +package com.chinaunicom.mall.ebtp.extend.export.bean; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.chinaunicom.mall.ebtp.common.base.entity.BaseEntity; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; + +/** + *

+ * 评标主表 + *

+ * + * @author dino + * @since 2020-11-18 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@ApiModel(value="BidEvalInfo对象", description="评标主表") +@TableName(value = "biz_rsms_bid_eval_info",autoResultMap = true) +public class BidEvalInfo extends BaseEntity implements Serializable { + + private static final Long serialVersionUID = 1L; + + @TableId + @ApiModelProperty(value = "编号") + @JsonSerialize(using = ToStringSerializer.class) + private String id; + + @ApiModelProperty(value = "评审类型(1:初审,2:详细评审)") + private String reviewType; + + @ApiModelProperty(value = "初审或详审状态(1:未提交汇总;2:提交汇总;3:结束)") + private String reviewStatus; + + @ApiModelProperty(value = "初审或详审评审结果说明") + private String reviewResultComment; + + @ApiModelProperty(value = "项目id") + @JsonSerialize(using = ToStringSerializer.class) + private String projectId; + + @ApiModelProperty(value = "标包id") + @JsonSerialize(using = ToStringSerializer.class) + private String sectionId; + + @ApiModelProperty(value = "评审室Id") + @JsonSerialize(using = ToStringSerializer.class) + private String assessRoomId; + + @ApiModelProperty(value = "评审室序号") + @JsonSerialize(using = ToStringSerializer.class) + private Integer assessRoomSort; + + @ApiModelProperty(value = "轮次ID") + @JsonSerialize(using = ToStringSerializer.class) + private String reviewTurnId; + + @ApiModelProperty(value = "轮次数") + private Integer reviewTurnSort; + + + public static Long getSerialVersionUID() { + return serialVersionUID; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getReviewType() { + return reviewType; + } + + public void setReviewType(String reviewType) { + this.reviewType = reviewType; + } + + public String getReviewStatus() { + return reviewStatus; + } + + public void setReviewStatus(String reviewStatus) { + this.reviewStatus = reviewStatus; + } + + public String getReviewResultComment() { + return reviewResultComment; + } + + public void setReviewResultComment(String reviewResultComment) { + this.reviewResultComment = reviewResultComment; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getSectionId() { + return sectionId; + } + + public void setSectionId(String sectionId) { + this.sectionId = sectionId; + } + + public String getAssessRoomId() { + return assessRoomId; + } + + public void setAssessRoomId(String assessRoomId) { + this.assessRoomId = assessRoomId; + } + + public Integer getAssessRoomSort() { + return assessRoomSort; + } + + public void setAssessRoomSort(Integer assessRoomSort) { + this.assessRoomSort = assessRoomSort; + } + + public String getReviewTurnId() { + return reviewTurnId; + } + + public void setReviewTurnId(String reviewTurnId) { + this.reviewTurnId = reviewTurnId; + } + + public Integer getReviewTurnSort() { + return reviewTurnSort; + } + + public void setReviewTurnSort(Integer reviewTurnSort) { + this.reviewTurnSort = reviewTurnSort; + } +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/BidEvalInfoDTO.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/BidEvalInfoDTO.java new file mode 100644 index 0000000..50496ca --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/BidEvalInfoDTO.java @@ -0,0 +1,34 @@ +package com.chinaunicom.mall.ebtp.extend.export.bean; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; + +/** + *

+ * 评标主表 + *

+ * + * @author dino + * @since 2020-11-18 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@ApiModel(value="BidEvalInfoDTO对象", description="评标主表DTO") +public class BidEvalInfoDTO extends BidEvalInfo implements Serializable { + + private static final Long serialVersionUID = 1L; + + @ApiModelProperty(value = "初审提交说明") + @JsonInclude(value = JsonInclude.Include.NON_EMPTY) + private BidEarlyWarn earlyWarn; + + +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/ExportParame.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/ExportParame.java new file mode 100644 index 0000000..52cbb2e --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/ExportParame.java @@ -0,0 +1,57 @@ +package com.chinaunicom.mall.ebtp.extend.export.bean; + +import io.swagger.annotations.ApiModelProperty; + +/** + * 参数 + */ +public class ExportParame { + + private String assessRoomId; + private String reviewTurnId; + + private String projectId; + @ApiModelProperty(value = "标段id") + private String sectionId; + private String reviewType; + + public String getAssessRoomId() { + return assessRoomId; + } + + public void setAssessRoomId(String assessRoomId) { + this.assessRoomId = assessRoomId; + } + + public String getReviewTurnId() { + return reviewTurnId; + } + + public void setReviewTurnId(String reviewTurnId) { + this.reviewTurnId = reviewTurnId; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getSectionId() { + return sectionId; + } + + public void setSectionId(String sectionId) { + this.sectionId = sectionId; + } + + public String getReviewType() { + return reviewType; + } + + public void setReviewType(String reviewType) { + this.reviewType = reviewType; + } +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/ProjectSection.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/ProjectSection.java new file mode 100644 index 0000000..d262698 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/ProjectSection.java @@ -0,0 +1,248 @@ +package com.chinaunicom.mall.ebtp.extend.export.bean; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.chinaunicom.mall.ebtp.common.base.entity.BaseEntity; +import com.chinaunicom.mall.ebtp.common.config.CustomLocalDateTimeTypeHandler; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; +import org.hibernate.validator.constraints.Length; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; + +/** + * 项目标段信息实体类 BizProjectSection + * + * @author daixc + * @date 2020/10/25 + */ +@Data +@Accessors(chain = true) +@ApiModel("项目标段信息") +@TableName(value = "biz_project_section", autoResultMap = true) +public class ProjectSection extends BaseEntity implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @ApiModelProperty(value = "主键") + @JsonSerialize(using = ToStringSerializer.class) + private String id; + + /** + * 招标项目表主键 + */ + @ApiModelProperty(value = "招标项目表主键") + @JsonSerialize(using = ToStringSerializer.class) + private String projectId; + + /** + * 标段包业务编号:招标项目业务编号/1 + */ + @ApiModelProperty(value = "标段包业务编号:招标项目业务编号/1") + @Length(max = 50,message = "业务编号最长为50字符") + private String bidSectBizNum; + + /** + * 标包序号 + */ + @ApiModelProperty(value = "标包序号") + private String bidSectCode; + + /** + * 标段(包)名称 + */ + @ApiModelProperty(value = "标段(包)名称") + @Length(max = 200,message = "标段(包)名称最长为200字符") + private String bidSectName; + + /** + * 标段(包)内容 + */ + @ApiModelProperty(value = "标段(包)内容") + @Length(max = 2000,message = "内容描述最长为2000字符") + private String bidSectContent; + + /** + * 标段(包)分类代码字典编码 + */ + @ApiModelProperty(value = "标段(包)分类代码字典编码") + private String bidSectTypeDict; + + /** + * 标包预算 + */ + @ApiModelProperty(value = "标包预算") + @Length(max = 20,message = "标包预算最长为20位") + private BigDecimal bidSectContractPrice; + + /** + * 标包预算币种字典编号 + */ + @ApiModelProperty(value = "标包预算币种字典编号") + private String contractPriceCurrencyDict; + + /** + * 询价方式 + */ + @ApiModelProperty(value = "询价方式") + private String selectionMethod; + + /** + * 评审规则(合格制|数量有限制) + */ + @ApiModelProperty(value = "评审规则(合格制|数量有限制)") + private String reviewRules; + + /** + * 标段合同估算价单位字典编码 + */ + @ApiModelProperty(value = "标段合同估算价单位字典编码") + private String priceUnitDict; + + /** + * 投标人资格条件 + */ + @ApiModelProperty(value = "投标人资格条件") + @Length(max = 1000,message = "投标人资格条件最长为1000字符") + private String bidderQual; + + /** + * 报价类型 + */ + @ApiModelProperty(value = "报价类型") + private String quotationMethodDict; + + /** + * 谈判开启时间 + */ + @ApiModelProperty(value = "谈判开启时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @TableField(typeHandler = CustomLocalDateTimeTypeHandler.class) + private LocalDateTime tenderOpeningTime; + + + /** + * 资审入围方式(合格制 | 有限数量制) + */ + @ApiModelProperty(value = "资审入围方式(合格制 | 有限数量制)") + private String ptcpMode; + + /** + * 入围数量(废弃) + */ + @ApiModelProperty(value = "入围数量") + private Integer ptcpCount; + + /** + * 业务模块 + */ + @ApiModelProperty(value = "业务模块") + private Integer businessModule; + /** + * 业务状态 + */ + @ApiModelProperty(value = "业务状态") + private Integer status; + + /** + * 标书附件集id + */ + @ApiModelProperty(value = "标书附件集id") + private String attDatasetId; + + + /** + * 资格审查方法1.资格预审 2.资格后审 + */ + @ApiModelProperty(value = "资格审查方法1.资格预审 2.资格后审") + private String checkMethodDict; + + /** + * 选择流程 + */ + @ApiModelProperty(value = "选择流程") + private String chooseProcess; + + /** + * 评审报告附件集id + */ + @ApiModelProperty(value = "评审报告附件集id") + private String reviewReportId; + + /** + * 标段编号(采购系统方案编号) + */ + @ApiModelProperty(value = "标段编号") + private String sectionNumber; + + /** + * 评审方法(1:最低价法;2:综合评估法) + */ + @ApiModelProperty(value = "评审方法(1:最低价法;2:综合评估法)") + private String evalMethodDict; + + /** + * 采购类型,1-货物,2-工程,3-服务,4-其他 + */ + @ApiModelProperty(value = "采购类型,1-货物,2-工程,3-服务,4-其他") + private String procurementTypeDict; + + + /** + * 项目数据推送工信部返回的工信部包编号 + */ + @ApiModelProperty(value = "项目数据推送工信部返回的工信部包编号") + private String miitSectionId; + + + /** + * 货币单位(1-元 2-万元) + */ + @ApiModelProperty(value = "货币单位(1-元 2-万元)") + private String monetaryUnit; + + /** + * 备注说明,用于本标段各种情况的说明,累加制 + */ + @ApiModelProperty(value = "备注说明,用于本标段各种情况的说明,累加制") + private String remarks; + + /** + * 父标包序号,当重新招标或二次公告、变更采购方式时用于记录原先的包序号 + */ + @ApiModelProperty(value = "父标包序号,当重新招标或二次公告、变更采购方式时用于记录原先的包序号") + @JsonSerialize(using = ToStringSerializer.class) + private String parentSectionId; + + /** + * 标段项目方案ID + */ + @ApiModelProperty(value = "标段项目方案ID") + private String projectPlanId; + + /** + * 标段子项目ID + */ + @ApiModelProperty(value = "标段子项目ID") + private String subprojectId; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/ProjectSectionVO.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/ProjectSectionVO.java new file mode 100644 index 0000000..e2b1748 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/ProjectSectionVO.java @@ -0,0 +1,141 @@ +package com.chinaunicom.mall.ebtp.extend.export.bean; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.chinaunicom.mall.ebtp.common.base.entity.BasePageRequest; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.util.List; + +/** + * 项目标段信息VO实体类 BizProjectSection + * + * @author daixc + * @date 2020/10/25 + */ +@Data +@Accessors(chain = true) +@ApiModel("项目标段信息VO类") +@TableName(autoResultMap = true) +public class ProjectSectionVO extends ProjectSection implements Serializable { + + /** + * 分页数据 + */ + @ApiModelProperty(value = "分页对象信息") + private BasePageRequest basePageRequest; + + /** + * 是否被选中 0 是 1 否 + */ + @ApiModelProperty(value = "是否被选中 0 不选中 1 选中") + private Integer isExceptionCheck; + + /** + * 流程ID + */ + @ApiModelProperty(value = "流程ID") + @JsonSerialize(using = ToStringSerializer.class) + private String flowId; + + /** + * 招标方式字典编号 + */ + @ApiModelProperty(value = "招标方式字典编号") + private String bidMethodDict; + + /** + * 招标项目名称 + */ + @ApiModelProperty(value = "招标项目名称") + private String projectName; + + /** + * 查询ID集合 + */ + @ApiModelProperty(value = "查询ID集合") + private List sectionIds; + + /** + * 资格审查方式|招募方式(评审次数)|竞争性谈判(参与方式) + */ + @ApiModelProperty(value = "资格审查方式|招募方式(评审次数)|竞争性谈判(参与方式)") + private String examinationMethodDict; + + /** + * 候审流程ID + */ + @ApiModelProperty(value = "候审流程ID") + @JsonSerialize(using = ToStringSerializer.class) + private String qualFlowId; + + + public BasePageRequest getBasePageRequest() { + return basePageRequest; + } + + public void setBasePageRequest(BasePageRequest basePageRequest) { + this.basePageRequest = basePageRequest; + } + + public Integer getIsExceptionCheck() { + return isExceptionCheck; + } + + public void setIsExceptionCheck(Integer isExceptionCheck) { + this.isExceptionCheck = isExceptionCheck; + } + + public String getFlowId() { + return flowId; + } + + public void setFlowId(String flowId) { + this.flowId = flowId; + } + + public String getBidMethodDict() { + return bidMethodDict; + } + + public void setBidMethodDict(String bidMethodDict) { + this.bidMethodDict = bidMethodDict; + } + + public String getProjectName() { + return projectName; + } + + public void setProjectName(String projectName) { + this.projectName = projectName; + } + + public List getSectionIds() { + return sectionIds; + } + + public void setSectionIds(List sectionIds) { + this.sectionIds = sectionIds; + } + + public String getExaminationMethodDict() { + return examinationMethodDict; + } + + public void setExaminationMethodDict(String examinationMethodDict) { + this.examinationMethodDict = examinationMethodDict; + } + + public String getQualFlowId() { + return qualFlowId; + } + + public void setQualFlowId(String qualFlowId) { + this.qualFlowId = qualFlowId; + } +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/ReviewConfigCategory.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/ReviewConfigCategory.java new file mode 100644 index 0000000..2089c61 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/ReviewConfigCategory.java @@ -0,0 +1,58 @@ +package com.chinaunicom.mall.ebtp.extend.export.bean; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.chinaunicom.mall.ebtp.common.base.entity.BaseEntity; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + *

+ * 评审配置-类别表 + *

+ * + * @author dino + * @since 2020-10-23 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@Accessors(chain = true) +@TableName(value = "biz_rsms_review_config_category",autoResultMap = true) +@ApiModel(value="ReviewConfigCategory对象", description="评审类别表") +public class ReviewConfigCategory extends BaseEntity implements Serializable { + + private static final Long serialVersionUID = 1L; + + @ApiModelProperty(value = "编号") + @TableId + @JsonSerialize(using = ToStringSerializer.class) + private String id; + + @ApiModelProperty(value = "评审配置表ID") + @JsonSerialize(using = ToStringSerializer.class) + private String configId; + + @ApiModelProperty(value = "类别名称") + private String name; + + @ApiModelProperty(value = "类别:0:报价;1:商务;2:技术;5:服务。初审项类别:0:形式评审;1:资格审查项;2:响应性评审;7:符合性审查") + private String category; + + @JsonInclude(value = JsonInclude.Include.NON_NULL) + @ApiModelProperty(value = "权重") + private BigDecimal weights; + + @JsonInclude(value = JsonInclude.Include.NON_NULL) + @ApiModelProperty(value = "总分数") + private BigDecimal totalScore; + +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/ReviewConfigCategoryDTO.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/ReviewConfigCategoryDTO.java new file mode 100644 index 0000000..de308e9 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/ReviewConfigCategoryDTO.java @@ -0,0 +1,36 @@ +package com.chinaunicom.mall.ebtp.extend.export.bean; + +import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.util.List; + + +/** + *

+ * 评审配置-类别表 + *

+ * + * @author dino + * @since 2020-10-23 + */ + +@Data +@EqualsAndHashCode(callSuper = true) +@Accessors(chain = true) +public class ReviewConfigCategoryDTO extends ReviewConfigCategory implements Serializable { + + private static final Long serialVersionUID = 1L; + + /** + * 详审项集合 + */ + @ApiModelProperty(value = "详审项集合") + @JsonInclude(value = JsonInclude.Include.NON_EMPTY) + private List detailList; + +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/ReviewConfigDetail.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/ReviewConfigDetail.java new file mode 100644 index 0000000..632c577 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/ReviewConfigDetail.java @@ -0,0 +1,127 @@ +package com.chinaunicom.mall.ebtp.extend.export.bean; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.chinaunicom.mall.ebtp.common.base.entity.BaseEntity; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + *

+ * 评分细则(初审和详审) + *

+ * + * @author dino + * @since 2020-11-06 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName(value = "biz_rsms_review_config_detail",autoResultMap = true) +@ApiModel(value="ReviewConfigDetail对象", description="评分细则(初审和详审)") +public class ReviewConfigDetail extends BaseEntity implements Serializable { + + private static final Long serialVersionUID = 1L; + + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "编号") + @TableId + private String id; + + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "类别表ID") + private String categoryId; + + @ApiModelProperty(value = "是否可偏离项:1是0否") + @TableField(value = "is_deviation") + @JsonInclude(value = JsonInclude.Include.NON_NULL) + private Integer deviationStatus; + + @ApiModelProperty(value = "审查标准") + @JsonInclude(value = JsonInclude.Include.NON_NULL) + private String rvwStandard; + + @ApiModelProperty(value = "评分项名称") + @JsonInclude(value = JsonInclude.Include.NON_NULL) + private String scoreItem; + + @ApiModelProperty(value = "权重") + @JsonInclude(value = JsonInclude.Include.NON_NULL) + private BigDecimal weights; + + @ApiModelProperty(value = "最低分") + @JsonInclude(value = JsonInclude.Include.NON_NULL) + private BigDecimal lowScore; + + @ApiModelProperty(value = "最高分") + @JsonInclude(value = JsonInclude.Include.NON_NULL) + private BigDecimal highScore; + + @ApiModelProperty(value = "评分方式") + @JsonInclude(value = JsonInclude.Include.NON_NULL) + private String scoreMethod; + + @ApiModelProperty(value = "一致性:1是0否") + @TableField(value = "is_consistency") + @JsonInclude(value = JsonInclude.Include.NON_NULL) + private Integer consistencyStatus; + + @ApiModelProperty(value = "有效报价") + @JsonInclude(value = JsonInclude.Include.NON_NULL) + private String effectiveType; + + @ApiModelProperty(value = "是否包含(最低价)") + @JsonInclude(value = JsonInclude.Include.NON_NULL) + private BigDecimal includeLowPrice; + + @ApiModelProperty(value = "是否包含类别(最低价):1是0否") + @TableField(value = "is_include_low") + @JsonInclude(value = JsonInclude.Include.NON_NULL) + private Integer includeLowStatus; + + @ApiModelProperty(value = "是否包含(最高价)") + @JsonInclude(value = JsonInclude.Include.NON_NULL) + private BigDecimal includeHighPrice; + + @ApiModelProperty(value = "是否包含类别(最高价):1是0否") + @TableField(value = "is_include_high") + @JsonInclude(value = JsonInclude.Include.NON_NULL) + private Integer includeHighStatus; + + @ApiModelProperty(value = "评标基准价") + @JsonInclude(value = JsonInclude.Include.NON_NULL) + private String baseType; + + @ApiModelProperty(value = "平均报价*乘数") + @JsonInclude(value = JsonInclude.Include.NON_NULL) + private BigDecimal avgPriceMultiplier; + + @ApiModelProperty(value = "报价分") + @JsonInclude(value = JsonInclude.Include.NON_NULL) + private String priceType; + + @ApiModelProperty(value = "报价分*乘数") + @JsonInclude(value = JsonInclude.Include.NON_NULL) + private BigDecimal priceMultiplier; + + @ApiModelProperty(value = "报价分*乘数2") + @JsonInclude(value = JsonInclude.Include.NON_NULL) + private BigDecimal priceMultiplierSecond; + + @ApiModelProperty(value = "最低分2") + @JsonInclude(value = JsonInclude.Include.NON_NULL) + private BigDecimal lowScoreSecond; + + + +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/ReviewConfigDetailDTO.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/ReviewConfigDetailDTO.java new file mode 100644 index 0000000..733bd8c --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/ReviewConfigDetailDTO.java @@ -0,0 +1,61 @@ +package com.chinaunicom.mall.ebtp.extend.export.bean; + +import com.chinaunicom.mall.ebtp.extend.export.vo.BidEvalDetailVO; +import com.chinaunicom.mall.ebtp.extend.export.vo.BidEvalEarlyJudgesSummaryVO; +import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.List; +import java.util.Map; + +/** + *

+ * 评审配置-评分细则 + *

+ * + * @author dino + * @since 2020-11-06 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@Accessors(chain = true) +public class ReviewConfigDetailDTO extends ReviewConfigDetail implements Serializable { + + private static final Long serialVersionUID = 1L; + + /** + * excel导入时用来分组使用 + */ + @JsonInclude(value = JsonInclude.Include.NON_NULL) + @ApiModelProperty(value = "类别") + private String category; + + @JsonInclude(value = JsonInclude.Include.NON_EMPTY) + @ApiModelProperty(value = "评分标准集合") + private List standardList; + + @JsonInclude(value = JsonInclude.Include.NON_EMPTY) + @ApiModelProperty(value = "应答文件ID集合") + @NotNull + private List documentIdList; + + @ApiModelProperty(value = "前端索引") + @JsonInclude(value = JsonInclude.Include.NON_NULL) + private Integer key; + + @ApiModelProperty(value = "打分") + private Map scoreMap; + + @ApiModelProperty(value = "初审专家汇总") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private Map earlyMap; + + @ApiModelProperty(value = "初审汇总表用") + private Map earlyExpertMap; + +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/ReviewConfigStandard.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/ReviewConfigStandard.java new file mode 100644 index 0000000..cd3e1ec --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/bean/ReviewConfigStandard.java @@ -0,0 +1,50 @@ +package com.chinaunicom.mall.ebtp.extend.export.bean; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.chinaunicom.mall.ebtp.common.base.entity.BaseEntity; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + *

+ * 详审项-评分标准 + *

+ * + * @author dino + * @since 2020-11-06 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName(value = "biz_rsms_review_config_standard",autoResultMap = true) +@ApiModel(value="ReviewConfigStandard对象", description="评分标准") +public class ReviewConfigStandard extends BaseEntity implements Serializable { + + private static final Long serialVersionUID = 1L; + + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "编号") + @TableId + private String id; + + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "详审项ID") + private String detailId; + + @ApiModelProperty(value = "评分因素") + private String standardName; + + @ApiModelProperty(value = "详细评分标准分数") + private BigDecimal standardDetailScore; + + +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/controller/ExportController.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/controller/ExportController.java new file mode 100644 index 0000000..5fc7db5 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/controller/ExportController.java @@ -0,0 +1,1064 @@ +package com.chinaunicom.mall.ebtp.extend.export.controller; + +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.math.BigDecimal; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.poi.ss.usermodel.BorderStyle; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.CellStyle; +import org.apache.poi.ss.usermodel.HorizontalAlignment; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Sheet; +import org.apache.poi.ss.usermodel.VerticalAlignment; +import org.apache.poi.ss.util.CellRangeAddress; +import org.apache.poi.xssf.streaming.SXSSFWorkbook; +import org.springframework.util.StringUtils; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.RestController; + +import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse; +import com.chinaunicom.mall.ebtp.extend.export.bean.BidEvalDetailDTO; +import com.chinaunicom.mall.ebtp.extend.export.bean.BidEvalInfoDTO; +import com.chinaunicom.mall.ebtp.extend.export.bean.ExportParame; +import com.chinaunicom.mall.ebtp.extend.export.bean.ProjectSectionVO; +import com.chinaunicom.mall.ebtp.extend.export.bean.ReviewConfigCategoryDTO; +import com.chinaunicom.mall.ebtp.extend.export.bean.ReviewConfigDetailDTO; +import com.chinaunicom.mall.ebtp.extend.export.services.ExportService; +import com.chinaunicom.mall.ebtp.extend.export.services.ExportServiceProject; +import com.chinaunicom.mall.ebtp.extend.export.vo.BidEvalDetailVO; +import com.chinaunicom.mall.ebtp.extend.export.vo.BidEvalEarlyJudgesSummaryVO; +import com.chinaunicom.mall.ebtp.extend.export.vo.JuryPrintVO; +import com.chinaunicom.mall.ebtp.extend.export.vo.MemberVO; +import com.chinaunicom.mall.ebtp.extend.export.vo.SupplierRegisterPriceScoreVO; +import com.chinaunicom.mall.ebtp.extend.export.vo.SupplierRegisterVO; +import com.deepoove.poi.XWPFTemplate; +import com.deepoove.poi.config.Configure; +import com.deepoove.poi.policy.HackLoopTableRenderPolicy; + +import io.swagger.annotations.Api; + + +@RestController +@Api(tags = "") +@RequestMapping("/api/biz-service-ebtp-extend/v1/export") +public class ExportController { + + @Resource + private ExportService exportService; + @Resource + private ExportServiceProject exportServiceProject; + + + + + + /** + * 1 + * 导出方法 + * 开标记录表 + */ + @RequestMapping(value = "/kbjl", method = RequestMethod.GET) + @ResponseBody + //TODO 暂未完成 + public void exportKbjlMessage(HttpServletRequest request, HttpServletResponse response) throws IOException { + + ArrayList> maps = new ArrayList<>(); + for (int i = 0; i < 4; i++) { + Map data = new HashMap<>(); + data.put("num", i); + data.put("tbr", "投标人" + i); + data.put("bj", "10" + i); + data.put("yy", "有争议" + i); + data.put("sign", "签字人" + i + ":2021年"); + maps.add(data); + } + + File file = new File("d:/开标记录表.docx"); + Map all = new HashMap() {{ + put("Record", maps); + put("time", "2020年1月11日"); + put("mc", "测试项目"); + put("yuan", "9999"); + }}; + + HackLoopTableRenderPolicy policy = new HackLoopTableRenderPolicy(); + Configure config = Configure.builder().bind("Record", policy).build(); + XWPFTemplate template = XWPFTemplate.compile(file, config).render(all); + + String fileName = new String("开标记录表.docx".getBytes("UTF-8"), "iso-8859-1"); + + OutputStream os = response.getOutputStream(); + response.setHeader("Content-disposition", "attachment; filename=" + fileName); + template.write(os); + } + + + /** + * 2 + * 导出方法 + * 评标委员会签字表 + */ + @RequestMapping(value = "/judges", method = RequestMethod.GET) + @ResponseBody + public void exportJudgesMessage(ExportParame parame,HttpServletRequest request, HttpServletResponse response) throws IOException { + + //项目和招标名称处理 + ProjectSectionVO projectSectionVO = new ProjectSectionVO(); + projectSectionVO.setId(parame.getSectionId()); + BaseResponse list = exportServiceProject.selectById(projectSectionVO); + + //专家人员数据 + BaseResponse> listBaseResponse=exportService.queryReportPrintByRoomId(parame.getAssessRoomId()); + ArrayList> maps = new ArrayList<>(); + for (int i = 0; i < listBaseResponse.getData().size(); i++) { + Map data = new HashMap<>(); + data.put("name", listBaseResponse.getData().get(i).getName()); + data.put("phone", listBaseResponse.getData().get(i).getMobile()); + maps.add(data); + } + + //获取模板 + File file = new File("d:/评标委员会签字表.docx"); + + //当前时间 + Date date = new Date(); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy 年 MM 月 dd 日 "); + + Map all = new HashMap() {{ + put("Judges", maps); + put("time", sdf.format(date)); + put("bh",list.getData().getBidSectCode()); + put("mc", list.getData().getProjectName()); + }}; + + HackLoopTableRenderPolicy policy = new HackLoopTableRenderPolicy(); + Configure config = Configure.builder().bind("Judges", policy).build(); + XWPFTemplate template = XWPFTemplate.compile(file, config).render(all); + + String fileName = new String("评标委员会签字表.docx".getBytes("UTF-8"), "iso-8859-1"); + + OutputStream os = response.getOutputStream(); + response.setHeader("Content-disposition", "attachment; filename=" + fileName); + template.write(os); + } + + + + /** + * 3 + * 导出方法 + * 评审专家签到表 + */ + @RequestMapping(value = "/pszj", method = RequestMethod.GET) + @ResponseBody + public void exportPszjMessage(ExportParame parame, HttpServletRequest request, HttpServletResponse response) throws IOException { + + + //项目和招标名称处理 + ProjectSectionVO projectSectionVO = new ProjectSectionVO(); + projectSectionVO.setId(parame.getSectionId()); + BaseResponse list = exportServiceProject.selectById(projectSectionVO); + + //专家人员数据 + BaseResponse> listBaseResponse=exportService.queryReportPrintByRoomId(parame.getAssessRoomId()); + + ArrayList> maps = new ArrayList<>(); + for (int i = 0; i < 4; i++) { + Map data = new HashMap<>(); + data.put("name", listBaseResponse.getData().get(i).getName()); + data.put("phone", listBaseResponse.getData().get(i).getMobile()); + data.put("idCard", listBaseResponse.getData().get(i).getCertificate()); + data.put("isTrue", listBaseResponse.getData().get(i).getAttitude()); + data.put("time", listBaseResponse.getData().get(i).getLoginTime()); + maps.add(data); + } + + File file = new File("d:/评审专家签到表.docx"); + Map all = new HashMap() {{ + put("table", maps); + }}; + + HackLoopTableRenderPolicy policy = new HackLoopTableRenderPolicy(); + Configure config = Configure.builder().bind("table", policy).build(); + XWPFTemplate template = XWPFTemplate.compile(file, config).render(all); + + String fileName = new String("评审专家签到表.docx".getBytes("UTF-8"), "iso-8859-1"); + + OutputStream os = response.getOutputStream(); + response.setHeader("Content-disposition", "attachment; filename=" + fileName); + template.write(os); + } + + + + /** + * 4 + * 导出方法 + * 评标报告 + */ + @RequestMapping(value = "/pbbg", method = RequestMethod.GET) + @ResponseBody + //todo 暂未完成 + public void exportAllMessage( ExportParame parame,HttpServletRequest request, HttpServletResponse response) throws IOException { + + //表一假数据 + List> list1 = new ArrayList<>(); + for (int i = 0; i < 3; i++) { + Map map = new HashMap<>(); + map.put("num", i); + map.put("name", "投标人" + i); + map.put("type", "已投标"); + list1.add(map); + } + + //表二假数据 + List> list2 = new ArrayList<>(); + for (int i = 0; i < 3; i++) { + Map map = new HashMap<>(); + map.put("time", "2021.3.4"); + map.put("nr", "好多内容"); + list2.add(map); + } + + //表三假数据 + List> list3 = new ArrayList<>(); + for (int i = 0; i < 4; i++) { + Map map = new HashMap<>(); + map.put("num", i); + map.put("work", "建设部" + i); + map.put("name", "刘某" + i); + map.put("unit", "全国各地" + i); + list3.add(map); + } + + //表四假数据 + List> list4 = new ArrayList<>(); + for (int i = 0; i < 4; i++) { + Map map = new HashMap<>(); + map.put("num", i); + map.put("tbr", "投标人" + i); + map.put("jg", "结果" + i); + list4.add(map); + } + + //表五假数据 + List> list5 = new ArrayList<>(); + for (int i = 0; i < 4; i++) { + Map map = new HashMap<>(); + map.put("num", i); + map.put("zg", "没资格"); + map.put("sm", "不合格理由"); + list5.add(map); + } + + + //表六假数据 + List> list6 = new ArrayList<>(); + for (int i = 0; i < 4; i++) { + Map map = new HashMap<>(); + map.put("num", i); + map.put("tbr", "投标人" + i); + map.put("js", "100" + i); + map.put("sw", "99" + i); + list6.add(map); + } + + //表七假数据 + List> list7 = new ArrayList<>(); + for (int i = 0; i < 3; i++) { + Map map = new HashMap<>(); + map.put("num", i); + map.put("tbr", "投标人" + i); + map.put("bj", "100" + i); + map.put("psjg", "101" + i); + map.put("jgdf", "102" + i); + list7.add(map); + } + + //表八假数据 + List> list8 = new ArrayList<>(); + for (int i = 0; i < 4; i++) { + Map map = new HashMap<>(); + map.put("num", i); + map.put("tbr", "投标人" + i); + map.put("swdf", "100" + i); + map.put("jsdf", "101" + i); + map.put("jgdf", "102" + i); + map.put("zhdf", "103" + i); + map.put("bj", "104" + i); + list8.add(map); + } + + + Map all = new HashMap() {{ + put("table1", list1); + put("table2", list2); + put("table3", list3); + put("table4", list4); + put("table5", list5); + put("table6", list6); + put("table7", list7); + put("table8", list8); + }}; + + + HackLoopTableRenderPolicy policy1 = new HackLoopTableRenderPolicy(); + HackLoopTableRenderPolicy policy2 = new HackLoopTableRenderPolicy(); + HackLoopTableRenderPolicy policy3 = new HackLoopTableRenderPolicy(); + HackLoopTableRenderPolicy policy4 = new HackLoopTableRenderPolicy(); + HackLoopTableRenderPolicy policy5 = new HackLoopTableRenderPolicy(); + HackLoopTableRenderPolicy policy6 = new HackLoopTableRenderPolicy(); + HackLoopTableRenderPolicy policy7 = new HackLoopTableRenderPolicy(); + HackLoopTableRenderPolicy policy8 = new HackLoopTableRenderPolicy(); + + Configure config = Configure.builder().bind("table1", policy1).bind("table2", policy2).bind("table3", policy3) + .bind("table4", policy4).bind("table5", policy5).bind("table6", policy6) + .bind("table7", policy7).bind("table8", policy8).build(); + + + File file = new File("d:/评标报告.docx"); + XWPFTemplate template = XWPFTemplate.compile(file, config).render(all); + + String fileName = new String("评标报告.docx".getBytes("UTF-8"), "iso-8859-1"); + OutputStream os = response.getOutputStream(); + response.setHeader("Content-disposition", "attachment; filename=" + fileName); + template.write(os); + + } + + + + /** + * 5 + * 导出方法 + * 评标专家承诺书 + */ + @RequestMapping(value = "/zjcn", method = RequestMethod.GET) + @ResponseBody + public void exportPbcnMessage(HttpServletRequest request, HttpServletResponse response) throws IOException { + + //文件模板从数据库或者项目位置取得 + File file = new File("d:/评标专家承诺书.docx"); + + XWPFTemplate template = XWPFTemplate.compile(file); + + String fileName = new String("评标专家承诺书.docx".getBytes("UTF-8"), "iso-8859-1"); + + OutputStream os = response.getOutputStream(); + response.setHeader("Content-disposition", "attachment; filename=" + fileName); + template.write(os); + } + + + /** + * 6 + * 导出方法 + * 打分汇总 + */ + @RequestMapping(value = "dfhz", method = RequestMethod.GET) + @ResponseBody + // TODO: 2021/1/26 暂时未完成 + public void exportDfMessage(ExportParame parame, HttpServletRequest request, HttpServletResponse response) throws IOException { + + File file = new File("d:/打分汇总表.docx"); + + + //表1和表2假数据 + List> list12 = new ArrayList<>(); + for (int i = 0; i < 3; i++) { + Map map = new HashMap<>(); + map.put("name", "投标人" + i); + map.put("num", i); + map.put("z1", 10); + map.put("z2", 15); + map.put("z3", 20); + map.put("avg", 15); + list12.add(map); + } + + //表3假数据 + List> list3 = new ArrayList<>(); + for (int i = 0; i < 4; i++) { + Map map = new HashMap<>(); + map.put("name", "投标人" + i); + map.put("num", i); + map.put("jg", i); + list3.add(map); + } + + //表4假数据 + List> list4 = new ArrayList<>(); + for (int i = 0; i < 3; i++) { + Map map = new HashMap<>(); + map.put("name", "投标人" + i); + map.put("num", i); + map.put("sw", i); + map.put("fw", i); + map.put("jg", i); + map.put("zh", i); + list4.add(map); + } + + Map all = new HashMap() {{ + put("table1", list12); + put("table2", list12); + put("table3", list3); + put("table4", list4); + + }}; + HackLoopTableRenderPolicy policy1 = new HackLoopTableRenderPolicy(); + HackLoopTableRenderPolicy policy2 = new HackLoopTableRenderPolicy(); + HackLoopTableRenderPolicy policy3 = new HackLoopTableRenderPolicy(); + HackLoopTableRenderPolicy policy4 = new HackLoopTableRenderPolicy(); + + Configure config = Configure.builder().bind("table1", policy1).bind("table2", policy2).bind("table3", policy3).bind("table4", policy4).build(); + XWPFTemplate template = XWPFTemplate.compile(file, config).render(all); + + + String fileName = new String("打分汇总表.docx".getBytes("UTF-8"), "iso-8859-1"); + OutputStream os = response.getOutputStream(); + response.setHeader("Content-disposition", "attachment; filename=" + fileName); + template.write(os); + } + + + /** + * 7 + * 导出方法 + * 价格打分 + */ + @RequestMapping(value = "/jgdf", method = RequestMethod.GET) + @ResponseBody + public void exportJgdfMessage(ExportParame parame, HttpServletRequest request, HttpServletResponse response) throws IOException { + + List titles = new LinkedList(); + titles.add("序号"); + titles.add("应答人名称"); + titles.add("投标报价(元)"); + titles.add("评审价格(元)"); + titles.add("最低报价(元)"); + titles.add("投标平均价(元)"); + titles.add("价格得分"); + + List keys = new LinkedList(); + keys.add("num"); + keys.add("ydName"); + keys.add("tbPrice"); + keys.add("psPrice"); + keys.add("lowPrice"); + keys.add("avgPrice"); + keys.add("jgScore"); + + //项目和招标名称处理 + ProjectSectionVO projectSectionVO = new ProjectSectionVO(); + projectSectionVO.setId(parame.getSectionId()); + BaseResponse list = exportServiceProject.selectById(projectSectionVO); + + //价格数据 + BidEvalDetailDTO bidEvalDetailDTO = new BidEvalDetailDTO(); + bidEvalDetailDTO.setReviewTurnId(parame.getReviewTurnId()); + bidEvalDetailDTO.setReviewType(parame.getReviewType()); + bidEvalDetailDTO.setAssessRoomId(parame.getAssessRoomId()); + + BaseResponse> listBaseResponse = exportService.findPriceScoreRecord(bidEvalDetailDTO); + //最小价格 + BigDecimal minPrice = listBaseResponse.getData().stream().map(SupplierRegisterPriceScoreVO::getBidContent).min((x1, x2) -> x1.compareTo(x2)).get(); + //平均价格 + BigDecimal avgPrice = listBaseResponse.getData().stream().map(SupplierRegisterPriceScoreVO::getBidContent).reduce(BigDecimal.ZERO, BigDecimal::add).divide(BigDecimal.valueOf(listBaseResponse.getData().size()), 2, BigDecimal.ROUND_HALF_UP); + + //组装价格数据 + ArrayList> maps = new ArrayList<>(); + for (int i = 0; i < listBaseResponse.getData().size(); i++) { + Map data = new HashMap<>(); + data.put("num", i + 1); + data.put("ydName", listBaseResponse.getData().get(i).getSupplierRegisterName()); + data.put("tbPrice", listBaseResponse.getData().get(i).getBidContent()); + data.put("psPrice", listBaseResponse.getData().get(i).getEvaluatingContent()); + if (i == 0) { + data.put("lowPrice", minPrice); + data.put("avgPrice", avgPrice); + } else { + data.put("lowPrice", ""); + data.put("avgPrice", ""); + } + data.put("jgScore", listBaseResponse.getData().get(i).getPriceScore()); + maps.add(data); + + } + + + + // 创建工作簿 + SXSSFWorkbook wb = new SXSSFWorkbook(); + //表格样式 + CellStyle cellStyle = wb.createCellStyle(); + //水平居中 + cellStyle.setAlignment(HorizontalAlignment.CENTER); + //垂直居中 + cellStyle.setVerticalAlignment(VerticalAlignment.CENTER); + //边框 + cellStyle.setBorderBottom(BorderStyle.THIN); //下边框 + cellStyle.setBorderLeft(BorderStyle.THIN);//左边框 + cellStyle.setBorderTop(BorderStyle.THIN);//上边框 + cellStyle.setBorderRight(BorderStyle.THIN);//右边框 + + // 创建表格, + Sheet sheet = wb.createSheet("价格打分"); + sheet.createFreezePane(1, 1); + + int rowIndex = 0; + int colIndex = 0; + + // 价格打分 + CellRangeAddress region = new CellRangeAddress(0, 0, 0, 6); + sheet.addMergedRegion(region); + Row title0 = sheet.createRow(rowIndex++); + Cell titleCell0 = title0.createCell(0); + title0.setHeightInPoints(35); + titleCell0.setCellValue("价格打分表"); + titleCell0.setCellStyle(cellStyle); + //项目名称 + CellRangeAddress region1 = new CellRangeAddress(1, 1, 0, 6); + sheet.addMergedRegion(region1); + Row title1 = sheet.createRow(rowIndex++); + Cell titleCell1 = title1.createCell(0); + titleCell1.setCellValue("项目名称 : " + list.getData().getProjectName()); + //招标编号 + CellRangeAddress region2 = new CellRangeAddress(2, 2, 0, 6); + sheet.addMergedRegion(region2); + Row title2 = sheet.createRow(rowIndex++); + Cell titleCell2 = title2.createCell(0); + titleCell2.setCellValue("招标编号 : " + list.getData().getBidSectName()); + + //标题行 + Row titleRow = sheet.createRow(rowIndex++); + // 设置高度为30 + titleRow.setHeightInPoints(30); + + for (String title : titles) { + sheet.setColumnWidth(colIndex, 17 * 256); + Cell titleCell = titleRow.createCell(colIndex++); + titleCell.setCellValue(title); + //设置样式 + titleCell.setCellStyle(cellStyle); + } + + + // 遍历结果数据 + for (Map item : maps) { + // 创建数据行 + Row activityRow = sheet.createRow(rowIndex++); + // 重置列索引 + colIndex = 0; + for (String key : keys) { + String value = item.get(key).toString(); + Cell valueCell = activityRow.createCell(colIndex++); + valueCell.setCellValue(value); + valueCell.setCellStyle(cellStyle);//设置样式 + } + + } + + + CellRangeAddress region3 = new CellRangeAddress(4, (4 + maps.size() - 1), 4, 4); + sheet.addMergedRegion(region3); + + CellRangeAddress region4 = new CellRangeAddress(4, (4 + maps.size() - 1), 5, 5); + sheet.addMergedRegion(region4); + + + //价格打分说明 + CellStyle cellStyle0 = wb.createCellStyle(); + //边框 + cellStyle0.setBorderBottom(BorderStyle.THIN); //下边框 + cellStyle0.setBorderLeft(BorderStyle.THIN);//左边框 + cellStyle0.setBorderTop(BorderStyle.THIN);//上边框 + cellStyle0.setBorderRight(BorderStyle.THIN);//右边框 + cellStyle0.setVerticalAlignment(VerticalAlignment.CENTER); + String description = "价格打分说明 :"; + CellRangeAddress region5 = new CellRangeAddress((4 + maps.size()), (4 + maps.size()), 0, 6); + sheet.addMergedRegion(region5); + Row titleLast2 = sheet.createRow(rowIndex++); + titleLast2.setHeightInPoints(40); + for (int i = 0; i < 7; i++) { + Cell valueCell = titleLast2.createCell(i); + if (i == 0) { + valueCell.setCellValue(description); + } else { + valueCell.setCellValue(""); + } + valueCell.setCellStyle(cellStyle0); + } + + + //签名行 + Row titleLast1 = sheet.createRow(rowIndex++); + Cell titleCellLast1 = titleLast1.createCell(0); + titleCellLast1.setCellValue("全体委员签字 :"); + CellRangeAddress region6 = new CellRangeAddress((4 + maps.size()+1), (4 + maps.size()+1), 0, 6); + sheet.addMergedRegion(region6); + //时间行 + CellStyle cellStyle1 = wb.createCellStyle(); + cellStyle1.setVerticalAlignment(VerticalAlignment.CENTER); + cellStyle1.setAlignment(HorizontalAlignment.RIGHT); + Row title6 = sheet.createRow(rowIndex++); + Cell titleCell6 = title6.createCell(0); + Date date = new Date(); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy 年 MM 月 dd 日 "); + titleCell6.setCellValue("日期: " + sdf.format(date)); + titleCell6.setCellStyle(cellStyle1); + CellRangeAddress region7 = new CellRangeAddress(rowIndex - 1, rowIndex - 1, 0, 6); + sheet.addMergedRegion(region7); + + String filename = "价格打分.xls"; + filename = filename.substring(0, filename.lastIndexOf('.')) + filename.substring(filename.lastIndexOf('.')); + response.reset(); + response.setContentType("application/octet-stream;charset=utf-8"); + response.setHeader("Content-Disposition", "attachment;filename=".concat(new String(filename.getBytes("UTF-8"), "ISO8859-1"))); + wb.write(response.getOutputStream()); + + + } + + + /** + * 8 + * 导出方法 + * 初步评审 + */ + @RequestMapping(value = "/cbps", method = RequestMethod.GET) + @ResponseBody + public void exportCbpsMessage(ExportParame parame, HttpServletRequest request, HttpServletResponse response) throws IOException { + + //查询项目名称 + ProjectSectionVO projectSectionVO = new ProjectSectionVO(); + projectSectionVO.setId(parame.getSectionId()); + BaseResponse list = exportServiceProject.selectById(projectSectionVO); + + + BidEvalInfoDTO bidEvalInfoDTO = new BidEvalInfoDTO(); + bidEvalInfoDTO.setAssessRoomId(parame.getAssessRoomId()); + bidEvalInfoDTO.setReviewTurnId(parame.getReviewTurnId()); + bidEvalInfoDTO.setReviewType(parame.getReviewType()); + //供应商 + List listBaseResponse = exportService.findRegisterAndUser(bidEvalInfoDTO).getData(); + + //列头 + StringBuffer titles0 = new StringBuffer("序号,评审因素,评审标准"); + + //供应商 顺序 + ArrayList strings = new ArrayList<>(); + for (int i = 0; i < listBaseResponse.size(); i++) { + strings.add(listBaseResponse.get(i).getSupplierRegisterId()); + titles0.append("," + listBaseResponse.get(i).getSupplierRegisterName()); + } + String titles = titles0.toString(); + //最右侧列值 + Integer index = (titles.split(",").length) - 1; + //自定义序号 + Integer num = 1; + + // 创建工作簿 + SXSSFWorkbook wb = new SXSSFWorkbook(); + //表格样式 + CellStyle cellStyle = wb.createCellStyle(); + //水平居中 + cellStyle.setAlignment(HorizontalAlignment.CENTER); + //垂直居中 + cellStyle.setVerticalAlignment(VerticalAlignment.CENTER); + //边框 + cellStyle.setBorderBottom(BorderStyle.THIN); //下边框 + cellStyle.setBorderLeft(BorderStyle.THIN);//左边框 + cellStyle.setBorderTop(BorderStyle.THIN);//上边框 + cellStyle.setBorderRight(BorderStyle.THIN);//右边框 + + + BidEvalDetailDTO bidEvalDetailDTO = new BidEvalDetailDTO(); + bidEvalDetailDTO.setReviewTurnId(parame.getReviewTurnId()); + bidEvalDetailDTO.setReviewType(parame.getReviewType()); + BaseResponse> scoreRecord = exportService.findScoreEarlySummary(bidEvalDetailDTO); + List dataList = scoreRecord.getData(); + + // 创建表格 + Sheet sheet = wb.createSheet("评审汇总"); + sheet.createFreezePane(1, 1); + int rowIndex = 0; + int colIndex = 0; + // 1行 + CellRangeAddress region1 = new CellRangeAddress(0, 0, 0, index); + sheet.addMergedRegion(region1); + Row title1 = sheet.createRow(rowIndex++); + Cell titleCell1 = title1.createCell(0); + title1.setHeightInPoints(35); + titleCell1.setCellValue("初步评审表"); + titleCell1.setCellStyle(cellStyle); + // 2行 + CellRangeAddress region2 = new CellRangeAddress(1, 1, 0, index); + sheet.addMergedRegion(region2); + Row title2 = sheet.createRow(rowIndex++); + Cell titleCell2 = title2.createCell(0); + titleCell2.setCellValue("项目名称 : " + list.getData().getProjectName()); + //3行 + CellRangeAddress region3 = new CellRangeAddress(2, 2, 0, index); + sheet.addMergedRegion(region3); + Row title3 = sheet.createRow(rowIndex++); + Cell titleCell3 = title3.createCell(0); + titleCell3.setCellValue("招标编号 : " + list.getData().getBidSectName()); + + //4行 列头 + Row titleRow5 = sheet.createRow(rowIndex++); + // 设置高度为30 + titleRow5.setHeightInPoints(30); + for (String title : titles.split(",")) { + sheet.setColumnWidth(colIndex, 17 * 256); + Cell titleCell = titleRow5.createCell(colIndex++); + titleCell.setCellValue(title); + //设置样式 + titleCell.setCellStyle(cellStyle); + } + + // 5行开始渲染 + for (ReviewConfigCategoryDTO object : dataList) { + List detailList = object.getDetailList(); + String name = object.getName(); + for (ReviewConfigDetailDTO reviewConfigDetailDTO : detailList) { + colIndex = 0; + Row titleRowN = sheet.createRow(rowIndex++); + Cell cell = titleRowN.createCell(colIndex++); + cell.setCellStyle(cellStyle); + //供应商结论是否合格 + Map scoreMap = reviewConfigDetailDTO.getEarlyMap(); + if (StringUtils.isEmpty(name)) { + cell.setCellValue("结论"); + + Cell cell1 = titleRowN.createCell(colIndex++); + cell1.setCellValue("是否通过初审检查"); + cell1.setCellStyle(cellStyle); + //占位列 + Cell cell2 = titleRowN.createCell(colIndex++); + cell2.setCellValue(""); + cell2.setCellStyle(cellStyle); + if (scoreMap != null) { + for (String string : strings) { + Boolean actualValue; + String all = null; + if (scoreMap.get(string) != null) { + actualValue = scoreMap.get(string).getJudgesResult(); + if (actualValue != null) { + if (actualValue) { + all = "合格"; + } else { + all = "不合格"; + } + } else { + all = "空"; + } + } + Cell cell4 = titleRowN.createCell(colIndex++); + cell4.setCellStyle(cellStyle); + cell4.setCellValue(all); + } + } else { + for (int j = 0; j < strings.size(); j++) { + Cell cell4 = titleRowN.createCell(colIndex++); + cell4.setCellStyle(cellStyle); + } + } + } else { + cell.setCellValue(num++); + //评审因素 + Cell cell1 = titleRowN.createCell(colIndex++); + cell1.setCellValue(reviewConfigDetailDTO.getScoreItem()); + cell1.setCellStyle(cellStyle); + //评审标准 + Cell cell2 = titleRowN.createCell(colIndex++); + cell2.setCellValue(reviewConfigDetailDTO.getRvwStandard()); + cell2.setCellStyle(cellStyle); + + if (scoreMap != null) { + for (String string : strings) { + Boolean actualValue; + String all = null; + String qua = null; + String unqua = null; + if (scoreMap.get(string) != null) { + actualValue = scoreMap.get(string).getJudgesResult(); + if (actualValue != null) { + qua = scoreMap.get(string).getQualified(); + unqua = scoreMap.get(string).getUnqualified(); + if (actualValue) { + all = "√(√" + qua + ",×" + unqua + ")"; + } else { + all = "×(√" + qua + ",×" + unqua + ")"; + } + } else { + all = "空"; + } + } + Cell cell4 = titleRowN.createCell(colIndex++); + cell4.setCellStyle(cellStyle); + cell4.setCellValue(all); + } + } else { + for (int j = 0; j < strings.size(); j++) { + Cell cell4 = titleRowN.createCell(colIndex++); + cell4.setCellStyle(cellStyle); + } + } + } + + } + + //合并结论 + if (StringUtils.isEmpty(name)) { + sheet.addMergedRegion(new CellRangeAddress(rowIndex - 1, rowIndex - 1, 1, 2)); + } + } + + //倒第2行 + Row title5 = sheet.createRow(rowIndex++); + Cell titleCell5 = title5.createCell(0); + titleCell5.setCellValue("全体评委签字:"); + CellRangeAddress region5 = new CellRangeAddress(rowIndex - 1, rowIndex - 1, 0, index); + sheet.addMergedRegion(region5); + + //最后一行 + CellStyle cellStyle1 = wb.createCellStyle(); + cellStyle1.setVerticalAlignment(VerticalAlignment.CENTER); + cellStyle1.setAlignment(HorizontalAlignment.RIGHT); + Row title6 = sheet.createRow(rowIndex++); + Cell titleCell6 = title6.createCell(0); + Date date = new Date(); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy 年 MM 月 dd 日 "); + titleCell6.setCellValue("日期: " + sdf.format(date)); + titleCell6.setCellStyle(cellStyle1); + CellRangeAddress region6 = new CellRangeAddress(rowIndex - 1, rowIndex - 1, 0, index); + sheet.addMergedRegion(region6); + + + String filename = "初步评审表.xls"; + filename = filename.substring(0, filename.lastIndexOf('.')) + filename.substring(filename.lastIndexOf('.')); + response.reset(); + response.setContentType("application/octet-stream;charset=utf-8"); + response.setHeader("Content-Disposition", "attachment;filename=".concat(new String(filename.getBytes("UTF-8"), "ISO8859-1"))); + wb.write(response.getOutputStream()); + } + + + /** + * 9 + * 导出 + * 专家个人打分表/评委打分表 + */ + @RequestMapping(value = "/zjgr", method = RequestMethod.GET) + @ResponseBody + public void exportZjgrExecl(ExportParame parame, HttpServletRequest request, HttpServletResponse response) throws IOException { + + //查询项目名称 + ProjectSectionVO projectSectionVO = new ProjectSectionVO(); + projectSectionVO.setId(parame.getSectionId()); + BaseResponse list = exportServiceProject.selectById(projectSectionVO); + + + BidEvalInfoDTO bidEvalInfoDTO = new BidEvalInfoDTO(); + bidEvalInfoDTO.setAssessRoomId(parame.getAssessRoomId()); + bidEvalInfoDTO.setReviewTurnId(parame.getReviewTurnId()); + bidEvalInfoDTO.setReviewType(parame.getReviewType()); + + //供应商 + List listBaseResponse = exportService.findRegisterAndUser(bidEvalInfoDTO).getData(); + //评委 + List members = listBaseResponse.stream().findFirst().get().getMembers(); + //列头 + StringBuffer titles0 = new StringBuffer("分类,项目名称,标准说明,分值"); + + //供应商 顺序 + ArrayList strings = new ArrayList<>(); + for (int i = 0; i < listBaseResponse.size(); i++) { + strings.add(listBaseResponse.get(i).getSupplierRegisterId()); + titles0.append("," + listBaseResponse.get(i).getSupplierRegisterName()); + } + String titles = titles0.toString(); + //最右侧列值 + Integer index = (titles.split(",").length) - 1; + + + // 创建工作簿 + SXSSFWorkbook wb = new SXSSFWorkbook(); + //表格样式 + CellStyle cellStyle = wb.createCellStyle(); + //水平居中 + cellStyle.setAlignment(HorizontalAlignment.CENTER); + //垂直居中 + cellStyle.setVerticalAlignment(VerticalAlignment.CENTER); + //边框 + cellStyle.setBorderBottom(BorderStyle.THIN); //下边框 + cellStyle.setBorderLeft(BorderStyle.THIN);//左边框 + cellStyle.setBorderTop(BorderStyle.THIN);//上边框 + cellStyle.setBorderRight(BorderStyle.THIN);//右边框 + //Sheet + for (int i = 0; i < members.size(); i++) { + BidEvalDetailDTO bidEvalDetailDTO = new BidEvalDetailDTO(); + + bidEvalDetailDTO.setReviewTurnId(parame.getReviewTurnId()); + bidEvalDetailDTO.setReviewType(parame.getReviewType()); + bidEvalDetailDTO.setCreateBy(members.get(i).getUserId()); + BaseResponse> scoreRecord = exportService.findScoreRecord(bidEvalDetailDTO); + List dataList = scoreRecord.getData(); + + // 创建表格 + Sheet sheet = wb.createSheet(members.get(i).getName()); + sheet.createFreezePane(1, 1); + int rowIndex = 0; + int colIndex = 0; + // 1行 + CellRangeAddress region1 = new CellRangeAddress(0, 0, 0, index); + sheet.addMergedRegion(region1); + Row title1 = sheet.createRow(rowIndex++); + Cell titleCell1 = title1.createCell(0); + title1.setHeightInPoints(35); + titleCell1.setCellValue(list.getData().getProjectName()); + titleCell1.setCellStyle(cellStyle); + // 2行 + CellRangeAddress region2 = new CellRangeAddress(1, 1, 0, index); + sheet.addMergedRegion(region2); + Row title2 = sheet.createRow(rowIndex++); + Cell titleCell2 = title2.createCell(0); + titleCell2.setCellValue("评委打分表"); + titleCell2.setCellStyle(cellStyle); + //3行 + CellRangeAddress region3 = new CellRangeAddress(2, 2, 0, index); + sheet.addMergedRegion(region3); + Row title3 = sheet.createRow(rowIndex++); + Cell titleCell3 = title3.createCell(0); + titleCell3.setCellValue("包名 :" + list.getData().getBidSectName()); + //4行 + CellRangeAddress region4 = new CellRangeAddress(3, 3, 0, index); + sheet.addMergedRegion(region4); + Row title4 = sheet.createRow(rowIndex++); + Cell titleCell4 = title4.createCell(0); + titleCell4.setCellValue("评标委员会成员:" + members.get(i).getName()); + //5行 列头 + Row titleRow5 = sheet.createRow(rowIndex++); + // 设置高度为30 + titleRow5.setHeightInPoints(30); + for (String title : titles.split(",")) { + sheet.setColumnWidth(colIndex, 17 * 256); + Cell titleCell = titleRow5.createCell(colIndex++); + titleCell.setCellValue(title); + //设置样式 + titleCell.setCellStyle(cellStyle); + } + + // 6行开始渲染 + for (ReviewConfigCategoryDTO object : dataList) { + List detailList = object.getDetailList(); + String name = object.getName(); + for (ReviewConfigDetailDTO reviewConfigDetailDTO : detailList) { + colIndex = 0; + Row titleRowN = sheet.createRow(rowIndex++); + Cell cell = titleRowN.createCell(colIndex++); + cell.setCellStyle(cellStyle); + if (StringUtils.isEmpty(name)) { + cell.setCellValue("得分总计:"); + } else { + cell.setCellValue(name); + } + //项目名称 + Cell cell1 = titleRowN.createCell(colIndex++); + cell1.setCellValue(reviewConfigDetailDTO.getScoreItem()); + cell1.setCellStyle(cellStyle); + //标准说明 + Cell cell2 = titleRowN.createCell(colIndex++); + cell2.setCellValue(reviewConfigDetailDTO.getRvwStandard()); + cell2.setCellStyle(cellStyle); + //分值 + BigDecimal highScore = reviewConfigDetailDTO.getHighScore(); + Cell cell3 = titleRowN.createCell(colIndex++); + cell3.setCellStyle(cellStyle); + if (highScore != null) { + cell3.setCellValue(highScore.toString()); + } else { + cell3.setCellValue(""); + } + + //供应商打分 + Map scoreMap = reviewConfigDetailDTO.getScoreMap(); + if (scoreMap != null) { + for (String string : strings) { + String actualValue = null; + if (scoreMap.get(string) != null) { + actualValue = scoreMap.get(string).getResultValue(); + } + Cell cell4 = titleRowN.createCell(colIndex++); + cell4.setCellStyle(cellStyle); + if (actualValue != null) { + cell4.setCellValue(actualValue); + } else { + cell4.setCellValue("0"); + } + } + } else { + for (int j = 0; j < strings.size(); j++) { + Cell cell4 = titleRowN.createCell(colIndex++); + cell4.setCellStyle(cellStyle); + } + } + } + + //合并得分总计单元格 + if (StringUtils.isEmpty(name)) { + sheet.addMergedRegion(new CellRangeAddress(rowIndex - 1, rowIndex - 1, 0, 3)); + } else { + if (rowIndex - detailList.size() < rowIndex - 1) { + sheet.addMergedRegion(new CellRangeAddress(rowIndex - detailList.size(), rowIndex - 1, 0, 0)); + } + } + + } + + //倒第2行 + Row title5 = sheet.createRow(rowIndex++); + Cell titleCell5 = title5.createCell(0); + titleCell5.setCellValue("评标委员会成员(" + members.get(i).getName() + ")签字:"); + CellRangeAddress region5 = new CellRangeAddress(rowIndex - 1, rowIndex - 1, 0, index); + sheet.addMergedRegion(region5); + //最后一行 + CellStyle cellStyle1 = wb.createCellStyle(); + cellStyle1.setVerticalAlignment(VerticalAlignment.CENTER); + cellStyle1.setAlignment(HorizontalAlignment.RIGHT); + Row title6 = sheet.createRow(rowIndex++); + Cell titleCell6 = title6.createCell(0); + Date date = new Date(); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy 年 MM 月 dd 日 "); + titleCell6.setCellValue("日期: " + sdf.format(date)); + titleCell6.setCellStyle(cellStyle1); + CellRangeAddress region6 = new CellRangeAddress(rowIndex - 1, rowIndex - 1, 0, index); + sheet.addMergedRegion(region6); + } + + String filename = "评标打分表.xls"; + filename = filename.substring(0, filename.lastIndexOf('.')) + filename.substring(filename.lastIndexOf('.')); + response.reset(); + response.setContentType("application/octet-stream;charset=utf-8"); + response.setHeader("Content-Disposition", "attachment;filename=".concat(new String(filename.getBytes("UTF-8"), "ISO8859-1"))); + wb.write(response.getOutputStream()); + + } + +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/model/价格打分.xls b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/model/价格打分.xls new file mode 100644 index 0000000..5c3dd83 Binary files /dev/null and b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/model/价格打分.xls differ diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/model/初步评审.xls b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/model/初步评审.xls new file mode 100644 index 0000000..042d8af Binary files /dev/null and b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/model/初步评审.xls differ diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/model/开标记录表.docx b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/model/开标记录表.docx new file mode 100644 index 0000000..c94be66 Binary files /dev/null and b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/model/开标记录表.docx differ diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/model/打分汇总表.docx b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/model/打分汇总表.docx new file mode 100644 index 0000000..28c3f07 Binary files /dev/null and b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/model/打分汇总表.docx differ diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/model/评委打分.xls b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/model/评委打分.xls new file mode 100644 index 0000000..005d078 Binary files /dev/null and b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/model/评委打分.xls differ diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/model/评审专家签到表.docx b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/model/评审专家签到表.docx new file mode 100644 index 0000000..e280c90 Binary files /dev/null and b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/model/评审专家签到表.docx differ diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/model/评标专家承诺书.docx b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/model/评标专家承诺书.docx new file mode 100644 index 0000000..53cb5dc Binary files /dev/null and b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/model/评标专家承诺书.docx differ diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/model/评标委员会签字表.docx b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/model/评标委员会签字表.docx new file mode 100644 index 0000000..90cb94b Binary files /dev/null and b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/model/评标委员会签字表.docx differ diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/model/评标报告.docx b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/model/评标报告.docx new file mode 100644 index 0000000..be5e25b Binary files /dev/null and b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/model/评标报告.docx differ diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/services/ExportService.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/services/ExportService.java new file mode 100644 index 0000000..760ac8c --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/services/ExportService.java @@ -0,0 +1,63 @@ +package com.chinaunicom.mall.ebtp.extend.export.services; + +import java.util.List; + +import com.chinaunicom.mall.ebtp.extend.export.bean.BidEvalInfoDTO; +import com.chinaunicom.mall.ebtp.extend.export.bean.ProjectSectionVO; +import com.chinaunicom.mall.ebtp.extend.export.bean.ReviewConfigCategoryDTO; +import com.chinaunicom.mall.ebtp.extend.export.vo.JuryPrintVO; +import com.chinaunicom.mall.ebtp.extend.export.vo.SupplierRegisterPriceScoreVO; +import com.chinaunicom.mall.ebtp.extend.export.vo.SupplierRegisterVO; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + +import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse; +import com.chinaunicom.mall.ebtp.common.constant.ServiceNameConstants; +import com.chinaunicom.mall.ebtp.extend.export.bean.BidEvalDetailDTO; + +/** + * 调用 RSMS_SERVICE + */ +@FeignClient(value = ServiceNameConstants.RSMS_SERVICE, fallback = ExportServiceFallback.class) +public interface ExportService { + /** + * 不同供应商的打分 + * @param bidEvalDetailDTO + * @return + */ + @PostMapping("/v1/bid/eval/record/findScoreRecord") + BaseResponse> findScoreRecord(@RequestBody BidEvalDetailDTO bidEvalDetailDTO); + + + /** + * 评委供应商 + * @param bidEvalInfoDTO + * @return + */ + @PostMapping("/v1/bid/archive/findRegister") + BaseResponse> findRegisterAndUser(BidEvalInfoDTO bidEvalInfoDTO); + + /** + * 初审汇总 + * @param bidEvalDetailDTO + * @return + */ + @PostMapping("/v1/bid/eval/summary/findScoreEarlySummary") + BaseResponse> findScoreEarlySummary(@RequestBody BidEvalDetailDTO bidEvalDetailDTO); + + + @PostMapping("/v1/bid/archive/findPriceScoreRecord") + BaseResponse> findPriceScoreRecord( @RequestBody BidEvalDetailDTO bidEvalDetailDTO); + + + @ApiOperation("报表打印-通过评审室Id查询评委会成员数据及签到数据") + @GetMapping("v1/jury/report/print/{roomId}") + + BaseResponse> queryReportPrintByRoomId(@ApiParam(value = "roomId", required = true) @PathVariable String roomId); + +} \ No newline at end of file diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/services/ExportServiceFallback.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/services/ExportServiceFallback.java new file mode 100644 index 0000000..de6eb20 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/services/ExportServiceFallback.java @@ -0,0 +1,46 @@ +package com.chinaunicom.mall.ebtp.extend.export.services; + +import java.util.List; + +import com.chinaunicom.mall.ebtp.extend.export.bean.BidEvalInfoDTO; +import com.chinaunicom.mall.ebtp.extend.export.bean.ProjectSectionVO; +import com.chinaunicom.mall.ebtp.extend.export.bean.ReviewConfigCategoryDTO; +import com.chinaunicom.mall.ebtp.extend.export.vo.JuryPrintVO; +import com.chinaunicom.mall.ebtp.extend.export.vo.SupplierRegisterPriceScoreVO; +import com.chinaunicom.mall.ebtp.extend.export.vo.SupplierRegisterVO; +import org.springframework.stereotype.Component; + +import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse; +import com.chinaunicom.mall.ebtp.extend.export.bean.BidEvalDetailDTO; +import com.chinaunicom.mall.ebtp.extend.export.vo.BidEvalDetailVO; + +@Component +public class ExportServiceFallback implements ExportService{ + + @Override + public BaseResponse> findScoreRecord(BidEvalDetailDTO bidEvalDetailDTO) { + return null; + } + + @Override + public BaseResponse> findRegisterAndUser(BidEvalInfoDTO bidEvalInfoDTO) { + return null; + } + + @Override + public BaseResponse> findScoreEarlySummary(BidEvalDetailDTO bidEvalDetailDTO) { + return null; + } + + @Override + public BaseResponse> findPriceScoreRecord(BidEvalDetailDTO bidEvalDetailDTO) { + return null; + } + + @Override + public BaseResponse> queryReportPrintByRoomId(String roomId) { + return null; + } + + +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/services/ExportServiceProject.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/services/ExportServiceProject.java new file mode 100644 index 0000000..8422ea7 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/services/ExportServiceProject.java @@ -0,0 +1,25 @@ +package com.chinaunicom.mall.ebtp.extend.export.services; + +import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse; +import com.chinaunicom.mall.ebtp.common.constant.ServiceNameConstants; +import com.chinaunicom.mall.ebtp.extend.export.bean.ProjectSectionVO; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + +/** + * 调用 PROJECT_SERVICE + */ +@FeignClient(value = ServiceNameConstants.PROJECT_SERVICE) +public interface ExportServiceProject { + + /** + * + * @param projectSection 项目标段查询 + * @return 返回结果 + */ + + @PostMapping("/v1/projectSection/selectById") + BaseResponse selectById(@RequestBody ProjectSectionVO projectSection); + +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/vo/BidEvalDetailConsistentVO.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/vo/BidEvalDetailConsistentVO.java new file mode 100644 index 0000000..50e6288 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/vo/BidEvalDetailConsistentVO.java @@ -0,0 +1,32 @@ +package com.chinaunicom.mall.ebtp.extend.export.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.util.Map; + +/** + * 一致性检查 + * + * @author dino + * @date 2020/12/23 10:11 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@ApiModel(value="BidEvalDetailConsistentVO对象", description="一致性检查VO对象") +public class BidEvalDetailConsistentVO implements Serializable { + + @ApiModelProperty(value = "校验项") + private String scoreItem; + + @ApiModelProperty(value = "供应商名称") + private String supplierRegisterName; + + @ApiModelProperty(value = "专家评分") + private Map scoreMap; +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/vo/BidEvalDetailJudgesSummaryVO.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/vo/BidEvalDetailJudgesSummaryVO.java new file mode 100644 index 0000000..ff1e5d8 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/vo/BidEvalDetailJudgesSummaryVO.java @@ -0,0 +1,42 @@ +package com.chinaunicom.mall.ebtp.extend.export.vo; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 详审专家汇总 + * + * @author dino + * @date 2020/12/9 15:18 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@ApiModel(value="BidEvalDetailJudgesSummaryVO对象", description="详审专家汇总VO对象") +public class BidEvalDetailJudgesSummaryVO implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "专家ID") + @JsonSerialize(using = ToStringSerializer.class) + private String createBy; + + @JsonInclude(value = JsonInclude.Include.NON_NULL) + @ApiModelProperty(value = "专家评分") + private BigDecimal score; + + @JsonInclude(value = JsonInclude.Include.NON_NULL) + @ApiModelProperty(value = "进度") + private String progress; + + +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/vo/BidEvalDetailSummaryVO.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/vo/BidEvalDetailSummaryVO.java new file mode 100644 index 0000000..637d40d --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/vo/BidEvalDetailSummaryVO.java @@ -0,0 +1,53 @@ +package com.chinaunicom.mall.ebtp.extend.export.vo; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.List; +import java.util.Map; + +/** + * 详审汇总 + * + * @author dino + * @date 2020/12/9 15:18 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@ApiModel(value="BidEvalDetailSummaryVO对象", description="详审汇总VO对象") +public class BidEvalDetailSummaryVO implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "报名表id(biz_bid_register)") + @JsonSerialize(using = ToStringSerializer.class) + private String supplierRegisterId; + + @ApiModelProperty(value = "供应商名称") + private String supplierRegisterName; + + @ApiModelProperty(value = "最终得分") + private BigDecimal finalScore; + + @ApiModelProperty(value = "报价分") + private BigDecimal priceScore; + + @ApiModelProperty(value = "专家评分") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + List scoreList; + + @ApiModelProperty(value = "详审专家汇总") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private Map scoreMap; + + +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/vo/BidEvalDetailVO.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/vo/BidEvalDetailVO.java new file mode 100644 index 0000000..2b7f54e --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/vo/BidEvalDetailVO.java @@ -0,0 +1,82 @@ +package com.chinaunicom.mall.ebtp.extend.export.vo; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 评标详细评审表 + * + * @author dino + * @date 2020/12/3 11:17 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@ApiModel(value="BidEvalDetailVO对象", description="评标详细评审表VO对象") +public class BidEvalDetailVO implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "编号") + @JsonSerialize(using = ToStringSerializer.class) + private String id; + + @ApiModelProperty(value = "报名表id(biz_bid_register)") + @JsonSerialize(using = ToStringSerializer.class) + private String supplierRegisterId; + + @ApiModelProperty(value = "评分细则表ID(biz_rsms_review_config_detail)") + @JsonSerialize(using = ToStringSerializer.class) + private String detailId; + + @ApiModelProperty(value = "详细评分标准ID(biz_rsms_bid_eval_standard)") + @JsonSerialize(using = ToStringSerializer.class) + @JsonInclude(value = JsonInclude.Include.NON_NULL) + private String standardId; + + @ApiModelProperty(value = "结果值:初审1:合格;2不合格。详审:合计") + private String resultValue; + + @ApiModelProperty(value = "评分详情") + @JsonInclude(value = JsonInclude.Include.NON_NULL) + private String detailValue; + + @ApiModelProperty(value = "备注") + private String remarks; + + @ApiModelProperty(value = "评分方式") + @JsonInclude(value = JsonInclude.Include.NON_NULL) + private String scoreMethod; + + @ApiModelProperty(value = "实际值") + private BigDecimal actualValue; + + @ApiModelProperty(value = "权重") + @JsonInclude(value = JsonInclude.Include.NON_NULL) + private BigDecimal weights; + + @ApiModelProperty(value = "是否可偏离项:1是0否") + @JsonInclude(value = JsonInclude.Include.NON_NULL) + private Integer deviationStatus; + + @ApiModelProperty(value = "一致性:1是0否") + @JsonInclude(value = JsonInclude.Include.NON_NULL) + private Integer consistencyStatus; + + @ApiModelProperty(value = "专家ID") + @JsonSerialize(using = ToStringSerializer.class) + private String createBy; + + @ApiModelProperty(value = "详审项类别:0:报价;1:商务;2:技术;4:工程报价 ;5:服务。初审项类别:0:形式评审;1:资格审查项;2:响应性评审;3:商务审查项;4: 技术审查项;5: 服务审查项;6: 其他审查项") + private String category; + +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/vo/BidEvalEarlyJudgesSummaryVO.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/vo/BidEvalEarlyJudgesSummaryVO.java new file mode 100644 index 0000000..67f9487 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/vo/BidEvalEarlyJudgesSummaryVO.java @@ -0,0 +1,46 @@ +package com.chinaunicom.mall.ebtp.extend.export.vo; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; + +/** + * 初审专家汇总 + * + * @author dino + * @date 2020/12/17 18:18 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@ApiModel(value="BidEvalEarlyJudgesSummaryVO对象", description="初审专家汇总VO对象") +public class BidEvalEarlyJudgesSummaryVO implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "报名表id(biz_bid_register)") + @JsonSerialize(using = ToStringSerializer.class) + private String supplierRegisterId; + + @ApiModelProperty(value = "是否可偏离项:1是0否") + @JsonInclude(value = JsonInclude.Include.NON_NULL) + private Integer deviationStatus; + + @ApiModelProperty(value = "合格") + private String qualified; + + @ApiModelProperty(value = "不合格") + private String unqualified; + + @ApiModelProperty(value = "结果是否合格:true合格false不合格") + private Boolean judgesResult; + + +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/vo/JuryPrintVO.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/vo/JuryPrintVO.java new file mode 100644 index 0000000..f25fb0e --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/vo/JuryPrintVO.java @@ -0,0 +1,87 @@ +package com.chinaunicom.mall.ebtp.extend.export.vo; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.chinaunicom.mall.ebtp.common.config.CustomLocalDateTimeTypeHandler; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * 实体类 BizRsmsJuryCategory + * + * @auto.generated + */ +@Data +public class JuryPrintVO { + + /** + * 编号 + */ + @ApiModelProperty(value = "编号") + private String id; + + /** + * 专家职责:1-专家成员、2-专家组长 + */ + @ApiModelProperty(value = "专家职责:1-专家成员、2-专家组长") + private String duty; + + /** + * 专家姓名 + */ + @ApiModelProperty(value = "专家姓名") + private String name; + + /** + * 状态:1-已保存/未签到、2-已签到、3-申请回避 + */ + @ApiModelProperty(value = "状态:1-已保存/未签到、2-已签到、3-申请回避") + private Integer status; + + /** + * 专家用户id + */ + @ApiModelProperty(value = "专家用户id") + private String userId; + + /** + * 手机号 + */ + @ApiModelProperty(value = "手机号") + private String mobile; + + /** + * 证件号码 + */ + @ApiModelProperty(value = "证件号码") + private String certificate; + + /** + * 工作单位 + */ + @ApiModelProperty(value = "工作单位") + private String workunit; + + /** + * 职称 + */ + @ApiModelProperty(value = "职称") + private String jobTitle; + + /** + * 登录时间 + */ + @ApiModelProperty(value = "登录时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @TableField(typeHandler = CustomLocalDateTimeTypeHandler.class) + private java.time.LocalDateTime loginTime; + + /** + * 1-确定;2-申请回避 + */ + @ApiModelProperty(value = "1-确定;2-申请回避") + private Integer attitude; +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/vo/MemberVO.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/vo/MemberVO.java new file mode 100644 index 0000000..5738b49 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/vo/MemberVO.java @@ -0,0 +1,33 @@ +package com.chinaunicom.mall.ebtp.extend.export.vo; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; + +/** + * 专家成员 + * + * @author dino + * @date 2020/12/12 13:15 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@ApiModel(value="MemberVO", description="专家成员VO") +public class MemberVO implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "评委ID") + @JsonSerialize(using = ToStringSerializer.class) + private String userId; + + @ApiModelProperty(value = "评委姓名") + private String name; +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/vo/ReviewResultDetailSummaryVO.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/vo/ReviewResultDetailSummaryVO.java new file mode 100644 index 0000000..9d0c93d --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/vo/ReviewResultDetailSummaryVO.java @@ -0,0 +1,55 @@ +package com.chinaunicom.mall.ebtp.extend.export.vo; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 评审结果汇总 + * + * @author dino + * @date 2020/12/19 13:27 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@ApiModel(value="ReviewResultDetailSummaryVO对象", description="详审汇总提交初始化VO对象") +public class ReviewResultDetailSummaryVO implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "报名表id(biz_bid_register)") + @JsonSerialize(using = ToStringSerializer.class) + private String supplierRegisterId; + + @ApiModelProperty(value = "供应商名称") + private String supplierRegisterName; + + @ApiModelProperty(value = "报价(元)") + private BigDecimal price; + + @ApiModelProperty(value = "评审价(元)") + private BigDecimal reviewPrice; + + @ApiModelProperty(value = "商务得分") + private BigDecimal businessScore; + + @ApiModelProperty(value = "技术得分") + private BigDecimal technologyScore; + + @ApiModelProperty(value = "服务得分") + private BigDecimal serviceScore; + + @ApiModelProperty(value = "报价分") + private BigDecimal priceScore; + + @ApiModelProperty(value = "最终得分") + private BigDecimal finalScore; +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/vo/SupplierRegisterPriceScoreVO.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/vo/SupplierRegisterPriceScoreVO.java new file mode 100644 index 0000000..6d9962a --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/vo/SupplierRegisterPriceScoreVO.java @@ -0,0 +1,134 @@ +package com.chinaunicom.mall.ebtp.extend.export.vo; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 供应商报价分 + * + * @author dino + * @date 2020/12/21 10:36 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@ApiModel(value="SupplierRegisterPriceScoreVO", description="供应商报价分VO") +public class SupplierRegisterPriceScoreVO implements Serializable { + + private static final Long serialVersionUID = 1L; + + @ApiModelProperty(value = "编号") + @JsonSerialize(using = ToStringSerializer.class) + private String id; + + @ApiModelProperty(value = "报名表id(biz_bid_register)") + @JsonSerialize(using = ToStringSerializer.class) + private String supplierRegisterId; + + @ApiModelProperty(value = "评分细则表ID(biz_rsms_review_config_detail)") + @JsonSerialize(using = ToStringSerializer.class) + private String detailId; + + @ApiModelProperty(value = "供应商名称") + private String supplierRegisterName; + + @ApiModelProperty(value = "主目录id") + @JsonSerialize(using = ToStringSerializer.class) + private String tdocId; + + @ApiModelProperty(value = "投标报价(元)") + private BigDecimal bidContent; + + @ApiModelProperty(value = "评审价格(元)") + private BigDecimal evaluatingContent; + + @ApiModelProperty(value = "价格得分") + private String priceScore; + + @ApiModelProperty(value = "最高分") + private BigDecimal highScore; + + public static Long getSerialVersionUID() { + return serialVersionUID; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getSupplierRegisterId() { + return supplierRegisterId; + } + + public void setSupplierRegisterId(String supplierRegisterId) { + this.supplierRegisterId = supplierRegisterId; + } + + public String getDetailId() { + return detailId; + } + + public void setDetailId(String detailId) { + this.detailId = detailId; + } + + public String getSupplierRegisterName() { + return supplierRegisterName; + } + + public void setSupplierRegisterName(String supplierRegisterName) { + this.supplierRegisterName = supplierRegisterName; + } + + public String getTdocId() { + return tdocId; + } + + public void setTdocId(String tdocId) { + this.tdocId = tdocId; + } + + public BigDecimal getBidContent() { + return bidContent; + } + + public void setBidContent(BigDecimal bidContent) { + this.bidContent = bidContent; + } + + public BigDecimal getEvaluatingContent() { + return evaluatingContent; + } + + public void setEvaluatingContent(BigDecimal evaluatingContent) { + this.evaluatingContent = evaluatingContent; + } + + public String getPriceScore() { + return priceScore; + } + + public void setPriceScore(String priceScore) { + this.priceScore = priceScore; + } + + public BigDecimal getHighScore() { + return highScore; + } + + public void setHighScore(BigDecimal highScore) { + this.highScore = highScore; + } +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/vo/SupplierRegisterVO.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/vo/SupplierRegisterVO.java new file mode 100644 index 0000000..0a561b8 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/vo/SupplierRegisterVO.java @@ -0,0 +1,40 @@ +package com.chinaunicom.mall.ebtp.extend.export.vo; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.util.List; + +/** + * 供应商对象 + * + * @author dino + * @date 2020/12/12 13:12 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@ApiModel(value="SupplierRegisterVO", description="供应商VO") +public class SupplierRegisterVO implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "报名表id(biz_bid_register)") + @JsonSerialize(using = ToStringSerializer.class) + private String supplierRegisterId; + + @ApiModelProperty(value = "供应商名称") + private String supplierRegisterName; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ApiModelProperty(value = "专家集合") + private List members; + +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/controller/TemplateWarehouseController.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/controller/TemplateWarehouseController.java new file mode 100644 index 0000000..766ca33 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/controller/TemplateWarehouseController.java @@ -0,0 +1,47 @@ +package com.chinaunicom.mall.ebtp.extend.templatewarehouse.controller; + +import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse; +import com.chinaunicom.mall.ebtp.extend.templatewarehouse.entity.BizBidTemplateWarehouse; +import com.chinaunicom.mall.ebtp.extend.templatewarehouse.sevice.BizBidTemplateWarehouseService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +@RestController +@Api(tags = "模板仓库") +@RequestMapping("/v1/template/warehouse") +public class TemplateWarehouseController { + @Resource + private BizBidTemplateWarehouseService templateWarehouseService; + + /** + * 通过模板类型查询模板数据 + * + * @param type + * + * @return + */ + @ApiOperation("通过模板类型查询模板数据") + @GetMapping("/{type}") + public BaseResponse getTemplateByType(@ApiParam(value = "模板类型", required = true) @PathVariable String type){ + BizBidTemplateWarehouse templateWarehouse = templateWarehouseService.getTemplateByType(type); + return BaseResponse.success(templateWarehouse); + } + + /** + * 新增模板仓库数据 + * + * @param templateWarehouse + * + * @return + */ + @ApiOperation("新增模板仓库数据") + @PostMapping("/insert") + public BaseResponse insertTemplate(@ApiParam(value = "模板仓库对象", required = true) @RequestBody BizBidTemplateWarehouse templateWarehouse){ + Boolean result = templateWarehouseService.insertTemplate(templateWarehouse); + return BaseResponse.success(result); + } +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/dao/BizBidTemplateWarehouseMapper.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/dao/BizBidTemplateWarehouseMapper.java new file mode 100644 index 0000000..24443ab --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/dao/BizBidTemplateWarehouseMapper.java @@ -0,0 +1,10 @@ +package com.chinaunicom.mall.ebtp.extend.templatewarehouse.dao; + + +import com.chinaunicom.mall.ebtp.common.base.dao.IBaseMapper; +import com.chinaunicom.mall.ebtp.extend.templatewarehouse.entity.BizBidTemplateWarehouse; + +public interface BizBidTemplateWarehouseMapper extends IBaseMapper { + + +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/dao/mapper/BizBidTemplateWarehouseMapper.xml b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/dao/mapper/BizBidTemplateWarehouseMapper.xml new file mode 100644 index 0000000..3ebd3e1 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/dao/mapper/BizBidTemplateWarehouseMapper.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + update biz_bid_template_warehouse + set + delete_flag="deleted" + where ID=#{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/entity/BizBidTemplateWarehouse.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/entity/BizBidTemplateWarehouse.java new file mode 100644 index 0000000..564dbf4 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/entity/BizBidTemplateWarehouse.java @@ -0,0 +1,52 @@ +package com.chinaunicom.mall.ebtp.extend.templatewarehouse.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.chinaunicom.mall.ebtp.common.base.entity.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.io.Serializable; + +/** + * 实体类 BizBidTemplateWarehouse + * + * @auto.generated + */ +@Data +@Accessors(chain = true) +@ApiModel +@TableName(value = "biz_bid_template_warehouse", autoResultMap = true) +public class BizBidTemplateWarehouse extends BaseEntity implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 模版仓库主键ID + */ + @ApiModelProperty(value = "模版仓库主键ID") + private String id; + + /** + * 文档中心-文档ID + */ + @ApiModelProperty(value = "文档中心-文档ID") + private String documentCenterId; + + /** + * 模板类型 + */ + @ApiModelProperty(value = "模板类型") + private String templateType; + + + + + + + + + + +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/sevice/BizBidTemplateWarehouseService.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/sevice/BizBidTemplateWarehouseService.java new file mode 100644 index 0000000..46db463 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/sevice/BizBidTemplateWarehouseService.java @@ -0,0 +1,23 @@ +package com.chinaunicom.mall.ebtp.extend.templatewarehouse.sevice; + + +import com.chinaunicom.mall.ebtp.common.base.service.IBaseService; +import com.chinaunicom.mall.ebtp.extend.templatewarehouse.entity.BizBidTemplateWarehouse; + +/** + * 对数据表 biz_bid_template_warehouse 操作的 service + * @author Auto create + * + */ +public interface BizBidTemplateWarehouseService extends IBaseService { + + /** + * 通过模板类型查询模板数据 + */ + BizBidTemplateWarehouse getTemplateByType(String type); + + /** + * 新增模板仓库数据 + */ + Boolean insertTemplate(BizBidTemplateWarehouse templateWarehouse); +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/sevice/impl/BizBidTemplateWarehouseServiceImpl.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/sevice/impl/BizBidTemplateWarehouseServiceImpl.java new file mode 100644 index 0000000..c5d9860 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/sevice/impl/BizBidTemplateWarehouseServiceImpl.java @@ -0,0 +1,33 @@ +package com.chinaunicom.mall.ebtp.extend.templatewarehouse.sevice.impl; + + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.chinaunicom.mall.ebtp.common.util.PropertyUtils; +import com.chinaunicom.mall.ebtp.extend.templatewarehouse.dao.BizBidTemplateWarehouseMapper; +import com.chinaunicom.mall.ebtp.extend.templatewarehouse.entity.BizBidTemplateWarehouse; +import com.chinaunicom.mall.ebtp.extend.templatewarehouse.sevice.BizBidTemplateWarehouseService; +import org.springframework.stereotype.Service; +import com.chinaunicom.mall.ebtp.common.base.service.impl.BaseServiceImpl; +/** + * 对数据表 biz_bid_template_warehouse 操作的 serviceImpl + * @author Auto create + * + */ +@Service +public class BizBidTemplateWarehouseServiceImpl extends BaseServiceImpl implements BizBidTemplateWarehouseService { + + + @Override + public BizBidTemplateWarehouse getTemplateByType(String type) { + QueryWrapper query = new QueryWrapper<>(new BizBidTemplateWarehouse().setTemplateType(type)); + BizBidTemplateWarehouse templateWarehouse = this.getOne(query); + return templateWarehouse; + } + + @Override + public Boolean insertTemplate(BizBidTemplateWarehouse templateWarehouse) { + String id = PropertyUtils.getSnowflakeId(); + templateWarehouse.setId(id); + return this.save(templateWarehouse); + } +} diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 7d976f2..d3643c2 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -141,18 +141,6 @@ mybatis-plus: # logic-delete-field: flag # 全局逻辑删除的实体字段名(since 3.3.0,配置后可以忽略不配置步骤2) @TableLogic logic-delete-value: deleted # 逻辑已删除值 logic-not-delete-value: normal # 逻辑未删除值 - -# --------------feign ------------ -feign: - httpclient: - enabled: false - okhttp: - enabled: true - client: - config: - default: - connect-timeout: 20000 - read-timeout: 20000 hystrix: command: @@ -167,6 +155,7 @@ hystrix: circuitBreaker: sleepWindowInMilliseconds: 20000 forceClosed: true + ribbon: ReadTimeout: 20000 #请求处理的超时时间 ConnectTimeout: 20000 #请求连接超时时间 @@ -187,8 +176,18 @@ mconfig: file-wjpt-storage-path: http://111.198.162.67:8081/enr/api/base/file/cgDownload/ #测试地址 #获取file地址 file: - address: http://125.32.114.204:8760/api/core-service-ebtp-updownload/v1/download/oid/ + address: http://10.242.31.158:8100/core-service-ebtp-updownload/v1/download/oid/ #提交审批相关字段 approve: wfSectionNo: 002 wfSectionName: 采购审批 + +# 用户暴露给 prometheus 的健康数据 +management: + endpoints: + web: + exposure: + include: "*" + cors: + allowed-origins: "*" + allowed-methods: "*" diff --git a/src/main/resources/application-test.yml b/src/main/resources/application-test.yml new file mode 100644 index 0000000..aac9a57 --- /dev/null +++ b/src/main/resources/application-test.yml @@ -0,0 +1,192 @@ +server: + port: 18018 + servlet: + context-path: / + +seata: + enabled: true + application-id: biz-service-ebtp-extend + tx-service-group: biz-service-ebtp-extend-group + enable-auto-data-source-proxy: true + use-jdk-proxy: false + service: + vgroup-mapping: + default: default + enable-degrade: false + disable-global-transaction: false + registry: + type: eureka + eureka: + weight: 1 + service-url: http://${eureka.instance.hostname}:8761/eureka/ + +spring: + aop: + auto: true #开启spring的aop配置 + proxy-target-class: true + application: + name: biz-service-ebtp-extend + + shardingsphere: + datasource: + # names: ds0,ds1 #主从库名称 开启主从时必须打开 + names: ds0 + ds0: + type: com.alibaba.druid.pool.DruidDataSource + driver-class-name: com.mysql.cj.jdbc.Driver + username: mall3-ebtp-dev + password: mall3-ebtp-dev + jdbc-url: jdbc:mysql://125.32.114.204:13306/ebtp_mall_extend?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true + url: jdbc:mysql://125.32.114.204:13306/ebtp_mall_extend?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true + filters: stat,wall,log4j + maxActive: 20 + initialSize: 1 + maxWait: 60000 + minIdle: 1 + timeBetweenEvictionRunsMillis: 60000 + minEvictableIdleTimeMillis: 300000 + validationQuery: select 'x' + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + poolPreparedStatements: true + maxOpenPreparedStatements: 20 + connection-properties: druid.stat.merggSql=ture;druid.stat.slowSqlMillis=5000 + props: + sql: + show: true + + jackson: + date-format: yyyy-MM-dd HH:mm:ss + time-zone: GMT+8 + serialization: + write-dates-as-timestamps: false + kafka: + bootstrap-servers: 127.0.0.1:9092 + producer: + # 写入失败时,重试次数。当leader节点失效,一个repli节点会替代成为leader节点,此时可能出现写入失败, + # 当retris为0时,produce不会重复。retirs重发,此时repli节点完全成为leader节点,不会产生消息丢失。 + retries: 0 + # 每次批量发送消息的数量,produce积累到一定数据,一次发送 + batch-size: 2 + # produce积累数据一次发送,缓存大小达到buffer.memory就发送数据 + buffer-memory: 33554432 + #procedure要求leader在考虑完成请求之前收到的确认数,用于控制发送记录在服务端的持久化,其值可以为如下: + #acks = 0 如果设置为零,则生产者将不会等待来自服务器的任何确认,该记录将立即添加到套接字缓冲区并视为已发送。在这种情况下,无法保证服务器已收到记录,并且重试配置将不会生效(因为客户端通常不会知道任何故障),为每条记录返回的偏移量始终设置为-1。 + #acks = 1 这意味着leader会将记录写入其本地日志,但无需等待所有副本服务器的完全确认即可做出回应,在这种情况下,如果leader在确认记录后立即失败,但在将数据复制到所有的副本服务器之前,则记录将会丢失。 + #acks = all 这意味着leader将等待完整的同步副本集以确认记录,这保证了只要至少一个同步副本服务器仍然存活,记录就不会丢失,这是最强有力的保证,这相当于acks = -1的设置。 + #可以设置的值为:all, -1, 0, 1 + acks: 1 + key-serializer: org.apache.kafka.common.serialization.StringSerializer + value-serializer: org.apache.kafka.common.serialization.StringSerializer + consumer: + group-id: user-group + auto-offset-reset: earliest + enable-auto-commit: true + auto-commit-interval: 100 + key-deserializer: org.apache.kafka.common.serialization.StringDeserializer + value-deserializer: org.apache.kafka.common.serialization.StringDeserializer + #=========redis基础配置========= + redis: + lettuce: + # jedis: + pool: + maxTotal: 50 + minIdle: 1 + maxWaitMillis: 5000 + maxIdle: 5 + testOnBorrow: true + testOnReturn: true + testWhileIdle: true + token: + database: 0 + host: 125.32.114.204 + port: 16379 + password: redis@CC1234 + timeout: 6000 + uuid: + database: 1 + host: 125.32.114.204 + port: 16379 + password: redis@CC1234 + timeout: 6000 + cache: + database: 2 + host: 125.32.114.204 + port: 16379 + password: redis@CC1234 + timeout: 6000 + +#=========eureka配置========= +eureka: + client: + service-url: + defaultZone: http://125.32.114.204:8761/eureka/ + # defaultZone: http://192.168.1.103:8761/eureka/ + instance: + prefer-ip-address: true + instance-id: 125.32.114.204:${server.port} + hostname: 125.32.114.204 + ip-address: 125.32.114.204 + +mybatis-plus: + configuration: + # 是否开启自动驼峰命名规则映射:从数据库列名到Java属性驼峰命名的类似映射 + map-underscore-to-camel-case: true + auto-mapping-behavior: full + # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用 + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + mapper-locations: classpath*:com/chinaunicom/mall/ebtp/**/mapper/*Mapper.xml + global-config: + # 逻辑删除配置 + db-config: + # logic-delete-field: flag # 全局逻辑删除的实体字段名(since 3.3.0,配置后可以忽略不配置步骤2) @TableLogic + logic-delete-value: deleted # 逻辑已删除值 + logic-not-delete-value: normal # 逻辑未删除值 +# --------------feign ------------ +feign: + hystrix: + enabled: true + httpclient: + enabled: false + okhttp: + enabled: true + client: + config: + default: + connect-timeout: 20000 + read-timeout: 20000 +hystrix: + command: + default: + execution: + isolation: + thread: + timeoutInMilliseconds: 200000 #熔断超时时间 + circuitBreaker: + sleepWindowInMilliseconds: 20000 + forceClosed: true +ribbon: + ReadTimeout: 20000 #请求处理的超时时间 + ConnectTimeout: 20000 #请求连接超时时间 + MaxAutoRetries: 0 #对当前实例的重试次数 + MaxAutoRetriesNextServer: 1 #切换实例的重试次数 1 +mconfig: + workerId: 1 + datacenterId: 1 + remote: + approval: true #是否需要提交公告审批 + media: true #是否需要发送到媒体 + + #中国联通电子商城外网接入平台 相关参数 + token: + userName: zbgg + password: eip_13579 + file-wjpt-storage-path: http://111.198.162.67:8081/enr/api/base/file/cgDownload/ #测试地址 + #获取file地址 + file: + address: http://125.32.114.204:8760/api/core-service-ebtp-updownload/v1/download/oid/ + #提交审批相关字段 + approve: + wfSectionNo: 002 + wfSectionName: 采购审批 \ No newline at end of file diff --git a/src/main/resources/file.conf b/src/main/resources/file.conf index d591bab..85c2035 100644 --- a/src/main/resources/file.conf +++ b/src/main/resources/file.conf @@ -28,11 +28,12 @@ transport { serialization = "seata" compressor = "none" } + service { #transaction service group mapping - vgroupMapping.biz-service-ebtp-expenses-fescar-service-group = "default" + vgroupMapping.biz-service-ebtp-extend-fescar-service-group = "default" #only support when registry.type=file, please don't set multiple addresses - default.grouplist = "127.0.0.1:8091" + default.grouplist = "10.242.31.158:18035" #degrade, current not support enableDegrade = false #disable seata diff --git a/src/main/resources/registry.conf b/src/main/resources/registry.conf index bd724ed..0a4eb4c 100644 --- a/src/main/resources/registry.conf +++ b/src/main/resources/registry.conf @@ -1,79 +1,15 @@ registry { - # file 、nacos 、eureka、redis、zk、consul、etcd3、sofa - type = "eureka" - - nacos { - application = "seata-server" - serverAddr = "localhost" - namespace = "" - username = "" - password = "" - } - eureka { - serviceUrl = "http://10.242.31.158:5001/eureka,http://10.242.31.158:5002/eureka,http://10.242.31.158:5003/eureka" - weight = "1" - } - redis { - serverAddr = "localhost:6379" - db = "0" - password = "" - timeout = "0" - } - zk { - serverAddr = "127.0.0.1:2181" - sessionTimeout = 6000 - connectTimeout = 2000 - username = "" - password = "" - } - consul { - serverAddr = "127.0.0.1:8500" - } - etcd3 { - serverAddr = "http://localhost:2379" - } - sofa { - serverAddr = "127.0.0.1:9603" - region = "DEFAULT_ZONE" - datacenter = "DefaultDataCenter" - group = "SEATA_GROUP" - addressWaitTime = "3000" - } + type = "file" + file { name = "file.conf" } } config { - # file、nacos 、apollo、zk、consul、etcd3、springCloudConfig type = "file" - - nacos { - serverAddr = "localhost" - namespace = "" - group = "SEATA_GROUP" - username = "" - password = "" - } - consul { - serverAddr = "127.0.0.1:8500" - } - apollo { - appId = "seata-server" - apolloMeta = "http://192.168.1.204:8801" - namespace = "application" - } - zk { - serverAddr = "127.0.0.1:2181" - sessionTimeout = 6000 - connectTimeout = 2000 - username = "" - password = "" - } - etcd3 { - serverAddr = "http://localhost:2379" - } + file { name = "file.conf" } -} +} \ No newline at end of file