Browse Source

Merge remote-tracking branch 'origin/dev'

zhuth 7 years ago
parent
commit
0fd2bb116d

+ 3 - 1
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/HomeWork.java

@@ -40,6 +40,8 @@ public class HomeWork implements Serializable{
 
     private String grade_name;
 
-    private Date publish_date;
+    private Date publish_date;  //作业发布时间
+
+    private String creator;      //发布人姓名
 
 }

+ 11 - 1
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/Notify.java

@@ -27,7 +27,9 @@ public class Notify implements Serializable{
 
     private String notify_stu;
 
-    private Date publish_date;
+    private Date publish_date;  //发布时间
+
+    private String creator; //创建人姓名
 
     public String getNotify_details() {
         return notify_details;
@@ -132,4 +134,12 @@ public class Notify implements Serializable{
     public void setPublish_date(Date publish_date) {
         this.publish_date = publish_date;
     }
+
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
 }

+ 183 - 172
applications/school/school-server/src/main/resources/mapper/HomeWorkMapper.xml

@@ -1,182 +1,192 @@
 <?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.school.mapper.HomeWorkMapper" >
-  <resultMap id="BaseResultMap" type="com.usoftchina.smartschool.school.po.HomeWork" >
-    <id column="task_id" property="task_id" jdbcType="BIGINT" />
-    <result column="subject_id" property="subject_id" jdbcType="BIGINT" />
-    <result column="task_title" property="task_title" jdbcType="VARCHAR" />
-    <result column="task_status" property="task_status" jdbcType="INTEGER" />
-    <result column="create_date" property="create_date" jdbcType="TIMESTAMP" />
-    <result column="start_date" property="start_date" jdbcType="TIMESTAMP" />
-    <result column="end_date" property="end_date" jdbcType="TIMESTAMP" />
-    <result column="task_creator" property="task_creator" jdbcType="BIGINT" />
-    <result column="school_id" property="school_id" jdbcType="BIGINT" />
-    <result column="task_context" property="task_context" jdbcType="LONGVARCHAR" />
-    <result column="task_files" property="task_files" jdbcType="LONGVARCHAR" />
-    <result column="task_notifier" property="task_notifier" jdbcType="LONGVARCHAR" />
-    <result column="classz_name" property="classz_name" jdbcType="VARCHAR" />
-    <result column="grade_name" property="grade_name" jdbcType="VARCHAR" />
-    <result column="publish_date" property="publish_date" jdbcType="TIMESTAMP" />
-  </resultMap>
+<mapper namespace="com.usoftchina.smartschool.school.mapper.HomeWorkMapper">
+    <resultMap id="BaseResultMap" type="com.usoftchina.smartschool.school.po.HomeWork">
+        <id column="task_id" property="task_id" jdbcType="BIGINT"/>
+        <result column="subject_id" property="subject_id" jdbcType="BIGINT"/>
+        <result column="task_title" property="task_title" jdbcType="VARCHAR"/>
+        <result column="task_status" property="task_status" jdbcType="INTEGER"/>
+        <result column="create_date" property="create_date" jdbcType="TIMESTAMP"/>
+        <result column="start_date" property="start_date" jdbcType="TIMESTAMP"/>
+        <result column="end_date" property="end_date" jdbcType="TIMESTAMP"/>
+        <result column="task_creator" property="task_creator" jdbcType="BIGINT"/>
+        <result column="school_id" property="school_id" jdbcType="BIGINT"/>
+        <result column="task_context" property="task_context" jdbcType="LONGVARCHAR"/>
+        <result column="task_files" property="task_files" jdbcType="LONGVARCHAR"/>
+        <result column="task_notifier" property="task_notifier" jdbcType="LONGVARCHAR"/>
+        <result column="classz_name" property="classz_name" jdbcType="VARCHAR"/>
+        <result column="grade_name" property="grade_name" jdbcType="VARCHAR"/>
+        <result column="publish_date" property="publish_date" jdbcType="TIMESTAMP"/>
+        <result column="creator" property="creator" jdbcType="VARCHAR"/>
+    </resultMap>
 
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">
     select 
     *
     from task_notify
     where task_id = #{task_id,jdbcType=BIGINT}
   </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
     delete from task_notify
     where task_id = #{task_id,jdbcType=BIGINT}
   </delete>
-  <insert id="insert" parameterType="com.usoftchina.smartschool.school.po.HomeWork" >
+    <insert id="insert" parameterType="com.usoftchina.smartschool.school.po.HomeWork">
     insert into task_notify (subject_id, task_title,
       task_status, create_date, start_date, 
       end_date, task_creator, school_id, 
       task_context, task_files, task_notifier,
-      classz_name, grade_name
+      classz_name, grade_name,creator
       )
     values (#{subject_id,jdbcType=BIGINT}, #{task_title,jdbcType=VARCHAR},
       #{task_status,jdbcType=INTEGER}, #{create_date,jdbcType=TIMESTAMP}, #{start_date,jdbcType=TIMESTAMP}, 
       #{end_date,jdbcType=TIMESTAMP}, #{task_creator,jdbcType=BIGINT}, #{school_id,jdbcType=BIGINT}, 
       #{task_context,jdbcType=LONGVARCHAR}, #{task_files,jdbcType=LONGVARCHAR}, #{task_notifier,jdbcType=LONGVARCHAR},
-      #{task_title,jdbcType=VARCHAR},#{task_title,jdbcType=VARCHAR}
+      #{task_title,jdbcType=VARCHAR},#{task_title,jdbcType=VARCHAR}, #{creator,jdbcType=VARCHAR}
       )
   </insert>
-  <insert id="insertSelective" parameterType="com.usoftchina.smartschool.school.po.HomeWork" >
-    <selectKey  resultType="java.lang.Long" keyProperty="task_id">
-      SELECT LAST_INSERT_ID() AS ID
-    </selectKey>
-    insert into task_notify
-    <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="subject_id != null" >
-        subject_id,
-      </if>
-      <if test="task_title != null" >
-        task_title,
-      </if>
-      <if test="task_status != null" >
-        task_status,
-      </if>
-      <if test="create_date != null" >
-        create_date,
-      </if>
-      <if test="start_date != null" >
-        start_date,
-      </if>
-      <if test="end_date != null" >
-        end_date,
-      </if>
-      <if test="task_creator != null" >
-        task_creator,
-      </if>
-      <if test="school_id != null" >
-        school_id,
-      </if>
-      <if test="task_context != null" >
-        task_context,
-      </if>
-      <if test="task_files != null" >
-        task_files,
-      </if>
-      <if test="task_notifier != null" >
-        task_notifier,
-      </if>
-      <if test="classz_name != null" >
-        classz_name,
-      </if>
-      <if test="grade_name != null" >
-        grade_name,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="subject_id != null" >
-        #{subject_id,jdbcType=BIGINT},
-      </if>
-      <if test="task_title != null" >
-        #{task_title,jdbcType=VARCHAR},
-      </if>
-      <if test="task_status != null" >
-        #{task_status,jdbcType=INTEGER},
-      </if>
-      <if test="create_date != null" >
-        #{create_date,jdbcType=TIMESTAMP},
-      </if>
-      <if test="start_date != null" >
-        #{start_date,jdbcType=TIMESTAMP},
-      </if>
-      <if test="end_date != null" >
-        #{end_date,jdbcType=TIMESTAMP},
-      </if>
-      <if test="task_creator != null" >
-        #{task_creator,jdbcType=BIGINT},
-      </if>
-      <if test="school_id != null" >
-        #{school_id,jdbcType=BIGINT},
-      </if>
-      <if test="task_context != null" >
-        #{task_context,jdbcType=LONGVARCHAR},
-      </if>
-      <if test="task_files != null" >
-        #{task_files,jdbcType=LONGVARCHAR},
-      </if>
-      <if test="task_notifier != null" >
-        #{task_notifier,jdbcType=LONGVARCHAR},
-      </if>
-      <if test="classz_name != null" >
-        #{classz_name,jdbcType=VARCHAR},
-      </if>
-      <if test="grade_name != null" >
-        #{grade_name,jdbcType=VARCHAR},
-      </if>
-    </trim>
-  </insert>
-  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.smartschool.school.po.HomeWork" >
-    update task_notify
-    <set >
-      <if test="subject_id != null" >
-        subject_id = #{subject_id,jdbcType=BIGINT},
-      </if>
-      <if test="task_title != null" >
-        task_title = #{task_title,jdbcType=VARCHAR},
-      </if>
-      <if test="task_status != null" >
-        task_status = #{task_status,jdbcType=INTEGER},
-      </if>
-      <if test="create_date != null" >
-        create_date = #{create_date,jdbcType=TIMESTAMP},
-      </if>
-      <if test="start_date != null" >
-        start_date = #{start_date,jdbcType=TIMESTAMP},
-      </if>
-      <if test="end_date != null" >
-        end_date = #{end_date,jdbcType=TIMESTAMP},
-      </if>
-      <if test="task_creator != null" >
-        task_creator = #{task_creator,jdbcType=BIGINT},
-      </if>
-      <if test="school_id != null" >
-        school_id = #{school_id,jdbcType=BIGINT},
-      </if>
-      <if test="task_context != null" >
-        task_context = #{task_context,jdbcType=LONGVARCHAR},
-      </if>
-      <if test="task_files != null" >
-        task_files = #{task_files,jdbcType=LONGVARCHAR},
-      </if>
-      <if test="task_notifier != null" >
-        task_notifier = #{task_notifier,jdbcType=LONGVARCHAR},
-      </if>
-      <if test="classz_name != null" >
-        classz_name = #{classz_name,jdbcType=VARCHAR},
-      </if>
-      <if test="grade_name != null" >
-        grade_name = #{grade_name,jdbcType=VARCHAR},
-      </if>
-    </set>
-    where task_id = #{task_id,jdbcType=BIGINT}
-  </update>
-  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.smartschool.school.po.HomeWork" >
+    <insert id="insertSelective" parameterType="com.usoftchina.smartschool.school.po.HomeWork">
+        <selectKey resultType="java.lang.Long" keyProperty="task_id">
+            SELECT LAST_INSERT_ID() AS ID
+        </selectKey>
+        insert into task_notify
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="subject_id != null">
+                subject_id,
+            </if>
+            <if test="task_title != null">
+                task_title,
+            </if>
+            <if test="task_status != null">
+                task_status,
+            </if>
+            <if test="create_date != null">
+                create_date,
+            </if>
+            <if test="start_date != null">
+                start_date,
+            </if>
+            <if test="end_date != null">
+                end_date,
+            </if>
+            <if test="task_creator != null">
+                task_creator,
+            </if>
+            <if test="school_id != null">
+                school_id,
+            </if>
+            <if test="task_context != null">
+                task_context,
+            </if>
+            <if test="task_files != null">
+                task_files,
+            </if>
+            <if test="task_notifier != null">
+                task_notifier,
+            </if>
+            <if test="classz_name != null">
+                classz_name,
+            </if>
+            <if test="grade_name != null">
+                grade_name,
+            </if>
+            <if test="creator != null">
+                creator,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="subject_id != null">
+                #{subject_id,jdbcType=BIGINT},
+            </if>
+            <if test="task_title != null">
+                #{task_title,jdbcType=VARCHAR},
+            </if>
+            <if test="task_status != null">
+                #{task_status,jdbcType=INTEGER},
+            </if>
+            <if test="create_date != null">
+                #{create_date,jdbcType=TIMESTAMP},
+            </if>
+            <if test="start_date != null">
+                #{start_date,jdbcType=TIMESTAMP},
+            </if>
+            <if test="end_date != null">
+                #{end_date,jdbcType=TIMESTAMP},
+            </if>
+            <if test="task_creator != null">
+                #{task_creator,jdbcType=BIGINT},
+            </if>
+            <if test="school_id != null">
+                #{school_id,jdbcType=BIGINT},
+            </if>
+            <if test="task_context != null">
+                #{task_context,jdbcType=LONGVARCHAR},
+            </if>
+            <if test="task_files != null">
+                #{task_files,jdbcType=LONGVARCHAR},
+            </if>
+            <if test="task_notifier != null">
+                #{task_notifier,jdbcType=LONGVARCHAR},
+            </if>
+            <if test="classz_name != null">
+                #{classz_name,jdbcType=VARCHAR},
+            </if>
+            <if test="grade_name != null">
+                #{grade_name,jdbcType=VARCHAR},
+            </if>
+            <if test="creator != null">
+                #{creator,jdbcType=VARCHAR},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.smartschool.school.po.HomeWork">
+        update task_notify
+        <set>
+            <if test="subject_id != null">
+                subject_id = #{subject_id,jdbcType=BIGINT},
+            </if>
+            <if test="task_title != null">
+                task_title = #{task_title,jdbcType=VARCHAR},
+            </if>
+            <if test="task_status != null">
+                task_status = #{task_status,jdbcType=INTEGER},
+            </if>
+            <if test="create_date != null">
+                create_date = #{create_date,jdbcType=TIMESTAMP},
+            </if>
+            <if test="start_date != null">
+                start_date = #{start_date,jdbcType=TIMESTAMP},
+            </if>
+            <if test="end_date != null">
+                end_date = #{end_date,jdbcType=TIMESTAMP},
+            </if>
+            <if test="task_creator != null">
+                task_creator = #{task_creator,jdbcType=BIGINT},
+            </if>
+            <if test="school_id != null">
+                school_id = #{school_id,jdbcType=BIGINT},
+            </if>
+            <if test="task_context != null">
+                task_context = #{task_context,jdbcType=LONGVARCHAR},
+            </if>
+            <if test="task_files != null">
+                task_files = #{task_files,jdbcType=LONGVARCHAR},
+            </if>
+            <if test="task_notifier != null">
+                task_notifier = #{task_notifier,jdbcType=LONGVARCHAR},
+            </if>
+            <if test="classz_name != null">
+                classz_name = #{classz_name,jdbcType=VARCHAR},
+            </if>
+            <if test="grade_name != null">
+                grade_name = #{grade_name,jdbcType=VARCHAR},
+            </if>
+            <if test="creator != null">
+                creator = #{creator,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where task_id = #{task_id,jdbcType=BIGINT}
+    </update>
+    <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.smartschool.school.po.HomeWork">
     update task_notify
     set subject_id = #{subject_id,jdbcType=BIGINT},
       task_title = #{task_title,jdbcType=VARCHAR},
@@ -190,10 +200,11 @@
       task_files = #{task_files,jdbcType=LONGVARCHAR},
       task_notifier = #{task_notifier,jdbcType=LONGVARCHAR},
       classz_name = #{classz_name,jdbcType=VARCHAR},
-      grade_name = #{grade_name,jdbcType=VARCHAR}
+      grade_name = #{grade_name,jdbcType=VARCHAR},
+      creator = #{creator,jdbcType=VARCHAR}
     where task_id = #{task_id,jdbcType=BIGINT}
   </update>
-  <update id="updateByPrimaryKey" parameterType="com.usoftchina.smartschool.school.po.HomeWork" >
+    <update id="updateByPrimaryKey" parameterType="com.usoftchina.smartschool.school.po.HomeWork">
     update task_notify
     set subject_id = #{subject_id,jdbcType=BIGINT},
       task_title = #{task_title,jdbcType=VARCHAR},
@@ -206,19 +217,19 @@
     where task_id = #{task_id,jdbcType=BIGINT}
   </update>
 
-  <select id="selectByConditon" resultMap="BaseResultMap">
-    select * from task_notify
-    <where>
-      <if test="con != null">
-        ${con}
-      </if>
-      <if test="school_id != null">
-        and school_id=#{school_id}
-      </if>
-    </where>
-    ORDER BY task_id DESC
-  </select>
-  <update id="updateByPublish" parameterType="java.lang.Long">
+    <select id="selectByConditon" resultMap="BaseResultMap">
+        select * from task_notify
+        <where>
+            <if test="con != null">
+                ${con}
+            </if>
+            <if test="school_id != null">
+                and school_id=#{school_id}
+            </if>
+        </where>
+        ORDER BY task_id DESC
+    </select>
+    <update id="updateByPublish" parameterType="java.lang.Long">
     update task_notify
     set task_status = 1 ,
       publish_date = now()

+ 15 - 3
applications/school/school-server/src/main/resources/mapper/NotifyMapper.xml

@@ -15,6 +15,7 @@
     <result column="notify_teacher" property="notify_teacher" jdbcType="LONGVARCHAR" />
     <result column="notify_stu" property="notify_stu" jdbcType="LONGVARCHAR" />
     <result column="publish_date" property="publish_date" jdbcType="TIMESTAMP" />
+    <result column="creator" property="creator" jdbcType="VARCHAR" />
   </resultMap>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
     select *
@@ -29,12 +30,13 @@
     insert into notify (notify_id, notify_title, notify_type, 
       notify_creator, create_date, notify_status, 
       notify_remarks, school_id, notify_details, 
-      notify_files, notify_teacher, notify_stu
+      notify_files, notify_teacher, notify_stu, creator
       )
     values (#{notify_id,jdbcType=BIGINT}, #{notify_title,jdbcType=VARCHAR}, #{notify_type,jdbcType=INTEGER}, 
       #{notify_creator,jdbcType=BIGINT}, #{create_date,jdbcType=TIMESTAMP}, #{notify_status,jdbcType=INTEGER}, 
       #{notify_remarks,jdbcType=VARCHAR}, #{school_id,jdbcType=BIGINT}, #{notify_details,jdbcType=LONGVARCHAR}, 
-      #{notify_files,jdbcType=LONGVARCHAR}, #{notify_teacher,jdbcType=LONGVARCHAR}, #{notify_stu,jdbcType=LONGVARCHAR}
+      #{notify_files,jdbcType=LONGVARCHAR}, #{notify_teacher,jdbcType=LONGVARCHAR}, #{notify_stu,jdbcType=LONGVARCHAR},
+      #{creator,jdbcType=VARCHAR}
       )
   </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.smartschool.school.po.Notify" >
@@ -76,6 +78,9 @@
       <if test="notify_stu != null" >
         notify_stu,
       </if>
+      <if test="creator != null" >
+        creator,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="notify_title != null" >
@@ -111,6 +116,9 @@
       <if test="notify_stu != null" >
         #{notify_stu,jdbcType=LONGVARCHAR},
       </if>
+      <if test="creator != null" >
+        #{creator,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.smartschool.school.po.Notify" >
@@ -149,6 +157,9 @@
       <if test="notify_stu != null" >
         notify_stu = #{notify_stu,jdbcType=LONGVARCHAR},
       </if>
+      <if test="creator != null" >
+        creator = #{creator,jdbcType=VARCHAR},
+      </if>
     </set>
     where notify_id = #{notify_id,jdbcType=BIGINT}
   </update>
@@ -164,7 +175,8 @@
       notify_details = #{notify_details,jdbcType=LONGVARCHAR},
       notify_files = #{notify_files,jdbcType=LONGVARCHAR},
       notify_teacher = #{notify_teacher,jdbcType=LONGVARCHAR},
-      notify_stu = #{notify_stu,jdbcType=LONGVARCHAR}
+      notify_stu = #{notify_stu,jdbcType=LONGVARCHAR},
+      creator = #{creator,jdbcType=VARCHAR}
     where notify_id = #{notify_id,jdbcType=BIGINT}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.smartschool.school.po.Notify" >

+ 2 - 1
frontend/pc-web/app/Application.js

@@ -14,7 +14,8 @@ Ext.define('school.Application', {
     stores: [
         // TODO: add global / shared stores here
         'school.store.Grade',
-        'school.store.Class'
+        'school.store.Class',
+        'school.store.Subject'
     ],
 
     defaultToken: 'main',

+ 2 - 2
frontend/pc-web/app/model/Subject.js

@@ -4,10 +4,10 @@
 Ext.define('school.model.Subject', {
     extend: 'school.model.Base',
     fields: [{
-        name: 'code', // 学科代码
+        name: 'subject_id', // 学科代码
         type: 'string'
     }, {
-        name: 'name', // 学科名称
+        name: 'subject_name', // 学科名称
         type: 'string'
     }]
 });

+ 58 - 46
frontend/pc-web/app/store/Subject.js

@@ -4,53 +4,65 @@
 Ext.define('school.store.Subject', {
     extend: 'Ext.data.Store',
     alias: 'store.store_subject',
+    storeId: 'store_subject',
 
     model: 'school.model.Subject',
+    autoLoad: false,
+    proxy: {
+        type: 'ajax',
+        url: '/api/school/subject/list',
+        reader: {
+            type: 'json',
+            rootProperty: 'data.list'
+        }
+    },
+    // fields: ['subject_id', 'subject_name'],
+    // data: []
 
-    data: [{
-        code: '1',
-        name: '语文'
-    }, {
-        code: '2',
-        name: '数学'
-    }, {
-        code: '3',
-        name: '英语'
-    }, {
-        code: '4',
-        name: '物理'
-    }, {
-        code: '5',
-        name: '化学'
-    }, {
-        code: '6',
-        name: '生物'
-    }, {
-        code: '7',
-        name: '政治'
-    }, {
-        code: '8',
-        name: '历史'
-    }, {
-        code: '9',
-        name: '地理'
-    }, {
-        code: '10',
-        name: '体育'
-    }, {
-        code: '11',
-        name: '书法'
-    }, {
-        code: '12',
-        name: '美工'
-    }, {
-        code: '13',
-        name: '画画'
-    }, {
-        code: '14',
-        name: '自然'
-    }, {
-        code: '15',
-        name: '思想品德'
-    }]
+    // data: [{
+    //     code: '1',
+    //     name: '语文'
+    // }, {
+    //     code: '2',
+    //     name: '数学'
+    // }, {
+    //     code: '3',
+    //     name: '英语'
+    // }, {
+    //     code: '4',
+    //     name: '物理'
+    // }, {
+    //     code: '5',
+    //     name: '化学'
+    // }, {
+    //     code: '6',
+    //     name: '生物'
+    // }, {
+    //     code: '7',
+    //     name: '政治'
+    // }, {
+    //     code: '8',
+    //     name: '历史'
+    // }, {
+    //     code: '9',
+    //     name: '地理'
+    // }, {
+    //     code: '10',
+    //     name: '体育'
+    // }, {
+    //     code: '11',
+    //     name: '书法'
+    // }, {
+    //     code: '12',
+    //     name: '美工'
+    // }, {
+    //     code: '13',
+    //     name: '画画'
+    // }, {
+    //     code: '14',
+    //     name: '自然'
+    // }, {
+    //     code: '15',
+    //     name: '思想品德'
+    // }]
 });

+ 34 - 0
frontend/pc-web/app/view/Interaction/access/List.js

@@ -5,6 +5,7 @@ Ext.define('school.view.interaction.access.List', {
     extend: 'school.view.core.base.BasePanel',
     xtype: 'interaction-access-list',
 
+    // dataUrl: 'http://10.1.80.180:9520/api/school/record/list',
     dataUrl: '/api/school/record/list',
     initComponent: function () {
         var me = this;
@@ -13,6 +14,39 @@ Ext.define('school.view.interaction.access.List', {
                 xtype: 'textfield',
                 name: 'keyword',
                 fieldLabel: '姓名'
+            }, {
+                xtype: 'gradecombo',
+                name: 'grade_name',
+                fieldLabel: '年级',
+                listeners: {
+                    select: function (combo, record, eOpts) {
+                        combo.up('form').getForm().findField('clazz_name').setValue(null);
+                    }
+                }
+            }, {
+                xtype: 'classcombo',
+                name: 'clazz_name',
+                fieldLabel: '班级',
+                listeners: {
+                    expand: function (combo, eOpts) {
+                        combo.store.clearFilter();
+
+                        var gradeCombo = combo.up('form').getForm().findField('grade_name');
+                        var gradeName = gradeCombo.getValue();
+
+                        var filter = new Ext.util.Filter({
+                            property: 'gradeName',
+                            value: gradeName
+                        });
+
+                        if (!!gradeName) {
+                            combo.store.setFilters([filter]);
+                        }
+                    },
+                    select: function (combo, record, eOpts) {
+                        combo.up('form').getForm().findField('grade_name').setValue(record.get('gradeName'));
+                    }
+                }
             }],
 
             caller: null,

+ 36 - 7
frontend/pc-web/app/view/Interaction/homework/List.js

@@ -5,8 +5,8 @@ Ext.define('school.view.interaction.homework.List', {
     extend: 'school.view.core.base.BasePanel',
     xtype: 'interaction-homework-list',
 
-    // dataUrl: 'http://10.1.80.47:9560/homework/list',
-    dataUrl: '/api/school/homework/list',
+    dataUrl: 'http://10.1.80.180:9520/api/school/homework/list',
+    // dataUrl: '/api/school/homework/list',
     _title: '作业发布',
 
     initComponent: function () {
@@ -20,12 +20,41 @@ Ext.define('school.view.interaction.homework.List', {
                     return ' (task_title like\'%' + value + '%\' or task_context like \'%' + value + '%\') ';
                 }
             }, {
-                xtype: 'textfield',
-                name: 'bj',
-                fieldLabel: '班级'
+                xtype: 'gradecombo',
+                name: 'grade_name',
+                fieldLabel: '年级',
+                listeners: {
+                    select: function (combo, record, eOpts) {
+                        combo.up('form').getForm().findField('classz_name').setValue(null);
+                    }
+                }
+            }, {
+                xtype: 'classcombo',
+                name: 'classz_name',
+                fieldLabel: '班级',
+                listeners: {
+                    expand: function (combo, eOpts) {
+                        combo.store.clearFilter();
+
+                        var gradeCombo = combo.up('form').getForm().findField('grade_name');
+                        var gradeName = gradeCombo.getValue();
+
+                        var filter = new Ext.util.Filter({
+                            property: 'gradeName',
+                            value: gradeName
+                        });
+
+                        if (!!gradeName) {
+                            combo.store.setFilters([filter]);
+                        }
+                    },
+                    select: function (combo, record, eOpts) {
+                        combo.up('form').getForm().findField('grade_name').setValue(record.get('gradeName'));
+                    }
+                }
             }, {
                 xtype: 'textfield',
-                name: 'task_creator',
+                name: 'creator',
                 fieldLabel: '发布人'
             }, {
                 xtype: 'combobox',
@@ -139,7 +168,7 @@ Ext.define('school.view.interaction.homework.List', {
                     width: 300
                 }, {
                     text: '发布人',
-                    dataIndex: 'task_creator',
+                    dataIndex: 'creator',
                     width: 150
                 }, {
                     text: '发布状态',

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

@@ -12,10 +12,10 @@ Ext.define('school.view.interaction.homework.Release', {
     _title: '作业发布',
     _idField: 'task_id',
     _codeField: null,
-    // _readUrl: 'http://10.1.80.47:9560/homework/read',
-    _readUrl: '/api/school/homework/read',
-    // _saveUrl: 'http://10.1.80.47:9560/homework/save',
-    _saveUrl: '/api/school/homework/save',
+    _readUrl: 'http://10.1.80.180:9520/api/school/homework/read',
+    // _readUrl: '/api/school/homework/read',
+    _saveUrl: 'http://10.1.80.180:9520/api/school/homework/save',
+    // _saveUrl: '/api/school/homework/save',
     _deleteUrl: '/api/school/homework/delete',
     initId: 0,
     initComponent: function () {
@@ -27,6 +27,12 @@ Ext.define('school.view.interaction.homework.Release', {
             }, {
                 xtype: "textfield",
                 name: "task_creator",
+                fieldLabel: "发布人id",
+                defaultValue: school.util.BaseUtil.getCurrentUser().id,
+                hidden: true
+            }, {
+                xtype: "textfield",
+                name: "creator",
                 fieldLabel: "发布人",
                 defaultValue: school.util.BaseUtil.getCurrentUser().username,
                 readOnly: true
@@ -119,6 +125,7 @@ Ext.define('school.view.interaction.homework.Release', {
             toolBtns: [{
                 xtype: 'button',
                 text: '发布',
+                hidden: true,
                 bind: {
                     hidden: '{!task_id}'
                 },

+ 131 - 74
frontend/pc-web/app/view/Interaction/mailbox/List.js

@@ -5,6 +5,9 @@ Ext.define('school.view.interaction.mailbox.List', {
     extend: 'school.view.core.base.BasePanel',
     xtype: 'interaction-mailbox-list',
 
+    controller: 'interaction-mailbox-list',
+
+    // dataUrl: 'http://10.1.80.47:9520/api/school/principal/list',
     dataUrl: '/api/school/principal/list',
     initComponent: function() {
         var me = this;
@@ -12,11 +15,80 @@ Ext.define('school.view.interaction.mailbox.List', {
             searchField: [{
                 xtype: 'textfield',
                 name: 'keyword',
-                fieldLabel: '关键字'
+                fieldLabel: '关键字',
+                getCondition: function (value) {
+                    return ' (mailbox_title like\'%' + value + '%\' or mailbox_context like \'%' + value + '%\') ';
+                }
+            }, {
+                xtype: 'gradecombo',
+                name: 'mb_grade',
+                fieldLabel: '年级',
+                listeners: {
+                    select: function (combo, record, eOpts) {
+                        combo.up('form').getForm().findField('mb_class').setValue(null);
+                    }
+                }
+            }, {
+                xtype: 'classcombo',
+                name: 'mb_class',
+                fieldLabel: '班级',
+                listeners: {
+                    expand: function (combo, eOpts) {
+                        combo.store.clearFilter();
+
+                        var gradeCombo = combo.up('form').getForm().findField('mb_grade');
+                        var gradeName = gradeCombo.getValue();
+
+                        var filter = new Ext.util.Filter({
+                            property: 'gradeName',
+                            value: gradeName
+                        });
+
+                        if (!!gradeName) {
+                            combo.store.setFilters([filter]);
+                        }
+                    },
+                    select: function (combo, record, eOpts) {
+                        combo.up('form').getForm().findField('mb_grade').setValue(record.get('gradeName'));
+                    }
+                }
+            }, {
+                xtype: 'combobox',
+                fieldLabel: '回复状态',
+                name: 'mb_reply',
+                displayField: 'name',
+                valueField: 'value',
+                editable: true,
+                store: Ext.create('Ext.data.ArrayStore', {
+                    fields: ['name', 'value'],
+                    data: [['已回复', 3], ['未回复', 0]]
+                }),
+                minChars: 0,
+                queryMode: 'local',
+                getCondition: function(v) {
+                    return v == 3 ? ('mailbox_status = 3') : ('mailbox_status != 3 or mailbox_status is null')
+                }
+            }, {
+                xtype: 'combobox',
+                fieldLabel: '忽略状态',
+                name: 'mb_ignore',
+                displayField: 'name',
+                valueField: 'value',
+                editable: false,
+                value: '0',
+                store: Ext.create('Ext.data.ArrayStore', {
+                    fields: ['name', 'value'],
+                    data: [['已忽略', 1], ['正常', 0]]
+                }),
+                minChars: 0,
+                queryMode: 'local',
+                getCondition: function(v) {
+                    return v == 1 ? ('mb_ignore = 1') : ('mb_ignore != 1 or mb_ignore is null')
+                }
             }],
 
             gridConfig: {
-                idField: null,
+                idField: 'mailbox_id',
                 codeField: null,
                 statusCodeField: null,
                 dataUrl: me.dataUrl,
@@ -25,103 +97,88 @@ Ext.define('school.view.interaction.mailbox.List', {
                 totalProperty: 'data.total',
                 actionColumn: [],
                 selModel: {
-                    type: 'cellmodel'
+                    checkOnly: true,
+                    type: 'checkboxmodel',
+                    mode: "MULTI",
+                    ignoreRightMouseSelection: false
                 },
                 hiddenTools: false,
                 disableDetail: true,
                 toolBtns: [{
                     xtype: 'button',
-                    text: '导出'
+                    text: '忽略',
+                    handler: 'onIgnoreClick'
                 }, {
                     xtype: 'button',
-                    text: '批量回复'
+                    text: '取消忽略',
+                    handler: 'onUnIgnoreClick'
                 }, {
                     xtype: 'button',
                     text: '删除'
                 }],
                 columns : [{
+                    text: 'ID',
+                    dataIndex: 'mailbox_id',
+                    hidden: true
+                }, {
                     text: '标题',
-                    dataIndex: 'mailboxTitle',
+                    dataIndex: 'mailbox_title',
                     width: 120
                 }, {
                     text: '内容',
-                    dataIndex: 'mailboxContext',
+                    dataIndex: 'mailbox_context',
                     width: 300
                 }, {
                     xtype: 'datecolumn',
                     text: '日期',
-                    dataIndex: 'createDate'
+                    dataIndex: 'create_date',
+                    width: 150
                 }, {
                     text: '提出人',
-                    dataIndex: 'mailboxCreator',
+                    dataIndex: 'mb_creatorname',
                     width: 120
+                }, {
+                    text: '年级',
+                    dataIndex: 'mb_grade'
+                }, {
+                    text: '班级',
+                    dataIndex: 'mb_class'
+                }, {
+                    text: '学生',
+                    dataIndex: 'mb_student'
+                }, {
+                    text: '回复状态',
+                    dataIndex: 'mailbox_status',
+                    renderer: function(v, m, r) {
+                        return v == 3 ? '已回复' : '未回复';
+                    }
+                }, {
+                    text: '忽略状态',
+                    dataIndex: 'mb_ignore',
+                    renderer: function(v, m, r) {
+                        return v == 1 ? '已忽略' : '正常';
+                    }
+                }, {
+                    text: '回复信息',
+                    dataIndex: 'mb_reply',
+                    width: 250
+                }, {
+                    xtype:'actioncolumn',
+                    width:70,
+                    dataIndex:'actioncolumn',
+                    text:'操作',
+                    align: 'center',
+                    items: [{
+                        tooltip: '回复',
+                        iconCls: 'x-fa fa-pencil fa-fw',
+                        scope:this
+                    }],
+                    listeners: {
+                        click: 'onActionClick'
+                    }
                 }]
             },
         });
         this.callParent(arguments);
-    },
-
-    /**
-     * 处理部分字段值
-     */
-    getConditionValue: function (field, value) {
-        var me = this,
-            xtypes = field.getXTypes().split('/'),
-            conditionValue;
-        if (me.isContainsAny(xtypes, ['datefield'])) {
-            conditionValue = Ext.Date.format(new Date(from), 'Y-m-d H:i:s');
-        } else if (me.isContainsAny(xtypes, ['conmonthfield'])) {
-            var from = value.from,
-                to = value.to;
-
-            conditionValue = from + ',' + to;
-        } else if (me.isContainsAny(xtypes, ['condatefield'])) {
-            var from = value.from,
-                to = value.to;
-
-            conditionValue = Ext.Date.format(new Date(from), 'Y-m-d 00:00:00') + ',' + Ext.Date.format(new Date(to), 'Y-m-d 23:59:59');
-        } else if (me.isContainsAny(xtypes, ['dbfindtrigger'])) {
-            conditionValue = value;
-        } else if (me.isContainsAny(xtypes, ['combobox', 'combo'])) {
-            conditionValue = value;
-        } else if (me.isContainsAny(xtypes, ['multicombo'])) {
-            conditionValue = value.map ? value.map(function (v) {
-                return v.value;
-            }).join(',') : '';
-        } else {
-            conditionValue = value;
-        }
-
-        return conditionValue;
-    },
-
-    getExtraParams: function(store, op, condition) {
-        var temp = {};
-
-        for(let x = 0; x < condition.length; x++) {
-            let c = condition[x];
-            if(c.field == 'keyword') {
-                temp.keyword = c.value;
-            }else if(c.field == 'date') {
-                temp.fromDate = new Date(c.value.split(',')[0]).getTime();
-                temp.endDate = new Date(c.value.split(',')[1]).getTime();
-            }else if(c.field == 'quoted') {
-                temp.quoted = c.value == 'all' ? null : c.value;
-            }else if(c.field == 'closed') {
-                // temp.endDate = c.value == 'all' ? null : (
-                //     c.value == '0' ? 
-                // );
-            }
-        }
-        let obj = {
-            pageNumber: store.exportNumber?store.exportNumber:op._page,
-            pageSize: store.exportPageSize?store.exportPageSize:store.pageSize
-        };
-        for(let k in temp) {
-            if(!!temp[k]) {
-                obj[k] = temp[k];
-            }
-        }
-        return obj;
-     },
+    }
 });

+ 195 - 0
frontend/pc-web/app/view/Interaction/mailbox/ListController.js

@@ -0,0 +1,195 @@
+Ext.define('school.view.interaction.mailbox.ListController', {
+    extend: 'school.view.core.base.BasePanelController',
+    alias: 'controller.interaction-mailbox-list',
+
+    onActionClick: function(tableView, td, row, col, e, record, tr) {
+        let me = this;
+        me.onReply(record.data);
+        // let targetCls = event.target.classList;
+        // if(targetCls.contains('fa-pencil')) {
+        //     me.modifyClick(record.data);
+        // }else if(targetCls.contains('fa-trash-o')) {
+        //     me.onDeleteClick(record.data.subject_id);
+        // }
+    },
+
+    onReply: function (data) {
+        let me = this,
+        tab = school.util.BaseUtil.getCurrentTab(),
+        view = me.getView(),
+        win = Ext.getCmp('reply-win');
+
+        if (!win) {
+            win = Ext.create('Ext.window.Window', {
+                title: '回复',
+                width: tab.getBox().width * 0.8,
+                height: tab.getBox().height * 0.8,
+                id: 'reply-win',
+                constrain: true,
+                modal: true,
+                bodyPadding: 10,
+                layout: 'fit',
+                scrollable: true,
+                items: [{
+                    xtype: 'form',
+                    layout: 'column',
+                    defaults: {
+                        margin: '0 0 10 0',
+                        columnWidth: 1
+                    },
+                    items: [{
+                        xtype: 'hidden',
+                        name: 'id',
+                    }, {
+                        xtype: 'textareafield',
+                        name: 'content',
+                        fieldLabel: '内容',
+                        readOnly: true,
+                    }, {
+                        xtype: 'textareafield',
+                        name: 'text',
+                        fieldLabel: '回复',
+                        allowBlank: false,
+                        maxLength: 500
+                    }],
+                    buttonAlign: 'center',
+                    buttons: [{
+                        text: '确定',
+                        formBind: true,
+                        handler: function () {
+                            let form = this.up('form');
+                            let id = form.getValues().id;
+                            let text = form.getValues().text;
+                            let url, params, headers;
+                            
+                            params = {
+                                id: id,
+                                msg: text
+                            };
+
+                            headers = {
+                                "Content-Type": 'application/x-www-form-urlencoded; charset=UTF-8'
+                            }
+
+                            view.setLoading(true);
+                            school.util.BaseUtil.request({
+                                // url: 'http://10.1.80.47:9520/api/school/principal/reply',
+                                url: '/api/school/principal/reply',
+                                method: 'POST',
+                                params: params,
+                                headers: headers
+                            }).then(function (res) {
+                                view.setLoading(false);
+                                win.close();
+                                school.util.BaseUtil.showSuccessToast('添加成功');
+                                view.refresh();
+                            }).catch(function (e) {
+                                view.setLoading(false);
+                                school.util.BaseUtil.showErrorToast('添加失败: ' + e.message);
+                            });
+                        }
+                    }]
+                }]
+            });
+            tab.add(win);
+            win.setTitle(data.mailbox_title);
+            win.down('form').getForm().findField('id').setValue(data.mailbox_id);
+            win.down('form').getForm().findField('content').setValue(data.mailbox_context);
+            win.down('form').getForm().findField('text').setValue(data.mb_reply);
+        }
+        win.show();
+    },
+
+    onIgnoreClick: function() {
+        let me = this,
+        view = me.getView();
+
+        let grid = view.down('grid'),
+        selectedRecords = grid.getSelection();
+        let data, flag = false;
+
+        data = selectedRecords.map(function(r) {
+            if(r.get('mb_ignore') == 1) {
+                flag = true;
+                return;
+            }
+            return {
+                id: r.get('mailbox_id')
+            };
+        });
+
+        if(data.length == 0) {
+            school.util.BaseUtil.showErrorToast('请先勾选需要删除的记录');
+            return;
+        }
+
+        if(flag) {
+            school.util.BaseUtil.showErrorToast('不可包含已忽略记录');
+            return;
+        }
+
+        grid.setLoading(true);
+        school.util.BaseUtil.request({
+            // url: 'http://10.1.80.47:9520/api/school/principal/batchIgnore',
+            url: '/api/school/principal/batchIgnore',
+            method: 'POST',
+            params: JSON.stringify({
+                baseDTOs: data
+            })
+        }).then(function(res) {
+            grid.setLoading(false);
+            school.util.BaseUtil.showSuccessToast('已忽略' + data.length + '条记录');
+            grid.store.loadPage(grid.store.currentPage);
+        }).catch(function(e) {
+            grid.setLoading(false);
+            school.util.BaseUtil.showErrorToast('添加忽略失败: ' + e.message);
+        });
+    },
+
+    onUnIgnoreClick: function() {
+        let me = this,
+        view = me.getView();
+
+        let grid = view.down('grid'),
+        selectedRecords = grid.getSelection();
+        let data, flag = false;
+
+        data = selectedRecords.map(function(r) {
+            if(r.get('mb_ignore') != 1) {
+                flag = true;
+                return;
+            }
+            return {
+                id: r.get('mailbox_id')
+            };
+        });
+
+        if(data.length == 0) {
+            school.util.BaseUtil.showErrorToast('请先勾选需要删除的记录');
+            return;
+        }
+
+        if(!!flag) {
+            school.util.BaseUtil.showErrorToast('不可包含未忽略记录');
+            return;
+        }
+
+        grid.setLoading(true);
+        school.util.BaseUtil.request({
+            // url: 'http://10.1.80.47:9520/api/school/principal/batchUnIgnore',
+            url: '/api/school/principal/batchUnIgnore',
+            method: 'POST',
+            params: JSON.stringify({
+                baseDTOs: data
+            })
+        }).then(function(res) {
+            grid.setLoading(false);
+            school.util.BaseUtil.showSuccessToast('取消忽略' + data.length + '条记录');
+            grid.store.loadPage(grid.store.currentPage);
+        }).catch(function(e) {
+            grid.setLoading(false);
+            school.util.BaseUtil.showErrorToast('添加忽略失败: ' + e.message);
+        });
+    },
+
+});

+ 4 - 4
frontend/pc-web/app/view/Interaction/notice/List.js

@@ -5,8 +5,8 @@ Ext.define('school.view.interaction.notice.List', {
     extend: 'school.view.core.base.BasePanel',
     xtype: 'interaction-notice-list',
 
-    // dataUrl: 'http://10.1.80.47:9560/notice/list',
-    dataUrl: '/api/school/notice/list',
+    dataUrl: 'http://10.1.80.180:9520/api/school/notice/list',
+    // dataUrl: '/api/school/notice/list',
     _title: '学校通知',
 
     initComponent: function() {
@@ -21,7 +21,7 @@ Ext.define('school.view.interaction.notice.List', {
                 }
             }, {
                 xtype: 'textfield',
-                name: 'notify_creator',
+                name: 'creator',
                 fieldLabel: '发布人'
             }, {
                 xtype: 'combobox',
@@ -127,7 +127,7 @@ Ext.define('school.view.interaction.notice.List', {
                     width: 300
                 }, {
                     text: '发布人',
-                    dataIndex: 'notify_creator',
+                    dataIndex: 'creator',
                     width: 150
                 }, {
                     text: '发布状态',

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

@@ -12,10 +12,10 @@ Ext.define('school.view.interaction.notice.SchoolNotice', {
     _title: '学校通知',
     _idField: 'notify_id',
     _codeField: null,
-    // _readUrl: 'http://10.1.80.47:9560/notice/read',
-    _readUrl: '/api/school/notice/read',
-    // _saveUrl: 'http://10.1.80.47:9560/notice/save',
-    _saveUrl: '/api/school/notice/save',
+    _readUrl: 'http://10.1.80.180:9520/api/school/notice/read',
+    // _readUrl: '/api/school/notice/read',
+    _saveUrl: 'http://10.1.80.180:9520/api/school/notice/save',
+    // _saveUrl: '/api/school/notice/save',
     _deleteUrl: '/api/school/notice/delete',
     initId: 0,
     initComponent: function () {
@@ -27,6 +27,13 @@ Ext.define('school.view.interaction.notice.SchoolNotice', {
             }, {
                 xtype: "textfield",
                 name: "notify_creator",
+                fieldLabel: "发布人id",
+                columnWidth: 0.5,
+                defaultValue: school.util.BaseUtil.getCurrentUser().id,
+                hidden: true
+            }, {
+                xtype: "textfield",
+                name: "creator",
                 fieldLabel: "发布人",
                 columnWidth: 0.5,
                 defaultValue: school.util.BaseUtil.getCurrentUser().username,
@@ -75,6 +82,7 @@ Ext.define('school.view.interaction.notice.SchoolNotice', {
             toolBtns: [{
                 xtype: 'button',
                 text: '发布',
+                hidden: true,
                 bind: {
                     hidden: '{!notify_id}'
                 },

+ 8 - 4
frontend/pc-web/app/view/Interaction/timetable/Detail.js

@@ -7,10 +7,10 @@ Ext.define('school.view.interaction.timetable.Detail', {
     _title: '课程表',
     _idField: 'id',
     _codeField: null,
-    // _readUrl: 'http://10.1.80.36:9520/api/school/curriculum/read',
-    _readUrl: '/api/school/curriculum/read',
-    // _saveUrl: 'http://10.1.80.36:9520/api/school/curriculum/save',
-    _saveUrl: '/api/school/curriculum/save',
+    _readUrl: 'http://10.1.80.47:9520/api/school/curriculum/read',
+    // _readUrl: '/api/school/curriculum/read',
+    _saveUrl: 'http://10.1.80.47:9520/api/school/curriculum/save',
+    // _saveUrl: '/api/school/curriculum/save',
     _deleteUrl: '/api/school/curriculum/delete',
     initId: 0,
     cls: 'timetable',
@@ -253,5 +253,9 @@ Ext.define('school.view.interaction.timetable.Detail', {
         menu.setVisible(false);
         let classTime = Math.abs(Ext.Date.diff(me.currentRecord.get('_time1'), record.get('date'), Ext.Date.MINUTE));
         me.CLASS_TIME = classTime;
+    },
+
+    refresh: function() {
+        Ext.StoreMgr.get('store_subject').load();
     }
 });

+ 1 - 1
frontend/pc-web/app/view/core/base/BasePanel.js

@@ -134,7 +134,7 @@ Ext.define('school.view.core.base.BasePanel', {
             value = item.value,
             condition;
 
-            if(value&&value!=''){
+            if(value !== undefined && value !== null && value !== ''){
                 if(typeof func == 'function') {
                     condition = {
                         type: 'condition',

+ 21 - 0
frontend/pc-web/app/view/core/form/field/SubjectComboBox.js

@@ -0,0 +1,21 @@
+Ext.define('school.view.core.form.field.SubjectComboBox', {
+    extend: 'Ext.form.field.ComboBox',
+    alias: 'widget.subjectcombo',
+
+    fieldLabel: '学科',
+    displayField: 'subject_name',
+    valueField: 'subject_id',
+    editable: true,
+    minChars: 0,
+    queryMode: 'local',
+    initComponent: function() {
+        var me = this;
+        var store = Ext.StoreMgr.get('store_subject');
+        store.load();
+        Ext.apply(me, {
+            store: store,
+        });
+
+        me.callParent(arguments);
+    }
+});

+ 4 - 9
frontend/pc-web/app/view/core/grid/column/SubjectColumn.js

@@ -6,21 +6,16 @@ Ext.define('school.view.core.grid.column.SubjectColumn', {
     xtype: 'subjectcolumn',
 
     editor: {
-        xtype: 'combobox',
-        displayField: 'name',
-        valueField: 'code',
-        store: {
-            type: 'store_subject'
-        },
-        queryMode: 'local'
+        xtype: 'subjectcombo',
+        fieldLabel: null
     },
     renderer: function(v, m , r) {
         let store = m.column.getEditor().store;
-        let idx = store.find('code', v);
+        let idx = store.find('subject_id', v);
 
         if(idx != -1) {
             let subject = store.getAt(idx);
-            v = subject.get('name');
+            v = subject.get('subject_name');
         }
 
         return v;