Преглед на файлове

Merge remote-tracking branch 'origin/dev' into feature-cloud

guq преди 6 години
родител
ревизия
74368716ec
променени са 62 файла, в които са добавени 390 реда и са изтрити 163 реда
  1. 46 4
      applications/device/device-client/pom.xml
  2. 2 0
      applications/device/device-client/src/main/java/com/usoftchina/smartschool/device/client/init/IcCardInitializer.java
  3. 25 23
      applications/device/device-client/src/main/java/com/usoftchina/smartschool/device/client/service/IcCardService.java
  4. 15 0
      applications/device/device-client/src/main/resources/banner.txt
  5. BIN
      applications/device/device-client/src/main/resources/icon.ico
  6. BIN
      applications/device/device-client/src/main/winserver/deviceclient.exe
  7. 0 14
      applications/device/device-client/src/main/winserver/deviceclient.xml
  8. 13 0
      applications/device/device-sdk-dahua/src/main/java/com/usoftchina/smartschool/device/dahua/config/DahuaProperties.java
  9. 90 14
      applications/device/device-sdk-dahua/src/main/java/com/usoftchina/smartschool/device/dahua/lib/DahuaLibrary.java
  10. 40 2
      applications/device/device-sdk-dahua/src/main/java/com/usoftchina/smartschool/device/dahua/lib/DahuaSdk.java
  11. 3 0
      applications/device/device-sdk-dahua/src/main/java/com/usoftchina/smartschool/device/dahua/service/DahuaDataAnalyzeService.java
  12. BIN
      applications/device/device-sdk-dahua/src/main/resources/linux-amd64/libInfra.so
  13. BIN
      applications/device/device-sdk-dahua/src/main/resources/linux-amd64/libNetFramework.so
  14. BIN
      applications/device/device-sdk-dahua/src/main/resources/linux-amd64/libStream.so
  15. BIN
      applications/device/device-sdk-dahua/src/main/resources/linux-amd64/libStreamSvr.so
  16. BIN
      applications/device/device-sdk-dahua/src/main/resources/linux-amd64/libavnetsdk.so
  17. BIN
      applications/device/device-sdk-dahua/src/main/resources/linux-amd64/libdhconfigsdk.so
  18. BIN
      applications/device/device-sdk-dahua/src/main/resources/linux-amd64/libdhnetsdk.so
  19. 1 0
      applications/device/device-sdk-dahua/src/main/resources/win32-x86-64/manifest.txt
  20. 5 5
      applications/device/device-server/pom.xml
  21. 1 1
      applications/device/device-server/src/main/java/com/usoftchina/smartschool/device/config/RestTemplateConfig.java
  22. 1 1
      applications/device/device-server/src/main/java/com/usoftchina/smartschool/device/controller/AccessControlController.java
  23. 4 2
      applications/device/device-server/src/main/java/com/usoftchina/smartschool/device/mapper/AccessControlRecordMapper.java
  24. 15 8
      applications/device/device-server/src/main/java/com/usoftchina/smartschool/device/service/impl/IcCardServiceImpl.java
  25. 4 1
      applications/device/device-server/src/main/resources/application.yml
  26. 4 1
      applications/device/device-server/src/main/resources/config/application-docker-cloud.yml
  27. 4 1
      applications/device/device-server/src/main/resources/config/application-docker-prod.yml
  28. 4 0
      applications/device/device-server/src/main/resources/mapper/AccessControlRecordMapper.xml
  29. 2 2
      applications/device/device-server/src/main/resources/mapper/StudentInfoMapper.xml
  30. 1 1
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/ClassServiceImpl.java
  31. 3 9
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/CurriculumServiceImpl.java
  32. 2 2
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/TeacherServiceImpl.java
  33. 3 3
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/exception/BizExceptionCode.java
  34. 1 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/CurriculumMapper.java
  35. 1 1
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SysClazzMapper.java
  36. 8 3
      applications/school/school-server/src/main/resources/mapper/CurriculumMapper.xml
  37. 4 4
      applications/school/school-server/src/main/resources/mapper/SysClazzMapper.xml
  38. 4 1
      applications/wechat/wechat-api/src/main/java/com/usoftchina/smartschool/wechat/api/WechatApi.java
  39. 2 1
      applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/controller/TransfersController.java
  40. 17 15
      applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/ReceiveService.java
  41. 2 2
      frontend/pc-web/app/util/BaseUtil.js
  42. 11 3
      frontend/pc-web/app/view/Interaction/timetable/Detail.js
  43. 2 2
      frontend/pc-web/app/view/Interaction/timetable/DetailModel.js
  44. 11 3
      frontend/pc-web/app/view/Interaction/timetable/List.js
  45. 1 1
      frontend/pc-web/app/view/auth/Login.js
  46. 1 1
      frontend/pc-web/app/view/main/Main.js
  47. 8 8
      frontend/pc-web/app/view/main/Main.scss
  48. 2 2
      frontend/pc-web/app/view/main/MainController.js
  49. 1 1
      frontend/pc-web/index.html
  50. BIN
      frontend/pc-web/resources/images/auth-background.jpg
  51. BIN
      frontend/pc-web/resources/images/default/logo-default.png
  52. BIN
      frontend/pc-web/resources/images/favicon.png
  53. BIN
      frontend/pc-web/resources/images/login-text-img.png
  54. BIN
      frontend/pc-web/resources/images/zhihuixiaoyuan.png
  55. 0 4
      frontend/pc-web/resources/json/navigation.json
  56. 2 4
      frontend/wechat-web/src/components/PhonesItem.jsx
  57. 1 0
      frontend/wechat-web/src/modules/hiPages/send-vote/SendVote.js
  58. 1 1
      frontend/wechat-web/src/modules/leave/LeaveAddCPage.js
  59. 6 0
      frontend/wechat-web/src/modules/leave/LeaveListPage.css
  60. 16 11
      frontend/wechat-web/src/modules/leave/LeaveListPage.js
  61. 0 1
      frontend/wechat-web/src/style/css/phones.css
  62. BIN
      frontend/wechat-web/src/style/imgs/no_data.png

+ 46 - 4
applications/device/device-client/pom.xml

@@ -39,13 +39,13 @@
         </dependency>
         <!-- JSON -->
         <dependency>
-          <groupId>com.alibaba</groupId>
-          <artifactId>fastjson</artifactId>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
         </dependency>
         <!-- httpClient -->
         <dependency>
-          <groupId>org.apache.httpcomponents</groupId>
-          <artifactId>httpclient</artifactId>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
         </dependency>
     </dependencies>
     <build>
@@ -54,6 +54,48 @@
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
             </plugin>
