Selaa lähdekoodia

[chg] 急修多条件查询,新增急修收费单

wcz 5 vuotta sitten
vanhempi
commit
649c02e50e
16 muutettua tiedostoa jossa 388 lisäystä ja 513 poistoa
  1. 27 2
      lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/controller/EmergencyRepairController.java
  2. 35 1
      lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/controller/ErCostItemController.java
  3. 2 2
      lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/dto/RepairCondition.java
  4. 10 1
      lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/dto/RepairCost.java
  5. 198 6
      lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/dto/RepairResult.java
  6. 5 5
      lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/entity/EmergencyRepair.java
  7. 17 3
      lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/entity/ErCostItem.java
  8. 2 1
      lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/mapper/EmergencyRepairMapper.java
  9. 1 1
      lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/service/EmergencyRepairService.java
  10. 8 3
      lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/service/impl/EmergencyRepairServiceImpl.java
  11. 1 1
      lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/service/impl/ErCostItemServiceImpl.java
  12. 29 450
      lift-business-service/src/main/resources/mapper/emergency/EmergencyRepairMapper.xml
  13. 39 10
      lift-common/src/main/java/cn.com.ty.lift.common/utils/AliyunOSSUtil.java
  14. 3 4
      lift-enterprise-service/src/main/java/cn/com/ty/lift/enterprise/common/ControllerAspect.java
  15. 11 11
      lift-enterprise-service/src/main/java/cn/com/ty/lift/enterprise/common/EnterpriseBasicException.java
  16. 0 12
      lift-enterprise-service/src/main/java/cn/com/ty/lift/enterprise/oa/controller/LiftCertificateController.java

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

@@ -2,6 +2,7 @@ package cn.com.ty.lift.business.emergency.controller;
 
 
 import cn.com.ty.lift.business.common.RestResult;
+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.service.impl.EmergencyRepairServiceImpl;
 import cn.com.xwy.boot.web.dto.RestResponse;
