Quellcode durchsuchen

[chg] 急修关联多条件查询,mapper.xml路径统一

wcz vor 5 Jahren
Ursprung
Commit
15c98b0f97
26 geänderte Dateien mit 662 neuen und 17 gelöschten Zeilen
  1. 12 4
      lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/controller/EmergencyRepairController.java
  2. 44 1
      lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/dto/RepairCondition.java
  3. 20 0
      lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/dto/RepairResult.java
  4. 1 1
      lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/entity/EmergencyRepair.java
  5. 3 0
      lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/mapper/EmergencyRepairMapper.java
  6. 3 1
      lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/service/EmergencyRepairService.java
  7. 3 0
      lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/service/ErCostItemService.java
  8. 3 0
      lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/service/ErRecordImgService.java
  9. 10 2
      lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/service/impl/EmergencyRepairServiceImpl.java
  10. 12 0
      lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/service/impl/ErCostItemServiceImpl.java
  11. 12 0
      lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/service/impl/ErRecordImgServiceImpl.java
  12. 1 1
      lift-business-service/src/main/resources/application.yml
  13. 501 0
      lift-business-service/src/main/resources/mapper/emergency/EmergencyRepairMapper.xml
  14. 0 0
      lift-business-service/src/main/resources/mapper/project/ProjectHistoryMapper.xml
  15. 0 0
      lift-business-service/src/main/resources/mapper/project/ProjectMapper.xml
  16. 0 0
      lift-business-service/src/main/resources/mapper/project/ProjectUserMapper.xml
  17. 20 2
      lift-enterprise-service/src/main/java/cn/com/ty/lift/enterprise/oa/controller/AnnouncementController.java
  18. 8 2
      lift-enterprise-service/src/main/java/cn/com/ty/lift/enterprise/oa/controller/AttendanceController.java
  19. 8 2
      lift-enterprise-service/src/main/java/cn/com/ty/lift/enterprise/oa/controller/LiftCertificateController.java
  20. 1 1
      lift-enterprise-service/src/main/resources/application.yml
  21. 0 0
      lift-enterprise-service/src/main/resources/mapper/oa/AnnouncementMapper.xml
  22. 0 0
      lift-enterprise-service/src/main/resources/mapper/oa/AttendanceImgMapper.xml
  23. 0 0
      lift-enterprise-service/src/main/resources/mapper/oa/AttendanceMapper.xml
  24. 0 0
      lift-enterprise-service/src/main/resources/mapper/oa/LiftCertificateHistoryMapper.xml
  25. 0 0
      lift-enterprise-service/src/main/resources/mapper/oa/LiftCertificateMapper.xml
  26. 0 0
      lift-enterprise-service/src/main/resources/mapper/oa/MtCompanyLiftCertificateMapper.xml

+ 12 - 4
lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/controller/EmergencyRepairController.java

@@ -6,8 +6,10 @@ import cn.com.ty.lift.business.emergency.entity.EmergencyRepair;
 import cn.com.ty.lift.business.emergency.service.impl.EmergencyRepairServiceImpl;
 import cn.com.xwy.boot.web.dto.RestResponse;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.AllArgsConstructor;
 import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
@@ -26,6 +28,12 @@ public class EmergencyRepairController {
 
     private EmergencyRepairServiceImpl emergencyRepairService;
 
+    /**
+     * @description 根据id查找
+     * @date 2019/12/6 10:14
+     * @param
+     * @return
+     */
     @PostMapping("findOne")
     public RestResponse<Object> findOne(Long id){
         if(null == id || id == 0){
@@ -36,7 +44,7 @@ public class EmergencyRepairController {
     }
 
     @PostMapping("add")
-    public RestResponse<Object> add(EmergencyRepair entity){
+    public RestResponse<Object> add(@RequestBody EmergencyRepair entity){
 
         if(null == entity){
             return RestResult.errParam();
@@ -49,12 +57,12 @@ public class EmergencyRepairController {
     }
 
     @PostMapping("list")
-    public RestResponse list(Integer pageNum,Integer pageSize,Integer status){
+    public RestResponse list(@RequestBody Page<EmergencyRepair> page, Integer status){
         if(null == status){
             return RestResult.errParam();
         }
-        IPage<EmergencyRepair> page = emergencyRepairService.listByStatus(pageNum,pageSize,status);
-        return RestResult.okData(page);
+        IPage<EmergencyRepair> pagelist = emergencyRepairService.listByStatus(page,status);
+        return RestResult.okData(pagelist);
     }
 
 

+ 44 - 1
lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/dto/RepairCondition.java

@@ -1,12 +1,55 @@
 package cn.com.ty.lift.business.emergency.dto;
 
+import cn.com.xwy.boot.controller.BaseRequestModel;
+import lombok.Data;
+
+import java.util.Date;
+
 /**
  * @author wcz
  * @date 2019/12/5
  * @description
  */
-public class RepairCondition {
+@Data
+public class RepairCondition extends BaseRequestModel{
 
+    /**
+     * 维保公司id
+     */
+    private long mtCompanyId;
+
+    /**
+     * 区域id
+     */
     private long regionId;
 
+    /**
+     * 项目id
+     */
+    private long projectId;
+
+    /**
+     * 电梯id
+     */
+    private long liftId;
+
+    /**
+     * 维保工id
+     */
+    private long maintenanceId;
+
+    /**
+     * 报修开始时间
+     */
+    private Date repairBegin;
+
+    /**
+     * 报修结束时间
+     */
+    private Date repairEnd;
+
+    /**
+     * 急修单状态
+     */
+    private int status;
 }

+ 20 - 0
lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/dto/RepairResult.java

@@ -0,0 +1,20 @@
+package cn.com.ty.lift.business.emergency.dto;
+
+/**
+ * @author wcz
+ * @date 2019/12/6
+ * @description
+ */
+public class RepairResult {
+
+    private Long id;
+    private String regionName;
+    private String projectName;
+    private String liftCode;
+    private String liftPosition;
+    private String worker;
+    private String source;
+    private String callerFaultDescription;
+
+
+}

+ 1 - 1
lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/entity/EmergencyRepair.java

@@ -88,7 +88,7 @@ public class EmergencyRepair implements Serializable {
     private LocalDateTime stopDate;
 
     /**
-     * 停梯时间
+     * 恢复时间
      */
     @TableField("recovery_date")
     private LocalDateTime recoveryDate;

+ 3 - 0
lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/mapper/EmergencyRepairMapper.java

@@ -1,7 +1,9 @@
 package cn.com.ty.lift.business.emergency.mapper;
 
+import cn.com.ty.lift.business.emergency.dto.RepairCondition;
 import cn.com.ty.lift.business.emergency.entity.EmergencyRepair;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 
 /**
  * <p>
@@ -13,4 +15,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  */
 public interface EmergencyRepairMapper extends BaseMapper<EmergencyRepair> {
 
+    IPage<EmergencyRepair> listByCondition(IPage<EmergencyRepair> page, RepairCondition condition);
 }

+ 3 - 1
lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/service/EmergencyRepairService.java

@@ -1,5 +1,6 @@
 package cn.com.ty.lift.business.emergency.service;
 
+import cn.com.ty.lift.business.emergency.dto.RepairCondition;
 import cn.com.ty.lift.business.emergency.entity.EmergencyRepair;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -17,6 +18,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface EmergencyRepairService extends IService<EmergencyRepair> {
 
-    public IPage<EmergencyRepair> listByStatus(Integer pageNum,Integer pageSize,Integer status);
+    IPage<EmergencyRepair> listByStatus(IPage<EmergencyRepair> page,Integer status);
 
+    IPage<EmergencyRepair> listByCondition(IPage<EmergencyRepair> page, RepairCondition condition);
 }

+ 3 - 0
lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/service/ErCostItemService.java

@@ -3,6 +3,8 @@ package cn.com.ty.lift.business.emergency.service;
 import cn.com.ty.lift.business.emergency.entity.ErCostItem;
 import com.baomidou.mybatisplus.extension.service.IService;
 
+import java.util.List;
+
 /**
  * <p>
  *  服务类
@@ -13,4 +15,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface ErCostItemService extends IService<ErCostItem> {
 
+    List<ErCostItem> findByErRecordId(Long erRecordId);
 }

+ 3 - 0
lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/service/ErRecordImgService.java

@@ -3,6 +3,8 @@ package cn.com.ty.lift.business.emergency.service;
 import cn.com.ty.lift.business.emergency.entity.ErRecordImg;
 import com.baomidou.mybatisplus.extension.service.IService;
 
+import java.util.List;
+
 /**
  * <p>
  * 临修图片 服务类
@@ -13,4 +15,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface ErRecordImgService extends IService<ErRecordImg> {
 
+    List<ErRecordImg> findByErRecordId(Long erRecordId);
 }

+ 10 - 2
lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/service/impl/EmergencyRepairServiceImpl.java

@@ -1,5 +1,6 @@
 package cn.com.ty.lift.business.emergency.service.impl;
 
+import cn.com.ty.lift.business.emergency.dto.RepairCondition;
 import cn.com.ty.lift.business.emergency.entity.EmergencyRepair;
 import cn.com.ty.lift.business.emergency.mapper.EmergencyRepairMapper;
 import cn.com.ty.lift.business.emergency.service.EmergencyRepairService;
@@ -10,6 +11,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 
+import java.util.Date;
+
 /**
  * <p>
  * 临修记录 服务实现类
@@ -23,12 +26,17 @@ public class EmergencyRepairServiceImpl extends ServiceImpl<EmergencyRepairMappe
 
 
     @Override
-    public IPage<EmergencyRepair> listByStatus(Integer pageNum, Integer pageSize, Integer status) {
-        IPage<EmergencyRepair> page = new Page<>(pageNum,pageSize);
+    public IPage<EmergencyRepair> listByStatus(IPage<EmergencyRepair> page, Integer status) {
         QueryWrapper<EmergencyRepair> queryWrapper = new QueryWrapper<>();
         LambdaQueryWrapper<EmergencyRepair> lambdaQueryWrapper = queryWrapper.lambda();
         lambdaQueryWrapper.eq(EmergencyRepair::getStatus, status);
         page = page(page,queryWrapper);
         return page;
     }
+
+    @Override
+    public IPage<EmergencyRepair> listByCondition(IPage<EmergencyRepair> page, RepairCondition condition) {
+
+        return null;
+    }
 }

+ 12 - 0
lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/service/impl/ErCostItemServiceImpl.java

@@ -3,9 +3,13 @@ package cn.com.ty.lift.business.emergency.service.impl;
 import cn.com.ty.lift.business.emergency.entity.ErCostItem;
 import cn.com.ty.lift.business.emergency.mapper.ErCostItemMapper;
 import cn.com.ty.lift.business.emergency.service.ErCostItemService;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 /**
  * <p>
  *  服务实现类
@@ -17,4 +21,12 @@ import org.springframework.stereotype.Service;
 @Service
 public class ErCostItemServiceImpl extends ServiceImpl<ErCostItemMapper, ErCostItem> implements ErCostItemService {
 
+
+    public List<ErCostItem> findByErRecordId(Long erRecordId){
+        QueryWrapper<ErCostItem> queryWrapper = new QueryWrapper<>();
+        LambdaQueryWrapper<ErCostItem> lambdaQueryWrapper = queryWrapper.lambda();
+        lambdaQueryWrapper.eq(ErCostItem::getEmergencyRepairId, erRecordId);
+        List<ErCostItem> lists = list(lambdaQueryWrapper);
+        return lists;
+    }
 }

+ 12 - 0
lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/service/impl/ErRecordImgServiceImpl.java

@@ -3,9 +3,13 @@ package cn.com.ty.lift.business.emergency.service.impl;
 import cn.com.ty.lift.business.emergency.entity.ErRecordImg;
 import cn.com.ty.lift.business.emergency.mapper.ErRecordImgMapper;
 import cn.com.ty.lift.business.emergency.service.ErRecordImgService;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 /**
  * <p>
  * 临修图片 服务实现类
@@ -17,4 +21,12 @@ import org.springframework.stereotype.Service;
 @Service
 public class ErRecordImgServiceImpl extends ServiceImpl<ErRecordImgMapper, ErRecordImg> implements ErRecordImgService {
 
+    @Override
+    public List<ErRecordImg> findByErRecordId(Long erRecordId) {
+        QueryWrapper<ErRecordImg> queryWrapper = new QueryWrapper<>();
+        LambdaQueryWrapper<ErRecordImg> lambdaQueryWrapper = queryWrapper.lambda();
+        lambdaQueryWrapper.eq(ErRecordImg::getErRecordId,erRecordId);
+        List<ErRecordImg> lists = list(lambdaQueryWrapper);
+        return lists;
+    }
 }

+ 1 - 1
lift-business-service/src/main/resources/application.yml

@@ -30,4 +30,4 @@ xwy:
     audit:
       enabled: true
 mybatis-plus:
-  mapper-locations: classpath*:/mapper/**Mapper.xml
+  mapper-locations: classpath*:/mapper/**/**Mapper.xml

+ 501 - 0
lift-business-service/src/main/resources/mapper/emergency/EmergencyRepairMapper.xml

@@ -0,0 +1,501 @@
+<?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="cn.com.ty.lift.business.emergency.mapper.EmergencyRepairMapper" >
+	<resultMap id="BaseResultMap" type="EmergencyRepair" >
+		<id column="id" property="id" jdbcType="BIGINT" />
+		<result column="mt_company_id" property="mtCompanyId" jdbcType="BIGINT" />
+		<result column="lift_id" property="liftId" jdbcType="BIGINT" />
+		<result column="is_trapped" property="isTrapped" jdbcType="TINYINT" />
+		<result column="is_critical" property="isCritical" jdbcType="TINYINT" />
+		<result column="source" property="source" jdbcType="TINYINT" />
+		<result column="caller_id" property="callerId" jdbcType="BIGINT" />
+		<result column="caller_tel" property="callerTel" jdbcType="CHAR" />
+		<result column="caller_date" property="callerDate" jdbcType="TIMESTAMP" />
+		<result column="stop_date" property="stopDate" jdbcType="TIMESTAMP" />
+		<result column="recovery_date" property="recoveryDate" jdbcType="TIMESTAMP" />
+		<result column="charge" property="charge" jdbcType="VARCHAR" />
+		<result column="worker_id" property="workerId" jdbcType="BIGINT" />
+		<result column="worker_tel" property="workerTel" jdbcType="CHAR" />
+		<result column="position" property="position" jdbcType="VARCHAR" />
+		<result column="status" property="status" jdbcType="TINYINT" />
+		<result column="creator_id" property="creatorId" jdbcType="BIGINT" />
+		<result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
+		<result column="repair_reason" property="repairReason" jdbcType="TINYINT" />
+		<result column="parts_cost" property="partsCost" jdbcType="DECIMAL" />
+		<result column="safety_confirm" property="safetyConfirm" jdbcType="VARCHAR" />
+		<result column="read_time" property="readTime" jdbcType="TIMESTAMP" />
+		<result column="worker_id1" property="workerId1" jdbcType="BIGINT" />
+		<result column="wl_floor" property="wlFloor" jdbcType="INTEGER" />
+		<result column="wl_liftdoor" property="wlLiftdoor" jdbcType="TINYINT" />
+		<result column="wl_fault" property="wlFault" jdbcType="VARCHAR" />
+		<result column="wl_fault_reason" property="wlFaultReason" jdbcType="VARCHAR" />
+		<result column="wl_fault_handle" property="wlFaultHandle" jdbcType="VARCHAR" />
+		<result column="wl_run_direction" property="wlRunDirection" jdbcType="TINYINT" />
+		<result column="cost_payment_date" property="costPaymentDate" jdbcType="TIMESTAMP" />
+		<result column="cost_total" property="costTotal" jdbcType="DECIMAL" />
+		<result column="project_id" property="projectId" jdbcType="INTEGER" />
+		<result column="caller_fault_description" property="callerFaultDescription" jdbcType="LONGVARCHAR" />
+		<result column="sparepart" property="sparepart" jdbcType="LONGVARCHAR" />
+		<result column="worker_fault_description" property="workerFaultDescription" jdbcType="LONGVARCHAR" />
+		<result column="field_description" property="fieldDescription" jdbcType="LONGVARCHAR" />
+		<result column="procedure" property="procedure" jdbcType="LONGVARCHAR" />
+	</resultMap>
+	
+
+	<sql id="Base_Column_List" >
+		id, mt_company_id, lift_id, is_trapped, is_critical, source, caller_id, caller_tel, 
+		caller_date, stop_date, recovery_date, charge, worker_id, worker_tel, position, status, 
+		creator_id, create_date, repair_reason, parts_cost, safety_confirm, read_time, worker_id1, 
+		wl_floor, wl_liftdoor, wl_fault, wl_fault_reason, wl_fault_handle, wl_run_direction, 
+		cost_payment_date, cost_total, project_id,caller_fault_description, sparepart, worker_fault_description, field_description, 
+		procedure
+	</sql>
+
+	<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
+		select 
+		<include refid="Base_Column_List" />
+		from emergency_repair
+		where id = #{id,jdbcType=BIGINT}
+	</select>
+
+    <select id="listByCondition" resultMap="BaseResultMap" parameterType="cn.com.ty.lift.business.emergency.dto.RepairCondition" >
+        SELECT
+            er.id,
+            er.caller_date,
+            er.caller_tel,
+            er.repair_reason,
+            pr.project_name,
+            re.area_name
+        FROM
+            emergency_repair er
+            LEFT JOIN project pr ON er.project_id = pr.id
+            LEFT JOIN region re ON pr.region_id = re.id
+        WHERE
+            pr.id =
+            AND pr.region_id =
+            AND er.lift_id =
+            AND er.worker_id =
+            AND er.caller_date BETWEEN ? AND ?
+    </select>
+
+	<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+		delete from emergency_repair
+		where id = #{id,jdbcType=BIGINT}
+	</delete>
+
+	<insert id="insert" parameterType="cn.com.ty.lift.business.emergency.entity.EmergencyRepair" >
+		insert into emergency_repair (id, mt_company_id, lift_id, 
+			is_trapped, is_critical, source, 
+			caller_id, caller_tel, caller_date, 
+			stop_date, recovery_date, charge, 
+			worker_id, worker_tel, position, 
+			status, creator_id, create_date, 
+			repair_reason, parts_cost, safety_confirm, 
+			read_time, worker_id1, wl_floor, 
+			wl_liftdoor, wl_fault, wl_fault_reason, 
+			wl_fault_handle, wl_run_direction, cost_payment_date, 
+			cost_total, project_id, caller_fault_description, 
+			sparepart, worker_fault_description, 
+			field_description, procedure)
+		values (#{id,jdbcType=BIGINT}, #{mtCompanyId,jdbcType=BIGINT}, #{liftId,jdbcType=BIGINT}, 
+			#{isTrapped,jdbcType=TINYINT}, #{isCritical,jdbcType=TINYINT}, #{source,jdbcType=TINYINT}, 
+			#{callerId,jdbcType=BIGINT}, #{callerTel,jdbcType=CHAR}, #{callerDate,jdbcType=TIMESTAMP}, 
+			#{stopDate,jdbcType=TIMESTAMP}, #{recoveryDate,jdbcType=TIMESTAMP}, #{charge,jdbcType=VARCHAR}, 
+			#{workerId,jdbcType=BIGINT}, #{workerTel,jdbcType=CHAR}, #{position,jdbcType=VARCHAR}, 
+			#{status,jdbcType=TINYINT}, #{creatorId,jdbcType=BIGINT}, #{createDate,jdbcType=TIMESTAMP}, 
+			#{repairReason,jdbcType=TINYINT}, #{partsCost,jdbcType=DECIMAL}, #{safetyConfirm,jdbcType=VARCHAR}, 
+			#{readTime,jdbcType=TIMESTAMP}, #{workerId1,jdbcType=BIGINT}, #{wlFloor,jdbcType=INTEGER}, 
+			#{wlLiftdoor,jdbcType=TINYINT}, #{wlFault,jdbcType=VARCHAR}, #{wlFaultReason,jdbcType=VARCHAR}, 
+			#{wlFaultHandle,jdbcType=VARCHAR}, #{wlRunDirection,jdbcType=TINYINT}, #{costPaymentDate,jdbcType=TIMESTAMP}, 
+			#{costTotal,jdbcType=DECIMAL}, #{projectId,jdbcType=INTEGER}, #{callerFaultDescription,jdbcType=LONGVARCHAR}, 
+			#{sparepart,jdbcType=LONGVARCHAR}, #{workerFaultDescription,jdbcType=LONGVARCHAR}, 
+			#{fieldDescription,jdbcType=LONGVARCHAR}, #{procedure,jdbcType=LONGVARCHAR})
+	</insert>
+
+	<insert id="insertSelective" parameterType="cn.com.ty.lift.business.emergency.entity.EmergencyRepair" >
+		insert into emergency_repair
+		<trim prefix="(" suffix=")" suffixOverrides="," >
+			<if test="id != null" >
+				id,
+			</if>
+			<if test="mtCompanyId != null" >
+				mt_company_id,
+			</if>
+			<if test="liftId != null" >
+				lift_id,
+			</if>
+			<if test="isTrapped != null" >
+				is_trapped,
+			</if>
+			<if test="isCritical != null" >
+				is_critical,
+			</if>
+			<if test="source != null" >
+				source,
+			</if>
+			<if test="callerId != null" >
+				caller_id,
+			</if>
+			<if test="callerTel != null" >
+				caller_tel,
+			</if>
+			<if test="callerDate != null" >
+				caller_date,
+			</if>
+			<if test="stopDate != null" >
+				stop_date,
+			</if>
+			<if test="recoveryDate != null" >
+				recovery_date,
+			</if>
+			<if test="charge != null" >
+				charge,
+			</if>
+			<if test="workerId != null" >
+				worker_id,
+			</if>
+			<if test="workerTel != null" >
+				worker_tel,
+			</if>
+			<if test="position != null" >
+				position,
+			</if>
+			<if test="status != null" >
+				status,
+			</if>
+			<if test="creatorId != null" >
+				creator_id,
+			</if>
+			<if test="createDate != null" >
+				create_date,
+			</if>
+			<if test="repairReason != null" >
+				repair_reason,
+			</if>
+			<if test="partsCost != null" >
+				parts_cost,
+			</if>
+			<if test="safetyConfirm != null" >
+				safety_confirm,
+			</if>
+			<if test="readTime != null" >
+				read_time,
+			</if>
+			<if test="workerId1 != null" >
+				worker_id1,
+			</if>
+			<if test="wlFloor != null" >
+				wl_floor,
+			</if>
+			<if test="wlLiftdoor != null" >
+				wl_liftdoor,
+			</if>
+			<if test="wlFault != null" >
+				wl_fault,
+			</if>
+			<if test="wlFaultReason != null" >
+				wl_fault_reason,
+			</if>
+			<if test="wlFaultHandle != null" >
+				wl_fault_handle,
+			</if>
+			<if test="wlRunDirection != null" >
+				wl_run_direction,
+			</if>
+			<if test="costPaymentDate != null" >
+				cost_payment_date,
+			</if>
+			<if test="costTotal != null" >
+				cost_total,
+			</if>
+			<if test="projectId != null" >
+				project_id,
+			</if>
+			<if test="callerFaultDescription != null" >
+				caller_fault_description,
+			</if>
+			<if test="sparepart != null" >
+				sparepart,
+			</if>
+			<if test="workerFaultDescription != null" >
+				worker_fault_description,
+			</if>
+			<if test="fieldDescription != null" >
+				field_description,
+			</if>
+			<if test="procedure != null" >
+				procedure,
+			</if>
+		</trim>
+		<trim prefix="values (" suffix=")" suffixOverrides="," >
+			<if test="id != null" >
+				#{id,jdbcType=BIGINT},
+			</if>
+			<if test="mtCompanyId != null" >
+				#{mtCompanyId,jdbcType=BIGINT},
+			</if>
+			<if test="liftId != null" >
+				#{liftId,jdbcType=BIGINT},
+			</if>
+			<if test="isTrapped != null" >
+				#{isTrapped,jdbcType=TINYINT},
+			</if>
+			<if test="isCritical != null" >
+				#{isCritical,jdbcType=TINYINT},
+			</if>
+			<if test="source != null" >
+				#{source,jdbcType=TINYINT},
+			</if>
+			<if test="callerId != null" >
+				#{callerId,jdbcType=BIGINT},
+			</if>
+			<if test="callerTel != null" >
+				#{callerTel,jdbcType=CHAR},
+			</if>
+			<if test="callerDate != null" >
+				#{callerDate,jdbcType=TIMESTAMP},
+			</if>
+			<if test="stopDate != null" >
+				#{stopDate,jdbcType=TIMESTAMP},
+			</if>
+			<if test="recoveryDate != null" >
+				#{recoveryDate,jdbcType=TIMESTAMP},
+			</if>
+			<if test="charge != null" >
+				#{charge,jdbcType=VARCHAR},
+			</if>
+			<if test="workerId != null" >
+				#{workerId,jdbcType=BIGINT},
+			</if>
+			<if test="workerTel != null" >
+				#{workerTel,jdbcType=CHAR},
+			</if>
+			<if test="position != null" >
+				#{position,jdbcType=VARCHAR},
+			</if>
+			<if test="status != null" >
+				#{status,jdbcType=TINYINT},
+			</if>
+			<if test="creatorId != null" >
+				#{creatorId,jdbcType=BIGINT},
+			</if>
+			<if test="createDate != null" >
+				#{createDate,jdbcType=TIMESTAMP},
+			</if>
+			<if test="repairReason != null" >
+				#{repairReason,jdbcType=TINYINT},
+			</if>
+			<if test="partsCost != null" >
+				#{partsCost,jdbcType=DECIMAL},
+			</if>
+			<if test="safetyConfirm != null" >
+				#{safetyConfirm,jdbcType=VARCHAR},
+			</if>
+			<if test="readTime != null" >
+				#{readTime,jdbcType=TIMESTAMP},
+			</if>
+			<if test="workerId1 != null" >
+				#{workerId1,jdbcType=BIGINT},
+			</if>
+			<if test="wlFloor != null" >
+				#{wlFloor,jdbcType=INTEGER},
+			</if>
+			<if test="wlLiftdoor != null" >
+				#{wlLiftdoor,jdbcType=TINYINT},
+			</if>
+			<if test="wlFault != null" >
+				#{wlFault,jdbcType=VARCHAR},
+			</if>
+			<if test="wlFaultReason != null" >
+				#{wlFaultReason,jdbcType=VARCHAR},
+			</if>
+			<if test="wlFaultHandle != null" >
+				#{wlFaultHandle,jdbcType=VARCHAR},
+			</if>
+			<if test="wlRunDirection != null" >
+				#{wlRunDirection,jdbcType=TINYINT},
+			</if>
+			<if test="costPaymentDate != null" >
+				#{costPaymentDate,jdbcType=TIMESTAMP},
+			</if>
+			<if test="costTotal != null" >
+				#{costTotal,jdbcType=DECIMAL},
+			</if>
+			<if test="projectId != null" >
+				#{projectId,jdbcType=INTEGER},
+			</if>
+			<if test="callerFaultDescription != null" >
+				#{callerFaultDescription,jdbcType=LONGVARCHAR},
+			</if>
+			<if test="sparepart != null" >
+				#{sparepart,jdbcType=LONGVARCHAR},
+			</if>
+			<if test="workerFaultDescription != null" >
+				#{workerFaultDescription,jdbcType=LONGVARCHAR},
+			</if>
+			<if test="fieldDescription != null" >
+				#{fieldDescription,jdbcType=LONGVARCHAR},
+			</if>
+			<if test="procedure != null" >
+				#{procedure,jdbcType=LONGVARCHAR},
+			</if>
+		</trim>
+	</insert>
+
+	<update id="updateByPrimaryKeySelective" parameterType="cn.com.ty.lift.business.emergency.entity.EmergencyRepair" >
+		update emergency_repair
+		<set >
+			<if test="mtCompanyId != null" >
+				mt_company_id = #{mtCompanyId,jdbcType=BIGINT},
+			</if>
+			<if test="liftId != null" >
+				lift_id = #{liftId,jdbcType=BIGINT},
+			</if>
+			<if test="isTrapped != null" >
+				is_trapped = #{isTrapped,jdbcType=TINYINT},
+			</if>
+			<if test="isCritical != null" >
+				is_critical = #{isCritical,jdbcType=TINYINT},
+			</if>
+			<if test="source != null" >
+				source = #{source,jdbcType=TINYINT},
+			</if>
+			<if test="callerId != null" >
+				caller_id = #{callerId,jdbcType=BIGINT},
+			</if>
+			<if test="callerTel != null" >
+				caller_tel = #{callerTel,jdbcType=CHAR},
+			</if>
+			<if test="callerDate != null" >
+				caller_date = #{callerDate,jdbcType=TIMESTAMP},
+			</if>
+			<if test="stopDate != null" >
+				stop_date = #{stopDate,jdbcType=TIMESTAMP},
+			</if>
+			<if test="recoveryDate != null" >
+				recovery_date = #{recoveryDate,jdbcType=TIMESTAMP},
+			</if>
+			<if test="charge != null" >
+				charge = #{charge,jdbcType=VARCHAR},
+			</if>
+			<if test="workerId != null" >
+				worker_id = #{workerId,jdbcType=BIGINT},
+			</if>
+			<if test="workerTel != null" >
+				worker_tel = #{workerTel,jdbcType=CHAR},
+			</if>
+			<if test="position != null" >
+				position = #{position,jdbcType=VARCHAR},
+			</if>
+			<if test="status != null" >
+				status = #{status,jdbcType=TINYINT},
+			</if>
+			<if test="creatorId != null" >
+				creator_id = #{creatorId,jdbcType=BIGINT},
+			</if>
+			<if test="createDate != null" >
+				create_date = #{createDate,jdbcType=TIMESTAMP},
+			</if>
+			<if test="repairReason != null" >
+				repair_reason = #{repairReason,jdbcType=TINYINT},
+			</if>
+			<if test="partsCost != null" >
+				parts_cost = #{partsCost,jdbcType=DECIMAL},
+			</if>
+			<if test="safetyConfirm != null" >
+				safety_confirm = #{safetyConfirm,jdbcType=VARCHAR},
+			</if>
+			<if test="readTime != null" >
+				read_time = #{readTime,jdbcType=TIMESTAMP},
+			</if>
+			<if test="workerId1 != null" >
+				worker_id1 = #{workerId1,jdbcType=BIGINT},
+			</if>
+			<if test="wlFloor != null" >
+				wl_floor = #{wlFloor,jdbcType=INTEGER},
+			</if>
+			<if test="wlLiftdoor != null" >
+				wl_liftdoor = #{wlLiftdoor,jdbcType=TINYINT},
+			</if>
+			<if test="wlFault != null" >
+				wl_fault = #{wlFault,jdbcType=VARCHAR},
+			</if>
+			<if test="wlFaultReason != null" >
+				wl_fault_reason = #{wlFaultReason,jdbcType=VARCHAR},
+			</if>
+			<if test="wlFaultHandle != null" >
+				wl_fault_handle = #{wlFaultHandle,jdbcType=VARCHAR},
+			</if>
+			<if test="wlRunDirection != null" >
+				wl_run_direction = #{wlRunDirection,jdbcType=TINYINT},
+			</if>
+			<if test="costPaymentDate != null" >
+				cost_payment_date = #{costPaymentDate,jdbcType=TIMESTAMP},
+			</if>
+			<if test="costTotal != null" >
+				cost_total = #{costTotal,jdbcType=DECIMAL},
+			</if>
+			<if test="projectId != null" >
+				project_id = #{projectId,jdbcType=INTEGER},
+			</if>
+			<if test="callerFaultDescription != null" >
+				caller_fault_description = #{callerFaultDescription,jdbcType=LONGVARCHAR},
+			</if>
+			<if test="sparepart != null" >
+				sparepart = #{sparepart,jdbcType=LONGVARCHAR},
+			</if>
+			<if test="workerFaultDescription != null" >
+				worker_fault_description = #{workerFaultDescription,jdbcType=LONGVARCHAR},
+			</if>
+			<if test="fieldDescription != null" >
+				field_description = #{fieldDescription,jdbcType=LONGVARCHAR},
+			</if>
+			<if test="procedure != null" >
+				procedure = #{procedure,jdbcType=LONGVARCHAR},
+			</if>
+		</set>
+		where id = #{id,jdbcType=BIGINT}
+	</update>
+
+	<update id="updateByPrimaryKey" parameterType="cn.com.ty.lift.business.emergency.entity.EmergencyRepair" >
+		update emergency_repair
+		set mt_company_id = #{mtCompanyId,jdbcType=BIGINT},
+			lift_id = #{liftId,jdbcType=BIGINT},
+			is_trapped = #{isTrapped,jdbcType=TINYINT},
+			is_critical = #{isCritical,jdbcType=TINYINT},
+			source = #{source,jdbcType=TINYINT},
+			caller_id = #{callerId,jdbcType=BIGINT},
+			caller_tel = #{callerTel,jdbcType=CHAR},
+			caller_date = #{callerDate,jdbcType=TIMESTAMP},
+			stop_date = #{stopDate,jdbcType=TIMESTAMP},
+			recovery_date = #{recoveryDate,jdbcType=TIMESTAMP},
+			charge = #{charge,jdbcType=VARCHAR},
+			worker_id = #{workerId,jdbcType=BIGINT},
+			worker_tel = #{workerTel,jdbcType=CHAR},
+			position = #{position,jdbcType=VARCHAR},
+			status = #{status,jdbcType=TINYINT},
+			creator_id = #{creatorId,jdbcType=BIGINT},
+			create_date = #{createDate,jdbcType=TIMESTAMP},
+			repair_reason = #{repairReason,jdbcType=TINYINT},
+			parts_cost = #{partsCost,jdbcType=DECIMAL},
+			safety_confirm = #{safetyConfirm,jdbcType=VARCHAR},
+			read_time = #{readTime,jdbcType=TIMESTAMP},
+			worker_id1 = #{workerId1,jdbcType=BIGINT},
+			wl_floor = #{wlFloor,jdbcType=INTEGER},
+			wl_liftdoor = #{wlLiftdoor,jdbcType=TINYINT},
+			wl_fault = #{wlFault,jdbcType=VARCHAR},
+			wl_fault_reason = #{wlFaultReason,jdbcType=VARCHAR},
+			wl_fault_handle = #{wlFaultHandle,jdbcType=VARCHAR},
+			wl_run_direction = #{wlRunDirection,jdbcType=TINYINT},
+			cost_payment_date = #{costPaymentDate,jdbcType=TIMESTAMP},
+			cost_total = #{costTotal,jdbcType=DECIMAL},
+			project_id = #{projectId,jdbcType=INTEGER},
+			caller_fault_description = #{callerFaultDescription,jdbcType=LONGVARCHAR},
+			sparepart = #{sparepart,jdbcType=LONGVARCHAR},
+			worker_fault_description = #{workerFaultDescription,jdbcType=LONGVARCHAR},
+			field_description = #{fieldDescription,jdbcType=LONGVARCHAR},
+			procedure = #{procedure,jdbcType=LONGVARCHAR}
+		where id = #{id,jdbcType=BIGINT}
+	</update>
+
+</mapper>

lift-business-service/src/main/resources/mapper/ProjectHistoryMapper.xml → lift-business-service/src/main/resources/mapper/project/ProjectHistoryMapper.xml


lift-business-service/src/main/resources/mapper/ProjectMapper.xml → lift-business-service/src/main/resources/mapper/project/ProjectMapper.xml


lift-business-service/src/main/resources/mapper/ProjectUserMapper.xml → lift-business-service/src/main/resources/mapper/project/ProjectUserMapper.xml


+ 20 - 2
lift-enterprise-service/src/main/java/cn/com/ty/lift/enterprise/oa/controller/AnnouncementController.java

@@ -22,10 +22,10 @@ public class AnnouncementController {
     private AnnouncementService announcementService;
 
     /**
+     * @description 根据id查找公告
+     * @date 2019/12/6 9:24
      * @param
      * @return
-     * @description
-     * @date 2019/11/27 10:11
      */
     @PostMapping("findOne")
     public RestResponse<Announcement> findOne(Long id) {
@@ -34,6 +34,12 @@ public class AnnouncementController {
         return RestResult.okData(entity);
     }
 
+    /**
+     * @description 根据条件查找公告
+     * @date 2019/12/6 9:24
+     * @param
+     * @return
+     */
     @PostMapping("list")
     public RestResponse<IPage<Announcement>> list(int pageNum, int pageSize, Long mtCompanyId){
         IPage<Announcement> results = announcementService.selectByCondition(pageNum,pageSize,mtCompanyId);
@@ -43,6 +49,12 @@ public class AnnouncementController {
         return RestResult.okData(results);
     }
 
+    /**
+     * @description 添加公告
+     * @date 2019/12/6 9:25
+     * @param
+     * @return
+     */
     @PostMapping("add")
     public RestResponse<Object> add(Announcement entity){
         if(null == entity){
@@ -53,6 +65,12 @@ public class AnnouncementController {
         return RestResult.okData(result);
     }
 
+    /**
+     * @description 根据id删除公告
+     * @date 2019/12/6 9:25
+     * @param
+     * @return
+     */
     @PostMapping("delete")
     public RestResponse<Boolean> delete(Long id){
         boolean result = announcementService.removeById(id);

+ 8 - 2
lift-enterprise-service/src/main/java/cn/com/ty/lift/enterprise/oa/controller/AttendanceController.java

@@ -26,10 +26,10 @@ public class AttendanceController {
     private AttendanceService attendanceService;
 
     /**
+     * @description 根据id查找
+     * @date 2019/12/6 9:44
      * @param
      * @return
-     * @description
-     * @date 2019/11/27 10:11
      */
     @PostMapping("findOne")
     public RestResponse<Attendance> findOne(Long id) {
@@ -38,6 +38,12 @@ public class AttendanceController {
         return RestResult.okData(entity);
     }
 
+    /**
+     * @description 根据条件查询
+     * @date 2019/12/6 9:44
+     * @param
+     * @return
+     */
     @PostMapping("list")
     public RestResponse<List<Attendance>> list(int pageNum, int pageSize, Long mtCompanyId, String name, Date begin, Date end){
         if(StrUtil.isNotBlank(name)){

+ 8 - 2
lift-enterprise-service/src/main/java/cn/com/ty/lift/enterprise/oa/controller/LiftCertificateController.java

@@ -34,10 +34,10 @@ public class LiftCertificateController {
     private Conf conf;
 
     /**
+     * @description 根据id查找
+     * @date 2019/12/6 9:45
      * @param
      * @return
-     * @description
-     * @date 2019/11/27 10:11
      */
     @PostMapping("findOne")
     public RestResponse<LiftCertificate> findOne(Long id) {
@@ -57,6 +57,12 @@ public class LiftCertificateController {
         return RestResult.okData(entity);
     }
 
+    /**
+     * @description 根据条件查询
+     * @date 2019/12/6 9:45
+     * @param
+     * @return
+     */
     @PostMapping("list")
     public RestResponse<IPage<LiftCertificate>> list(int pageNum, int pageSize, String certificateType, String name, Integer status) {
         if (null == certificateType) {

+ 1 - 1
lift-enterprise-service/src/main/resources/application.yml

@@ -17,4 +17,4 @@ xwy:
     audit:
       enabled: true
 mybatis-plus:
-  mapper-locations: classpath*:/mapper/**Mapper.xml
+  mapper-locations: classpath*:/mapper/**/**Mapper.xml

lift-enterprise-service/src/main/resources/mapper/AnnouncementMapper.xml → lift-enterprise-service/src/main/resources/mapper/oa/AnnouncementMapper.xml


lift-enterprise-service/src/main/resources/mapper/AttendanceImgMapper.xml → lift-enterprise-service/src/main/resources/mapper/oa/AttendanceImgMapper.xml


lift-enterprise-service/src/main/resources/mapper/AttendanceMapper.xml → lift-enterprise-service/src/main/resources/mapper/oa/AttendanceMapper.xml


lift-enterprise-service/src/main/resources/mapper/LiftCertificateHistoryMapper.xml → lift-enterprise-service/src/main/resources/mapper/oa/LiftCertificateHistoryMapper.xml


lift-enterprise-service/src/main/resources/mapper/LiftCertificateMapper.xml → lift-enterprise-service/src/main/resources/mapper/oa/LiftCertificateMapper.xml


lift-enterprise-service/src/main/resources/mapper/MtCompanyLiftCertificateMapper.xml → lift-enterprise-service/src/main/resources/mapper/oa/MtCompanyLiftCertificateMapper.xml