+            <plugin>
+                <groupId>com.akathist.maven.plugins.launch4j</groupId>
+                <artifactId>launch4j-maven-plugin</artifactId>
+                <version>1.7.25</version>
+                <executions>
+                    <execution>
+                        <id>l4j</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>launch4j</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <jar>${project.build.directory}/${artifactId}-${version}.jar</jar>
+                    <headerType>console</headerType>
+                    <outfile>${project.build.directory}/device-client.exe</outfile>
+                    <downloadUrl>http://java.com/download</downloadUrl>
+                    <classPath>
+                        <mainClass>org.springframework.boot.loader.JarLauncher</mainClass>
+                    </classPath>
+                    <icon>src/main/resources/icon.ico</icon>
+                    <stayAlive>true</stayAlive>
+                    <restartOnCrash>true</restartOnCrash>
+                    <jre>
+                        <minVersion>1.8.0</minVersion>
+                        <jdkPreference>preferJre</jdkPreference>
+                    </jre>
+                    <versionInfo>
+                        <fileVersion>1.0.0.0</fileVersion>
+                        <txtFileVersion>${project.version}</txtFileVersion>
+                        <fileDescription>${project.name}</fileDescription>
+                        <copyright>2018 usoftchina.com</copyright>
+                        <productVersion>1.0.0.0</productVersion>
+                        <txtProductVersion>1.0.0.0</txtProductVersion>
+                        <productName>${project.name}</productName>
+                        <companyName>usoftchina.com</companyName>
+                        <internalName>device-client</internalName>
+                        <originalFilename>device-client.exe</originalFilename>
+                    </versionInfo>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 </project>

+ 2 - 0
applications/device/device-client/src/main/java/com/usoftchina/smartschool/device/client/init/IcCardInitializer.java

@@ -5,11 +5,13 @@ import com.usoftchina.smartschool.device.client.po.IcCard;
 import com.usoftchina.smartschool.device.client.service.IcCardService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.CommandLineRunner;
+import org.springframework.stereotype.Component;
 
 /**
  * @author yingp
  * @date 2019/3/11
  */
