v4.0 车辆图片id问题

This commit is contained in:
gaoben 2022-05-27 11:43:53 +08:00
parent 5f6c305981
commit 52928d854e
7 changed files with 71 additions and 54 deletions

View File

@ -254,6 +254,14 @@
<artifactId>thumbnailator</artifactId>
<version>0.4.13</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-ext-jdk16</artifactId>
<version>1.45</version>
</dependency>
</dependencies>
<!-- 阿里云maven仓库 -->

View File

@ -69,6 +69,10 @@ public class Constant {
public static final int FACE_FAILURE_OK = 0;
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
* 机关企事 4

View File

@ -43,7 +43,7 @@ public class MonyunSmsUtils {
public static void main(String args[]){
int res = sendSms("15829022214","123456");
int res = sendSms("158290","123456");
log.debug("result:"+res);
}
}

View File

@ -13,6 +13,7 @@ import java.util.*;
import lombok.extern.slf4j.Slf4j;
import net.shapelight.common.config.MinioConfig;
import net.shapelight.common.utils.Constant;
import net.shapelight.common.utils.DateUtils;
import net.shapelight.modules.job.task.ITask;
import net.shapelight.modules.sys.entity.SysUserEntity;
@ -272,7 +273,7 @@ public class XaImageTask implements ITask {
syncRecord.setLV_TCCBH(record.getParkCodeXa());
syncRecord.setLV_ZPSJ(DateUtils.format(record.getEnterTime(), "yyyyMMddHHmmss"));
syncRecord.setLV_JKBM(record.getRecordEnterId()+"");
syncRecord.setLV_JKBM(Constant.CAR_ENTER_ID+record.getRecordEnterId()+"");
String base64Image = "";
InputStream inStream = null;
@ -423,7 +424,7 @@ public class XaImageTask implements ITask {
syncRecord.setLV_TCCBH(record.getParkCodeXa());
syncRecord.setLV_ZPSJ(DateUtils.format(record.getExitTime(), "yyyyMMddHHmmss"));
syncRecord.setLV_CKBM(record.getRecordExitId()+"");
syncRecord.setLV_CKBM(Constant.CAR_EXIT_ID+record.getRecordExitId()+"");
String base64Image = "";
InputStream inStream = null;

View File

@ -10,6 +10,7 @@ import java.util.Date;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
import net.shapelight.common.utils.Constant;
import net.shapelight.common.utils.DateUtils;
import net.shapelight.modules.job.task.ITask;
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_GCSJ(DateUtils.format(record.getEnterTime(), "yyyyMMddHHmmss"));
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_KKSBBH(record.getChannalCodeXa());
syncRecord.setLV_PROCMODE("PMINSERT");
@ -349,8 +350,8 @@ public class XaRecordTask implements ITask {
syncRecord.setLV_CPHM(record.getPlateNumber());
syncRecord.setLV_CPLX("02");//01 大型汽车号牌 2 小型汽车号牌 03 使馆汽车号牌 04 领馆汽车号牌
syncRecord.setLV_GCSJ(DateUtils.format(record.getExitTime(), "yyyyMMddHHmmss"));
syncRecord.setLV_GCLX("1");//1进场2出场
syncRecord.setLV_CKBM(record.getRecordExitId()+"");
syncRecord.setLV_GCLX("2");//1进场2出场
syncRecord.setLV_CKBM(Constant.CAR_EXIT_ID+record.getRecordExitId()+"");
syncRecord.setLV_SBXT("10");//申报系统,默认10
syncRecord.setLV_KKSBBH(record.getChannalCodeXa());
syncRecord.setLV_PROCMODE("PMINSERT");

View File

@ -1,4 +1,4 @@
package net;
package net.shapelight.cb;
import gb.RandomValue;
@ -55,6 +55,9 @@ public class MyTest {
public static void main(String args[]) {
String s = 100+""+2+"";
System.out.println(s);
//----------------------------- 重命名文件开始 --------------------------------------//
// String baseDir = "D:\\facestore\\cface\\f10_2000";
// File faceDir = new File(baseDir);
@ -74,53 +77,53 @@ public class MyTest {
// String baseDir = "D:\\facestore\\cface\\f10_2000";
// String idFile = "D:\\facestore\\cface\\f1_100\\id.txt";
String baseDir = "D:\\facestore\\2020博士统考照片";
String idFile = baseDir+"\\id.txt";
File faceDir = new File(baseDir);
File[] iamges = faceDir.listFiles();
File outFile = new File(idFile);
if (!outFile.exists()) {
try {
outFile.createNewFile();
} catch (Exception e) {
e.printStackTrace();
}
}
StringBuffer idBuffer = new StringBuffer();
for (File file : iamges) {
String fileName = file.getName();
String id = fileName.substring(0, fileName.lastIndexOf("."));
//1.姓名
idBuffer.append(RandomValue.getChineseName()+"\t");
//2.性别
String sex=Math.random()>0.5?"":"";
idBuffer.append(sex+"\t");
//3.手机号
idBuffer.append(RandomValue.getTel()+"\t");
//4.身份证号
idBuffer.append(id);
idBuffer.append("\r\n");
System.out.println(idBuffer.toString());
}
FileWriter outWriter = null;
try {
outWriter = new FileWriter(idFile, true);
outWriter.write(idBuffer.toString());
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
outWriter.flush();
outWriter.close();
} catch (IOException ex) {
ex.printStackTrace();
}
}
// String baseDir = "D:\\facestore\\2020博士统考照片";
//
// String idFile = baseDir+"\\id.txt";
// File faceDir = new File(baseDir);
// File[] iamges = faceDir.listFiles();
// File outFile = new File(idFile);
// if (!outFile.exists()) {
// try {
// outFile.createNewFile();
// } catch (Exception e) {
// e.printStackTrace();
// }
//
// }
// StringBuffer idBuffer = new StringBuffer();
// for (File file : iamges) {
// String fileName = file.getName();
// String id = fileName.substring(0, fileName.lastIndexOf("."));
//
// //1.姓名
// idBuffer.append(RandomValue.getChineseName()+"\t");
// //2.性别
// String sex=Math.random()>0.5?"":"";
// idBuffer.append(sex+"\t");
// //3.手机号
// idBuffer.append(RandomValue.getTel()+"\t");
// //4.身份证号
// idBuffer.append(id);
// idBuffer.append("\r\n");
// System.out.println(idBuffer.toString());
// }
//
//
// FileWriter outWriter = null;
// try {
// outWriter = new FileWriter(idFile, true);
// outWriter.write(idBuffer.toString());
// } catch (Exception e) {
// e.printStackTrace();
// } finally {
// try {
// outWriter.flush();
// outWriter.close();
// } catch (IOException ex) {
// ex.printStackTrace();
// }
// }
//----------------------------- 随机生成姓名性别手机号 结束 --------------------------------------//