增加入库原始zip文件名zipFileName

main
gaoshuguang 2 years ago
parent ff8f4ab6c5
commit 006785a8ec

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="VcsDirectoryMappings"> <component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" /> <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component> </component>
</project> </project>

@ -113,4 +113,6 @@ public class BigAppoint {
* *
*/ */
private String dT; private String dT;
@TableField("zipFileName")
private String zipFileName;
} }

@ -32,6 +32,7 @@ public class CardBlackStatus implements Serializable {
private Integer status; private Integer status;
@TableField("TYPE") @TableField("TYPE")
private Integer type; private Integer type;
@TableField("zipFileName")
private String zipFileName;
} }

@ -1,5 +1,6 @@
package com.nm.gsgl.entity; package com.nm.gsgl.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
@ -99,4 +100,6 @@ public class EmerCar {
* *
*/ */
private String dT; private String dT;
@TableField("zipFileName")
private String zipFileName;
} }

@ -57,4 +57,6 @@ public class GreenAppoint {
* *
*/ */
private String dT; private String dT;
@TableField("zipFileName")
private String zipFileName;
} }

@ -32,6 +32,7 @@ public class ObuBlackStatus implements Serializable {
private Integer status; private Integer status;
@TableField("TYPE") @TableField("TYPE")
private Integer type; private Integer type;
@TableField("zipFileName")
private String zipFileName;
} }

@ -1,5 +1,6 @@
package com.nm.gsgl.entity; package com.nm.gsgl.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
@ -47,4 +48,6 @@ public class SNBlacklist {
* *
*/ */
private String dT; private String dT;
@TableField("zipFileName")
private String zipFileName;
} }

@ -16,5 +16,5 @@ public interface BigAppointService {
* @param filePath * @param filePath
* @param jsonPathList json * @param jsonPathList json
*/ */
void insertDatabase(String uuid, String filePath, List<String> jsonPathList); void insertDatabase(String uuid, String filePath, List<String> jsonPathList,String fileName);
} }

@ -16,5 +16,5 @@ public interface CardBlackService {
* @param filePath * @param filePath
* @param jsonPathList json * @param jsonPathList json
*/ */
void insertDatabase(String uuid, String filePath, List<String> jsonPathList); void insertDatabase(String uuid, String filePath, List<String> jsonPathList,String fileName);
} }

@ -16,5 +16,5 @@ public interface EmerCarService {
* @param filePath * @param filePath
* @param jsonPathList json * @param jsonPathList json
*/ */
void insertDatabase(String uuid, String filePath, List<String> jsonPathList); void insertDatabase(String uuid, String filePath, List<String> jsonPathList,String fileName);
} }

@ -16,5 +16,5 @@ public interface GreenAppointService {
* @param filePath * @param filePath
* @param jsonPathList json * @param jsonPathList json
*/ */
void insertDatabase(String uuid, String filePath, List<String> jsonPathList); void insertDatabase(String uuid, String filePath, List<String> jsonPathList,String fileName);
} }

@ -16,5 +16,5 @@ public interface ObuBlackService {
* @param filePath * @param filePath
* @param jsonPathList json * @param jsonPathList json
*/ */
void insertDatabase(String uuid, String filePath, List<String> jsonPathList); void insertDatabase(String uuid, String filePath, List<String> jsonPathList,String fileName);
} }

@ -16,5 +16,5 @@ public interface SNBlacklistService {
* @param filePath * @param filePath
* @param jsonPathList json * @param jsonPathList json
*/ */
void insertDatabase(String uuid, String filePath, List<String> jsonPathList); void insertDatabase(String uuid, String filePath, List<String> jsonPathList,String fileName);
} }