@@ -35,7 +36,7 @@ public class EmergencyRepairController {
      * @return
      */
     @PostMapping("findOne")
-    public RestResponse<Object> findOne(Long id){
+    public RestResponse findOne(Long id){
         if(null == id || id == 0){
             return RestResult.errParam();
         }
@@ -43,8 +44,14 @@ public class EmergencyRepairController {
         return RestResult.okData(result);
     }
 
+    /**
+     * @description 新增急修单
+     * @date 2019/12/9 9:43
+     * @param
+     * @return
+     */
     @PostMapping("add")
-    public RestResponse<Object> add(@RequestBody EmergencyRepair entity){
+    public RestResponse add(@RequestBody EmergencyRepair entity){
 
         if(null == entity){
             return RestResult.errParam();
@@ -56,6 +63,12 @@ public class EmergencyRepairController {
         return RestResult.errException();
     }
 
+    /**
+     * @description 根据急修单状态分页查询
+     * @date 2019/12/9 9:39
+     * @param 
+     * @return 
+     */
     @PostMapping("list")
     public RestResponse list(@RequestBody Page<EmergencyRepair> page, Integer status){
         if(null == status){
@@ -65,5 +78,17 @@ public class EmergencyRepairController {
         return RestResult.okData(pagelist);
     }
 
+    /**
+     * @description 根据条件分页查询
+     * @date 2019/12/9 9:39
+     * @param 
+     * @return 
+     */
+    @PostMapping("page")
+    public RestResponse page(@RequestBody RepairCondition condition){
+        IPage<EmergencyRepair> pages = emergencyRepairService.listByCondition(condition);
+        
+        return RestResult.okData(pages);
+    }
 
 }

+ 35 - 1
lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/controller/ErCostItemController.java

@@ -1,10 +1,19 @@
 package cn.com.ty.lift.business.emergency.controller;
 
 
+import cn.com.ty.lift.business.common.RestResult;
+import cn.com.ty.lift.business.emergency.dto.RepairCost;
+import cn.com.ty.lift.business.emergency.entity.ErCostItem;
+import cn.com.ty.lift.business.emergency.service.impl.ErCostItemServiceImpl;
+import cn.com.xwy.boot.web.dto.RestResponse;
+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;
 
+import java.util.List;
+
 /**
  * <p>
  *  前端控制器
@@ -13,8 +22,33 @@ import org.springframework.web.bind.annotation.RestController;
  * @author wcz
  * @since 2019-12-04
  */
+@AllArgsConstructor
 @RestController
 @RequestMapping("/emergency/er-cost-item")
 public class ErCostItemController {
 
+    private ErCostItemServiceImpl erCostItemService;
+
+    /**
+     * @description 新增急修收费单项
+     * @date 2019/12/9 17:23
+     * @param
+     * @return
+     */
+    @PostMapping("add")
+    public RestResponse add(@RequestBody RepairCost repairCost){
+        Long erRecordId = repairCost.getErRecordId();
+        List<ErCostItem> items = repairCost.getItems();
+        if(erRecordId == null || null == items || items.size() <= 0){
+            return RestResult.errParam();
+        }
+        for (ErCostItem item: items){
+            item.setErRecordId(erRecordId);
+        }
+        boolean result = erCostItemService.saveBatch(items);
+        if(result){
+            return RestResult.okData(result);
+        }
+        return RestResult.errException();
+    }
 }

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

@@ -8,7 +8,7 @@ import java.util.Date;
 /**
  * @author wcz
  * @date 2019/12/5
- * @description
+ * @description 根据条件分页查询急修单,条件封装model
  */
 @Data
 public class RepairCondition extends BaseRequestModel{
@@ -36,7 +36,7 @@ public class RepairCondition extends BaseRequestModel{
     /**
      * 维保工id
      */
-    private long maintenanceId;
+    private long workerId;
 
     /**
      * 报修开始时间

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

@@ -1,9 +1,18 @@
 package cn.com.ty.lift.business.emergency.dto;
 
+import cn.com.ty.lift.business.emergency.entity.ErCostItem;
+import lombok.Data;
+
+import java.util.List;
+
 /**
  * @author wcz
  * @date 2019/12/9
- * @description
+ * @description 新增急修项目model
  */
+@Data
 public class RepairCost {
+
+    private List<ErCostItem> items;
+    private Long erRecordId;
 }

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

@@ -1,20 +1,212 @@
 package cn.com.ty.lift.business.emergency.dto;
 
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+
 /**
  * @author wcz
  * @date 2019/12/6
  * @description
  */
+@Data
 public class RepairResult {
 
+    private String areaName;
+
     private Long id;
-    private String regionName;
-    private String projectName;
-    private String liftCode;
-    private String liftPosition;
-    private String worker;
-    private String source;
+
+    /**
+     * 公司ID
+     */
+    private Long mtCompanyId;
+
+    /**
+     * 电梯ID
+     */
+    private Long liftId;
+
+    /**
+     * 是否关人
+     */
+    @TableField("is_trapped")
+    private Integer isTrapped;
+
+    /**
+     * 是否紧急(0 否;1 是)
+     */
+    @TableField("is_critical")
+    private Integer isCritical;
+
+    /**
+     * 召修故障描述
+     */
+    @TableField("caller_fault_description")
     private String callerFaultDescription;
 
+    /**
+     * 召修来源(1 物业;2 维保;3 物联)
+     */
+    @TableField("source")
+    private Integer source;
+
+    /**
+     * 召修人ID
+     */
+    @TableField("caller_id")
+    private Long callerId;
+
+    /**
+     * 召修人电话
+     */
+    @TableField("caller_tel")
+    private String callerTel;
+
+    /**
+     * 召修时间
+     */
+    private LocalDateTime callerDate;
+
+    /**
+     * 停梯时间
+     */
+    private LocalDateTime stopDate;
+
+    /**
+     * 恢复时间
+     */
+    private LocalDateTime recoveryDate;
+
+    /**
+     * 更换配件
+     */
+    private String sparepart;
+
+    /**
+     * 工时费
+     */
+    private String charge;
+
+    /**
+     * 维修故障描述
+     */
+    private String workerFaultDescription;
+
+    /**
+     * 现场描述
+     */
+    private String fieldDescription;
+
+    /**
+     * 维修过程
+     */
+    private String repairProcedure;
+
+    /**
+     * 维修人ID
+     */
+    private Long workerId;
+
+    /**
+     * 维修人电话
+     */
+    private String workerTel;
+
+    /**
+     * 签到位置
+     */
+    private String position;
+
+    /**
+     * 状态(0 待完成;1 已签到,待修理;2 已修理;3 待评价;4 完成 5 暂停中)
+     */
+    private Integer status;
+
+    /**
+     * 创建人ID
+     */
+    private Long creatorId;
+
+    /**
+     * 创建时间
+     */
+    private LocalDateTime createDate;
+
+    /**
+     * 急修原因(0 其他;1 停电;2 故障;99 其他)
+     */
+    private Integer repairReason;
+
+    /**
+     * 配件费
+     */
+    private BigDecimal partsCost;
+
+    /**
+     * 安全项
+     */
+    private String safetyConfirm;
+
+    /**
+     * 接单时间
+     */
+    private LocalDateTime readTime;
+
+    /**
+     * 该急修单急修人
+     */
+    private Long workerId1;
+
+    /**
+     * 物联楼层
+     */
+    private Integer wlFloor;
+
+    /**
+     * 物联电梯门
+     */
+    private Integer wlLiftdoor;
+
+    /**
+     * 物联故障名称
+     */
+    @TableField("wl_fault")
+    private String wlFault;
+
+    /**
+     * 物联故障原因
+     */
+    private String wlFaultReason;
+
+    /**
+     * 物联故障处理
+     */
+    @TableField("wl_fault_handle")
+    private String wlFaultHandle;
+
+    /**
+     * 物联运行描述
+     */
+    private Integer wlRunDirection;
+
+    /**
+     * 急修费用预计支付时间
+     */
+    private LocalDateTime costPaymentDate;
+
+    /**
+     * 急修费用总和
+     */
+    private BigDecimal costTotal;
+
+    /**
+     * 项目id
+     */
+    private Integer projectId;
+
+    private String projectName;
 
 }

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

@@ -120,11 +120,11 @@ public class EmergencyRepair implements Serializable {
     /**
      * 维修过程
      */
-    @TableField("procedure")
-    private String procedure;
+    @TableField("repair_procedure")
+    private String repairProcedure;
 
     /**
-     * 维修人ID
+     * 维修人ID(电梯负责人)
      */
     @TableField("worker_id")
     private Long workerId;
@@ -142,7 +142,7 @@ public class EmergencyRepair implements Serializable {
     private String position;
 
     /**
-     * 状态(0 待完成;1 已签到,待修理;2 已修理;3 待评价;4 完成)
+     * 状态(0 待完成;1 已签到,待修理;2 已修理;3 待评价;4 完成 5 暂停中
      */
     @TableField("status")
     private Integer status;
@@ -184,7 +184,7 @@ public class EmergencyRepair implements Serializable {
     private LocalDateTime readTime;
 
     /**
-     * 该急修单急修人
+     * 当前维修的维保工
      */
     @TableField("worker_id1")
     private Long workerId1;

+ 17 - 3
lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/entity/ErCostItem.java

@@ -4,6 +4,8 @@ import java.math.BigDecimal;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableField;
 import java.io.Serializable;
+import java.time.LocalDateTime;
+
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
@@ -29,12 +31,24 @@ public class ErCostItem implements Serializable {
     @TableId("id")
     private Integer id;
 
+    /**
+     * 急修费用单id
+     */
+    @TableField("er_record_id")
+    private Long erRecordId;
+
     /**
      * 费用名称
      */
     @TableField("cost_name")
     private String costName;
 
+    /**
+     * 费用描述
+     */
+    @TableField("cost_desc")
+    private String costDesc;
+
     /**
      * 费用金额
      */
@@ -42,10 +56,10 @@ public class ErCostItem implements Serializable {
     private BigDecimal costMoney;
 
     /**
-     * 急修费用单id
+     * 费用应收日期
      */
-    @TableField("emergency_repair_id")
-    private Integer emergencyRepairId;
+    @TableField("receivable_date")
+    private LocalDateTime receivableDate;
 
 
 }

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

@@ -4,6 +4,7 @@ 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;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * <p>
@@ -15,5 +16,5 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
  */
 public interface EmergencyRepairMapper extends BaseMapper<EmergencyRepair> {
 
-    IPage<EmergencyRepair> listByCondition(IPage<EmergencyRepair> page, RepairCondition condition);
+    IPage<EmergencyRepair> listByCondition(IPage<EmergencyRepair> page, @Param("condition") RepairCondition condition);
 }

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

@@ -20,5 +20,5 @@ public interface EmergencyRepairService extends IService<EmergencyRepair> {
 
     IPage<EmergencyRepair> listByStatus(IPage<EmergencyRepair> page,Integer status);
 
-    IPage<EmergencyRepair> listByCondition(IPage<EmergencyRepair> page, RepairCondition condition);
+    IPage<EmergencyRepair> listByCondition(RepairCondition condition);
 }

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

@@ -9,9 +9,11 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.Date;
+import java.util.List;
 
 /**
  * <p>
@@ -24,6 +26,8 @@ import java.util.Date;
 @Service
 public class EmergencyRepairServiceImpl extends ServiceImpl<EmergencyRepairMapper, EmergencyRepair> implements EmergencyRepairService {
 
+    @Autowired
+    private EmergencyRepairMapper emergencyRepairMapper;
 
     @Override
     public IPage<EmergencyRepair> listByStatus(IPage<EmergencyRepair> page, Integer status) {
@@ -35,8 +39,9 @@ public class EmergencyRepairServiceImpl extends ServiceImpl<EmergencyRepairMappe
     }
 
     @Override
-    public IPage<EmergencyRepair> listByCondition(IPage<EmergencyRepair> page, RepairCondition condition) {
-
-        return null;
+    public IPage<EmergencyRepair> listByCondition(RepairCondition condition) {
+        IPage<EmergencyRepair> page = new Page<>(condition.getPageNum(),condition.getPageSize());
+        IPage<EmergencyRepair> lists = emergencyRepairMapper.listByCondition(page,condition);
+        return lists;
     }
 }

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

@@ -25,7 +25,7 @@ public class ErCostItemServiceImpl extends ServiceImpl<ErCostItemMapper, ErCostI
     public List<ErCostItem> findByErRecordId(Long erRecordId){
         QueryWrapper<ErCostItem> queryWrapper = new QueryWrapper<>();
         LambdaQueryWrapper<ErCostItem> lambdaQueryWrapper = queryWrapper.lambda();
-        lambdaQueryWrapper.eq(ErCostItem::getEmergencyRepairId, erRecordId);
+        lambdaQueryWrapper.eq(ErCostItem::getErRecordId, erRecordId);
         List<ErCostItem> lists = list(lambdaQueryWrapper);
         return lists;
     }

+ 29 - 450
lift-business-service/src/main/resources/mapper/emergency/EmergencyRepairMapper.xml

@@ -1,7 +1,7 @@
 <?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="cn.com.ty.lift.business.emergency.entity.EmergencyRepair" >
+	<resultMap id="ConditionResultMap" type="cn.com.ty.lift.business.emergency.dto.RepairResult" >
 		<id column="id" property="id" jdbcType="BIGINT" />
 		<result column="mt_company_id" property="mtCompanyId" jdbcType="BIGINT" />
 		<result column="lift_id" property="liftId" jdbcType="BIGINT" />
@@ -38,464 +38,43 @@
 		<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" />
+		<result column="repair_procedure" property="repairProcedure" jdbcType="LONGVARCHAR" />
+        <result column="project_name" property="projectName" jdbcType="VARCHAR" />
+        <result column="area_name" property="areaName" jdbcType="VARCHAR" />
 	</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 id="listByCondition" resultMap="ConditionResultMap" parameterType="cn.com.ty.lift.business.emergency.dto.RepairCondition" >
         SELECT
-            er.id,
-            er.caller_date,
-            er.caller_tel,
-            er.repair_reason,
+            er.*,
+            pr.id AS project_id,
             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 ?
+        WHERE 1 = 1
+            <if test="condition.projectId != null and condition.projectId > 0">
+                AND pr.id = #{condition.projectId}
+            </if>
+            <if test="condition.regionId != null and condition.regionId > 0">
+                AND pr.region_id = #{condition.regionId}
+            </if>
+            <if test="condition.liftId != null and condition.liftId > 0">
+                AND er.lift_id = #{condition.liftId}
+            </if>
+            <if test="condition.workerId != null and condition.workerId > 0">
+                AND er.worker_id = #{condition.workerId}
+            </if>
+            <if test="condition.repairBegin != null">
+                AND er.caller_date &gt; #{condition.repairBegin}
+            </if>
+            <if test="condition.repairEnd != null">
+                AND er.caller_date &lt; #{condition.repairEnd}
+            </if>
+            <if test="condition.status != null">
+                AND er.status = #{condition.status}
+            </if>
     </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>

+ 39 - 10
lift-common/src/main/java/cn.com.ty.lift.common/utils/AliyunOSSUtil.java

@@ -1,5 +1,7 @@
 package cn.com.ty.lift.common.utils;
 
+import cn.hutool.json.JSON;
+import cn.hutool.json.JSONUtil;
 import com.aliyun.oss.OSS;
 import com.aliyun.oss.OSSClientBuilder;
 import com.aliyun.oss.model.*;
@@ -28,8 +30,8 @@ public class AliyunOSSUtil {
         AliyunOSSUtil util = AliyunOSSUtil.me();
         util.putFile("temp15827479607","2019/12/03/"+System.currentTimeMillis() + suffix,file);
 
-//        byte[] content = "ceshi".getBytes();
-//        util.putObject(content,"测试存储");
+        byte[] content = "ceshi".getBytes();
+        util.putObject("temp15827479607",content,"测试存储");
     }
 
     public AliyunOSSUtil() {
@@ -69,16 +71,36 @@ public class AliyunOSSUtil {
      * @description 上传文件,上传文件至OSS
      * @date 2019/11/29 10:31
      */
+<<<<<<< Updated upstream
     public PutObjectResult putObject(String bucketName, byte[] content, String objectName) {
+=======
+    public boolean putObject(String bucketName,byte[] content,String objectName) {
+>>>>>>> Stashed changes
         // <yourObjectName>上传文件到OSS时需要指定包含文件后缀在内的完整路径,例如abc/efg/123.jpg。
-
         // 创建OSSClient实例。
         OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
+<<<<<<< Updated upstream
         // 上传内容到指定的存储空间(bucketName)并保存为指定的文件名称(objectName)。
         PutObjectResult result = ossClient.putObject(bucketName, objectName, new ByteArrayInputStream(content));
         // 关闭OSSClient。
         ossClient.shutdown();
         return result;
+=======
+        try {
+            // 上传内容到指定的存储空间(bucketName)并保存为指定的文件名称(objectName)。
+            ossClient.putObject(bucketName, objectName, new ByteArrayInputStream(content));
+            return true;
+        }catch (Exception e){
+            e.printStackTrace();
+            return false;
+        }finally {
+            if(null != ossClient){
+                // 关闭OSSClient。
+                ossClient.shutdown();
+            }
+
+        }
+>>>>>>> Stashed changes
     }
 
     /**
@@ -138,17 +160,24 @@ public class AliyunOSSUtil {
      * @param 
      * @return 
      */
-    public void deleteObject(String bucketName,String objectName){
+    public boolean deleteObject(String bucketName,String objectName){
         // <yourObjectName>表示删除OSS文件时需要指定包含文件后缀在内的完整路径,例如abc/efg/123.jpg。
-
         // 创建OSSClient实例。
         OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
+        try {
+            // 删除文件。
+            ossClient.deleteObject(bucketName, objectName);
+            return true;
+        }catch (Exception e){
+            e.printStackTrace();
+            return false;
+        }finally {
+            // 关闭OSSClient。
+            if(null != ossClient){
+                ossClient.shutdown();
+            }
+        }
 
-        // 删除文件。
-        ossClient.deleteObject(bucketName, objectName);
-
-        // 关闭OSSClient。
-        ossClient.shutdown();
     }
 
     public void putFile(String bucketName,String objectName,File file){

+ 3 - 4
lift-enterprise-service/src/main/java/cn/com/ty/lift/enterprise/common/ControllerAspect.java

@@ -1,6 +1,5 @@
-package cn.com.ty.lift.business.framework.aspect;
+package cn.com.ty.lift.enterprise.common;
 
-import cn.com.ty.lift.business.framework.BusinessBasicException;
 import cn.com.xwy.boot.web.dto.RestResponse;
 import cn.hutool.json.JSONUtil;
 import lombok.extern.slf4j.Slf4j;
@@ -26,7 +25,7 @@ public class ControllerAspect {
 
     private static final String head = "##########|\t";
 
-    @Pointcut("execution(* cn.com.ty.lift.business.*.controller..*(..))")
+    @Pointcut("execution(* cn.com.ty.lift.enterprise.*.controller..*(..))")
     public void controllerPointCut() {
     }
 
@@ -52,7 +51,7 @@ public class ControllerAspect {
     }
 
     @AfterThrowing(throwing = "ex", pointcut = "controllerPointCut()")
-    public void doAfterThrowing(BusinessBasicException ex) throws Throwable {
+    public void doAfterThrowing(EnterpriseBasicException ex) throws Throwable {
         final String msg = ex.getMessage();
         // Processes the request and returns the content
         log.info(head + "RESPONSE : " +  ex.addSuffix(msg).replace("()", ""));

+ 11 - 11
lift-enterprise-service/src/main/java/cn/com/ty/lift/enterprise/common/EnterpriseBasicException.java

@@ -1,4 +1,4 @@
-package cn.com.ty.lift.business.framework;
+package cn.com.ty.lift.enterprise.common;
 
 import java.io.PrintStream;
 import java.io.PrintWriter;
@@ -8,7 +8,7 @@ import java.io.PrintWriter;
  * @date 2019/12/3 10:30 AM
  * @description 业务异常捕获
  */
-public class BusinessBasicException extends RuntimeException {
+public class EnterpriseBasicException extends RuntimeException {
 
     /**
      * 错误码
@@ -23,7 +23,7 @@ public class BusinessBasicException extends RuntimeException {
      */
     public String suffix;
 
-    public BusinessBasicException getExceptionType(Integer status) {
+    public EnterpriseBasicException getExceptionType(Integer status) {
         return this;
     }
 
@@ -36,7 +36,7 @@ public class BusinessBasicException extends RuntimeException {
      * detail message.  The cause is not initialized, and may subsequently be
      * initialized by a call to {@link #initCause}.
      */
-    public BusinessBasicException() {
+    public EnterpriseBasicException() {
         this.result = 0;
     }
 
@@ -53,7 +53,7 @@ public class BusinessBasicException extends RuntimeException {
      *              unknown.)
      * @since 1.4
      */
-    public BusinessBasicException(Throwable cause) {
+    public EnterpriseBasicException(Throwable cause) {
         super(cause);
     }
 
@@ -62,7 +62,7 @@ public class BusinessBasicException extends RuntimeException {
      * detail message.  The cause is not initialized, and may subsequently be
      * initialized by a call to {@link #initCause}.
      */
-    public BusinessBasicException(String msg) {
+    public EnterpriseBasicException(String msg) {
         this.result = 0;
         this.msg = msg;
     }
@@ -72,7 +72,7 @@ public class BusinessBasicException extends RuntimeException {
      * detail message.  The cause is not initialized, and may subsequently be
      * initialized by a call to {@link #initCause}.
      */
-    public BusinessBasicException(Integer result, String msg) {
+    public EnterpriseBasicException(Integer result, String msg) {
         this.msg = msg;
         this.result = result;
     }
@@ -90,7 +90,7 @@ public class BusinessBasicException extends RuntimeException {
      *              unknown.)
      * @since 1.4
      */
-    public BusinessBasicException(Throwable cause, Integer result, String msg) {
+    public EnterpriseBasicException(Throwable cause, Integer result, String msg) {
         super(cause);
         this.msg = msg;
         this.result = result;
@@ -104,7 +104,7 @@ public class BusinessBasicException extends RuntimeException {
      * @param message the detail message. The detail message is saved for
      *                later retrieval by the {@link #getMessage()} method.
      */
-    public BusinessBasicException(String message, Integer result, String msg) {
+    public EnterpriseBasicException(String message, Integer result, String msg) {
         super(message);
         this.msg = msg;
         this.result = result;
@@ -124,7 +124,7 @@ public class BusinessBasicException extends RuntimeException {
      *                unknown.)
      * @since 1.4
      */
-    public BusinessBasicException(String message, Throwable cause, Integer result, String msg) {
+    public EnterpriseBasicException(String message, Throwable cause, Integer result, String msg) {
         super(message, cause);
         this.msg = msg;
         this.result = result;
@@ -144,7 +144,7 @@ public class BusinessBasicException extends RuntimeException {
      *                           be writable
      * @since 1.7
      */
-    public BusinessBasicException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, Integer result, String msg) {
+    public EnterpriseBasicException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, Integer result, String msg) {
         super(message, cause, enableSuppression, writableStackTrace);
         this.msg = msg;
         this.result = result;

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

@@ -41,19 +41,7 @@ public class LiftCertificateController {
      */
     @PostMapping("findOne")
     public RestResponse<LiftCertificate> findOne(Long id) {
-        log.info("id: {}" ,id);
-        long workid = IdWorker.getId();
-        log.info("snowflakeIdWorker: " + workid);
-        aliyunOSSUtil.putObject("temp15827479607","测试oss存储".getBytes(),workid+".txt");
-
-        log.info("conf.bucketName: {}",conf.bucketName);
-        log.info("conf.accessKeyId: {}",conf.accessKeyId);
-        log.info("conf.accessKeySecret: {}",conf.accessKeySecret);
-
-        log.info("IdWorker.getIdStr();: {}",IdWorker.getId());
         LiftCertificate entity = liftCertificateService.getById(id);
-
-
         return RestResult.okData(entity);
     }