From 52928d854ec463fed7a8530423073e965b24e2b3 Mon Sep 17 00:00:00 2001 From: gaoben Date: Fri, 27 May 2022 11:43:53 +0800 Subject: [PATCH] =?UTF-8?q?v4.0=20=E8=BD=A6=E8=BE=86=E5=9B=BE=E7=89=87id?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 8 ++ .../net/shapelight/common/utils/Constant.java | 4 + .../modules/app/utils/MonyunSmsUtils.java | 2 +- .../modules/job/task/XaImageTask.java | 5 +- .../modules/job/task/XaRecordTask.java | 7 +- .../main/resources/7478041_c.xitu3d.com.pfx | Bin 0 -> 4634 bytes .../java/net/{ => shapelight/cb}/MyTest.java | 99 +++++++++--------- 7 files changed, 71 insertions(+), 54 deletions(-) create mode 100644 shapelight-admin/src/main/resources/7478041_c.xitu3d.com.pfx rename shapelight-admin/src/test/java/net/{ => shapelight/cb}/MyTest.java (71%) diff --git a/pom.xml b/pom.xml index 31eac75..6f83046 100644 --- a/pom.xml +++ b/pom.xml @@ -254,6 +254,14 @@ thumbnailator 0.4.13 + + + + org.bouncycastle + bcprov-ext-jdk16 + 1.45 + + diff --git a/shapelight-admin/src/main/java/net/shapelight/common/utils/Constant.java b/shapelight-admin/src/main/java/net/shapelight/common/utils/Constant.java index 352f559..1475cc5 100644 --- a/shapelight-admin/src/main/java/net/shapelight/common/utils/Constant.java +++ b/shapelight-admin/src/main/java/net/shapelight/common/utils/Constant.java @@ -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 diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/app/utils/MonyunSmsUtils.java b/shapelight-admin/src/main/java/net/shapelight/modules/app/utils/MonyunSmsUtils.java index c3c9a0f..16a1c67 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/app/utils/MonyunSmsUtils.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/app/utils/MonyunSmsUtils.java @@ -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); } } diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/job/task/XaImageTask.java b/shapelight-admin/src/main/java/net/shapelight/modules/job/task/XaImageTask.java index b72c9c0..b2b112d 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/job/task/XaImageTask.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/job/task/XaImageTask.java @@ -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; diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/job/task/XaRecordTask.java b/shapelight-admin/src/main/java/net/shapelight/modules/job/task/XaRecordTask.java index e626e9b..925d235 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/job/task/XaRecordTask.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/job/task/XaRecordTask.java @@ -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"); diff --git a/shapelight-admin/src/main/resources/7478041_c.xitu3d.com.pfx b/shapelight-admin/src/main/resources/7478041_c.xitu3d.com.pfx new file mode 100644 index 0000000000000000000000000000000000000000..6876bd19df353831e707c5194870e0101a8bf0f5 GIT binary patch literal 4634 zcmY+H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Eb<;NTA zY8UnBdF^{ICOCdj_Bd=YLI+0Y2{p6-&0|Fn^u=DIvzT;Jf=r|e-JsmE_Jb{t%?LWK zybJQ$nC7uy02ktE=Xe^GF!Jp=x{_vlk=Y`a!E05Qxvec`mk9e$*a@9Z=Afh@Ndbuf&FySdECd%?-RMSOAOg*2CZ%Gfgc#W2U0uQIQ{5@4(G$i=N=F5nijcyzYycCEh23pGF1C6 z=-J?GY0k>2vHj{spUVwZHq;wrzY9q9rXq%}ZN51lEV9%;N27W%wSgB7{+^_T@rw}*WAs$=CMrDvln#GcFD!2h8LLYVUPsFn0DTM$N4A_KC1=e`9GrJW1+#bC*O;a=IN5BeI2abWkAqHMbTD%j_1_f+=71rek8!f*KI(VVl3heg zEuMY5DBr{0XB}77rEW+(=RauON?sIy_RF8W5A<|a;5$CXbL!2)l|nZ~euORYZG1(T zhshJUAm@=)3JEPtYjI1FRe_&Ak3m%KA%!ZeEAnTr@(!mz;+v7yHUKk9Y0ve(P9F+{ z-XIZXh_4Mrn0GC+xbTS=Uz{+T>6jF&m|q6hibHnK%P zq<@q`?4`_=yJYGdu|-7<4I|SUzb1XRurGIwrZ4L+4d9&=$|u-QY=wJ@m?m8HWRiivQqOhGnv?VMq z&quZ}Oo(JIPfd0MitgkY-O9+)NIASTJ{|J@_No7ITR@byeP^!8@c|rKq|Um&=Q0uaT6FVLlS+NqL`xG#CR9ICya$=ssaBH zf6D)&E?pxSTHY>JHAZswy27(o$ZwN5SzluXYcI;)x%@}tLk2NR2$q0UiJDkTd;PZn zRLGKvq^*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(); +// } +// } //----------------------------- 随机生成姓名,性别,手机号 结束 --------------------------------------//