@ -45,7 +45,7 @@ public class BigAppointServiceImpl implements BigAppointService {
* @date 2023-07-11 11:09 * @date 2023-07-11 11:09
*/ */
@Override @Override
public void insertDatabase(String uuid, String filePath, List<String> jsonPathList) { public void insertDatabase(String uuid, String filePath, List<String> jsonPathList,String fileName) {
try { try {
log.info("[uuid:{}]开始将json数据插入数据库etc_big_appoint表", uuid); log.info("[uuid:{}]开始将json数据插入数据库etc_big_appoint表", uuid);
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
@ -72,6 +72,7 @@ public class BigAppointServiceImpl implements BigAppointService {
log.info("[uuid:{}]删除数据库etc_big_appoint表中重复记录{}", uuid, delete); log.info("[uuid:{}]删除数据库etc_big_appoint表中重复记录{}", uuid, delete);
} }
e.setDT(dt); e.setDT(dt);
e.setZipFileName(fileName);
bigAppointMapper.insert(e); bigAppointMapper.insert(e);
count++; count++;
} }

@ -48,7 +48,7 @@ public class CardBlackServiceImpl implements CardBlackService {
* @date 2023-07-11 11:09 * @date 2023-07-11 11:09
*/ */
@Override @Override
public void insertDatabase(String uuid, String filePath, List<String> jsonPathList) { public void insertDatabase(String uuid, String filePath, List<String> jsonPathList,String fileName) {
try { try {
log.info("[uuid:{}]开始将json数据插入数据库etc_cardblack_status表", uuid); log.info("[uuid:{}]开始将json数据插入数据库etc_cardblack_status表", uuid);
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
@ -83,6 +83,7 @@ public class CardBlackServiceImpl implements CardBlackService {
int delete = cardBlackStatusMapper.delete(queryWrapper); int delete = cardBlackStatusMapper.delete(queryWrapper);
log.info("[uuid:{}]先删除数据库etc_cardblack_status表中重复记录条数{},再插入最新数据", uuid, delete); log.info("[uuid:{}]先删除数据库etc_cardblack_status表中重复记录条数{},再插入最新数据", uuid, delete);
} }
op.setZipFileName(fileName);
cardBlackStatusMapper.insert(op); cardBlackStatusMapper.insert(op);
count++; count++;
} }

@ -43,7 +43,7 @@ public class EmerCarServiceImpl implements EmerCarService {
* @date 2023-07-11 11:09 * @date 2023-07-11 11:09
*/ */
@Override @Override
public void insertDatabase(String uuid, String filePath, List<String> jsonPathList) { public void insertDatabase(String uuid, String filePath, List<String> jsonPathList,String fileName) {
try { try {
log.info("[uuid:{}]开始将json数据插入数据库etc_emer_car表", uuid); log.info("[uuid:{}]开始将json数据插入数据库etc_emer_car表", uuid);
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
@ -73,6 +73,7 @@ public class EmerCarServiceImpl implements EmerCarService {
log.info("[uuid:{}]删除数据库etc_emer_car表中重复记录{}", uuid, delete); log.info("[uuid:{}]删除数据库etc_emer_car表中重复记录{}", uuid, delete);
} }
e.setDT(dt); e.setDT(dt);
e.setZipFileName(fileName);
emerCarMapper.insert(e); emerCarMapper.insert(e);
count++; count++;
} }

@ -44,7 +44,7 @@ public class GreenAppointServiceImpl implements GreenAppointService {
* @date 2023-07-11 11:09 * @date 2023-07-11 11:09
*/ */
@Override @Override
public void insertDatabase(String uuid, String filePath, List<String> jsonPathList) { public void insertDatabase(String uuid, String filePath, List<String> jsonPathList,String fileName) {
try { try {
log.info("[uuid:{}]开始将json数据插入数据库etc_green_appoint表", uuid); log.info("[uuid:{}]开始将json数据插入数据库etc_green_appoint表", uuid);
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
@ -72,6 +72,7 @@ public class GreenAppointServiceImpl implements GreenAppointService {
log.info("[uuid:{}]删除数据库etc_green_appoint表中重复记录{}", uuid, delete); log.info("[uuid:{}]删除数据库etc_green_appoint表中重复记录{}", uuid, delete);
} }
e.setDT(dt); e.setDT(dt);
e.setZipFileName(fileName);
greenAppointMapper.insert(e); greenAppointMapper.insert(e);
count++; count++;
} }

@ -70,22 +70,22 @@ public class InsertParamDbServiceImpl implements InsertParamDbService {
List<String> jsonPathList = UnzipUtil.UnzipFile(uuid, filePath, destDir); List<String> jsonPathList = UnzipUtil.UnzipFile(uuid, filePath, destDir);
//黑名单全量或增量 //黑名单全量或增量
if (fileName.contains("CARDBLACKLISTDOWN") || fileName.contains("CARDBLACKLISTINCREDOWN")) { if (fileName.contains("CARDBLACKLISTDOWN") || fileName.contains("CARDBLACKLISTINCREDOWN")) {
cardBlackService.insertDatabase(uuid, filePath, jsonPathList); cardBlackService.insertDatabase(uuid, filePath, jsonPathList,fileName);
//OBU全量或增量 //OBU全量或增量
} else if (fileName.contains("OBUBLACKLISTDOWN") || fileName.contains("OBUBLACKLISTINCREDOWN")) { } else if (fileName.contains("OBUBLACKLISTDOWN") || fileName.contains("OBUBLACKLISTINCREDOWN")) {
obuBlackService.insertDatabase(uuid, filePath, jsonPathList); obuBlackService.insertDatabase(uuid, filePath, jsonPathList,fileName);
//绿通车全量或增量 //绿通车全量或增量
} else if (fileName.contains("APPOINTMENTLISTDOWN") || fileName.contains("APPOINTMENTLISTINCREDOWN")) { } else if (fileName.contains("APPOINTMENTLISTDOWN") || fileName.contains("APPOINTMENTLISTINCREDOWN")) {
greenAppointService.insertDatabase(uuid, filePath, jsonPathList); greenAppointService.insertDatabase(uuid, filePath, jsonPathList,fileName);
//大件车预约 //大件车预约
} else if (fileName.contains("BULK_AMD_RES")) { } else if (fileName.contains("BULK_AMD_RES")) {
bigAppointService.insertDatabase(uuid, filePath, jsonPathList); bigAppointService.insertDatabase(uuid, filePath, jsonPathList,fileName);
//抢险救灾车辆信息全量或增量 //抢险救灾车辆信息全量或增量
} else if (fileName.contains("APPOINTDOWN") || fileName.contains("APPOINTINCRDOWN")) { } else if (fileName.contains("APPOINTDOWN") || fileName.contains("APPOINTINCRDOWN")) {
emerCarService.insertDatabase(uuid, filePath, jsonPathList); emerCarService.insertDatabase(uuid, filePath, jsonPathList,fileName);
//追缴名单全量或增量 //追缴名单全量或增量
} else if (fileName.contains("VEHICLEBLACKLISTDOWN") || fileName.contains("VEHICLEBLACKLISTINCREDOWN")) { } else if (fileName.contains("VEHICLEBLACKLISTDOWN") || fileName.contains("VEHICLEBLACKLISTINCREDOWN")) {
sNBlacklistService.insertDatabase(uuid, filePath, jsonPathList); sNBlacklistService.insertDatabase(uuid, filePath, jsonPathList,fileName);
} else { } else {
log.info("[uuid:{}]当前压缩包{},未找到相应的处理程序", uuid, fileName); log.info("[uuid:{}]当前压缩包{},未找到相应的处理程序", uuid, fileName);
} }

@ -47,7 +47,7 @@ public class ObuBlackServiceImpl implements ObuBlackService {
* @date 2023-07-11 11:09 * @date 2023-07-11 11:09
*/ */
@Override @Override
public void insertDatabase(String uuid, String filePath, List<String> jsonPathList) { public void insertDatabase(String uuid, String filePath, List<String> jsonPathList,String fileName) {
try { try {
log.info("[uuid:{}]开始将json数据插入数据库etc_obublack_status表", uuid); log.info("[uuid:{}]开始将json数据插入数据库etc_obublack_status表", uuid);
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
@ -83,6 +83,7 @@ public class ObuBlackServiceImpl implements ObuBlackService {
int delete = obuBlackStatusMapper.delete(queryWrapper); int delete = obuBlackStatusMapper.delete(queryWrapper);
log.info("[uuid:{}]删除数据库etc_obublack_status表中重复记录{}", uuid, delete); log.info("[uuid:{}]删除数据库etc_obublack_status表中重复记录{}", uuid, delete);
} }
op.setZipFileName(fileName);
obuBlackStatusMapper.insert(op); obuBlackStatusMapper.insert(op);
count++; count++;
} }

@ -43,7 +43,7 @@ public class SNBlacklistServiceImpl implements SNBlacklistService {
* @date 2023-07-11 11:09 * @date 2023-07-11 11:09
*/ */
@Override @Override
public void insertDatabase(String uuid, String filePath, List<String> jsonPathList) { public void insertDatabase(String uuid, String filePath, List<String> jsonPathList,String fileName) {
try { try {
log.info("[uuid:{}]开始将json数据插入数据库etc_snblack_list表", uuid); log.info("[uuid:{}]开始将json数据插入数据库etc_snblack_list表", uuid);
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
@ -72,6 +72,7 @@ public class SNBlacklistServiceImpl implements SNBlacklistService {
log.info("[uuid:{}]删除数据库etc_snblack_list表中重复记录{}", uuid, delete); log.info("[uuid:{}]删除数据库etc_snblack_list表中重复记录{}", uuid, delete);
} }
em.setDT(dt); em.setDT(dt);
em.setZipFileName(fileName);
sNBlacklistMapper.insert(em); sNBlacklistMapper.insert(em);
count++; count++;
} }

Loading…
Cancel
Save