夏文涛 1 jaar geleden
bovenliggende
commit
a26b5a3450
100 gewijzigde bestanden met toevoegingen van 4476 en 1099 verwijderingen
  1. 358 457
      .idea/workspace.xml
  2. 0 163
      share_video.iml
  3. 0 110
      share_videos.iml
  4. 28 0
      src/main/java/com/repair/api/RepairCallControllerAPI.java
  5. 1 1
      src/main/java/com/repair/api/RepairConsumablesControllerAPI.java
  6. 1 1
      src/main/java/com/repair/api/RepairConsumeControllerAPI.java
  7. 1 1
      src/main/java/com/repair/api/RepairEvaluateControllerAPI.java
  8. 5 0
      src/main/java/com/repair/api/RepairRecordControllerAPI.java
  9. 1 0
      src/main/java/com/repair/api/RepairUserControllerAPI.java
  10. 1 1
      src/main/java/com/repair/config/MyBatisPlusConfig.java
  11. 4 2
      src/main/java/com/repair/controller/LoginController.java
  12. 205 0
      src/main/java/com/repair/controller/RepairCallController.java
  13. 4 13
      src/main/java/com/repair/controller/RepairClassesSettingsController.java
  14. 11 4
      src/main/java/com/repair/controller/RepairConsumablesController.java
  15. 2 2
      src/main/java/com/repair/controller/RepairConsumeController.java
  16. 2 2
      src/main/java/com/repair/controller/RepairEvaluateController.java
  17. 1 1
      src/main/java/com/repair/controller/RepairLeaveMessageController.java
  18. 409 162
      src/main/java/com/repair/controller/RepairRecordController.java
  19. 14 13
      src/main/java/com/repair/controller/RepairUserController.java
  20. 1 1
      src/main/java/com/repair/mapper/RepairConsumablesMapper.java
  21. 1 1
      src/main/java/com/repair/mapper/RepairConsumeMapper.java
  22. 1 1
      src/main/java/com/repair/mapper/RepairEvaluateMapper.java
  23. 3 0
      src/main/java/com/repair/mapper/RepairRecordMapper.java
  24. 3 0
      src/main/java/com/repair/mapper/RepairUserMapper.java
  25. 2 2
      src/main/java/com/repair/model/enumModel/eRecordStatu.java
  26. 1 1
      src/main/java/com/repair/model/pojo/RepairRecord.java
  27. 4 0
      src/main/java/com/repair/model/pojo/RepairSystemSetting.java
  28. 17 0
      src/main/java/com/repair/model/request/batchCallRequest.java
  29. 2 2
      src/main/java/com/repair/model/request/insertRepairUserRequest.java
  30. 2 2
      src/main/java/com/repair/model/request/updateUserDataRequest.java
  31. 1 1
      src/main/java/com/repair/model/vo/AddressBookVo.java
  32. 11 0
      src/main/java/com/repair/model/vo/AutoDispatchUserVo.java
  33. 5 0
      src/main/java/com/repair/model/vo/DetailsVo.java
  34. 6 1
      src/main/java/com/repair/model/vo/MaintenanceTechnicianVo.java
  35. 3 3
      src/main/java/com/repair/model/vo/MaintenanceWorkerVo.java
  36. 1 1
      src/main/java/com/repair/model/vo/MasterHomepageVo.java
  37. 6 0
      src/main/java/com/repair/model/vo/ProsperityRepairPayRecordsVo.java
  38. 7 2
      src/main/java/com/repair/model/vo/RepairAnalysisVo.java
  39. 10 2
      src/main/java/com/repair/model/vo/RepairManageCountVo.java
  40. 4 0
      src/main/java/com/repair/model/vo/RepairRecordPageVo.java
  41. 6 1
      src/main/java/com/repair/model/vo/RepairSummarizingVo.java
  42. 3 1
      src/main/java/com/repair/model/vo/RepairTotalDataVo.java
  43. 2 2
      src/main/java/com/repair/model/vo/RepairUserVo.java
  44. 29 0
      src/main/java/com/repair/model/vo/ReportExportVo.java
  45. 6 1
      src/main/java/com/repair/model/vo/TeamWorkCountVo.java
  46. 1 1
      src/main/java/com/repair/model/vo/TrackDetailsVo.java
  47. 1 1
      src/main/java/com/repair/services/RepairConsumablesService.java
  48. 1 1
      src/main/java/com/repair/services/RepairConsumeService.java
  49. 1 1
      src/main/java/com/repair/services/RepairEvaluateService.java
  50. 7 0
      src/main/java/com/repair/services/RepairRecordService.java
  51. 3 0
      src/main/java/com/repair/services/RepairUserService.java
  52. 2 2
      src/main/java/com/repair/services/impl/RepairConsumablesServiceImpl.java
  53. 2 2
      src/main/java/com/repair/services/impl/RepairConsumeServiceImpl.java
  54. 2 2
      src/main/java/com/repair/services/impl/RepairEvaluateServiceImpl.java
  55. 26 0
      src/main/java/com/repair/services/impl/RepairRecordServiceImpl.java
  56. 2 1
      src/main/java/com/repair/services/impl/RepairShiftSettingsServiceImpl.java
  57. 28 5
      src/main/java/com/repair/services/impl/RepairUserServiceImpl.java
  58. 1 1
      src/main/resources/application-dev.yml
  59. 1 1
      src/main/resources/application.yml
  60. 1 1
      src/main/resources/mapper/repair/RepairClassesSettingsMapper.xml
  61. 3 0
      src/main/resources/mapper/repair/RepairConsumablesMapper.xml
  62. 3 0
      src/main/resources/mapper/repair/RepairConsumeMapper.xml
  63. 3 0
      src/main/resources/mapper/repair/RepairEvaluateMapper.xml
  64. 6 2
      src/main/resources/mapper/repair/RepairPayRecordMapper.xml
  65. 256 96
      src/main/resources/mapper/repair/RepairRecordMapper.xml
  66. 57 24
      src/main/resources/mapper/repair/RepairUserMapper.xml
  67. 97 0
      target/classes/META-INF/spring-configuration-metadata.json
  68. 80 0
      target/classes/application-dev.yml
  69. 79 0
      target/classes/application-prod.yml
  70. 76 0
      target/classes/application.yml
  71. BIN
      target/classes/excelFile/耗材管理模板.xlsx
  72. BIN
      target/classes/excelFile/自定义排班模板.xlsx
  73. 5 0
      target/classes/mapper/repair/RepairAdminMapper.xml
  74. 14 0
      target/classes/mapper/repair/RepairAreaMapper.xml
  75. 5 0
      target/classes/mapper/repair/RepairArticleBuildMapper.xml
  76. 36 0
      target/classes/mapper/repair/RepairArticleTypeMapper.xml
  77. 68 0
      target/classes/mapper/repair/RepairClassesSettingsMapper.xml
  78. 5 0
      target/classes/mapper/repair/RepairCloseMapper.xml
  79. 61 0
      target/classes/mapper/repair/RepairCollaborateRecordMapper.xml
  80. 85 0
      target/classes/mapper/repair/RepairConsumablesMapper.xml
  81. 94 0
      target/classes/mapper/repair/RepairConsumeMapper.xml
  82. 32 0
      target/classes/mapper/repair/RepairDispatchRecordMapper.xml
  83. 50 0
      target/classes/mapper/repair/RepairEvaluateMapper.xml
  84. 5 0
      target/classes/mapper/repair/RepairLeaveMessageMapper.xml
  85. 24 0
      target/classes/mapper/repair/RepairNoticeSettingMapper.xml
  86. 17 0
      target/classes/mapper/repair/RepairOfflineRecordMapper.xml
  87. 78 0
      target/classes/mapper/repair/RepairPayRecordMapper.xml
  88. 5 0
      target/classes/mapper/repair/RepairReceivingMapper.xml
  89. 1560 0
      target/classes/mapper/repair/RepairRecordMapper.xml
  90. 5 0
      target/classes/mapper/repair/RepairRefundRecordMapper.xml
  91. 5 0
      target/classes/mapper/repair/RepairSchoolMapper.xml
  92. 5 0
      target/classes/mapper/repair/RepairShiftSettingsMapper.xml
  93. 33 0
      target/classes/mapper/repair/RepairSystemMessagesMapper.xml
  94. 5 0
      target/classes/mapper/repair/RepairSystemSettingMapper.xml
  95. 25 0
      target/classes/mapper/repair/RepairTrackRecordMapper.xml
  96. 17 0
      target/classes/mapper/repair/RepairTransferRecordMapper.xml
  97. 295 0
      target/classes/mapper/repair/RepairUserMapper.xml
  98. 13 0
      target/classes/mapper/repair/RepairWorkTypeMapper.xml
  99. 5 0
      target/classes/mapper/repair/WxAccessTokenMapper.xml
  100. 0 0
      target/classes/sql/repair_report.sql

File diff suppressed because it is too large
+ 358 - 457
.idea/workspace.xml


+ 0 - 163
share_video.iml

@@ -1,163 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
-  <component name="FacetManager">
-    <facet type="Spring" name="Spring">
-      <configuration>
-        <fileset id="spring_boot_com.video.MybatisPlusApplication" profiles="dev" autodetected="true" />
-      </configuration>
-    </facet>
-    <facet type="web" name="Web">
-      <configuration>
-        <webroots />
-        <sourceRoots>
-          <root url="file://$MODULE_DIR$/src/main/java" />
-          <root url="file://$MODULE_DIR$/src/main/resources" />
-        </sourceRoots>
-      </configuration>
-    </facet>
-  </component>
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
-    <output url="file://$MODULE_DIR$/target/classes" />
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/target" />
-    </content>
-    <orderEntry type="inheritedJdk" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" name="Maven: com.alibaba:fastjson:2.0.12" level="project" />
-    <orderEntry type="library" name="Maven: com.alibaba.fastjson2:fastjson2-extension:2.0.12" level="project" />
-    <orderEntry type="library" name="Maven: com.alibaba.fastjson2:fastjson2:2.0.12" level="project" />
-    <orderEntry type="library" name="Maven: com.auth0:java-jwt:3.10.0" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.11.3" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.11.3" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.11.3" level="project" />
-    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.15" level="project" />
-    <orderEntry type="library" name="Maven: io.jsonwebtoken:jjwt:0.9.1" level="project" />
-    <orderEntry type="library" name="Maven: com.github.qcloudsms:qcloudsms:1.0.6" level="project" />
-    <orderEntry type="library" name="Maven: org.json:json:20170516" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.5.13" level="project" />
-    <orderEntry type="library" name="Maven: com.tencentcloudapi:tencentcloud-sdk-java:3.1.742" level="project" />
-    <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.2" level="project" />
-    <orderEntry type="library" name="Maven: com.squareup.okio:okio:2.10.0" level="project" />
-    <orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib:1.4.10" level="project" />
-    <orderEntry type="library" name="Maven: org.jetbrains:annotations:13.0" level="project" />
-    <orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-common:1.4.10" level="project" />
-    <orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:3.14.9" level="project" />
-    <orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
-    <orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
-    <orderEntry type="library" name="Maven: com.squareup.okhttp3:logging-interceptor:3.14.9" level="project" />
-    <orderEntry type="library" name="Maven: org.ini4j:ini4j:0.5.4" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.4.0" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.4.0" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.4.0" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.4.0" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.13.3" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.13.3" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
-    <orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
-    <orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.27" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.3.1" level="project" />
-    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.6" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.10" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.13" level="project" />
-    <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.7" level="project" />
-    <orderEntry type="library" name="Maven: mysql:mysql-connector-java:8.0.22" level="project" />
-    <orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.16" level="project" />
-    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-boot-starter:3.0.5" level="project" />
-    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus:3.0.5" level="project" />
-    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-extension:3.0.5" level="project" />
-    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-core:3.0.5" level="project" />
-    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-annotation:3.0.5" level="project" />
-    <orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:1.2" level="project" />
-    <orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.3.2" level="project" />
-    <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.6" level="project" />
-    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-generator:3.0.5" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.4.0" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.4.0" level="project" />
-    <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.4.5" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.3.1" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.4.0" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.4.0" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.11.3" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.11.3" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.11.3" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.4.0" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.39" level="project" />
-    <orderEntry type="library" name="Maven: org.glassfish:jakarta.el:3.0.3" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.39" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.3.1" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.3.1" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.3.1" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.4.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.4.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.4.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.3" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: jakarta.activation:jakarta.activation-api:1.2.2" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.18.1" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest:2.2" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.7.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.7.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.7.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.7.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.7.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.7.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:3.6.0" level="project" />
-    <orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.10.18" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.18" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:3.1" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-junit-jupiter:3.6.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.3.1" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.3.1" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.3.1" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.7.0" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-web:5.3.22" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.3.1" level="project" />
-    <orderEntry type="library" name="Maven: org.eclipse.jgit:org.eclipse.jgit:5.4.3.201909031940-r" level="project" />
-    <orderEntry type="library" name="Maven: com.jcraft:jsch:0.1.55" level="project" />
-    <orderEntry type="library" name="Maven: com.jcraft:jzlib:1.1.1" level="project" />
-    <orderEntry type="library" name="Maven: com.googlecode.javaewah:JavaEWAH:1.1.6" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
-    <orderEntry type="library" name="Maven: org.bouncycastle:bcpg-jdk15on:1.61" level="project" />
-    <orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.61" level="project" />
-    <orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.61" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-configuration-processor:2.4.0" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.4.0" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.4.1" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.4.1" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.4.1" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.3.1" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.3.1" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.3.1" level="project" />
-    <orderEntry type="library" name="Maven: redis.clients:jedis:3.3.0" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.9.0" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" />
-    <orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.20" level="project" />
-    <orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.20" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" />
-    <orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.2.0.Final" level="project" />
-    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.9.2" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.velocity:velocity-engine-core:2.0" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.11" level="project" />
-  </component>
-</module>

+ 0 - 110
share_videos.iml

@@ -1,110 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
-  <component name="FacetManager">
-    <facet type="Spring" name="Spring">
-      <configuration />
-    </facet>
-    <facet type="web" name="Web">
-      <configuration>
-        <webroots />
-        <sourceRoots>
-          <root url="file://$MODULE_DIR$/src/main/java" />
-          <root url="file://$MODULE_DIR$/src/main/resources" />
-        </sourceRoots>
-      </configuration>
-    </facet>
-  </component>
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
-    <output url="file://$MODULE_DIR$/target/classes" />
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/target" />
-    </content>
-    <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" name="Maven: mysql:mysql-connector-java:8.0.19" level="project" />
-    <orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
-    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-boot-starter:3.0.5" level="project" />
-    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus:3.0.5" level="project" />
-    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-extension:3.0.5" level="project" />
-    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-core:3.0.5" level="project" />
-    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-annotation:3.0.5" level="project" />
-    <orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:1.2" level="project" />
-    <orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.3.2" level="project" />
-    <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.6" level="project" />
-    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-generator:3.0.5" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.2.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.2.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.2.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.4.2" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.2.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.2.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-configuration-processor:2.2.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.2.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.2.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.2.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.12.1" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.12.1" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
-    <orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.25" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.2.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.10.2" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.10.2" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.10.2" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.2" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.10.2" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.10.2" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.2.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.31" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.31" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.31" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:2.2.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" />
-    <orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.18.Final" level="project" />
-    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.1.Final" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.2.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.2.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.4.RELEASE" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.2.5.RELEASE" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.2.5.RELEASE" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.2.5.RELEASE" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.2" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: jakarta.activation:jakarta.activation-api:1.2.2" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.5.2" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.5.2" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.5.2" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.5.2" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.5.2" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.5.2" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-junit-jupiter:3.1.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.13.2" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest:2.1" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:3.1.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy:1.10.8" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.8" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.2.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.4.RELEASE" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.2.4.RELEASE" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.6.3" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-web:5.3.22" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.4.RELEASE" level="project" />
-  </component>
-</module>

+ 28 - 0
src/main/java/com/repair/api/RepairCallControllerAPI.java

@@ -0,0 +1,28 @@
+package com.repair.api;
+
+import com.repair.model.request.batchCallRequest;
+import com.repair.model.request.insertRepairClassesRequest;
+import com.repair.model.result.CommonResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.validation.BindingResult;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.text.ParseException;
+
+@RequestMapping("/api/repairCall")
+@Api(tags = {"RepairCallController"}, value = "催缴管理")
+public interface RepairCallControllerAPI {
+
+    //单条催缴
+    @GetMapping(value = "/singleCall")
+    @ApiOperation(value = "单条催缴", notes = "单条催缴", httpMethod = "GET")
+    CommonResult singleCall(@RequestParam int id) ;
+
+    //批量催缴
+    @PostMapping(value = "/batchCall")
+    @ApiOperation(value = "批量催缴", notes = "批量催缴", httpMethod = "POST")
+    CommonResult batchCall(@RequestBody batchCallRequest bcr);
+
+}

+ 1 - 1
src/main/java/com/repair/api/RepairConsumablesControllerAPI.java

@@ -34,7 +34,7 @@ public interface RepairConsumablesControllerAPI {
 
     @GetMapping(value = "/queryRepairConsumablePageList")
     @ApiOperation(value = "耗材记录数据", notes = "耗材记录数据", httpMethod = "GET")
-    CommonResult queryRepairConsumablePageList(@RequestParam int currentPage, @RequestParam int pageCount, String keyWord,String startTime,String endTime);
+    CommonResult queryRepairConsumablePageList(@RequestParam int currentPage, @RequestParam int pageCount,String schoolId, String keyWord,String startTime,String endTime);
 
     @GetMapping(value = "/downloadRepairConsumableExcel")
     @ApiOperation(value = "导出耗材记录数据", notes = "导出耗材记录数据", httpMethod = "GET")

+ 1 - 1
src/main/java/com/repair/api/RepairConsumeControllerAPI.java

@@ -33,7 +33,7 @@ public interface RepairConsumeControllerAPI {
 
     @GetMapping(value = "/queryPageRepairConsume")
     @ApiOperation(value = "耗材管理分页数据", notes = "耗材管理分页数据", httpMethod = "GET")
-    CommonResult queryPageRepairConsumes(@RequestParam int currentPage, @RequestParam int pageCount, String name, String startTime, String endTime);
+    CommonResult queryPageRepairConsumes(@RequestParam int currentPage, @RequestParam int pageCount,String schoolId, String name, String startTime, String endTime);
 
     @GetMapping(value = "/deleteRepairConsumeById")
     @ApiOperation(value = "根据ID删除指定耗材管理", notes = "根据ID删除指定耗材管理", httpMethod = "GET")

+ 1 - 1
src/main/java/com/repair/api/RepairEvaluateControllerAPI.java

@@ -20,7 +20,7 @@ public interface RepairEvaluateControllerAPI {
 
     @GetMapping(value = "/queryPageRepairEvaluate")
     @ApiOperation(value = "评价分页数据", notes = "评价分页数据", httpMethod = "GET")
-    CommonResult queryPageRepairEvaluates(@RequestParam int currentPage, @RequestParam int pageCount, String keyWord, String startTime, String endTime);
+    CommonResult queryPageRepairEvaluates(@RequestParam int currentPage, @RequestParam int pageCount,String star, String keyWord, String startTime, String endTime);
 
     @GetMapping(value = "/deleteRepairEvaluateById")
     @ApiOperation(value = "根据ID删除指定评价", notes = "根据ID删除指定评价", httpMethod = "GET")

+ 5 - 0
src/main/java/com/repair/api/RepairRecordControllerAPI.java

@@ -12,6 +12,7 @@ import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.util.List;
 
 
 @RequestMapping("/api/repairRecord")
@@ -246,4 +247,8 @@ public interface RepairRecordControllerAPI {
     @ApiOperation(value = "获取打印数据", notes = "获取打印数据", httpMethod = "GET")
     CommonResult queryPrintData(@RequestParam int recordId,@RequestHeader("user_head") String userhead);
 
+    @GetMapping(value = "/closePCOrderBeath")
+    @ApiOperation(value = "管理端批量关单", notes = "管理端批量关单", httpMethod = "GET")
+    CommonResult closePCOrderBeath(@RequestParam String recordId, @RequestHeader("user_head") String userhead, @RequestParam String reason, @RequestParam String remark) throws Exception;
+
 }

+ 1 - 0
src/main/java/com/repair/api/RepairUserControllerAPI.java

@@ -42,6 +42,7 @@ public interface RepairUserControllerAPI {
     @ApiOperation(value = "获取线下的人员分页数据", notes = "获取线下的人员分页数据", httpMethod = "GET")
     CommonResult queryPageOfflineUsers(Integer currentPage, Integer pageCount, Integer recordId, String keyWord);
 
+
     @GetMapping(value = "/getAddressBook")
     @ApiOperation(value = "获取通讯录列表数据", notes = "获取通讯录列表数据", httpMethod = "GET")
     CommonResult getAddressBook(@RequestParam Integer schoolId,@RequestParam Integer userId, String keyWord);

+ 1 - 1
src/main/java/com/repair/config/MyBatisPlusConfig.java

@@ -44,7 +44,7 @@ public class MyBatisPlusConfig {
     @Profile({"dev","test","prod"})// 设置 dev test 环境开启,保证我们的效率
     public PerformanceInterceptor performanceInterceptor() {
         PerformanceInterceptor performanceInterceptor = new PerformanceInterceptor();
-        performanceInterceptor.setMaxTime(3000); //ms 设置sql执行的最大时间,如果超过了则不执行
+        performanceInterceptor.setMaxTime(30000); //ms 设置sql执行的最大时间,如果超过了则不执行
         performanceInterceptor.setFormat(true);
         return performanceInterceptor;
     }

+ 4 - 2
src/main/java/com/repair/controller/LoginController.java

@@ -121,15 +121,17 @@ public class LoginController implements LoginControllerAPI {
             return CommonResult.fail(st);
         }
 
+        System.out.println("123");
         RepairAdmin result = repairAdminService.getRepairByAccount(loginRequest.getAccount());
+        System.out.println("124");
         if (result == null) {
             return CommonResult.fail("账号或密码错误");
         }
-
+        System.out.println("1245");
         if (result.getStatu().equals(eStatu.Freeze.getValue())) {
             return CommonResult.fail("该账号已被冻结");
         }
-
+        System.out.println("12456");
         String encPassword = AesUtils.encrypt(loginRequest.getPassword());
         if (!encPassword.equals(result.getPassword())) {
             return CommonResult.fail("密码错误");

+ 205 - 0
src/main/java/com/repair/controller/RepairCallController.java

@@ -0,0 +1,205 @@
+package com.repair.controller;
+
+
+import com.repair.api.RepairCallControllerAPI;
+import com.repair.common.utils.TimeExchange;
+import com.repair.common.utils.WeiXiaoUtil;
+import com.repair.model.enumModel.eRecordStatu;
+import com.repair.model.pojo.RepairConsumables;
+import com.repair.model.pojo.RepairRecord;
+import com.repair.model.pojo.RepairSystemSetting;
+import com.repair.model.pojo.RepairUser;
+import com.repair.model.request.batchCallRequest;
+import com.repair.model.result.CommonResult;
+import com.repair.services.RepairConsumablesService;
+import com.repair.services.RepairRecordService;
+import com.repair.services.RepairSystemSettingService;
+import com.repair.services.RepairUserService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+import java.util.StringJoiner;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.stream.Collectors;
+
+/**
+ * <p>
+ * 前端控制器
+ * </p>
+ *
+ * @author ceshi
+ * @since 2023-11-02
+ */
+@RestController
+public class RepairCallController implements RepairCallControllerAPI {
+    @Autowired
+    private WeiXiaoUtil weiXiaoUtil;
+    @Autowired
+    private RepairUserService repairUserService;
+    @Autowired
+    private RepairRecordService repairRecordService;
+    @Autowired
+    private RepairSystemSettingService repairSystemSettingService;
+    @Autowired
+    private RepairConsumablesService repairConsumablesService;
+    private ExecutorService executor = Executors.newFixedThreadPool(10); // 创建一个固定大小的线程池
+    @Override
+    public CommonResult singleCall(int id) {
+        RepairRecord record = repairRecordService.getRepairById(id);
+        if (record == null) {
+            return CommonResult.fail("当前订单已失效,无法进行催缴操作");
+        }
+
+        StringJoiner consumablesStr = new StringJoiner(",");
+        List<RepairConsumables> rcs = repairConsumablesService.getRepairsByRecordId(id);
+        if (rcs == null) {
+            return CommonResult.fail("当前订单未使用耗材,无需进行催缴操作");
+        }
+        if (rcs.size() <= 0) {
+            return CommonResult.fail("当前订单未使用耗材,无需进行催缴操作");
+        }
+        for (RepairConsumables rc : rcs) {
+            if (rc.getTotalPrice().compareTo(BigDecimal.ZERO) > 0) {
+                consumablesStr.add(rc.getConsumeName());
+            }
+        }
+        if (consumablesStr.length() <= 0) {
+            return CommonResult.fail("当前订单未使用耗材,无需进行催缴操作");
+        }
+
+        //查询用户的微校卡号
+        RepairUser user = repairUserService.getRepairById(record.getUserId());
+        if (user == null) {
+            return CommonResult.fail("当前订单报修人已失效,无法进行催缴操作");
+        }
+
+        if (record.getMaintenanceState().intValue() != eRecordStatu.ToConfirmed.getValue()) {
+            return CommonResult.fail("无法对非‘待支付’状态订单进行催缴操作");
+        }
+
+        RepairSystemSetting rss = repairSystemSettingService.queryRepairSystemSetting();
+        if (rss == null) {
+            return CommonResult.fail("配置信息已失效,无法进行催缴操作");
+        }
+        if (!StringUtils.hasText(rss.getCollectionContent())) {
+            return CommonResult.fail("催缴内容未配置,无法进行催缴操作");
+        }
+
+        String content = rss.getCollectionContent().replace("【报修时间】", TimeExchange.DateToString(record.getReportTime())).
+                replace("【耗材】", consumablesStr.toString()).
+                replace("【工单编号】", record.getRecordNo());
+        List<String> cardNumbers = new ArrayList<>();
+        cardNumbers.add(user.getCardNumber());
+        CommonResult result = weiXiaoUtil.sendNotice(cardNumbers, "报修工单催缴", "催缴", content, null);
+        if (!result.getCode().equals("200")) {
+            return CommonResult.fail("催缴通知发送失败");
+        }
+        return CommonResult.ok("催缴成功");
+    }
+
+    @Override
+    public CommonResult batchCall(batchCallRequest bcr) {
+        int i = 1;
+        RepairSystemSetting rss = repairSystemSettingService.queryRepairSystemSetting();
+        if (rss == null) {
+            return CommonResult.fail("配置信息已失效,无法进行催缴操作");
+        }
+        if (!StringUtils.hasText(rss.getCollectionContent())) {
+            return CommonResult.fail("催缴内容未配置,无法进行催缴操作");
+        }
+
+        List<RepairRecord> rrs = new ArrayList<>();
+        if (bcr.getIds() != null && bcr.getIds().size() > 0) {
+            rrs = repairRecordService.queryRecords(bcr.getIds());
+        } else {
+            rrs = repairRecordService.queryRecords(eRecordStatu.ToConfirmed.getValue());
+        }
+
+        if (rrs == null) {
+            return CommonResult.fail("订单已失效,催缴失败");
+        }
+        List<Integer> userIds = rrs.stream().map(RepairRecord::getUserId).collect(Collectors.toList());
+        if (userIds == null) {
+            return CommonResult.fail("报修人员已失效,催缴失败");
+        }
+        if (userIds.size() <= 0) {
+            return CommonResult.fail("报修人员已失效,催缴失败");
+        }
+        List<RepairUser> users = repairUserService.getRepairs(userIds);
+        if (users == null) {
+            return CommonResult.fail("报修人员已失效,催缴失败");
+        }
+        if (users.size() <= 0) {
+            return CommonResult.fail("报修人员已失效,催缴失败");
+        }
+
+        List<RepairConsumables> rcs = repairConsumablesService.getRepairsByRecordIds(bcr.getIds());
+        if (rcs == null) {
+            return CommonResult.fail("订单未使用耗材,无需进行催缴操作");
+        }
+        if (rcs.size() <= 0) {
+            return CommonResult.fail("订单未使用耗材,无需进行催缴操作");
+        }
+
+        for (RepairRecord rr : rrs) {
+            StringJoiner consumablesStr = new StringJoiner(",");
+            List<RepairConsumables> rcos = rcs.stream().filter(e -> e.getRecordId().intValue() == rr.getId().intValue()).collect(Collectors.toList());
+            if (rcos == null) {
+                System.out.println("当前订单未使用耗材,无需进行催缴操作,record_no:" + rr.getRecordNo());
+                continue;
+            }
+            if (rcos.size() <= 0) {
+                System.out.println("当前订单未使用耗材,无需进行催缴操作,record_no:" + rr.getRecordNo());
+                continue;
+            }
+            for (RepairConsumables rc : rcos) {
+                if (rc.getTotalPrice().compareTo(BigDecimal.ZERO) > 0) {
+                    consumablesStr.add(rc.getConsumeName());
+                }
+            }
+            if (consumablesStr.length() <= 0) {
+                System.out.println("当前订单未使用耗材,无需进行催缴操作,record_no:" + rr.getRecordNo());
+                continue;
+            }
+            //查询用户的微校卡号
+            Optional<RepairUser> user = users.stream().filter(e -> e.getId().intValue() == rr.getUserId().intValue()).findFirst();
+            if (!(user != null && user.isPresent())) {
+                System.out.println("当前订单报修人已失效,无法进行催缴操作,record_no:" + rr.getRecordNo());
+                continue;
+            }
+
+            if (rr.getMaintenanceState().intValue() != eRecordStatu.ToConfirmed.getValue()) {
+                System.out.println("无法对非‘待支付’状态订单进行催缴操作,record_no:" + rr.getRecordNo());
+                continue;
+            }
+
+            i++;
+            String content = rss.getCollectionContent().replace("【报修时间】", TimeExchange.DateToString(rr.getReportTime())).
+                    replace("【耗材】", consumablesStr.toString()).
+                    replace("【工单编号】", rr.getRecordNo());
+            List<String> cardNumbers = new ArrayList<>();
+            cardNumbers.add(user.get().getCardNumber());
+            executor.submit(() -> {
+                // 这里执行异步操作,例如发送通知
+                System.out.println("Sending notification: ");
+                // 异步任务逻辑
+                CommonResult result = weiXiaoUtil.sendNotice(cardNumbers, "报修工单催缴", "催缴", content, null);
+                if (!result.getCode().equals("200")) {
+                    System.out.println("催缴通知发送失败,record_no:" + rr.getRecordNo());
+                }
+                System.out.println("Notification sent: ");
+            });
+        }
+
+        System.out.println("通知数量:" + i);
+        return CommonResult.ok("批量催缴成功");
+    }
+}
+

+ 4 - 13
src/main/java/com/repair/controller/RepairClassesSettingsController.java

@@ -1,7 +1,6 @@
 package com.repair.controller;
 
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
-import com.repair.annotation.PassToken;
 import com.repair.api.RepairClassesSettingsControllerAPI;
 import com.repair.common.utils.ExcelExportUtil;
 import com.repair.common.utils.ExcelUtils;
@@ -25,7 +24,6 @@ import org.apache.poi.hssf.usermodel.HSSFRow;
 import org.apache.poi.hssf.usermodel.HSSFSheet;
 import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.apache.poi.ss.usermodel.CellType;
-import org.apache.poi.ss.usermodel.DataFormatter;
 import org.apache.poi.xssf.usermodel.XSSFRow;
 import org.apache.poi.xssf.usermodel.XSSFSheet;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
@@ -476,7 +474,7 @@ public class RepairClassesSettingsController implements RepairClassesSettingsCon
         List<RepairClassesSettings> result = new ArrayList<>();
         //读取第一张sheet
         HSSFSheet sheetAt = sheets.getSheetAt(0);
-        DataFormatter dataFormatter = new DataFormatter();
+
         List<String> UserNames = new ArrayList<>();
         List<Integer> userZZs = new ArrayList<>();
         userZZs.add(1);
@@ -513,11 +511,9 @@ public class RepairClassesSettingsController implements RepairClassesSettingsCon
                         datas.add(stringCellValue);
                     }
                 } else if (rowNum >= 4) {
-                    String value = dataFormatter.formatCellValue(row.getCell(0));
-                    if (ObjectUtils.isEmpty(value)) {
+if(row.getCell(0)==null){
                         continue;
                     }
-
                     row.getCell(0).setCellType(CellType.STRING);
                     String UserName = row.getCell(0).getStringCellValue();
                     if(ObjectUtils.isEmpty(UserName)){
@@ -605,7 +601,7 @@ public class RepairClassesSettingsController implements RepairClassesSettingsCon
         List<RepairClassesSettings> result = new ArrayList<>();
         //读取第一张sheet
         XSSFSheet sheetAt = sheets.getSheetAt(0);
-        DataFormatter dataFormatter = new DataFormatter();
+
         List<String> UserNames = new ArrayList<>();
         List<Integer> userZZs = new ArrayList<>();
         userZZs.add(1);
@@ -615,7 +611,6 @@ public class RepairClassesSettingsController implements RepairClassesSettingsCon
         List<RepairClassesSettings> clssses = new ArrayList<>();
         //rowNum = 3 从第三行开始获取值
         //sheetAt.getLastRowNum():从0开始统计数量 所以得+1
-        int rowNums = sheetAt.getLastRowNum();
         for (int rowNum = 0; rowNum < sheetAt.getLastRowNum() + 1; rowNum++) {
 
             XSSFRow row = sheetAt.getRow(rowNum);
@@ -643,13 +638,9 @@ public class RepairClassesSettingsController implements RepairClassesSettingsCon
                         datas.add(stringCellValue);
                     }
                 } else if (rowNum >= 4) {
-                    String value = dataFormatter.formatCellValue(row.getCell(0));
-                    if (ObjectUtils.isEmpty(value)) {
+                    if(row.getCell(0)==null){
                         continue;
                     }
-
-                    row.getCell(0);
-
                     row.getCell(0).setCellType(CellType.STRING);
                     String UserName = row.getCell(0).getStringCellValue();
                     if(ObjectUtils.isEmpty(UserName)){

+ 11 - 4
src/main/java/com/repair/controller/RepairConsumablesController.java

@@ -142,7 +142,7 @@ public class RepairConsumablesController implements RepairConsumablesControllerA
      * @return
      */
     @Override
-    public CommonResult queryRepairConsumablePageList(int currentPage, int pageCount, String keyWord, String startTime, String endTime) {
+    public CommonResult queryRepairConsumablePageList(int currentPage, int pageCount,String schoolId, String keyWord, String startTime, String endTime) {
 
         if (startTime != null && endTime != null) {
             try {
@@ -152,7 +152,7 @@ public class RepairConsumablesController implements RepairConsumablesControllerA
             }
         }
 
-        PageUtils<ConsumablePageVo> result = repairConsumablesService.queryConsumablePageList(currentPage, pageCount, keyWord, startTime, endTime);
+        PageUtils<ConsumablePageVo> result = repairConsumablesService.queryConsumablePageList(currentPage, pageCount,schoolId, keyWord, startTime, endTime);
 
         for (ConsumablePageVo data : result.getList()) {
             //校区名称
@@ -169,7 +169,14 @@ public class RepairConsumablesController implements RepairConsumablesControllerA
         }
         if (StringUtils.hasText(keyWord)) {
             String str ="record_id  in (select id from   repair_record rr where  rr.deleted = 0 and rr.record_no like '%" + keyWord + "%')";
-            ew.and(w -> w.like("consume_name", keyWord).or().apply(str));
+            if(StringUtils.hasText(schoolId)&&StringUtils.hasText(schoolId)){
+                str="record_id  in (select id from   repair_record rr where  rr.deleted = 0 and rr.school_id = "+schoolId+" and rr.record_no like '%" + keyWord + "%')";
+            }
+            String finalStr = str;
+            ew.and(w -> w.like("consume_name", keyWord).or().apply(finalStr));
+        }else if(StringUtils.hasText(schoolId)&&StringUtils.hasText(schoolId)){
+            String str2="record_id  in (select id from   repair_record rr where  rr.deleted = 0  and rr.school_id = "+schoolId+")";
+            ew.apply(str2);
         }
         ew.select("IFNULL(sum(number),0) tcont,IFNULL(sum(total_price),0) tprice");
         Map<String,Object> map=repairConsumablesService.getMap(ew);
@@ -336,7 +343,7 @@ public class RepairConsumablesController implements RepairConsumablesControllerA
             RepairTrackRecord rtr = new RepairTrackRecord();
             rtr.setRecordId(data.getRecordId());
             rtr.setMaintenanceState(eRecordStatu.ToConfirmed.getValue());
-            rtr.setContent("待确认");
+            rtr.setContent("待支付");
             rtr.setUserId(senderId);
             rtr.setUserZzstr("维修师傅");
             int insertRtr = repairTrackRecordService.insertRepairTrackRecord(rtr);

+ 2 - 2
src/main/java/com/repair/controller/RepairConsumeController.java

@@ -158,7 +158,7 @@ public class RepairConsumeController implements RepairConsumeControllerAPI {
      * @return
      */
     @Override
-    public CommonResult queryPageRepairConsumes(int currentPage, int pageCount, String name, String startTime, String endTime) {
+    public CommonResult queryPageRepairConsumes(int currentPage, int pageCount, String schoolId,String name, String startTime, String endTime) {
 
         if (startTime != null && endTime != null) {
             try {
@@ -168,7 +168,7 @@ public class RepairConsumeController implements RepairConsumeControllerAPI {
             }
         }
 
-        PageUtils<RepairConsumeVo> result = repairConsumeService.queryPageRepairConsumes(currentPage, pageCount, name, startTime, endTime);
+        PageUtils<RepairConsumeVo> result = repairConsumeService.queryPageRepairConsumes(currentPage, pageCount,schoolId, name, startTime, endTime);
 
         for (RepairConsumeVo r : result.getList()) {
             if (r.getArticleId() != null) {

+ 2 - 2
src/main/java/com/repair/controller/RepairEvaluateController.java

@@ -145,8 +145,8 @@ public class RepairEvaluateController implements RepairEvaluateControllerAPI {
      * @return
      */
     @Override
-    public CommonResult queryPageRepairEvaluates(@RequestParam int currentPage, @RequestParam int pageCount, String keyWord, String startTime, String endTime) {
-        PageUtils<RepairEvaluate> result = repairEvaluateService.queryPageList(currentPage, pageCount, keyWord, startTime, endTime);
+    public CommonResult queryPageRepairEvaluates(@RequestParam int currentPage, @RequestParam int pageCount,String star, String keyWord, String startTime, String endTime) {
+        PageUtils<RepairEvaluate> result = repairEvaluateService.queryPageList(currentPage, pageCount,star, keyWord, startTime, endTime);
 
         return CommonResult.ok(result);
     }

+ 1 - 1
src/main/java/com/repair/controller/RepairLeaveMessageController.java

@@ -114,7 +114,7 @@ public class RepairLeaveMessageController implements RepairLeaveMessageControlle
         }
 
         if (rr.getMaintenanceState() != eRecordStatu.ToConfirmed.getValue()) {
-            return CommonResult.fail("待确认的报修单才能进行转后勤操作");
+            return CommonResult.fail("待支付的报修单才能进行转后勤操作");
         }
 
         /**

File diff suppressed because it is too large
+ 409 - 162
src/main/java/com/repair/controller/RepairRecordController.java


+ 14 - 13
src/main/java/com/repair/controller/RepairUserController.java

@@ -20,7 +20,6 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.validation.BindingResult;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.lang.reflect.Array;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -159,8 +158,8 @@ public class RepairUserController implements RepairUserControllerAPI {
             if (irur.getUserZzid().intValue() != eUserZZ.Offline.getValue()) {
                 ru.setCardNumber(irur.getCardNumber());
                 ru.setUserPhone(irur.getUserPhone());
-                ru.setAcceptanceAssessTime(irur.getAcceptanceAssessTime());
-                ru.setMaintenanceAssessTime(irur.getMaintenanceAssessTime());
+//                ru.setAcceptanceAssessTime(irur.getAcceptanceAssessTime());//待取消--创建添加中的接单
+//                ru.setMaintenanceAssessTime(irur.getMaintenanceAssessTime());//待取消--创建添加中的考核
             }
 
             int result = 0;
@@ -220,8 +219,8 @@ public class RepairUserController implements RepairUserControllerAPI {
         data.setWorkType(ra.getWorkType());
         data.setTeamId(ra.getTeamId());
         data.setIsChange(ra.getIsChange());
-        data.setAcceptanceAssessTime(ra.getAcceptanceAssessTime());
-        data.setMaintenanceAssessTime(ra.getMaintenanceAssessTime());
+//        data.setAcceptanceAssessTime(ra.getAcceptanceAssessTime());//待取消--不参与设计
+//        data.setMaintenanceAssessTime(ra.getMaintenanceAssessTime());//待取消--不参与设计
 
         try {
             if (ra.getArticleBuilds() != null && ra.getArticleBuilds().size() > 0) {
@@ -376,12 +375,13 @@ public class RepairUserController implements RepairUserControllerAPI {
         //判断是否存在待接单或维修中数据:
         //接单表中是否存在当前用户ID的数据条数
         //维修表中是否存在当前用户ID的数据条数
-        DisReceCountVo disCount = repairDispatchRecordService.queryDisReceCount(Integer.valueOf(id));
-        if (disCount != null) {
-            if (disCount.getDisCount() > 0 || disCount.getRecCount() > 0) {
-                return CommonResult.fail("存在待处理工单,无法删除");
-            }
-        }
+        //2024年9月24日取消删除限制
+//        DisReceCountVo disCount = repairDispatchRecordService.queryDisReceCount(Integer.valueOf(id));
+//        if (disCount != null) {
+//            if (disCount.getDisCount() > 0 || disCount.getRecCount() > 0) {
+//                return CommonResult.fail("存在待处理工单,无法删除");
+//            }
+//        }
 
         try {
             //删除维修关联楼栋数据
@@ -435,6 +435,7 @@ public class RepairUserController implements RepairUserControllerAPI {
 
         String dateNow = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
         PageUtils<AutoDispatchUserVo> users = repairUserService.autoDispatchUser(currentPage, pageCount, rr.getSchoolId(), dateNow, rr.getArticleId(), rr.getBuildId(), keyWord);
+//        PageUtils<AutoOfflineUserVo> users = repairUserService.autoOfflineRepairUser(currentPage, pageCount, rr.getSchoolId(), keyWord);
 
         return CommonResult.ok(users);
     }
@@ -512,8 +513,8 @@ public class RepairUserController implements RepairUserControllerAPI {
         data.setUserPhone(uabp.getPhone());
         data.setState(uabp.getState());
         data.setWorkType(uabp.getWorkType());
-        data.setAcceptanceAssessTime(uabp.getAcceptanceTime());
-        data.setMaintenanceAssessTime(uabp.getMaintenanceTime());
+        //data.setAcceptanceAssessTime(uabp.getAcceptanceTime());
+        //data.setMaintenanceAssessTime(uabp.getMaintenanceTime());
         int result = repairUserService.updateRepairUser(data);
 
         return result <= 0 ? CommonResult.fail("更新失败") : CommonResult.ok("更新成功");

+ 1 - 1
src/main/java/com/repair/mapper/RepairConsumablesMapper.java

@@ -21,7 +21,7 @@ import java.util.List;
  */
 @Repository
 public interface RepairConsumablesMapper extends BaseMapper<RepairConsumables> {
-    IPage<ConsumablePageVo> queryConsumablePageList(IPage<ConsumablePageVo> page, @Param("keyWord") String keyWord, @Param("startTime") String startTime, @Param("endTime") String endTime);
+    IPage<ConsumablePageVo> queryConsumablePageList(IPage<ConsumablePageVo> page, @Param("keyWord") String keyWord,@Param("schoolId") String schoolId, @Param("startTime") String startTime, @Param("endTime") String endTime);
 
     List<ConsumableExcelVo> queryConsumableExcelList(@Param("keyWord") String keyWord, @Param("startTime") String startTime, @Param("endTime") String endTime);
 

+ 1 - 1
src/main/java/com/repair/mapper/RepairConsumeMapper.java

@@ -23,7 +23,7 @@ import java.util.List;
 public interface RepairConsumeMapper extends BaseMapper<RepairConsume> {
     List<ConsumeVo> queryConsumeList(@Param("name") String name, @Param("startTime") String startTime, @Param("endTime") String endTime);
 
-    IPage<RepairConsumeVo> queryConsumePageList(IPage<RepairConsumeVo> page, @Param("name") String name, @Param("startTime") String startTime, @Param("endTime") String endTime);
+    IPage<RepairConsumeVo> queryConsumePageList(IPage<RepairConsumeVo> page, @Param("schoolId") String schoolId, @Param("name") String name, @Param("startTime") String startTime, @Param("endTime") String endTime);
 
     List<RepairArticleConsumeVo> queryArticleConsumes(@Param("schoolId") Integer schoolId, @Param("keyWork") String keyWork, @Param("findInSet") String findInSet);
 

+ 1 - 1
src/main/java/com/repair/mapper/RepairEvaluateMapper.java

@@ -22,7 +22,7 @@ import java.util.List;
 public interface RepairEvaluateMapper extends BaseMapper<RepairEvaluate> {
     List<EvaluateVo> queryEvaluatePageList(@Param("keyWord") String keyWord, @Param("startTime") String startTime, @Param("endTime") String endTime);
 
-    IPage<EvaluateVo> queryEvaluatePageList(IPage<EvaluateVo> page, @Param("keyWord") String keyWord, @Param("startTime") String startTime, @Param("endTime") String endTime);
+    IPage<EvaluateVo> queryEvaluatePageList(IPage<EvaluateVo> page, @Param("star") String star, @Param("keyWord") String keyWord, @Param("startTime") String startTime, @Param("endTime") String endTime);
 
     List<RecordEvaluateVo> queryEvaluateList(@Param("dateStr") String dateStr);
 }

+ 3 - 0
src/main/java/com/repair/mapper/RepairRecordMapper.java

@@ -2,6 +2,7 @@ package com.repair.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.repair.model.pojo.RepairRecord;
 import com.repair.model.vo.*;
 import org.apache.ibatis.annotations.Param;
@@ -59,6 +60,8 @@ public interface RepairRecordMapper extends BaseMapper<RepairRecord> {
 
     IPage<RepairTechnicianVo> queryTeamWorkOffline(IPage<RepairTechnicianVo> page,@Param("schoolId") Integer schoolId);
 
+    IPage<RepairTechnicianVo> queryTeamWorkPay(Page<RepairTechnicianVo> page, @Param("schoolId")Integer schoolId);
+
     List<ReportExportVo> queryNotTimeoutReportExport(String stateStr, String keyWord, String startTime, String endTime, Integer schoolId);
 
     List<ReportExportVo> queryTimeoutReportExport(String keyWord, String startTime, String endTime, Integer schoolId);

+ 3 - 0
src/main/java/com/repair/mapper/RepairUserMapper.java

@@ -35,6 +35,7 @@ public interface RepairUserMapper extends BaseMapper<RepairUser> {
 
     IPage<AutoDispatchUserVo> autoDispatchUser(IPage<AutoDispatchUserVo> page, @Param("schoolId") Integer schoolId, @Param("dateNow") String dateNow, @Param("articleId") Integer articleId, @Param("buildId") Integer buildId, @Param("keyWord") String keyWord);
 
+    IPage<AutoDispatchUserVo>autoOfflineRepairUser1(IPage<AutoDispatchUserVo>page, @Param("schoolId") Integer schoolId, @Param("keyWord") String keyWord);
     IPage<AutoOfflineUserVo> autoOfflineRepairUser(IPage<AutoOfflineUserVo> page, @Param("schoolId") Integer schoolId, @Param("keyWord") String keyWord);
 
     IPage<RepairWorkTypeVo> queryCollaboratorUser(IPage<RepairWorkTypeVo> page, @Param("schoolId") Integer schoolId, @Param("userId") Integer userId, @Param("dateNow") String dateNow, @Param("keyWord") String keyWord);
@@ -44,4 +45,6 @@ public interface RepairUserMapper extends BaseMapper<RepairUser> {
     List<AutoDispatchUserVo> dropDown(Integer buildId, Integer articleId, Integer schoolId, Integer userId);
 
     List<ArticleBuildVo> queryArticleBuilds(@Param("userIds") List<Integer> userIds);
+
+
 }

+ 2 - 2
src/main/java/com/repair/model/enumModel/eRecordStatu.java

@@ -11,7 +11,7 @@ public enum eRecordStatu {
     Dispatch(1),//派单中 待接单
     Maintenance(2),//维修中
     ToLogistics(3),//转后勤 待处理
-    ToConfirmed(4),//待确认
+    ToConfirmed(4),//待支付
     Transfer(5),//转单待审核
     Collaborate(6),//协作待审核
     Finished(7),//已完成
@@ -67,7 +67,7 @@ public enum eRecordStatu {
             case 3:
                 return "转后勤";
             case 4:
-                return "待确认";
+                return "待支付";
             case 5:
                 return "转单待审核";
             case 6:

+ 1 - 1
src/main/java/com/repair/model/pojo/RepairRecord.java

@@ -97,7 +97,7 @@ public class RepairRecord implements Serializable {
     @ApiModelProperty(value = "维修人联系电话(用协作、改派操作之前第一个师傅的电话)")
     private String maintenancerPhone;
 
-    @ApiModelProperty(value = "维修状态(派单中,维修中,转后勤,已完成,待确认,转单待审核,协作待审核,已取消,已关单)")
+    @ApiModelProperty(value = "维修状态(派单中,维修中,转后勤,已完成,待支付,转单待审核,协作待审核,已取消,已关单)")
     private Integer maintenanceState;
 
     @ApiModelProperty(value = "是否是值班单 不是值班单0 是值班单1  定时到正常班次时间重新分配")

+ 4 - 0
src/main/java/com/repair/model/pojo/RepairSystemSetting.java

@@ -61,6 +61,10 @@ public class RepairSystemSetting implements Serializable {
     @NotBlank(message = "服务监督电话不能为空")
     private String servicePhone;
 
+    @ApiModelProperty(value = "催缴内容")
+    @NotBlank(message = "催缴内容不能为空")
+    private String collectionContent;
+
     @ApiModelProperty(value = "创建时间")
     @TableField(fill = FieldFill.INSERT)
     private Date createTime;

+ 17 - 0
src/main/java/com/repair/model/request/batchCallRequest.java

@@ -0,0 +1,17 @@
+package com.repair.model.request;
+
+import com.repair.model.pojo.RepairConsumables;
+import lombok.Data;
+
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * 修改密码
+ */
+@Data
+public class batchCallRequest {
+    private List<Integer> ids;
+}

+ 2 - 2
src/main/java/com/repair/model/request/insertRepairUserRequest.java

@@ -60,11 +60,11 @@ public class insertRepairUserRequest {
     /**
      * 接单考核时间
      */
-    private Integer acceptanceAssessTime;
+    //private Integer acceptanceAssessTime;//待取消
 
     /**
      * 维修考核时间
      */
-    private Integer maintenanceAssessTime;
+    //private Integer maintenanceAssessTime;//待取消
 
 }

+ 2 - 2
src/main/java/com/repair/model/request/updateUserDataRequest.java

@@ -71,11 +71,11 @@ public class updateUserDataRequest {
     /**
      * 接单考核时间
      */
-    private Integer acceptanceAssessTime;
+    private Integer acceptanceAssessTime;//待取消__是否要取消
 
     /**
      * 维修考核时间
      */
-    private Integer maintenanceAssessTime;
+    private Integer maintenanceAssessTime;//待取消————是否要取消
 
 }

+ 1 - 1
src/main/java/com/repair/model/vo/AddressBookVo.java

@@ -45,7 +45,7 @@ public class AddressBookVo {
 
     public String getStateStr() {
         return state == 1 ? "正常接单" : "停止接单";
-    }
+    }//考虑不再停止接单
 
     public void setStateStr(String stateStr) {
         this.stateStr = stateStr;

+ 11 - 0
src/main/java/com/repair/model/vo/AutoDispatchUserVo.java

@@ -72,4 +72,15 @@ public class AutoDispatchUserVo {
      */
     private String shiftId;
 
+    /**
+     * 维修班
+     */
+    private String teamName;
+
+    /**
+     * 用户身份
+     */
+    private String userZzName;
+
 }
+

+ 5 - 0
src/main/java/com/repair/model/vo/DetailsVo.java

@@ -143,4 +143,9 @@ public class DetailsVo {
      * 耗材详情集合
      */
     private List<RepairConsumables> consumables;
+
+    /**
+     * 支付时间
+     */
+    private Date payTime;
 }

+ 6 - 1
src/main/java/com/repair/model/vo/MaintenanceTechnicianVo.java

@@ -21,9 +21,14 @@ public class MaintenanceTechnicianVo {
     private int maintenanceCount;
 
     /**
+     * 待支付
+     */
+//    private int stayPayCount;
+
+    /**
      * 已超时
      */
-    private int timeoutCount;
+   // private int timeoutCount;//待取消
 
     /**
      * 待审核

+ 3 - 3
src/main/java/com/repair/model/vo/MaintenanceWorkerVo.java

@@ -21,11 +21,11 @@ public class MaintenanceWorkerVo {
 //    好评数
     private Integer degreePraise;
 //    超时率
-    private String timeOut;
+    //private String timeOut;//待取消
 //    平均响应时长
-    private BigDecimal answer;
+    //private BigDecimal answer;//待取消
 //    平均维修时长
-    private BigDecimal maintain;
+    //private BigDecimal maintain;//待取消
 //    总费用
     private BigDecimal totalPrice;
 

+ 1 - 1
src/main/java/com/repair/model/vo/MasterHomepageVo.java

@@ -25,7 +25,7 @@ public class MasterHomepageVo {
     /**
      * 已超时
      */
-    private int timeoutCount;
+    /*private int timeoutCount;*///待去除
     /**
      * 转线下数量
       */

+ 6 - 0
src/main/java/com/repair/model/vo/ProsperityRepairPayRecordsVo.java

@@ -69,4 +69,10 @@ public class ProsperityRepairPayRecordsVo {
      * 显示:1
      */
     private Integer isApprove;
+    /**
+     * 区域地名
+     */
+    private String areaId;
+
+    private String address;
 }

+ 7 - 2
src/main/java/com/repair/model/vo/RepairAnalysisVo.java

@@ -9,7 +9,7 @@ public class RepairAnalysisVo {
     private Integer totalCount;
 
     public Integer getTotalCount() {
-        return checkCount + receivingCount+ maintainCount+ accomplishCount + shutCount + cancelCount + disposeCount + affirmCount;
+        return checkCount + receivingCount+ maintainCount+ accomplishCount + shutCount + cancelCount + disposeCount + affirmCount+offlineCount;
     }
 
     public void setTotalCount(Integer totalCount) {
@@ -27,7 +27,7 @@ public class RepairAnalysisVo {
     //    已关单
     private Integer shutCount;
     //    已超时
-    private Integer timeOutCount;
+/*    private Integer timeOutCount;*/
     //    已取消
     private Integer cancelCount;
     //    待处理
@@ -35,4 +35,9 @@ public class RepairAnalysisVo {
     //    待确认
     private Integer affirmCount;
 
+    /**
+     * 转线下
+     */
+    private Integer offlineCount;
+
 }

+ 10 - 2
src/main/java/com/repair/model/vo/RepairManageCountVo.java

@@ -16,7 +16,8 @@ public class RepairManageCountVo {
     private int allCount;
 
     public int getAllCount() {
-        return dispatchCount + maintenanceCount + logisticsCount + examineCount + finishedCount + canceledCount + closedCount;
+        return dispatchCount + maintenanceCount + logisticsCount + examineCount + finishedCount
+                + canceledCount + closedCount + offlineCount + paidCount;
     }
 
     public void setAllCount(int allCount) {
@@ -61,10 +62,17 @@ public class RepairManageCountVo {
     /**
      * 已超时
      */
-    private int timeoutCount;
+//    private int timeoutCount;
 
     /**
      * 转线下
      */
     private int offlineCount;
+
+    /**
+     * 待支付
+     */
+    private int paidCount;
+
+
 }

+ 4 - 0
src/main/java/com/repair/model/vo/RepairRecordPageVo.java

@@ -28,6 +28,10 @@ public class RepairRecordPageVo {
      */
     private String areaName;
     /**
+     * 详细地址
+     */
+    private String addressName;
+    /**
      * 用户ID
      */
     @JsonIgnore

+ 6 - 1
src/main/java/com/repair/model/vo/RepairSummarizingVo.java

@@ -33,7 +33,7 @@ public class RepairSummarizingVo {
     private Integer totalCount;
 
     public Integer getTotalCount() {
-        return checkCount + receivingCount + disposeCount + affirmCount + maintainCount + accomplishCount + cancelCount + shutCount;
+        return checkCount + receivingCount + disposeCount + affirmCount + maintainCount + accomplishCount + cancelCount + shutCount+offlineCount;
     }
 
     public void setTotalCount(Integer totalCount) {
@@ -43,5 +43,10 @@ public class RepairSummarizingVo {
     //    时间
     private String dateName;
 
+    /**
+     * 转线下
+     */
+    private Integer offlineCount;
+
 
 }

+ 3 - 1
src/main/java/com/repair/model/vo/RepairTotalDataVo.java

@@ -42,8 +42,10 @@ public class RepairTotalDataVo {
     //    总单数
     private Integer totalCount;
 
+    private Integer offlineCount;
+
     public Integer getTotalCount() {
-        return checkCount + receivingCount + disposeCount + affirmCount + maintainCount + accomplishCount + cancelCount + shutCount;
+        return checkCount + receivingCount + disposeCount + affirmCount + maintainCount + accomplishCount + cancelCount + shutCount+offlineCount;
     }
 
     public void setTotalCount(Integer totalCount) {

+ 2 - 2
src/main/java/com/repair/model/vo/RepairUserVo.java

@@ -90,10 +90,10 @@ public class RepairUserVo {
     /**
      * 接单考核时间
      */
-    private int acceptanceTime;
+    //private int acceptanceTime;//待取消--待确定
 
     /**
      * 维修考核时间
      */
-    private int maintenanceTime;
+//    private int maintenanceTime;//待取消--待确定
 }

+ 29 - 0
src/main/java/com/repair/model/vo/ReportExportVo.java

@@ -17,6 +17,11 @@ public class ReportExportVo {
     private String areaName;
 
     /**
+     * 详细地址
+     */
+    private String address;
+
+    /**
      * 姓名
      */
     private String userName;
@@ -32,11 +37,35 @@ public class ReportExportVo {
     private String articleName;
 
     /**
+     * 维修类别
+     */
+    private String repairType;
+    /**
      * 故障描述
      */
     private String description;
 
     /**
+     * 耗材数量
+     */
+    private Integer number;
+
+    /**
+     * 实收金额
+     */
+    private String totalPrice;
+
+    /**
+     * 是否支付成功(未支付/等待支付:1;支付成功:2;支付失败:3)
+     */
+    private Integer isPaid;
+
+    /**
+     * 是否退款成功(退款中0;退款成功1;退款失败2)
+     */
+    private Integer isRefund;
+
+    /**
      * 订单维修状态
      */
     @JsonIgnore

+ 6 - 1
src/main/java/com/repair/model/vo/TeamWorkCountVo.java

@@ -39,7 +39,7 @@ public class TeamWorkCountVo {
     /**
      * 已超时
      */
-    private int timeoutCount;
+  /*  private int timeoutCount;*/
 
     /**
      * 已关单
@@ -50,4 +50,9 @@ public class TeamWorkCountVo {
      * 转线下
      */
     private int offlineCount;
+
+    /**
+     * 转线下
+     */
+    private int stayPayCount;
 }

+ 1 - 1
src/main/java/com/repair/model/vo/TrackDetailsVo.java

@@ -33,7 +33,7 @@ public class TrackDetailsVo {
                 state = "转后勤";
                 break;
             case 4:
-                state = content.contains("回复") ? "回复" : "待确认";
+                state = content.contains("回复") ? "回复" : "待支付";
                 break;
             case 9:
                 state = "已关单";

+ 1 - 1
src/main/java/com/repair/services/RepairConsumablesService.java

@@ -34,7 +34,7 @@ public interface RepairConsumablesService extends IService<RepairConsumables> {
 
     List<RepairConsumables> getRepairsByRecordId(Integer recordIds);
 
-    PageUtils<ConsumablePageVo> queryConsumablePageList(int currentPage, int pageCount, String keyWord, String startTime, String endTime);
+    PageUtils<ConsumablePageVo> queryConsumablePageList(int currentPage, int pageCount,String schoolId, String keyWord, String startTime, String endTime);
 
     List<ConsumableExcelVo> queryConsumablePageList(String keyWord, String startTime, String endTime);
 

+ 1 - 1
src/main/java/com/repair/services/RepairConsumeService.java

@@ -22,7 +22,7 @@ public interface RepairConsumeService extends IService<RepairConsume> {
 
     int updateRepairConsume(RepairConsume rns);
 
-    PageUtils<RepairConsumeVo> queryPageRepairConsumes(int currentPage, int pageCount, String name, String startTime, String endTime);
+    PageUtils<RepairConsumeVo> queryPageRepairConsumes(int currentPage, int pageCount, String schoolId, String name, String startTime, String endTime);
 
     int deleteRepairConsumeById(int id);
 

+ 1 - 1
src/main/java/com/repair/services/RepairEvaluateService.java

@@ -21,7 +21,7 @@ public interface RepairEvaluateService extends IService<RepairEvaluate> {
 
     int deleteRepairEvaluateById(int id);
 
-    PageUtils<RepairEvaluate> queryPageList(int currentPage, int pageCount, String keyWord, String startTime, String endTime);
+    PageUtils<RepairEvaluate> queryPageList(int currentPage, int pageCount, String star,String keyWord, String startTime, String endTime);
 
     RepairEvaluate getRepairById(int id);
 

+ 7 - 0
src/main/java/com/repair/services/RepairRecordService.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import com.repair.model.pojo.RepairRecord;
 import com.repair.model.result.PageUtils;
 import com.repair.model.vo.*;
+import io.swagger.models.auth.In;
 
 import java.util.List;
 
@@ -17,6 +18,10 @@ import java.util.List;
  * @since 2023-07-24
  */
 public interface RepairRecordService extends IService<RepairRecord> {
+    List<RepairRecord> queryRecords(List<Integer> recordIds);
+
+    List<RepairRecord> queryRecords(Integer status);
+
     int insertRepairRecord(RepairRecord rns);
 
     int updateRepairRecord(RepairRecord rns);
@@ -69,6 +74,8 @@ public interface RepairRecordService extends IService<RepairRecord> {
 
     PageUtils<RepairTechnicianVo> queryTeamWorkOffline(int currentPage, int pageCount, Integer schoolId);
 
+    PageUtils<RepairTechnicianVo> queryTeamWorkPay(int currentPage, int pageCount, Integer schoolId);
+
     List<ReportExportVo> queryNotTimeoutReportExport(String stateStr, String keyWord, String startTime, String endTime, Integer schoolId);
 
     RepairRecord queryRepairByRecordno(String recordNo);

+ 3 - 0
src/main/java/com/repair/services/RepairUserService.java

@@ -54,6 +54,8 @@ public interface RepairUserService extends IService<RepairUser> {
 
     PageUtils<AutoDispatchUserVo> autoDispatchUser(int currentPage, int pageCount, Integer schoolId, String dateNow, Integer articleId, Integer buildId, String keyWord);
 
+    PageUtils<AutoDispatchUserVo> autoOfflineRepairUser1(int currentPage, int pageCount, Integer schoolId, String keyWord);
+
     PageUtils<AutoOfflineUserVo> autoOfflineRepairUser(int currentPage, int pageCount, Integer schoolId, String keyWord);
 
     PageUtils<RepairWorkTypeVo> queryCollaboratorUser(int currentPage, int pageCount, Integer schoolId, Integer userId, String dateNow,String keyWord);
@@ -67,5 +69,6 @@ public interface RepairUserService extends IService<RepairUser> {
     List<ArticleBuildVo> queryArticleBuilds(List<Integer> userIds);
 
     PageUtils<RepairUser> queryUserPage(int currentPage, int pageCount, Integer schoolId, String keyWord);
+
 }
 

+ 2 - 2
src/main/java/com/repair/services/impl/RepairConsumablesServiceImpl.java

@@ -86,11 +86,11 @@ public class RepairConsumablesServiceImpl extends ServiceImpl<RepairConsumablesM
     }
 
     @Override
-    public PageUtils<ConsumablePageVo> queryConsumablePageList(int currentPage, int pageCount, String keyWord, String startTime, String endTime) {
+    public PageUtils<ConsumablePageVo> queryConsumablePageList(int currentPage, int pageCount,String schoolId, String keyWord, String startTime, String endTime) {
         Page<ConsumablePageVo> page = new Page<>();
         page.setCurrent(currentPage);
         page.setSize(pageCount);
-        IPage<ConsumablePageVo> datas = repairConsumablesMapper.queryConsumablePageList(page, keyWord, startTime, endTime);
+        IPage<ConsumablePageVo> datas = repairConsumablesMapper.queryConsumablePageList(page, keyWord,schoolId, startTime, endTime);
         return new PageUtils(datas);
     }
 

+ 2 - 2
src/main/java/com/repair/services/impl/RepairConsumeServiceImpl.java

@@ -43,11 +43,11 @@ public class RepairConsumeServiceImpl extends ServiceImpl<RepairConsumeMapper, R
     }
 
     @Override
-    public PageUtils<RepairConsumeVo> queryPageRepairConsumes(int currentPage, int pageCount, String name, String startTime, String endTime) {
+    public PageUtils<RepairConsumeVo> queryPageRepairConsumes(int currentPage, int pageCount, String schoolId, String name, String startTime, String endTime) {
         Page<RepairConsumeVo> page = new Page<>();
         page.setCurrent(currentPage);
         page.setSize(pageCount);
-        IPage<RepairConsumeVo> datas = repairConsumeMapper.queryConsumePageList(page, name, startTime, endTime);
+        IPage<RepairConsumeVo> datas = repairConsumeMapper.queryConsumePageList(page,schoolId, name, startTime, endTime);
         return new PageUtils(datas);
     }
 

+ 2 - 2
src/main/java/com/repair/services/impl/RepairEvaluateServiceImpl.java

@@ -43,7 +43,7 @@ public class RepairEvaluateServiceImpl extends ServiceImpl<RepairEvaluateMapper,
     }
 
     @Override
-    public PageUtils<RepairEvaluate> queryPageList(int currentPage, int pageCount, String keyWord, String startTime, String endTime) {
+    public PageUtils<RepairEvaluate> queryPageList(int currentPage, int pageCount,String star, String keyWord, String startTime, String endTime) {
         Page<EvaluateVo> page = new Page<>();
         page.setCurrent(currentPage);
         page.setSize(pageCount);
@@ -53,7 +53,7 @@ public class RepairEvaluateServiceImpl extends ServiceImpl<RepairEvaluateMapper,
         }catch (Exception e){
 
         }
-        IPage<EvaluateVo> result = repairEvaluateMapper.queryEvaluatePageList(page, keyWord, startTime, endTime);
+        IPage<EvaluateVo> result = repairEvaluateMapper.queryEvaluatePageList(page,star, keyWord, startTime, endTime);
         return new PageUtils(result);
     }
 

+ 26 - 0
src/main/java/com/repair/services/impl/RepairRecordServiceImpl.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.repair.mapper.RepairRecordMapper;
+import com.repair.model.enumModel.eRecordStatu;
 import com.repair.model.pojo.RepairRecord;
 import com.repair.model.result.PageUtils;
 import com.repair.model.vo.*;
@@ -29,6 +30,22 @@ public class RepairRecordServiceImpl extends ServiceImpl<RepairRecordMapper, Rep
     private RepairRecordMapper repairRecordMapper;
 
     @Override
+    public List<RepairRecord> queryRecords(List<Integer> recordIds) {
+        QueryWrapper<RepairRecord> queryWrapper = new QueryWrapper<>();
+        queryWrapper.in("id", recordIds);
+        List<RepairRecord> rrs = repairRecordMapper.selectList(queryWrapper);
+        return rrs;
+    }
+
+    @Override
+    public List<RepairRecord> queryRecords(Integer status) {
+        QueryWrapper<RepairRecord> queryWrapper = new QueryWrapper<>();
+        queryWrapper.in("maintenance_state", status);
+        List<RepairRecord> rrs = repairRecordMapper.selectList(queryWrapper);
+        return rrs;
+    }
+
+    @Override
     public int insertRepairRecord(RepairRecord rr) {
         int result = repairRecordMapper.insert(rr);
         return rr.getId();
@@ -244,6 +261,15 @@ public class RepairRecordServiceImpl extends ServiceImpl<RepairRecordMapper, Rep
     }
 
     @Override
+    public PageUtils<RepairTechnicianVo> queryTeamWorkPay(int currentPage, int pageCount, Integer schoolId) {
+        Page<RepairTechnicianVo> page = new Page<>();
+        page.setCurrent(currentPage);
+        page.setSize(pageCount);
+        IPage<RepairTechnicianVo> result = repairRecordMapper.queryTeamWorkPay(page, schoolId);
+        return new PageUtils(result);
+    }
+
+    @Override
     public RepairRecord queryRepairByRecordno(String recordNo) {
         QueryWrapper<RepairRecord> queryWrapper = new QueryWrapper<>();
         queryWrapper.eq("record_no", recordNo);

+ 2 - 1
src/main/java/com/repair/services/impl/RepairShiftSettingsServiceImpl.java

@@ -82,7 +82,8 @@ public class RepairShiftSettingsServiceImpl extends ServiceImpl<RepairShiftSetti
     public List<RepairShiftSettings> getRepairsByShiftIds(List<String> shiftIds, String dateNow) {
         QueryWrapper<RepairShiftSettings> queryWrapper = new QueryWrapper();
         queryWrapper.in("id", shiftIds);
-        queryWrapper.gt("end_time", dateNow);
+        //取消下班时间限制
+//        queryWrapper.gt("end_time", dateNow);
         queryWrapper.orderByDesc("end_time");
         List<RepairShiftSettings> result = repairShiftSettingsMapper.selectList(queryWrapper);
         return result;

+ 28 - 5
src/main/java/com/repair/services/impl/RepairUserServiceImpl.java

@@ -1,12 +1,10 @@
 package com.repair.services.impl;
 
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.repair.mapper.RepairUserMapper;
-import com.repair.model.pojo.RepairPayRecord;
 import com.repair.model.pojo.RepairUser;
 import com.repair.model.result.PageUtils;
 import com.repair.model.vo.*;
@@ -184,7 +182,30 @@ public class RepairUserServiceImpl extends ServiceImpl<RepairUserMapper, RepairU
         Page<AutoDispatchUserVo> page = new Page<>();
         page.setCurrent(currentPage);
         page.setSize(pageCount);
-        IPage<AutoDispatchUserVo> result = repairUserMapper.autoDispatchUser(page, schoolId, dateNow, articleId, buildId, keyWord);
+        //手动派单取消楼栋品类限制
+        IPage<AutoDispatchUserVo> result1 = repairUserMapper.autoDispatchUser(page, schoolId, dateNow, null, null, keyWord);
+        Page<AutoDispatchUserVo> page1 = new Page<>();
+        page.setCurrent(currentPage);
+        page.setSize(pageCount);
+        IPage<AutoDispatchUserVo> result2 = repairUserMapper.autoOfflineRepairUser1(page1, schoolId, keyWord);
+        List<AutoDispatchUserVo> combinedList = new ArrayList<>();
+        combinedList.addAll(result1.getRecords());
+        combinedList.addAll(result2.getRecords());
+        long total = result1.getTotal() + result2.getTotal();
+        int newSize = (int) Math.min(combinedList.size(), result1.getSize()); // 假设使用第一个结果集的每页大小
+        int newPageNum = 1;
+        IPage<AutoDispatchUserVo> newPage = new Page<>(newPageNum, newSize, total);
+        newPage.setRecords(combinedList);
+
+        return new PageUtils<>(newPage);
+    }
+
+    @Override
+    public PageUtils<AutoDispatchUserVo> autoOfflineRepairUser1(int currentPage, int pageCount, Integer schoolId, String keyWord) {
+        Page<AutoDispatchUserVo> page = new Page<>();
+        page.setCurrent(currentPage);
+        page.setSize(pageCount);
+        IPage<AutoDispatchUserVo> result = repairUserMapper.autoOfflineRepairUser1(page, schoolId, keyWord);
         return new PageUtils(result);
     }
 
@@ -215,10 +236,11 @@ public class RepairUserServiceImpl extends ServiceImpl<RepairUserMapper, RepairU
         return new PageUtils(result);
     }
 
+
     @Override
-    public List<AutoDispatchUserVo> dropDown(Integer buildId, Integer articleId, Integer schoolId, Integer userId) {
+    public List<AutoDispatchUserVo> dropDown(Integer buildId, Integer articleId,Integer schoolId, Integer userId) {
 
-        List<AutoDispatchUserVo> vos = repairUserMapper.dropDown(buildId, articleId, schoolId, userId);
+        List<AutoDispatchUserVo> vos = repairUserMapper.dropDown(buildId,articleId,schoolId, userId);
         return vos;
     }
 
@@ -252,4 +274,5 @@ public class RepairUserServiceImpl extends ServiceImpl<RepairUserMapper, RepairU
         return new PageUtils(users);
     }
 
+
 }

+ 1 - 1
src/main/resources/application-dev.yml

@@ -13,7 +13,7 @@ spring:
   datasource:
     username: root
     password: Chuanghai_2023.
-    url: jdbc:mysql://172.16.20.95:3306/repair_report?useUnicode=tru&characterEncoding=UTF-8&useSSL=false&useAffectedRows=true&allowPublicKeyRetrieval=true&allowMultiQueries=true&rewriteBatchedStatements=true&serverTimezone=Asia/Shanghai
+    url: jdbc:mysql://172.16.20.95:3306/repair_test?useUnicode=tru&characterEncoding=UTF-8&useSSL=false&useAffectedRows=true&allowPublicKeyRetrieval=true&allowMultiQueries=true&rewriteBatchedStatements=true&serverTimezone=Asia/Shanghai
     driver-class-name: com.mysql.cj.jdbc.Driver
     cache:
       type: redis

+ 1 - 1
src/main/resources/application.yml

@@ -5,7 +5,7 @@ server:
 
 spring:
   profiles:
-      active: dev
+      active: prod
   servlet:
     multipart:
       max-file-size: 30MB     #单个文件最大限制

+ 1 - 1
src/main/resources/mapper/repair/RepairClassesSettingsMapper.xml

@@ -35,7 +35,7 @@
         <result property="userId" column="user_id"/>
         <result property="shiftId" column="shift_id"/>
         <result property="shiftName" column="shift_name"/>
-        <result property="shiftColor" column="shift_color"/>
+        <!--<result property="shiftColor" column="shift_color"/>-->
     </resultMap>
     <select id="queryClassesDatas" resultType="com.repair.model.vo.ClassesDataVo" resultMap="repairClassesDataMap">
         SELECT rcs.id,rcs.user_id,rcs.shift_id,(select GROUP_CONCAT(name) from repair_shift_settings where find_in_set(id,rcs.shift_id) and deleted = 0) as shift_name

+ 3 - 0
src/main/resources/mapper/repair/RepairConsumablesMapper.xml

@@ -27,6 +27,9 @@
             <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
                 and rcs.update_time BETWEEN #{startTime} and #{endTime}
             </if>
+            <if test="schoolId != null and schoolId != ''">
+                and rr.school_id =#{schoolId}
+            </if>
         </where>
         order by rr.report_time desc,rcs.update_time desc
     </select>

+ 3 - 0
src/main/resources/mapper/repair/RepairConsumeMapper.xml

@@ -47,6 +47,9 @@
             <if test="name != null and name != ''">
                 and rc.name like '%' #{name} '%'
             </if>
+            <if test="schoolId != null and schoolId != ''">
+                and rc.school_id = #{schoolId}
+            </if>
             <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
                 and rc.update_time BETWEEN #{startTime} and #{endTime}
             </if>

+ 3 - 0
src/main/resources/mapper/repair/RepairEvaluateMapper.xml

@@ -29,6 +29,9 @@
             <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
                 and re.create_time BETWEEN #{startTime} and #{endTime}
             </if>
+            <if test="star != null and star != ''">
+                and re.star = #{star}
+            </if>
         </where>
         order by re.create_time desc
     </select>

+ 6 - 2
src/main/resources/mapper/repair/RepairPayRecordMapper.xml

@@ -57,13 +57,17 @@
     </resultMap>
 
     <select id="queryPayPage" resultType="com.repair.model.vo.ProsperityRepairPayRecordsVo" resultMap="repairPayPage">
-        select rpr.id,rpr.create_time as pay_time,rpr.record_id,rr.record_no,rpr.pay_no,ru.user_name,rpr.pay_price,rpr.is_success as state from repair_pay_record rpr
+        select rpr.id,rpr.create_time as pay_time,rpr.record_id,rr.record_no,rr.address,rr.area_id,rpr.pay_no,ru.user_name,rpr.pay_price,rpr.is_success as state from repair_pay_record rpr
         left join repair_record rr on rr.deleted = 0 and rr.id = rpr.record_id
         left join repair_user ru on ru.deleted = 0  and ru.id = rpr.user_id
         where rpr.deleted = 0 and rpr.is_success = 2
         <if test="keyWord != null and keyWord !='' ">
+
             and (rpr.user_id in (select id from repair_user where deleted = 0 and user_name like '%' #{keyWord} '%')
-            or rpr.record_id in (select id from repair_record where deleted = 0 and record_no like '%' #{keyWord} '%'))
+            or rpr.record_id in (select id from repair_record where deleted = 0 and record_no like '%' #{keyWord} '%')
+            or rpr.record_id in (select id from repair_record where deleted = 0 and area_id like '%' #{keyWord} '%')
+            or rpr.record_id in (select id from repair_record where deleted =0 and address like '%' #{keyWord} '%')
+            or rpr.record_id in (select id from repair_record where deleted =0 and concat(area_id,address)like concat('%' #{keyWord} '%')))
         </if>
         <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
             and rpr.create_time between #{startTime} and #{endTime}

+ 256 - 96
src/main/resources/mapper/repair/RepairRecordMapper.xml

@@ -79,7 +79,7 @@
     <resultMap type="com.repair.model.vo.MaintenanceTechnicianVo" id="repairRecordTechnicianMap">
         <result property="receivingCount" column="receiving_count"/>
         <result property="maintenanceCount" column="maintenance_count"/>
-        <result property="timeoutCount" column="timeout_count"/>
+        <!--<result property="timeoutCount" column="timeout_count"/>-->
         <result property="examineCount" column="examine_count"/>
     </resultMap>
 
@@ -229,8 +229,9 @@
         <result property="finishedCount" column="finished_count"/>
         <result property="canceledCount" column="canceled_count"/>
         <result property="closedCount" column="closed_count"/>
-        <result property="timeoutCount" column="timeout_count"/>
+       <!-- <result property="timeoutCount" column="timeout_count"/>-->
         <result property="offlineCount" column="offline_count"/>
+        <result property="paidCount" column="paid_count"/>
     </resultMap>
 
     <select id="queryManageCount" resultType="com.repair.model.vo.RepairManageCountVo" resultMap="repairManageCountMap">
@@ -240,9 +241,9 @@
         and rr.maintenance_state = 1
         where rr.deleted = 0 and rr.maintenance_state = 1
         <if test="keyWord != null and keyWord != ''">
-            and (rr.record_no like '%' #{keyWord} '%' or rr.area_id like '%' #{keyWord} '%' or rr.user_name like '%'
-            #{keyWord} '%' or rr.user_phone like '%'
-            #{keyWord} '%')
+            and (rr.record_no like '%' #{keyWord} '%' or rr.area_id like '%' #{keyWord} '%' or rr.address like '%' #{keyWord} '%'
+                     or concat(rr.area_id,rr.address) like concat('%',#{keyWord},'%')
+                     or rr.user_name like '%'#{keyWord} '%' or rr.user_phone like '%' #{keyWord} '%')
         </if>
         <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
             and rr.report_time between #{startTime} and #{endTime}
@@ -260,9 +261,9 @@
         rr.maintenance_state = 2
         where rr.deleted = 0 and rr.maintenance_state = 2
         <if test="keyWord != null and keyWord != ''">
-            and (rr.record_no like '%' #{keyWord} '%' or rr.area_id like '%' #{keyWord} '%' or rr.user_name like '%'
-            #{keyWord} '%' or rr.user_phone like '%'
-            #{keyWord} '%')
+            and (rr.record_no like '%' #{keyWord} '%' or rr.area_id like '%' #{keyWord} '%' or rr.address like '%' #{keyWord} '%'
+                     or concat(rr.area_id,rr.address) like concat('%',#{keyWord},'%')
+                     or rr.user_name like '%' #{keyWord} '%' or rr.user_phone like '%' #{keyWord} '%')
         </if>
         <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
             and rr.report_time between #{startTime} and #{endTime}
@@ -283,9 +284,9 @@
         </if>
         where rr.deleted = 0 and rr.maintenance_state = 3
         <if test="keyWord != null and keyWord != ''">
-            and (rr.record_no like '%' #{keyWord} '%' or rr.area_id like '%' #{keyWord} '%' or rr.user_name like '%'
-            #{keyWord} '%' or rr.user_phone like '%' #{keyWord}
-            '%')
+            and (rr.record_no like '%' #{keyWord} '%' or rr.area_id like '%' #{keyWord} '%' or rr.address like '%' #{keyWord} '%'
+                     or concat(rr.area_id,rr.address) like concat('%',#{keyWord},'%')
+                     or rr.user_name like '%' #{keyWord} '%' or rr.user_phone like '%' #{keyWord}'%')
         </if>
         <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
             and rr.report_time between #{startTime} and #{endTime}
@@ -297,8 +298,9 @@
         (select Count(*) from repair_record where deleted = 0 and (maintenance_state = 5 or maintenance_state = 6 or
         maintenance_state = 11)
         <if test="keyWord != null and keyWord != ''">
-            and (area_id like '%' #{keyWord} '%' or user_name like '%' #{keyWord} '%' or user_phone like '%' #{keyWord}
-            '%')
+            and (area_id like '%' #{keyWord} '%' or address like '%' #{keyWord} '%'
+                     or concat(area_id,address) like concat('%',#{keyWord},'%')
+                     or user_name like '%' #{keyWord} '%' or user_phone like '%' #{keyWord}'%')
         </if>
         <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
             and report_time between #{startTime} and #{endTime}
@@ -312,9 +314,9 @@
         (select Count(*) from repair_record rr
         where rr.deleted = 0 and rr.maintenance_state = 7
         <if test="keyWord != null and keyWord != ''">
-            and (rr.record_no like '%' #{keyWord} '%' or rr.area_id like '%' #{keyWord} '%' or rr.user_name like '%'
-            #{keyWord} '%' or rr.user_phone like '%' #{keyWord}
-            '%')
+            and (rr.record_no like '%' #{keyWord} '%' or rr.area_id like '%' #{keyWord} '%' or rr.address like '%' #{keyWord} '%'
+                     or concat(rr.area_id,rr.address) like concat('%',#{keyWord},'%')
+                     or rr.user_name like '%' #{keyWord} '%' or rr.user_phone like '%' #{keyWord}'%')
         </if>
         <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
             and rr.report_time between #{startTime} and #{endTime}
@@ -329,8 +331,9 @@
         (select Count(*) from repair_record rr
         where rr.deleted = 0 and rr.maintenance_state = 8
         <if test="keyWord != null and keyWord != ''">
-            and (rr.record_no like '%' #{keyWord} '%' or rr.area_id like '%' #{keyWord} '%' or rr.user_name like '%'
-            #{keyWord} '%' or rr.user_phone like '%' #{keyWord}
+            and (rr.record_no like '%' #{keyWord} '%' or rr.area_id like '%' #{keyWord} '%' or rr.address like '%' #{keyWord} '%'
+                     or concat(rr.area_id,rr.address) like concat('%',#{keyWord},'%')
+                     or rr.user_name like '%' #{keyWord} '%' or rr.user_phone like '%' #{keyWord}
             '%')
         </if>
         <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
@@ -346,8 +349,9 @@
         (select Count(*) from repair_record rr
         where rr.deleted = 0 and rr.maintenance_state = 9
         <if test="keyWord != null and keyWord != ''">
-            and (rr.record_no like '%' #{keyWord} '%' or rr.area_id like '%' #{keyWord} '%' or rr.user_name like '%'
-            #{keyWord} '%' or rr.user_phone like '%' #{keyWord}
+            and (rr.record_no like '%' #{keyWord} '%' or rr.area_id like '%' #{keyWord} '%' or rr.address like '%' #{keyWord} '%'
+                    or concat(rr.area_id,rr.address) like concat('%',#{keyWord},'%')
+                    or rr.user_name like '%' #{keyWord} '%' or rr.user_phone like '%' #{keyWord}
             '%')
         </if>
         <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
@@ -359,41 +363,61 @@
         <if test="maintenanceName != null and maintenanceName != ''">
             and rr.maintenancer_name like '%' #{maintenanceName} '%'
         </if>) as closed_count,
-        (SELECT count(*) as cs FROM (
-        select rdr.users_id as
-        user_id,rr.maintenance_state,rr.article_id,rr.id,rr.record_no,rr.report_time,rr.user_name,rr.user_phone,rr.area_id
-        as area_name,rr.address,rr.description,rr.image,rr.maintenancer_name,rr.maintenancer_phone,rr.price from
-        repair_record rr
-        inner join repair_dispatch_record rdr on rdr.deleted = 0 and rdr.record_id = rr.id and rdr.is_lose_efficacy = 0
-        and ((date_add(rdr.assigned_time , interval rdr.acceptance_assess_time minute) &lt;= NOW() and
-        rdr.receiving_time is null) or date_add(rdr.assigned_time , interval rdr.acceptance_assess_time minute) &lt;=
-        rdr.receiving_time)
-        where rr.is_duty = 0 and rr.maintenance_state &lt;= 7 and rr.deleted = 0
-        <if test="keyWord != null and keyWord != ''">
-            and (rr.record_no like '%' #{keyWord} '%' or rr.area_id like '%' #{keyWord} '%' or rr.user_name like '%'
-            #{keyWord} '%' or rr.user_phone like '%'
-            #{keyWord} '%')
-        </if>
-        <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
-            and rr.report_time between #{startTime} and #{endTime}
-        </if>
-        <if test="schoolId != null and schoolId != ''">
-            and rr.school_id = #{schoolId}
-        </if>
-        UNION
-        select
-        rdv.user_id,rr.maintenance_state,rr.article_id,rr.id,rr.record_no,rr.report_time,rr.user_name,rr.user_phone,rr.area_id
-        as area_name,rr.address,rr.description,rr.image,rr.maintenancer_name,rr.maintenancer_phone,rr.price from
-        repair_record rr
-        inner join repair_receiving rdv on rdv.deleted = 0 and rdv.record_id = rr.id and rdv.is_lose_efficacy = 0
-        and ((date_add(rdv.receiving_time , interval rdv.maintenance_assess_time minute) &lt;= NOW() and
-        rdv.maintenance_assess_time is null) or date_add(rdv.receiving_time , interval rdv.maintenance_assess_time
-        minute) &lt;= rdv.finish_time)
-        where rr.is_duty = 0 and rr.maintenance_state &lt;= 7 and rr.deleted = 0
+<!--        (SELECT count(*) as cs FROM (-->
+<!--        select rdr.users_id as-->
+<!--        user_id,rr.maintenance_state,rr.article_id,rr.id,rr.record_no,rr.report_time,rr.user_name,rr.user_phone,rr.area_id-->
+<!--        as area_name,rr.address,rr.description,rr.image,rr.maintenancer_name,rr.maintenancer_phone,rr.price from-->
+<!--        repair_record rr-->
+<!--        inner join repair_dispatch_record rdr on rdr.deleted = 0 and rdr.record_id = rr.id and rdr.is_lose_efficacy = 0-->
+<!--        and ((date_add(rdr.assigned_time , interval rdr.acceptance_assess_time minute) &lt;= NOW() and-->
+<!--        rdr.receiving_time is null) or date_add(rdr.assigned_time , interval rdr.acceptance_assess_time minute) &lt;=-->
+<!--        rdr.receiving_time)-->
+<!--        where rr.is_duty = 0 and rr.maintenance_state &lt;= 7 and rr.deleted = 0-->
+<!--        <if test="keyWord != null and keyWord != ''">-->
+<!--            and (rr.record_no like '%' #{keyWord} '%' or rr.area_id like '%' #{keyWord} '%' or rr.address like '%' #{keyWord} '%'-->
+<!--                    or concat(rr.area_id,rr.address) like concat('%',#{keyWord},'%')-->
+<!--                    or rr.user_name like '%' #{keyWord} '%' or rr.user_phone like '%' #{keyWord} '%')-->
+<!--        </if>-->
+<!--        <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">-->
+<!--            and rr.report_time between #{startTime} and #{endTime}-->
+<!--        </if>-->
+<!--        <if test="schoolId != null and schoolId != ''">-->
+<!--            and rr.school_id = #{schoolId}-->
+<!--        </if>-->
+<!--        UNION-->
+<!--        select-->
+<!--        rdv.user_id,rr.maintenance_state,rr.article_id,rr.id,rr.record_no,rr.report_time,rr.user_name,rr.user_phone,rr.area_id-->
+<!--        as area_name,rr.address,rr.description,rr.image,rr.maintenancer_name,rr.maintenancer_phone,rr.price from-->
+<!--        repair_record rr-->
+<!--        inner join repair_receiving rdv on rdv.deleted = 0 and rdv.record_id = rr.id and rdv.is_lose_efficacy = 0-->
+<!--        and ((date_add(rdv.receiving_time , interval rdv.maintenance_assess_time minute) &lt;= NOW() and-->
+<!--        rdv.maintenance_assess_time is null) or date_add(rdv.receiving_time , interval rdv.maintenance_assess_time-->
+<!--        minute) &lt;= rdv.finish_time)-->
+<!--        where rr.is_duty = 0 and rr.maintenance_state &lt;= 7 and rr.deleted = 0-->
+<!--        <if test="keyWord != null and keyWord != ''">-->
+<!--            and (rr.record_no like '%' #{keyWord} '%' or rr.area_id like '%' #{keyWord} '%' or rr.address like '%' #{keyWord} '%'-->
+<!--                    or concat(rr.area_id,rr.address) like concat('%',#{keyWord},'%')-->
+<!--                    or rr.user_name like '%' #{keyWord} '%' or rr.user_phone like '%' #{keyWord} '%')-->
+<!--        </if>-->
+<!--        <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">-->
+<!--            and rr.report_time between #{startTime} and #{endTime}-->
+<!--        </if>-->
+<!--        <if test="schoolId != null and schoolId != ''">-->
+<!--            and rr.school_id = #{schoolId}-->
+<!--        </if>-->
+<!--        ) t-->
+<!--        <if test="maintenanceName != null and maintenanceName != ''">-->
+<!--            where t.user_id in (select id from repair_user where user_name like '%' #{maintenanceName} '%' and deleted =-->
+<!--            0)-->
+<!--        </if>-->
+<!--        ) as timeout_count,-->
+        (select Count(*) from repair_record rr
+        where rr.deleted = 0 and rr.maintenance_state = 10
         <if test="keyWord != null and keyWord != ''">
-            and (rr.record_no like '%' #{keyWord} '%' or rr.area_id like '%' #{keyWord} '%' or rr.user_name like '%'
-            #{keyWord} '%' or rr.user_phone like '%'
-            #{keyWord} '%')
+            and (rr.record_no like '%' #{keyWord} '%' or rr.area_id like '%' #{keyWord} '%' or rr.address like '%' #{keyWord} '%'
+            or concat(rr.area_id,rr.address) like concat('%',#{keyWord},'%')
+            or rr.user_name like '%' #{keyWord} '%' or rr.user_phone like '%' #{keyWord}
+            '%')
         </if>
         <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
             and rr.report_time between #{startTime} and #{endTime}
@@ -401,17 +425,16 @@
         <if test="schoolId != null and schoolId != ''">
             and rr.school_id = #{schoolId}
         </if>
-        ) t
         <if test="maintenanceName != null and maintenanceName != ''">
-            where t.user_id in (select id from repair_user where user_name like '%' #{maintenanceName} '%' and deleted =
-            0)
+            and rr.maintenancer_name like '%' #{maintenanceName} '%'
         </if>
-        ) as timeout_count,
+        ) as offline_count,
         (select Count(*) from repair_record rr
-        where rr.deleted = 0 and rr.maintenance_state = 10
+        where rr.deleted = 0 and rr.maintenance_state = 4
         <if test="keyWord != null and keyWord != ''">
-            and (rr.record_no like '%' #{keyWord} '%' or rr.area_id like '%' #{keyWord} '%' or rr.user_name like '%'
-            #{keyWord} '%' or rr.user_phone like '%' #{keyWord}
+            and (rr.record_no like '%' #{keyWord} '%' or rr.area_id like '%' #{keyWord} '%' or rr.address like '%' #{keyWord} '%'
+            or concat(rr.area_id,rr.address) like concat('%',#{keyWord},'%')
+            or rr.user_name like '%' #{keyWord} '%' or rr.user_phone like '%' #{keyWord}
             '%')
         </if>
         <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
@@ -423,7 +446,7 @@
         <if test="maintenanceName != null and maintenanceName != ''">
             and rr.maintenancer_name like '%' #{maintenanceName} '%'
         </if>
-        ) as offline_count
+        ) as paid_count
     </select>
 
     <!--管理端工单分页数据-->
@@ -435,6 +458,7 @@
         <result property="userPhone" column="user_phone"/>
         <result property="articleName" column="article_name"/>
         <result property="areaName" column="area_name"/>
+        <result property="addressName" column="address"/>
         <result property="description" column="description"/>
         <result property="reportTime" column="report_time"/>
         <result property="maintenancerName" column="maintenancer_name"/>
@@ -447,13 +471,13 @@
 
     <!--除已超时外的其他数据获取方式-->
     <select id="queryNotTimeout" resultType="com.repair.model.vo.RepairRecordPageVo" resultMap="repairRecordPageMap">
-        select * from (select rr.school_id,rr.user_id,1 as details,rr.id,rr.record_no,rr.area_id as
-        area_name,rr.user_name,rr.user_phone,rat.name as
-        article_name,
-        rr.description,rr.report_time,rr.maintenancer_name,rr.maintenance_state,(select user_name from repair_user where
-        id = rdv.user_id and deleted = 0) as rdvName,(select user_name from repair_user where id = rdr.users_id and
-        deleted = 0) as rdrName,(select user_name from repair_user where id = ror.user_id and
-        deleted = 0) as rorName
+        select * from (select rr.school_id,rr.user_id,1 as details,rr.id,rr.record_no,
+                              rr.area_id as area_name,rr.address,
+                              rr.user_name,rr.user_phone,rat.name as article_name,rr.description,rr.report_time,
+                              rr.maintenancer_name,rr.maintenance_state,
+                              (select user_name from repair_user where id = rdv.user_id and deleted = 0) as rdvName,
+                              (select user_name from repair_user where id = rdr.users_id and deleted = 0) as rdrName,
+                              (select user_name from repair_user where id = ror.user_id and deleted = 0) as rorName
         from repair_record rr
         left join repair_receiving rdv on rdv.deleted = 0 and rdv.record_id = rr.id and rdv.is_lose_efficacy = 0 and
         rdv.finish_time is null and rr.maintenance_state = 2
@@ -472,13 +496,16 @@
             <if test="stateStr != null and stateStr != ''">
                 and (rr.maintenance_state ${stateStr}
             </if>
-            <if test="stateStr == null or stateStr == ''">
-                and rr.maintenance_state != 4
-            </if>
+<!--            <if test="stateStr == null or stateStr == ''">-->
+<!--                and rr.maintenance_state != 4-->
+<!--            </if>-->
             <if test="keyWord != null and keyWord != ''">
-                and (rr.record_no like '%' #{keyWord} '%' or rr.area_id like '%' #{keyWord} '%' or rr.user_name like '%'
-                #{keyWord} '%' or rr.user_phone like
-                '%' #{keyWord} '%')
+                and (rr.record_no like '%' #{keyWord} '%'
+                or rr.area_id like '%' #{keyWord} '%'
+                or rr.address like '%' #{keyWord} '%'
+                or concat(rr.area_id,rr.address) like concat('%',#{keyWord},'%')
+                or rr.user_name like '%' #{keyWord} '%'
+                or rr.user_phone like '%' #{keyWord} '%')
             </if>
             <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
                 and rr.report_time between #{startTime} and #{endTime}
@@ -617,9 +644,10 @@
         <result property="maintenanceCount" column="maintenance_count"/>
         <result property="finishedCount" column="finished_count"/>
         <result property="logisticsCount" column="logistics_count"/>
-        <result property="timeoutCount" column="timeout_count"/>
+       <!-- <result property="timeoutCount" column="timeout_count"/>-->
         <result property="closedCount" column="closed_count"/>
         <result property="offlineCount" column="offline_count"/>
+        <result property="stayPayCount" column="stayPayCount"/>
     </resultMap>
 
     <select id="queryTeamWorkCount" resultType="com.repair.model.vo.TeamWorkCountVo" resultMap="teamWorkOrderMap">
@@ -653,6 +681,8 @@
         where rr7.deleted = 0 and rr7.school_id = #{schoolId} and rr7.maintenance_state = 7) as finished_count,
         (select Count(*) from repair_record rr9
         where rr9.deleted = 0 and rr9.school_id = #{schoolId} and rr9.maintenance_state = 3) as logistics_count,
+        (select Count(*) from repair_record rr9
+         where rr9.deleted = 0 and rr9.school_id = #{schoolId} and rr9.maintenance_state = 4) as stayPayCount,
         (SELECT count(*) as cs FROM (
         select rdr.users_id as user_id,rr.maintenance_state,rr.article_id,rr.id,rr.record_no,rr.report_time,rr.user_name,rr.user_phone,rr.area_id as area_name,rr.address,rr.description,rr.image,rr.maintenancer_name,rr.maintenancer_phone,rr.price  from repair_record rr
         inner join repair_dispatch_record rdr on rdr.deleted = 0 and rdr.record_id = rr.id and rdr.is_lose_efficacy = 0
@@ -736,6 +766,16 @@
         order by rr.report_time DESC
     </select>
 
+    <!--待处理/待支付-->
+    <select id="queryTeamWorkPay" resultType="com.repair.model.vo.RepairTechnicianVo"
+            resultMap="repairRecordTechnicianDataMap">
+        select rr.voice,rr.voice_length,rr.finish_voice,rr.finish_voice_length,rr.id,rr.record_no,rr.report_time,rr.user_name,rr.user_phone,rr.area_id as area_name,rr.address,rat.name as article_name ,rr.description,rr.image,'待支付' as state,rr.maintenancer_name,rr.maintenancer_phone,rr.price,rr.user_class
+        from repair_record rr
+                 left join repair_article_type rat on rat.deleted = 0 and rat.id = rr.article_id
+        where rr.deleted = 0 and rr.school_id = #{schoolId} and rr.maintenance_state = 4
+        order by rr.report_time DESC
+    </select>
+
     <!--已超时-->
     <select id="queryTeamWorkTimeout" resultType="com.repair.model.vo.RepairTechnicianVo"
             resultMap="repairRecordTechnicianDataMap">
@@ -781,11 +821,16 @@
 
     <!-- 报表导出获取除已超时外的其他数据获取方式-->
     <select id="queryNotTimeoutReportExport" resultType="com.repair.model.vo.ReportExportVo">
-        select rr.user_id,1 as details,rr.id,rr.record_no,rr.area_id as area_name,rr.user_name,rr.user_phone,rat.name as
-        article_name,
+        select rr.user_id,1 as details,rr.id,rr.record_no,rr.area_id as area_name,rr.address,
+               rr.user_name,rr.user_phone,rat.name as article_name,
+               (select name from repair_article_type where id = rat.parent_id) as repair_type,
+               rc.number,rc.total_price,rpr.is_success as is_paid,rrr.is_success as is_refund,
         rr.description,rr.report_time,rr.maintenancer_name,rr.maintenance_state
         from repair_record rr
         left join repair_article_type rat on rat.deleted = 0 and rat.id = rr.article_id
+        left join repair_consumables rc on rc.deleted = 0 and rr.id = rc.record_id
+        left join repair_pay_record rpr on rpr.deleted = 0 and rr.id = rpr.record_id
+        left join repair_refund_record rrr on rrr.deleted = 0 and rr.id = rrr.record_id
         <where>
             and rr.deleted = 0
             <if test="schoolId != null and schoolId != ''">
@@ -795,9 +840,9 @@
                 and (rr.maintenance_state ${stateStr}
             </if>
             <if test="keyWord != null and keyWord != ''">
-                and (rr.record_no like '%' #{keyWord} '%' or rr.area_id like '%' #{keyWord} '%' or rr.user_name like '%'
-                #{keyWord} '%' or rr.user_phone like
-                '%' #{keyWord} '%')
+                and (rr.record_no like '%' #{keyWord} '%' or rr.area_id like '%' #{keyWord} '%' or rr.address like '%' #{keyWord} '%'
+                or concat(rr.area_id,rr.address) like concat('%',#{keyWord},'%')
+                or rr.user_name like '%' #{keyWord} '%' or rr.user_phone like '%' #{keyWord} '%')
             </if>
             <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
                 and rr.report_time between #{startTime} and #{endTime}
@@ -870,7 +915,7 @@
         <result property="workCount" column="work_count"/>
         <result property="processCount" column="process_count"/>
         <result property="finishCount" column="finish_count"/>
-        <result property="timeoutCount" column="timeout_count"/>
+        <!--<result property="timeoutCount" column="timeout_count"/>-->
         <result property="offlineCount" column="offline_count"/>
     </resultMap>
     <!--说明:-->
@@ -998,8 +1043,16 @@
         FROM (SELECT count(rr.area_id)   AS orders_total,
                      rs.`name`           AS school_name,
                      rr.area_id          AS area_name,
-                     SUM(case when rr.price > 0 then 1 else 0 end) AS orders_compensation,
-                     SUM(case when rr.price IS NULL OR rr.price = 0 then 1 else 0 end) AS orders_gratis,
+                     (SELECT COUNT(area_id)
+                      FROM `repair_record`
+                      WHERE price > 0
+                        AND rr.area_id = area_id
+                        AND deleted = 0) AS orders_compensation,
+                     (SELECT COUNT(area_id)
+                      FROM `repair_record`
+                      WHERE (price IS NULL OR price = 0)
+                        AND rr.area_id = area_id
+                        AND deleted = 0) AS orders_gratis,
                      SUM(rr.price)       AS total_price
               FROM `repair_record` rr
                        LEFT JOIN repair_school rs ON rs.deleted = 0
@@ -1013,8 +1066,28 @@
         FROM (SELECT count(rr.area_id) AS orders_total,
         rs.`name` AS school_name,
         rr.area_id AS area_name,
-        SUM(case when rr.price > 0 then 1 else 0 end) AS orders_compensation,
-        SUM(case when rr.price IS NULL OR rr.price = 0 then 1 else 0 end) AS orders_gratis,
+        (SELECT COUNT(area_id)
+        FROM `repair_record`
+        <where>
+            AND price > 0
+            AND rr.area_id = area_id
+            AND deleted = 0
+            <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
+                and report_time between #{startTime} and #{endTime}
+            </if>
+        </where>
+        ) AS orders_compensation,
+        (SELECT COUNT(area_id)
+        FROM `repair_record`
+        <where>
+            AND (price IS NULL OR price = 0)
+            AND rr.area_id = area_id
+            AND deleted = 0
+            <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
+                and report_time between #{startTime} and #{endTime}
+            </if>
+        </where>
+        ) AS orders_gratis,
         SUM(rr.price) AS total_price
         FROM `repair_record` rr
         LEFT JOIN repair_school rs ON rs.deleted = 0
@@ -1022,7 +1095,7 @@
         <where>
             AND rr.deleted=0
             <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
-                and rr.report_time between #{startTime} and #{endTime}
+                and report_time between #{startTime} and #{endTime}
             </if>
         </where>
         GROUP BY rr.area_id) ra
@@ -1032,8 +1105,16 @@
         FROM (SELECT rat.`name`           AS article_name,
                      rat.school_id as school_id,
                      count(rr.article_id) AS orders_total,
-                     SUM(case when rr.price > 0 then 1 else 0 end) AS orders_compensation,
-                     SUM(case when rr.price IS NULL OR rr.price = 0 then 1 else 0 end) AS orders_gratis,
+                     (SELECT COUNT(article_id)
+                      FROM `repair_record`
+                      WHERE price > 0
+                        AND rr.article_id = article_id
+                        AND deleted = 0)  AS orders_compensation,
+                     (SELECT COUNT(article_id)
+                      FROM `repair_record`
+                      WHERE (price IS NULL OR price = 0)
+                        AND rr.article_id = article_id
+                        AND deleted = 0)  AS orders_gratis,
                      SUM(rr.price)        AS total_price
               FROM `repair_record` rr
                        LEFT JOIN repair_article_type rat ON rr.article_id = rat.id
@@ -1046,8 +1127,26 @@
         FROM (SELECT rat.`name` AS article_name,
         rat.school_id as school_id,
         count(rr.article_id) AS orders_total,
-        SUM(case when rr.price > 0 then 1 else 0 end) AS orders_compensation,
-        SUM(case when rr.price IS NULL OR rr.price = 0 then 1 else 0 end) AS orders_gratis,
+        (SELECT COUNT(article_id)
+        FROM `repair_record`
+        <where>
+            and price > 0 AND rr.article_id = article_id AND deleted = 0
+            <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
+                and report_time between #{startTime} and #{endTime}
+            </if>
+        </where>
+        ) AS orders_compensation,
+        (SELECT COUNT(article_id)
+        FROM `repair_record`
+        <where>
+            and (price IS NULL OR price = 0)
+            AND rr.article_id = article_id
+            AND deleted = 0
+            <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
+                and report_time between #{startTime} and #{endTime}
+            </if>
+        </where>
+        ) AS orders_gratis,
         SUM(rr.price) AS total_price
         FROM `repair_record` rr
         LEFT JOIN repair_article_type rat ON rr.article_id = rat.id
@@ -1064,8 +1163,28 @@
         FROM (SELECT count(rr.area_id) AS orders_total,
         rs.`name` AS school_name,
         rr.area_id AS area_name,
-        SUM(case when rr.price > 0 then 1 else 0 end) AS orders_compensation,
-        SUM(case when rr.price IS NULL OR rr.price = 0 then 1 else 0 end) AS orders_gratis,
+        (SELECT COUNT(area_id)
+        FROM `repair_record`
+        <where>
+            AND price > 0
+            AND rr.area_id = area_id
+            AND deleted = 0
+            <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
+                and report_time between #{startTime} and #{endTime}
+            </if>
+        </where>
+        ) AS orders_compensation,
+        (SELECT COUNT(area_id)
+        FROM `repair_record`
+        <where>
+            AND (price IS NULL OR price = 0)
+            AND rr.area_id = area_id
+            AND deleted = 0
+            <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
+                and report_time between #{startTime} and #{endTime}
+            </if>
+        </where>
+        ) AS orders_gratis,
         SUM(rr.price) AS total_price
         FROM `repair_record` rr
         LEFT JOIN repair_school rs ON rs.deleted = 0
@@ -1084,8 +1203,26 @@
         FROM (SELECT rat.`name` AS article_name,
         rat.school_id as school_id,
         count(rr.article_id) AS orders_total,
-        SUM(case when rr.price > 0 then 1 else 0 end) AS orders_compensation,
-        SUM(case when rr.price IS NULL OR rr.price = 0 then 1 else 0 end) AS orders_gratis,
+        (SELECT COUNT(article_id)
+        FROM `repair_record`
+        <where>
+            and price > 0 AND rr.article_id = article_id AND deleted = 0
+            <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
+                and report_time between #{startTime} and #{endTime}
+            </if>
+        </where>
+        ) AS orders_compensation,
+        (SELECT COUNT(article_id)
+        FROM `repair_record`
+        <where>
+            and (price IS NULL OR price = 0)
+            AND rr.article_id = article_id
+            AND deleted = 0
+            <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
+                and report_time between #{startTime} and #{endTime}
+            </if>
+        </where>
+        ) AS orders_gratis,
         SUM(rr.price) AS total_price
         FROM `repair_record` rr
         LEFT JOIN repair_article_type rat ON rat.deleted = 0
@@ -1207,6 +1344,15 @@
         (SELECT COUNT(*) FROM repair_record
         <where>
             AND deleted = 0
+            and maintenance_state = 10
+            <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
+                and report_time between #{startTime} and #{endTime}
+            </if>
+        </where>
+        ) as offlineCount ,
+        (SELECT COUNT(*) FROM repair_record
+        <where>
+            AND deleted = 0
             and maintenance_state = 4
             <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
                 and report_time between #{startTime} and #{endTime}
@@ -1300,6 +1446,15 @@
         (SELECT COUNT(*) FROM repair_record
         <where>
             AND deleted = 0
+            and maintenance_state = 10
+            <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
+                and report_time between #{startTime} and #{endTime}
+            </if>
+        </where>
+        ) as offlineCount ,
+        (SELECT COUNT(*) FROM repair_record
+        <where>
+            AND deleted = 0
             and maintenance_state = 8
             <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
                 and report_time between #{startTime} and #{endTime}
@@ -1362,7 +1517,12 @@
                       FROM repair_record
                       where deleted = 0
                         and maintenance_state = 4)
-                                                           as affirm_count
+                                                           as affirm_count,
+                    (SELECT COUNT(*)
+                     FROM  repair_record
+                     where deleted =0
+                      and maintenance_state = 10)
+                                                           as offlineCount;
     </select>
 
     <!--打印-->

+ 57 - 24
src/main/resources/mapper/repair/RepairUserMapper.xml

@@ -15,12 +15,12 @@
         <result property="userZzname" column="user_zzname"/>
         <result property="workType" column="work_type"/>
         <result property="workTypeName" column="work_type_name"/>
-        <result property="acceptanceTime" column="acceptance_assess_time"/>
-        <result property="maintenanceTime" column="maintenance_assess_time"/>
+<!--        <result property="acceptanceTime" column="acceptance_assess_time"/>-->
+<!--        <result property="maintenanceTime" column="maintenance_assess_time"/>-->
     </resultMap>
 
     <select id="queryUserPageList" resultType="com.repair.model.vo.RepairUserVo" resultMap="repairUserPageMap">
-        select ru.card_number,ru.acceptance_assess_time,ru.maintenance_assess_time,ru.id,ru.user_name, ru.user_phone, ru.team_id, case ru.team_id when 0 then '校方人员' else '第三方人员' end as team_name, ru.school_id,ra.name as school_name,
+        select ru.card_number,ru.id,ru.user_name, ru.user_phone, ru.team_id, case ru.team_id when 0 then '校方人员' else '第三方人员' end as team_name, ru.school_id,ra.name as school_name,
         ru.user_zzid,ru.work_type,rwt.name as work_type_name from repair_user ru
         left join repair_area ra on ra.id = ru.school_id and ra.deleted = 0
         left join repair_work_type rwt on rwt.id = ru.work_type and ra.deleted = 0
@@ -168,21 +168,29 @@
         <result property="acceptanceTime" column="acceptance_assess_time"/>
         <result property="maintenanceTime" column="maintenance_assess_time"/>
         <result property="startDate" column="start_date"/>
-        <result property="shiftId" column="shift_id"/>
+        <result property="shiftId" column="shift_Id"/>
+        <result property="teamName" column="team_Name"/>
+        <result property="userZzName" column="userZz_Name"/>
+
     </resultMap>
 
     <select id="autoDispatchUser" resultType="com.repair.model.vo.AutoDispatchUserVo" resultMap="AutoDispatchUserMap">
         select * from (
-        select ru.user_zzid,wt.name as work_type,'正常接单' as state,(select count(*) from repair_dispatch_record where deleted = 0 and is_lose_efficacy = 0 and assigned_time like '%' #{dateNow} '%' and users_id = ru.id) as rdr_count,ru.user_phone,ru.acceptance_assess_time,ru.maintenance_assess_time,ru.id,ru.user_name,rcs.start_date,rcs.shift_id
+            select ru.user_zzid,wt.name as work_type,'正常接单' as state,
+            (select count(*) from repair_dispatch_record where deleted = 0 and is_lose_efficacy = 0 and assigned_time like '%' #{dateNow} '%' and users_id = ru.id) as rdr_count,
+            ru.user_phone,ru.acceptance_assess_time,ru.maintenance_assess_time,ru.id,ru.user_name,rcs.start_date,rcs.shift_id
         from repair_user ru
         inner join repair_classes_settings rcs on rcs.deleted = 0 and rcs.user_id = ru.id and start_date = #{dateNow}
         left join repair_work_type wt on wt.deleted = 0 and wt.id = ru.work_type
         where ru.school_id = #{schoolId} and ru.deleted = 0 and (ru.user_zzid = 1 or ru.user_zzid = 2) and ru.state = 1
-        and ru.id in (select user_id from
-        (select user_id,(select GROUP_CONCAT(id) from repair_article_type where (id = repair_article_build.article_id or parent_id = repair_article_build.article_id) and deleted = 0) as article_id,build_id
-        from repair_article_build
-        where deleted = 0) d
-        where FIND_IN_SET(${articleId},d.article_id) and FIND_IN_SET(${buildId},d.build_id))
+--         取消物品类别限制
+        <if test="articleId != null and articleId != '' and buildId != null and buildId != ''">
+            and ru.id in (select user_id from
+            (select user_id,(select GROUP_CONCAT(id) from repair_article_type where (id = repair_article_build.article_id or parent_id = repair_article_build.article_id) and deleted = 0) as article_id,build_id
+            from repair_article_build
+            where deleted = 0) d
+            where FIND_IN_SET(${articleId},d.article_id) and FIND_IN_SET(${buildId},d.build_id))
+        </if>
         <if test="keyWord != null and keyWord != ''">
             and (ru.user_name like '%' #{keyWord} '%' or ru.user_phone like '%' #{keyWord} '%')
         </if>
@@ -190,6 +198,30 @@
         order by t.rdr_count
     </select>
 
+    <resultMap type="com.repair.model.vo.AutoDispatchUserVo" id="AutoOfflineUserMap1">
+        <result property="id" column="id"/>
+        <result property="state" column="state"/>
+        <result property="workType" column="work_type"/>
+        <result property="rdrCount" column="rdr_count"/>
+        <result property="userName" column="user_name"/>
+        <result property="userPhone" column="user_phone"/>
+        <result property="acceptanceTime" column="acceptance_assess_time"/>
+        <result property="maintenanceTime" column="maintenance_assess_time"/>
+        <result property="startDate" column="start_date"/>
+        <result property="shiftId" column="shift_Id"/>
+        <result property="teamName" column="team_Name"/>
+        <result property="userZzName" column="userZz_Name"/>
+    </resultMap>
+    <select id="autoOfflineRepairUser1" resultType="com.repair.model.vo.AutoOfflineUserVo" resultMap="AutoOfflineUserMap1">
+        select ru.id,ru.user_zzid,ru.user_name,case team_id when 0 then '校方人员' else '第三方人员' end as team_name,'线下' as userZz_name,wt.name as work_type
+        from repair_user ru
+        left join repair_work_type wt on wt.deleted = 0 and wt.id = ru.work_type
+        where ru.school_id = #{schoolId} and ru.deleted = 0 and ru.user_zzid = 4 and ru.state = 1
+        <if test="keyWord != null and keyWord != ''">
+            and ru.user_name like '%' #{keyWord} '%'
+        </if>
+    </select>
+
 
     <resultMap type="com.repair.model.vo.AutoOfflineUserVo" id="AutoOfflineUserMap">
         <result property="id" column="id"/>
@@ -198,12 +230,11 @@
         <result property="userZzName" column="userZz_name"/>
         <result property="workType" column="work_type"/>
     </resultMap>
-
     <select id="autoOfflineRepairUser" resultType="com.repair.model.vo.AutoOfflineUserVo" resultMap="AutoOfflineUserMap">
         select ru.id,ru.user_name,case team_id when 0 then '校方人员' else '第三方人员' end as team_name,'线下' as userZz_name,wt.name as work_type
         from repair_user ru
         left join repair_work_type wt on wt.deleted = 0 and wt.id = ru.work_type
-        where ru.school_id = #{schoolId} and ru.deleted = 0 and ru.user_zzid = 4 and ru.state = 1
+        where ru.school_id = #{schoolId} and ru.deleted = 0 and (ru.user_zzid = 4 or ru.user_zzid = 1) and ru.state = 1
         <if test="keyWord != null and keyWord != ''">
             and ru.user_name like '%' #{keyWord} '%'
         </if>
@@ -243,20 +274,22 @@
         where ru.deleted = 0 and (ru.user_zzid = 1 or ru.user_zzid = 2) and ru.school_id = #{schoolId}
     </select>
 
+
     <select id="dropDown" resultType="com.repair.model.vo.AutoDispatchUserVo">
         select * from (
-    select wt.name as work_type,'正常接单' as state,(select count(*) from repair_dispatch_record where deleted = 0 and is_lose_efficacy = 0  and users_id = ru.id) as rdr_count,ru.build_id,ru.user_phone,ru.acceptance_assess_time,ru.maintenance_assess_time,ru.id,ru.user_name,rcs.start_date,rcs.shift_id
-    from repair_user ru
-    inner join repair_classes_settings rcs on rcs.deleted = 0 and rcs.user_id = ru.id and rcs.start_date = CURRENT_DATE()
-    left join repair_work_type wt on wt.deleted = 0 and wt.id = ru.work_type
-    where
-    ru.id in (select user_id from
-        (select user_id,(select GROUP_CONCAT(id) from repair_article_type where (id = repair_article_build.article_id or parent_id = repair_article_build.article_id) and deleted = 0) as article_id,build_id
-        from repair_article_build
-        where deleted = 0) d
-        where FIND_IN_SET(${articleId},d.article_id) and FIND_IN_SET(${buildId},d.build_id)) and
-    ru.school_id = #{schoolId} and ru.deleted = 0 and (ru.user_zzid = 1 or ru.user_zzid = 2) and ru.state = 1 and ru.id != ${userId}) t
-    order by t.rdr_count
+          select wt.name as work_type,'正常接单' as state,(select count(*) from repair_dispatch_record where deleted = 0 and is_lose_efficacy = 0  and users_id = ru.id) as rdr_count,ru.build_id,ru.user_phone,ru.acceptance_assess_time,ru.maintenance_assess_time,ru.id,ru.user_name,rcs.start_date,rcs.shift_id
+          from repair_user ru
+                   inner join repair_classes_settings rcs on rcs.deleted = 0 and rcs.user_id = ru.id and rcs.start_date = CURRENT_DATE()
+                   left join repair_work_type wt on wt.deleted = 0 and wt.id = ru.work_type
+          where
+                  ru.id in (select user_id from
+                  (select user_id,(select GROUP_CONCAT(id) from repair_article_type where (id = repair_article_build.article_id or parent_id = repair_article_build.article_id) and deleted = 0) as article_id,build_id
+                   from repair_article_build
+                   where deleted = 0) d
+                            where FIND_IN_SET(${articleId},d.article_id) and FIND_IN_SET(${buildId},d.build_id)) and
+              ru.school_id = #{schoolId} and ru.deleted = 0 and (ru.user_zzid = 1 or ru.user_zzid = 2) and ru.state = 1 and ru.id != ${userId}) t
+        order by t.rdr_count
     </select>
 
+
 </mapper>

+ 97 - 0
target/classes/META-INF/spring-configuration-metadata.json

@@ -0,0 +1,97 @@
+{
+  "groups": [
+    {
+      "name": "openid",
+      "type": "com.repair.config.WxOpenidConfig",
+      "sourceType": "com.repair.config.WxOpenidConfig"
+    },
+    {
+      "name": "tencentcloud",
+      "type": "com.repair.config.SmsConfig",
+      "sourceType": "com.repair.config.SmsConfig"
+    }
+  ],
+  "properties": [
+    {
+      "name": "openid.appid",
+      "type": "java.lang.String",
+      "sourceType": "com.repair.config.WxOpenidConfig"
+    },
+    {
+      "name": "openid.appkey",
+      "type": "java.lang.String",
+      "sourceType": "com.repair.config.WxOpenidConfig"
+    },
+    {
+      "name": "openid.granttype",
+      "type": "java.lang.String",
+      "sourceType": "com.repair.config.WxOpenidConfig"
+    },
+    {
+      "name": "openid.ipconfig",
+      "type": "java.lang.String",
+      "sourceType": "com.repair.config.WxOpenidConfig"
+    },
+    {
+      "name": "openid.ocode",
+      "type": "java.lang.String",
+      "sourceType": "com.repair.config.WxOpenidConfig"
+    },
+    {
+      "name": "openid.return-url",
+      "type": "java.lang.String",
+      "sourceType": "com.repair.config.WxOpenidConfig"
+    },
+    {
+      "name": "openid.shappid",
+      "type": "java.lang.String",
+      "sourceType": "com.repair.config.WxOpenidConfig"
+    },
+    {
+      "name": "openid.shsecret",
+      "type": "java.lang.String",
+      "sourceType": "com.repair.config.WxOpenidConfig"
+    },
+    {
+      "name": "openid.xappid",
+      "type": "java.lang.String",
+      "sourceType": "com.repair.config.WxOpenidConfig"
+    },
+    {
+      "name": "openid.xsecret",
+      "type": "java.lang.String",
+      "sourceType": "com.repair.config.WxOpenidConfig"
+    },
+    {
+      "name": "tencentcloud.sdk-appid",
+      "type": "java.lang.String",
+      "sourceType": "com.repair.config.SmsConfig"
+    },
+    {
+      "name": "tencentcloud.secret-i-d",
+      "type": "java.lang.String",
+      "sourceType": "com.repair.config.SmsConfig"
+    },
+    {
+      "name": "tencentcloud.secret-key",
+      "type": "java.lang.String",
+      "sourceType": "com.repair.config.SmsConfig"
+    },
+    {
+      "name": "tencentcloud.sign-name",
+      "type": "java.lang.String",
+      "sourceType": "com.repair.config.SmsConfig"
+    },
+    {
+      "name": "tencentcloud.sms-min",
+      "type": "java.lang.String",
+      "sourceType": "com.repair.config.SmsConfig"
+    },
+    {
+      "name": "tencentcloud.template-id",
+      "type": "java.lang.String",
+      "sourceType": "com.repair.config.SmsConfig"
+    }
+  ],
+  "hints": []
+}

File diff suppressed because it is too large
+ 80 - 0
target/classes/application-dev.yml


File diff suppressed because it is too large
+ 79 - 0
target/classes/application-prod.yml


File diff suppressed because it is too large
+ 76 - 0
target/classes/application.yml


BIN
target/classes/excelFile/耗材管理模板.xlsx


BIN
target/classes/excelFile/自定义排班模板.xlsx


+ 5 - 0
target/classes/mapper/repair/RepairAdminMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.repair.mapper.RepairAdminMapper">
+
+</mapper>

+ 14 - 0
target/classes/mapper/repair/RepairAreaMapper.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.repair.mapper.RepairAreaMapper">
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.repair.model.vo.RepairSchoolVo" id="repairSchoolMap">
+        <result property="id" column="id"/>
+        <result property="name" column="name"/>
+    </resultMap>
+
+    <select id="queryRepairSchools" resultMap="repairSchoolMap">
+        select id,name from repair_area where parent_id = 0 and deleted = 0
+    </select>
+
+</mapper>

+ 5 - 0
target/classes/mapper/repair/RepairArticleBuildMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.repair.mapper.RepairArticleBuildMapper">
+
+</mapper>

+ 36 - 0
target/classes/mapper/repair/RepairArticleTypeMapper.xml

@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.repair.mapper.RepairArticleTypeMapper">
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.repair.model.vo.RepairWorkTypeVo" id="repairArticleTypeMap">
+        <result property="id" column="id"/>
+        <result property="name" column="name"/>
+    </resultMap>
+
+    <select id="queryArticleTypeList" resultType="com.repair.model.vo.RepairWorkTypeVo" resultMap="repairArticleTypeMap">
+       select id,name from repair_article_type
+        <where>
+            and deleted = 0 and parent_id = 0
+            <if test="schoolId != null and schoolId != ''">
+                and school_id = #{schoolId}
+            </if>
+        </where>
+    </select>
+
+
+    <resultMap type="com.repair.model.vo.RepairArticleChildVo" id="repairArticleChildMap">
+        <result property="id" column="id"/>
+        <result property="name" column="name"/>
+        <result property="childId" column="child_id"/>
+    </resultMap>
+
+    <select id="queryArticleChildList" resultType="com.repair.model.vo.RepairArticleChildVo" resultMap="repairArticleChildMap">
+        SELECT CONCAT_WS(',', GROUP_CONCAT(rt.id separator','), rat.id) as child_id,rat.id,rat.`name` FROM repair_article_type rat
+        left join repair_article_type rt on rt.deleted = 0 and rt.parent_id = rat.id
+        where rat.deleted = 0 and rat.parent_id = 0 and rat.school_id = #{schoolId}
+        group by rat.id
+
+    </select>
+    <!--order by locate(#{keyWord},rat.name) desc 按关键字模糊查询排序-->
+
+</mapper>

+ 68 - 0
target/classes/mapper/repair/RepairClassesSettingsMapper.xml

@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.repair.mapper.RepairClassesSettingsMapper">
+
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.repair.model.vo.ClassesSettingVo" id="repairClassesListMap">
+        <result property="id" column="id"/>
+        <result property="userId" column="user_id"/>
+        <result property="startDate" column="start_date"/>
+        <result property="shiftId" column="shift_id"/>
+        <result property="shiftName" column="shift_name"/>
+        <result property="shiftColor" column="shift_color"/>
+    </resultMap>
+
+    <select id="queryClassesSettingList" resultType="com.repair.model.vo.ClassesSettingVo" resultMap="repairClassesListMap">
+        SELECT rcs.id,rcs.user_id,rcs.start_date,rcs.shift_id,(select GROUP_CONCAT(name) from repair_shift_settings where find_in_set(id,rcs.shift_id) and deleted = 0) as shift_name
+        ,(select GROUP_CONCAT(color) from repair_shift_settings where find_in_set(id,rcs.shift_id) and deleted = 0) as shift_color
+        FROM repair_classes_settings rcs
+        <where>
+            and rcs.deleted = 0
+            <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
+                and rcs.start_date BETWEEN #{startTime} and #{endTime}
+            </if>
+            <if test="userIds != null and userIds.size() > 0">
+                and rcs.user_id in
+                <foreach collection="userIds" item="userId" index="index" open="(" close=")" separator=",">
+                    ${userId}
+                </foreach>
+            </if>
+        </where>
+    </select>
+
+    <resultMap type="com.repair.model.vo.ClassesDataVo" id="repairClassesDataMap">
+        <result property="id" column="id"/>
+        <result property="userId" column="user_id"/>
+        <result property="shiftId" column="shift_id"/>
+        <result property="shiftName" column="shift_name"/>
+        <!--<result property="shiftColor" column="shift_color"/>-->
+    </resultMap>
+    <select id="queryClassesDatas" resultType="com.repair.model.vo.ClassesDataVo" resultMap="repairClassesDataMap">
+        SELECT rcs.id,rcs.user_id,rcs.shift_id,(select GROUP_CONCAT(name) from repair_shift_settings where find_in_set(id,rcs.shift_id) and deleted = 0) as shift_name
+        FROM repair_classes_settings rcs
+        <where>
+            and rcs.deleted = 0
+            <if test="startDate != null and startDate != ''">
+                and rcs.start_date = CURRENT_DATE()
+            </if>
+            <if test="userIds != null and userIds.size() > 0">
+                and rcs.user_id in
+                <foreach collection="userIds" item="userId" index="index" open="(" close=")" separator=",">
+                    ${userId}
+                </foreach>
+            </if>
+        </where>
+    </select>
+
+    <select id="queryClassesData" resultType="com.repair.model.vo.ClassesDataVo" resultMap="repairClassesDataMap">
+        SELECT rcs.id,rcs.user_id,rcs.shift_id,(select GROUP_CONCAT(name) from repair_shift_settings where find_in_set(id,rcs.shift_id) and deleted = 0) as shift_name
+        FROM repair_classes_settings rcs
+        <where>
+            and rcs.deleted = 0 and rcs.start_date = CURRENT_DATE()
+            <if test="userId != null and userId != ''">
+                and rcs.user_id = ${userId}
+            </if>
+        </where>
+    </select>
+
+</mapper>

+ 5 - 0
target/classes/mapper/repair/RepairCloseMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.repair.mapper.RepairCloseMapper">
+
+</mapper>

+ 61 - 0
target/classes/mapper/repair/RepairCollaborateRecordMapper.xml

@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.repair.mapper.RepairCollaborateRecordMapper">
+
+    <resultMap type="com.repair.model.vo.CollaborateRecordVo" id="repairCollaborateRecordMap">
+        <result property="id" column="id"/>
+        <result property="recordId" column="record_id"/>
+        <result property="state" column="state"/>
+    </resultMap>
+
+    <select id="queryCollaborateRecordList" resultType="com.repair.model.vo.CollaborateRecordVo" resultMap="repairCollaborateRecordMap">
+        select id,record_id,'转单' as state from repair_transfer_record
+        <where>
+            and deleted = 0 and approval_statu = 2
+            <if test="recordIds != null and recordIds.size() > 0">
+                and record_id in
+                <foreach collection="recordIds" item="recordId" index="index" open="(" close=")" separator=",">
+                    ${recordId}
+                </foreach>
+            </if>
+        </where>
+        UNION ALL
+        select id,record_id,'协作' as state from repair_collaborate_record
+        <where>
+            and deleted = 0 and approval_statu = 2
+            <if test="recordIds != null and recordIds.size() > 0">
+                and record_id in
+                <foreach collection="recordIds" item="recordId" index="index" open="(" close=")" separator=",">
+                    ${recordId}
+                </foreach>
+            </if>
+        </where>
+        UNION ALL
+        select id,record_id,'转线下' as state from repair_offline_record
+        <where>
+            and deleted = 0 and approval_statu = 2
+            <if test="recordIds != null and recordIds.size() > 0">
+                and record_id in
+                <foreach collection="recordIds" item="recordId" index="index" open="(" close=")" separator=",">
+                    ${recordId}
+                </foreach>
+            </if>
+        </where>
+    </select>
+
+    <resultMap type="com.repair.model.vo.CollaborateDetailVo" id="repairCollaborateDetailMap">
+        <result property="id" column="id"/>
+        <result property="userName" column="user_name"/>
+        <result property="collaboratorName" column="collaborator_name"/>
+        <result property="voice" column="voice"/>
+        <result property="voiceLength" column="voice_length"/>
+        <result property="remark" column="remark"/>
+    </resultMap>
+    <select id="queryCollaborateDetail" resultType="com.repair.model.vo.CollaborateDetailVo" resultMap="repairCollaborateDetailMap">
+        select rcr.id,rcr.voice_length,rus.user_name,GROUP_CONCAT(CONCAT(ru.id,'-',ru.user_name)) as collaborator_name,rcr.voice,rcr.remark from repair_collaborate_record rcr
+        left join repair_user ru on ru.deleted = 0 and find_in_set(ru.id,rcr.collaborator)
+        left join repair_user rus on rus.deleted = 0 and rus.id = rcr.user_id
+        where rcr.deleted = 0 and rcr.approval_statu = 2 and rcr.record_id = #{recordId}
+        group by rcr.id
+    </select>
+</mapper>

+ 85 - 0
target/classes/mapper/repair/RepairConsumablesMapper.xml

@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.repair.mapper.RepairConsumablesMapper">
+
+    <resultMap type="com.repair.model.vo.ConsumablePageVo" id="repairConsumablePageMap">
+        <result property="id" column="id"/>
+        <result property="consumeName" column="consume_name"/>
+        <result property="price" column="price"/>
+        <result property="number" column="number"/>
+        <result property="totalPrice" column="total_price"/>
+        <result property="articleName" column="article_name"/>
+        <result property="recordNo" column="record_no"/>
+        <result property="reportTime" column="report_time"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+
+    <select id="queryConsumablePageList" resultType="com.repair.model.vo.ConsumablePageVo" resultMap="repairConsumablePageMap">
+        select rr.school_id,rr.area_id as area_name,rcs.id,rcs.change_user,rcs.consume_name,rcs.price,rcs.number,rcs.total_price,(select GROUP_CONCAT(name) from repair_article_type where find_in_set(id,rc.article_id) and deleted = 0) as article_name
+        ,rr.record_no,rr.report_time,rcs.update_time from repair_consumables rcs
+        left join repair_consume rc on rc.deleted = 0 and rc.id = rcs.consume_id
+        left join repair_record rr on rr.deleted = 0 and rr.id = rcs.record_id
+        <where>
+            and rcs.deleted = 0
+            <if test="keyWord != null and keyWord != ''">
+                and (rcs.consume_name like '%' #{keyWord} '%' or rr.record_no like '%' #{keyWord} '%')
+            </if>
+            <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
+                and rcs.update_time BETWEEN #{startTime} and #{endTime}
+            </if>
+            <if test="schoolId != null and schoolId != ''">
+                and rr.school_id =#{schoolId}
+            </if>
+        </where>
+        order by rr.report_time desc,rcs.update_time desc
+    </select>
+
+    <resultMap type="com.repair.model.vo.ConsumableExcelVo" id="repairConsumableExcelMap">
+        <result property="id" column="id"/>
+        <result property="consumeName" column="consume_name"/>
+        <result property="price" column="price"/>
+        <result property="number" column="number"/>
+        <result property="totalPrice" column="total_price"/>
+        <result property="articleName" column="article_name"/>
+        <result property="recordNo" column="record_no"/>
+        <result property="reportTime" column="report_time"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+
+    <select id="queryConsumableExcelList" resultType="com.repair.model.vo.ConsumableExcelVo" resultMap="repairConsumableExcelMap">
+        select rcs.id,rcs.consume_name,rcs.price,rcs.number,rcs.total_price,(select GROUP_CONCAT(name) from repair_article_type where find_in_set(id,rc.article_id) and deleted = 0) as article_name
+        ,rr.record_no,rr.report_time,rcs.update_time from repair_consumables rcs
+        left join repair_consume rc on rc.deleted = 0 and rc.id = rcs.consume_id
+        left join repair_record rr on rr.deleted = 0 and rr.id = rcs.record_id
+        <where>
+            and rcs.deleted = 0
+            <if test="keyWord != null and keyWord != ''">
+                and (rcs.consume_name like '%' #{keyWord} '%' or rr.record_no like '%' #{keyWord} '%')
+            </if>
+            <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
+                and rcs.update_time BETWEEN #{startTime} and #{endTime}
+            </if>
+        </where>
+        order by rr.report_time desc,rcs.update_time desc
+    </select>
+
+    <resultMap type="com.repair.model.vo.ChangeConsumesVo" id="repairChangeConsumesMap">
+        <result property="id" column="id"/>
+        <result property="articleId" column="article_id"/>
+        <result property="consumeId" column="consume_id"/>
+        <result property="consumeName" column="consume_name"/>
+        <result property="price" column="price"/>
+        <result property="number" column="number"/>
+    </resultMap>
+    <select id="repairChangeConsumes" resultType="com.repair.model.vo.ChangeConsumesVo" resultMap="repairChangeConsumesMap">
+        select id,article_id,consume_id,consume_name,price,number from repair_consumables
+        <where>
+            and deleted = 0
+            <if test="recordId != null and recordId != ''">
+                and record_id = #{recordId}
+            </if>
+        </where>
+        order by update_time desc
+    </select>
+
+</mapper>

+ 94 - 0
target/classes/mapper/repair/RepairConsumeMapper.xml

@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.repair.mapper.RepairConsumeMapper">
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.repair.model.vo.ConsumeVo" id="repairConsumeMap">
+        <result property="id" column="id"/>
+        <result property="name" column="name"/>
+        <result property="price" column="price"/>
+        <result property="schoolName" column="school_name"/>
+        <result property="artileName" column="artile_name"/>
+        <result property="entryName" column="entry_name"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+
+    <select id="queryConsumeList" resultType="com.repair.model.vo.ConsumeVo" resultMap="repairConsumeMap">
+       SELECT rc.id,rc.name,rc.price,rae.name as school_name,ra.username as entry_name,ra.update_time ,(select GROUP_CONCAT(name) from repair_article_type where find_in_set(id,rc.article_id) and deleted = 0) as artile_name FROM `repair_consume` rc
+        left join repair_admin ra on ra.id = rc.update_user and ra.deleted = 0
+        left join repair_area rae on rae.id = rc.school_id and rae.deleted = 0
+        <where>
+            and rc.deleted = 0
+            <if test="name != null and name != ''">
+                and rc.name like '%' #{name} '%'
+            </if>
+            <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
+                and rc.update_time BETWEEN #{startTime} and #{endTime}
+            </if>
+        </where>
+    </select>
+
+    <resultMap type="com.repair.model.vo.RepairConsumeVo" id="repairConsumePageMap">
+        <result property="id" column="id"/>
+        <result property="name" column="name"/>
+        <result property="content" column="content"/>
+        <result property="price" column="price"/>
+        <result property="articleId" column="article_id"/>
+        <result property="userName" column="user_name"/>
+        <result property="articleName" column="article_name"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="schoolId" column="school_id"/>
+    </resultMap>
+
+    <select id="queryConsumePageList" resultType="com.repair.model.vo.RepairConsumeVo" resultMap="repairConsumePageMap">
+        select rc.school_id,rc.update_time,rc.id,rc.name,rc.content,rc.price,rc.article_id,ra.username as user_name,(select GROUP_CONCAT(name) from repair_article_type where find_in_set(id,rc.article_id)) as article_name from repair_consume rc
+        left join repair_admin ra on rc.update_user = ra.id and ra.deleted = 0
+        <where>
+            and rc.deleted = 0
+            <if test="name != null and name != ''">
+                and rc.name like '%' #{name} '%'
+            </if>
+            <if test="schoolId != null and schoolId != ''">
+                and rc.school_id = #{schoolId}
+            </if>
+            <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
+                and rc.update_time BETWEEN #{startTime} and #{endTime}
+            </if>
+        </where>
+    </select>
+
+
+    <resultMap type="com.repair.model.vo.RepairArticleConsumeVo" id="repairArticleConsumeMap">
+        <result property="id" column="id"/>
+        <result property="name" column="name"/>
+        <result property="articleId" column="article_id"/>
+        <result property="price" column="price"/>
+    </resultMap>
+
+    <select id="queryArticleConsumes" resultType="com.repair.model.vo.RepairArticleConsumeVo" resultMap="repairArticleConsumeMap">
+        select id,article_id,name,price from repair_consume
+        <where>
+            and deleted =0
+            <if test="schoolId != null and schoolId != ''">
+                and school_id = #{schoolId}
+            </if>
+            <if test="keyWork != null and keyWork != ''">
+                and name like '%' #{keyWork} '%'
+            </if>
+            <if test="findInSet != null and findInSet != ''">
+                and (${findInSet})
+            </if>
+        </where>
+    </select>
+    <select id="queryArticleConsumesName" resultType="com.repair.model.vo.RepairArticleConsumeVo">
+        select id,article_id,name,price from repair_consume
+        <where>
+        and deleted =0
+        <if test="schoolId != null and schoolId != ''">
+            and school_id = #{schoolId}
+        </if>
+        <if test="findInSet != null and findInSet != ''">
+            and (${findInSet})
+        </if>
+        </where>
+    </select>
+</mapper>

+ 32 - 0
target/classes/mapper/repair/RepairDispatchRecordMapper.xml

@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.repair.mapper.RepairDispatchRecordMapper">
+    <resultMap type="com.repair.model.vo.RepairCardNumberVo" id="repairCardNumberMap">
+        <result property="userId" column="users_id"/>
+        <result property="cardNumber" column="card_number"/>
+    </resultMap>
+
+    <select id="queryRepairCardNumber" resultType="com.repair.model.vo.RepairCardNumberVo" resultMap="repairCardNumberMap">
+        SELECT ru.card_number,rdr.users_id FROM repair_dispatch_record rdr
+        left join repair_user ru on ru.deleted = 0 and ru.id = rdr.users_id
+        <where>
+            and rdr.deleted = 0 and rdr.is_lose_efficacy = 0
+            <if test="recordId != null and recordId != ''">
+                and rdr.record_id = #{recordId}
+            </if>
+        </where>
+    </select>
+
+    <!--查看当员工是否存在待接单或者维修中的数据-->
+    <resultMap type="com.repair.model.vo.DisReceCountVo" id="disReceCountMap">
+        <result property="disCount" column="dis_count"/>
+        <result property="recCount" column="rec_count"/>
+    </resultMap>
+    <select id="queryDisReceCount" resultType="com.repair.model.vo.DisReceCountVo" resultMap="disReceCountMap">
+        select (select Count(*) from repair_dispatch_record
+        where deleted = 0 and is_lose_efficacy = 0 and users_id = #{userId}) as dis_count,
+        (select Count(*) as count from repair_receiving
+        where deleted = 0 and is_lose_efficacy = 0 and user_id = #{userId}) as rec_count
+    </select>
+
+</mapper>

+ 50 - 0
target/classes/mapper/repair/RepairEvaluateMapper.xml

@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.repair.mapper.RepairEvaluateMapper">
+
+    <resultMap type="com.repair.model.vo.EvaluateVo" id="repairEvaluatePageMap">
+        <result property="id" column="id"/>
+        <result property="recordId" column="record_id"/>
+        <result property="recordNo" column="record_no"/>
+        <result property="userName" column="user_name"/>
+        <result property="userPhone" column="user_phone"/>
+        <result property="description" column="description"/>
+        <result property="reportTime" column="report_time"/>
+        <result property="maintenancerName" column="maintenancer_name"/>
+        <result property="star" column="star"/>
+        <result property="content" column="content"/>
+        <result property="createTime" column="create_time"/>
+    </resultMap>
+
+    <select id="queryEvaluatePageList" resultType="com.repair.model.vo.EvaluateVo" resultMap="repairEvaluatePageMap">
+        select
+        re.id,re.record_id,rr.record_no,rr.user_name,rr.user_phone,rr.description,rr.report_time,rr.maintenancer_name,re.star,re.content,re.create_time
+        from repair_evaluate re
+        left join repair_record rr on rr.id = re.record_id and rr.deleted = 0
+        <where>
+            and re.deleted = 0
+            <if test="keyWord != null and keyWord != ''">
+                and (rr.user_name like '%' #{keyWord} '%' or rr.record_no like '%' #{keyWord} '%')
+            </if>
+            <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
+                and re.create_time BETWEEN #{startTime} and #{endTime}
+            </if>
+            <if test="star != null and star != ''">
+                and re.star = #{star}
+            </if>
+        </where>
+        order by re.create_time desc
+    </select>
+
+    <resultMap type="com.repair.model.vo.RecordEvaluateVo" id="repairRecordEvaluateMap">
+        <result property="id" column="id"/>
+        <result property="userId" column="user_id"/>
+        <result property="maintenancerId" column="maintenancer_id"/>
+    </resultMap>
+    <!--当前时间-24小时-->
+    <select id="queryEvaluateList" resultType="com.repair.model.vo.RecordEvaluateVo" resultMap="repairRecordEvaluateMap">
+        SELECT rr.id,rr.user_id,rr.maintenancer_id FROM repair_record rr
+        where rr.deleted = 0 and rr.maintenance_state = 7 and rr.update_time &lt;= #{dateStr}
+        and NOT EXISTS (select id from repair_evaluate where deleted = 0 and record_id = rr.id)
+    </select>
+</mapper>

+ 5 - 0
target/classes/mapper/repair/RepairLeaveMessageMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.repair.mapper.RepairLeaveMessageMapper">
+
+</mapper>

+ 24 - 0
target/classes/mapper/repair/RepairNoticeSettingMapper.xml

@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.repair.mapper.RepairNoticeSettingMapper">
+
+    <resultMap type="com.repair.model.vo.NoticePageVo" id="repairNoticePageMap">
+        <result property="id" column="id"/>
+        <result property="content" column="content"/>
+        <result property="userName" column="username"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="isTop" column="is_top"/>
+    </resultMap>
+
+    <select id="queryNoticePageList" resultType="com.repair.model.vo.NoticePageVo" resultMap="repairNoticePageMap">
+        SELECT rns.id,rns.content,ra.username,rns.create_time update_time,rns.is_top FROM repair_notice_setting rns
+        left join repair_admin ra on ra.id = rns.update_user and ra.deleted = 0
+        <where>
+            and rns.deleted =0
+            <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
+                and rns.update_time BETWEEN #{startTime} and #{endTime}
+            </if>
+        </where>
+        order by rns.create_time desc
+    </select>
+</mapper>

+ 17 - 0
target/classes/mapper/repair/RepairOfflineRecordMapper.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.repair.mapper.RepairOfflineRecordMapper">
+    <resultMap type="com.repair.model.vo.OfflineDetailVo" id="repairOfflineDetailMap">
+        <result property="id" column="id"/>
+        <result property="userName" column="user_name"/>
+        <result property="voice" column="voice"/>
+        <result property="voiceLength" column="voice_length"/>
+        <result property="remark" column="remark"/>
+    </resultMap>
+    <select id="queryOfflineDetail" resultType="com.repair.model.vo.OfflineDetailVo" resultMap="repairOfflineDetailMap">
+        SELECT rtr.id,rtr.voice_length,ru.user_name,rtr.voice,rtr.remark FROM repair_offline_record rtr
+        left join repair_user ru on ru.deleted = 0 and ru.id = rtr.user_id
+        where rtr.deleted = 0 and rtr.approval_statu = 2 and rtr.record_id = #{recordId}
+    </select>
+
+</mapper>

+ 78 - 0
target/classes/mapper/repair/RepairPayRecordMapper.xml

@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.repair.mapper.RepairPayRecordMapper">
+    <resultMap type="com.repair.model.pojo.RepairPayRecord" id="repairPayMap">
+        <result property="id" column="id"/>
+        <result property="recordId" column="record_id"/>
+        <result property="userId" column="user_id"/>
+        <result property="payNo" column="pay_no"/>
+        <result property="payPrice" column="pay_price"/>
+        <result property="isSuccess" column="is_success"/>
+        <result property="remark" column="remark"/>
+    </resultMap>
+    <select id="queryPaymentData" resultType="com.repair.model.pojo.RepairPayRecord" resultMap="repairPayMap">
+        select rpr.id,rpr.record_id,rpr.user_id,rpr.pay_no,rpr.pay_price,rpr.is_success,rpr.remark from repair_pay_record rpr
+        inner join repair_record rr on rr.deleted = 0 and rr.record_no = #{recordNo} and rr.id = rpr.record_id
+        where rpr.deleted = 0
+    </select>
+    <select id="queryExport" resultType="com.repair.model.vo.QueryExportVo">
+        SELECT row_number() over ( ORDER BY dc.pay_time ) AS id, dc.*
+        FROM
+        (SELECT
+        rpr.create_time AS pay_time,
+        rr.record_no AS record_no,
+        rpr.pay_no AS pay_no,
+        ru.user_name as user_name,
+        rpr.pay_price as pay_price,
+        (SELECT SUM(rrr.refund_price) FROM repair_refund_record rrr WHERE rrr.record_id=rpr.record_id and
+        rrr.is_success!=2 and rrr.deleted=0) as refund_total_price
+        FROM
+        `repair_pay_record` rpr
+        LEFT JOIN repair_record rr ON rr.deleted = 0
+        AND rpr.record_id = rr.id
+        LEFT JOIN repair_user ru on rpr.user_id=ru.id and ru.deleted=0
+        where
+        rpr.is_success=2 AND rpr.deleted=0
+        <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
+            and rpr.create_time between #{startTime} and #{endTime}
+        </if>
+        ) dc
+        <where>
+            <if test="keyWord != null and keyWord !='' ">
+                and (dc.user_name like '%' #{keyWord} '%' or dc.record_no like '%' #{keyWord} '%')
+            </if>
+
+        </where>
+    </select>
+
+    <resultMap type="com.repair.model.vo.ProsperityRepairPayRecordsVo" id="repairPayPage">
+        <result property="id" column="id"/>
+        <result property="payTime" column="pay_time"/>
+        <result property="recordId" column="record_id"/>
+        <result property="recordNo" column="record_no"/>
+        <result property="payNo" column="pay_no"/>
+        <result property="userName" column="user_name"/>
+        <result property="payPrice" column="pay_price"/>
+        <result property="state" column="state"/>
+    </resultMap>
+
+    <select id="queryPayPage" resultType="com.repair.model.vo.ProsperityRepairPayRecordsVo" resultMap="repairPayPage">
+        select rpr.id,rpr.create_time as pay_time,rpr.record_id,rr.record_no,rr.address,rr.area_id,rpr.pay_no,ru.user_name,rpr.pay_price,rpr.is_success as state from repair_pay_record rpr
+        left join repair_record rr on rr.deleted = 0 and rr.id = rpr.record_id
+        left join repair_user ru on ru.deleted = 0  and ru.id = rpr.user_id
+        where rpr.deleted = 0 and rpr.is_success = 2
+        <if test="keyWord != null and keyWord !='' ">
+
+            and (rpr.user_id in (select id from repair_user where deleted = 0 and user_name like '%' #{keyWord} '%')
+            or rpr.record_id in (select id from repair_record where deleted = 0 and record_no like '%' #{keyWord} '%')
+            or rpr.record_id in (select id from repair_record where deleted = 0 and area_id like '%' #{keyWord} '%')
+            or rpr.record_id in (select id from repair_record where deleted =0 and address like '%' #{keyWord} '%')
+            or rpr.record_id in (select id from repair_record where deleted =0 and concat(area_id,address)like concat('%' #{keyWord} '%')))
+        </if>
+        <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
+            and rpr.create_time between #{startTime} and #{endTime}
+        </if>
+        order by rpr.create_time desc
+    </select>
+
+</mapper>

+ 5 - 0
target/classes/mapper/repair/RepairReceivingMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.repair.mapper.RepairReceivingMapper">
+
+</mapper>

File diff suppressed because it is too large
+ 1560 - 0
target/classes/mapper/repair/RepairRecordMapper.xml


+ 5 - 0
target/classes/mapper/repair/RepairRefundRecordMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.repair.mapper.RepairRefundRecordMapper">
+
+</mapper>

+ 5 - 0
target/classes/mapper/repair/RepairSchoolMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.repair.mapper.RepairSchoolMapper">
+
+</mapper>

+ 5 - 0
target/classes/mapper/repair/RepairShiftSettingsMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.repair.mapper.RepairShiftSettingsMapper">
+
+</mapper>

+ 33 - 0
target/classes/mapper/repair/RepairSystemMessagesMapper.xml

@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.repair.mapper.RepairSystemMessagesMapper">
+    <resultMap type="com.repair.model.vo.SystemMessagePageVo" id="systemMessagePageMap">
+        <result property="id" column="id"/>
+        <result property="recordId" column="record_id"/>
+        <result property="recordNo" column="record_no"/>
+        <result property="isRead" column="is_read"/>
+        <result property="content" column="content"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+
+    <select id="querySystemMessagePage" resultType="com.repair.model.vo.SystemMessagePageVo" resultMap="systemMessagePageMap">
+        select rsm.id,rsm.record_id,rr.record_no,rsm.is_read,rsm.content,rsm.create_time as update_time from repair_system_messages rsm
+        left join repair_record rr on rr.deleted = 0 and rr.id = rsm.record_id
+        where rsm.deleted = 0 and rsm.recipient_id = #{userId}
+        order by rsm.is_read asc,rsm.create_time desc
+    </select>
+
+    <select id="queryPCSystemMessagePage" resultType="com.repair.model.vo.SystemMessagePageVo" resultMap="systemMessagePageMap">
+        select rsm.id,rsm.record_id,rr.record_no,rsm.is_read,rsm.content,rsm.create_time as update_time from repair_system_messages rsm
+        left join repair_record rr on rr.deleted = 0 and rr.id = rsm.record_id
+        where rsm.deleted = 0 and rsm.recipient_id = #{userId}
+        <if test="statu != 2">
+            and rsm.is_read = #{statu}
+        </if>
+        <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
+            and rsm.create_time &gt;= #{startTime} and rsm.create_time &lt;= #{endTime}
+        </if>
+        order by rsm.is_read asc,rsm.create_time desc
+    </select>
+
+</mapper>

+ 5 - 0
target/classes/mapper/repair/RepairSystemSettingMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.repair.mapper.RepairSystemSettingMapper">
+
+</mapper>

+ 25 - 0
target/classes/mapper/repair/RepairTrackRecordMapper.xml

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.repair.mapper.RepairTrackRecordMapper">
+    <resultMap type="com.repair.model.vo.TrackDetailsVo" id="detailDatasMap">
+        <result property="id" column="id"/>
+        <result property="maintenanceState" column="maintenance_state"/>
+        <result property="content" column="content"/>
+        <result property="createTime" column="create_time"/>
+        <result property="userName" column="user_name"/>
+        <result property="userZzstr" column="user_zzstr"/>
+        <result property="image" column="image"/>
+        <result property="voice" column="voice"/>
+        <result property="voiceLength" column="voice_length"/>
+    </resultMap>
+    <select id="queryDetailData" resultType="com.repair.model.vo.TrackDetailsVo" resultMap="detailDatasMap">
+        select rtr.id,rtr.maintenance_state,rtr.content as content,rtr.create_time,ru.user_name,rtr.user_zzstr,rtr.image,rtr.voice,rtr.voice_length from repair_track_record rtr
+        left join repair_user ru on ru.deleted = 0 and ru.id = rtr.user_id
+        where rtr.deleted = 0
+        <if test="recordId != null and recordId != ''">
+            and rtr.record_id = #{recordId}
+        </if>
+        order by rtr.create_time asc
+    </select>
+
+</mapper>

+ 17 - 0
target/classes/mapper/repair/RepairTransferRecordMapper.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.repair.mapper.RepairTransferRecordMapper">
+    <resultMap type="com.repair.model.vo.TransferDetailVo" id="repairTransferDetailMap">
+        <result property="id" column="id"/>
+        <result property="userName" column="user_name"/>
+        <result property="voice" column="voice"/>
+        <result property="voiceLength" column="voice_length"/>
+        <result property="remark" column="remark"/>
+    </resultMap>
+    <select id="queryTransferDetail" resultType="com.repair.model.vo.TransferDetailVo" resultMap="repairTransferDetailMap">
+        SELECT rtr.id,rtr.voice_length,ru.user_name,rtr.voice,rtr.remark FROM repair_transfer_record rtr
+        left join repair_user ru on ru.deleted = 0 and ru.id = rtr.user_id
+        where rtr.deleted = 0 and rtr.approval_statu = 2 and rtr.record_id = #{recordId}
+    </select>
+
+</mapper>

+ 295 - 0
target/classes/mapper/repair/RepairUserMapper.xml

@@ -0,0 +1,295 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.repair.mapper.RepairUserMapper">
+
+    <resultMap type="com.repair.model.vo.RepairUserVo" id="repairUserPageMap">
+        <result property="id" column="id"/>
+        <result property="cardNumber" column="card_number"/>
+        <result property="userName" column="user_name"/>
+        <result property="userPhone" column="user_phone"/>
+        <result property="teamId" column="team_id"/>
+        <result property="teamName" column="team_name"/>
+        <result property="schoolId" column="school_id"/>
+        <result property="schoolName" column="school_name"/>
+        <result property="userZzid" column="user_zzid"/>
+        <result property="userZzname" column="user_zzname"/>
+        <result property="workType" column="work_type"/>
+        <result property="workTypeName" column="work_type_name"/>
+<!--        <result property="acceptanceTime" column="acceptance_assess_time"/>-->
+<!--        <result property="maintenanceTime" column="maintenance_assess_time"/>-->
+    </resultMap>
+
+    <select id="queryUserPageList" resultType="com.repair.model.vo.RepairUserVo" resultMap="repairUserPageMap">
+        select ru.card_number,ru.id,ru.user_name, ru.user_phone, ru.team_id, case ru.team_id when 0 then '校方人员' else '第三方人员' end as team_name, ru.school_id,ra.name as school_name,
+        ru.user_zzid,ru.work_type,rwt.name as work_type_name from repair_user ru
+        left join repair_area ra on ra.id = ru.school_id and ra.deleted = 0
+        left join repair_work_type rwt on rwt.id = ru.work_type and ra.deleted = 0
+        <where>
+            and ru.deleted = 0 and (ru.user_zzid = 1 or ru.user_zzid = 2 or ru.user_zzid = 3 or ru.user_zzid = 4)
+            <if test="schoolId != null and schoolId != ''">
+                and ru.school_id = ${schoolId}
+            </if>
+            <if test="teamId != null and teamId != ''">
+                and ru.team_id = ${teamId}
+            </if>
+            <if test="keyWord != null and keyWord != ''">
+                and (ru.user_name like '%' #{keyWord} '%' or ru.user_phone like '%' #{keyWord} '%')
+            </if>
+        </where>
+    </select>
+
+    <resultMap type="com.repair.model.vo.ArticleBuildVo" id="repairArticleBuildMap">
+        <result property="id" column="id"/>
+        <result property="articleId" column="article_id"/>
+        <result property="buildId" column="build_id"/>
+        <result property="articleName" column="article_name"/>
+        <result property="buildName" column="build_name"/>
+        <result property="userId" column="user_id"/>
+    </resultMap>
+    <!--获取报修关联楼栋种的数据-->
+    <select id="queryArticleBuilds" resultType="com.repair.model.vo.ArticleBuildVo" resultMap="repairArticleBuildMap">
+        SELECT rab.id,rat.name as article_name,rab.article_id,rab.build_id,(select GROUP_CONCAT(name) from repair_area where find_in_set(id,rab.build_id)) as build_name,rab.user_id
+        FROM repair_article_build rab
+        left join repair_article_type rat on rat.deleted = 0 and rat.id = rab.article_id
+        where rab.deleted = 0
+        <if test="userIds != null and userIds.size() > 0">
+            and rab.user_id in
+            <foreach collection="userIds" item="userId" index="index" open="(" close=")" separator=",">
+                ${userId}
+            </foreach>
+        </if>
+    </select>
+
+
+    <resultMap type="com.repair.model.vo.RepairLogisticsVo" id="repairLogisticsMap">
+        <result property="id" column="id"/>
+    </resultMap>
+
+    <select id="queryLogisticsList" resultType="com.repair.model.vo.RepairLogisticsVo" resultMap="repairLogisticsMap">
+        select id from repair_user ru
+        where EXISTS (select id from repair_record where deleted = 0 and id = #{recordId} and school_id = ru.school_id)
+        and ru.user_zzid = 3 and ru.deleted = 0
+    </select>
+
+
+    <resultMap type="com.repair.model.vo.UserDataVo" id="userDataMap">
+        <result property="id" column="id"/>
+        <result property="state" column="state"/>
+        <result property="shiftId" column="shift_id"/>
+        <result property="userName" column="user_name"/>
+        <result property="userPhone" column="user_phone"/>
+        <result property="startDate" column="start_date"/>
+        <result property="articleId" column="article_id"/>
+        <result property="acceptanceAssessTime" column="acceptance_assess_time"/>
+        <result property="maintenanceAssessTime" column="maintenance_assess_time"/>
+    </resultMap>
+    <select id="queryUserData" resultType="com.repair.model.vo.UserDataVo" resultMap="userDataMap">
+        select ru.user_phone,ru.acceptance_assess_time,ru.maintenance_assess_time,ru.state,ru.id,ru.user_name,rcs.start_date,rcs.shift_id,
+        (select GROUP_CONCAT(a.articleId) from (select (select GROUP_CONCAT(id) from repair_article_type where (id =repair_article_build.article_id or parent_id = repair_article_build.article_id) and deleted = 0) as articleId
+        from repair_article_build where deleted = 0 and user_id = ru.id) a) as article_id
+        from repair_user ru
+        left join repair_classes_settings rcs on rcs.deleted = 0 and rcs.user_id = #{userId} and start_date = #{dateNow}
+        where ru.id = #{userId} and ru.deleted = 0
+    </select>
+
+    <resultMap type="com.repair.model.vo.CollaboratorVo" id="collaboratorMap">
+        <result property="id" column="id"/>
+        <result property="userName" column="user_name"/>
+        <result property="userPhone" column="user_phone"/>
+        <result property="workTypeName" column="work_type_name"/>
+        <result property="state" column="state"/>
+    </resultMap>
+    <select id="queryCollaborator" resultType="com.repair.model.vo.CollaboratorVo" resultMap="collaboratorMap">
+        select ru.id,ru.user_name,ru.user_phone,rwt.name as work_type_name,ru.state
+        from repair_user ru
+        left join repair_work_type rwt on rwt.deleted = 0 and rwt.id = ru.work_type
+        <where>
+            and ru.deleted = 0 and (ru.user_zzid = 1 or ru.user_zzid = 2)
+            <if test="userId != null and userId != ''">
+                and ru.id != #{userId}
+            </if>
+            <if test="schoolId != null and schoolId != ''">
+                and ru.school_id = #{schoolId}
+            </if>
+            <if test="keyWord != null and keyWord != ''">
+                and (ru.user_name like '%' #{keyWord} '%' or ru.user_phone like '%' #{keyWord} '%' or rwt.name like '%' #{keyWord} '%')
+            </if>
+        </where>
+    </select>
+
+    <resultMap type="com.repair.model.vo.AddressBookVo" id="addressBookMap">
+        <result property="id" column="id"/>
+        <result property="teamId" column="team_id"/>
+        <result property="userName" column="user_name"/>
+        <result property="userPhone" column="user_phone"/>
+        <result property="workType" column="work_type"/>
+        <result property="workTypeName" column="work_type_name"/>
+        <result property="state" column="state"/>
+        <result property="acceptanceTime" column="acceptance_assess_time"/>
+        <result property="maintenanceTime" column="maintenance_assess_time"/>
+    </resultMap>
+    <select id="queryAddressBook" resultType="com.repair.model.vo.AddressBookVo" resultMap="addressBookMap">
+        select ru.team_id,ru.id,ru.user_name,ru.user_phone,ru.work_type,rwt.name as work_type_name,ru.state,ru.state,ru.acceptance_assess_time,ru.maintenance_assess_time
+        from repair_user ru
+        left join repair_work_type rwt on rwt.deleted = 0 and rwt.id = ru.work_type
+        <where>
+            and ru.deleted = 0 and (ru.user_zzid = 1 or ru.user_zzid = 2)
+            <if test="schoolId != null and schoolId != ''">
+                and ru.school_id = #{schoolId}
+            </if>
+            <if test="keyWord != null and keyWord != ''">
+                and (ru.user_name like '%' #{keyWord} '%' or ru.user_phone like '%' #{keyWord} '%' or rwt.name like '%' #{keyWord} '%')
+            </if>
+        </where>
+    </select>
+
+    <select id="queryUserPageBySchoolId" resultType="com.repair.model.vo.AddressBookVo" resultMap="addressBookMap">
+        select ru.team_id,ru.id,ru.user_name,ru.user_phone,ru.work_type,rwt.name as work_type_name,ru.state,ru.state,ru.acceptance_assess_time,ru.maintenance_assess_time
+        from repair_user ru
+        left join repair_work_type rwt on rwt.deleted = 0 and rwt.id = ru.work_type
+        <where>
+            and ru.deleted = 0 and (ru.user_zzid = 1 or ru.user_zzid = 2)
+            <if test="schoolId != null and schoolId != ''">
+                and ru.school_id = #{schoolId}
+            </if>
+            <if test="userId != null and userId != ''">
+                and ru.id = #{userId}
+            </if>
+        </where>
+    </select>
+
+    <resultMap type="com.repair.model.vo.AutoDispatchUserVo" id="AutoDispatchUserMap">
+        <result property="id" column="id"/>
+        <result property="state" column="state"/>
+        <result property="workType" column="work_type"/>
+        <result property="rdrCount" column="rdr_count"/>
+        <result property="userName" column="user_name"/>
+        <result property="userPhone" column="user_phone"/>
+        <result property="acceptanceTime" column="acceptance_assess_time"/>
+        <result property="maintenanceTime" column="maintenance_assess_time"/>
+        <result property="startDate" column="start_date"/>
+        <result property="shiftId" column="shift_Id"/>
+        <result property="teamName" column="team_Name"/>
+        <result property="userZzName" column="userZz_Name"/>
+
+    </resultMap>
+
+    <select id="autoDispatchUser" resultType="com.repair.model.vo.AutoDispatchUserVo" resultMap="AutoDispatchUserMap">
+        select * from (
+            select ru.user_zzid,wt.name as work_type,'正常接单' as state,
+            (select count(*) from repair_dispatch_record where deleted = 0 and is_lose_efficacy = 0 and assigned_time like '%' #{dateNow} '%' and users_id = ru.id) as rdr_count,
+            ru.user_phone,ru.acceptance_assess_time,ru.maintenance_assess_time,ru.id,ru.user_name,rcs.start_date,rcs.shift_id
+        from repair_user ru
+        inner join repair_classes_settings rcs on rcs.deleted = 0 and rcs.user_id = ru.id and start_date = #{dateNow}
+        left join repair_work_type wt on wt.deleted = 0 and wt.id = ru.work_type
+        where ru.school_id = #{schoolId} and ru.deleted = 0 and (ru.user_zzid = 1 or ru.user_zzid = 2) and ru.state = 1
+--         取消物品类别限制
+        <if test="articleId != null and articleId != '' and buildId != null and buildId != ''">
+            and ru.id in (select user_id from
+            (select user_id,(select GROUP_CONCAT(id) from repair_article_type where (id = repair_article_build.article_id or parent_id = repair_article_build.article_id) and deleted = 0) as article_id,build_id
+            from repair_article_build
+            where deleted = 0) d
+            where FIND_IN_SET(${articleId},d.article_id) and FIND_IN_SET(${buildId},d.build_id))
+        </if>
+        <if test="keyWord != null and keyWord != ''">
+            and (ru.user_name like '%' #{keyWord} '%' or ru.user_phone like '%' #{keyWord} '%')
+        </if>
+        group by ru.id) t
+        order by t.rdr_count
+    </select>
+
+    <resultMap type="com.repair.model.vo.AutoDispatchUserVo" id="AutoOfflineUserMap1">
+        <result property="id" column="id"/>
+        <result property="state" column="state"/>
+        <result property="workType" column="work_type"/>
+        <result property="rdrCount" column="rdr_count"/>
+        <result property="userName" column="user_name"/>
+        <result property="userPhone" column="user_phone"/>
+        <result property="acceptanceTime" column="acceptance_assess_time"/>
+        <result property="maintenanceTime" column="maintenance_assess_time"/>
+        <result property="startDate" column="start_date"/>
+        <result property="shiftId" column="shift_Id"/>
+        <result property="teamName" column="team_Name"/>
+        <result property="userZzName" column="userZz_Name"/>
+    </resultMap>
+    <select id="autoOfflineRepairUser1" resultType="com.repair.model.vo.AutoOfflineUserVo" resultMap="AutoOfflineUserMap1">
+        select ru.id,ru.user_zzid,ru.user_name,case team_id when 0 then '校方人员' else '第三方人员' end as team_name,'线下' as userZz_name,wt.name as work_type
+        from repair_user ru
+        left join repair_work_type wt on wt.deleted = 0 and wt.id = ru.work_type
+        where ru.school_id = #{schoolId} and ru.deleted = 0 and ru.user_zzid = 4 and ru.state = 1
+        <if test="keyWord != null and keyWord != ''">
+            and ru.user_name like '%' #{keyWord} '%'
+        </if>
+    </select>
+
+
+    <resultMap type="com.repair.model.vo.AutoOfflineUserVo" id="AutoOfflineUserMap">
+        <result property="id" column="id"/>
+        <result property="userName" column="user_name"/>
+        <result property="teamName" column="team_name"/>
+        <result property="userZzName" column="userZz_name"/>
+        <result property="workType" column="work_type"/>
+    </resultMap>
+    <select id="autoOfflineRepairUser" resultType="com.repair.model.vo.AutoOfflineUserVo" resultMap="AutoOfflineUserMap">
+        select ru.id,ru.user_name,case team_id when 0 then '校方人员' else '第三方人员' end as team_name,'线下' as userZz_name,wt.name as work_type
+        from repair_user ru
+        left join repair_work_type wt on wt.deleted = 0 and wt.id = ru.work_type
+        where ru.school_id = #{schoolId} and ru.deleted = 0 and (ru.user_zzid = 4 or ru.user_zzid = 1) and ru.state = 1
+        <if test="keyWord != null and keyWord != ''">
+            and ru.user_name like '%' #{keyWord} '%'
+        </if>
+    </select>
+
+    <!--获取协作下拉人员信息-->
+    <resultMap type="com.repair.model.vo.RepairWorkTypeVo" id="collaboratorUserMap">
+        <result property="id" column="id"/>
+        <result property="name" column="user_name"/>
+        <result property="workType" column="work_type"/>
+        <result property="state" column="state"/>
+        <result property="userPhone" column="user_phone"/>
+    </resultMap>
+    <select id="queryCollaboratorUser" resultType="com.repair.model.vo.RepairWorkTypeVo" resultMap="collaboratorUserMap">
+        select ru.id,ru.user_phone,'正常接单' as state,wt.name as work_type,ru.user_name from repair_user ru
+        inner join repair_classes_settings rcs on rcs.deleted = 0 and rcs.user_id = ru.id and rcs.shift_id != '' and rcs.start_date = #{dateNow}
+        left join repair_work_type wt on wt.deleted = 0 and wt.id = ru.work_type
+        where ru.school_id = #{schoolId} and ru.deleted = 0 and (ru.user_zzid = 1 or ru.user_zzid = 2) and ru.state = 1 and ru.id != #{userId}
+        <if test="keyWord != null and keyWord != ''">
+            and (ru.user_name like '%' #{keyWord} '%' or ru.user_phone like '%' #{keyWord} '%')
+        </if>
+    </select>
+
+
+    <resultMap type="com.repair.model.vo.PositiveReviewVo" id="positiveReviewMap">
+        <result property="id" column="id"/>
+        <result property="userName" column="user_name"/>
+        <result property="finishCount" column="finish_count"/>
+        <result property="evaluateCount" column="evaluate_count"/>
+    </resultMap>
+    <select id="queryPositiveReviewPage" resultType="com.repair.model.vo.PositiveReviewVo" resultMap="positiveReviewMap">
+        select ru.id,ru.user_name, (select Count(*) from repair_record where deleted = 0 and maintenance_state = 7 and find_in_set(ru.id,maintenancer_id)) as finish_count,
+        (select Count(*) from repair_record rr
+        inner join repair_evaluate re on re.deleted = 0 and re.star > 3 and re.record_id = rr.id
+        where rr.deleted = 0 and rr.maintenance_state = 7 and rr.school_id = #{schoolId} and find_in_set(ru.id,rr.maintenancer_id)) as evaluate_count
+        from repair_user ru
+        where ru.deleted = 0 and (ru.user_zzid = 1 or ru.user_zzid = 2) and ru.school_id = #{schoolId}
+    </select>
+
+
+    <select id="dropDown" resultType="com.repair.model.vo.AutoDispatchUserVo">
+        select * from (
+          select wt.name as work_type,'正常接单' as state,(select count(*) from repair_dispatch_record where deleted = 0 and is_lose_efficacy = 0  and users_id = ru.id) as rdr_count,ru.build_id,ru.user_phone,ru.acceptance_assess_time,ru.maintenance_assess_time,ru.id,ru.user_name,rcs.start_date,rcs.shift_id
+          from repair_user ru
+                   inner join repair_classes_settings rcs on rcs.deleted = 0 and rcs.user_id = ru.id and rcs.start_date = CURRENT_DATE()
+                   left join repair_work_type wt on wt.deleted = 0 and wt.id = ru.work_type
+          where
+                  ru.id in (select user_id from
+                  (select user_id,(select GROUP_CONCAT(id) from repair_article_type where (id = repair_article_build.article_id or parent_id = repair_article_build.article_id) and deleted = 0) as article_id,build_id
+                   from repair_article_build
+                   where deleted = 0) d
+                            where FIND_IN_SET(${articleId},d.article_id) and FIND_IN_SET(${buildId},d.build_id)) and
+              ru.school_id = #{schoolId} and ru.deleted = 0 and (ru.user_zzid = 1 or ru.user_zzid = 2) and ru.state = 1 and ru.id != ${userId}) t
+        order by t.rdr_count
+    </select>
+
+
+</mapper>

+ 13 - 0
target/classes/mapper/repair/RepairWorkTypeMapper.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.repair.mapper.RepairWorkTypeMapper">
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.repair.model.vo.RepairWorkTypeVo" id="repairWorkTypeMap">
+        <result property="id" column="id"/>
+        <result property="name" column="name"/>
+    </resultMap>
+
+    <select id="queryWorkTypeList" resultType="com.repair.model.vo.RepairWorkTypeVo" resultMap="repairWorkTypeMap">
+       select id,name from repair_work_type where deleted = 0
+    </select>
+</mapper>

+ 5 - 0
target/classes/mapper/repair/WxAccessTokenMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.repair.mapper.WxAccessTokenMapper">
+
+</mapper>

+ 0 - 0
target/classes/sql/repair_report.sql


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