新增用户充值卡管理模块
This commit is contained in:
@ -18,6 +18,7 @@ import java.util.Objects;
|
|||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/printer")
|
@RequestMapping("/printer")
|
||||||
public class PrinterController extends BaseController {
|
public class PrinterController extends BaseController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private YiLianYunPrintService printerService;
|
private YiLianYunPrintService printerService;
|
||||||
|
|
||||||
@ -38,13 +39,14 @@ public class PrinterController extends BaseController {
|
|||||||
if(Objects.isNull(printNum)){
|
if(Objects.isNull(printNum)){
|
||||||
throw new ServiceException("打印次数不能为空!");
|
throw new ServiceException("打印次数不能为空!");
|
||||||
}
|
}
|
||||||
if(printNum>2){
|
// if(printNum>2){
|
||||||
throw new ServiceException("打印次数不能超过2!");
|
// throw new ServiceException("打印次数不能超过2!");
|
||||||
}
|
// }
|
||||||
for (int i = 0; i < printNum; i++) {
|
for (int i = 0; i < printNum; i++) {
|
||||||
printerService.imagePrint(imageUrl);
|
printerService.imagePrint(imageUrl);
|
||||||
Thread.sleep(200);
|
Thread.sleep(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -132,4 +132,8 @@ public class DeviceReportInfo extends BaseEntity
|
|||||||
@ApiModelProperty("对应设备id")
|
@ApiModelProperty("对应设备id")
|
||||||
private Long deviceId;
|
private Long deviceId;
|
||||||
|
|
||||||
|
/** 状态:0未审核,1已审核,2已打印 */
|
||||||
|
@Excel(name = "状态:0未审核,1已审核,2已打印")
|
||||||
|
@ApiModelProperty("状态:0未审核,1已审核,2已打印")
|
||||||
|
private Integer status;
|
||||||
}
|
}
|
||||||
|
@ -59,15 +59,21 @@ public class DeviceReportInfoServiceImpl implements IDeviceReportInfoService
|
|||||||
@Override
|
@Override
|
||||||
public int insertDeviceReportInfo(DeviceReportInfo deviceReportInfo)
|
public int insertDeviceReportInfo(DeviceReportInfo deviceReportInfo)
|
||||||
{
|
{
|
||||||
//查重
|
//设备编码查重
|
||||||
List<DeviceReportInfo> list = new LambdaQueryChainWrapper<>(deviceReportInfoMapper)
|
List<DeviceReportInfo> list = new LambdaQueryChainWrapper<>(deviceReportInfoMapper)
|
||||||
.select(DeviceReportInfo::getSerialNumber)
|
.select(DeviceReportInfo::getSerialNumber,DeviceReportInfo::getImei)
|
||||||
.eq(DeviceReportInfo::getSerialNumber, deviceReportInfo.getSerialNumber())
|
.eq(DeviceReportInfo::getSerialNumber, deviceReportInfo.getSerialNumber())
|
||||||
|
.or()
|
||||||
|
.eq(DeviceReportInfo::getImei, deviceReportInfo.getImei())
|
||||||
.list();
|
.list();
|
||||||
System.err.println("查重:"+list);
|
System.err.println("查重:"+list);
|
||||||
if (!list.isEmpty()) {
|
if (!list.isEmpty()) {
|
||||||
|
if (list.get(0).getImei().equals(deviceReportInfo.getImei())) {
|
||||||
|
throw new ServiceException("IMEI号重复!");
|
||||||
|
} else if (list.get(0).getSerialNumber().equals(deviceReportInfo.getSerialNumber())) {
|
||||||
throw new ServiceException("设备编号重复!");
|
throw new ServiceException("设备编号重复!");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return deviceReportInfoMapper.insertDeviceReportInfo(deviceReportInfo);
|
return deviceReportInfoMapper.insertDeviceReportInfo(deviceReportInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,10 +27,11 @@
|
|||||||
<result property="voiceManufacturerName" column="voice_manufacturer_name" />
|
<result property="voiceManufacturerName" column="voice_manufacturer_name" />
|
||||||
<result property="replaceManufacturerName" column="replace_manufacturer_name" />
|
<result property="replaceManufacturerName" column="replace_manufacturer_name" />
|
||||||
<result property="deviceId" column="device_id" />
|
<result property="deviceId" column="device_id" />
|
||||||
|
<result property="status" column="status" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectDeviceReportInfoVo">
|
<sql id="selectDeviceReportInfoVo">
|
||||||
select id, imei, iccid, mcu_id, bsp_type, lte_type, mcu_type, mcu_fw, lte_fw, lcd_manufacturer, voice_manufacturer, fram_model, replace_manufacturer, test_record, batch_number, serial_number, qr_code, name, lcd_manufacturer_name, voice_manufacturer_name, replace_manufacturer_name, device_id from iot_device_report_info
|
select id, imei, iccid, mcu_id, bsp_type, lte_type, mcu_type, mcu_fw, lte_fw, lcd_manufacturer, voice_manufacturer, fram_model, replace_manufacturer, test_record, batch_number, serial_number, qr_code, name, lcd_manufacturer_name, voice_manufacturer_name, replace_manufacturer_name, device_id, status from iot_device_report_info
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectDeviceReportInfoList" parameterType="DeviceReportInfo" resultMap="DeviceReportInfoResult">
|
<select id="selectDeviceReportInfoList" parameterType="DeviceReportInfo" resultMap="DeviceReportInfoResult">
|
||||||
@ -49,7 +50,7 @@
|
|||||||
<if test="framModel != null and framModel != ''"> and fram_model = #{framModel}</if>
|
<if test="framModel != null and framModel != ''"> and fram_model = #{framModel}</if>
|
||||||
<if test="replaceManufacturer != null "> and replace_manufacturer = #{replaceManufacturer}</if>
|
<if test="replaceManufacturer != null "> and replace_manufacturer = #{replaceManufacturer}</if>
|
||||||
<if test="testRecord != null and testRecord != ''"> and test_record = #{testRecord}</if>
|
<if test="testRecord != null and testRecord != ''"> and test_record = #{testRecord}</if>
|
||||||
<if test="batchNumber != null "> and batch_number = #{batchNumber}</if>
|
<if test="batchNumber != null and batchNumber != ''"> and batch_number = #{batchNumber}</if>
|
||||||
<if test="serialNumber != null and serialNumber != ''"> and serial_number = #{serialNumber}</if>
|
<if test="serialNumber != null and serialNumber != ''"> and serial_number = #{serialNumber}</if>
|
||||||
<if test="qrCode != null and qrCode != ''"> and qr_code = #{qrCode}</if>
|
<if test="qrCode != null and qrCode != ''"> and qr_code = #{qrCode}</if>
|
||||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||||
@ -57,6 +58,7 @@
|
|||||||
<if test="voiceManufacturerName != null and voiceManufacturerName != ''"> and voice_manufacturer_name like concat('%', #{voiceManufacturerName}, '%')</if>
|
<if test="voiceManufacturerName != null and voiceManufacturerName != ''"> and voice_manufacturer_name like concat('%', #{voiceManufacturerName}, '%')</if>
|
||||||
<if test="replaceManufacturerName != null and replaceManufacturerName != ''"> and replace_manufacturer_name like concat('%', #{replaceManufacturerName}, '%')</if>
|
<if test="replaceManufacturerName != null and replaceManufacturerName != ''"> and replace_manufacturer_name like concat('%', #{replaceManufacturerName}, '%')</if>
|
||||||
<if test="deviceId != null "> and device_id = #{deviceId}</if>
|
<if test="deviceId != null "> and device_id = #{deviceId}</if>
|
||||||
|
<if test="status != null "> and status = #{status}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -89,6 +91,7 @@
|
|||||||
<if test="voiceManufacturerName != null">voice_manufacturer_name,</if>
|
<if test="voiceManufacturerName != null">voice_manufacturer_name,</if>
|
||||||
<if test="replaceManufacturerName != null">replace_manufacturer_name,</if>
|
<if test="replaceManufacturerName != null">replace_manufacturer_name,</if>
|
||||||
<if test="deviceId != null">device_id,</if>
|
<if test="deviceId != null">device_id,</if>
|
||||||
|
<if test="status != null">status,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="imei != null and imei != ''">#{imei},</if>
|
<if test="imei != null and imei != ''">#{imei},</if>
|
||||||
@ -112,6 +115,7 @@
|
|||||||
<if test="voiceManufacturerName != null">#{voiceManufacturerName},</if>
|
<if test="voiceManufacturerName != null">#{voiceManufacturerName},</if>
|
||||||
<if test="replaceManufacturerName != null">#{replaceManufacturerName},</if>
|
<if test="replaceManufacturerName != null">#{replaceManufacturerName},</if>
|
||||||
<if test="deviceId != null">#{deviceId},</if>
|
<if test="deviceId != null">#{deviceId},</if>
|
||||||
|
<if test="status != null">#{status},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@ -139,6 +143,7 @@
|
|||||||
<if test="voiceManufacturerName != null">voice_manufacturer_name = #{voiceManufacturerName},</if>
|
<if test="voiceManufacturerName != null">voice_manufacturer_name = #{voiceManufacturerName},</if>
|
||||||
<if test="replaceManufacturerName != null">replace_manufacturer_name = #{replaceManufacturerName},</if>
|
<if test="replaceManufacturerName != null">replace_manufacturer_name = #{replaceManufacturerName},</if>
|
||||||
<if test="deviceId != null">device_id = #{deviceId},</if>
|
<if test="deviceId != null">device_id = #{deviceId},</if>
|
||||||
|
<if test="status != null">status = #{status},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
20
fastbee-service/fastbee-rechargecard-service/pom.xml
Normal file
20
fastbee-service/fastbee-rechargecard-service/pom.xml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.fastbee</groupId>
|
||||||
|
<artifactId>fastbee-service</artifactId>
|
||||||
|
<version>3.8.5</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>fastbee-rechargecard-service</artifactId>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
</project>
|
@ -0,0 +1,4 @@
|
|||||||
|
package com.fastbee.rechargecard.domain;
|
||||||
|
|
||||||
|
public class test {
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
package com.fastbee.rechargecard.mapper;
|
||||||
|
|
||||||
|
public interface test {
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
package com.fastbee.rechargecard.service.impl;
|
||||||
|
|
||||||
|
public class testImpl {
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
package com.fastbee.rechargecard.service;
|
||||||
|
|
||||||
|
public interface test {
|
||||||
|
}
|
@ -20,6 +20,7 @@
|
|||||||
<module>fastbee-project-service</module>
|
<module>fastbee-project-service</module>
|
||||||
<module>fastbee-ggroup-service</module>
|
<module>fastbee-ggroup-service</module>
|
||||||
<module>fastbee-device-service</module>
|
<module>fastbee-device-service</module>
|
||||||
|
<module>fastbee-rechargecard-service</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user