+@Component
 public class IcCardInitializer implements CommandLineRunner {
 
     @Autowired

+ 25 - 23
applications/device/device-client/src/main/java/com/usoftchina/smartschool/device/client/service/IcCardService.java

@@ -57,7 +57,7 @@ public class IcCardService {
             + "from XF_AccTransDetail_push left join XF_AccHead on XF_AccTransDetail_push.AccNo=XF_AccHead.AccNo left join Tx_EmpCard on Tx_EmpCard.CardID=XF_AccHead.CardID "
             + "left join RS_EMP ON RS_EMP.EmpSysID=XF_AccHead.EmpSysID where XF_AccTransDetail_push.SendStatus=? order by AccTransDay desc";
 
-    private static final String updateSql = "update XF_AccTransDetail_push set SendStatus = ? where GUID in (?)";
+    private static final String updateSql = "update XF_AccTransDetail_push set SendStatus = ? where GUID in (";
 
     public IcCard find() {
         return icCardRepository.find();
@@ -75,46 +75,48 @@ public class IcCardService {
         dynamicDataSourceRegister.createDataSource(card);
     }
 
-    @Scheduled(fixedRate = 1000 * 60, initialDelay = 5000)
+    @Scheduled(fixedRate = 1000 * 20, initialDelay = 5000)
     public void dataTask() {
         IcCard card = find();
         School school = schoolService.find();
         if (null != card && dynamicDataSourceRegister.contains(card) && null != school) {
             DynamicDataSourceContextHolder.set(card);
             try {
-                doTask();
+                doTask(school.getName());
             } finally {
                 DynamicDataSourceContextHolder.clear();
             }
         }
     }
 
-    private void doTask(){
+    private void doTask(String schoolName){
         //1.准备本次需要传输的数据->转移至中间表
         jdbcTemplate.execute(insertSql);
         //2.获取本次传输的数据
         List<AccTransDetail> resultList = jdbcTemplate.query(getDataSql, new BeanPropertyRowMapper<>(AccTransDetail.class), "待上传");
-        //3.传输
-        HttpHeaders headers = new HttpHeaders();
-        headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
-        MultiValueMap<String, String> requestEntity = new LinkedMultiValueMap<>();
-        requestEntity.add("data", JSON.toJSONString(resultList));
-        requestEntity.add("school", schoolService.find().getName());
-        HttpEntity<MultiValueMap<String, String>> httpEntity = new HttpEntity<>(requestEntity, headers);
-        ResponseEntity<Result> response = restTemplate.postForEntity(targetURL, resultList, Result.class);
-        if (response.getStatusCode() == HttpStatus.OK) {
-            Result<String> result = response.getBody();
-            if (!result.isSuccess()) {
-                ExceptionCode.ERROR_UNKNOWN.occur(result.getMessage());
-            }else {
-                //更新发送的数据
-                String ids = result.getData();
-                if (!StringUtils.isEmpty(ids)){
-                    jdbcTemplate.update(updateSql, "已上传", ids);
+        if (resultList.size() > 0) {
+            //3.传输
+            HttpHeaders headers = new HttpHeaders();
+            headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
+            MultiValueMap<String, String> requestEntity = new LinkedMultiValueMap<>();
+            requestEntity.add("data", JSON.toJSONString(resultList));
+            requestEntity.add("school", schoolName);
+            HttpEntity<MultiValueMap<String, String>> httpEntity = new HttpEntity<>(requestEntity, headers);
+            ResponseEntity<Result> response = restTemplate.postForEntity(targetURL, httpEntity, Result.class);
+            if (response.getStatusCode() == HttpStatus.OK) {
+                Result<String> result = response.getBody();
+                if (!result.isSuccess()) {
+                    ExceptionCode.ERROR_UNKNOWN.occur(result.getMessage());
+                } else {
+                    //更新发送的数据
+                    String ids = result.getData();
+                    if (!StringUtils.isEmpty(ids)) {
+                        jdbcTemplate.update(updateSql + ids + ")", "已上传");
+                    }
                 }
+            } else {
+                ExceptionCode.ERROR_UNKNOWN.occur("IC卡消费记录发送失败");
             }
-        } else {
-            ExceptionCode.ERROR_UNKNOWN.occur("IC卡消费记录发送失败");
         }
     }
 }

+ 15 - 0
applications/device/device-client/src/main/resources/banner.txt

@@ -0,0 +1,15 @@
+${AnsiColor.BRIGHT_YELLOW}
+
+88        88   ad88888ba     ,ad8888ba,    88888888888  888888888888  ,ad8888ba,   88        88  88  888b      88         db
+88        88  d8"     "8b   d8"'    `"8b   88                88      d8"'    `"8b  88        88  88  8888b     88        d88b
+88        88  Y8,          d8'        `8b  88                88     d8'            88        88  88  88 `8b    88       d8'`8b
+88        88  `Y8aaaaa,    88          88  88aaaaa           88     88             88aaaaaaaa88  88  88  `8b   88      d8'  `8b
+88        88    `"""""8b,  88          88  88"""""           88     88             88""""""""88  88  88   `8b  88     d8YaaaaY8b
+88        88          `8b  Y8,        ,8P  88                88     Y8,            88        88  88  88    `8b 88    d8""""""""8b
+Y8a.    .a8P  Y8a     a8P   Y8a.    .a8P   88                88      Y8a.    .a8P  88        88  88  88     `8888   d8'        `8b
+ `"Y8888Y"'    "Y88888P"     `"Y8888Y"'    88                88       `"Y8888Y"'   88        88  88  88      `888  d8'          `8b
+
+
+Application Version: ${application.version}${application.formatted-version}
+Spring Boot Version: ${spring-boot.version}${spring-boot.formatted-version}
+${AnsiColor.DEFAULT}

BIN
applications/device/device-client/src/main/resources/icon.ico


BIN
applications/device/device-client/src/main/winserver/deviceclient.exe


+ 0 - 14
applications/device/device-client/src/main/winserver/deviceclient.xml

@@ -1,14 +0,0 @@
-<service>
-    <id>deviceclient</id>
-    <name>device client</name>
-    <description>client server for smart school platform</description>
-    <!-- java环境变量 -->
-    <env name="JAVA_HOME" value="%JAVA_HOME%"/>
-    <executable>java</executable>
-    <arguments>-jar "E:\springboot\ test.jar"</arguments>
-    <!-- 开机启动 -->
-    <startmode>Automatic</startmode>
-    <!-- 日志配置 -->
-    <logpath>%BASE%\log</logpath>
-    <logmode>rotate</logmode>
-</service>

+ 13 - 0
applications/device/device-sdk-dahua/src/main/java/com/usoftchina/smartschool/device/dahua/config/DahuaProperties.java

@@ -20,6 +20,11 @@ public class DahuaProperties {
      */
     private int connectTime = 10000;
 
+    /**
+     * DLL资源路径
+     */
+    private String library;
+
     public int getWaitTime() {
         return waitTime;
     }
@@ -35,4 +40,12 @@ public class DahuaProperties {
     public void setConnectTime(int connectTime) {
         this.connectTime = connectTime;
     }
+
+    public String getLibrary() {
+        return library;
+    }
+
+    public void setLibrary(String library) {
+        this.library = library;
+    }
 }

+ 90 - 14
applications/device/device-sdk-dahua/src/main/java/com/usoftchina/smartschool/device/dahua/lib/DahuaLibrary.java

@@ -8,9 +8,9 @@ import com.sun.jna.ptr.IntByReference;
 import com.sun.jna.win32.StdCallLibrary;
 
 import java.time.LocalDateTime;
-import java.time.ZoneId;
 import java.time.ZoneOffset;
 import java.time.ZonedDateTime;
+import java.util.Arrays;
 import java.util.Date;
 
 /**
@@ -862,10 +862,10 @@ public interface DahuaLibrary extends Library {
         @Override
         public String toString() {
             return "DH_EVENT_FILE_INFO{" +
-                    "bCount=" + bCount +
-                    ", bIndex=" + bIndex +
-                    ", bFileTag=" + bFileTag +
-                    ", bFileType=" + bFileType +
+                    "bCount=" + (bCount & 0xff) +
+                    ", bIndex=" + (bIndex & 0xff) +
+                    ", bFileTag=" + (bFileTag & 0xff) +
+                    ", bFileType=" + (bFileType & 0xff) +
                     ", stuFileTime=" + stuFileTime +
                     ", nGroupId=" + nGroupId +
                     '}';
@@ -1445,6 +1445,7 @@ public interface DahuaLibrary extends Library {
                     ", PTS=" + PTS +
                     ", UTC=" + UTC +
                     ", nEventID=" + nEventID +
+                    ", stuObject=" + stuObject +
                     ", stuFileInfo=" + stuFileInfo +
                     ", emEventType=" + emEventType +
                     ", bStatus=" + bStatus +
@@ -1474,10 +1475,20 @@ public interface DahuaLibrary extends Library {
      */
     @Structure.FieldOrder({"left", "top", "right", "bottom"})
     class DH_RECT extends Structure {
-        public long left;
-        public long top;
-        public long right;
-        public long bottom;
+        public NativeLong left;
+        public NativeLong top;
+        public NativeLong right;
+        public NativeLong bottom;
+
+        @Override
+        public String toString() {
+            return "DH_RECT{" +
+                    "left=" + left.longValue() +
+                    ", top=" + top.longValue() +
+                    ", right=" + right.longValue() +
+                    ", bottom=" + bottom.longValue() +
+                    '}';
+        }
     }
 
     /**
@@ -1487,6 +1498,14 @@ public interface DahuaLibrary extends Library {
     class DH_POINT extends Structure {
         public short nx;
         public short ny;
+
+        @Override
+        public String toString() {
+            return "DH_POINT{" +
+                    "nx=" + nx +
+                    ", ny=" + ny +
+                    '}';
+        }
     }
 
     /**
@@ -1534,6 +1553,21 @@ public interface DahuaLibrary extends Library {
          * 小图左上角在大图的位置,使用绝对坐标系
          */
         public DH_POINT stuPoint;
+
+        @Override
+        public String toString() {
+            return "DH_PIC_INFO{" +
+                    "dwOffSet=" + dwOffSet +
+                    ", dwFileLenth=" + dwFileLenth +
+                    ", wWidth=" + wWidth +
+                    ", wHeight=" + wHeight +
+                    ", pszFilePath='" + pszFilePath + '\'' +
+                    ", bIsDetected=" + bIsDetected +
+                    ", bReserved=" + new String(bReserved) +
+                    ", nFilePathLen=" + nFilePathLen +
+                    ", stuPoint=" + stuPoint +
+                    '}';
+        }
     }
 
     /**
@@ -1792,11 +1826,11 @@ public interface DahuaLibrary extends Library {
         /**
          * 车辆子品牌 需要通过映射表得到真正的子品牌 映射表详见开发手册
          */
-        public int wColorLogoIndex;
+        public short wColorLogoIndex;
         /**
          * 车辆子品牌 需要通过映射表得到真正的子品牌 映射表详见开发手册
          */
-        public int wSubBrand;
+        public short wSubBrand;
         public byte byReserved1;
         /**
          * 是否有物体对应图片文件信息
@@ -1854,11 +1888,11 @@ public interface DahuaLibrary extends Library {
         /**
          * 开始时文件偏移, 单位: 字节(物体开始出现时,视频帧在原始视频文件中相对于文件起始处的偏移)
          */
-        public int nBeginFileOffset;
+        public long nBeginFileOffset;
         /**
          * 结束时文件偏移, 单位: 字节(物体消逝时,视频帧在原始视频文件中相对于文件起始处的偏移)
          */
-        public int nEndFileOffset;
+        public long nEndFileOffset;
         /**
          * 物体颜色相似度,取值范围:0-100,数组下标值代表某种颜色,详见EM_COLOR_TYPE
          */
@@ -1882,7 +1916,49 @@ public interface DahuaLibrary extends Library {
         /**
          * 车辆品牌年款 需要通过映射表得到真正的年款 映射表详见开发手册
          */
-        public int wBrandYear;
+        public short wBrandYear;
+
+        @Override
+        public String toString() {
+            return "DH_MSG_OBJECT{" +
+                    "nObjectID=" + nObjectID +
+                    ", szObjectType=" + new String(szObjectType) +
+                    ", nConfidence=" + nConfidence +
+                    ", nAction=" + nAction +
+                    ", BoundingBox=" + BoundingBox +
+                    ", Center=" + Center +
+                    ", nPolygonNum=" + nPolygonNum +
+                    ", Contour=" + Arrays.toString(Contour) +
+                    ", rgbaMainColor=" + rgbaMainColor +
+                    ", szText=" + new String(szText) +
+                    ", szObjectSubType=" + new String(szObjectSubType) +
+                    ", wColorLogoIndex=" + wColorLogoIndex +
+                    ", wSubBrand=" + wSubBrand +
+                    ", byReserved1=" + byReserved1 +
+                    ", bPicEnble=" + bPicEnble +
+                    ", stPicInfo=" + stPicInfo +
+                    ", bShotFrame=" + bShotFrame +
+                    ", bColor=" + bColor +
+                    ", byReserved2=" + byReserved2 +
+                    ", byTimeType=" + byTimeType +
+                    ", stuCurrentTime=" + stuCurrentTime +
+                    ", stuStartTime=" + stuStartTime +
+                    ", stuEndTime=" + stuEndTime +
+                    ", stuOriginalBoundingBox=" + stuOriginalBoundingBox +
+                    ", stuSignBoundingBox=" + stuSignBoundingBox +
+                    ", dwCurrentSequence=" + dwCurrentSequence +
+                    ", dwBeginSequence=" + dwBeginSequence +
+                    ", dwEndSequence=" + dwEndSequence +
+                    ", nBeginFileOffset=" + nBeginFileOffset +
+                    ", nEndFileOffset=" + nEndFileOffset +
+                    ", byColorSimilar=" + new String(byColorSimilar) +
+                    ", byUpperBodyColorSimilar=" + new String(byUpperBodyColorSimilar) +
+                    ", byLowerBodyColorSimilar=" + new String(byLowerBodyColorSimilar) +
+                    ", nRelativeID=" + nRelativeID +
+                    ", szSubText=" + new String(szSubText) +
+                    ", wBrandYear=" + wBrandYear +
+                    '}';
+        }
     }
 
     /**

+ 40 - 2
applications/device/device-sdk-dahua/src/main/java/com/usoftchina/smartschool/device/dahua/lib/DahuaSdk.java

@@ -11,9 +11,17 @@ import com.usoftchina.smartschool.device.event.DeviceDisconnectEvent;
 import com.usoftchina.smartschool.device.event.DeviceReconnectEvent;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.util.StreamUtils;
+import org.springframework.util.StringUtils;
 
 import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
+import java.io.File;
+import java.nio.charset.Charset;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
 
 /**
  * @author yingp
@@ -31,10 +39,40 @@ public class DahuaSdk {
      */
     private int tryTimes = 1;
 
+    /**
+     * 拷贝DLL资源到临时目录,解决fat jar无法加载DLL问题
+     *
+     * @return
+     */
+    private String createTempLibraries() {
+        try {
+            String tempDir = Files.createTempDirectory("dahua-lib-").toFile().getCanonicalPath();
+            String manifest = StreamUtils.copyToString(
+                    new ClassPathResource(Platform.RESOURCE_PREFIX + File.separator + "manifest.txt").getInputStream(),
+                    Charset.defaultCharset());
+            String[] names = manifest.split(",");
+            for (String name : names) {
+                if (StringUtils.hasText(name)) {
+                    Path tempLib = Paths.get(tempDir, name);
+                    Files.copy(new ClassPathResource(Platform.RESOURCE_PREFIX + File.separator + name).getInputStream(),
+                            tempLib);
+                }
+            }
+            return tempDir;
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return Platform.RESOURCE_PREFIX;
+    }
+
     public DahuaSdk(DahuaProperties properties) {
         this.properties = properties;
-        this.instance = Native.load(Platform.RESOURCE_PREFIX +
-                (Platform.isWindows() ? "/dhnetsdk" : "/libdhnetsdk"), DahuaLibrary.class);
+        String libDir = properties.getLibrary();
+        if (StringUtils.isEmpty(libDir)) {
+            libDir = createTempLibraries();
+        }
+        this.instance = Native.load(libDir + File.separator +
+                (Platform.isWindows() ? "dhnetsdk" : "libdhnetsdk"), DahuaLibrary.class);
     }
 
     public DahuaLibrary getInstance() {

+ 3 - 0
applications/device/device-sdk-dahua/src/main/java/com/usoftchina/smartschool/device/dahua/service/DahuaDataAnalyzeService.java

@@ -63,6 +63,9 @@ public class DahuaDataAnalyzeService {
                  */
                 case DahuaEvents.EVENT_IVS_ACCESS_CTL:
                     DEV_EVENT_ACCESS_CTL_INFO info = new DEV_EVENT_ACCESS_CTL_INFO(pAlarmInfo);
+                    if (logger.isDebugEnabled()) {
+                        logger.debug(info.toString());
+                    }
                     AccessControlInfo accessControlInfo = new AccessControlInfo();
                     if (dwBufSize > 0) {
                         accessControlInfo.setImageData(pBuffer.getByteArray(0, dwBufSize));

BIN
applications/device/device-sdk-dahua/src/main/resources/linux-amd64/libInfra.so


BIN
applications/device/device-sdk-dahua/src/main/resources/linux-amd64/libNetFramework.so


BIN
applications/device/device-sdk-dahua/src/main/resources/linux-amd64/libStream.so


BIN
applications/device/device-sdk-dahua/src/main/resources/linux-amd64/libStreamSvr.so


BIN
applications/device/device-sdk-dahua/src/main/resources/linux-amd64/libavnetsdk.so


BIN
applications/device/device-sdk-dahua/src/main/resources/linux-amd64/libdhconfigsdk.so


BIN
applications/device/device-sdk-dahua/src/main/resources/linux-amd64/libdhnetsdk.so


+ 1 - 0
applications/device/device-sdk-dahua/src/main/resources/win32-x86-64/manifest.txt

@@ -0,0 +1 @@
+aacdec.dll,adpcmdec.dll,amrdec.dll,armenc64.dll,avnetsdk.dll,dhconfigsdk.dll,dhconfigsdk.lib,dhnetsdk.dll,dhnetsdk.lib,dhplay.dll,fisheye.dll,g729dec.dll,g7221dec.dll,h26ldec.dll,h264dec.dll,hevcdec.dll,HWDec.dll,Infra.dll,IvsDrawer.dll,Json.dll,MCL_FPTZ.dll,mjpegdec.dll,mp2dec.dll,mp3dec.dll,mpeg4dec.dll,NetFramework.dll,postproc.dll,Stream.dll,StreamSvr.dll,svac_dec.dll,swscale.dll,VTHStack.dll

+ 5 - 5
applications/device/device-server/pom.xml

@@ -12,13 +12,9 @@
     <artifactId>device-server</artifactId>
 
     <dependencies>
-        <dependency>
-            <groupId>net.java.dev.jna</groupId>
-            <artifactId>jna</artifactId>
-        </dependency>
         <dependency>
             <groupId>com.usoftchina.smartschool</groupId>
-            <artifactId>device-sdk-dahua</artifactId>
+            <artifactId>device-sdk</artifactId>
         </dependency>
         <dependency>
             <groupId>com.usoftchina.smartschool</groupId>
@@ -60,6 +56,10 @@
             <artifactId>test-starter</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>com.usoftchina.smartschool</groupId>
+            <artifactId>device-core</artifactId>
+        </dependency>
     </dependencies>
 
     <build>

+ 1 - 1
applications/device/device-server/src/main/java/com/usoftchina/smartschool/device/config/RestTemplateConfig.java

@@ -1,4 +1,4 @@
-package com.usoftchina.smartschool.device.client.config;
+package com.usoftchina.smartschool.device.config;
 
 import org.apache.http.client.HttpClient;
 import org.apache.http.config.Registry;

+ 1 - 1
applications/device/device-server/src/main/java/com/usoftchina/smartschool/device/controller/AccessControlController.java

@@ -58,7 +58,7 @@ public class AccessControlController {
      * @return
      */
     @PostMapping("/event")
-    public Result onAccessControlEvent(AccessControlInfo info) {
+    public Result onAccessControlEvent(@RequestBody AccessControlInfo info) {
         accessControlService.onAccessControlEvent(info);
         return Result.success();
     }

+ 4 - 2
applications/device/device-server/src/main/java/com/usoftchina/smartschool/device/mapper/AccessControlRecordMapper.java

@@ -1,7 +1,9 @@
 package com.usoftchina.smartschool.device.mapper;
 
+import com.netflix.ribbon.proxy.annotation.ClientProperties;
 import com.usoftchina.smartschool.device.po.AccessControlRecord;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.Date;
 import java.util.List;
@@ -22,6 +24,6 @@ public interface AccessControlRecordMapper {
      * @param endDate
      * @return
      */
-    List<AccessControlRecord> selectByStuNumberAndDate(String stuNumber, Date beginDate,
-                                                     Date endDate);
+    List<AccessControlRecord> selectByStuNumberAndDate(@Param("name") String stuNumber,@Param("begin") Date beginDate,
+                                                       @Param("end") Date endDate);
 }

+ 15 - 8
applications/device/device-server/src/main/java/com/usoftchina/smartschool/device/service/impl/IcCardServiceImpl.java

@@ -1,7 +1,7 @@
 package com.usoftchina.smartschool.device.service.impl;
 
 import com.alibaba.fastjson.JSON;
-import com.usoftchina.smartschool.device.base.Result;
+import com.usoftchina.smartschool.base.Result;
 import com.usoftchina.smartschool.device.dto.AccTransDetail;
 import com.usoftchina.smartschool.device.mapper.IcCardMapper;
 import com.usoftchina.smartschool.device.po.Transaction;
@@ -9,15 +9,13 @@ import com.usoftchina.smartschool.device.service.IcCardService;
 import com.usoftchina.smartschool.school.dto.SysSchoolDTO;
 import com.usoftchina.smartschool.utils.ObjectUtils;
 import com.usoftchina.smartschool.utils.http.HmacUtils;
+import com.usoftchina.smartschool.wechat.api.WechatApi;
 import com.usoftchina.smartschool.wechat.dto.MessageInfoDTO;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.*;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
-import org.springframework.util.LinkedMultiValueMap;
-import org.springframework.util.MultiValueMap;
 import org.springframework.util.StringUtils;
 import org.springframework.web.client.RestTemplate;
-import org.springframework.web.util.DefaultUriBuilderFactory;
 
 import java.net.URI;
 import java.text.SimpleDateFormat;
@@ -38,7 +36,11 @@ public class IcCardServiceImpl implements IcCardService {
     @Autowired
     private IcCardMapper icCardMapper;
 
-    private final String targetURL = "https://school-api.ydyhz.com/api/wechat/send/Messages";
+    @Autowired
+    private WechatApi wechatApi;
+
+    @Value("${smartschool.wechat.pushUrl}")
+    private String targetURL;
 
     public String consumePush(List<AccTransDetail> accTransDetailList, String school){
         List<MessageInfoDTO> messageInfoList = new ArrayList<MessageInfoDTO>();
@@ -80,7 +82,12 @@ public class IcCardServiceImpl implements IcCardService {
                 messageInfoList.add(messageInfo);
             });
             //3.传输
-            HttpHeaders headers = new HttpHeaders();
+            Result result = wechatApi.sendOutMessages(JSON.toJSONString(messageInfoList));
+            if (result.isSuccess()) {
+                String ids = "'" + sb.substring(0, sb.length() - 1).replaceAll(",", "','") + "'";
+                return ids;
+            }
+            /*HttpHeaders headers = new HttpHeaders();
             headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
             MultiValueMap<String, String> requestEntity = new LinkedMultiValueMap<>();
             requestEntity.add("data", JSON.toJSONString(messageInfoList));
@@ -97,7 +104,7 @@ public class IcCardServiceImpl implements IcCardService {
                     String ids = "'" + sb.substring(0, sb.length() - 1).replaceAll(",", "','") + "'";
                     return ids;
                 }
-            }
+            }*/
         }
         return null;
     }

+ 4 - 1
applications/device/device-server/src/main/resources/application.yml

@@ -73,4 +73,7 @@ hystrix:
                         timeoutInMilliseconds: 4000
 mybatis:
   type-aliases-package: com.usoftchina.smartschool.device.po
-  mapper-locations: classpath:mapper/*.xml
+  mapper-locations: classpath:mapper/*.xml
+smartschool:
+  wechat:
+    pushUrl: https://school-api.ubtob.com/api/wechat/send/Messages

+ 4 - 1
applications/device/device-server/src/main/resources/config/application-docker-cloud.yml

@@ -20,4 +20,7 @@ spring:
         maximum-pool-size: 50
         idle-timeout: 30000
         max-lifetime: 1800000
-        connection-timeout: 30000
+        connection-timeout: 30000
+smartschool:
+  wechat:
+    pushUrl: https://school-api.ydyhz.com/api/wechat/send/Messages

+ 4 - 1
applications/device/device-server/src/main/resources/config/application-docker-prod.yml

@@ -12,4 +12,7 @@ spring:
     password: select111***
   redis:
     host: 10.10.100.166
-    port: 6379
+    port: 6379
+smartschool:
+  wechat:
+    pushUrl: https://school-api.ubtob.com/api/wechat/send/Messages

+ 4 - 0
applications/device/device-server/src/main/resources/mapper/AccessControlRecordMapper.xml

@@ -106,4 +106,8 @@
         </trim>
     </insert>
 
+    <select id="selectByStuNumberAndDate" resultType="com.usoftchina.smartschool.device.po.AccessControlRecord">
+        select * from  out_in_record where  stu_name=#{name}
+    </select>
+
 </mapper>

+ 2 - 2
applications/device/device-server/src/main/resources/mapper/StudentInfoMapper.xml

@@ -1,11 +1,11 @@
 <?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.usoftchina.smartschool.device.mapper.AccessControlRecordMapper" >
+<mapper namespace="com.usoftchina.smartschool.device.mapper.StudentInfoMapper" >
     <select id="selectInfoByCardNo" parameterType="string" resultMap="studentInfo">
         select school_appid,school_secret,sys_parents.openid,sys_student.stu_name,sys_student.stu_id,sys_school.school_id,
          stu_number,sys_student.clazz_id,stu_class,stu_grade,stu_classnickname,stu_sex from sys_student left join sys_school on sys_student.school_id=sys_school.school_id
         left join sys_parents_stu on sys_student.stu_id=sys_parents_stu.stu_id left join sys_parents on sys_parents.parent_id =
-        sys_parents_stu.parent_id where stu_cardNo = #{cardNo}
+        sys_parents_stu.parent_id where stu_cardNo = #{cardNo} and  ifnull(openid,'') != ''
     </select>
 
     <resultMap id="studentInfo" type="com.usoftchina.smartschool.device.po.StudentInfo" >

+ 1 - 1
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/ClassServiceImpl.java

@@ -86,7 +86,7 @@ public class ClassServiceImpl implements ClassService{
         for (SysTeacherClazz detail : teachers) {
             detail.setClazz_id(clazz.getClazz_id());
             Integer count = 0;
-            count = sysClazzMapper.teacherClazz(detail.getTeacher_id(),detail.getClazz_id());
+            count = sysClazzMapper.teacherClazz(detail.getSubject_name(),detail.getTeacher_id());
             if(count > 0){
                 throw new BizException(BizExceptionCode.REPEAT_SUBJECTS);
             }

+ 3 - 9
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/CurriculumServiceImpl.java

@@ -100,9 +100,6 @@ public class CurriculumServiceImpl implements CurriculumService {
         if (curriculumDetailDTO.getFri().equals(subjectDO.getSubjectId().toString())){
             curriculumDetailDTO.setFri(subjectDO.getSubjectName());
         }
-        if (curriculumDetailDTO.getSat().equals(subjectDO.getSubjectId().toString())){
-            curriculumDetailDTO.setSat(subjectDO.getSubjectName());
-        }
     }
 
     /**
@@ -126,9 +123,6 @@ public class CurriculumServiceImpl implements CurriculumService {
         if (curriculumDetailDTO.getFri().equals(subjectDO.getSubjectName())){
             curriculumDetailDTO.setFri(subjectDO.getSubjectId().toString());
         }
-        if (curriculumDetailDTO.getSat().equals(subjectDO.getSubjectName())){
-            curriculumDetailDTO.setSat(subjectDO.getSubjectId().toString());
-        }
     }
 
     @Override
@@ -175,6 +169,8 @@ public class CurriculumServiceImpl implements CurriculumService {
                     if (curriculumDetailDTO.getId() != null && 0 != curriculumDetailDTO.getId()) {
                         updateList.add(curriculumDetailDTO);
                     } else {
+                        curriculumDetailDTO.setmId(main.getId());
+                        curriculumDetailDTO.setStatus(0);
                         insertList.add(curriculumDetailDTO);
                     }
                 }
@@ -304,9 +300,6 @@ public class CurriculumServiceImpl implements CurriculumService {
         if (!subNameList.contains(curriculumDetailDTO.getFri())) {
             throw new BizException(BizExceptionCode.NOT_EXISTS_SUBJECT.getCode(), String.format(BizExceptionCode.NOT_EXISTS_SUBJECT.getMessage(), curriculumDetailDTO.getFri()));
         }
-        if (!subNameList.contains(curriculumDetailDTO.getSat())) {
-            throw new BizException(BizExceptionCode.NOT_EXISTS_SUBJECT.getCode(), String.format(BizExceptionCode.NOT_EXISTS_SUBJECT.getMessage(), curriculumDetailDTO.getSat()));
-        }
     }
 
     @Override
@@ -315,6 +308,7 @@ public class CurriculumServiceImpl implements CurriculumService {
             return;
         }
         curriculumMapper.updateByPublish(id);
+        curriculumMapper.updateByPublishFrom(id);
     }
 
     @Override

+ 2 - 2
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/TeacherServiceImpl.java

@@ -146,9 +146,9 @@ public class TeacherServiceImpl implements TeacherService{
 
                         if ("已婚".equals(json.get("teacher_marriage"))) {
                             json.put("teacher_marriage", 0);
-                        }else if ("".equals(json.get("teacher_marriage"))) {
+                        }else if ("未婚".equals(json.get("teacher_marriage"))) {
                             json.put("teacher_marriage", 1);
-                        }else if (!"已婚".equals(json.get("teacher_marriage")) && !"".equals(json.get("teacher_marriage"))) {
+                        }else if (!"已婚".equals(json.get("teacher_marriage")) && !"未婚".equals(json.get("teacher_marriage"))) {
                             throw new BizException(BizExceptionCode.ILLEGAL_MARRIAGE);
                         }
                     }

+ 3 - 3
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/exception/BizExceptionCode.java

@@ -25,15 +25,15 @@ public enum BizExceptionCode implements BaseExceptionCode {
     EXISTS_SCORE_PUBLISH(5000013, "存在已发布成绩,禁止删除"),
     EXISTS_CLASS(500011, "存在班级,无法删除"),
     HOMEWORK_RELEASE(500012, "存在发布作业,无法删除"),
-    REPEAT_SUBJECTS(600001, "老师已在这个班任教"),
+    REPEAT_SUBJECTS(600001, "同个老师不可班带相同的课"),
     REPEAT_GRADE_NAME(600001, "年级名称重复"),
     REPEAT_CLASS_NAME(600002, "班级名称重复"),
     REPEAT_STUDENT_NUMBER(600003, "学生学号不可重复"),
     TASK_RELEASE_STATUS(600005, "作业已发布无法更改"),
     COURSE_RELEASE_STATUS(600006, "课程表已生效,无法删除"),
-    NOTICE_RELEASE_STATUS(600007, "学校发布已生效,无法删除"),
+    NOTICE_RELEASE_STATUS(600007, "学校通知已生效,无法删除"),
     ILLEGAL_Gender(600007, "无效性别"),
-    ILLEGAL_MARRIAGE(600008, "婚姻状态无效"),
+    ILLEGAL_MARRIAGE(600008, "婚姻状态无效,应为:已婚或未婚"),
     NOT_EXISTS_SUBJECT(60005, "科目<u>%s</u>不存在");
 
 

+ 1 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/CurriculumMapper.java

@@ -91,6 +91,7 @@ public interface CurriculumMapper {
      * @return
      */
     int updateByPublish(Long id);
+    int updateByPublishFrom(Long id);
 
     /**
      * 取消发布

+ 1 - 1
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SysClazzMapper.java

@@ -35,5 +35,5 @@ public interface SysClazzMapper {
 
     int countClazz(@Param("clazz_name") String clazz_name, @Param("clazz_grade") String clazz_grade, @Param("school_id") Long school_id);
 
-    Integer teacherClazz(@Param("teacher_id") Long teacher_id,@Param("clazz_id") Long clazz_id );
+    Integer teacherClazz(@Param("subject_name") String subject_name,@Param("teacher_id") Long teacher_id );
 }

+ 8 - 3
applications/school/school-server/src/main/resources/mapper/CurriculumMapper.xml

@@ -264,10 +264,15 @@
   </select>
 
   <update id="updateByPublish" parameterType="java.lang.Long">
-    update clazz_main_curriculum,clazz_curriculum
-    set clazz_main_curriculum.mcur_status = 1 ,clazz_curriculum.cur_status = 1 ,
+    update clazz_main_curriculum
+    set mcur_status = 1 ,
       createTime = now()
-    where id = #{id,jdbcType=BIGINT} and clazz_curriculum.cur_id=id
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPublishFrom" parameterType="java.lang.Long">
+    update clazz_curriculum
+    set clazz_curriculum.cur_status = 1
+    where cur_mid = #{id,jdbcType=BIGINT}
   </update>
 
   <update id="updateByRepublish" parameterType="java.lang.Long">

+ 4 - 4
applications/school/school-server/src/main/resources/mapper/SysClazzMapper.xml

@@ -251,11 +251,11 @@
   <select id="teacherClazz" resultType="int">
     select count(*) from sys_teacher_clazz
     <where>
-      <if test="teacher_id != null">
-         teacher_id=#{teacher_id}
+      <if test="subject_name != null">
+        subject_name=#{subject_name}
       </if>
-        <if test="clazz_id != null">
-            and clazz_id=#{clazz_id}
+        <if test="teacher_id != null">
+            and teacher_id=#{teacher_id}
         </if>
     </where>
   </select>

+ 4 - 1
applications/wechat/wechat-api/src/main/java/com/usoftchina/smartschool/wechat/api/WechatApi.java

@@ -10,5 +10,8 @@ import org.springframework.web.bind.annotation.RequestBody;
 public interface WechatApi {
 
     @PostMapping("/send/Message")
-    public Result sendMsg(@RequestBody MessageInfoDTO info);
+    Result sendMsg(@RequestBody MessageInfoDTO info);
+
+    @PostMapping("/send/Messages")
+    Result sendOutMessages(@RequestBody String data);
 }

+ 2 - 1
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/controller/TransfersController.java

@@ -50,7 +50,8 @@ public class TransfersController {
     * @Date: 2019/3/7
     */
     @PostMapping("/Messages")
-    public Result sendOutMessages(String data) throws UnsupportedEncodingException {
+    @IgnoreOpenApiAuth
+    public Result sendOutMessages(@RequestBody String data) throws UnsupportedEncodingException {
         if (StringUtils.isEmpty(data)) {
             return Result.error("信息为空");
         }

+ 17 - 15
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/ReceiveService.java

@@ -60,23 +60,25 @@ public class ReceiveService {
         Result result = null;
         //记录发送失败次数
         int count = 0;
-        for (MessageInfo msg : data) {
-            if (!msg.getSend()) {
-                //处理openid,如果不存在openid,则直接忽略
-                //getOpenId(msg);
-                result = wxPushService.wechatPush(msg);
-                if (result.isSuccess()) {
-                    msg.setSend(true);
-                } else {
-                    msg.setReason(result.getMessage());
-                    count ++;
+        if (null != data) {
+            for (MessageInfo msg : data) {
+                if (!msg.getSend()) {
+                    //处理openid,如果不存在openid,则直接忽略
+                    //getOpenId(msg);
+                    result = wxPushService.wechatPush(msg);
+                    if (result.isSuccess()) {
+                        msg.setSend(true);
+                    } else {
+                        msg.setReason(result.getMessage());
+                        count++;
+                    }
                 }
             }
-        }
-        //存在发送失败的消息
-        if (count > 0) {
-            msgPackage.addRetry();
-            sendService.sendDelayMessage(msgPackage);
+            //存在发送失败的消息
+            if (count > 0) {
+                msgPackage.addRetry();
+                sendService.sendDelayMessage(msgPackage);
+            }
         }
         /**
          * Delivery Tag 用来标识信道中投递的消息。RabbitMQ 推送消息给 Consumer 时,会附带一个 Delivery Tag,

+ 2 - 2
frontend/pc-web/app/util/BaseUtil.js

@@ -52,8 +52,8 @@ Ext.define('school.util.BaseUtil', {
         refreshTabTitle: function (id, title) {
             var currentTab = this.getCurrentTab();
             currentTab.tabId = id;
-            currentTab.setTitle(title);
-            currentTab.setTooltip(title);
+            currentTab.tab.setText(title);
+            currentTab.tab.setTooltip(title);
         },
 
         /**

+ 11 - 3
frontend/pc-web/app/view/Interaction/timetable/Detail.js

@@ -133,9 +133,17 @@ Ext.define('school.view.interaction.timetable.Detail', {
                     data: [['第一学期'], ['第二学期']]
                 }),
                 defaultValue: (function() {
-                    let now = new Date();
-                    let month = now.getMonth() + 1;
-                    return (month < 9) ? '第一学期' : '第二学期'
+                    let now = new Date(),
+                    month = now.getMonth() + 1,
+                    date = now.getDate(),
+                    term;
+
+                    if((month > 2 && month < 8) || (month == 2 && date > 15) || (month == 8 && date < 15)) {
+                        term = '第二学期';
+                    }else {
+                        term = '第一学期'
+                    }
+                    return term;
                 })()
             }, {
                 xtype: "textfield",

+ 2 - 2
frontend/pc-web/app/view/Interaction/timetable/DetailModel.js

@@ -11,8 +11,8 @@ Ext.define('school.view.interaction.timetable.DetailModel', {
             text;
 
             if(!!gradeName && !!clazzName && !!termPart && !!termName) {
-                text =  gradeName + clazzName + termPart.split('-')[0].substring(2, 4) + '年' + termName + '课表';
-                this.set('name', text);
+                text =  gradeName + clazzName + termPart.split('-')[0] + '年' + termName + '课表';
+                // this.set('name', text);
             }else if(!gradeName) {
                 text = '请选择年级';
             }else if(!clazzName) {

+ 11 - 3
frontend/pc-web/app/view/Interaction/timetable/List.js

@@ -96,9 +96,17 @@ Ext.define('school.view.interaction.timetable.List', {
                     data: [['第一学期'], ['第二学期']]
                 }),
                 value: (function() {
-                    let now = new Date();
-                    let month = now.getMonth() + 1;
-                    return (month < 9) ? '第一学期' : '第二学期'
+                    let now = new Date(),
+                    month = now.getMonth() + 1,
+                    date = now.getDate(),
+                    term;
+
+                    if((month > 2 && month < 8) || (month == 2 && date > 15) || (month == 8 && date < 15)) {
+                        term = '第二学期';
+                    }else {
+                        term = '第一学期'
+                    }
+                    return term;
                 })()
             }, {
                 xtype: 'combobox',

+ 1 - 1
frontend/pc-web/app/view/auth/Login.js

@@ -43,7 +43,7 @@ Ext.define('school.view.auth.Login', {
                 {
                     xtype: 'component',
                     height: 50,
-                    html:'<div class="auth-title"><img class="x-logo-text" style="" src="resources/images/zhihuixiaoyuan.png" alt=""><div>',
+                    html:'<div class="auth-title"><img class="x-logo-text" style="" src="resources/images/login-text-img.png" alt=""><div>',
                 },
                 {
                     xtype: 'label',

+ 1 - 1
frontend/pc-web/app/view/main/Main.js

@@ -30,7 +30,7 @@ Ext.define('school.view.main.Main', {
                     xtype: 'component',
                     reference: 'mainLogo',
                     cls: 'main-logo-wrap',
-                    html: '<div class="main-logo"><img src="resources/images/default/logo-default.png"/><div class="logo-text">智慧校园</div></div>',
+                    html: '<div class="main-logo"><img src="resources/images/default/logo-default.png"/><div class="logo-text">云平安校园</div></div>',
                     bind: {
                         width: '{navWidth}'
                     }

+ 8 - 8
frontend/pc-web/app/view/main/Main.scss

@@ -79,21 +79,21 @@ $treelist-nav-ui: (
         background: #34BAF6;
 
         img {
-            width: 32px;
-            height: 32px;
-            top: 8px;
-            left: 28px;
+            width: 45px;
+            height: 30px;
+            top: 10px;
+            left: 10px;
             position: relative;
         }
 
         .logo-text {
-            // font-family: 'pingFangSC-Regular';
             font-size: 18px;
-            color: #FFFFFF;
+            color: #fff;
             text-align: left;
-            top: 22px;
+            top: 16px;
             position: absolute;
-            left: 64px;
+            left: 60px;
+            white-space: nowrap;
         }
     }
 }

+ 2 - 2
frontend/pc-web/app/view/main/MainController.js

@@ -14,10 +14,10 @@ Ext.define('school.view.main.MainController', {
         navigationList = refs.navigationTreeList,
         navCollapsed = !navigationList.navCollapsed,
         new_width = navCollapsed ? viewModel.get('smallNavWidth') : viewModel.get('navWidth'),
-        newLogoImgStyle = navCollapsed ? { width: 36, height: 36, top: 6, left: 12 } : { width: 32, height: 32, top: 8, left: 28 },
+        newLogoImgStyle = navCollapsed ? { width: 51, height: 32, top: 8, left: 6 } : { width: 45, height: 30, top: 10, left: 10 },
         newLogoTextStyle = navCollapsed ? {
             0: { opacity: 0 },
-            100: { opacity: 0, display: 'none' }
+            70: { opacity: 0 }
         } : {
             10: { opacity: 0 },
             90: { opacity: 1 }

+ 1 - 1
frontend/pc-web/index.html

@@ -6,7 +6,7 @@
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=10, user-scalable=yes">
 
-    <title>智慧校园</title>
+    <title>云平安校园</title>
     <link rel="icon" href="./resources/images/favicon.png" type="image/x-icon">
     <!-- The line below must be kept intact for Sencha Cmd to build your application -->
     <script id="microloader" data-app="a20e1670-7932-41f6-8e9c-55b77cba3f26" type="text/javascript" src="bootstrap.js"></script>

BIN
frontend/pc-web/resources/images/auth-background.jpg


BIN
frontend/pc-web/resources/images/default/logo-default.png


BIN
frontend/pc-web/resources/images/favicon.png


BIN
frontend/pc-web/resources/images/login-text-img.png


BIN
frontend/pc-web/resources/images/zhihuixiaoyuan.png


+ 0 - 4
frontend/pc-web/resources/json/navigation.json

@@ -54,10 +54,6 @@
     "text": "系统设置",
     "iconCls": "x-ss ss-nav-setting",
     "items": [{
-        "id": "setting-access-roleaccess",
-        "text": "角色授权",
-        "view": "setting-access-roleaccess"
-    }, {
         "id": "setting-device-list",
         "text": "设备参数",
         "view": "setting-device-list"

+ 2 - 4
frontend/wechat-web/src/components/PhonesItem.jsx

@@ -44,13 +44,11 @@ export default class PhonesItem extends Component {
                             phonesBean.phone.length <= 1 ?
                                 <a href={'tel:' + phonesBean.phone[0]} style={{display: 'flex', alignItems: 'center'}}>
                                     <div className='phones-item-phone'>{phonesBean.phone[0]}</div>
-                                    <span style={{widths:10,background:'#FFFFFF',color:'#FFFFFF'}}>22</span>
-                                    <img style={{height:14,height:14,marginLeft:10}} src={phone_img} alt=""/>
+                                    <div><img style={{height:14,height:14,marginLeft:10}} src={phone_img} alt=""/></div>
                                 </a> :
                                 <div style={{display: 'flex', alignItems: 'center'}} onClick={this.onPhoneSelect}>
                                     <div className='phones-item-phone'>{phonesBean.phone[0]}</div>
-                                    <span style={{widths:10,background:'#FFFFFF',color:'#FFFFFF'}}>22</span>
-                                    <img style={{height:14,height:14,marginLeft:10}} src={phone_img} alt=""/>
+                                   <div> <img style={{height:14,height:14,marginLeft:10}} src={phone_img} alt=""/></div>
                                 </div>)}
                     </div>
 

+ 1 - 0
frontend/wechat-web/src/modules/hiPages/send-vote/SendVote.js

@@ -175,6 +175,7 @@ class SendVote extends Component {
                 </div>
 
                 <div className="comhline_sty"></div>
+
                 <div className="common-column-layout">
                     <Picker
                         data={this.state.typeVote} title='投票类型' extra='请选择'

+ 1 - 1
frontend/wechat-web/src/modules/leave/LeaveAddCPage.js

@@ -96,7 +96,7 @@ class LeaveAddCPage extends Component {
                         dismissText: '取消'
                     }}
                     onChange={date => this.setState({startValue: date})}>
-                    <List.Item arrow="horizontal"></List.Item>
+                    <List.Item arrow="horizontal">开始时间</List.Item>
                 </DatePicker>
 
                 <div className="comhline_sty1"></div>

+ 6 - 0
frontend/wechat-web/src/modules/leave/LeaveListPage.css

@@ -12,4 +12,10 @@
     margin: 5px;
     border: #f5f5f5;
     background-color: #0098FD
+}
+
+.no_data{
+    background: #F4F4F4;
+    background-size: 100% 100%;
+    height: 100vh;
 }

+ 16 - 11
frontend/wechat-web/src/modules/leave/LeaveListPage.js

@@ -20,6 +20,7 @@ import RefreshLayout from "../../components/RefreshLayout";
 import {saveListState} from "../../redux/actions/listState";
 import {getIntValue, getStrValue, isObjEmpty} from "../../utils/common";
 import {Toast} from 'antd-mobile';
+import nodata_img from '../../style/imgs/no_data.png';
 
 let LEAVE_LIST_URL = ''
 let mPageIndex = 0
@@ -67,25 +68,29 @@ class LeaveListPage extends React.Component{
 
     render(){
         return <div   style={{background: '#F2F2F2'}}>
-
-            <RefreshLayout
+            {
+                this.state.data.length > 0 ?
+                    <RefreshLayout
                         refreshing={this.state.isRefreshing}
-                         ref={el => {
-                             this.container = el
+                        ref={el => {
+                            this.container = el
                         }}
                         onRefresh={this.getListData}>
                         <Skeleton loading={this.state.isLoading} active paragraph={{rows: 3}}>
-                            {/*{this.state.selectContentArray.map((itemata,index) => <UserItem index ={index} itemata = {itemata} handelRItem={this.handelRItem} removeSItem={this.removeSItem}></UserItem>)}*/}
                             {this.state.data.map((itemdata,index) =>  <LeaveItem itemdata={itemdata} role={this.state.role} index = {index} onItemClick={this.onItemClick.bind(this)}></LeaveItem>
                             )}
-                            {/*<List dataSource={this.state.data}*/}
-                                  {/*renderItem={(itemdata,index) =>(*/}
-                                      {/*<List.Item  >*/}
-                                          {/*<LeaveItem itemdata={itemdata} role={this.state.role} index = {index} onItemClick={this.onItemClick.bind(this)}></LeaveItem>*/}
-                                      {/*</List.Item>*/}
-                                  {/*)}/>*/}
+                            {/*  <List dataSource={this.state.data}
+                                  renderItem={(itemdata,index) =>(
+                                      <List.Item  >
+                                          <LeaveItem itemdata={itemdata} role={this.state.role} index = {index} onItemClick={this.onItemClick.bind(this)}></LeaveItem>
+                                      </List.Item>
+                                  )}/>*/}
                         </Skeleton>
                     </RefreshLayout>
+                    :
+                    <div className="no_data"><img src={nodata_img} alt="" style={{width:'100%',height:'auto'}}/></div>
+            }
+
                     {
                         this.state.role=="teacher"?(""):(<Icon type="plus-circle" theme='filled' className='common-add-icon'
                                                                onClick={this.onAddAction} />)

+ 0 - 1
frontend/wechat-web/src/style/css/phones.css

@@ -61,7 +61,6 @@
 }
 
 .phones-item-phone {
-    width: 100px;
     font-family: PingFangSC-Regular;
     font-size: 15px;
     color: #666666;

BIN
frontend/wechat-web/src/style/imgs/no_data.png