Bladeren bron

Merge branch 'dev' of ssh://10.10.100.21/source/smartschool-platform into dev

RaoMeng 7 jaren geleden
bovenliggende
commit
556d66e121

+ 22 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/controller/CurriculumController.java

@@ -72,10 +72,32 @@ public class CurriculumController {
         return Result.success();
     }
 
+    /**
+     * 批量发布
+     * @param batchDealBaseDTO
+     * @return
+     */
+    @PostMapping("/batchPublish")
+    public Result batchPublish(@RequestBody BatchDealBaseDTO batchDealBaseDTO){
+        curriculumService.batchPublish(batchDealBaseDTO);
+        return Result.success();
+    }
+
     //取消发布
     @PostMapping("/republish/{id}")
     public Result republish(@PathVariable("id") Long id){
         curriculumService.republish(id);
         return Result.success();
     }
+
+    /**
+     * 批量取消发布
+     * @param batchDealBaseDTO
+     * @return
+     */
+    @PostMapping("/batchRepublish")
+    public Result batchRepublish(@RequestBody BatchDealBaseDTO batchDealBaseDTO){
+        curriculumService.batchRepublish(batchDealBaseDTO);
+        return Result.success();
+    }
 }

+ 12 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/CurriculumService.java

@@ -62,9 +62,21 @@ public interface CurriculumService {
      */
     void publish(Long id);
 
+    /**
+     * 批量发布
+     * @param batchDealBaseDTO
+     */
+    void batchPublish(BatchDealBaseDTO batchDealBaseDTO);
+
     /**
      * 取消发布
      * @param id
      */
     void republish(Long id);
+
+    /**
+     * 批量取消发布
+     * @param batchDealBaseDTO
+     */
+    void batchRepublish(BatchDealBaseDTO batchDealBaseDTO);
 }

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

@@ -314,6 +314,17 @@ public class CurriculumServiceImpl implements CurriculumService {
         curriculumMapper.updateByPublishFrom(id, 1L);
     }
 
+    @Override
+    public void batchPublish(BatchDealBaseDTO batchDealBaseDTO) {
+        List<DocBaseDTO> docBaseDTOList = batchDealBaseDTO.getBaseDTOs();
+        if (CollectionUtils.isEmpty(docBaseDTOList)) {
+            throw new BizException(BizExceptionCode.USELESS_DATA);
+        }
+        for (DocBaseDTO docBaseDTO : docBaseDTOList) {
+            publish(docBaseDTO.getId());
+        }
+    }
+
     @Override
     public void republish(Long id) {
         if(null == id || 0 == id) {
@@ -322,4 +333,15 @@ public class CurriculumServiceImpl implements CurriculumService {
         curriculumMapper.updateByRepublish(id);
         curriculumMapper.updateByPublishFrom(id, 0L);
     }
+
+    @Override
+    public void batchRepublish(BatchDealBaseDTO batchDealBaseDTO) {
+        List<DocBaseDTO> docBaseDTOList = batchDealBaseDTO.getBaseDTOs();
+        if (CollectionUtils.isEmpty(docBaseDTOList)) {
+            throw new BizException(BizExceptionCode.USELESS_DATA);
+        }
+        for (DocBaseDTO docBaseDTO : docBaseDTOList) {
+            republish(docBaseDTO.getId());
+        }
+    }
 }

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

@@ -151,6 +151,11 @@ public class TeacherServiceImpl implements TeacherService{
                         }else if (!"未婚".equals(json.get("teacher_marriage")) && !"已婚".equals(json.get("teacher_marriage"))) {
                             throw new BizException(BizExceptionCode.ILLEGAL_MARRIAGE);
                         }
+                        //校验教师工号是否已存在
+                        int count = sysTeacherMapper.count(json.getString("teacher_number"), schoolId);
+                        if (count > 0) {
+                            throw new BizException(500006, "教师工号" + json.getString("teacher_number") + "已存在");
+                        }
                     }
                     teacher = JSONObject.parseObject(json.toJSONString(), SysTeacher.class);
                     teacher.setSchool_id(schoolId);

+ 20 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/OutInRecord.java

