1.设备审核表添加字段,修复部分接口数据校验问题以及分组问题

master
x_z 3 years ago
parent 4173a640d7
commit 295566c44d

@ -51,7 +51,8 @@ public class DeviceKeyController {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
deviceKeyEntity.setDate(DateUtil.getDate());
deviceKeyEntity.setAuditTime(cn.hutool.core.date.DateUtil.now());
deviceKeyEntity.setUpdateTime(cn.hutool.core.date.DateUtil.now());
deviceKeyService.updateDeviceKey(deviceKeyEntity);
return ResultVOUtils.success("审核成功");
}
@ -94,6 +95,7 @@ public class DeviceKeyController {
deviceKeyEntity.setCompanyName(company.getCompanyName());
}
deviceKeyEntity.setDate(DateUtil.getDateTime());
deviceKeyEntity.setUpdateTime(cn.hutool.core.date.DateUtil.now());
deviceKeyEntity.setIsCheck(0);
deviceKeyService.insertDeviceKey(deviceKeyEntity);
return ResultVOUtils.success("1");

@ -1,6 +1,7 @@
package com.glxp.udi.admin.controller.param;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.glxp.udi.admin.annotation.AuthRuleAnnotation;
import com.glxp.udi.admin.common.res.BaseResponse;
@ -89,7 +90,7 @@ public class SystemParamConfigController {
@AuthRuleAnnotation("system/param/config/update")
@PostMapping("/system/param/config/update")
public BaseResponse update(@RequestBody SystemParamConfigSaveRequest systemParamConfigSaveRequest) {
if (null == systemParamConfigSaveRequest) {
if (null == systemParamConfigSaveRequest || StrUtil.isBlank(systemParamConfigSaveRequest.getParamValue())) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
systemParamConfigSaveRequest.setCustomerId(String.valueOf(customerService.getCustomerId()));

@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.glxp.udi.admin.entity.info.DeviceKeyEntity;
import com.glxp.udi.admin.req.info.FilterDeviceKeyRequest;
import com.glxp.udi.admin.req.inout.DeleteRequest;
import com.glxp.udi.admin.res.info.DeviceKeyResponse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -18,18 +17,14 @@ public interface DeviceKeyDao extends BaseMapper<DeviceKeyEntity> {
List<DeviceKeyEntity> findDeviceKey(FilterDeviceKeyRequest filterDeviceKeyRequest);
void insertDeviceKey(DeviceKeyEntity deviceKeyEntity);
void updateDeviceKey(DeviceKeyEntity deviceKeyEntity);
void updateDeviceKeyByImei(DeviceKeyEntity deviceKeyEntity);
void deleteDeviceKey(DeleteRequest deleteRequest);
/**
* ID
*
* @param customerId
* @param page
* @param imei
* @param isCheck
* @param customerIds
* @return
*/
IPage<DeviceKeyResponse> findDeviceKeyByCustomerId(@Param("page") IPage<DeviceKeyResponse> page, @Param("imei") String imei, @Param("isCheck") String isCheck, @Param("customerIds") List<String> customerIds);

@ -25,15 +25,25 @@ public class DeviceKeyEntity {
private String creditNum;
private int checkCode;
private String rgType;
private String remark;
private String customerId;
//申请人
/**
*
*/
private String applicant;
/**
*
*/
private String auditTime;
/**
*
*/
private String updateTime;
}

@ -35,6 +35,4 @@ public class WarehouseUserEntity {
*/
private boolean isDirector;
private String employeeName;
}

@ -38,15 +38,15 @@ public class DeviceKeyService {
}
public void insertDeviceKey(DeviceKeyEntity deviceKeyEntity) {
deviceKeyDao.insertDeviceKey(deviceKeyEntity);
deviceKeyDao.insert(deviceKeyEntity);
}
public void updateDeviceKey(DeviceKeyEntity deviceKeyEntity) {
deviceKeyDao.updateDeviceKey(deviceKeyEntity);
deviceKeyDao.updateById(deviceKeyEntity);
}
public void deleteDeviceKey(DeleteRequest deleteRequest) {
deviceKeyDao.deleteDeviceKey(deleteRequest);
deviceKeyDao.deleteById(deleteRequest.getId());
}
public IPage<DeviceKeyResponse> findDeviceKeyResponse(FilterDeviceKeyRequest filterDeviceKeyRequest) {

@ -83,7 +83,7 @@ public class UdiInfoService {
.eq(StrUtil.isNotBlank(filterUdiInfoRequest.getCustomerId()), "customerId", filterUdiInfoRequest.getCustomerId())
.eq(null != filterUdiInfoRequest.getDiType(), "diType", filterUdiInfoRequest.getDiType())
.like(StrUtil.isNotBlank(filterUdiInfoRequest.getThirdId()),"thirdId", filterUdiInfoRequest.getThirdId())
.groupBy("uuid").orderByDesc("lastUpdateTime");
.orderByDesc("lastUpdateTime");
return wrapper;
}

@ -27,112 +27,6 @@
</where>
</select>
<update id="updateDeviceKey" parameterType="com.glxp.udi.admin.entity.info.DeviceKeyEntity">
UPDATE device_check
<set>
<if test="isCheck != null">
isCheck=#{isCheck},
</if>
<if test="companyName != null">
companyName=#{companyName},
</if>
<if test="phone != null">
phone=#{phone},
</if>
<if test="contact != null">
contact=#{contact},
</if>
<if test="imeiKey != null">
imeiKey=#{imeiKey},
</if>
<if test="date != null">
date=#{date},
</if>
<if test="creditNum != null">
creditNum=#{creditNum},
</if>
<if test="rgType != null">
rgType=#{rgType},
</if>
<if test="remark != null">
remark=#{remark},
</if>
<if test="customerId != null and customerId != ''">
customerId=#{customerId},
</if>
<if test="applicant != null and applicant != ''">
applicant=#{applicant},
</if>
</set>
WHERE id = #{id}
</update>
<update id="updateDeviceKeyByImei" parameterType="com.glxp.udi.admin.entity.info.DeviceKeyEntity">
UPDATE device_check
<set>
<if test="isCheck != null">
isCheck=#{isCheck},
</if>
<if test="companyName != null">
companyName=#{companyName},
</if>
<if test="phone != null">
phone=#{phone},
</if>
<if test="contact != null">
contact=#{contact},
</if>
<if test="imeiKey != null">
imeiKey=#{imeiKey},
</if>
<if test="date != null">
date=#{date},
</if>
<if test="imei != null">
imei=#{imei},
</if>
<if test="creditNum != null">
creditNum=#{creditNum},
</if>
<if test="rgType != null">
rgType=#{rgType},
</if>
<if test="remark != null">
remark=#{remark},
</if>
<if test="customerId != null and customerId != ''">
customerId=#{customerId}
</if>
<if test="applicant != null and applicant != ''">
applicant=#{applicant}
</if>
</set>
WHERE imei=#{imei}
</update>
<insert id="insertDeviceKey" parameterType="com.glxp.udi.admin.entity.info.DeviceKeyEntity">
replace INTO device_check(imei,
isCheck,
companyName,
phone,
contact,
date,
imeiKey, creditNum, rgType, remark, customerId, applicant)
values (#{imei},
#{isCheck},
#{companyName},
#{phone},
#{contact},
#{date},
#{imeiKey}, #{creditNum}, #{rgType}, #{remark}, #{customerId},
#{applicant})
</insert>
<delete id="deleteDeviceKey" parameterType="Map">
DELETE
FROM device_check
WHERE id = #{id}
</delete>
<select id="findDeviceKeyByCustomerId" resultType="com.glxp.udi.admin.res.info.DeviceKeyResponse">
select device.*, customer.customerName
from device_check device

Loading…
Cancel
Save