Jelajahi Sumber

Merge branch 'feature-wcz' of lift-manager/lift-server into develop

wucizhong 5 tahun lalu
induk
melakukan
a277b26d79
16 mengubah file dengan 970 tambahan dan 497 penghapusan
  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. 18 0
      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. 68 0
      lift-enterprise-service/src/main/java/cn/com/ty/lift/enterprise/common/ControllerAspect.java
  15. 520 0
      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;
 
     /**
      * 报修开始时间

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

@@ -0,0 +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 新增急修项目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){

+ 68 - 0
lift-enterprise-service/src/main/java/cn/com/ty/lift/enterprise/common/ControllerAspect.java

@@ -0,0 +1,68 @@
+package cn.com.ty.lift.enterprise.common;
+
+import cn.com.xwy.boot.web.dto.RestResponse;
+import cn.hutool.json.JSONUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.*;
+import org.springframework.stereotype.Component;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Arrays;
+
+/**
+ * @author bieao
+ * @date 2019/12/3 10:30 AM
+ * @description 日志切面
+ */
+@Slf4j
+@Aspect
+@Component
+public class ControllerAspect {
+
+    private static final String head = "##########|\t";
+
+    @Pointcut("execution(* cn.com.ty.lift.enterprise.*.controller..*(..))")
+    public void controllerPointCut() {
+    }
+
+    @Before("controllerPointCut()")
+    public void doBefore(JoinPoint joinPoint) throws Throwable {
+        // Receives the request and get request content
+        ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+        HttpServletRequest request = attributes.getRequest();
+
+        log.info(head + "URL : " + request.getRequestURL().toString());
+        log.info(head + "HTTP_METHOD : " + request.getMethod());
+        log.info(head + "IP : " + request.getRemoteAddr());
+        log.info(head + "CLASS_METHOD : " + joinPoint.getSignature().getDeclaringTypeName() + "." + joinPoint.getSignature().getName());
+        log.info(head + "ARGS : " + Arrays.toString(joinPoint.getArgs()));
+
+    }
+
+    @AfterReturning(returning = "response", pointcut = "controllerPointCut()")
+    public void doAfterReturning(RestResponse response) throws Throwable {
+        // Processes the request and returns the content
+        log.info(head + "RESPONSE : " + JSONUtil.parse(response));
+        log.info("====================================================");
+    }
+
+    @AfterThrowing(throwing = "ex", pointcut = "controllerPointCut()")
+    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("()", ""));
+        log.info("====================================================");
+    }
+
+
+    @Around("controllerPointCut()")
+    public Object interceptor(ProceedingJoinPoint proceedingJoinPoint) throws Throwable {
+        log.info("====================================================");
+        return proceedingJoinPoint.proceed();
+    }
+
+}

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

@@ -0,0 +1,520 @@
+package cn.com.ty.lift.enterprise.common;
+
+import java.io.PrintStream;
+import java.io.PrintWriter;
+
+/**
+ * @author bieao
+ * @date 2019/12/3 10:30 AM
+ * @description 业务异常捕获
+ */
+public class EnterpriseBasicException extends RuntimeException {
+
+    /**
+     * 错误码
+     */
+    public Integer result;
+    /**
+     * 错误描述
+     */
+    public String msg;
+    /**
+     * 错误后缀描述
+     */
+    public String suffix;
+
+    public EnterpriseBasicException getExceptionType(Integer status) {
+        return this;
+    }
+
+    public String addSuffix(String msg) {
+        return msg + "(" + setSuffix("") + ")";
+    }
+
+    /**
+     * Constructs a new runtime exception with {@code null} as its
+     * detail message.  The cause is not initialized, and may subsequently be
+     * initialized by a call to {@link #initCause}.
+     */
+    public EnterpriseBasicException() {
+        this.result = 0;
+    }
+
+    /**
+     * Constructs a new runtime exception with the specified cause and a
+     * detail message of <tt>(cause==null ? null : cause.toString())</tt>
+     * (which typically contains the class and detail message of
+     * <tt>cause</tt>).  This constructor is useful for runtime exceptions
+     * that are little more than wrappers for other throwables.
+     *
+     * @param cause the cause (which is saved for later retrieval by the
+     *              {@link #getCause()} method).  (A <tt>null</tt> value is
+     *              permitted, and indicates that the cause is nonexistent or
+     *              unknown.)
+     * @since 1.4
+     */
+    public EnterpriseBasicException(Throwable cause) {
+        super(cause);
+    }
+
+    /**
+     * Constructs a new runtime exception with {@code null} as its
+     * detail message.  The cause is not initialized, and may subsequently be
+     * initialized by a call to {@link #initCause}.
+     */
+    public EnterpriseBasicException(String msg) {
+        this.result = 0;
+        this.msg = msg;
+    }
+
+    /**
+     * Constructs a new runtime exception with {@code null} as its
+     * detail message.  The cause is not initialized, and may subsequently be
+     * initialized by a call to {@link #initCause}.
+     */
+    public EnterpriseBasicException(Integer result, String msg) {
+        this.msg = msg;
+        this.result = result;
+    }
+
+    /**
+     * Constructs a new runtime exception with the specified cause and a
+     * detail message of <tt>(cause==null ? null : cause.toString())</tt>
+     * (which typically contains the class and detail message of
+     * <tt>cause</tt>).  This constructor is useful for runtime exceptions
+     * that are little more than wrappers for other throwables.
+     *
+     * @param cause the cause (which is saved for later retrieval by the
+     *              {@link #getCause()} method).  (A <tt>null</tt> value is
+     *              permitted, and indicates that the cause is nonexistent or
+     *              unknown.)
+     * @since 1.4
+     */
+    public EnterpriseBasicException(Throwable cause, Integer result, String msg) {
+        super(cause);
+        this.msg = msg;
+        this.result = result;
+    }
+
+    /**
+     * Constructs a new runtime exception with the specified detail message.
+     * The cause is not initialized, and may subsequently be initialized by a
+     * call to {@link #initCause}.
+     *
+     * @param message the detail message. The detail message is saved for
+     *                later retrieval by the {@link #getMessage()} method.
+     */
+    public EnterpriseBasicException(String message, Integer result, String msg) {
+        super(message);
+        this.msg = msg;
+        this.result = result;
+    }
+
+    /**
+     * Constructs a new runtime exception with the specified detail message and
+     * cause.  <p>Note that the detail message associated with
+     * {@code cause} is <i>not</i> automatically incorporated in
+     * this runtime exception's detail message.
+     *
+     * @param message the detail message (which is saved for later retrieval
+     *                by the {@link #getMessage()} method).
+     * @param cause   the cause (which is saved for later retrieval by the
+     *                {@link #getCause()} method).  (A <tt>null</tt> value is
+     *                permitted, and indicates that the cause is nonexistent or
+     *                unknown.)
+     * @since 1.4
+     */
+    public EnterpriseBasicException(String message, Throwable cause, Integer result, String msg) {
+        super(message, cause);
+        this.msg = msg;
+        this.result = result;
+    }
+
+    /**
+     * Constructs a new runtime exception with the specified detail
+     * message, cause, suppression enabled or disabled, and writable
+     * stack trace enabled or disabled.
+     *
+     * @param message            the detail message.
+     * @param cause              the cause.  (A {@code null} value is permitted,
+     *                           and indicates that the cause is nonexistent or unknown.)
+     * @param enableSuppression  whether or not suppression is enabled
+     *                           or disabled
+     * @param writableStackTrace whether or not the stack trace should
+     *                           be writable
+     * @since 1.7
+     */
+    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;
+    }
+
+    /**
+     * Fills in the execution stack trace. This method records within this
+     * {@code Throwable} object information about the current state of
+     * the stack frames for the current thread.
+     * <p>
+     * <p>If the stack trace of this {@code Throwable} {@linkplain
+     * Throwable#Throwable(String, Throwable, boolean, boolean) is not
+     * writable}, calling this method has no effect.
+     *
+     * @return a reference to this {@code Throwable} instance.
+     * @see Throwable#printStackTrace()
+     */
+    @Override
+    public synchronized Throwable fillInStackTrace() {
+        return super.fillInStackTrace();
+    }
+
+    /**
+     * Returns the cause of this throwable or {@code null} if the
+     * cause is nonexistent or unknown.  (The cause is the throwable that
+     * caused this throwable to get thrown.)
+     * <p>
+     * <p>This implementation returns the cause that was supplied via one of
+     * the constructors requiring a {@code Throwable}, or that was set after
+     * creation with the {@link #initCause(Throwable)} method.  While it is
+     * typically unnecessary to override this method, a subclass can override
+     * it to return a cause set by some other means.  This is appropriate for
+     * a "legacy chained throwable" that predates the addition of chained
+     * exceptions to {@code Throwable}.  Note that it is <i>not</i>
+     * necessary to override any of the {@code PrintStackTrace} methods,
+     * all of which invoke the {@code getCause} method to determine the
+     * cause of a throwable.
+     *
+     * @return the cause of this throwable or {@code null} if the
+     * cause is nonexistent or unknown.
+     * @since 1.4
+     */
+    @Override
+    public synchronized Throwable getCause() {
+        return super.getCause();
+    }
+
+    /**
+     * Creates a localized description of this throwable.
+     * Subclasses may override this method in order to produce a
+     * locale-specific message.  For subclasses that do not override this
+     * method, the default implementation returns the same result as
+     * {@code getMessage()}.
+     *
+     * @return The localized description of this throwable.
+     * @since JDK1.1
+     */
+    @Override
+    public String getLocalizedMessage() {
+        return super.getLocalizedMessage();
+    }
+
+    /**
+     * Returns the detail message string of this throwable.
+     *
+     * @return the detail message string of this {@code Throwable} instance
+     * (which may be {@code null}).
+     */
+    @Override
+    public String getMessage() {
+        return super.getMessage();
+    }
+
+    /**
+     * Provides programmatic access to the stack trace information printed by
+     * {@link #printStackTrace()}.  Returns an array of stack trace elements,
+     * each representing one stack frame.  The zeroth element of the array
+     * (assuming the array's length is non-zero) represents the top of the
+     * stack, which is the last method invocation in the sequence.  Typically,
+     * this is the point at which this throwable was created and thrown.
+     * The last element of the array (assuming the array's length is non-zero)
+     * represents the bottom of the stack, which is the first method invocation
+     * in the sequence.
+     * <p>
+     * <p>Some virtual machines may, under some circumstances, omit one
+     * or more stack frames from the stack trace.  In the extreme case,
+     * a virtual machine that has no stack trace information concerning
+     * this throwable is permitted to return a zero-length array from this
+     * method.  Generally speaking, the array returned by this method will
+     * contain one element for every frame that would be printed by
+     * {@code printStackTrace}.  Writes to the returned array do not
+     * affect future calls to this method.
+     *
+     * @return an array of stack trace elements representing the stack trace
+     * pertaining to this throwable.
+     * @since 1.4
+     */
+    @Override
+    public StackTraceElement[] getStackTrace() {
+        return super.getStackTrace();
+    }
+
+    /**
+     * Initializes the <i>cause</i> of this throwable to the specified value.
+     * (The cause is the throwable that caused this throwable to get thrown.)
+     * <p>
+     * <p>This method can be called at most once.  It is generally called from
+     * within the constructor, or immediately after creating the
+     * throwable.  If this throwable was created
+     * with {@link #Throwable(Throwable)} or
+     * {@link #Throwable(String, Throwable)}, this method cannot be called
+     * even once.
+     * <p>
+     * <p>An example of using this method on a legacy throwable type
+     * without other support for setting the cause is:
+     * <p>
+     * <pre>
+     * try {
+     *     lowLevelOp();
+     * } catch (LowLevelException le) {
+     *     throw (HighLevelException)
+     *           new HighLevelException().initCause(le); // Legacy constructor
+     * }
+     * </pre>
+     *
+     * @param cause the cause (which is saved for later retrieval by the
+     *              {@link #getCause()} method).  (A {@code null} value is
+     *              permitted, and indicates that the cause is nonexistent or
+     *              unknown.)
+     * @return a reference to this {@code Throwable} instance.
+     * @throws IllegalArgumentException if {@code cause} is this
+     *                                  throwable.  (A throwable cannot be its own cause.)
+     * @throws IllegalStateException    if this throwable was
+     *                                  created with {@link #Throwable(Throwable)} or
+     *                                  {@link #Throwable(String, Throwable)}, or this method has already
+     *                                  been called on this throwable.
+     * @since 1.4
+     */
+    @Override
+    public synchronized Throwable initCause(Throwable cause) {
+        return super.initCause(cause);
+    }
+
+    /**
+     * Prints this throwable and its backtrace to the
+     * standard error stream. This method prints a stack trace for this
+     * {@code Throwable} object on the error output stream that is
+     * the value of the field {@code System.err}. The first line of
+     * output contains the result of the {@link #toString()} method for
+     * this object.  Remaining lines represent data previously recorded by
+     * the method {@link #fillInStackTrace()}. The format of this
+     * information depends on the implementation, but the following
+     * example may be regarded as typical:
+     * <blockquote><pre>
+     * java.lang.NullPointerException
+     *         at MyClass.mash(MyClass.java:9)
+     *         at MyClass.crunch(MyClass.java:6)
+     *         at MyClass.main(MyClass.java:3)
+     * </pre></blockquote>
+     * This example was produced by running the program:
+     * <pre>
+     * class MyClass {
+     *     public static void main(String[] args) {
+     *         crunch(null);
+     *     }
+     *     static void crunch(int[] a) {
+     *         mash(a);
+     *     }
+     *     static void mash(int[] b) {
+     *         System.out.println(b[0]);
+     *     }
+     * }
+     * </pre>
+     * The backtrace for a throwable with an initialized, non-null cause
+     * should generally include the backtrace for the cause.  The format
+     * of this information depends on the implementation, but the following
+     * example may be regarded as typical:
+     * <pre>
+     * HighLevelException: MidLevelException: LowLevelException
+     *         at Junk.a(Junk.java:13)
+     *         at Junk.main(Junk.java:4)
+     * Caused by: MidLevelException: LowLevelException
+     *         at Junk.c(Junk.java:23)
+     *         at Junk.b(Junk.java:17)
+     *         at Junk.a(Junk.java:11)
+     *         ... 1 more
+     * Caused by: LowLevelException
+     *         at Junk.e(Junk.java:30)
+     *         at Junk.d(Junk.java:27)
+     *         at Junk.c(Junk.java:21)
+     *         ... 3 more
+     * </pre>
+     * Note the presence of lines containing the characters {@code "..."}.
+     * These lines indicate that the remainder of the stack trace for this
+     * exception matches the indicated number of frames from the bottom of the
+     * stack trace of the exception that was caused by this exception (the
+     * "enclosing" exception).  This shorthand can greatly reduce the length
+     * of the output in the common case where a wrapped exception is thrown
+     * from same method as the "causative exception" is caught.  The above
+     * example was produced by running the program:
+     * <pre>
+     * public class Junk {
+     *     public static void main(String args[]) {
+     *         try {
+     *             a();
+     *         } catch(HighLevelException e) {
+     *             e.printStackTrace();
+     *         }
+     *     }
+     *     static void a() throws HighLevelException {
+     *         try {
+     *             b();
+     *         } catch(MidLevelException e) {
+     *             throw new HighLevelException(e);
+     *         }
+     *     }
+     *     static void b() throws MidLevelException {
+     *         c();
+     *     }
+     *     static void c() throws MidLevelException {
+     *         try {
+     *             d();
+     *         } catch(LowLevelException e) {
+     *             throw new MidLevelException(e);
+     *         }
+     *     }
+     *     static void d() throws LowLevelException {
+     *        e();
+     *     }
+     *     static void e() throws LowLevelException {
+     *         throw new LowLevelException();
+     *     }
+     * }
+     *
+     * class HighLevelException extends Exception {
+     *     HighLevelException(Throwable cause) { super(cause); }
+     * }
+     *
+     * class MidLevelException extends Exception {
+     *     MidLevelException(Throwable cause)  { super(cause); }
+     * }
+     *
+     * class LowLevelException extends Exception {
+     * }
+     * </pre>
+     * As of release 7, the platform supports the notion of
+     * <i>suppressed exceptions</i> (in conjunction with the {@code
+     * try}-with-resources statement). Any exceptions that were
+     * suppressed in order to deliver an exception are printed out
+     * beneath the stack trace.  The format of this information
+     * depends on the implementation, but the following example may be
+     * regarded as typical:
+     * <p>
+     * <pre>
+     * Exception in thread "main" java.lang.Exception: Something happened
+     *  at Foo.bar(Foo.java:10)
+     *  at Foo.main(Foo.java:5)
+     *  Suppressed: Resource$CloseFailException: Resource ID = 0
+     *          at Resource.close(Resource.java:26)
+     *          at Foo.bar(Foo.java:9)
+     *          ... 1 more
+     * </pre>
+     * Note that the "... n more" notation is used on suppressed exceptions
+     * just at it is used on causes. Unlike causes, suppressed exceptions are
+     * indented beyond their "containing exceptions."
+     * <p>
+     * <p>An exception can have both a cause and one or more suppressed
+     * exceptions:
+     * <pre>
+     * Exception in thread "main" java.lang.Exception: Main block
+     *  at Foo3.main(Foo3.java:7)
+     *  Suppressed: Resource$CloseFailException: Resource ID = 2
+     *          at Resource.close(Resource.java:26)
+     *          at Foo3.main(Foo3.java:5)
+     *  Suppressed: Resource$CloseFailException: Resource ID = 1
+     *          at Resource.close(Resource.java:26)
+     *          at Foo3.main(Foo3.java:5)
+     * Caused by: java.lang.Exception: I did it
+     *  at Foo3.main(Foo3.java:8)
+     * </pre>
+     * Likewise, a suppressed exception can have a cause:
+     * <pre>
+     * Exception in thread "main" java.lang.Exception: Main block
+     *  at Foo4.main(Foo4.java:6)
+     *  Suppressed: Resource2$CloseFailException: Resource ID = 1
+     *          at Resource2.close(Resource2.java:20)
+     *          at Foo4.main(Foo4.java:5)
+     *  Caused by: java.lang.Exception: Rats, you caught me
+     *          at Resource2$CloseFailException.<init>(Resource2.java:45)
+     *          ... 2 more
+     * </pre>
+     */
+    @Override
+    public void printStackTrace() {
+        super.printStackTrace();
+    }
+
+    /**
+     * Prints this throwable and its backtrace to the specified print stream.
+     *
+     * @param s {@code PrintStream} to use for output
+     */
+    @Override
+    public void printStackTrace(PrintStream s) {
+        super.printStackTrace(s);
+    }
+
+    /**
+     * Prints this throwable and its backtrace to the specified
+     * print writer.
+     *
+     * @param s {@code PrintWriter} to use for output
+     * @since JDK1.1
+     */
+    @Override
+    public void printStackTrace(PrintWriter s) {
+        super.printStackTrace(s);
+    }
+
+    /**
+     * Sets the stack trace elements that will be returned by
+     * {@link #getStackTrace()} and printed by {@link #printStackTrace()}
+     * and related methods.
+     * <p>
+     * This method, which is designed for use by RPC frameworks and other
+     * advanced systems, allows the client to override the default
+     * stack trace that is either generated by {@link #fillInStackTrace()}
+     * when a throwable is constructed or deserialized when a throwable is
+     * read from a serialization stream.
+     * <p>
+     * <p>If the stack trace of this {@code Throwable} {@linkplain
+     * Throwable#Throwable(String, Throwable, boolean, boolean) is not
+     * writable}, calling this method has no effect other than
+     * validating its argument.
+     *
+     * @param stackTrace the stack trace elements to be associated with
+     *                   this {@code Throwable}.  The specified array is copied by this
+     *                   call; changes in the specified array after the method invocation
+     *                   returns will have no affect on this {@code Throwable}'s stack
+     *                   trace.
+     * @throws NullPointerException if {@code stackTrace} is
+     *                              {@code null} or if any of the elements of
+     *                              {@code stackTrace} are {@code null}
+     * @since 1.4
+     */
+    @Override
+    public void setStackTrace(StackTraceElement[] stackTrace) {
+        super.setStackTrace(stackTrace);
+    }
+
+    /**
+     * Returns a short description of this throwable.
+     * The result is the concatenation of:
+     * <ul>
+     * <li> the {@linkplain Class#getName() name} of the class of this object
+     * <li> ": " (a colon and a space)
+     * <li> the result of invoking this object's {@link #getLocalizedMessage}
+     * method
+     * </ul>
+     * If {@code getLocalizedMessage} returns {@code null}, then just
+     * the class name is returned.
+     *
+     * @return a string representation of this throwable.
+     */
+    @Override
+    public String toString() {
+        return super.toString();
+    }
+
+    public String setSuffix(String suffix) {
+        return suffix;
+    }
+}

+ 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);
     }