@@ -38,6 +38,26 @@ public class OutInRecord implements Serializable{
 
     private String grade_clazz;	    //年级加班级名
 
+    private int record_type;	    //出入校类型   1:进入  2:离开  0:其他
+
+    private Date record_date;	    //出入校时间
+
+    public int getRecord_type() {
+        return record_type;
+    }
+
+    public void setRecord_type(int record_type) {
+        this.record_type = record_type;
+    }
+
+    public Date getRecord_date() {
+        return record_date;
+    }
+
+    public void setRecord_date(Date record_date) {
+        this.record_date = record_date;
+    }
+
     public String getStu_name() {
         return stu_name;
     }

+ 2 - 0
applications/school/school-server/src/main/resources/mapper/OutInRecordMapper.xml

@@ -19,6 +19,8 @@
     <result column="clazz_id" property="clazz_id" jdbcType="BIGINT" />
     <result column="clazz_name" property="clazz_name" jdbcType="VARCHAR"/>
     <result column="grade_clazz" property="grade_clazz" jdbcType="VARCHAR"/>
+    <result column="record_type" property="record_type" jdbcType="VARCHAR"/>
+    <result column="record_date" property="record_date" jdbcType="TIMESTAMP"/>
   </resultMap>
   <sql id="Base_Column_List" >
     record_id, record_name, out_date, in_date, record_details, record_remarks,device_id,

+ 1 - 1
applications/school/school-server/src/main/resources/mapper/SysStudentMapper.xml

@@ -442,7 +442,7 @@
   </select>
 
   <select id="selectParentByPhone"  resultMap="parentMap">
-    select * from sys_parents where pa_phone=#{phone} and school_id=#{schoolId}
+    select * from sys_parents where pa_phone=#{phone} and school_id=#{schoolId} limit 0,1
   </select>
 
   <insert id="insertrelationDetail">

+ 9 - 12
frontend/pc-web/app/view/Interaction/access/List.js

@@ -13,7 +13,10 @@ Ext.define('school.view.interaction.access.List', {
             searchField: [{
                 xtype: 'textfield',
                 name: 'keyword',
-                fieldLabel: '姓名'
+                fieldLabel: '姓名',
+                getCondition: function (value) {
+                    return ' (record_name like\'%' + value + '%\') ';
+                }
             }, {
                 xtype: 'gradecombo',
                 name: 'grade_name',
@@ -78,13 +81,14 @@ Ext.define('school.view.interaction.access.List', {
                     hidden: true
                 }, {
                     text: '类型',
-                    dataIndex: 'record_name'
+                    dataIndex: 'record_type'
                 }, {
                     text: '学号',
-                    dataIndex: 'stu_number'
+                    dataIndex: 'stu_number',
+                    width: 160
                 }, {
                     text: '姓名',
-                    dataIndex: 'stu_name'
+                    dataIndex: 'record_name'
                 }, {
                     text: '年级',
                     dataIndex: 'grade_name'
@@ -93,17 +97,10 @@ Ext.define('school.view.interaction.access.List', {
                     dataIndex: 'clazz_name'
                 }, {
                     text: '时间',
-                    dataIndex: 'in_date',
+                    dataIndex: 'record_date',
                     xtype: 'datecolumn',
                     format: 'Y-m-d H:i:s',
                     width: 150,
-                    renderer: function(v, m, r) {
-                        if(r.get('record_name') == '入校记录') {
-                            return r.get('in_date');
-                        }else {
-                            return r.get('out_date');
-                        }
-                    }
                 }]
             },
         });

+ 2 - 2
frontend/pc-web/app/view/Interaction/homework/Release.js

@@ -138,7 +138,7 @@ Ext.define('school.view.interaction.homework.Release', {
                 allowBlank: false
             }, {
                 xtype: 'mfilefield',
-                name: 'accessory',
+                name: 'task_files',
                 fieldLabel: '附件'
             }],
             applyBtns: [{
@@ -170,7 +170,7 @@ Ext.define('school.view.interaction.homework.Release', {
     listeners: {
         load: function(form, data) {
             let fileField = form.down('mfilefield');
-            fileField.value = data.main.accessory
+            fileField.value = data.main.task_files
             fileField.renderMF(fileField);
         }
     },

+ 2 - 2
frontend/pc-web/app/view/Interaction/notice/SchoolNotice.js

@@ -75,7 +75,7 @@ Ext.define('school.view.interaction.notice.SchoolNotice', {
                 allowBlank: false
             }, {
                 xtype: 'mfilefield',
-                name: 'accessory',
+                name: 'notify_files',
                 fieldLabel: '附件'
             }],
             applyBtns: [{
@@ -107,7 +107,7 @@ Ext.define('school.view.interaction.notice.SchoolNotice', {
     listeners: {
         load: function(form, data) {
             let fileField = form.down('mfilefield');
-            fileField.value = data.main.accessory
+            fileField.value = data.main.notify_files
             fileField.renderMF(fileField);
         }
     }

+ 3 - 0
frontend/pc-web/app/view/auth/Login.scss

@@ -20,6 +20,9 @@ $social-weixin-btn-background: dynamic(#00d500);
 
         .auth-title {
             text-align: center;
+            img {
+              height: 58px;
+            }
         }
     }
 }

+ 1 - 0
frontend/pc-web/app/view/basic/class/ClassDetail.js

@@ -53,6 +53,7 @@ Ext.define('school.view.basic.class.ClassDetail', {
                 name: 'clazz_status',
                 fieldLabel: "状态",
                 columnWidth: 0.5,
+                hidden: true,
                 group: '班级信息',
             }, {
                 xtype: "textfield",

+ 1 - 1
frontend/pc-web/app/view/core/form/field/RemoteImgField.scss

@@ -20,7 +20,7 @@
             display: flex;
             justify-content: flex-end;
             background: white;
-            opacity: 0.3;
+            opacity: 0.7;
 
             .tool {
                 width: 24px;

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