hanfucheng 4 ay önce
ebeveyn
işleme
b6c7fb4c1d

+ 4 - 0
src/main/java/com/sooka/sponest/data/other/patrolpoint/domain/CenterdataTEmergencyPatrolpoint.java

@@ -181,6 +181,10 @@ public class CenterdataTEmergencyPatrolpoint extends BaseBusinessEntity {
 //    @Excel(name = "数据所属部门(政或党的id)")
 //    @Excel(name = "数据所属部门(政或党的id)")
     private Long dataDeptId;
     private Long dataDeptId;
 
 
+    private String deptId;
+
+    private String deptName;
+
 
 
     @Override
     @Override
     public String toString() {
     public String toString() {

+ 1 - 1
src/main/java/com/sooka/sponest/data/other/patrolpoint/mapper/CenterdataTEmergencyPatrolpointMapper.java

@@ -29,7 +29,7 @@ public interface CenterdataTEmergencyPatrolpointMapper {
      * @param id 巡更点主键
      * @param id 巡更点主键
      * @return 巡更点
      * @return 巡更点
      */
      */
-    CenterdataTEmergencyPatrolpoint selectCenterdataTEmergencyPatrolpointById(String id);
+    CenterdataTEmergencyPatrolpoint selectCenterdataTEmergencyPatrolpointById(CenterdataTEmergencyPatrolpoint centerdataTEmergencyPatrolpoint);
 
 
     /**
     /**
      * 新增巡更点
      * 新增巡更点

+ 4 - 1
src/main/java/com/sooka/sponest/data/other/patrolpoint/service/impl/CenterdataTEmergencyPatrolpointServiceImpl.java

@@ -52,7 +52,10 @@ public class CenterdataTEmergencyPatrolpointServiceImpl extends BaseServiceImpl
      */
      */
     @Override
     @Override
     public CenterdataTEmergencyPatrolpoint selectCenterdataTEmergencyPatrolpointById(String id) {
     public CenterdataTEmergencyPatrolpoint selectCenterdataTEmergencyPatrolpointById(String id) {
-        return centerdataTEmergencyPatrolpointMapper.selectCenterdataTEmergencyPatrolpointById(id);
+        CenterdataTEmergencyPatrolpoint centerdataTEmergencyPatrolpoint  = new CenterdataTEmergencyPatrolpoint();
+        centerdataTEmergencyPatrolpoint.setId(id);
+        setSookaDataBase(centerdataTEmergencyPatrolpoint);
+        return centerdataTEmergencyPatrolpointMapper.selectCenterdataTEmergencyPatrolpointById(centerdataTEmergencyPatrolpoint);
     }
     }
 
 
     /**
     /**

+ 11 - 4
src/main/resources/mapper/other/CenterdataTEmergencyPatrolpointMapper.xml

@@ -32,6 +32,8 @@
         <result property="enterpriseName" column="enterprise_name"/>
         <result property="enterpriseName" column="enterprise_name"/>
         <result property="owndeptid" column="owndeptid"/>
         <result property="owndeptid" column="owndeptid"/>
         <result property="dataDeptId" column="data_dept_id"/>
         <result property="dataDeptId" column="data_dept_id"/>
+        <result property="deptId" column="dept_id"/>
+        <result property="deptName" column="dept_name"/>
     </resultMap>
     </resultMap>
 
 
     <sql id="selectCenterdataTEmergencyPatrolpointVo">
     <sql id="selectCenterdataTEmergencyPatrolpointVo">
@@ -44,7 +46,7 @@
         su.nick_name as update_name, a.data_status,
         su.nick_name as update_name, a.data_status,
         a.name, a.longitude, a.latitude, a.enterprise_id, a.patrolpoint_address,a.patrol_nexttime,
         a.name, a.longitude, a.latitude, a.enterprise_id, a.patrolpoint_address,a.patrol_nexttime,
         a.patrol_lasttime, a.patrol_cycle, a.alert_day, charger, a.charger_phone, a.point_remark, a.bar_code,
         a.patrol_lasttime, a.patrol_cycle, a.alert_day, charger, a.charger_phone, a.point_remark, a.bar_code,
-        a.patrolpoint_status, a.enterprise_name, a.owndeptid, a.data_dept_id from centerdata_t_emergency_patrolpoint a
+        a.patrolpoint_status, a.enterprise_name, a.owndeptid, a.data_dept_id,d.dept_id,d.dept_name from centerdata_t_emergency_patrolpoint a
         left join ${database_system}.sys_dept d on a.data_dept_id=d.dept_id
         left join ${database_system}.sys_dept d on a.data_dept_id=d.dept_id
         LEFT JOIN ${database_system}.sys_user u ON a.create_by = u.user_id
         LEFT JOIN ${database_system}.sys_user u ON a.create_by = u.user_id
         LEFT JOIN ${database_system}.sys_user su ON a.update_by = su.user_id
         LEFT JOIN ${database_system}.sys_user su ON a.update_by = su.user_id
@@ -82,9 +84,12 @@
         </where>
         </where>
     </select>
     </select>
 
 
-    <select id="selectCenterdataTEmergencyPatrolpointById" parameterType="String"
+    <select id="selectCenterdataTEmergencyPatrolpointById" parameterType="CenterdataTEmergencyPatrolpoint"
             resultMap="CenterdataTEmergencyPatrolpointResult">
             resultMap="CenterdataTEmergencyPatrolpointResult">
-        <include refid="selectCenterdataTEmergencyPatrolpointVo"/>
+        select a.id, a.create_by, a.create_time, a.update_by, a.update_time, a.delete_by, a.delete_time, a.data_status, a.name, a.longitude, a.latitude, a.enterprise_id, a.patrolpoint_address, a.patrol_nexttime, a.patrol_lasttime,
+               a.patrol_cycle, a.alert_day, a.charger, a.charger_phone, a.point_remark, a.bar_code, a.patrolpoint_status, a.enterprise_name, a.owndeptid, a.data_dept_id, d.dept_id,d.dept_name
+        from centerdata_t_emergency_patrolpoint a
+        left join ${database_system}.sys_dept d on a.data_dept_id=d.dept_id
         where id = #{id}
         where id = #{id}
     </select>
     </select>
 
 
@@ -116,6 +121,7 @@
             <if test="enterpriseName != null">enterprise_name,</if>
             <if test="enterpriseName != null">enterprise_name,</if>
             <if test="owndeptid != null">owndeptid,</if>
             <if test="owndeptid != null">owndeptid,</if>
             <if test="dataDeptId != null">data_dept_id,</if>
             <if test="dataDeptId != null">data_dept_id,</if>
+            <if test="deptId != null">data_dept_id,</if>
         </trim>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
             <if test="id != null">#{id},</if>
@@ -142,7 +148,7 @@
             <if test="patrolpointStatus != null">#{patrolpointStatus},</if>
             <if test="patrolpointStatus != null">#{patrolpointStatus},</if>
             <if test="enterpriseName != null">#{enterpriseName},</if>
             <if test="enterpriseName != null">#{enterpriseName},</if>
             <if test="owndeptid != null">#{owndeptid},</if>
             <if test="owndeptid != null">#{owndeptid},</if>
-            <if test="dataDeptId != null">#{dataDeptId},</if>
+            <if test="deptId != null">#{deptId},</if>
         </trim>
         </trim>
     </insert>
     </insert>
 
 
@@ -173,6 +179,7 @@
             <if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
             <if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
             <if test="owndeptid != null">owndeptid = #{owndeptid},</if>
             <if test="owndeptid != null">owndeptid = #{owndeptid},</if>
             <if test="dataDeptId != null">data_dept_id = #{dataDeptId},</if>
             <if test="dataDeptId != null">data_dept_id = #{dataDeptId},</if>
+            <if test="deptId != null">data_dept_id = #{deptId},</if>
         </trim>
         </trim>
         where id = #{id}
         where id = #{id}
     </update>
     </update>