1.修复bug
This commit is contained in:
gaoben 2021-05-11 18:21:19 +08:00
parent 96fd9ff546
commit 9a77ef6e77
5 changed files with 84 additions and 49 deletions

View File

@ -388,6 +388,7 @@ public class CarOpenApi {
Long tenantId = null; Long tenantId = null;
String parkCodeXa = null; String parkCodeXa = null;
String channalCodeXa = null; String channalCodeXa = null;
String channalCode = null;
TenPackEntity packEntity = tenPackService.getOne(new QueryWrapper<TenPackEntity>() TenPackEntity packEntity = tenPackService.getOne(new QueryWrapper<TenPackEntity>()
.eq("park_code",parkCode)); .eq("park_code",parkCode));
if(packEntity!=null){ if(packEntity!=null){
@ -401,6 +402,7 @@ public class CarOpenApi {
); );
if(channalEntity!=null){ if(channalEntity!=null){
channalCodeXa = channalEntity.getChannalCodeXa(); channalCodeXa = channalEntity.getChannalCodeXa();
channalCode = channalEntity.getChannalCode();
} }
} }
if (serviceName.equals("enter")) { if (serviceName.equals("enter")) {
@ -419,6 +421,7 @@ public class CarOpenApi {
enter.setTenantId(tenantId); enter.setTenantId(tenantId);
enter.setParkCodeXa(parkCodeXa); enter.setParkCodeXa(parkCodeXa);
enter.setChannalCodeXa(channalCodeXa); enter.setChannalCodeXa(channalCodeXa);
enter.setChannalCode(channalCode);
if (fileName.length() > 0) if (fileName.length() > 0)
enter.setImage(fileName); enter.setImage(fileName);
this.tenPackRecordEnterService.save(enter); this.tenPackRecordEnterService.save(enter);
@ -438,6 +441,9 @@ public class CarOpenApi {
exit.setPackTime(Long.valueOf(parkTime)); exit.setPackTime(Long.valueOf(parkTime));
exit.setCellId(cellId); exit.setCellId(cellId);
exit.setTenantId(tenantId); exit.setTenantId(tenantId);
exit.setParkCodeXa(parkCodeXa);
exit.setChannalCodeXa(channalCodeXa);
exit.setChannalCode(channalCode);
if (fileName.length() > 0) if (fileName.length() > 0)
exit.setImage(fileName); exit.setImage(fileName);
this.tenPackRecordExitService.save(exit); this.tenPackRecordExitService.save(exit);

View File

@ -260,6 +260,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()+"");
String base64Image = ""; String base64Image = "";
InputStream inStream = null; InputStream inStream = null;
@ -369,11 +370,11 @@ public class XaImageTask implements ITask {
private void processRecordCarExitImage(String appId, String appSecret, String xqid, String fwikUrl, Long cellId) { private void processRecordCarExitImage(String appId, String appSecret, String xqid, String fwikUrl, Long cellId) {
List<TenPackRecordExitEntity> records = this.tenPackRecordExitService.getNotSyncImage(cellId); List<TenPackRecordExitEntity> records = this.tenPackRecordExitService.getNotSyncImage(cellId);
List<XaTCCTCSBZPXX> syncRecords = new ArrayList(); List<XaTCCTCSBZPXXEXIT> syncRecords = new ArrayList();
List<TenPackRecordExitEntity> updateRecords = new ArrayList<>(); List<TenPackRecordExitEntity> updateRecords = new ArrayList<>();
int count = 0; int count = 0;
for (TenPackRecordExitEntity record : records) { for (TenPackRecordExitEntity record : records) {
XaTCCTCSBZPXX syncRecord = new XaTCCTCSBZPXX(); XaTCCTCSBZPXXEXIT syncRecord = new XaTCCTCSBZPXXEXIT();
// TenPackEntity packEntity = tenPackService.getOne(new QueryWrapper<TenPackEntity>() // TenPackEntity packEntity = tenPackService.getOne(new QueryWrapper<TenPackEntity>()
// .eq("park_code",record.getParkCode())); // .eq("park_code",record.getParkCode()));
@ -399,6 +400,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()+"");
String base64Image = ""; String base64Image = "";
InputStream inStream = null; InputStream inStream = null;
@ -462,16 +464,16 @@ public class XaImageTask implements ITask {
String enJson = XaUtils.encryptStr(json.trim(), appSecret); String enJson = XaUtils.encryptStr(json.trim(), appSecret);
List<XaTCCTCSBZPXX> syncRecordsUpdates = jsonData.getDatas(); List<XaTCCTCSBZPXXEXIT> syncRecordsUpdates = jsonData.getDatas();
for(XaTCCTCSBZPXX xx: syncRecordsUpdates){ for(XaTCCTCSBZPXXEXIT xx: syncRecordsUpdates){
xx.setLV_ZPZP(""); xx.setLV_ZPZP("");
} }
TenTranEntity tranEntity = tenTranService.saveApi(fwikUrl,jsonData,"TCCTCSBXX", "TCCTCSBXX", appId, appSecret); TenTranEntity tranEntity = tenTranService.saveApi(fwikUrl,jsonData,"TCCTCSBZPXX", "TCCTCSBZPXX", appId, appSecret);
String tranId = String.format("%s%016d",DateUtils.format(tranEntity.getTranDate(),"yyyyMMddHHmmss"),tranEntity.getTranId()); String tranId = String.format("%s%016d",DateUtils.format(tranEntity.getTranDate(),"yyyyMMddHHmmss"),tranEntity.getTranId());
String resJson = XaApi.httpPOSTJson(fwikUrl, enJson, "TCCTCSBXX", "TCCTCSBXX", appId, appSecret,tranId); String resJson = XaApi.httpPOSTJson(fwikUrl, enJson, "TCCTCSBZPXX", "TCCTCSBZPXX", appId, appSecret,tranId);
// String resJson = "{\"sta\":{\"code\":\"0000\",\"des\":\"成功\",\"ErrorLineParameter\":\"empty\"},\"datas\":[{\"Result\":\"接收成功\"}],\"pages\":[{\"psize\":\"1\",\"tcount\":\"1\",\"pno\":\"1\",\"tsize\":\"0\"}]}"; // String resJson = "{\"sta\":{\"code\":\"0000\",\"des\":\"成功\",\"ErrorLineParameter\":\"empty\"},\"datas\":[{\"Result\":\"接收成功\"}],\"pages\":[{\"psize\":\"1\",\"tcount\":\"1\",\"pno\":\"1\",\"tsize\":\"0\"}]}";
// String resJson = "23232"; // String resJson = "23232";
// System.out.println(s); // System.out.println(s);

View File

@ -177,36 +177,36 @@ public class XaRecordTask implements ITask {
for (TenPackRecordEnterEntity record : records) { for (TenPackRecordEnterEntity record : records) {
XaTCCTCSBXX syncRecord = new XaTCCTCSBXX(); XaTCCTCSBXX syncRecord = new XaTCCTCSBXX();
TenPackEntity packEntity = tenPackService.getOne(new QueryWrapper<TenPackEntity>() // TenPackEntity packEntity = tenPackService.getOne(new QueryWrapper<TenPackEntity>()
.eq("park_code",record.getParkCode())); // .eq("park_code",record.getParkCode()));
//
if(packEntity==null){ // if(packEntity==null){
continue; // continue;
} // }
String packCodeXa = packEntity.getParkCodeXa(); // String packCodeXa = packEntity.getParkCodeXa();
if(packCodeXa==null || packCodeXa.length()==0){ // if(packCodeXa==null || packCodeXa.length()==0){
continue; // continue;
} // }
//
TenPackChannalEntity channalEntity = tenPackChannalService.getOne(new QueryWrapper<TenPackChannalEntity>() // TenPackChannalEntity channalEntity = tenPackChannalService.getOne(new QueryWrapper<TenPackChannalEntity>()
.eq("channal_name",record.getChannelName())); // .eq("channal_name",record.getChannelName()));
if(channalEntity==null){ // if(channalEntity==null){
continue; // continue;
} // }
String channalCodeXa = channalEntity.getChannalCodeXa(); // String channalCodeXa = channalEntity.getChannalCodeXa();
if(channalCodeXa==null || channalCodeXa.length()==0){ // if(channalCodeXa==null || channalCodeXa.length()==0){
continue; // continue;
} // }
syncRecord.setLV_TCCBH(packCodeXa); syncRecord.setLV_TCCBH(record.getParkCodeXa());
syncRecord.setLV_CPHM(record.getPlateNumber()); syncRecord.setLV_CPHM(record.getPlateNumber());
syncRecord.setLV_CPLX("03");//01 大型汽车号牌 2 小型汽车号牌 03 使馆汽车号牌 04 领馆汽车号牌 syncRecord.setLV_CPLX("03");//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(record.getRecordEnterId()+"");
syncRecord.setLV_SBXT("10");//申报系统,默认10 syncRecord.setLV_SBXT("10");//申报系统,默认10
syncRecord.setLV_KKSBBH(channalCodeXa); syncRecord.setLV_KKSBBH(record.getChannalCodeXa());
syncRecord.setLV_PROCMODE("PMINSERT"); syncRecord.setLV_PROCMODE("PMINSERT");
syncRecords.add(syncRecord); syncRecords.add(syncRecord);
@ -284,36 +284,36 @@ public class XaRecordTask implements ITask {
for (TenPackRecordExitEntity record : records) { for (TenPackRecordExitEntity record : records) {
XaTCCTCSBXXEXIT syncRecord = new XaTCCTCSBXXEXIT(); XaTCCTCSBXXEXIT syncRecord = new XaTCCTCSBXXEXIT();
TenPackEntity packEntity = tenPackService.getOne(new QueryWrapper<TenPackEntity>() // TenPackEntity packEntity = tenPackService.getOne(new QueryWrapper<TenPackEntity>()
.eq("park_code",record.getParkCode())); // .eq("park_code",record.getParkCode()));
if(packEntity==null){ // if(packEntity==null){
continue; // continue;
} // }
String packCodeXa = packEntity.getParkCodeXa(); // String packCodeXa = packEntity.getParkCodeXa();
if(packCodeXa==null || packCodeXa.length()==0){ // if(packCodeXa==null || packCodeXa.length()==0){
continue; // continue;
} // }
//
TenPackChannalEntity channalEntity = tenPackChannalService.getOne(new QueryWrapper<TenPackChannalEntity>() // TenPackChannalEntity channalEntity = tenPackChannalService.getOne(new QueryWrapper<TenPackChannalEntity>()
.eq("channal_name",record.getChannelName())); // .eq("channal_name",record.getChannelName()));
if(channalEntity==null){ // if(channalEntity==null){
continue; // continue;
} // }
String channalCodeXa = channalEntity.getChannalCodeXa(); // String channalCodeXa = channalEntity.getChannalCodeXa();
if(channalCodeXa==null || channalCodeXa.length()==0){ // if(channalCodeXa==null || channalCodeXa.length()==0){
continue; // continue;
} // }
syncRecord.setLV_TCCBH(packCodeXa); syncRecord.setLV_TCCBH(record.getParkCodeXa());
syncRecord.setLV_CPHM(record.getPlateNumber()); syncRecord.setLV_CPHM(record.getPlateNumber());
syncRecord.setLV_CPLX("03");//01 大型汽车号牌 2 小型汽车号牌 03 使馆汽车号牌 04 领馆汽车号牌 syncRecord.setLV_CPLX("03");//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("1");//1进场2出场
syncRecord.setLV_CKBM(record.getRecordExitId()+""); syncRecord.setLV_CKBM(record.getRecordExitId()+"");
syncRecord.setLV_SBXT("10");//申报系统,默认10 syncRecord.setLV_SBXT("10");//申报系统,默认10
syncRecord.setLV_KKSBBH(channalCodeXa); syncRecord.setLV_KKSBBH(record.getChannalCodeXa());
syncRecord.setLV_PROCMODE("PMINSERT"); syncRecord.setLV_PROCMODE("PMINSERT");
syncRecords.add(syncRecord); syncRecords.add(syncRecord);

View File

@ -17,5 +17,8 @@ public class XaTCCTCSBZPXX {
@JSONField(name="LV_ZPSJ") @JSONField(name="LV_ZPSJ")
private String LV_ZPSJ; private String LV_ZPSJ;
@JSONField(name="LV_JKBM")
private String LV_JKBM;
} }

View File

@ -0,0 +1,24 @@
package net.shapelight.modules.xian.vo;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
@Data
public class XaTCCTCSBZPXXEXIT {
@JSONField(name="LV_TCCBH")
private String LV_TCCBH;
@JSONField(name="LV_ZPZP")
private String LV_ZPZP;
@JSONField(name="LV_ZPSJ")
private String LV_ZPSJ;
@JSONField(name="LV_JKBM")
private String LV_CKBM;
}