parent
1182565b6a
commit
bff0c4a125
|
|
@ -66,7 +66,7 @@ public interface SecurityConstants {
|
||||||
/**
|
/**
|
||||||
* 租户字段
|
* 租户字段
|
||||||
*/
|
*/
|
||||||
String TENANT_ID = "tenant_id";
|
String DEPT_ID = "dept_id";
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -96,4 +96,14 @@ public class SecurityContextHolder
|
||||||
{
|
{
|
||||||
set(SecurityConstants.ROLE_PERMISSION, permissions);
|
set(SecurityConstants.ROLE_PERMISSION, permissions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Long getDeptId()
|
||||||
|
{
|
||||||
|
return Convert.toLong(get(SecurityConstants.DEPT_ID), 0L);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setDeptId(Long deptId)
|
||||||
|
{
|
||||||
|
set(SecurityConstants.DEPT_ID, deptId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
package com.chushang.common.dict.utils;
|
package com.chushang.common.dict.utils;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.convert.Convert;
|
|
||||||
import cn.hutool.core.map.MapUtil;
|
|
||||||
import cn.hutool.extra.spring.SpringUtil;
|
import cn.hutool.extra.spring.SpringUtil;
|
||||||
import com.chushang.common.core.web.Result;
|
import com.chushang.common.core.web.Result;
|
||||||
import com.chushang.common.dict.feign.RemoteDictDataService;
|
import com.chushang.common.dict.feign.RemoteDictDataService;
|
||||||
|
|
@ -13,8 +11,8 @@ import org.redisson.api.RBucket;
|
||||||
import org.redisson.api.RedissonClient;
|
import org.redisson.api.RedissonClient;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
||||||
|
|
@ -75,8 +73,13 @@ public class DictUtils {
|
||||||
if (CollUtil.isEmpty(dictMap)){
|
if (CollUtil.isEmpty(dictMap)){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return dictMap.values().stream().filter(value -> value.equals(label))
|
AtomicReference<String> key = new AtomicReference<>();
|
||||||
.findFirst().orElse(null);
|
dictMap.forEach((k,v)->{
|
||||||
|
if (v.equals(label)){
|
||||||
|
key.set(k);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return key.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,8 @@ public class SecurityUtils
|
||||||
*/
|
*/
|
||||||
public static Long getDeptId()
|
public static Long getDeptId()
|
||||||
{
|
{
|
||||||
return SecurityContextHolder.get(SecurityConstants.LOGIN_USER, LoginUser.class).getSysUser().getDeptId();
|
LoginUser loginUser = SecurityContextHolder.get(SecurityConstants.LOGIN_USER, LoginUser.class);
|
||||||
|
return null == loginUser ? SecurityContextHolder.getDeptId() : loginUser.getSysUser().getDeptId();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
package com.chushang.inspection.work.dto;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DatePattern;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.alibaba.excel.annotation.format.DateTimeFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/6/25 15:07
|
||||||
|
* 导入 时读取出来
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WrkInfoPhoneImportDTO {
|
||||||
|
@ExcelProperty("商户编号")
|
||||||
|
private String storeNo;
|
||||||
|
@ExcelProperty("商户名称")
|
||||||
|
private String storeName;
|
||||||
|
@ExcelProperty("商户联系人")
|
||||||
|
private String storeContact;
|
||||||
|
@ExcelProperty("商户联系电话")
|
||||||
|
private String storePhone;
|
||||||
|
@ExcelProperty("商户地址")
|
||||||
|
private String storeAddress;
|
||||||
|
@ExcelProperty("终端编号")
|
||||||
|
private String terminalNo;
|
||||||
|
@ExcelProperty("终端类型")
|
||||||
|
private String terminalType;
|
||||||
|
@ExcelProperty("建档日期")
|
||||||
|
@DateTimeFormat(DatePattern.CHINESE_DATE_PATTERN)
|
||||||
|
private LocalDateTime createdDate;
|
||||||
|
@ExcelProperty("处理日期")
|
||||||
|
@DateTimeFormat(DatePattern.CHINESE_DATE_PATTERN)
|
||||||
|
private LocalDateTime disposeTime;
|
||||||
|
@ExcelProperty("商户类型")
|
||||||
|
private String storeType;
|
||||||
|
@ExcelProperty("巡检结果")
|
||||||
|
private String wrkResult;
|
||||||
|
/**
|
||||||
|
* 具体说明
|
||||||
|
*/
|
||||||
|
@ExcelProperty("具体说明")
|
||||||
|
private String wrkSpecificResult;
|
||||||
|
/**
|
||||||
|
* 具体详细说明
|
||||||
|
*/
|
||||||
|
@ExcelProperty("具体详细说明")
|
||||||
|
private String wrkDetailResult;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty("巡检人账户")
|
||||||
|
private String userName;
|
||||||
|
/**
|
||||||
|
* 导入完成时, 进行返回所用
|
||||||
|
*/
|
||||||
|
@ExcelProperty("导入结果")
|
||||||
|
private String importResult;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,164 @@
|
||||||
|
package com.chushang.inspection.work.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.chushang.common.mybatis.base.BaseEntity;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/6/26 17:13
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 工单信息
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper=true)
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@TableName(value = "wrk_info")
|
||||||
|
public class WrkInfo extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@TableId(value = "wrk_id", type = IdType.ASSIGN_ID)
|
||||||
|
private Long wrkId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@TableField(value = "dept_id")
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户id
|
||||||
|
*/
|
||||||
|
@TableField(value = "store_id")
|
||||||
|
private Long storeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端id
|
||||||
|
*/
|
||||||
|
@TableField(value = "terminal_id")
|
||||||
|
private Long terminalId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总任务id
|
||||||
|
*/
|
||||||
|
@TableField(value = "task_id")
|
||||||
|
private Long taskId;
|
||||||
|
@TableField(value = "task_name")
|
||||||
|
private String taskName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本级id
|
||||||
|
*/
|
||||||
|
@TableField(value = "lower_task_id")
|
||||||
|
private Long lowerTaskId;
|
||||||
|
@TableField(value = "lower_task_name")
|
||||||
|
private String lowerTaskName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端记录id
|
||||||
|
*/
|
||||||
|
@TableField(value = "terminal_records_id")
|
||||||
|
private Long terminalRecordsId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务员id
|
||||||
|
*/
|
||||||
|
@TableField(value = "user_id")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务员名字
|
||||||
|
*/
|
||||||
|
@TableField(value = "user_name")
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单编号
|
||||||
|
*/
|
||||||
|
@TableField(value = "work_no")
|
||||||
|
private Long workNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单类型
|
||||||
|
*/
|
||||||
|
@TableField(value = "work_type")
|
||||||
|
private Short workType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检方式
|
||||||
|
*/
|
||||||
|
@TableField(value = "work_method")
|
||||||
|
private Short workMethod;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单优先级
|
||||||
|
*/
|
||||||
|
@TableField(value = "work_sort")
|
||||||
|
private Integer workSort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单来源
|
||||||
|
*/
|
||||||
|
@TableField(value = "work_source")
|
||||||
|
private Integer workSource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务员处理时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "dispose_time")
|
||||||
|
private LocalDateTime disposeTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户经理
|
||||||
|
*/
|
||||||
|
@TableField(value = "account_manager")
|
||||||
|
private String accountManager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经理电话
|
||||||
|
*/
|
||||||
|
@TableField(value = "account_phone")
|
||||||
|
private String accountPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端状态
|
||||||
|
*/
|
||||||
|
@TableField(value = "terminal_status")
|
||||||
|
private Integer terminalStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务结果
|
||||||
|
*/
|
||||||
|
@TableField(value = "service_result")
|
||||||
|
private Integer serviceResult;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@TableField(value = "remark")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
@TableField(value = "`state`")
|
||||||
|
private Integer state;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "end_time")
|
||||||
|
private LocalDateTime endTime;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,144 @@
|
||||||
|
package com.chushang.inspection.work.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.chushang.common.mybatis.base.BaseEntity;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/6/26 17:26
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 电话巡检工单信息
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper=true)
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@TableName(value = "wrk_info_phone")
|
||||||
|
public class WrkInfoPhone extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@TableId(value = "wrk_id", type = IdType.ASSIGN_ID)
|
||||||
|
private Long wrkId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单编号
|
||||||
|
*/
|
||||||
|
@TableField(value = "wrk_no")
|
||||||
|
private String wrkNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户id
|
||||||
|
*/
|
||||||
|
@TableField(value = "store_id")
|
||||||
|
private Long storeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户编号
|
||||||
|
*/
|
||||||
|
@TableField(value = "store_no")
|
||||||
|
private String storeNo;
|
||||||
|
|
||||||
|
@TableField(value = "store_name")
|
||||||
|
private String storeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端id
|
||||||
|
*/
|
||||||
|
@TableField(value = "terminal_id")
|
||||||
|
private Long terminalId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端编号
|
||||||
|
*/
|
||||||
|
@TableField(value = "terminal_no")
|
||||||
|
private String terminalNo;
|
||||||
|
/**
|
||||||
|
* 终端类型
|
||||||
|
*/
|
||||||
|
@TableField(value = "terminal_type")
|
||||||
|
private Integer terminalType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务员id
|
||||||
|
*/
|
||||||
|
@TableField(value = "user_id")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务员名字
|
||||||
|
*/
|
||||||
|
@TableField(value = "user_name")
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单来源
|
||||||
|
*/
|
||||||
|
@TableField(value = "work_source")
|
||||||
|
private Integer workSource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检结果
|
||||||
|
*/
|
||||||
|
@TableField(value = "wrk_result")
|
||||||
|
private String wrkResult;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 具体说明
|
||||||
|
*/
|
||||||
|
@TableField(value = "wrk_specific_result")
|
||||||
|
private String wrkSpecificResult;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 具体详细说明
|
||||||
|
*/
|
||||||
|
@TableField(value = "wrk_detail_result")
|
||||||
|
private String wrkDetailResult;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总任务id
|
||||||
|
*/
|
||||||
|
@TableField(value = "task_id")
|
||||||
|
private Long taskId;
|
||||||
|
@TableField(value = "task_name")
|
||||||
|
private String taskName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本级id
|
||||||
|
*/
|
||||||
|
@TableField(value = "lower_task_id")
|
||||||
|
private Long lowerTaskId;
|
||||||
|
@TableField(value = "lower_task_name")
|
||||||
|
private String lowerTaskName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@TableField(value = "dept_id")
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单状态, 默认为已巡检
|
||||||
|
*/
|
||||||
|
@TableField(value = "wrk_status")
|
||||||
|
private Integer wrkStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理时间--在工单上已经巡检时, 取处理司时间, 否则未巡检
|
||||||
|
*/
|
||||||
|
@TableField(value = "dispose_time")
|
||||||
|
private LocalDateTime disposeTime;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,220 @@
|
||||||
|
package com.chushang.inspection.work.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.chushang.common.mybatis.base.BaseEntity;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/6/26 17:13
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 工单商户信息
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper=true)
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@TableName(value = "wrk_info_store_record")
|
||||||
|
public class WrkInfoStoreRecord extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 工单id
|
||||||
|
*/
|
||||||
|
@TableId(value = "wrk_id", type = IdType.INPUT)
|
||||||
|
private Long wrkId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单编号
|
||||||
|
*/
|
||||||
|
@TableField(value = "wrk_no")
|
||||||
|
private Long wrkNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@TableField(value = "dept_id")
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总任务id
|
||||||
|
*/
|
||||||
|
@TableField(value = "task_id")
|
||||||
|
private Long taskId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本级id
|
||||||
|
*/
|
||||||
|
@TableField(value = "lower_task_id")
|
||||||
|
private Long lowerTaskId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务名称
|
||||||
|
*/
|
||||||
|
@TableField(value = "task_name")
|
||||||
|
private String taskName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本级任务名称
|
||||||
|
*/
|
||||||
|
@TableField(value = "lower_task_name")
|
||||||
|
private String lowerTaskName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务结果
|
||||||
|
*/
|
||||||
|
@TableField(value = "service_result")
|
||||||
|
private Integer serviceResult;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@TableField(value = "remark")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "end_time")
|
||||||
|
private LocalDateTime endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户id
|
||||||
|
*/
|
||||||
|
@TableField(value = "store_id")
|
||||||
|
private Long storeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店状态
|
||||||
|
*/
|
||||||
|
@TableField(value = "store_status")
|
||||||
|
private Integer storeStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户编号
|
||||||
|
*/
|
||||||
|
@TableField(value = "store_no")
|
||||||
|
private String storeNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户名称
|
||||||
|
*/
|
||||||
|
@TableField(value = "store_name")
|
||||||
|
private String storeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户联系人
|
||||||
|
*/
|
||||||
|
@TableField(value = "store_contact")
|
||||||
|
private String storeContact;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户联系电话
|
||||||
|
*/
|
||||||
|
@TableField(value = "store_phone")
|
||||||
|
private String storePhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户地址
|
||||||
|
*/
|
||||||
|
@TableField(value = "store_address")
|
||||||
|
private String storeAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户特殊编号
|
||||||
|
*/
|
||||||
|
@TableField(value = "special_num")
|
||||||
|
private String specialNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店名称
|
||||||
|
*/
|
||||||
|
@TableField(value = "shop_name")
|
||||||
|
private String shopName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户类型
|
||||||
|
*/
|
||||||
|
@TableField(value = "store_type")
|
||||||
|
private Integer storeType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 现有其他收单产品
|
||||||
|
*/
|
||||||
|
@TableField(value = "products")
|
||||||
|
private String products;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户提示工具
|
||||||
|
*/
|
||||||
|
@TableField(value = "tip_tool")
|
||||||
|
private String tipTool;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作员编号
|
||||||
|
*/
|
||||||
|
@TableField(value = "admin_id")
|
||||||
|
private String adminId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检频次
|
||||||
|
*/
|
||||||
|
@TableField(value = "ins_fre")
|
||||||
|
private Integer insFre;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注册地址
|
||||||
|
*/
|
||||||
|
@TableField(value = "register_address")
|
||||||
|
private String registerAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 法人/负责人
|
||||||
|
*/
|
||||||
|
@TableField(value = "legal_name")
|
||||||
|
private String legalName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地理位置信息
|
||||||
|
*/
|
||||||
|
@TableField(value = "geographic_location")
|
||||||
|
private String geographicLocation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地理位置信息地址
|
||||||
|
*/
|
||||||
|
@TableField(value = "location_address")
|
||||||
|
private String locationAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本次巡检位置经纬度
|
||||||
|
*/
|
||||||
|
@TableField(value = "work_location")
|
||||||
|
private String workLocation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本次巡检位置信息(根据经纬度)
|
||||||
|
*/
|
||||||
|
@TableField(value = "work_adderss")
|
||||||
|
private String workAdderss;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 偏差(直线距离 米)
|
||||||
|
*/
|
||||||
|
@TableField(value = "deviation")
|
||||||
|
private Long deviation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预制码编码
|
||||||
|
*/
|
||||||
|
@TableField(value = "pre_code_encoding")
|
||||||
|
private String preCodeEncoding;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,154 @@
|
||||||
|
package com.chushang.inspection.work.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.chushang.common.mybatis.base.BaseEntity;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/6/26 17:13
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 工单终端信息
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper=true)
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@TableName(value = "wrk_info_terminal_record")
|
||||||
|
public class WrkInfoTerminalRecord extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 工单id
|
||||||
|
*/
|
||||||
|
@TableId(value = "wrk_id", type = IdType.INPUT)
|
||||||
|
private Long wrkId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@TableField(value = "dept_id")
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单编号
|
||||||
|
*/
|
||||||
|
@TableField(value = "wrk_no")
|
||||||
|
private Long wrkNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总任务id
|
||||||
|
*/
|
||||||
|
@TableField(value = "task_id")
|
||||||
|
private Long taskId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本级id
|
||||||
|
*/
|
||||||
|
@TableField(value = "lower_task_id")
|
||||||
|
private Long lowerTaskId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务名称
|
||||||
|
*/
|
||||||
|
@TableField(value = "task_name")
|
||||||
|
private String taskName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本级任务名称
|
||||||
|
*/
|
||||||
|
@TableField(value = "lower_task_name")
|
||||||
|
private String lowerTaskName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务结果
|
||||||
|
*/
|
||||||
|
@TableField(value = "service_result")
|
||||||
|
private Integer serviceResult;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@TableField(value = "remark")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "end_time")
|
||||||
|
private LocalDateTime endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端id
|
||||||
|
*/
|
||||||
|
@TableField(value = "terminal_id")
|
||||||
|
private Long terminalId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端sn号
|
||||||
|
*/
|
||||||
|
@TableField(value = "terminal_sn")
|
||||||
|
private String terminalSn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端类型
|
||||||
|
*/
|
||||||
|
@TableField(value = "terminal_type")
|
||||||
|
private Integer terminalType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端型号
|
||||||
|
*/
|
||||||
|
@TableField(value = "terminal_model")
|
||||||
|
private String terminalModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端编号
|
||||||
|
*/
|
||||||
|
@TableField(value = "terminal_no")
|
||||||
|
private String terminalNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端来源
|
||||||
|
*/
|
||||||
|
@TableField(value = "terminal_source")
|
||||||
|
private Integer terminalSource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端版地址
|
||||||
|
*/
|
||||||
|
@TableField(value = "terminal_address")
|
||||||
|
private String terminalAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端版本号
|
||||||
|
*/
|
||||||
|
@TableField(value = "terminal_version")
|
||||||
|
private String terminalVersion;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端产权人
|
||||||
|
*/
|
||||||
|
@TableField(value = "terminal_property")
|
||||||
|
private Integer terminalProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否占用
|
||||||
|
*/
|
||||||
|
@TableField(value = "occupy")
|
||||||
|
private Integer occupy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端状态
|
||||||
|
*/
|
||||||
|
@TableField(value = "terminal_status")
|
||||||
|
private Integer terminalStatus;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,82 @@
|
||||||
|
package com.chushang.inspection.work.query;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DatePattern;
|
||||||
|
import com.chushang.common.mybatis.annotation.Condition;
|
||||||
|
import com.chushang.common.mybatis.page.CommonParam;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.*;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import javax.validation.constraints.Null;
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class WrkInfoQuery extends CommonParam {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单编号
|
||||||
|
*/
|
||||||
|
@Condition(name = "work_no")
|
||||||
|
private String workNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务员名称
|
||||||
|
*/
|
||||||
|
@Condition(name = "work_name")
|
||||||
|
@Size(max = 32, message = "业务员名称不能超过32个字符")
|
||||||
|
private String workName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户编号
|
||||||
|
*/
|
||||||
|
@Condition(name = "no")
|
||||||
|
@Size(max = 64, message = "商户编号不能超过64个字符")
|
||||||
|
private String no;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务id
|
||||||
|
*/
|
||||||
|
@Condition(name = "task_id")
|
||||||
|
@NotNull(message = "任务id不能为空")
|
||||||
|
private Long taskId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端编号
|
||||||
|
*/
|
||||||
|
@Condition(name = "terminal_no")
|
||||||
|
@Size(max = 30, message = "终端sn号不能超过30个字符")
|
||||||
|
private String terminalNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户名称
|
||||||
|
*/
|
||||||
|
@Condition(name = "name",type = Condition.ConditionType.like)
|
||||||
|
@Size(max = 128, message = "商户名称不能超过128个字符")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理时间
|
||||||
|
*/
|
||||||
|
@Condition(name = "dispose_time", type = Condition.ConditionType.between)
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DatePattern.NORM_DATETIME_PATTERN)
|
||||||
|
private List<LocalDateTime> disposeTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单状态
|
||||||
|
*/
|
||||||
|
@Condition(name = "state", type = Condition.ConditionType.in)
|
||||||
|
@Null(message = "内部参数,不允许访问")
|
||||||
|
private List<Integer> states;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下级任务id
|
||||||
|
*/
|
||||||
|
@Condition(name = "lower_task_id", type = Condition.ConditionType.in)
|
||||||
|
private List<Long> lowerTaskIds;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,106 @@
|
||||||
|
package com.chushang.inspection.work.vo;
|
||||||
|
|
||||||
|
import com.chushang.common.dict.annotation.DictFormat;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/6/25 11:31
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class WrkInfoPhoneVO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
/**
|
||||||
|
* 工单编号
|
||||||
|
*/
|
||||||
|
private Long wrkNo;
|
||||||
|
/**
|
||||||
|
* 商户id
|
||||||
|
*/
|
||||||
|
private Long storeId;
|
||||||
|
/**
|
||||||
|
* 商户编号
|
||||||
|
*/
|
||||||
|
private Long storeNo;
|
||||||
|
/**
|
||||||
|
* 商户名称
|
||||||
|
* storeId -- store
|
||||||
|
*/
|
||||||
|
private String storeName;
|
||||||
|
/**
|
||||||
|
* 终端id
|
||||||
|
*/
|
||||||
|
private Long terminalId;
|
||||||
|
/**
|
||||||
|
* terminal_no
|
||||||
|
*/
|
||||||
|
private Long terminalNo;
|
||||||
|
/**
|
||||||
|
* 终端类型
|
||||||
|
* selfField = "terminalId",
|
||||||
|
* targetTable = "terminal",
|
||||||
|
*/
|
||||||
|
@DictFormat(dictType = "terminal_type")
|
||||||
|
private Integer terminalType;
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
/**
|
||||||
|
* 用户名称
|
||||||
|
*/
|
||||||
|
private String userName;
|
||||||
|
/**
|
||||||
|
* 工单来源 -- 默认
|
||||||
|
*/
|
||||||
|
private Integer workSource;
|
||||||
|
/**
|
||||||
|
* wrk_result 巡检结果
|
||||||
|
*/
|
||||||
|
private String wrkResult;
|
||||||
|
/**
|
||||||
|
* 具体说明
|
||||||
|
*/
|
||||||
|
private String wrkSpecificResult;
|
||||||
|
/**
|
||||||
|
* 具体详细说明
|
||||||
|
*/
|
||||||
|
private String wrkDetailResult;
|
||||||
|
/**
|
||||||
|
* 总任务id
|
||||||
|
*/
|
||||||
|
private Long taskId;
|
||||||
|
/**
|
||||||
|
* 顶级任务
|
||||||
|
* selfField = "taskId",
|
||||||
|
* targetTable = "polling_task",
|
||||||
|
*/
|
||||||
|
private String taskName;
|
||||||
|
/**
|
||||||
|
* 本级id
|
||||||
|
* selfField = "lowerTaskId",
|
||||||
|
* targetTable = "polling_task",
|
||||||
|
*/
|
||||||
|
private Long lowerTaskId;
|
||||||
|
/**
|
||||||
|
* 下级任务
|
||||||
|
*/
|
||||||
|
private String lowerTaskName;
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
private Long tenantId;
|
||||||
|
/**
|
||||||
|
* 工单状态, 只分为 0和1, 0 未巡检, 1 已巡检
|
||||||
|
*/
|
||||||
|
private Integer wrkStatus;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -25,6 +25,10 @@
|
||||||
<groupId>com.chushang</groupId>
|
<groupId>com.chushang</groupId>
|
||||||
<artifactId>chushang-common-redis</artifactId>
|
<artifactId>chushang-common-redis</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.chushang</groupId>
|
||||||
|
<artifactId>system-feign</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,9 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||||
@SpringBootApplication(scanBasePackages = {"com.chushang.**"})
|
@SpringBootApplication(scanBasePackages = {"com.chushang.**"})
|
||||||
@EnableTransferFeign
|
@EnableTransferFeign
|
||||||
@EnableCustomConfig
|
@EnableCustomConfig
|
||||||
|
//启用服务调用的参数传递,包含链路追踪日志
|
||||||
@EnableTransactionManagement
|
@EnableTransactionManagement
|
||||||
|
@ServletComponentScan
|
||||||
public class InspectionApplication extends SpringBootServletInitializer
|
public class InspectionApplication extends SpringBootServletInitializer
|
||||||
{
|
{
|
||||||
private final static Logger log = LoggerFactory.getLogger(InspectionApplication.class);
|
private final static Logger log = LoggerFactory.getLogger(InspectionApplication.class);
|
||||||
|
|
|
||||||
|
|
@ -2,17 +2,23 @@ package com.chushang.inspection.consumer;
|
||||||
|
|
||||||
import com.chushang.common.core.constant.SecurityConstants;
|
import com.chushang.common.core.constant.SecurityConstants;
|
||||||
import com.chushang.common.core.constant.ServiceConstant;
|
import com.chushang.common.core.constant.ServiceConstant;
|
||||||
|
import com.chushang.common.core.context.SecurityContextHolder;
|
||||||
|
import com.chushang.common.core.util.SpringUtils;
|
||||||
import com.chushang.common.core.web.AjaxResult;
|
import com.chushang.common.core.web.AjaxResult;
|
||||||
import com.chushang.common.core.web.Result;
|
import com.chushang.common.core.web.Result;
|
||||||
|
import com.chushang.security.utils.SecurityUtils;
|
||||||
import com.chushang.task.entity.TaskInfo;
|
import com.chushang.task.entity.TaskInfo;
|
||||||
import com.chushang.task.entity.dto.UpdateTaskDTO;
|
import com.chushang.task.entity.dto.UpdateTaskDTO;
|
||||||
import com.chushang.task.enums.TaskStatusEnum;
|
import com.chushang.task.enums.TaskStatusEnum;
|
||||||
import com.chushang.task.enums.TaskTypeEnum;
|
import com.chushang.task.enums.TaskTypeEnum;
|
||||||
import com.chushang.task.feign.RemoteTaskService;
|
import com.chushang.task.feign.RemoteTaskService;
|
||||||
|
import lombok.SneakyThrows;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
|
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
|
||||||
import org.apache.rocketmq.spring.core.RocketMQListener;
|
import org.apache.rocketmq.spring.core.RocketMQListener;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.web.context.ContextLoader;
|
||||||
|
import org.springframework.web.context.WebApplicationContext;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.lang.reflect.Constructor;
|
import java.lang.reflect.Constructor;
|
||||||
|
|
@ -26,7 +32,7 @@ import java.util.Objects;
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
@RocketMQMessageListener(topic = ServiceConstant.INSPECTION, consumerGroup = ServiceConstant.INSPECTION_CONSUMER_GROUP)
|
@RocketMQMessageListener(topic = ServiceConstant.INSPECTION + 1, consumerGroup = ServiceConstant.INSPECTION_CONSUMER_GROUP)
|
||||||
public class InspectionConsumerService implements RocketMQListener<TaskInfo> {
|
public class InspectionConsumerService implements RocketMQListener<TaskInfo> {
|
||||||
@Resource
|
@Resource
|
||||||
RemoteTaskService remoteTaskService;
|
RemoteTaskService remoteTaskService;
|
||||||
|
|
@ -43,14 +49,14 @@ public class InspectionConsumerService implements RocketMQListener<TaskInfo> {
|
||||||
String methodName = message.getMethodName();
|
String methodName = message.getMethodName();
|
||||||
String params = message.getParams();
|
String params = message.getParams();
|
||||||
Integer taskType = message.getTaskType();
|
Integer taskType = message.getTaskType();
|
||||||
|
SecurityContextHolder.setDeptId(message.getDeptId());
|
||||||
UpdateTaskDTO updateTask = new UpdateTaskDTO();
|
UpdateTaskDTO updateTask = new UpdateTaskDTO();
|
||||||
try {
|
try {
|
||||||
// 包名+类名
|
// 包名+类名
|
||||||
Class classzz = Class.forName(className);
|
Class classzz = Class.forName(className);
|
||||||
// 获取构造器对象
|
// 获取构造器对象
|
||||||
Constructor constructor = classzz.getConstructor();
|
// 利用spring 获取对象
|
||||||
// 利用构造器对象创建一个对象
|
Object o = SpringUtils.getBean(classzz);
|
||||||
Object o = constructor.newInstance();
|
|
||||||
// 传递需要执行的方法
|
// 传递需要执行的方法
|
||||||
Method method = classzz.getMethod(methodName, String.class);
|
Method method = classzz.getMethod(methodName, String.class);
|
||||||
// 调用的方法有多个参数 Method method = classzz.getMethod("class1method",long.class,String.class,String.class);
|
// 调用的方法有多个参数 Method method = classzz.getMethod("class1method",long.class,String.class,String.class);
|
||||||
|
|
@ -62,7 +68,8 @@ public class InspectionConsumerService implements RocketMQListener<TaskInfo> {
|
||||||
if (result.isSuccess() && 200 == code){
|
if (result.isSuccess() && 200 == code){
|
||||||
updateTask.setTaskStatus(TaskStatusEnum.EXECUTE_SUCCESS);
|
updateTask.setTaskStatus(TaskStatusEnum.EXECUTE_SUCCESS);
|
||||||
String data = (String)result.get(AjaxResult.DATA_TAG);
|
String data = (String)result.get(AjaxResult.DATA_TAG);
|
||||||
updateTask.setLastRunResult("success");
|
String msg = (String) result.get(AjaxResult.MSG_TAG);
|
||||||
|
updateTask.setLastRunResult(msg);
|
||||||
if (Objects.equals(taskType, TaskTypeEnum.DOWN.getCode())){
|
if (Objects.equals(taskType, TaskTypeEnum.DOWN.getCode())){
|
||||||
updateTask.setRemark(data);
|
updateTask.setRemark(data);
|
||||||
}
|
}
|
||||||
|
|
@ -75,7 +82,8 @@ public class InspectionConsumerService implements RocketMQListener<TaskInfo> {
|
||||||
if (result.isSuccess() && result.getCode() == 200){
|
if (result.isSuccess() && result.getCode() == 200){
|
||||||
updateTask.setTaskStatus(TaskStatusEnum.EXECUTE_SUCCESS);
|
updateTask.setTaskStatus(TaskStatusEnum.EXECUTE_SUCCESS);
|
||||||
String data = (String)result.getData();
|
String data = (String)result.getData();
|
||||||
updateTask.setLastRunResult("success");
|
String msg = result.getMsg();
|
||||||
|
updateTask.setLastRunResult(msg);
|
||||||
if (Objects.equals(taskType, TaskTypeEnum.DOWN.getCode())){
|
if (Objects.equals(taskType, TaskTypeEnum.DOWN.getCode())){
|
||||||
updateTask.setRemark(data);
|
updateTask.setRemark(data);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.chushang.inspection.work.controller;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单信息(wrk_info)表控制层
|
||||||
|
*
|
||||||
|
* @author xxxxx
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/wrk_info")
|
||||||
|
public class WrkInfoController {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,100 @@
|
||||||
|
package com.chushang.inspection.work.controller;
|
||||||
|
import com.chushang.common.core.web.AjaxResult;
|
||||||
|
import com.chushang.common.log.annotation.SysLog;
|
||||||
|
import com.chushang.common.log.enums.BusinessType;
|
||||||
|
import com.chushang.inspection.work.dto.WrkInfoPhoneImportDTO;
|
||||||
|
import com.chushang.inspection.work.query.WrkInfoQuery;
|
||||||
|
import com.chushang.inspection.work.service.WrkInfoPhoneService;
|
||||||
|
import com.chushang.security.annotation.RequiresPermissions;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电话巡检工单信息(wrk_info_phone)表控制层
|
||||||
|
*
|
||||||
|
* @author xxxxx
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/wrk/info/phone")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class WrkInfoPhoneController {
|
||||||
|
|
||||||
|
private final WrkInfoPhoneService infoPhoneService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询工单
|
||||||
|
*/
|
||||||
|
@SysLog(value = "电话工单", businessType = BusinessType.QUERY)
|
||||||
|
@PostMapping("/dispatch/page")
|
||||||
|
@RequiresPermissions("wrk:phone:page")
|
||||||
|
public AjaxResult pageList(@RequestBody @Validated WrkInfoQuery query) {
|
||||||
|
return AjaxResult.success(infoPhoneService.pageList(query));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入电话工单, 读取之后返回数据
|
||||||
|
*/
|
||||||
|
@SysLog(value = "电话工单read", businessType = BusinessType.IMPORT)
|
||||||
|
@PostMapping(value = "/import/read")
|
||||||
|
@RequiresPermissions("wrk:phone:import")
|
||||||
|
public AjaxResult importRead(@RequestParam("file") MultipartFile file){
|
||||||
|
return AjaxResult.success(infoPhoneService.importRead(file));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入电话工单, 读取之后返回数据
|
||||||
|
*/
|
||||||
|
@SysLog(value = "电话工单save",businessType = BusinessType.IMPORT)
|
||||||
|
@PostMapping(value = "/import/save")
|
||||||
|
@RequiresPermissions("wrk:phone:import")
|
||||||
|
public AjaxResult importSave(@RequestBody List<WrkInfoPhoneImportDTO> importReadList,
|
||||||
|
@RequestParam("taskId") Long taskId,
|
||||||
|
@RequestParam("lowerTaskId") Long lowerTaskId)
|
||||||
|
{
|
||||||
|
return infoPhoneService.importSave(importReadList, taskId, lowerTaskId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单条录入
|
||||||
|
*/
|
||||||
|
@SysLog(value = "电话工单", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping(value = "/save")
|
||||||
|
@RequiresPermissions("wrk:phone:save")
|
||||||
|
public AjaxResult saveInfo(@RequestBody WrkInfoPhoneImportDTO info,
|
||||||
|
@RequestParam("taskId") Long taskId,
|
||||||
|
@RequestParam("lowerTaskId") Long lowerTaskId)
|
||||||
|
{
|
||||||
|
return AjaxResult.success(infoPhoneService.saveInfo(info,taskId, lowerTaskId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* todo
|
||||||
|
* 单条修改
|
||||||
|
*/
|
||||||
|
@SysLog(value = "电话工单", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping(value = "/update/{wrkId}")
|
||||||
|
@RequiresPermissions("wrk:phone:save")
|
||||||
|
public AjaxResult delInfo(@RequestBody WrkInfoPhoneImportDTO info,
|
||||||
|
@PathVariable Long wrkId)
|
||||||
|
{
|
||||||
|
return AjaxResult.success(infoPhoneService.updateInfo(info, wrkId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* todo
|
||||||
|
* 单条删除
|
||||||
|
*/
|
||||||
|
@SysLog(value = "电话工单", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping(value = "/del/{wrkId}")
|
||||||
|
@RequiresPermissions("wrk:phone:save")
|
||||||
|
public AjaxResult delInfo(@PathVariable Long wrkId)
|
||||||
|
{
|
||||||
|
return AjaxResult.success(infoPhoneService.removeById(wrkId));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.chushang.inspection.work.controller;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单商户信息(wrk_info_store_record)表控制层
|
||||||
|
*
|
||||||
|
* @author xxxxx
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/wrk_info_store_record")
|
||||||
|
public class WrkInfoStoreRecordController {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.chushang.inspection.work.controller;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单终端信息(wrk_info_terminal_record)表控制层
|
||||||
|
*
|
||||||
|
* @author xxxxx
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/wrk_info_terminal_record")
|
||||||
|
public class WrkInfoTerminalRecordController {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
package com.chushang.inspection.work.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.chushang.inspection.work.po.WrkInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/6/26 17:13
|
||||||
|
*/
|
||||||
|
public interface WrkInfoMapper extends BaseMapper<WrkInfo> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
package com.chushang.inspection.work.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.chushang.inspection.work.po.WrkInfoPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/6/26 17:26
|
||||||
|
*/
|
||||||
|
public interface WrkInfoPhoneMapper extends BaseMapper<WrkInfoPhone> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
package com.chushang.inspection.work.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.chushang.inspection.work.po.WrkInfoStoreRecord;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/6/26 17:13
|
||||||
|
*/
|
||||||
|
public interface WrkInfoStoreRecordMapper extends BaseMapper<WrkInfoStoreRecord> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
package com.chushang.inspection.work.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.chushang.inspection.work.po.WrkInfoTerminalRecord;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/6/26 17:13
|
||||||
|
*/
|
||||||
|
public interface WrkInfoTerminalRecordMapper extends BaseMapper<WrkInfoTerminalRecord> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.chushang.inspection.work.service;
|
||||||
|
|
||||||
|
import com.chushang.common.core.web.AjaxResult;
|
||||||
|
import com.chushang.common.core.web.Result;
|
||||||
|
import com.chushang.common.mybatis.utils.PageResult;
|
||||||
|
import com.chushang.inspection.work.dto.WrkInfoPhoneImportDTO;
|
||||||
|
import com.chushang.inspection.work.po.WrkInfoPhone;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.chushang.inspection.work.query.WrkInfoQuery;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/6/26 17:26
|
||||||
|
*/
|
||||||
|
public interface WrkInfoPhoneService extends IService<WrkInfoPhone> {
|
||||||
|
|
||||||
|
|
||||||
|
PageResult pageList(WrkInfoQuery query);
|
||||||
|
|
||||||
|
List<WrkInfoPhoneImportDTO> importRead(MultipartFile file);
|
||||||
|
|
||||||
|
AjaxResult importSave(List<WrkInfoPhoneImportDTO> importReadList, Long taskId, Long lowerTaskId);
|
||||||
|
|
||||||
|
Long saveInfo(WrkInfoPhoneImportDTO info, Long taskId, Long lowerTaskId);
|
||||||
|
|
||||||
|
Long updateInfo(WrkInfoPhoneImportDTO info, Long wrkId);
|
||||||
|
|
||||||
|
Result<String> savePhoneInfo(String params);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.chushang.inspection.work.service;
|
||||||
|
|
||||||
|
import com.chushang.inspection.work.po.WrkInfo;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/6/26 17:13
|
||||||
|
*/
|
||||||
|
public interface WrkInfoService extends IService<WrkInfo>{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.chushang.inspection.work.service;
|
||||||
|
|
||||||
|
import com.chushang.inspection.work.po.WrkInfoStoreRecord;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/6/26 17:13
|
||||||
|
*/
|
||||||
|
public interface WrkInfoStoreRecordService extends IService<WrkInfoStoreRecord>{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.chushang.inspection.work.service;
|
||||||
|
|
||||||
|
import com.chushang.inspection.work.po.WrkInfoTerminalRecord;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/6/26 17:13
|
||||||
|
*/
|
||||||
|
public interface WrkInfoTerminalRecordService extends IService<WrkInfoTerminalRecord>{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,257 @@
|
||||||
|
package com.chushang.inspection.work.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.alibaba.fastjson2.JSON;
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.chushang.common.core.constant.SecurityConstants;
|
||||||
|
import com.chushang.common.core.context.SecurityContextHolder;
|
||||||
|
import com.chushang.common.core.exception.ResultException;
|
||||||
|
import com.chushang.common.core.text.Convert;
|
||||||
|
import com.chushang.common.core.util.StringUtils;
|
||||||
|
import com.chushang.common.core.web.AjaxResult;
|
||||||
|
import com.chushang.common.core.web.Result;
|
||||||
|
import com.chushang.common.dict.utils.DictUtils;
|
||||||
|
import com.chushang.common.excel.utils.ExcelUtils;
|
||||||
|
import com.chushang.common.mybatis.page.CommonParam;
|
||||||
|
import com.chushang.common.mybatis.utils.PageResult;
|
||||||
|
import com.chushang.common.mybatis.utils.WrapperUtils;
|
||||||
|
import com.chushang.inspection.project.po.PollingTask;
|
||||||
|
import com.chushang.inspection.project.service.PollingTaskService;
|
||||||
|
import com.chushang.inspection.terminal.po.Store;
|
||||||
|
import com.chushang.inspection.terminal.po.Terminal;
|
||||||
|
import com.chushang.inspection.terminal.service.StoreService;
|
||||||
|
import com.chushang.inspection.terminal.service.TerminalService;
|
||||||
|
import com.chushang.inspection.work.dto.WrkInfoPhoneImportDTO;
|
||||||
|
import com.chushang.inspection.work.query.WrkInfoQuery;
|
||||||
|
import com.chushang.inspection.work.service.WrkInfoPhoneService;
|
||||||
|
import com.chushang.oss.entity.vo.FileSourceVo;
|
||||||
|
import com.chushang.oss.feign.RemoteOssService;
|
||||||
|
import com.chushang.security.utils.SecurityUtils;
|
||||||
|
import com.chushang.system.feign.RemoteUserService;
|
||||||
|
import com.chushang.task.entity.dto.CreateTaskDTO;
|
||||||
|
import com.chushang.task.enums.ServiceEnum;
|
||||||
|
import com.chushang.task.enums.TaskTypeEnum;
|
||||||
|
import com.chushang.task.feign.RemoteTaskService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.chushang.inspection.work.mapper.WrkInfoPhoneMapper;
|
||||||
|
import com.chushang.inspection.work.po.WrkInfoPhone;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.io.ByteArrayOutputStream;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/6/26 17:26
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class WrkInfoPhoneServiceImpl extends ServiceImpl<WrkInfoPhoneMapper, WrkInfoPhone> implements WrkInfoPhoneService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
RemoteTaskService remoteTaskService;
|
||||||
|
@Resource
|
||||||
|
StoreService storeService;
|
||||||
|
@Resource
|
||||||
|
PollingTaskService pollingTaskService;
|
||||||
|
@Resource
|
||||||
|
TerminalService terminalService;
|
||||||
|
@Resource
|
||||||
|
RemoteUserService remoteUserService;
|
||||||
|
@Resource
|
||||||
|
RemoteOssService remoteOssService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult pageList(WrkInfoQuery query) {
|
||||||
|
CommonParam commonParam = CommonParam.buildPageRequest();
|
||||||
|
LambdaQueryWrapper<WrkInfoPhone> infoPhoneSql = WrapperUtils.builder(query, commonParam);
|
||||||
|
IPage<WrkInfoPhone> page = this.page(
|
||||||
|
new com.baomidou.mybatisplus.extension.plugins.pagination.Page<>(commonParam.getPage(), commonParam.getLimit()),
|
||||||
|
infoPhoneSql
|
||||||
|
);
|
||||||
|
return new PageResult(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入读
|
||||||
|
* @param file
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<WrkInfoPhoneImportDTO> importRead(MultipartFile file) {
|
||||||
|
return ExcelUtils.read(file, WrkInfoPhoneImportDTO.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入 存
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AjaxResult importSave(List<WrkInfoPhoneImportDTO> importReadList, Long taskId, Long lowerTaskId) {
|
||||||
|
|
||||||
|
Map<String, Object> bodyMap = new HashMap<>();
|
||||||
|
bodyMap.put("taskId", taskId);
|
||||||
|
bodyMap.put("lowerTaskId", lowerTaskId);
|
||||||
|
bodyMap.put("importReadList", importReadList);
|
||||||
|
CreateTaskDTO task = CreateTaskDTO.builder()
|
||||||
|
.params(JSON.toJSONString(bodyMap))
|
||||||
|
.taskName("电话工单导入")
|
||||||
|
.applicationName(ServiceEnum.INSPECTION)
|
||||||
|
.methodName("savePhoneInfo")
|
||||||
|
.className(this.getClass().getName())
|
||||||
|
.deptId(SecurityUtils.getDeptId())
|
||||||
|
.taskType(TaskTypeEnum.DOWN)
|
||||||
|
.remark("电话工单导入")
|
||||||
|
.createBy(SecurityUtils.getUsername())
|
||||||
|
.build();
|
||||||
|
remoteTaskService.createTask(task, SecurityConstants.INNER);
|
||||||
|
return AjaxResult.success("导入成功, 请在后台任务中查看导入结果");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单条录入
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Long saveInfo(WrkInfoPhoneImportDTO info, Long taskId, Long lowerTaskId) {
|
||||||
|
return 1L;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long updateInfo(WrkInfoPhoneImportDTO info, Long wrkId) {
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入成功
|
||||||
|
*/
|
||||||
|
@Transactional
|
||||||
|
public Result<String> savePhoneInfo(String params){
|
||||||
|
if (StringUtils.isEmpty(params)){
|
||||||
|
return Result.failed("获取信息为空");
|
||||||
|
}
|
||||||
|
JSONObject jsonObject = JSON.parseObject(params);
|
||||||
|
Long taskId = jsonObject.getLong("taskId");
|
||||||
|
Long lowerTaskId = jsonObject.getLong("lowerTaskId");
|
||||||
|
List<WrkInfoPhoneImportDTO> importReadList = jsonObject.getList("importReadList", WrkInfoPhoneImportDTO.class);
|
||||||
|
|
||||||
|
List<WrkInfoPhoneImportDTO> errList = new ArrayList<>();
|
||||||
|
List<WrkInfoPhone> successList = new ArrayList<>();
|
||||||
|
if (CollectionUtil.isNotEmpty(importReadList)) {
|
||||||
|
Set<String> userNames = importReadList.stream().map(WrkInfoPhoneImportDTO::getUserName)
|
||||||
|
.filter(StringUtils::isNotEmpty)
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
// 获取 用户名 + id
|
||||||
|
Result<Map<String, Long>> result = remoteUserService.getIdByUsernames(userNames, SecurityConstants.INNER);
|
||||||
|
if (!result.isSuccess() || CollectionUtil.isEmpty(result.getData())){
|
||||||
|
return Result.failed("没有获取到业务员信息");
|
||||||
|
}
|
||||||
|
Map<String, Long> idByUsernames = result.getData();
|
||||||
|
PollingTask pollingTask = pollingTaskService.getById(taskId);
|
||||||
|
PollingTask lowerTask = pollingTaskService.getById(lowerTaskId);
|
||||||
|
if (ObjectUtil.isEmpty(pollingTask) || ObjectUtil.isEmpty(lowerTask)){
|
||||||
|
return Result.failed("没有获取到巡检任务信息");
|
||||||
|
}
|
||||||
|
for (WrkInfoPhoneImportDTO wrkInfoPhoneImportDTO : importReadList) {
|
||||||
|
WrkInfoPhone wrkInfoPhone = convert(wrkInfoPhoneImportDTO, idByUsernames);
|
||||||
|
wrkInfoPhone.setTaskId(taskId);
|
||||||
|
wrkInfoPhone.setTaskName(pollingTask.getName());
|
||||||
|
wrkInfoPhone.setLowerTaskId(lowerTaskId);
|
||||||
|
wrkInfoPhone.setLowerTaskName(lowerTask.getName());
|
||||||
|
String terminalNo = wrkInfoPhoneImportDTO.getTerminalNo();
|
||||||
|
String storeNo = wrkInfoPhoneImportDTO.getStoreNo();
|
||||||
|
String storeName = wrkInfoPhoneImportDTO.getStoreName();
|
||||||
|
if (StringUtils.isNotEmpty(storeNo) && StringUtils.isNotEmpty(storeName)) {
|
||||||
|
// 去获取唯一的 store 集合
|
||||||
|
List<Store> list = storeService.list(
|
||||||
|
new LambdaQueryWrapper<Store>()
|
||||||
|
.eq(Store::getStoreNo, storeNo)
|
||||||
|
.eq(Store::getStoreName, storeName));
|
||||||
|
// 不为空时走下一步
|
||||||
|
if (CollectionUtil.isNotEmpty(list)) {
|
||||||
|
if (list.size() > 1) {
|
||||||
|
wrkInfoPhoneImportDTO.setImportResult("商户编号:" + storeNo + ",商户名称:" + storeName + "重复");
|
||||||
|
errList.add(wrkInfoPhoneImportDTO);
|
||||||
|
} else {
|
||||||
|
Store storeEntity = list.get(0);
|
||||||
|
assert null != storeEntity;
|
||||||
|
// 获取 到了 商户编号, 商户id, 商户名称
|
||||||
|
wrkInfoPhone.setStoreId(storeEntity.getStoreId());
|
||||||
|
wrkInfoPhone.setStoreNo(storeEntity.getStoreNo());
|
||||||
|
wrkInfoPhone.setStoreName(storeEntity.getStoreName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 终端不为空
|
||||||
|
if (StringUtils.isNotEmpty(terminalNo)) {
|
||||||
|
List<Terminal> list = terminalService.list(
|
||||||
|
new LambdaQueryWrapper<Terminal>()
|
||||||
|
.eq(Terminal::getTerminalNo, terminalNo)
|
||||||
|
.eq(Terminal::getStoreNo, storeNo));
|
||||||
|
if (CollectionUtil.isNotEmpty(list)) {
|
||||||
|
if (list.size() > 1) {
|
||||||
|
wrkInfoPhoneImportDTO.setImportResult("商户编号:" + storeNo + ",商户名称:" + storeName + "终端编号:" + terminalNo + " 重复");
|
||||||
|
errList.add(wrkInfoPhoneImportDTO);
|
||||||
|
} else {
|
||||||
|
Terminal terminal = list.get(0);
|
||||||
|
assert null != terminal;
|
||||||
|
wrkInfoPhone.setTerminalType(terminal.getTerminalType());
|
||||||
|
wrkInfoPhone.setTerminalNo(terminal.getTerminalNo());
|
||||||
|
wrkInfoPhone.setTerminalId(terminal.getTerminalId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 去获取唯一的 store 集合
|
||||||
|
}
|
||||||
|
wrkInfoPhone.setDeptId(SecurityContextHolder.getDeptId());
|
||||||
|
successList.add(wrkInfoPhone);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (CollectionUtil.isNotEmpty(successList)) {
|
||||||
|
this.saveBatch(successList);
|
||||||
|
}
|
||||||
|
if (CollectionUtil.isNotEmpty(errList)) {
|
||||||
|
try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream()){
|
||||||
|
ExcelUtils.exportList(outputStream, WrkInfoPhoneImportDTO.class, errList,"电话工单导入异常");
|
||||||
|
Result<List<FileSourceVo>> ossResult = remoteOssService.uploadFile(outputStream.toByteArray(), "", null, null, "", SecurityConstants.INNER);
|
||||||
|
if (ossResult.isSuccess() && CollectionUtil.isNotEmpty(ossResult.getData())){
|
||||||
|
List<FileSourceVo> data = ossResult.getData();
|
||||||
|
FileSourceVo fileSourceVo = data.get(0);
|
||||||
|
return Result.ok(fileSourceVo.getFilePath(), "电话工单导入成功, 异常数据以导入文件系统, 请下载");
|
||||||
|
}else {
|
||||||
|
return Result.failed(ossResult.getMsg());
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
throw new ResultException("电话工单导入失败, 请联系系统管理员");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return Result.ok("success");
|
||||||
|
}
|
||||||
|
|
||||||
|
private WrkInfoPhone convert(WrkInfoPhoneImportDTO wrkInfoPhoneImportDTO, Map<String, Long> idByUsernames) {
|
||||||
|
WrkInfoPhone wrkInfoPhone = new WrkInfoPhone();
|
||||||
|
wrkInfoPhone.setDelState(false);
|
||||||
|
// 理论上这个应该是框架 进行赋值的
|
||||||
|
String userName = wrkInfoPhoneImportDTO.getUserName();
|
||||||
|
|
||||||
|
wrkInfoPhone.setUserId(idByUsernames.get(userName));
|
||||||
|
wrkInfoPhone.setUserName(userName);
|
||||||
|
wrkInfoPhone.setWrkStatus(1);
|
||||||
|
wrkInfoPhone.setWorkSource(1);
|
||||||
|
wrkInfoPhone.setWrkResult(wrkInfoPhone.getWrkResult());
|
||||||
|
wrkInfoPhone.setWrkDetailResult(wrkInfoPhone.getWrkDetailResult());
|
||||||
|
wrkInfoPhone.setWrkSpecificResult(wrkInfoPhone.getWrkSpecificResult());
|
||||||
|
wrkInfoPhone.setWrkNo(IdUtil.getSnowflake().nextId() + "");
|
||||||
|
String terminalType = DictUtils.getDictValue("terminal_type", wrkInfoPhoneImportDTO.getTerminalType());
|
||||||
|
wrkInfoPhone.setTerminalType(Convert.toInt(terminalType));
|
||||||
|
wrkInfoPhone.setDisposeTime(wrkInfoPhoneImportDTO.getDisposeTime());
|
||||||
|
return wrkInfoPhone;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.chushang.inspection.work.service.impl;
|
||||||
|
|
||||||
|
import com.chushang.inspection.work.service.WrkInfoService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.chushang.inspection.work.mapper.WrkInfoMapper;
|
||||||
|
import com.chushang.inspection.work.po.WrkInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/6/26 17:13
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WrkInfoServiceImpl extends ServiceImpl<WrkInfoMapper, WrkInfo> implements WrkInfoService {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.chushang.inspection.work.service.impl;
|
||||||
|
|
||||||
|
import com.chushang.inspection.work.service.WrkInfoStoreRecordService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.chushang.inspection.work.po.WrkInfoStoreRecord;
|
||||||
|
import com.chushang.inspection.work.mapper.WrkInfoStoreRecordMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/6/26 17:13
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WrkInfoStoreRecordServiceImpl extends ServiceImpl<WrkInfoStoreRecordMapper, WrkInfoStoreRecord> implements WrkInfoStoreRecordService {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.chushang.inspection.work.service.impl;
|
||||||
|
|
||||||
|
import com.chushang.inspection.work.service.WrkInfoTerminalRecordService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.chushang.inspection.work.mapper.WrkInfoTerminalRecordMapper;
|
||||||
|
import com.chushang.inspection.work.po.WrkInfoTerminalRecord;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/6/26 17:13
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WrkInfoTerminalRecordServiceImpl extends ServiceImpl<WrkInfoTerminalRecordMapper, WrkInfoTerminalRecord> implements WrkInfoTerminalRecordService {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -28,7 +28,7 @@ spring:
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
username: ${config.jdbc.master.inspection.username}
|
username: ${config.jdbc.master.inspection.username}
|
||||||
password: ${config.jdbc.master.inspection.password}
|
password: ${config.jdbc.master.inspection.password}
|
||||||
url: jdbc:mysql://${config.jdbc.master.inspection.host}:${config.jdbc.master.inspection.port}/${config.jdbc.master.task.database}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
|
url: jdbc:mysql://${config.jdbc.master.inspection.host}:${config.jdbc.master.inspection.port}/${config.jdbc.master.inspection.database}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
|
||||||
hikari:
|
hikari:
|
||||||
# 最大线程池数量
|
# 最大线程池数量
|
||||||
maximum-pool-size: 30
|
maximum-pool-size: 30
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,11 @@
|
||||||
<!--nacos 心跳 INFO 屏蔽-->
|
<!--nacos 心跳 INFO 屏蔽-->
|
||||||
<logger name="com.alibaba.cloud.nacos" level="info">
|
<logger name="com.alibaba.cloud.nacos" level="info">
|
||||||
</logger>
|
</logger>
|
||||||
|
<logger name="org.redisson.connection.SentinelConnectionManager" level="OFF" />
|
||||||
|
<logger name="org.redisson.connection.MasterSlaveEntry" level="OFF" />
|
||||||
|
<logger name="org.redisson.connection.pool.PubSubConnectionPool" level="OFF" />
|
||||||
|
<logger name="org.redisson.connection.pool.SlaveConnectionPool" level="OFF" />
|
||||||
|
<logger name="org.redisson.connection.balancer.LoadBalancerManager" level="OFF" />
|
||||||
|
|
||||||
<!-- 使用kafka启用下面配置 -->
|
<!-- 使用kafka启用下面配置 -->
|
||||||
<!-- <appender name="plumelog" class="com.plumelog.logback.appender.KafkaAppender">-->
|
<!-- <appender name="plumelog" class="com.plumelog.logback.appender.KafkaAppender">-->
|
||||||
|
|
@ -100,48 +105,13 @@
|
||||||
<!-- </appender>-->
|
<!-- </appender>-->
|
||||||
|
|
||||||
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
|
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
|
||||||
<!-- <root level="info">-->
|
<root level="info">
|
||||||
<!-- <appender-ref ref="console"/>-->
|
<appender-ref ref="console"/>
|
||||||
<!-- <appender-ref ref="info"/>-->
|
<appender-ref ref="info"/>
|
||||||
<!-- <appender-ref ref="debug"/>-->
|
<appender-ref ref="debug"/>
|
||||||
<!-- <appender-ref ref="error"/>-->
|
<appender-ref ref="error"/>
|
||||||
<!-- <!– 输出plumelog –>-->
|
<!-- 输出plumelog -->
|
||||||
<!-- <!– <appender-ref ref="redisPlumelog"/>–>-->
|
<!-- <appender-ref ref="redisPlumelog"/>-->
|
||||||
<!-- </root>-->
|
</root>
|
||||||
|
|
||||||
<!--开发环境:打印控制台-->
|
|
||||||
<springProfile name="dev">
|
|
||||||
<!--可以输出项目中的debug日志,包括mybatis的sql日志-->
|
|
||||||
<logger name="com.chushang" level="DEBUG"/>
|
|
||||||
<logger name="org.redisson.connection.SentinelConnectionManager" level="OFF" />
|
|
||||||
<logger name="org.redisson.connection.MasterSlaveEntry" level="OFF" />
|
|
||||||
<logger name="org.redisson.connection.pool.PubSubConnectionPool" level="OFF" />
|
|
||||||
<logger name="org.redisson.connection.pool.SlaveConnectionPool" level="OFF" />
|
|
||||||
<logger name="org.redisson.connection.balancer.LoadBalancerManager" level="OFF" />
|
|
||||||
<root level="DEBUG">
|
|
||||||
<appender-ref ref="CONSOLE"/>
|
|
||||||
</root>
|
|
||||||
</springProfile>
|
|
||||||
|
|
||||||
|
|
||||||
<!--测试环境:打印控制台-->
|
|
||||||
<springProfile name="test">
|
|
||||||
<!--可以输出项目中的debug日志,包括mybatis的sql日志-->
|
|
||||||
<logger name="com.chushang" level="INFO"/>
|
|
||||||
<root level="INFO">
|
|
||||||
<appender-ref ref="CONSOLE"/>
|
|
||||||
<appender-ref ref="FILE"/>
|
|
||||||
</root>
|
|
||||||
</springProfile>
|
|
||||||
|
|
||||||
<!--测试环境:打印控制台-->
|
|
||||||
<springProfile name="prod">
|
|
||||||
<!--可以输出项目中的debug日志,包括mybatis的sql日志-->
|
|
||||||
<logger name="com.chushang" level="INFO"/>
|
|
||||||
<root level="INFO">
|
|
||||||
<appender-ref ref="CONSOLE"/>
|
|
||||||
<appender-ref ref="plumelog"/>
|
|
||||||
</root>
|
|
||||||
</springProfile>
|
|
||||||
|
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.chushang.inspection.work.mapper.WrkInfoMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.chushang.inspection.work.po.WrkInfo">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table wrk_info-->
|
||||||
|
<id column="wrk_id" jdbcType="BIGINT" property="wrkId" />
|
||||||
|
<result column="dept_id" jdbcType="BIGINT" property="deptId" />
|
||||||
|
<result column="store_id" jdbcType="BIGINT" property="storeId" />
|
||||||
|
<result column="terminal_id" jdbcType="BIGINT" property="terminalId" />
|
||||||
|
<result column="task_id" jdbcType="BIGINT" property="taskId" />
|
||||||
|
<result column="lower_task_id" jdbcType="BIGINT" property="lowerTaskId" />
|
||||||
|
<result column="terminal_records_id" jdbcType="BIGINT" property="terminalRecordsId" />
|
||||||
|
<result column="user_id" jdbcType="BIGINT" property="userId" />
|
||||||
|
<result column="user_name" jdbcType="VARCHAR" property="userName" />
|
||||||
|
<result column="work_no" jdbcType="BIGINT" property="workNo" />
|
||||||
|
<result column="work_type" jdbcType="SMALLINT" property="workType" />
|
||||||
|
<result column="work_method" jdbcType="SMALLINT" property="workMethod" />
|
||||||
|
<result column="work_sort" jdbcType="TINYINT" property="workSort" />
|
||||||
|
<result column="work_source" jdbcType="SMALLINT" property="workSource" />
|
||||||
|
<result column="dispose_time" jdbcType="TIMESTAMP" property="disposeTime" />
|
||||||
|
<result column="account_manager" jdbcType="VARCHAR" property="accountManager" />
|
||||||
|
<result column="account_phone" jdbcType="VARCHAR" property="accountPhone" />
|
||||||
|
<result column="terminal_status" jdbcType="TINYINT" property="terminalStatus" />
|
||||||
|
<result column="service_result" jdbcType="SMALLINT" property="serviceResult" />
|
||||||
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||||
|
<result column="state" jdbcType="SMALLINT" property="state" />
|
||||||
|
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
|
||||||
|
<result column="version" jdbcType="BIGINT" property="version" />
|
||||||
|
<result column="del_state" jdbcType="BOOLEAN" property="delState" />
|
||||||
|
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
wrk_id, dept_id, store_id, terminal_id, task_id, lower_task_id, terminal_records_id,
|
||||||
|
user_id, user_name, work_no, work_type, work_method, work_sort, work_source, dispose_time,
|
||||||
|
account_manager, account_phone, terminal_status, service_result, remark, `state`,
|
||||||
|
end_time, version, del_state, create_by, create_time, update_by, update_time
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.chushang.inspection.work.mapper.WrkInfoPhoneMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.chushang.inspection.work.po.WrkInfoPhone">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table wrk_info_phone-->
|
||||||
|
<id column="wrk_id" jdbcType="BIGINT" property="wrkId" />
|
||||||
|
<result column="wrk_no" jdbcType="VARCHAR" property="wrkNo" />
|
||||||
|
<result column="store_id" jdbcType="BIGINT" property="storeId" />
|
||||||
|
<result column="store_no" jdbcType="VARCHAR" property="storeNo" />
|
||||||
|
<result column="terminal_id" jdbcType="BIGINT" property="terminalId" />
|
||||||
|
<result column="terminal_no" jdbcType="VARCHAR" property="terminalNo" />
|
||||||
|
<result column="user_id" jdbcType="BIGINT" property="userId" />
|
||||||
|
<result column="user_name" jdbcType="VARCHAR" property="userName" />
|
||||||
|
<result column="work_source" jdbcType="TINYINT" property="workSource" />
|
||||||
|
<result column="wrk_result" jdbcType="VARCHAR" property="wrkResult" />
|
||||||
|
<result column="wrk_specific_result" jdbcType="VARCHAR" property="wrkSpecificResult" />
|
||||||
|
<result column="wrk_detail_result" jdbcType="VARCHAR" property="wrkDetailResult" />
|
||||||
|
<result column="task_id" jdbcType="BIGINT" property="taskId" />
|
||||||
|
<result column="lower_task_id" jdbcType="BIGINT" property="lowerTaskId" />
|
||||||
|
<result column="dept_id" jdbcType="BIGINT" property="deptId" />
|
||||||
|
<result column="version" jdbcType="BIGINT" property="version" />
|
||||||
|
<result column="del_state" jdbcType="BOOLEAN" property="delState" />
|
||||||
|
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
<result column="wrk_status" jdbcType="SMALLINT" property="wrkStatus" />
|
||||||
|
<result column="dispose_time" jdbcType="TIMESTAMP" property="disposeTime" />
|
||||||
|
<result column="terminal_type" jdbcType="SMALLINT" property="terminalType" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
wrk_id, wrk_no, store_id, store_no, terminal_id, terminal_no, user_id, user_name,
|
||||||
|
work_source, wrk_result, wrk_specific_result, wrk_detail_result, task_id, lower_task_id,
|
||||||
|
dept_id, version, del_state, create_by, create_time, update_by, update_time, wrk_status,
|
||||||
|
dispose_time, terminal_type
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.chushang.inspection.work.mapper.WrkInfoStoreRecordMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.chushang.inspection.work.po.WrkInfoStoreRecord">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table wrk_info_store_record-->
|
||||||
|
<id column="wrk_id" jdbcType="BIGINT" property="wrkId" />
|
||||||
|
<result column="wrk_no" jdbcType="BIGINT" property="wrkNo" />
|
||||||
|
<result column="dept_id" jdbcType="BIGINT" property="deptId" />
|
||||||
|
<result column="task_id" jdbcType="BIGINT" property="taskId" />
|
||||||
|
<result column="lower_task_id" jdbcType="BIGINT" property="lowerTaskId" />
|
||||||
|
<result column="task_name" jdbcType="VARCHAR" property="taskName" />
|
||||||
|
<result column="lower_task_name" jdbcType="VARCHAR" property="lowerTaskName" />
|
||||||
|
<result column="service_result" jdbcType="TINYINT" property="serviceResult" />
|
||||||
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||||
|
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
|
||||||
|
<result column="store_id" jdbcType="BIGINT" property="storeId" />
|
||||||
|
<result column="store_status" jdbcType="TINYINT" property="storeStatus" />
|
||||||
|
<result column="store_no" jdbcType="VARCHAR" property="storeNo" />
|
||||||
|
<result column="store_name" jdbcType="VARCHAR" property="storeName" />
|
||||||
|
<result column="store_contact" jdbcType="VARCHAR" property="storeContact" />
|
||||||
|
<result column="store_phone" jdbcType="VARCHAR" property="storePhone" />
|
||||||
|
<result column="store_address" jdbcType="VARCHAR" property="storeAddress" />
|
||||||
|
<result column="special_num" jdbcType="VARCHAR" property="specialNum" />
|
||||||
|
<result column="shop_name" jdbcType="VARCHAR" property="shopName" />
|
||||||
|
<result column="store_type" jdbcType="TINYINT" property="storeType" />
|
||||||
|
<result column="products" jdbcType="VARCHAR" property="products" />
|
||||||
|
<result column="tip_tool" jdbcType="VARCHAR" property="tipTool" />
|
||||||
|
<result column="admin_id" jdbcType="VARCHAR" property="adminId" />
|
||||||
|
<result column="ins_fre" jdbcType="TINYINT" property="insFre" />
|
||||||
|
<result column="register_address" jdbcType="VARCHAR" property="registerAddress" />
|
||||||
|
<result column="legal_name" jdbcType="VARCHAR" property="legalName" />
|
||||||
|
<result column="geographic_location" jdbcType="VARCHAR" property="geographicLocation" />
|
||||||
|
<result column="location_address" jdbcType="VARCHAR" property="locationAddress" />
|
||||||
|
<result column="work_location" jdbcType="VARCHAR" property="workLocation" />
|
||||||
|
<result column="work_adderss" jdbcType="VARCHAR" property="workAdderss" />
|
||||||
|
<result column="deviation" jdbcType="BIGINT" property="deviation" />
|
||||||
|
<result column="precode_encoding" jdbcType="VARCHAR" property="precodeEncoding" />
|
||||||
|
<result column="version" jdbcType="BIGINT" property="version" />
|
||||||
|
<result column="del_state" jdbcType="BOOLEAN" property="delState" />
|
||||||
|
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
wrk_id, wrk_no, dept_id, task_id, lower_task_id, task_name, lower_task_name, service_result,
|
||||||
|
remark, end_time, store_id, store_status, store_no, store_name, store_contact, store_phone,
|
||||||
|
store_address, special_num, shop_name, store_type, products, tip_tool, admin_id,
|
||||||
|
ins_fre, register_address, legal_name, geographic_location, location_address, work_location,
|
||||||
|
work_adderss, deviation, precode_encoding, version, del_state, create_by, create_time,
|
||||||
|
update_by, update_time
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.chushang.inspection.work.mapper.WrkInfoTerminalRecordMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.chushang.inspection.work.po.WrkInfoTerminalRecord">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table wrk_info_terminal_record-->
|
||||||
|
<id column="wrk_id" jdbcType="BIGINT" property="wrkId" />
|
||||||
|
<result column="dept_id" jdbcType="BIGINT" property="deptId" />
|
||||||
|
<result column="wrk_no" jdbcType="BIGINT" property="wrkNo" />
|
||||||
|
<result column="task_id" jdbcType="BIGINT" property="taskId" />
|
||||||
|
<result column="lower_task_id" jdbcType="BIGINT" property="lowerTaskId" />
|
||||||
|
<result column="task_name" jdbcType="VARCHAR" property="taskName" />
|
||||||
|
<result column="lower_task_name" jdbcType="VARCHAR" property="lowerTaskName" />
|
||||||
|
<result column="service_result" jdbcType="TINYINT" property="serviceResult" />
|
||||||
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||||
|
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
|
||||||
|
<result column="terminal_id" jdbcType="BIGINT" property="terminalId" />
|
||||||
|
<result column="terminal_sn" jdbcType="VARCHAR" property="terminalSn" />
|
||||||
|
<result column="terminal_type" jdbcType="TINYINT" property="terminalType" />
|
||||||
|
<result column="terminal_model" jdbcType="VARCHAR" property="terminalModel" />
|
||||||
|
<result column="terminal_no" jdbcType="VARCHAR" property="terminalNo" />
|
||||||
|
<result column="terminal_source" jdbcType="TINYINT" property="terminalSource" />
|
||||||
|
<result column="terminal_address" jdbcType="VARCHAR" property="terminalAddress" />
|
||||||
|
<result column="terminal_version" jdbcType="VARCHAR" property="terminalVersion" />
|
||||||
|
<result column="terminal_property" jdbcType="TINYINT" property="terminalProperty" />
|
||||||
|
<result column="occupy" jdbcType="BOOLEAN" property="occupy" />
|
||||||
|
<result column="terminal_status" jdbcType="TINYINT" property="terminalStatus" />
|
||||||
|
<result column="version" jdbcType="BIGINT" property="version" />
|
||||||
|
<result column="del_state" jdbcType="BOOLEAN" property="delState" />
|
||||||
|
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
wrk_id, dept_id, wrk_no, task_id, lower_task_id, task_name, lower_task_name, service_result,
|
||||||
|
remark, end_time, terminal_id, terminal_sn, terminal_type, terminal_model, terminal_no,
|
||||||
|
terminal_source, terminal_address, terminal_version, terminal_property, occupy, terminal_status,
|
||||||
|
version, del_state, create_by, create_time, update_by, update_time
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
|
|
@ -39,6 +39,11 @@
|
||||||
<artifactId>oss-feign</artifactId>
|
<artifactId>oss-feign</artifactId>
|
||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.chushang</groupId>
|
||||||
|
<artifactId>system-feign</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.chushang.oss.consumer;
|
||||||
|
|
||||||
import com.chushang.common.core.constant.SecurityConstants;
|
import com.chushang.common.core.constant.SecurityConstants;
|
||||||
import com.chushang.common.core.constant.ServiceConstant;
|
import com.chushang.common.core.constant.ServiceConstant;
|
||||||
|
import com.chushang.common.core.util.SpringUtils;
|
||||||
import com.chushang.common.core.web.AjaxResult;
|
import com.chushang.common.core.web.AjaxResult;
|
||||||
import com.chushang.common.core.web.Result;
|
import com.chushang.common.core.web.Result;
|
||||||
import com.chushang.task.entity.TaskInfo;
|
import com.chushang.task.entity.TaskInfo;
|
||||||
|
|
@ -15,7 +16,6 @@ import org.apache.rocketmq.spring.core.RocketMQListener;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.lang.reflect.Constructor;
|
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
@ -27,7 +27,7 @@ import java.util.Objects;
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
@RocketMQMessageListener(topic = ServiceConstant.OSS, consumerGroup = ServiceConstant.OSS_CONSUMER_GROUP)
|
@RocketMQMessageListener(topic = ServiceConstant.OSS, consumerGroup = ServiceConstant.OSS_CONSUMER_GROUP)
|
||||||
public class TaskConsumerService implements RocketMQListener<TaskInfo> {
|
public class OssConsumerService implements RocketMQListener<TaskInfo> {
|
||||||
@Resource
|
@Resource
|
||||||
RemoteTaskService remoteTaskService;
|
RemoteTaskService remoteTaskService;
|
||||||
/**
|
/**
|
||||||
|
|
@ -48,9 +48,8 @@ public class TaskConsumerService implements RocketMQListener<TaskInfo> {
|
||||||
// 包名+类名
|
// 包名+类名
|
||||||
Class classzz = Class.forName(className);
|
Class classzz = Class.forName(className);
|
||||||
// 获取构造器对象
|
// 获取构造器对象
|
||||||
Constructor constructor = classzz.getConstructor();
|
// 利用spring 获取对象
|
||||||
// 利用构造器对象创建一个对象
|
Object o = SpringUtils.getBean(classzz);
|
||||||
Object o = constructor.newInstance();
|
|
||||||
// 传递需要执行的方法
|
// 传递需要执行的方法
|
||||||
Method method = classzz.getMethod(methodName, String.class);
|
Method method = classzz.getMethod(methodName, String.class);
|
||||||
// 调用的方法有多个参数 Method method = classzz.getMethod("class1method",long.class,String.class,String.class);
|
// 调用的方法有多个参数 Method method = classzz.getMethod("class1method",long.class,String.class,String.class);
|
||||||
|
|
@ -19,22 +19,23 @@ spring:
|
||||||
cache:
|
cache:
|
||||||
enabled: false
|
enabled: false
|
||||||
nacos:
|
nacos:
|
||||||
username: nacos
|
server-addr: ${nacos.host}
|
||||||
password: nacos
|
username: ${nacos.username}
|
||||||
|
password: ${nacos.password}
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: ${nacos.host}
|
server-addr: ${spring.cloud.nacos.server-addr}
|
||||||
namespace: ${nacos.namespace}
|
namespace: ${nacos.namespace}
|
||||||
group: ${nacos.group}
|
group: local
|
||||||
|
service: ${spring.application.name}
|
||||||
config:
|
config:
|
||||||
|
server-addr: ${spring.cloud.nacos.server-addr}
|
||||||
namespace: ${spring.cloud.nacos.discovery.namespace}
|
namespace: ${spring.cloud.nacos.discovery.namespace}
|
||||||
group: ${spring.cloud.nacos.discovery.group}
|
group: ${nacos.group}
|
||||||
server-addr: ${spring.cloud.nacos.discovery.server-addr}
|
|
||||||
file-extension: yaml
|
file-extension: yaml
|
||||||
refresh-enabled: true
|
refresh-enabled: true
|
||||||
shared-configs:
|
shared-configs:
|
||||||
# 此处不应当 走common 了, 每个羡慕应该有自己单独的 db.yaml 文件 redis 可以使用公共
|
|
||||||
- dataId: application-common.${spring.cloud.nacos.config.file-extension}
|
- dataId: application-common.${spring.cloud.nacos.config.file-extension}
|
||||||
group: ${spring.cloud.nacos.discovery.group}
|
group: ${nacos.group}
|
||||||
refresh: ${spring.cloud.nacos.config.refresh-enabled}
|
refresh: ${spring.cloud.nacos.config.refresh-enabled}
|
||||||
profiles:
|
profiles:
|
||||||
active: @profiles.active@
|
active: @profiles.active@
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,11 @@
|
||||||
<!--nacos 心跳 INFO 屏蔽-->
|
<!--nacos 心跳 INFO 屏蔽-->
|
||||||
<logger name="com.alibaba.cloud.nacos" level="info">
|
<logger name="com.alibaba.cloud.nacos" level="info">
|
||||||
</logger>
|
</logger>
|
||||||
|
<logger name="org.redisson.connection.SentinelConnectionManager" level="OFF" />
|
||||||
|
<logger name="org.redisson.connection.MasterSlaveEntry" level="OFF" />
|
||||||
|
<logger name="org.redisson.connection.pool.PubSubConnectionPool" level="OFF" />
|
||||||
|
<logger name="org.redisson.connection.pool.SlaveConnectionPool" level="OFF" />
|
||||||
|
<logger name="org.redisson.connection.balancer.LoadBalancerManager" level="OFF" />
|
||||||
|
|
||||||
<!-- 使用kafka启用下面配置 -->
|
<!-- 使用kafka启用下面配置 -->
|
||||||
<!-- <appender name="plumelog" class="com.plumelog.logback.appender.KafkaAppender">-->
|
<!-- <appender name="plumelog" class="com.plumelog.logback.appender.KafkaAppender">-->
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,15 @@ import com.chushang.security.entity.vo.LoginUser;
|
||||||
import com.chushang.system.constants.SystemConstants;
|
import com.chushang.system.constants.SystemConstants;
|
||||||
import com.chushang.security.entity.po.SysUser;
|
import com.chushang.security.entity.po.SysUser;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.cloud.openfeign.SpringQueryMap;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.RequestHeader;
|
import org.springframework.web.bind.annotation.RequestHeader;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* by zhaowenyuan create 2022/5/20 10:05
|
* by zhaowenyuan create 2022/5/20 10:05
|
||||||
|
|
@ -41,4 +47,15 @@ public interface RemoteUserService {
|
||||||
@GetMapping("/getInfoById/{userId}")
|
@GetMapping("/getInfoById/{userId}")
|
||||||
Result<SysUser> getInfoById(@PathVariable(value = "userId") Long userId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
Result<SysUser> getInfoById(@PathVariable(value = "userId") Long userId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过用户名获取 对应的userId
|
||||||
|
*/
|
||||||
|
@GetMapping("/username")
|
||||||
|
Result<Map<String, Long>> getIdByUsernames(@RequestParam(value = "userNames") Set<String> userNames, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||||
|
/**
|
||||||
|
* 通过用户名获取 对应的userId
|
||||||
|
*/
|
||||||
|
@GetMapping("/nickname")
|
||||||
|
Result<Map<String, Long>> getIdByNicknames(@RequestParam(value = "nickNames") Set<String> nickNames, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@ package com.chushang.system.consumer;
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.chushang.common.core.constant.SecurityConstants;
|
import com.chushang.common.core.constant.SecurityConstants;
|
||||||
import com.chushang.common.core.constant.ServiceConstant;
|
import com.chushang.common.core.constant.ServiceConstant;
|
||||||
|
import com.chushang.common.core.context.SecurityContextHolder;
|
||||||
|
import com.chushang.common.core.util.SpringUtils;
|
||||||
import com.chushang.common.core.web.AjaxResult;
|
import com.chushang.common.core.web.AjaxResult;
|
||||||
import com.chushang.common.core.web.Result;
|
import com.chushang.common.core.web.Result;
|
||||||
import com.chushang.task.entity.TaskInfo;
|
import com.chushang.task.entity.TaskInfo;
|
||||||
|
|
@ -44,14 +46,14 @@ public class TaskConsumerService implements RocketMQListener<TaskInfo> {
|
||||||
String methodName = message.getMethodName();
|
String methodName = message.getMethodName();
|
||||||
String params = message.getParams();
|
String params = message.getParams();
|
||||||
Integer taskType = message.getTaskType();
|
Integer taskType = message.getTaskType();
|
||||||
|
SecurityContextHolder.setDeptId(message.getDeptId());
|
||||||
UpdateTaskDTO updateTask = new UpdateTaskDTO();
|
UpdateTaskDTO updateTask = new UpdateTaskDTO();
|
||||||
try {
|
try {
|
||||||
// 包名+类名
|
// 包名+类名
|
||||||
Class classzz = Class.forName(className);
|
Class classzz = Class.forName(className);
|
||||||
// 获取构造器对象
|
// 获取构造器对象
|
||||||
Constructor constructor = classzz.getConstructor();
|
// 利用spring 获取对象
|
||||||
// 利用构造器对象创建一个对象
|
Object o = SpringUtils.getBean(classzz);
|
||||||
Object o = constructor.newInstance();
|
|
||||||
// 传递需要执行的方法
|
// 传递需要执行的方法
|
||||||
Method method = classzz.getMethod(methodName, String.class);
|
Method method = classzz.getMethod(methodName, String.class);
|
||||||
// 调用的方法有多个参数 Method method = classzz.getMethod("class1method",long.class,String.class,String.class);
|
// 调用的方法有多个参数 Method method = classzz.getMethod("class1method",long.class,String.class,String.class);
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,7 @@ import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/user/remote")
|
@RequestMapping(value = "/user/remote")
|
||||||
|
|
@ -74,8 +72,24 @@ public class RemoteUserController implements RemoteUserService {
|
||||||
@GetMapping("/getInfoById/{userId}")
|
@GetMapping("/getInfoById/{userId}")
|
||||||
@InnerAuth
|
@InnerAuth
|
||||||
public Result<SysUser> getInfoById(@PathVariable(value = "userId") Long userId, String source) {
|
public Result<SysUser> getInfoById(@PathVariable(value = "userId") Long userId, String source) {
|
||||||
|
|
||||||
return Result.ok(sysUserService.selectByUserId(userId));
|
return Result.ok(sysUserService.selectByUserId(userId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据账户获取对应的userId
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@InnerAuth
|
||||||
|
@GetMapping("/username")
|
||||||
|
public Result<Map<String, Long>> getIdByUsernames(Set<String> userNames, String source) {
|
||||||
|
return Result.ok(sysUserService.getIdByUsernames(userNames));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@InnerAuth
|
||||||
|
@GetMapping("/nickname")
|
||||||
|
public Result<Map<String, Long>> getIdByNicknames(Set<String> nickNames, String source) {
|
||||||
|
return Result.ok(sysUserService.getIdByNicknames(nickNames));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import com.chushang.system.entity.dto.ListUserDTO;
|
||||||
import com.chushang.security.entity.po.SysUser;
|
import com.chushang.security.entity.po.SysUser;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
|
|
@ -92,4 +93,7 @@ public interface ISysUserService extends IService<SysUser> {
|
||||||
void resetPwd(Long userId, String newPassword);
|
void resetPwd(Long userId, String newPassword);
|
||||||
|
|
||||||
|
|
||||||
|
Map<String, Long> getIdByUsernames(Collection<String> userNames);
|
||||||
|
|
||||||
|
Map<String, Long> getIdByNicknames(Collection<String> nickNames);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.chushang.system.service.impl;
|
package com.chushang.system.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
@ -26,6 +27,8 @@ import java.time.LocalDateTime;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
|
|
@ -224,6 +227,31 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||||
.build());
|
.build());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据 userName 获取 用户id
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Map<String, Long> getIdByUsernames(Collection<String> userNames) {
|
||||||
|
List<SysUser> list = list(new LambdaQueryWrapper<SysUser>()
|
||||||
|
.in(SysUser::getUsername, userNames));
|
||||||
|
if (CollUtil.isEmpty(list)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return list.stream().collect(Collectors
|
||||||
|
.toMap(SysUser::getUsername, SysUser::getUserId, (v1, v2) -> v1));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Long> getIdByNicknames(Collection<String> nickNames) {
|
||||||
|
List<SysUser> list = list(new LambdaQueryWrapper<SysUser>()
|
||||||
|
.in(SysUser::getNickName, nickNames));
|
||||||
|
if (CollUtil.isEmpty(list)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return list.stream().collect(Collectors
|
||||||
|
.toMap(SysUser::getNickName, SysUser::getUserId, (v1, v2) -> v1));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void checkUsernameUnique(String username) {
|
private void checkUsernameUnique(String username) {
|
||||||
long count = count(new LambdaQueryWrapper<SysUser>()
|
long count = count(new LambdaQueryWrapper<SysUser>()
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ public class TaskInfoService extends ServiceImpl<TaskInfoMapper, TaskInfo> imple
|
||||||
}
|
}
|
||||||
|
|
||||||
public void joinQueue(TaskInfo taskInfo){
|
public void joinQueue(TaskInfo taskInfo){
|
||||||
mqProduceService.send(taskInfo.getApplicationName(), taskInfo);
|
mqProduceService.send(taskInfo.getApplicationName() + 1, taskInfo);
|
||||||
|
|
||||||
taskInfo.setTaskStatus(TaskStatusEnum.DISPATCH.getCode());
|
taskInfo.setTaskStatus(TaskStatusEnum.DISPATCH.getCode());
|
||||||
updateById(taskInfo);
|
updateById(taskInfo);
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,11 @@
|
||||||
<!--nacos 心跳 INFO 屏蔽-->
|
<!--nacos 心跳 INFO 屏蔽-->
|
||||||
<logger name="com.alibaba.cloud.nacos" level="info">
|
<logger name="com.alibaba.cloud.nacos" level="info">
|
||||||
</logger>
|
</logger>
|
||||||
|
<logger name="org.redisson.connection.SentinelConnectionManager" level="OFF" />
|
||||||
|
<logger name="org.redisson.connection.MasterSlaveEntry" level="OFF" />
|
||||||
|
<logger name="org.redisson.connection.pool.PubSubConnectionPool" level="OFF" />
|
||||||
|
<logger name="org.redisson.connection.pool.SlaveConnectionPool" level="OFF" />
|
||||||
|
<logger name="org.redisson.connection.balancer.LoadBalancerManager" level="OFF" />
|
||||||
<!-- 使用kafka启用下面配置 -->
|
<!-- 使用kafka启用下面配置 -->
|
||||||
<!-- <appender name="plumelog" class="com.plumelog.logback.appender.KafkaAppender">-->
|
<!-- <appender name="plumelog" class="com.plumelog.logback.appender.KafkaAppender">-->
|
||||||
<!-- <appName>${spring.application.name}</appName>-->
|
<!-- <appName>${spring.application.name}</appName>-->
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue