diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/car/controller/CarOpenApi.java b/shapelight-admin/src/main/java/net/shapelight/modules/car/controller/CarOpenApi.java index 73c244c..90ac1c2 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/car/controller/CarOpenApi.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/car/controller/CarOpenApi.java @@ -388,6 +388,7 @@ public class CarOpenApi { Long tenantId = null; String parkCodeXa = null; String channalCodeXa = null; + String channalCode = null; TenPackEntity packEntity = tenPackService.getOne(new QueryWrapper() .eq("park_code",parkCode)); if(packEntity!=null){ @@ -401,6 +402,7 @@ public class CarOpenApi { ); if(channalEntity!=null){ channalCodeXa = channalEntity.getChannalCodeXa(); + channalCode = channalEntity.getChannalCode(); } } if (serviceName.equals("enter")) { @@ -419,6 +421,7 @@ public class CarOpenApi { enter.setTenantId(tenantId); enter.setParkCodeXa(parkCodeXa); enter.setChannalCodeXa(channalCodeXa); + enter.setChannalCode(channalCode); if (fileName.length() > 0) enter.setImage(fileName); this.tenPackRecordEnterService.save(enter); @@ -438,6 +441,9 @@ public class CarOpenApi { exit.setPackTime(Long.valueOf(parkTime)); exit.setCellId(cellId); exit.setTenantId(tenantId); + exit.setParkCodeXa(parkCodeXa); + exit.setChannalCodeXa(channalCodeXa); + exit.setChannalCode(channalCode); if (fileName.length() > 0) exit.setImage(fileName); this.tenPackRecordExitService.save(exit); 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 d1e4978..61c6f1c 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 @@ -260,6 +260,7 @@ public class XaImageTask implements ITask { syncRecord.setLV_TCCBH(record.getParkCodeXa()); syncRecord.setLV_ZPSJ(DateUtils.format(record.getEnterTime(), "yyyyMMddHHmmss")); + syncRecord.setLV_JKBM(record.getRecordEnterId()+""); String base64Image = ""; 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) { List records = this.tenPackRecordExitService.getNotSyncImage(cellId); - List syncRecords = new ArrayList(); + List syncRecords = new ArrayList(); List updateRecords = new ArrayList<>(); int count = 0; for (TenPackRecordExitEntity record : records) { - XaTCCTCSBZPXX syncRecord = new XaTCCTCSBZPXX(); + XaTCCTCSBZPXXEXIT syncRecord = new XaTCCTCSBZPXXEXIT(); // TenPackEntity packEntity = tenPackService.getOne(new QueryWrapper() // .eq("park_code",record.getParkCode())); @@ -399,6 +400,7 @@ public class XaImageTask implements ITask { syncRecord.setLV_TCCBH(record.getParkCodeXa()); syncRecord.setLV_ZPSJ(DateUtils.format(record.getExitTime(), "yyyyMMddHHmmss")); + syncRecord.setLV_CKBM(record.getRecordExitId()+""); String base64Image = ""; InputStream inStream = null; @@ -462,16 +464,16 @@ public class XaImageTask implements ITask { String enJson = XaUtils.encryptStr(json.trim(), appSecret); - List syncRecordsUpdates = jsonData.getDatas(); - for(XaTCCTCSBZPXX xx: syncRecordsUpdates){ + List syncRecordsUpdates = jsonData.getDatas(); + for(XaTCCTCSBZPXXEXIT xx: syncRecordsUpdates){ 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 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 = "23232"; // System.out.println(s); 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 0a31343..8d9029e 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 @@ -177,36 +177,36 @@ public class XaRecordTask implements ITask { for (TenPackRecordEnterEntity record : records) { XaTCCTCSBXX syncRecord = new XaTCCTCSBXX(); - TenPackEntity packEntity = tenPackService.getOne(new QueryWrapper() - .eq("park_code",record.getParkCode())); - - if(packEntity==null){ - continue; - } - String packCodeXa = packEntity.getParkCodeXa(); - if(packCodeXa==null || packCodeXa.length()==0){ - continue; - } - - TenPackChannalEntity channalEntity = tenPackChannalService.getOne(new QueryWrapper() - .eq("channal_name",record.getChannelName())); - if(channalEntity==null){ - continue; - } - String channalCodeXa = channalEntity.getChannalCodeXa(); - if(channalCodeXa==null || channalCodeXa.length()==0){ - continue; - } +// TenPackEntity packEntity = tenPackService.getOne(new QueryWrapper() +// .eq("park_code",record.getParkCode())); +// +// if(packEntity==null){ +// continue; +// } +// String packCodeXa = packEntity.getParkCodeXa(); +// if(packCodeXa==null || packCodeXa.length()==0){ +// continue; +// } +// +// TenPackChannalEntity channalEntity = tenPackChannalService.getOne(new QueryWrapper() +// .eq("channal_name",record.getChannelName())); +// if(channalEntity==null){ +// continue; +// } +// String channalCodeXa = channalEntity.getChannalCodeXa(); +// if(channalCodeXa==null || channalCodeXa.length()==0){ +// continue; +// } - syncRecord.setLV_TCCBH(packCodeXa); + syncRecord.setLV_TCCBH(record.getParkCodeXa()); syncRecord.setLV_CPHM(record.getPlateNumber()); syncRecord.setLV_CPLX("03");//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_SBXT("10");//申报系统,默认10 - syncRecord.setLV_KKSBBH(channalCodeXa); + syncRecord.setLV_KKSBBH(record.getChannalCodeXa()); syncRecord.setLV_PROCMODE("PMINSERT"); syncRecords.add(syncRecord); @@ -284,36 +284,36 @@ public class XaRecordTask implements ITask { for (TenPackRecordExitEntity record : records) { XaTCCTCSBXXEXIT syncRecord = new XaTCCTCSBXXEXIT(); - TenPackEntity packEntity = tenPackService.getOne(new QueryWrapper() - .eq("park_code",record.getParkCode())); +// TenPackEntity packEntity = tenPackService.getOne(new QueryWrapper() +// .eq("park_code",record.getParkCode())); - if(packEntity==null){ - continue; - } - String packCodeXa = packEntity.getParkCodeXa(); - if(packCodeXa==null || packCodeXa.length()==0){ - continue; - } - - TenPackChannalEntity channalEntity = tenPackChannalService.getOne(new QueryWrapper() - .eq("channal_name",record.getChannelName())); - if(channalEntity==null){ - continue; - } - String channalCodeXa = channalEntity.getChannalCodeXa(); - if(channalCodeXa==null || channalCodeXa.length()==0){ - continue; - } +// if(packEntity==null){ +// continue; +// } +// String packCodeXa = packEntity.getParkCodeXa(); +// if(packCodeXa==null || packCodeXa.length()==0){ +// continue; +// } +// +// TenPackChannalEntity channalEntity = tenPackChannalService.getOne(new QueryWrapper() +// .eq("channal_name",record.getChannelName())); +// if(channalEntity==null){ +// continue; +// } +// String channalCodeXa = channalEntity.getChannalCodeXa(); +// if(channalCodeXa==null || channalCodeXa.length()==0){ +// continue; +// } - syncRecord.setLV_TCCBH(packCodeXa); + syncRecord.setLV_TCCBH(record.getParkCodeXa()); syncRecord.setLV_CPHM(record.getPlateNumber()); syncRecord.setLV_CPLX("03");//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_SBXT("10");//申报系统,默认10 - syncRecord.setLV_KKSBBH(channalCodeXa); + syncRecord.setLV_KKSBBH(record.getChannalCodeXa()); syncRecord.setLV_PROCMODE("PMINSERT"); syncRecords.add(syncRecord); diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/xian/vo/XaTCCTCSBZPXX.java b/shapelight-admin/src/main/java/net/shapelight/modules/xian/vo/XaTCCTCSBZPXX.java index aa1cc85..28086df 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/xian/vo/XaTCCTCSBZPXX.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/xian/vo/XaTCCTCSBZPXX.java @@ -17,5 +17,8 @@ public class XaTCCTCSBZPXX { @JSONField(name="LV_ZPSJ") private String LV_ZPSJ; + @JSONField(name="LV_JKBM") + private String LV_JKBM; + } diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/xian/vo/XaTCCTCSBZPXXEXIT.java b/shapelight-admin/src/main/java/net/shapelight/modules/xian/vo/XaTCCTCSBZPXXEXIT.java new file mode 100644 index 0000000..3c560a3 --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/xian/vo/XaTCCTCSBZPXXEXIT.java @@ -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; + + +}