v4.0 车辆图片id问题
This commit is contained in:
parent
5f6c305981
commit
52928d854e
8
pom.xml
8
pom.xml
|
@ -254,6 +254,14 @@
|
||||||
<artifactId>thumbnailator</artifactId>
|
<artifactId>thumbnailator</artifactId>
|
||||||
<version>0.4.13</version>
|
<version>0.4.13</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.bouncycastle</groupId>
|
||||||
|
<artifactId>bcprov-ext-jdk16</artifactId>
|
||||||
|
<version>1.45</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<!-- 阿里云maven仓库 -->
|
<!-- 阿里云maven仓库 -->
|
||||||
|
|
|
@ -69,6 +69,10 @@ public class Constant {
|
||||||
public static final int FACE_FAILURE_OK = 0;
|
public static final int FACE_FAILURE_OK = 0;
|
||||||
public static final int FACE_FAILURE_FAIL = 1;
|
public static final int FACE_FAILURE_FAIL = 1;
|
||||||
|
|
||||||
|
public static final String CAR_ENTER_ID = "100";
|
||||||
|
public static final String CAR_EXIT_ID = "200";
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 娱乐场所 2
|
* 娱乐场所 2
|
||||||
* 机关企事 4
|
* 机关企事 4
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class MonyunSmsUtils {
|
||||||
|
|
||||||
|
|
||||||
public static void main(String args[]){
|
public static void main(String args[]){
|
||||||
int res = sendSms("15829022214","123456");
|
int res = sendSms("158290","123456");
|
||||||
log.debug("result:"+res);
|
log.debug("result:"+res);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,7 @@ import java.util.*;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.shapelight.common.config.MinioConfig;
|
import net.shapelight.common.config.MinioConfig;
|
||||||
|
import net.shapelight.common.utils.Constant;
|
||||||
import net.shapelight.common.utils.DateUtils;
|
import net.shapelight.common.utils.DateUtils;
|
||||||
import net.shapelight.modules.job.task.ITask;
|
import net.shapelight.modules.job.task.ITask;
|
||||||
import net.shapelight.modules.sys.entity.SysUserEntity;
|
import net.shapelight.modules.sys.entity.SysUserEntity;
|
||||||
|
@ -272,7 +273,7 @@ public class XaImageTask implements ITask {
|
||||||
|
|
||||||
syncRecord.setLV_TCCBH(record.getParkCodeXa());
|
syncRecord.setLV_TCCBH(record.getParkCodeXa());
|
||||||
syncRecord.setLV_ZPSJ(DateUtils.format(record.getEnterTime(), "yyyyMMddHHmmss"));
|
syncRecord.setLV_ZPSJ(DateUtils.format(record.getEnterTime(), "yyyyMMddHHmmss"));
|
||||||
syncRecord.setLV_JKBM(record.getRecordEnterId()+"");
|
syncRecord.setLV_JKBM(Constant.CAR_ENTER_ID+record.getRecordEnterId()+"");
|
||||||
|
|
||||||
String base64Image = "";
|
String base64Image = "";
|
||||||
InputStream inStream = null;
|
InputStream inStream = null;
|
||||||
|
@ -423,7 +424,7 @@ public class XaImageTask implements ITask {
|
||||||
|
|
||||||
syncRecord.setLV_TCCBH(record.getParkCodeXa());
|
syncRecord.setLV_TCCBH(record.getParkCodeXa());
|
||||||
syncRecord.setLV_ZPSJ(DateUtils.format(record.getExitTime(), "yyyyMMddHHmmss"));
|
syncRecord.setLV_ZPSJ(DateUtils.format(record.getExitTime(), "yyyyMMddHHmmss"));
|
||||||
syncRecord.setLV_CKBM(record.getRecordExitId()+"");
|
syncRecord.setLV_CKBM(Constant.CAR_EXIT_ID+record.getRecordExitId()+"");
|
||||||
|
|
||||||
String base64Image = "";
|
String base64Image = "";
|
||||||
InputStream inStream = null;
|
InputStream inStream = null;
|
||||||
|
|
|
@ -10,6 +10,7 @@ import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.shapelight.common.utils.Constant;
|
||||||
import net.shapelight.common.utils.DateUtils;
|
import net.shapelight.common.utils.DateUtils;
|
||||||
import net.shapelight.modules.job.task.ITask;
|
import net.shapelight.modules.job.task.ITask;
|
||||||
import net.shapelight.modules.sys.entity.SysUserEntity;
|
import net.shapelight.modules.sys.entity.SysUserEntity;
|
||||||
|
@ -216,7 +217,7 @@ public class XaRecordTask implements ITask {
|
||||||
syncRecord.setLV_CPLX("02");//01 大型汽车号牌 2 小型汽车号牌 03 使馆汽车号牌 04 领馆汽车号牌
|
syncRecord.setLV_CPLX("02");//01 大型汽车号牌 2 小型汽车号牌 03 使馆汽车号牌 04 领馆汽车号牌
|
||||||
syncRecord.setLV_GCSJ(DateUtils.format(record.getEnterTime(), "yyyyMMddHHmmss"));
|
syncRecord.setLV_GCSJ(DateUtils.format(record.getEnterTime(), "yyyyMMddHHmmss"));
|
||||||
syncRecord.setLV_GCLX("1");//1进场2出场
|
syncRecord.setLV_GCLX("1");//1进场2出场
|
||||||
syncRecord.setLV_JKBM(record.getRecordEnterId()+"");
|
syncRecord.setLV_JKBM(Constant.CAR_ENTER_ID+record.getRecordEnterId()+"");
|
||||||
syncRecord.setLV_SBXT("10");//申报系统,默认10
|
syncRecord.setLV_SBXT("10");//申报系统,默认10
|
||||||
syncRecord.setLV_KKSBBH(record.getChannalCodeXa());
|
syncRecord.setLV_KKSBBH(record.getChannalCodeXa());
|
||||||
syncRecord.setLV_PROCMODE("PMINSERT");
|
syncRecord.setLV_PROCMODE("PMINSERT");
|
||||||
|
@ -349,8 +350,8 @@ public class XaRecordTask implements ITask {
|
||||||
syncRecord.setLV_CPHM(record.getPlateNumber());
|
syncRecord.setLV_CPHM(record.getPlateNumber());
|
||||||
syncRecord.setLV_CPLX("02");//01 大型汽车号牌 2 小型汽车号牌 03 使馆汽车号牌 04 领馆汽车号牌
|
syncRecord.setLV_CPLX("02");//01 大型汽车号牌 2 小型汽车号牌 03 使馆汽车号牌 04 领馆汽车号牌
|
||||||
syncRecord.setLV_GCSJ(DateUtils.format(record.getExitTime(), "yyyyMMddHHmmss"));
|
syncRecord.setLV_GCSJ(DateUtils.format(record.getExitTime(), "yyyyMMddHHmmss"));
|
||||||
syncRecord.setLV_GCLX("1");//1进场2出场
|
syncRecord.setLV_GCLX("2");//1进场2出场
|
||||||
syncRecord.setLV_CKBM(record.getRecordExitId()+"");
|
syncRecord.setLV_CKBM(Constant.CAR_EXIT_ID+record.getRecordExitId()+"");
|
||||||
syncRecord.setLV_SBXT("10");//申报系统,默认10
|
syncRecord.setLV_SBXT("10");//申报系统,默认10
|
||||||
syncRecord.setLV_KKSBBH(record.getChannalCodeXa());
|
syncRecord.setLV_KKSBBH(record.getChannalCodeXa());
|
||||||
syncRecord.setLV_PROCMODE("PMINSERT");
|
syncRecord.setLV_PROCMODE("PMINSERT");
|
||||||
|
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
||||||
package net;
|
package net.shapelight.cb;
|
||||||
|
|
||||||
import gb.RandomValue;
|
import gb.RandomValue;
|
||||||
|
|
||||||
|
@ -55,6 +55,9 @@ public class MyTest {
|
||||||
|
|
||||||
public static void main(String args[]) {
|
public static void main(String args[]) {
|
||||||
|
|
||||||
|
String s = 100+""+2+"";
|
||||||
|
System.out.println(s);
|
||||||
|
|
||||||
//----------------------------- 重命名文件开始 --------------------------------------//
|
//----------------------------- 重命名文件开始 --------------------------------------//
|
||||||
// String baseDir = "D:\\facestore\\cface\\f10_2000";
|
// String baseDir = "D:\\facestore\\cface\\f10_2000";
|
||||||
// File faceDir = new File(baseDir);
|
// File faceDir = new File(baseDir);
|
||||||
|
@ -74,53 +77,53 @@ public class MyTest {
|
||||||
// String baseDir = "D:\\facestore\\cface\\f10_2000";
|
// String baseDir = "D:\\facestore\\cface\\f10_2000";
|
||||||
// String idFile = "D:\\facestore\\cface\\f1_100\\id.txt";
|
// String idFile = "D:\\facestore\\cface\\f1_100\\id.txt";
|
||||||
|
|
||||||
String baseDir = "D:\\facestore\\2020博士统考照片";
|
// String baseDir = "D:\\facestore\\2020博士统考照片";
|
||||||
|
//
|
||||||
String idFile = baseDir+"\\id.txt";
|
// String idFile = baseDir+"\\id.txt";
|
||||||
File faceDir = new File(baseDir);
|
// File faceDir = new File(baseDir);
|
||||||
File[] iamges = faceDir.listFiles();
|
// File[] iamges = faceDir.listFiles();
|
||||||
File outFile = new File(idFile);
|
// File outFile = new File(idFile);
|
||||||
if (!outFile.exists()) {
|
// if (!outFile.exists()) {
|
||||||
try {
|
// try {
|
||||||
outFile.createNewFile();
|
// outFile.createNewFile();
|
||||||
} catch (Exception e) {
|
// } catch (Exception e) {
|
||||||
e.printStackTrace();
|
// e.printStackTrace();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
StringBuffer idBuffer = new StringBuffer();
|
// StringBuffer idBuffer = new StringBuffer();
|
||||||
for (File file : iamges) {
|
// for (File file : iamges) {
|
||||||
String fileName = file.getName();
|
// String fileName = file.getName();
|
||||||
String id = fileName.substring(0, fileName.lastIndexOf("."));
|
// String id = fileName.substring(0, fileName.lastIndexOf("."));
|
||||||
|
//
|
||||||
//1.姓名
|
// //1.姓名
|
||||||
idBuffer.append(RandomValue.getChineseName()+"\t");
|
// idBuffer.append(RandomValue.getChineseName()+"\t");
|
||||||
//2.性别
|
// //2.性别
|
||||||
String sex=Math.random()>0.5?"男":"女";
|
// String sex=Math.random()>0.5?"男":"女";
|
||||||
idBuffer.append(sex+"\t");
|
// idBuffer.append(sex+"\t");
|
||||||
//3.手机号
|
// //3.手机号
|
||||||
idBuffer.append(RandomValue.getTel()+"\t");
|
// idBuffer.append(RandomValue.getTel()+"\t");
|
||||||
//4.身份证号
|
// //4.身份证号
|
||||||
idBuffer.append(id);
|
// idBuffer.append(id);
|
||||||
idBuffer.append("\r\n");
|
// idBuffer.append("\r\n");
|
||||||
System.out.println(idBuffer.toString());
|
// System.out.println(idBuffer.toString());
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
FileWriter outWriter = null;
|
// FileWriter outWriter = null;
|
||||||
try {
|
// try {
|
||||||
outWriter = new FileWriter(idFile, true);
|
// outWriter = new FileWriter(idFile, true);
|
||||||
outWriter.write(idBuffer.toString());
|
// outWriter.write(idBuffer.toString());
|
||||||
} catch (Exception e) {
|
// } catch (Exception e) {
|
||||||
e.printStackTrace();
|
// e.printStackTrace();
|
||||||
} finally {
|
// } finally {
|
||||||
try {
|
// try {
|
||||||
outWriter.flush();
|
// outWriter.flush();
|
||||||
outWriter.close();
|
// outWriter.close();
|
||||||
} catch (IOException ex) {
|
// } catch (IOException ex) {
|
||||||
ex.printStackTrace();
|
// ex.printStackTrace();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
//----------------------------- 随机生成姓名,性别,手机号 结束 --------------------------------------//
|
//----------------------------- 随机生成姓名,性别,手机号 结束 --------------------------------------//
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue