基础管理调试
This commit is contained in:
parent
5134b35193
commit
33c2058d2c
|
|
@ -52,7 +52,7 @@ public class TbBdDeviceRecordController extends BaseController {
|
||||||
* @param tbBdDeviceVo
|
* @param tbBdDeviceVo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/DeviceList")
|
@GetMapping("/getDeviceList")
|
||||||
public TableDataInfo getDeviceList(TbBdDeviceVo tbBdDeviceVo) {
|
public TableDataInfo getDeviceList(TbBdDeviceVo tbBdDeviceVo) {
|
||||||
startPage();
|
startPage();
|
||||||
List<TbBdDeviceVo> list = tbBdDeviceRecordService.getDeviceList(tbBdDeviceVo);
|
List<TbBdDeviceVo> list = tbBdDeviceRecordService.getDeviceList(tbBdDeviceVo);
|
||||||
|
|
|
||||||
|
|
@ -116,13 +116,20 @@ public class TbBdRecord implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 审核人
|
* 审核人
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="审核人")
|
@ApiModelProperty(value="审核人id")
|
||||||
private Long auditUser;
|
private Long auditUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="审核人姓名")
|
||||||
|
private String auditUserName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 审核时间
|
* 审核时间
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="审核时间")
|
@ApiModelProperty(value="审核时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date auditTime;
|
private Date auditTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.bonus.base.service.impl;
|
package com.bonus.base.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.PhoneUtil;
|
||||||
import com.alibaba.nacos.common.utils.CollectionUtils;
|
import com.alibaba.nacos.common.utils.CollectionUtils;
|
||||||
import com.bonus.base.config.ExceptionEnum;
|
import com.bonus.base.config.ExceptionEnum;
|
||||||
import com.bonus.base.domain.TbBdDeviceRecord;
|
import com.bonus.base.domain.TbBdDeviceRecord;
|
||||||
|
|
@ -16,7 +17,6 @@ import com.bonus.base.domain.TbBdRecord;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import com.bonus.base.mapper.TbBdRecordMapper;
|
import com.bonus.base.mapper.TbBdRecordMapper;
|
||||||
|
|
@ -75,6 +75,9 @@ public class TbBdRecordServiceImpl implements TbBdRecordService{
|
||||||
deviceRecord.setRecordId(record.getId());
|
deviceRecord.setRecordId(record.getId());
|
||||||
deviceRecord.setProId(record.getProId());
|
deviceRecord.setProId(record.getProId());
|
||||||
if (StringUtils.isNotBlank(deviceRecord.getDevUserPhone())) {
|
if (StringUtils.isNotBlank(deviceRecord.getDevUserPhone())) {
|
||||||
|
if (!PhoneUtil.isMobile(deviceRecord.getDevUserPhone())) {
|
||||||
|
return AjaxResult.error(ExceptionEnum.INVALID_PHONE_NUMBER_FORMAT.getCode(), ExceptionEnum.INVALID_PHONE_NUMBER_FORMAT.getMsg());
|
||||||
|
}
|
||||||
deviceRecord.setDevUserPhone(Sm4Utils.encode(deviceRecord.getDevUserPhone()));
|
deviceRecord.setDevUserPhone(Sm4Utils.encode(deviceRecord.getDevUserPhone()));
|
||||||
}
|
}
|
||||||
//根据设备名称或编码唯一校验
|
//根据设备名称或编码唯一校验
|
||||||
|
|
@ -156,6 +159,9 @@ public class TbBdRecordServiceImpl implements TbBdRecordService{
|
||||||
deviceRecord.setRecordId(record.getId());
|
deviceRecord.setRecordId(record.getId());
|
||||||
deviceRecord.setProId(record.getProId());
|
deviceRecord.setProId(record.getProId());
|
||||||
if (StringUtils.isNotBlank(deviceRecord.getDevUserPhone())) {
|
if (StringUtils.isNotBlank(deviceRecord.getDevUserPhone())) {
|
||||||
|
if (!PhoneUtil.isMobile(deviceRecord.getDevUserPhone())) {
|
||||||
|
return AjaxResult.error(ExceptionEnum.INVALID_PHONE_NUMBER_FORMAT.getCode(), ExceptionEnum.INVALID_PHONE_NUMBER_FORMAT.getMsg());
|
||||||
|
}
|
||||||
deviceRecord.setDevUserPhone(Sm4Utils.encode(deviceRecord.getDevUserPhone()));
|
deviceRecord.setDevUserPhone(Sm4Utils.encode(deviceRecord.getDevUserPhone()));
|
||||||
}
|
}
|
||||||
result += tbBdDeviceRecordMapper.insertSelective(deviceRecord);
|
result += tbBdDeviceRecordMapper.insertSelective(deviceRecord);
|
||||||
|
|
|
||||||
|
|
@ -21,18 +21,12 @@
|
||||||
<result column="audit_user" jdbcType="BIGINT" property="auditUser" />
|
<result column="audit_user" jdbcType="BIGINT" property="auditUser" />
|
||||||
<result column="audit_time" jdbcType="TIMESTAMP" property="auditTime" />
|
<result column="audit_time" jdbcType="TIMESTAMP" property="auditTime" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
id, depart_id, depart_name, pro_id, pro_name, rel_user, rel_phone, del_flag, audit_status,
|
id, depart_id, depart_name, pro_id, pro_name, rel_user, rel_phone, del_flag, audit_status,
|
||||||
remarks, create_time, create_user, update_time, update_user, audit_user, audit_time
|
remarks, create_time, create_user, update_time, update_user, audit_user, audit_time
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
||||||
<!--@mbg.generated-->
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
from tb_bd_record
|
|
||||||
where id = #{id,jdbcType=BIGINT}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getAll" resultType="com.bonus.base.domain.TbBdRecord">
|
<select id="getAll" resultType="com.bonus.base.domain.TbBdRecord">
|
||||||
select
|
select
|
||||||
|
|
@ -73,6 +67,16 @@
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectByPrimaryKey" resultType="com.bonus.base.domain.TbBdRecord">
|
||||||
|
select
|
||||||
|
tbr.id as id, tbr.depart_id as departId, tbr.depart_name as departId, tbr.pro_id as proId, tbr.pro_name, tbr.rel_user, tbr.rel_phone, tbr.del_flag as delFlag, tbr.audit_status as auditStatus,
|
||||||
|
tbr.remarks as remarks, tbr.create_time as createTime, tbr.create_user as createUser, tbr.update_time as updateTime, tbr.update_user as updateUser, tbr.audit_user as auditUser, tbr.audit_time as auditTime,
|
||||||
|
su.nick_name as auditUserName
|
||||||
|
from tb_bd_record tbr
|
||||||
|
left join sys_user su on tbr.audit_user = su.id
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
update tb_bd_record
|
update tb_bd_record
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
from tb_pro_power tb
|
from tb_pro_power tb
|
||||||
where tb.del_flag = '0'
|
where tb.del_flag = '0'
|
||||||
<if test="id != null">
|
<if test="id != null">
|
||||||
and tb.pro_id = #{proId}
|
and tb.pro_id = #{id}
|
||||||
</if>
|
</if>
|
||||||
<if test="gtName != null and gtName != ''">
|
<if test="gtName != null and gtName != ''">
|
||||||
and tb.gt_name like concat('%',#{gtName},'%')
|
and tb.gt_name like concat('%',#{gtName},'%')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue