Showing
37 changed files
with
2749 additions
and
62 deletions
| 1 | 1 | ||
| 2 | 2 | ||
| 3 | + | ||
| 4 | +CREATE TABLE T_ICLEAR_API_APPINFO( | ||
| 5 | + ID INT primary key | ||
| 6 | + ,APPID VARCHAR(40) | ||
| 7 | + ,APPKEY VARCHAR(40) | ||
| 8 | + ,SECURITY VARCHAR(16) | ||
| 9 | + ,CREATE_TIME DATE | ||
| 10 | + ,IS_ENABLE VARCHAR(1) | ||
| 11 | +) | ||
| 12 | +INSERT INTO T_ICLEAR_API_APPINFO VALUES(1,'CTM','iClearExport','b92131f03f19a348',GETDATE(),'1'); | ||
| 13 | + | ||
| 14 | + | ||
| 15 | + | ||
| 16 | + | ||
| 17 | + | ||
| 18 | + | ||
| 19 | + | ||
| 20 | + | ||
| 21 | + | ||
| 22 | + | ||
| 23 | + | ||
| 24 | + | ||
| 25 | + | ||
| 26 | + | ||
| 27 | + | ||
| 28 | + | ||
| 29 | + | ||
| 3 | CREATE TABLE T_ICLEAR_API_LOG( | 30 | CREATE TABLE T_ICLEAR_API_LOG( |
| 4 | MSGID int identity(1,1) primary key --PK | 31 | MSGID int identity(1,1) primary key --PK |
| 5 | ,MSG_TYPE VARCHAR(20) --类型 | 32 | ,MSG_TYPE VARCHAR(20) --类型 | ... | ... |
No preview for this file type
| ... | @@ -3,24 +3,22 @@ package com.erry.iclear.dateInterface.api; | ... | @@ -3,24 +3,22 @@ package com.erry.iclear.dateInterface.api; |
| 3 | import com.erry.iclear.dateInterface.api.request.Mawb; | 3 | import com.erry.iclear.dateInterface.api.request.Mawb; |
| 4 | import com.erry.iclear.dateInterface.api.response.ResultRS; | 4 | import com.erry.iclear.dateInterface.api.response.ResultRS; |
| 5 | import com.erry.iclear.dateInterface.common.Constant; | 5 | import com.erry.iclear.dateInterface.common.Constant; |
| 6 | +import com.erry.iclear.dateInterface.entity.ChmConsignment; | ||
| 7 | +import com.erry.iclear.dateInterface.entity.ChmConsignmentDetail; | ||
| 6 | import com.erry.iclear.dateInterface.entity.IClearApiLog; | 8 | import com.erry.iclear.dateInterface.entity.IClearApiLog; |
| 7 | -import com.erry.iclear.dateInterface.service.IClearApiLogService; | 9 | +import com.erry.iclear.dateInterface.service.*; |
| 8 | -import com.erry.iclear.dateInterface.service.MawbDetailService; | ||
| 9 | -import com.erry.iclear.dateInterface.service.MawbService; | ||
| 10 | import com.erry.iclear.dateInterface.util.MD5Util; | 10 | import com.erry.iclear.dateInterface.util.MD5Util; |
| 11 | +import com.erry.iclear.dateInterface.util.SHA256Util; | ||
| 11 | import com.google.gson.Gson; | 12 | import com.google.gson.Gson; |
| 12 | -import io.swagger.annotations.Api; | ||
| 13 | import io.swagger.annotations.ApiOperation; | 13 | import io.swagger.annotations.ApiOperation; |
| 14 | import lombok.extern.slf4j.Slf4j; | 14 | import lombok.extern.slf4j.Slf4j; |
| 15 | import org.apache.commons.lang3.StringUtils; | 15 | import org.apache.commons.lang3.StringUtils; |
| 16 | import org.springframework.beans.factory.annotation.Autowired; | 16 | import org.springframework.beans.factory.annotation.Autowired; |
| 17 | -import org.springframework.http.HttpRequest; | 17 | +import org.springframework.util.StopWatch; |
| 18 | -import org.springframework.util.Assert; | ||
| 19 | import org.springframework.web.bind.annotation.*; | 18 | import org.springframework.web.bind.annotation.*; |
| 20 | 19 | ||
| 21 | import javax.servlet.http.HttpServletRequest; | 20 | import javax.servlet.http.HttpServletRequest; |
| 22 | -import java.util.HashMap; | 21 | +import java.util.*; |
| 23 | -import java.util.Objects; | ||
| 24 | 22 | ||
| 25 | /** | 23 | /** |
| 26 | * @author Administrator | 24 | * @author Administrator |
| ... | @@ -41,64 +39,113 @@ public class CustomsDataInterface { | ... | @@ -41,64 +39,113 @@ public class CustomsDataInterface { |
| 41 | @Autowired | 39 | @Autowired |
| 42 | private IClearApiLogService iClearApiLogService; | 40 | private IClearApiLogService iClearApiLogService; |
| 43 | 41 | ||
| 42 | + @Autowired | ||
| 43 | + private ChmConsignmentService chmConsignmentService; | ||
| 44 | + | ||
| 45 | + @Autowired | ||
| 46 | + private ChmConsignmentDetailService chmConsignmentDetailService; | ||
| 47 | + | ||
| 44 | 48 | ||
| 45 | @ApiOperation(value = "推送主单数据", httpMethod = "POST", notes = "ex: http://192.168.1.75:8080/customs/sendMawb") | 49 | @ApiOperation(value = "推送主单数据", httpMethod = "POST", notes = "ex: http://192.168.1.75:8080/customs/sendMawb") |
| 46 | @PostMapping("/sendMawb") | 50 | @PostMapping("/sendMawb") |
| 47 | @ResponseBody | 51 | @ResponseBody |
| 48 | public ResultRS sendMawb(HttpServletRequest request | 52 | public ResultRS sendMawb(HttpServletRequest request |
| 49 | , @RequestBody Mawb mawb) { | 53 | , @RequestBody Mawb mawb) { |
| 50 | - log.info("接收到主单数据:" + gson.toJson(mawb)); | 54 | + log.info("接收到请求数据billNo:"+mawb.getBillNo()+" data:" + gson.toJson(mawb)); |
| 51 | ResultRS result = new ResultRS(); | 55 | ResultRS result = new ResultRS(); |
| 52 | result.setSuccess(Boolean.FALSE); | 56 | result.setSuccess(Boolean.FALSE); |
| 53 | 57 | ||
| 54 | if(Objects.equals(mawb,null)){ | 58 | if(Objects.equals(mawb,null)){ |
| 55 | result.setCode("-7"); | 59 | result.setCode("-7"); |
| 56 | - result.setMsg("主单信息不能为空"); | 60 | + result.setMsg("请求信息不能为空"); |
| 57 | return result; | 61 | return result; |
| 58 | } | 62 | } |
| 59 | //0、保存请求信息,保存到iClear的 SQLServer | 63 | //0、保存请求信息,保存到iClear的 SQLServer |
| 64 | + StopWatch sw = new StopWatch("receice mawb"); | ||
| 65 | + sw.start("save log"); | ||
| 66 | + | ||
| 60 | String appId=(String) request.getHeader("Appid"); | 67 | String appId=(String) request.getHeader("Appid"); |
| 61 | String appkey=(String) request.getHeader("Appkey"); | 68 | String appkey=(String) request.getHeader("Appkey"); |
| 62 | IClearApiLog saveIClearApiLogResult = iClearApiLogService.saveIClearApiLog(iClearApiLogService.convertToIClearApiLog(mawb,appId,appkey)); | 69 | IClearApiLog saveIClearApiLogResult = iClearApiLogService.saveIClearApiLog(iClearApiLogService.convertToIClearApiLog(mawb,appId,appkey)); |
| 63 | 70 | ||
| 71 | + | ||
| 64 | if(!Objects.equals(saveIClearApiLogResult,null)){ | 72 | if(!Objects.equals(saveIClearApiLogResult,null)){ |
| 65 | log.info("请求保存成功,msgId:"+saveIClearApiLogResult.getMsgId()); | 73 | log.info("请求保存成功,msgId:"+saveIClearApiLogResult.getMsgId()); |
| 66 | mawb.setMsgId(saveIClearApiLogResult.getMsgId()); | 74 | mawb.setMsgId(saveIClearApiLogResult.getMsgId()); |
| 67 | -// mawb.getMawbDetailList().forEach(d->{ | 75 | + mawb.getMawbDetailList().forEach(d->{ |
| 68 | -// d.setMsgId(saveIClearApiLogResult.getMsgId()); | 76 | + d.setMsgId(saveIClearApiLogResult.getMsgId()); |
| 69 | -// }); | 77 | + }); |
| 70 | Mawb saveMawbResult= mawbService.saveMawb(mawb); | 78 | Mawb saveMawbResult= mawbService.saveMawb(mawb); |
| 71 | if(!Objects.equals(saveMawbResult,null)){ | 79 | if(!Objects.equals(saveMawbResult,null)){ |
| 72 | - log.info("请求主单数据保存成功,msgId:"+saveMawbResult.getMsgId()); | 80 | + log.info("请求数据主单号"+mawb.getBillNo()+"保存成功,msgId:"+saveMawbResult.getMsgId()); |
| 73 | }else{ | 81 | }else{ |
| 74 | - log.info("请求主单数据保存失败,msgId:"+saveMawbResult.getMsgId()); | 82 | + log.info("请求数据主单号"+mawb.getBillNo()+"保存失败,msgId:"+saveMawbResult.getMsgId()); |
| 75 | } | 83 | } |
| 76 | }else{ | 84 | }else{ |
| 77 | - log.info("请求保存失败,msgId:"+saveIClearApiLogResult.getMsgId()); | 85 | + log.info("请求日志保存失败,BillNo:"+mawb.getBillNo()); |
| 78 | } | 86 | } |
| 87 | + sw.stop(); | ||
| 79 | 88 | ||
| 80 | 89 | ||
| 81 | 90 | ||
| 82 | - | 91 | + //1、校验用户名密码 |
| 83 | - //1、TODO 校验用户名密码 | 92 | + sw.start("checkAppSecret"); |
| 84 | result=this.checkAppSecret(request, result); | 93 | result=this.checkAppSecret(request, result); |
| 85 | - | 94 | + sw.stop(); |
| 86 | 95 | ||
| 87 | 96 | ||
| 88 | //2、TODO 校验主单 | 97 | //2、TODO 校验主单 |
| 98 | + sw.start("checkMawb"); | ||
| 89 | if(result.getSuccess()==true){ | 99 | if(result.getSuccess()==true){ |
| 90 | - result.setSuccess(mawbService.checkMawb(mawb)); | 100 | + //result.setSuccess(mawbService.checkMawb(mawb)); |
| 91 | } | 101 | } |
| 102 | + sw.stop(); | ||
| 103 | + | ||
| 92 | //3、TODO 校验子单 | 104 | //3、TODO 校验子单 |
| 105 | + sw.start("checkMawbDetail"); | ||
| 93 | if(result.getSuccess()==true){ | 106 | if(result.getSuccess()==true){ |
| 94 | 107 | ||
| 95 | } | 108 | } |
| 96 | - //4、TODO 保存主单 | 109 | + sw.stop(); |
| 110 | + | ||
| 111 | + | ||
| 112 | + //4、保存运单到iclear中 | ||
| 113 | + sw.start("saveToIClear"); | ||
| 97 | if(result.getSuccess()==true){ | 114 | if(result.getSuccess()==true){ |
| 115 | + ChmConsignment chmConsignment=chmConsignmentService.convertToChmConsignment(mawb); | ||
| 116 | + List<ChmConsignmentDetail> chmConsignmentDetailList = new ArrayList<>(); | ||
| 117 | + mawb.getMawbDetailList().forEach(detail ->{ | ||
| 118 | + chmConsignmentDetailList.add(chmConsignmentDetailService.convertToChmConsignmentDetail(detail)); | ||
| 119 | + }); | ||
| 120 | + chmConsignment.setChmConsignmentDetailList(chmConsignmentDetailList); | ||
| 121 | + | ||
| 122 | + ChmConsignment chmConsignmentSaveResult = chmConsignmentService.saveChmConsignment(chmConsignment); | ||
| 98 | 123 | ||
| 124 | + if(!Objects.equals(chmConsignmentSaveResult,null)){ | ||
| 125 | + log.info("主单"+mawb.getBillNo()+" 保存成功,chmConsignmentId:"+chmConsignmentSaveResult.getId()); | ||
| 126 | + }else{ | ||
| 127 | + log.info("主单"+mawb.getBillNo()+" 保存失败"); | ||
| 99 | } | 128 | } |
| 129 | + } | ||
| 130 | + sw.stop(); | ||
| 100 | 131 | ||
| 101 | 132 | ||
| 133 | + //5、更新日志 | ||
| 134 | + sw.start("updateIClearApiLog"); | ||
| 135 | + if(!Objects.equals(saveIClearApiLogResult,null)){ | ||
| 136 | + saveIClearApiLogResult.setReceiveResult(result.getSuccess().toString()); | ||
| 137 | + saveIClearApiLogResult.setResponseTime(new Date()); | ||
| 138 | + saveIClearApiLogResult.setSpendTime(sw.getTotalTimeMillis()); | ||
| 139 | + | ||
| 140 | + iClearApiLogService.updateIClearApiLog(saveIClearApiLogResult); | ||
| 141 | + } | ||
| 142 | + log.info("请求数据billNo:"+mawb.getBillNo() +" 接收结束"); | ||
| 143 | + sw.stop(); | ||
| 144 | + log.info(sw.prettyPrint()); | ||
| 145 | + | ||
| 146 | + //6、return result | ||
| 147 | + result.setSuccess(Boolean.TRUE); | ||
| 148 | + result.setCode("0"); | ||
| 102 | return result; | 149 | return result; |
| 103 | } | 150 | } |
| 104 | 151 | ||
| ... | @@ -146,7 +193,7 @@ public class CustomsDataInterface { | ... | @@ -146,7 +193,7 @@ public class CustomsDataInterface { |
| 146 | } | 193 | } |
| 147 | 194 | ||
| 148 | 195 | ||
| 149 | - HashMap<String,String> secretMap = Constant.appIdSecurity.get(appId); | 196 | + HashMap<String,String> secretMap = Constant.appIdSecurityCache.get(appId); |
| 150 | if(secretMap==null){ | 197 | if(secretMap==null){ |
| 151 | result.setCode("-100"); | 198 | result.setCode("-100"); |
| 152 | result.setMsg("系统异常,该appId没有注册"); | 199 | result.setMsg("系统异常,该appId没有注册"); |
| ... | @@ -160,8 +207,9 @@ public class CustomsDataInterface { | ... | @@ -160,8 +207,9 @@ public class CustomsDataInterface { |
| 160 | return result; | 207 | return result; |
| 161 | } | 208 | } |
| 162 | 209 | ||
| 163 | - String md5Str= MD5Util.md5(appId+appkey+secretInSys+timeStamp); | 210 | + |
| 164 | - if(!token.equals(md5Str)){ | 211 | + String sha256Str = SHA256Util.getSHA256String(appId+appkey+secretInSys+timeStamp); |
| 212 | + if(!token.equals(sha256Str)){ | ||
| 165 | result.setCode("-4"); | 213 | result.setCode("-4"); |
| 166 | result.setMsg("Token验证失败"); | 214 | result.setMsg("Token验证失败"); |
| 167 | return result; | 215 | return result; | ... | ... |
| ... | @@ -23,13 +23,14 @@ import java.util.List; | ... | @@ -23,13 +23,14 @@ import java.util.List; |
| 23 | @Data | 23 | @Data |
| 24 | public class Mawb implements Serializable { | 24 | public class Mawb implements Serializable { |
| 25 | 25 | ||
| 26 | + private static final long serialVersionUID = -7092144710653831972L; | ||
| 26 | @Id | 27 | @Id |
| 27 | @GeneratedValue(strategy = GenerationType.IDENTITY) | 28 | @GeneratedValue(strategy = GenerationType.IDENTITY) |
| 28 | @Column(name = "Id", insertable = false, nullable = false) | 29 | @Column(name = "Id", insertable = false, nullable = false) |
| 29 | - private Integer id; | 30 | + private Long id; |
| 30 | 31 | ||
| 31 | @Column(name = "MSGID") | 32 | @Column(name = "MSGID") |
| 32 | - private Integer msgId; | 33 | + private Long msgId; |
| 33 | 34 | ||
| 34 | @ApiModelProperty(value = "进出口标志", name = "IEFlag", example = "固定值:E") | 35 | @ApiModelProperty(value = "进出口标志", name = "IEFlag", example = "固定值:E") |
| 35 | @Column(name = "IEFLAG") | 36 | @Column(name = "IEFLAG") | ... | ... |
| ... | @@ -18,16 +18,17 @@ import java.math.BigDecimal; | ... | @@ -18,16 +18,17 @@ import java.math.BigDecimal; |
| 18 | @Data | 18 | @Data |
| 19 | public class MawbDetail implements Serializable { | 19 | public class MawbDetail implements Serializable { |
| 20 | 20 | ||
| 21 | + private static final long serialVersionUID = -6706944312498119267L; | ||
| 21 | @Id | 22 | @Id |
| 22 | @GeneratedValue(strategy = GenerationType.IDENTITY) | 23 | @GeneratedValue(strategy = GenerationType.IDENTITY) |
| 23 | @Column(name = "Id", insertable = false, nullable = false) | 24 | @Column(name = "Id", insertable = false, nullable = false) |
| 24 | - private Integer id; | 25 | + private Long id; |
| 25 | 26 | ||
| 26 | @Column(name = "MSGID") | 27 | @Column(name = "MSGID") |
| 27 | - private Integer msgId; | 28 | + private Long msgId; |
| 28 | 29 | ||
| 29 | @Column(name="MAWBID") | 30 | @Column(name="MAWBID") |
| 30 | - private Integer MAWBID; | 31 | + private Long MAWBID; |
| 31 | 32 | ||
| 32 | @ApiModelProperty(value = "商品编号", example = "空值") | 33 | @ApiModelProperty(value = "商品编号", example = "空值") |
| 33 | @Column(name = "CLASSMARK") | 34 | @Column(name = "CLASSMARK") | ... | ... |
| 1 | package com.erry.iclear.dateInterface.common; | 1 | package com.erry.iclear.dateInterface.common; |
| 2 | 2 | ||
| 3 | +import com.erry.iclear.dateInterface.entity.ChmCarryPort; | ||
| 4 | +import com.erry.iclear.dateInterface.entity.DictionaryEntries; | ||
| 5 | +import com.erry.iclear.dateInterface.entity.DomesticDestinationMapping; | ||
| 6 | +import com.erry.iclear.dateInterface.entity.OrigplacecodeMapping; | ||
| 3 | import org.springframework.stereotype.Component; | 7 | import org.springframework.stereotype.Component; |
| 4 | 8 | ||
| 5 | import java.util.HashMap; | 9 | import java.util.HashMap; |
| ... | @@ -11,12 +15,37 @@ import java.util.Map; | ... | @@ -11,12 +15,37 @@ import java.util.Map; |
| 11 | @Component | 15 | @Component |
| 12 | public class Constant { | 16 | public class Constant { |
| 13 | 17 | ||
| 14 | - public static Map<String,HashMap<String,String>> appIdSecurity = new HashMap<>(); | 18 | + public static Map<String,HashMap<String,String>> appIdSecurityCache = new HashMap<>(); |
| 19 | + | ||
| 20 | + //字典表 | ||
| 21 | + public static Map<String , DictionaryEntries> dictionaryEntriesCache = new HashMap<>(); | ||
| 22 | + | ||
| 23 | + //货源地 | ||
| 24 | + public static Map<String,DomesticDestinationMapping> domesticDestinationMappingCache = new HashMap(); | ||
| 25 | + | ||
| 26 | + //目的港口 | ||
| 27 | + public static Map<String, OrigplacecodeMapping> origplacecodeMappingCache = new HashMap<>(); | ||
| 28 | + | ||
| 29 | + //港口表 | ||
| 30 | + public static Map<String, ChmCarryPort> chmCarryPortCache = new HashMap<>(); | ||
| 15 | 31 | ||
| 16 | public static String MSG_TYPE_C="C"; | 32 | public static String MSG_TYPE_C="C"; |
| 17 | 33 | ||
| 18 | public static String MSG_TYPE_D="D"; | 34 | public static String MSG_TYPE_D="D"; |
| 19 | 35 | ||
| 36 | + public static String LEVY_TYPE="levyType_"; | ||
| 37 | + | ||
| 38 | + public static String TRANSACTION_UNIT="transactionUnit_"; | ||
| 39 | + | ||
| 40 | + public static String COUNTRY = "Country_"; | ||
| 41 | + | ||
| 42 | + public static String CURRENCY_SYSTEM = "currencySystem_"; | ||
| 43 | + | ||
| 44 | + public static String VEHICLE_WAY_CODE = "VehicleWayCode_"; | ||
| 45 | + | ||
| 46 | + public static String CLINCH_TYPE = "ClinchType_"; | ||
| 47 | + | ||
| 48 | + public static String NEW_PACKAGE_TYPE = "NewPackageType_"; | ||
| 20 | 49 | ||
| 21 | 50 | ||
| 22 | } | 51 | } | ... | ... |
| 1 | package com.erry.iclear.dateInterface.controller; | 1 | package com.erry.iclear.dateInterface.controller; |
| 2 | 2 | ||
| 3 | +import com.erry.iclear.dateInterface.service.IClearApiSystemService; | ||
| 3 | import io.swagger.annotations.ApiOperation; | 4 | import io.swagger.annotations.ApiOperation; |
| 5 | +import lombok.extern.slf4j.Slf4j; | ||
| 6 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 4 | import org.springframework.web.bind.annotation.GetMapping; | 7 | import org.springframework.web.bind.annotation.GetMapping; |
| 5 | import org.springframework.web.bind.annotation.RequestMapping; | 8 | import org.springframework.web.bind.annotation.RequestMapping; |
| 6 | import org.springframework.web.bind.annotation.RestController; | 9 | import org.springframework.web.bind.annotation.RestController; |
| ... | @@ -10,22 +13,30 @@ import org.springframework.web.bind.annotation.RestController; | ... | @@ -10,22 +13,30 @@ import org.springframework.web.bind.annotation.RestController; |
| 10 | */ | 13 | */ |
| 11 | @RestController | 14 | @RestController |
| 12 | @RequestMapping("/system") | 15 | @RequestMapping("/system") |
| 13 | - | 16 | +@Slf4j |
| 14 | public class IClearExportInterface { | 17 | public class IClearExportInterface { |
| 15 | 18 | ||
| 16 | - @ApiOperation(value = "IClear 健康检查" ,httpMethod ="GET" ,notes="ex: http://localhost:8080/system/healthCheck") | 19 | + @Autowired |
| 20 | + private IClearApiSystemService iClearApiSystemService; | ||
| 21 | + | ||
| 22 | + | ||
| 23 | + @ApiOperation(value = "IClear 健康检查", httpMethod = "GET", notes = "ex: http://localhost:8080/system/healthCheck") | ||
| 17 | @GetMapping("/healthCheck") | 24 | @GetMapping("/healthCheck") |
| 18 | public String healthCheck() { | 25 | public String healthCheck() { |
| 19 | - return "iClearApi 当前时间:"+System.currentTimeMillis(); | 26 | + return "iClearApi 当前时间:" + System.currentTimeMillis(); |
| 20 | } | 27 | } |
| 21 | 28 | ||
| 22 | 29 | ||
| 23 | - @ApiOperation(value = "IClear 刷新缓存" ,httpMethod ="GET" ,notes="ex: http://192.168.0.75:8080/system/refreshCache") | 30 | + @ApiOperation(value = "IClear 刷新缓存", httpMethod = "GET", notes = "ex: http://192.168.1.75:8080/system/refreshAppInfoCache") |
| 24 | - @GetMapping("/refreshCache") | 31 | + @GetMapping("/refreshAppInfoCache") |
| 25 | public String refreshCache() { | 32 | public String refreshCache() { |
| 26 | - | 33 | + try{ |
| 27 | - | 34 | + iClearApiSystemService.refreshAppInfoCache(); |
| 28 | return "Success"; | 35 | return "Success"; |
| 36 | + }catch (Exception e){ | ||
| 37 | + log.error("refreshCache() error:"+e.getMessage()); | ||
| 38 | + } | ||
| 39 | + return "Faile"; | ||
| 29 | } | 40 | } |
| 30 | 41 | ||
| 31 | } | 42 | } | ... | ... |
| 1 | +package com.erry.iclear.dateInterface.entity; | ||
| 2 | + | ||
| 3 | +import lombok.Data; | ||
| 4 | + | ||
| 5 | +import javax.persistence.*; | ||
| 6 | +import java.io.Serializable; | ||
| 7 | +import java.util.Date; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @author Administrator | ||
| 11 | + */ | ||
| 12 | +@Entity | ||
| 13 | +@Table(name = "T_ICLEAR_API_APPINFO") | ||
| 14 | +@Data | ||
| 15 | +public class AppInfo implements Serializable { | ||
| 16 | + | ||
| 17 | + private static final long serialVersionUID = 1023722733043865770L; | ||
| 18 | + @Id | ||
| 19 | + @Column(name = "ID") | ||
| 20 | + private Integer id; | ||
| 21 | + | ||
| 22 | + @Column(name = "APPID") | ||
| 23 | + private String appId; | ||
| 24 | + | ||
| 25 | + @Column(name = "APPKEY") | ||
| 26 | + private String appKey; | ||
| 27 | + | ||
| 28 | + @Column(name = "SECURITY") | ||
| 29 | + private String security; | ||
| 30 | + | ||
| 31 | + @Column(name = "CREATE_TIME") | ||
| 32 | + private Date createTime; | ||
| 33 | + | ||
| 34 | + @Column(name = "IS_ENABLE") | ||
| 35 | + private String isEnable; | ||
| 36 | + | ||
| 37 | + | ||
| 38 | +} |
| 1 | +package com.erry.iclear.dateInterface.entity; | ||
| 2 | + | ||
| 3 | +import lombok.Data; | ||
| 4 | + | ||
| 5 | +import javax.persistence.*; | ||
| 6 | +import java.io.Serializable; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * 港口表 | ||
| 10 | + * Created by Erry 2019/6/15. | ||
| 11 | + * @author Administrator | ||
| 12 | + */ | ||
| 13 | +@Entity | ||
| 14 | +@Table(name = "T_CHM_CARRY_PORT") | ||
| 15 | +@Data | ||
| 16 | +public class ChmCarryPort implements Serializable { | ||
| 17 | + | ||
| 18 | + private static final long serialVersionUID = 2693103610036977383L; | ||
| 19 | + | ||
| 20 | + /** | ||
| 21 | + * 运单表ID,自动增加 | ||
| 22 | + */ | ||
| 23 | + @Id | ||
| 24 | + @GeneratedValue | ||
| 25 | + @Column(name = "ID") | ||
| 26 | + private Long id; | ||
| 27 | + | ||
| 28 | + /** | ||
| 29 | + * | ||
| 30 | + */ | ||
| 31 | + @Column(name = "PORT_NAME") | ||
| 32 | + private String portName; | ||
| 33 | + | ||
| 34 | + /** | ||
| 35 | + * | ||
| 36 | + */ | ||
| 37 | + @Column(name = "PORT_NO") | ||
| 38 | + private String portNo; | ||
| 39 | + | ||
| 40 | + /** | ||
| 41 | + * 创建人 | ||
| 42 | + */ | ||
| 43 | + @Column(name = "CREATE_BY") | ||
| 44 | + private String createName; | ||
| 45 | + | ||
| 46 | + /** | ||
| 47 | + * | ||
| 48 | + */ | ||
| 49 | + @Column(name = "CREATE_TIME") | ||
| 50 | + private String createTime; | ||
| 51 | + | ||
| 52 | + | ||
| 53 | + /** | ||
| 54 | + * 代码 | ||
| 55 | + */ | ||
| 56 | + @Column(name = "P_CODE") | ||
| 57 | + private String pcCode; | ||
| 58 | + | ||
| 59 | + | ||
| 60 | + /** | ||
| 61 | + * 英文名称 | ||
| 62 | + */ | ||
| 63 | + @Column(name = "PORT_ENG_NAME") | ||
| 64 | + private String portEngName; | ||
| 65 | + | ||
| 66 | +} |
| 1 | +package com.erry.iclear.dateInterface.entity; | ||
| 2 | + | ||
| 3 | + | ||
| 4 | +import com.erry.iclear.dateInterface.api.request.MawbDetail; | ||
| 5 | +import com.fasterxml.jackson.annotation.JsonIgnore; | ||
| 6 | +import lombok.Data; | ||
| 7 | +import org.springframework.format.annotation.DateTimeFormat; | ||
| 8 | + | ||
| 9 | +import javax.persistence.*; | ||
| 10 | +import java.io.Serializable; | ||
| 11 | +import java.math.BigDecimal; | ||
| 12 | +import java.util.Date; | ||
| 13 | +import java.util.List; | ||
| 14 | + | ||
| 15 | +/** | ||
| 16 | + * 运单表 | ||
| 17 | + * Created by Erry 2019/5/30. | ||
| 18 | + * @author Administrator | ||
| 19 | + */ | ||
| 20 | +@Entity | ||
| 21 | +@Table(name = "T_CHM_CONSIGNMENT") | ||
| 22 | +@Data | ||
| 23 | +public class ChmConsignment implements Serializable { | ||
| 24 | + | ||
| 25 | + private static final long serialVersionUID = 2693103610036977383L; | ||
| 26 | + | ||
| 27 | + /** | ||
| 28 | + * 运单表ID,自动增加 | ||
| 29 | + */ | ||
| 30 | + @Id | ||
| 31 | + @GeneratedValue | ||
| 32 | + @Column(name = "ID") | ||
| 33 | + private Long id; | ||
| 34 | + | ||
| 35 | + /** | ||
| 36 | + * 报关单类型ID | ||
| 37 | + */ | ||
| 38 | + @JsonIgnore | ||
| 39 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 40 | + @JoinColumn(name = "DECLARED_DOC_TYPE_ID") | ||
| 41 | + private DictionaryEntries declaredDocTypeDic; | ||
| 42 | + | ||
| 43 | + /** | ||
| 44 | + * 报关单类型 | ||
| 45 | + */ | ||
| 46 | + @Column(name = "DECLARED_DOC_TYPE") | ||
| 47 | + private String declaredDocType; | ||
| 48 | + | ||
| 49 | + | ||
| 50 | + | ||
| 51 | + /** | ||
| 52 | + * 申报单位 | ||
| 53 | + */ | ||
| 54 | + @Column(name = "DECLARED_UNIT_NAME") | ||
| 55 | + private String declaredUnitName; | ||
| 56 | + | ||
| 57 | + | ||
| 58 | + /** | ||
| 59 | + * 合同协议号 | ||
| 60 | + */ | ||
| 61 | + @Column(name = "CONTRACT_CODE") | ||
| 62 | + private String contractCode; | ||
| 63 | + | ||
| 64 | + | ||
| 65 | + | ||
| 66 | + /** | ||
| 67 | + * 征免性质ID | ||
| 68 | + */ | ||
| 69 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 70 | + @JoinColumn(name = "TAX_NATURE_ID") | ||
| 71 | + private DictionaryEntries taxNatureDic; | ||
| 72 | + | ||
| 73 | + /** | ||
| 74 | + * 征免性质 | ||
| 75 | + */ | ||
| 76 | + @Column(name = "TAX_NATURE") | ||
| 77 | + private String taxNature; | ||
| 78 | + | ||
| 79 | + | ||
| 80 | + | ||
| 81 | + | ||
| 82 | + /** | ||
| 83 | + * 指运港ID | ||
| 84 | + */ | ||
| 85 | + @ManyToOne(targetEntity = ChmCarryPort.class) | ||
| 86 | + @JoinColumn(name = "THROUGH_STOP_PORT_ID") | ||
| 87 | + private ChmCarryPort throughStopPortDic; | ||
| 88 | + | ||
| 89 | + /** | ||
| 90 | + * 指运港 | ||
| 91 | + */ | ||
| 92 | + @Column(name = "THROUGH_STOP_PORT") | ||
| 93 | + private String throughStopPort; | ||
| 94 | + | ||
| 95 | + /** | ||
| 96 | + * 运费(币制)ID | ||
| 97 | + */ | ||
| 98 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 99 | + @JoinColumn(name = "TRANS_CURRENCY_ID") | ||
| 100 | + private DictionaryEntries transCurrencyDic; | ||
| 101 | + | ||
| 102 | + /** | ||
| 103 | + * 运费(币制) | ||
| 104 | + */ | ||
| 105 | + @Column(name = "TRANS_CURRENCY") | ||
| 106 | + private String transCurrency; | ||
| 107 | + | ||
| 108 | + /** | ||
| 109 | + * 运费 | ||
| 110 | + */ | ||
| 111 | + @Column(name = "TRANS_COST") | ||
| 112 | + private BigDecimal transCost; | ||
| 113 | + | ||
| 114 | + | ||
| 115 | + /** | ||
| 116 | + * 毛重(公斤) | ||
| 117 | + */ | ||
| 118 | + @Column(name = "GROSS_WEIGHT") | ||
| 119 | + private BigDecimal grossWeight; | ||
| 120 | + | ||
| 121 | + | ||
| 122 | + /** | ||
| 123 | + * 保费 | ||
| 124 | + */ | ||
| 125 | + @Column(name = "INSURANCE_COST") | ||
| 126 | + private BigDecimal insuranceCost; | ||
| 127 | + | ||
| 128 | + /** | ||
| 129 | + * 保费(币制)ID | ||
| 130 | + */ | ||
| 131 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 132 | + @JoinColumn(name = "INSURANCE_CURRENCY_ID") | ||
| 133 | + private DictionaryEntries insuranceCostCurrencyDic; | ||
| 134 | + | ||
| 135 | + /** | ||
| 136 | + * 保费(币制) | ||
| 137 | + */ | ||
| 138 | + @Column(name = "INSURANCE_CURRENCY") | ||
| 139 | + private String insuranceCostCurrency; | ||
| 140 | + | ||
| 141 | + | ||
| 142 | + /** | ||
| 143 | + * 备案号 | ||
| 144 | + */ | ||
| 145 | + @Column(name = "RECORD_CODE") | ||
| 146 | + private String recordCode; | ||
| 147 | + | ||
| 148 | + | ||
| 149 | + | ||
| 150 | + /** | ||
| 151 | + * 净重(公斤) | ||
| 152 | + */ | ||
| 153 | + @Column(name = "NET_WEIGHT") | ||
| 154 | + private BigDecimal netWeight; | ||
| 155 | + | ||
| 156 | + | ||
| 157 | + /** | ||
| 158 | + * 杂费 | ||
| 159 | + */ | ||
| 160 | + @Column(name = "OTHER_COST") | ||
| 161 | + private BigDecimal otherCost; | ||
| 162 | + | ||
| 163 | + /** | ||
| 164 | + * 杂费(币制)ID | ||
| 165 | + */ | ||
| 166 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 167 | + @JoinColumn(name = "OTHER_CURRENCY_ID") | ||
| 168 | + private DictionaryEntries otherCurrencyDic; | ||
| 169 | + | ||
| 170 | + /** | ||
| 171 | + * 杂费(币制) | ||
| 172 | + */ | ||
| 173 | + @Column(name = "OTHER_CURRENCY") | ||
| 174 | + private String otherCurrency; | ||
| 175 | + | ||
| 176 | + | ||
| 177 | + /** | ||
| 178 | + * 件数 | ||
| 179 | + */ | ||
| 180 | + @Column(name = "COUNTS") | ||
| 181 | + private Long counts; | ||
| 182 | + | ||
| 183 | + | ||
| 184 | + /** | ||
| 185 | + * 预录入编号 | ||
| 186 | + */ | ||
| 187 | + @Column(name = "ENTERING_NO") | ||
| 188 | + private String enteringNo; | ||
| 189 | + | ||
| 190 | + | ||
| 191 | + | ||
| 192 | + | ||
| 193 | + /** | ||
| 194 | + * 监管方式ID | ||
| 195 | + */ | ||
| 196 | +// @JsonIgnore | ||
| 197 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 198 | + @JoinColumn(name = "TRADE_MODE_ID") | ||
| 199 | + private DictionaryEntries tradeModeDic; | ||
| 200 | + | ||
| 201 | + /** | ||
| 202 | + * 监管方式 | ||
| 203 | + */ | ||
| 204 | + @Column(name = "TRADE_MODE") | ||
| 205 | + private String tradeMode; | ||
| 206 | + | ||
| 207 | + | ||
| 208 | + | ||
| 209 | + /** | ||
| 210 | + * 境内发货人编码 | ||
| 211 | + */ | ||
| 212 | + @Column(name = "TRADE_CO_SCC") | ||
| 213 | + private String tradeCoSCC; | ||
| 214 | + | ||
| 215 | + /** | ||
| 216 | + * 境内发货人(经营单位编码) | ||
| 217 | + */ | ||
| 218 | + @Column(name = "OPERATE_UNIT_CODE") | ||
| 219 | + private String operateUnitCode; | ||
| 220 | + | ||
| 221 | + /** | ||
| 222 | + * 境内发货人(经营单位名称) | ||
| 223 | + */ | ||
| 224 | + @Column(name = "OPERATE_UNIT_NAME") | ||
| 225 | + private String operateUnitName; | ||
| 226 | + | ||
| 227 | + /** | ||
| 228 | + * 运输方式ID | ||
| 229 | + */ | ||
| 230 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 231 | + @JoinColumn(name = "VEHICLE_WAY_ID") | ||
| 232 | + private DictionaryEntries vehicleWay; | ||
| 233 | + | ||
| 234 | + /** | ||
| 235 | + * 运输方式 | ||
| 236 | + */ | ||
| 237 | + @Column(name = "VEHICLE_WAY_CODE") | ||
| 238 | + private String vehicleWayCode; | ||
| 239 | + | ||
| 240 | + /** | ||
| 241 | + * 成交方式ID | ||
| 242 | + */ | ||
| 243 | +// @JsonIgnore | ||
| 244 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 245 | + @JoinColumn(name = "DEAL_MODE_ID") | ||
| 246 | + private DictionaryEntries dealModeDic; | ||
| 247 | + | ||
| 248 | + /** | ||
| 249 | + * 成交方式 | ||
| 250 | + */ | ||
| 251 | + @Column(name = "DEAL_MODE") | ||
| 252 | + private String dealMode; | ||
| 253 | + | ||
| 254 | + | ||
| 255 | + /** | ||
| 256 | + * 包装种类ID | ||
| 257 | + */ | ||
| 258 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 259 | + @JoinColumn(name = "PACKAGE_TYPE_ID") | ||
| 260 | + private DictionaryEntries packageTypeDic; | ||
| 261 | + | ||
| 262 | + /** | ||
| 263 | + * 包装种类 | ||
| 264 | + */ | ||
| 265 | + @Column(name = "PACKAGE_TYPE") | ||
| 266 | + private String packageType; | ||
| 267 | + | ||
| 268 | + | ||
| 269 | + | ||
| 270 | + | ||
| 271 | + /** | ||
| 272 | + * 报关形式类型ID | ||
| 273 | + */ | ||
| 274 | + @JsonIgnore | ||
| 275 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 276 | + @JoinColumn(name = "DECLARED_FORM_TYPE_ID") | ||
| 277 | + private DictionaryEntries declaredFromTypeDic; | ||
| 278 | + | ||
| 279 | + /** | ||
| 280 | + * 报关形式类型 | ||
| 281 | + */ | ||
| 282 | + @Column(name = "DECLARED_FORM_TYPE") | ||
| 283 | + private String declaredFromType; | ||
| 284 | + | ||
| 285 | + | ||
| 286 | + /** | ||
| 287 | + * 生产核销单位编码 | ||
| 288 | + */ | ||
| 289 | + @Column(name = "OWNER_CODE_SCC") | ||
| 290 | + private String ownerCodeScc; | ||
| 291 | + | ||
| 292 | + /** | ||
| 293 | + * 贸易国(地区)ID | ||
| 294 | + */ | ||
| 295 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 296 | + @JoinColumn(name = "TRADE_AREA_CODE_ID") | ||
| 297 | + private DictionaryEntries tradeAreaCodeDic; | ||
| 298 | + | ||
| 299 | + /** | ||
| 300 | + * 贸易国(地区) | ||
| 301 | + */ | ||
| 302 | + @Column(name = "TRADE_AREA_CODE") | ||
| 303 | + private String tradeAreaCode; | ||
| 304 | + | ||
| 305 | + | ||
| 306 | + | ||
| 307 | + | ||
| 308 | + | ||
| 309 | + | ||
| 310 | + | ||
| 311 | + | ||
| 312 | + | ||
| 313 | + | ||
| 314 | + | ||
| 315 | + | ||
| 316 | + | ||
| 317 | + | ||
| 318 | + | ||
| 319 | + | ||
| 320 | + | ||
| 321 | + | ||
| 322 | + | ||
| 323 | + | ||
| 324 | + | ||
| 325 | +//------------------------------------------------------------------------------------ | ||
| 326 | + | ||
| 327 | + | ||
| 328 | + | ||
| 329 | + /** | ||
| 330 | + * 出境口岸ID | ||
| 331 | + */ | ||
| 332 | +// @JsonIgnore | ||
| 333 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 334 | + @JoinColumn(name = "EXIT_PORT_ID") | ||
| 335 | + private DictionaryEntries exitPortDic; | ||
| 336 | + | ||
| 337 | + //author : wy on 2021/01/12 新增“fedEx账户” | ||
| 338 | + @Column(name = "FEDEXACCOUNT") | ||
| 339 | + private String fedExAccount; | ||
| 340 | + /** | ||
| 341 | + * 出境口岸 | ||
| 342 | + */ | ||
| 343 | +// @Pattern(regexp = "[A-Z][a-z][0-9]") | ||
| 344 | +// private String passWord; | ||
| 345 | + @Column(name = "EXIT_PORT") | ||
| 346 | + private String exitPort; | ||
| 347 | + | ||
| 348 | + /** | ||
| 349 | + * 出境关别代码 | ||
| 350 | + */ | ||
| 351 | + @Column(name = "EXIT_CUS_CODE") | ||
| 352 | + private String exitCusCode; | ||
| 353 | + | ||
| 354 | + /** | ||
| 355 | + * 出境关别ID | ||
| 356 | + */ | ||
| 357 | +// @JsonIgnore | ||
| 358 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 359 | + @JoinColumn(name = "EXIT_CUS_ID") | ||
| 360 | + private DictionaryEntries exitCusDic; | ||
| 361 | + | ||
| 362 | + /** | ||
| 363 | + * 出境关别 | ||
| 364 | + */ | ||
| 365 | + @Column(name = "EXIT_CUS") | ||
| 366 | + private String exitCus; | ||
| 367 | + | ||
| 368 | + | ||
| 369 | + | ||
| 370 | + /** | ||
| 371 | + * 海关编号 | ||
| 372 | + */ | ||
| 373 | + @Column(name = "CUSTOMS_NO") | ||
| 374 | + private String customsNo; | ||
| 375 | + | ||
| 376 | + | ||
| 377 | + | ||
| 378 | + /** | ||
| 379 | + * 出口日期 | ||
| 380 | + */ | ||
| 381 | + @Column(name = "IMPORT_DATE") | ||
| 382 | + private Date importDate; | ||
| 383 | + | ||
| 384 | + /** | ||
| 385 | + * 申报日期 | ||
| 386 | + */ | ||
| 387 | + @Column(name = "CUSTOMS_DATE") | ||
| 388 | + private Date customsDate; | ||
| 389 | + | ||
| 390 | + | ||
| 391 | + | ||
| 392 | + /** | ||
| 393 | + * 生产核销位海关编码 | ||
| 394 | + */ | ||
| 395 | + @Column(name = "OWNER_CODE") | ||
| 396 | + private String ownerCode; | ||
| 397 | + | ||
| 398 | + /** | ||
| 399 | + * 生产核销单位 | ||
| 400 | + */ | ||
| 401 | + @Column(name = "OWNER_NAME") | ||
| 402 | + private String ownerName; | ||
| 403 | + | ||
| 404 | + | ||
| 405 | + | ||
| 406 | + /** | ||
| 407 | + * 运单号 | ||
| 408 | + */ | ||
| 409 | + @Column(name = "CONSIGNMENT_CODE") | ||
| 410 | + private String consignmentCode; | ||
| 411 | + | ||
| 412 | + /** | ||
| 413 | + * 总运单号 | ||
| 414 | + */ | ||
| 415 | + @Column(name = "CONSIGNMENT_HEAD_CODE") | ||
| 416 | + private String consignmentHeadCode; | ||
| 417 | + | ||
| 418 | + | ||
| 419 | + | ||
| 420 | + | ||
| 421 | + | ||
| 422 | + | ||
| 423 | + | ||
| 424 | + | ||
| 425 | + | ||
| 426 | + | ||
| 427 | + | ||
| 428 | + /** | ||
| 429 | + * 报关转关类型ID | ||
| 430 | + */ | ||
| 431 | + @JsonIgnore | ||
| 432 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 433 | + @JoinColumn(name = "DECLARED_TYPE_ID") | ||
| 434 | + private DictionaryEntries declaredTypeDic; | ||
| 435 | + | ||
| 436 | + /** | ||
| 437 | + * 报关转关类型 | ||
| 438 | + */ | ||
| 439 | + @Column(name = "DECLARED_TYPE") | ||
| 440 | + private String declaredType; | ||
| 441 | + | ||
| 442 | + | ||
| 443 | + | ||
| 444 | + /** | ||
| 445 | + * 许可证号 | ||
| 446 | + */ | ||
| 447 | + @Column(name = "LICENSE_CODE") | ||
| 448 | + private String licenseCode; | ||
| 449 | + | ||
| 450 | + /** | ||
| 451 | + * 抵运国(地区)ID | ||
| 452 | + */ | ||
| 453 | +// @JsonIgnore | ||
| 454 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 455 | + @JoinColumn(name = "FROM_COUNTRY_ID") | ||
| 456 | + private DictionaryEntries fromCountryDic; | ||
| 457 | + | ||
| 458 | + /** | ||
| 459 | + * 抵运国(地区) | ||
| 460 | + */ | ||
| 461 | + @Column(name = "FROM_COUNTRY") | ||
| 462 | + private String fromCountry; | ||
| 463 | + | ||
| 464 | + | ||
| 465 | + | ||
| 466 | + | ||
| 467 | + | ||
| 468 | + | ||
| 469 | + | ||
| 470 | + | ||
| 471 | + | ||
| 472 | + | ||
| 473 | + | ||
| 474 | + | ||
| 475 | + | ||
| 476 | + /** | ||
| 477 | + * 随附单据及编号 | ||
| 478 | + */ | ||
| 479 | + @Column(name = "SLIP") | ||
| 480 | + private String slip; | ||
| 481 | + | ||
| 482 | + /** | ||
| 483 | + * 特殊关系确认 | ||
| 484 | + */ | ||
| 485 | + @Column(name = "PROMISE_ITMES1") | ||
| 486 | + private String promiseItmes1; | ||
| 487 | + ; | ||
| 488 | + | ||
| 489 | + /** | ||
| 490 | + * 价格影响确认 | ||
| 491 | + */ | ||
| 492 | + @Column(name = "PROMISE_ITMES2") | ||
| 493 | + private String promiseItmes2; | ||
| 494 | + | ||
| 495 | + /** | ||
| 496 | + * 支付特许权使用费确认 | ||
| 497 | + */ | ||
| 498 | + @Column(name = "PROMISE_ITMES3") | ||
| 499 | + private String promiseItmes3; | ||
| 500 | + | ||
| 501 | + | ||
| 502 | + | ||
| 503 | + /** | ||
| 504 | + * 境外收货人 | ||
| 505 | + */ | ||
| 506 | + @Column(name = "OVERSEAS_CONSIGNOR_FN_CNAME") | ||
| 507 | + private String overseasConsignorFnCname; | ||
| 508 | + | ||
| 509 | + /** | ||
| 510 | + * 境外收货人编码 | ||
| 511 | + */ | ||
| 512 | + @Column(name = "OVERSEAS_CONSIGNOR_CODE") | ||
| 513 | + private String overseasConsignorCode; | ||
| 514 | + | ||
| 515 | + /** | ||
| 516 | + * 运输工具名称及航次号 | ||
| 517 | + */ | ||
| 518 | + @Column(name = "FLIGHT_CLASS_NO") | ||
| 519 | + private String flightClassNo; | ||
| 520 | + | ||
| 521 | + /** | ||
| 522 | + * 标记唛码及备注 (标记唛码) | ||
| 523 | + */ | ||
| 524 | + @Column(name = "DECLARED_REMARK") | ||
| 525 | + private String declaredRemark; | ||
| 526 | + | ||
| 527 | + /** | ||
| 528 | + * 标记唛码及备注 (备注) | ||
| 529 | + */ | ||
| 530 | + @Column(name = "REMARK_MARK") | ||
| 531 | + private String remarkMark; | ||
| 532 | + | ||
| 533 | + /** | ||
| 534 | + * 报关员证号 | ||
| 535 | + */ | ||
| 536 | + @Column(name = "DECLARED_CODE") | ||
| 537 | + private String declaredCode; | ||
| 538 | + | ||
| 539 | + | ||
| 540 | + | ||
| 541 | + /** | ||
| 542 | + * 电话 | ||
| 543 | + */ | ||
| 544 | + @Column(name = "TELEPHONE") | ||
| 545 | + private String telephone; | ||
| 546 | + | ||
| 547 | + /** | ||
| 548 | + * 运单类型ID | ||
| 549 | + */ | ||
| 550 | +// @JsonIgnore | ||
| 551 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 552 | + @JoinColumn(name = "CONS_TYPE_ID") | ||
| 553 | + private DictionaryEntries consTypeDic; | ||
| 554 | + | ||
| 555 | + /** | ||
| 556 | + * 运单类型 | ||
| 557 | + */ | ||
| 558 | + @Column(name = "CONS_TYPE") | ||
| 559 | + private String consType; | ||
| 560 | + | ||
| 561 | + /** | ||
| 562 | + * 发件人姓名 | ||
| 563 | + */ | ||
| 564 | + @Column(name = "SENDER") | ||
| 565 | + private String sender; | ||
| 566 | + | ||
| 567 | + /** | ||
| 568 | + * 企业代码 | ||
| 569 | + */ | ||
| 570 | + @Column(name = "ENTERPRISE_CODE") | ||
| 571 | + private String enterpriseCode; | ||
| 572 | + | ||
| 573 | + /** | ||
| 574 | + * 纳税单位 | ||
| 575 | + */ | ||
| 576 | + @Column(name = "TAX_UNIT") | ||
| 577 | + private String taxUnit; | ||
| 578 | + | ||
| 579 | + /** | ||
| 580 | + * 运单图片打印状态ID | ||
| 581 | + */ | ||
| 582 | + @JsonIgnore | ||
| 583 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 584 | + @JoinColumn(name = "PRINT_STATUS_ID") | ||
| 585 | + private DictionaryEntries printStatusDic; | ||
| 586 | + | ||
| 587 | + /** | ||
| 588 | + * 运单图片打印状态 | ||
| 589 | + */ | ||
| 590 | + @Column(name = "PRINT_STATUS") | ||
| 591 | + private String printStatus; | ||
| 592 | + | ||
| 593 | + /** | ||
| 594 | + * 委托书是否盖章ID | ||
| 595 | + */ | ||
| 596 | + @JsonIgnore | ||
| 597 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 598 | + @JoinColumn(name = "IS_STAMP_ID") | ||
| 599 | + private DictionaryEntries stampDic; | ||
| 600 | + | ||
| 601 | + /** | ||
| 602 | + * 委托书是否盖章 | ||
| 603 | + */ | ||
| 604 | + @Column(name = "IS_STAMP") | ||
| 605 | + private String stamp; | ||
| 606 | + | ||
| 607 | + /** | ||
| 608 | + * 上传文件状态ID | ||
| 609 | + */ | ||
| 610 | + @JsonIgnore | ||
| 611 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 612 | + @JoinColumn(name = "UP_FILE_STATUS_ID") | ||
| 613 | + private DictionaryEntries upFileStatusDic; | ||
| 614 | + | ||
| 615 | + | ||
| 616 | + /** | ||
| 617 | + * 上传文件状态 | ||
| 618 | + */ | ||
| 619 | + @Column(name = "UP_FILE_STATUS") | ||
| 620 | + private String upFileStatus; | ||
| 621 | + | ||
| 622 | + /** | ||
| 623 | + * 上传文件时间 | ||
| 624 | + */ | ||
| 625 | + @Column(name = "UP_FILE_TIME") | ||
| 626 | + private Date upFileTime; | ||
| 627 | + | ||
| 628 | + /** | ||
| 629 | + * 上传文件人员ID | ||
| 630 | + */ | ||
| 631 | +// @JsonIgnore | ||
| 632 | +// @ManyToOne(targetEntity = SysUser.class) | ||
| 633 | +// @JoinColumn(name = "UP_FILE_USER_ID") | ||
| 634 | +// private SysUser upFileUserDic; | ||
| 635 | + | ||
| 636 | + /** | ||
| 637 | + * 上传文件人员 | ||
| 638 | + */ | ||
| 639 | + @Column(name = "UP_FILE_USER") | ||
| 640 | + private String upFileUser; | ||
| 641 | + | ||
| 642 | + /** | ||
| 643 | + * 图片任务状态ID | ||
| 644 | + */ | ||
| 645 | + @JsonIgnore | ||
| 646 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 647 | + @JoinColumn(name = "TASK_STATUS_ID") | ||
| 648 | + private DictionaryEntries taskStatusDic; | ||
| 649 | + | ||
| 650 | + /** | ||
| 651 | + * 图片任务状态 | ||
| 652 | + */ | ||
| 653 | + @Column(name = "TASK_STATUS") | ||
| 654 | + private String taskStatus; | ||
| 655 | + | ||
| 656 | + /** | ||
| 657 | + * 图片合成时间 | ||
| 658 | + */ | ||
| 659 | + @Column(name = "PDF_TIME") | ||
| 660 | + private Date pdfTime; | ||
| 661 | + | ||
| 662 | + /** | ||
| 663 | + * 海关帐号 | ||
| 664 | + */ | ||
| 665 | + @JsonIgnore | ||
| 666 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 667 | + @JoinColumn(name = "PRINT_NO_ID") | ||
| 668 | + private DictionaryEntries printNoDic; | ||
| 669 | + | ||
| 670 | + /** | ||
| 671 | + * 海关帐号 | ||
| 672 | + */ | ||
| 673 | + @Column(name = "PRINT_NO") | ||
| 674 | + private String printNo; | ||
| 675 | + | ||
| 676 | + /** | ||
| 677 | + * 海关帐号 变更记录 | ||
| 678 | + */ | ||
| 679 | + @Column(name = "PRINT_NO_MSG") | ||
| 680 | + private String printNoMsg; | ||
| 681 | + | ||
| 682 | + /** | ||
| 683 | + * 最后一次打印时间 | ||
| 684 | + */ | ||
| 685 | + @Column(name = "PRINT_TIME") | ||
| 686 | + private Date printTime; | ||
| 687 | + | ||
| 688 | + /** | ||
| 689 | + * 运单创建时间 | ||
| 690 | + */ | ||
| 691 | + @Column(name = "CREATE_TIME") | ||
| 692 | + private Date createTime; | ||
| 693 | + | ||
| 694 | + /** | ||
| 695 | + * 运单创建人ID | ||
| 696 | + */ | ||
| 697 | +// @JsonIgnore | ||
| 698 | +// @ManyToOne(targetEntity = SysUser.class) | ||
| 699 | +// @JoinColumn(name = "CREATOR_ID") | ||
| 700 | +// private SysUser creatorId; | ||
| 701 | + | ||
| 702 | + /** | ||
| 703 | + * 运单创建人 | ||
| 704 | + */ | ||
| 705 | + @Column(name = "CREATOR") | ||
| 706 | + private String creator; | ||
| 707 | + | ||
| 708 | + /** | ||
| 709 | + * 运单更新时间 | ||
| 710 | + */ | ||
| 711 | + @Column(name = "UPDATE_TIME") | ||
| 712 | + private Date updateTime; | ||
| 713 | + | ||
| 714 | + /** | ||
| 715 | + * 运单更新人ID | ||
| 716 | + */ | ||
| 717 | +// @JsonIgnore | ||
| 718 | +// @ManyToOne(targetEntity = SysUser.class) | ||
| 719 | +// @JoinColumn(name = "UPDATE_USER_ID") | ||
| 720 | +// private SysUser updateUser; | ||
| 721 | + | ||
| 722 | + /** | ||
| 723 | + * 运单更新人 | ||
| 724 | + */ | ||
| 725 | + @Column(name = "UPDATE_USER") | ||
| 726 | + private String updateUserName; | ||
| 727 | + | ||
| 728 | + /** | ||
| 729 | + * 运单状态ID | ||
| 730 | + */ | ||
| 731 | + @JsonIgnore | ||
| 732 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 733 | + @JoinColumn(name = "CONS_STATUS_ID") | ||
| 734 | + private DictionaryEntries consStatusDic; | ||
| 735 | + | ||
| 736 | + /** | ||
| 737 | + * 运单状态 | ||
| 738 | + */ | ||
| 739 | + @Column(name = "CONS_STATUS") | ||
| 740 | + private String consStatus; | ||
| 741 | + | ||
| 742 | + /** | ||
| 743 | + * OSPR状态ID | ||
| 744 | + */ | ||
| 745 | + @JsonIgnore | ||
| 746 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 747 | + @JoinColumn(name = "OSPR_STATUS_ID") | ||
| 748 | + private DictionaryEntries osprStatusDic; | ||
| 749 | + | ||
| 750 | + /** | ||
| 751 | + * OSPR状态 | ||
| 752 | + */ | ||
| 753 | + @Column(name = "OSPR_STATUS") | ||
| 754 | + private String osprStatus; | ||
| 755 | + | ||
| 756 | + /** | ||
| 757 | + * 申报口岸 | ||
| 758 | + */ | ||
| 759 | + @Column(name = "DECLARED_PORT") | ||
| 760 | + private String declaredPort; | ||
| 761 | + | ||
| 762 | + /** | ||
| 763 | + * 站点 | ||
| 764 | + */ | ||
| 765 | +// @JsonIgnore | ||
| 766 | +// @ManyToOne(targetEntity = Organization.class) | ||
| 767 | +// @JoinColumn(name = "STATION_ID") | ||
| 768 | +// private Organization station; | ||
| 769 | + | ||
| 770 | + /** | ||
| 771 | + * 站点名称 | ||
| 772 | + */ | ||
| 773 | + @Column(name = "STATION_NAME") | ||
| 774 | + private String stationName; | ||
| 775 | + | ||
| 776 | + /** | ||
| 777 | + * 口岸 | ||
| 778 | + */ | ||
| 779 | + @JsonIgnore | ||
| 780 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 781 | + @JoinColumn(name = "PORT_ID") | ||
| 782 | + private DictionaryEntries port; | ||
| 783 | + | ||
| 784 | + /** | ||
| 785 | + * 口岸名称 | ||
| 786 | + */ | ||
| 787 | + @Column(name = "PORT_NAME") | ||
| 788 | + private String portName; | ||
| 789 | + | ||
| 790 | + /** | ||
| 791 | + * 航班日期 | ||
| 792 | + */ | ||
| 793 | + @DateTimeFormat(pattern = "yyy-MM-dd") | ||
| 794 | + @Column(name = "FLIIGHT_DATE") | ||
| 795 | + private Date flightDate; | ||
| 796 | + | ||
| 797 | + /** | ||
| 798 | + * 航班号 | ||
| 799 | + */ | ||
| 800 | + @Column(name = "FLIIGHT_NO") | ||
| 801 | + private String flightNo; | ||
| 802 | + | ||
| 803 | + /** | ||
| 804 | + * 航线 | ||
| 805 | + */ | ||
| 806 | + @Column(name = "ROUTE") | ||
| 807 | + private String route; | ||
| 808 | + | ||
| 809 | + /** | ||
| 810 | + * 速递员 | ||
| 811 | + */ | ||
| 812 | + @Column(name = "COURIER") | ||
| 813 | + private String courier; | ||
| 814 | + | ||
| 815 | + /** | ||
| 816 | + * 备注 | ||
| 817 | + */ | ||
| 818 | + @Column(name = "REMARK") | ||
| 819 | + private String remark; | ||
| 820 | + | ||
| 821 | + /** | ||
| 822 | + * 是否启用报关单 | ||
| 823 | + */ | ||
| 824 | + @Column(name = "ENABLE_DECLARATION") | ||
| 825 | + private String enableDeclaration; | ||
| 826 | + | ||
| 827 | + /** | ||
| 828 | + * 图片是否已上传 | ||
| 829 | + */ | ||
| 830 | + @Column(name = "PIC_UPLOADED") | ||
| 831 | + private Boolean picUploaded; | ||
| 832 | + | ||
| 833 | + /** | ||
| 834 | + * 图片最后上传时间 | ||
| 835 | + */ | ||
| 836 | + @Column(name = "PIC_UPLOAD_TIME") | ||
| 837 | + private Date picUploadTime; | ||
| 838 | + | ||
| 839 | + /** | ||
| 840 | + * 图片最后上传人 | ||
| 841 | + */ | ||
| 842 | +// @JsonIgnore | ||
| 843 | +// @ManyToOne(targetEntity = SysUser.class) | ||
| 844 | +// @JoinColumn(name = "PIC_UPLOAD_USER_ID") | ||
| 845 | +// private SysUser picUploadUser; | ||
| 846 | + | ||
| 847 | + /** | ||
| 848 | + * 创建渠道 | ||
| 849 | + */ | ||
| 850 | + @Column(name = "CREATING_CHANNELS") | ||
| 851 | + private String creatingChannels; | ||
| 852 | + | ||
| 853 | + /** | ||
| 854 | + * 货品名称 | ||
| 855 | + */ | ||
| 856 | + @Column(name = "SKUNAME") | ||
| 857 | + private String skuName; | ||
| 858 | + | ||
| 859 | + | ||
| 860 | + /** | ||
| 861 | + * 是否导出 | ||
| 862 | + */ | ||
| 863 | + @Column(name = "IS_EXPORT") | ||
| 864 | + private String export; | ||
| 865 | + | ||
| 866 | + /** | ||
| 867 | + * 联系人 | ||
| 868 | + */ | ||
| 869 | + @Column(name = "CONTACTS") | ||
| 870 | + private String contacts; | ||
| 871 | + | ||
| 872 | + /** | ||
| 873 | + * 联系方式 | ||
| 874 | + */ | ||
| 875 | + @Column(name = "CONTACT_INFORMATION") | ||
| 876 | + private String contactInformation; | ||
| 877 | + | ||
| 878 | + /** | ||
| 879 | + * 取件城市 | ||
| 880 | + * author: wy on 2021/01/26 新增字段 | ||
| 881 | + */ | ||
| 882 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 883 | + @JoinColumn(name = "PICKUP_CITY") | ||
| 884 | + private DictionaryEntries pickUpCity; | ||
| 885 | + | ||
| 886 | + /** | ||
| 887 | + * 取件城市名称 | ||
| 888 | + */ | ||
| 889 | + @Column(name = "PICKUPCITY_NAME") | ||
| 890 | + private String pickUpCityName; | ||
| 891 | + /** | ||
| 892 | + * 反填标志(DM002是否反填,航班号,航班日期) | ||
| 893 | + * author: wy on 2021/02/03 | ||
| 894 | + */ | ||
| 895 | + @Column(name = "ISRETURNDATA") | ||
| 896 | + private Boolean isReturnData; | ||
| 897 | + | ||
| 898 | + | ||
| 899 | + /** | ||
| 900 | + * 审批备注(审批不通过) | ||
| 901 | + */ | ||
| 902 | + @Column(name = "REJECT_REMARK") | ||
| 903 | + private String rejectRemark; | ||
| 904 | + | ||
| 905 | + /** | ||
| 906 | + * 是否需要站点协助 站点协助(审批不通过) | ||
| 907 | + */ | ||
| 908 | + @JsonIgnore | ||
| 909 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 910 | + @JoinColumn(name = "SITE_ASSISTANCE_ID") | ||
| 911 | + private DictionaryEntries siteAssistanceDic; | ||
| 912 | + | ||
| 913 | + /** | ||
| 914 | + * 取件日期 | ||
| 915 | + */ | ||
| 916 | + @Column(name = "PICK_UP_DATE") | ||
| 917 | + private Date pickUpDate; | ||
| 918 | + | ||
| 919 | + /** | ||
| 920 | + * 海关回执 | ||
| 921 | + */ | ||
| 922 | + @Column(name = "CUSTOMS_RECEIPT") | ||
| 923 | + private String customsReceipt; | ||
| 924 | + | ||
| 925 | + /** | ||
| 926 | + * 海关回执时间 | ||
| 927 | + */ | ||
| 928 | + @Column(name = "CUSTOMS_RECEIPT_TIME") | ||
| 929 | + private Date customsReceiptTime; | ||
| 930 | + | ||
| 931 | + /** | ||
| 932 | + * remark运单备注信息 | ||
| 933 | + */ | ||
| 934 | + @Column(name = "DM_REMARK") | ||
| 935 | + private String dmRemark; | ||
| 936 | + | ||
| 937 | + /** | ||
| 938 | + * 扫描代码ID | ||
| 939 | + */ | ||
| 940 | + @JsonIgnore | ||
| 941 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 942 | + @JoinColumn(name = "SCAN_CODE_ID") | ||
| 943 | + private DictionaryEntries scanCodeDic; | ||
| 944 | + | ||
| 945 | + /** | ||
| 946 | + * 扫描代码 | ||
| 947 | + */ | ||
| 948 | + @Column(name = "SCAN_CODE") | ||
| 949 | + private String scanCode; | ||
| 950 | + | ||
| 951 | + /** | ||
| 952 | + * 扫描状态日期 | ||
| 953 | + */ | ||
| 954 | + @Column(name = "SCAN_STATUS_TIME") | ||
| 955 | + private Date scanStatusTime; | ||
| 956 | + | ||
| 957 | + /** | ||
| 958 | + * 是否PPE | ||
| 959 | + */ | ||
| 960 | + @Column(name = "IS_PPE") | ||
| 961 | + private String ppe; | ||
| 962 | + | ||
| 963 | + | ||
| 964 | + /** | ||
| 965 | + * 运单录入的类型 | ||
| 966 | + */ | ||
| 967 | + @Column(name = "CHMCONSIGMENT_TYPE") | ||
| 968 | + private String chmConsigmentType; | ||
| 969 | + | ||
| 970 | + /** | ||
| 971 | + * 是否是同一批批量导入的运单 | ||
| 972 | + */ | ||
| 973 | + @Column(name = "IS_BATCH_IMPORT") | ||
| 974 | + private String isBatchimport; | ||
| 975 | + | ||
| 976 | + | ||
| 977 | + @OneToMany(cascade = CascadeType.PERSIST) | ||
| 978 | + @JoinColumn(name = "CONSIGNMENT_ID") | ||
| 979 | + private List<ChmConsignmentDetail> chmConsignmentDetailList; | ||
| 980 | + | ||
| 981 | + | ||
| 982 | + @Override | ||
| 983 | + public String toString() { | ||
| 984 | + return "ChmConsignment{" + | ||
| 985 | + "id=" + id + | ||
| 986 | + //", version=" + version + | ||
| 987 | + ", exitPortDic=" + exitPortDic + | ||
| 988 | + ", exitPort='" + exitPort + '\'' + | ||
| 989 | + ", exitCusCode='" + exitCusCode + '\'' + | ||
| 990 | + ", exitCusDic=" + exitCusDic + | ||
| 991 | + ", exitCus='" + exitCus + '\'' + | ||
| 992 | + ", enteringNo='" + enteringNo + '\'' + | ||
| 993 | + ", customsNo='" + customsNo + '\'' + | ||
| 994 | + ", recordCode='" + recordCode + '\'' + | ||
| 995 | + ", importDate=" + importDate + | ||
| 996 | + ", customsDate=" + customsDate + | ||
| 997 | + ", ownerCodeScc='" + ownerCodeScc + '\'' + | ||
| 998 | + ", ownerCode='" + ownerCode + '\'' + | ||
| 999 | + ", ownerName='" + ownerName + '\'' + | ||
| 1000 | + ", vehicleWay=" + vehicleWay + | ||
| 1001 | + ", vehicleWayCode='" + vehicleWayCode + '\'' + | ||
| 1002 | + ", consignmentCode='" + consignmentCode + '\'' + | ||
| 1003 | + ", consignmentHeadCode='" + consignmentHeadCode + '\'' + | ||
| 1004 | + ", tradeModeDic=" + tradeModeDic + | ||
| 1005 | + ", tradeMode='" + tradeMode + '\'' + | ||
| 1006 | + ", taxNatureDic=" + taxNatureDic + | ||
| 1007 | + ", taxNature='" + taxNature + '\'' + | ||
| 1008 | + ", dealModeDic=" + dealModeDic + | ||
| 1009 | + ", dealMode='" + dealMode + '\'' + | ||
| 1010 | + ", packageTypeDic=" + packageTypeDic + | ||
| 1011 | + ", packageType='" + packageType + '\'' + | ||
| 1012 | + ", declaredDocTypeDic=" + declaredDocTypeDic + | ||
| 1013 | + ", declaredDocType='" + declaredDocType + '\'' + | ||
| 1014 | + ", declaredTypeDic=" + declaredTypeDic + | ||
| 1015 | + ", declaredType='" + declaredType + '\'' + | ||
| 1016 | + ", declaredFromTypeDic=" + declaredFromTypeDic + | ||
| 1017 | + ", declaredFromType='" + declaredFromType + '\'' + | ||
| 1018 | + ", licenseCode='" + licenseCode + '\'' + | ||
| 1019 | + ", fromCountryDic=" + fromCountryDic + | ||
| 1020 | + ", fromCountry='" + fromCountry + '\'' + | ||
| 1021 | + ", throughStopPortDic=" + throughStopPortDic + | ||
| 1022 | + ", throughStopPort='" + throughStopPort + '\'' + | ||
| 1023 | + ", tradeAreaCodeDic=" + tradeAreaCodeDic + | ||
| 1024 | + ", tradeAreaCode='" + tradeAreaCode + '\'' + | ||
| 1025 | + ", transCost=" + transCost + | ||
| 1026 | + ", transCurrencyDic=" + transCurrencyDic + | ||
| 1027 | + ", transCurrency='" + transCurrency + '\'' + | ||
| 1028 | + ", insuranceCost=" + insuranceCost + | ||
| 1029 | + ", insuranceCostCurrencyDic=" + insuranceCostCurrencyDic + | ||
| 1030 | + ", insuranceCostCurrency='" + insuranceCostCurrency + '\'' + | ||
| 1031 | + ", otherCost=" + otherCost + | ||
| 1032 | + ", otherCurrencyDic=" + otherCurrencyDic + | ||
| 1033 | + ", otherCurrency='" + otherCurrency + '\'' + | ||
| 1034 | + ", contractCode='" + contractCode + '\'' + | ||
| 1035 | + ", counts=" + counts + | ||
| 1036 | + ", grossWeight=" + grossWeight + | ||
| 1037 | + ", netWeight=" + netWeight + | ||
| 1038 | + ", slip='" + slip + '\'' + | ||
| 1039 | + ", promiseItmes1='" + promiseItmes1 + '\'' + | ||
| 1040 | + ", promiseItmes2='" + promiseItmes2 + '\'' + | ||
| 1041 | + ", promiseItmes3='" + promiseItmes3 + '\'' + | ||
| 1042 | + ", tradeCoSCC='" + tradeCoSCC + '\'' + | ||
| 1043 | + ", operateUnitCode='" + operateUnitCode + '\'' + | ||
| 1044 | + ", operateUnitName='" + operateUnitName + '\'' + | ||
| 1045 | + ", overseasConsignorFnCname='" + overseasConsignorFnCname + '\'' + | ||
| 1046 | + ", overseasConsignorCode='" + overseasConsignorCode + '\'' + | ||
| 1047 | + ", flightClassNo='" + flightClassNo + '\'' + | ||
| 1048 | + ", declaredRemark='" + declaredRemark + '\'' + | ||
| 1049 | + ", remarkMark='" + remarkMark + '\'' + | ||
| 1050 | + ", declaredCode='" + declaredCode + '\'' + | ||
| 1051 | + ", declaredUnitName='" + declaredUnitName + '\'' + | ||
| 1052 | + ", telephone='" + telephone + '\'' + | ||
| 1053 | + ", consTypeDic=" + consTypeDic + | ||
| 1054 | + ", consType='" + consType + '\'' + | ||
| 1055 | + ", sender='" + sender + '\'' + | ||
| 1056 | + ", enterpriseCode='" + enterpriseCode + '\'' + | ||
| 1057 | + ", taxUnit='" + taxUnit + '\'' + | ||
| 1058 | + ", printStatusDic=" + printStatusDic + | ||
| 1059 | + ", printStatus='" + printStatus + '\'' + | ||
| 1060 | + ", stampDic=" + stampDic + | ||
| 1061 | + ", stamp='" + stamp + '\'' + | ||
| 1062 | + ", upFileStatusDic=" + upFileStatusDic + | ||
| 1063 | + ", upFileStatus='" + upFileStatus + '\'' + | ||
| 1064 | + ", upFileTime=" + upFileTime + | ||
| 1065 | + //", upFileUserDic=" + upFileUserDic + | ||
| 1066 | + ", upFileUser='" + upFileUser + '\'' + | ||
| 1067 | + ", taskStatusDic=" + taskStatusDic + | ||
| 1068 | + ", taskStatus='" + taskStatus + '\'' + | ||
| 1069 | + ", pdfTime=" + pdfTime + | ||
| 1070 | + ", printNoDic=" + printNoDic + | ||
| 1071 | + ", printNo='" + printNo + '\'' + | ||
| 1072 | + ", printNoMsg='" + printNoMsg + '\'' + | ||
| 1073 | + ", printTime=" + printTime + | ||
| 1074 | + ", createTime=" + createTime + | ||
| 1075 | + //", creatorId=" + creatorId + | ||
| 1076 | + ", creator='" + creator + '\'' + | ||
| 1077 | + ", updateTime=" + updateTime + | ||
| 1078 | + //", updateUser=" + updateUser + | ||
| 1079 | + ", updateUserName='" + updateUserName + '\'' + | ||
| 1080 | + ", consStatusDic=" + consStatusDic + | ||
| 1081 | + ", consStatus='" + consStatus + '\'' + | ||
| 1082 | + ", osprStatusDic=" + osprStatusDic + | ||
| 1083 | + ", osprStatus='" + osprStatus + '\'' + | ||
| 1084 | + ", declaredPort='" + declaredPort + '\'' + | ||
| 1085 | + //", station=" + station + | ||
| 1086 | + ", stationName='" + stationName + '\'' + | ||
| 1087 | + ", flightDate=" + flightDate + | ||
| 1088 | + ", flightNo='" + flightNo + '\'' + | ||
| 1089 | + ", route='" + route + '\'' + | ||
| 1090 | + ", courier='" + courier + '\'' + | ||
| 1091 | + ", remark='" + remark + '\'' + | ||
| 1092 | + ", enableDeclaration='" + enableDeclaration + '\'' + | ||
| 1093 | + ", picUploaded=" + picUploaded + | ||
| 1094 | + ", picUploadTime=" + picUploadTime + | ||
| 1095 | + //", picUploadUser=" + picUploadUser + | ||
| 1096 | + ", creatingChannels='" + creatingChannels + '\'' + | ||
| 1097 | + ", skuName='" + skuName + '\'' + | ||
| 1098 | + ", export='" + export + '\'' + | ||
| 1099 | + ", contacts='" + contacts + '\'' + | ||
| 1100 | + ", contactInformation='" + contactInformation + '\'' + | ||
| 1101 | + ", rejectRemark='" + rejectRemark + '\'' + | ||
| 1102 | + ", siteAssistanceDic=" + siteAssistanceDic + | ||
| 1103 | + ", pickUpDate=" + pickUpDate + | ||
| 1104 | + ", customsReceipt='" + customsReceipt + '\'' + | ||
| 1105 | + ", customsReceiptTime=" + customsReceiptTime + | ||
| 1106 | + ", dmRemark='" + dmRemark + '\'' + | ||
| 1107 | + ", scanCodeDic=" + scanCodeDic + | ||
| 1108 | + ", scanCode='" + scanCode + '\'' + | ||
| 1109 | + ", scanStatusTime=" + scanStatusTime + | ||
| 1110 | + ", ppe='" + ppe + '\'' + | ||
| 1111 | + ", chmConsigmentType='" + chmConsigmentType + '\'' + | ||
| 1112 | + ", isBatchimport='" + isBatchimport + '\'' + | ||
| 1113 | +// ", exitPortDicId=" + exitPortDicId + | ||
| 1114 | +// ", exitPortDicName='" + exitPortDicName + '\'' + | ||
| 1115 | +// ", exitCusDicId=" + exitCusDicId + | ||
| 1116 | +// ", exitCusDicName='" + exitCusDicName + '\'' + | ||
| 1117 | +// ", vehicleWayId=" + vehicleWayId + | ||
| 1118 | +// ", vehicleWayName='" + vehicleWayName + '\'' + | ||
| 1119 | +// ", tradeModeDicId=" + tradeModeDicId + | ||
| 1120 | +// ", tradeModeDicName='" + tradeModeDicName + '\'' + | ||
| 1121 | +// ", taxNatureDicId=" + taxNatureDicId + | ||
| 1122 | +// ", taxNatureDicName='" + taxNatureDicName + '\'' + | ||
| 1123 | +// ", dealModeDicId=" + dealModeDicId + | ||
| 1124 | +// ", dealModeDicName='" + dealModeDicName + '\'' + | ||
| 1125 | +// ", packageTypeDicId=" + packageTypeDicId + | ||
| 1126 | +// ", packageTypeDicName='" + packageTypeDicName + '\'' + | ||
| 1127 | +// ", consTypeDicId=" + consTypeDicId + | ||
| 1128 | +// ", consTypeDicName='" + consTypeDicName + '\'' + | ||
| 1129 | +// ", fromCountryDicId=" + fromCountryDicId + | ||
| 1130 | +// ", fromCountryDicName='" + fromCountryDicName + '\'' + | ||
| 1131 | +// ", tradeAreaCodeDicId=" + tradeAreaCodeDicId + | ||
| 1132 | +// ", tradeAreaCodeDicName='" + tradeAreaCodeDicName + '\'' + | ||
| 1133 | +// ", transCurrencyDicId=" + transCurrencyDicId + | ||
| 1134 | +// ", transCurrencyDicName='" + transCurrencyDicName + '\'' + | ||
| 1135 | +// ", insuranceCostCurrencyDicId=" + insuranceCostCurrencyDicId + | ||
| 1136 | +// ", insuranceCostCurrencyDicName='" + insuranceCostCurrencyDicName + '\'' + | ||
| 1137 | +// ", otherCurrencyDicId=" + otherCurrencyDicId + | ||
| 1138 | +// ", otherCurrencyDicName='" + otherCurrencyDicName + '\'' + | ||
| 1139 | +// ", throughStopPortDicId=" + throughStopPortDicId + | ||
| 1140 | +// ", throughStopPortDicName='" + throughStopPortDicName + '\'' + | ||
| 1141 | +// ", consStatusDicCode='" + consStatusDicCode + '\'' + | ||
| 1142 | +// ", siteAssistanceDicName='" + siteAssistanceDicName + '\'' + | ||
| 1143 | +// ", stampDicCode='" + stampDicCode + '\'' + | ||
| 1144 | + ", pickUpCity='" + pickUpCity + '\'' + | ||
| 1145 | + ", pickUpCityName='" + pickUpCityName + '\'' + | ||
| 1146 | + ", isReturnData='" + isReturnData + '\'' + | ||
| 1147 | + ", fedExAccount='" + fedExAccount + '\'' + | ||
| 1148 | + '}'; | ||
| 1149 | + } | ||
| 1150 | +} |
| 1 | +package com.erry.iclear.dateInterface.entity; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonIgnore; | ||
| 4 | +import lombok.Data; | ||
| 5 | + | ||
| 6 | +import javax.persistence.*; | ||
| 7 | +import java.io.Serializable; | ||
| 8 | +import java.math.BigDecimal; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * 明细表 | ||
| 12 | + * Created by Erry 2019/5/30. | ||
| 13 | + * | ||
| 14 | + * @author Administrator | ||
| 15 | + */ | ||
| 16 | +@Entity | ||
| 17 | +@Table(name = "T_CHM_CONSIGNMENT_DETAIL") | ||
| 18 | +@Data | ||
| 19 | +public class ChmConsignmentDetail implements Serializable { | ||
| 20 | + | ||
| 21 | + private static final long serialVersionUID = 2693103610036977383L; | ||
| 22 | + | ||
| 23 | + /** | ||
| 24 | + * 运单明细表ID,自动增加 | ||
| 25 | + */ | ||
| 26 | + @Id | ||
| 27 | + @GeneratedValue | ||
| 28 | + @Column(name = "ID") | ||
| 29 | + private Long id; | ||
| 30 | + | ||
| 31 | + /** | ||
| 32 | + * 运单 | ||
| 33 | + @ManyToOne(targetEntity = ChmConsignment.class) | ||
| 34 | + @JoinColumn(name = "CONSIGNMENT_ID") | ||
| 35 | + private ChmConsignment chmConsignment; | ||
| 36 | + */ | ||
| 37 | + | ||
| 38 | + @Column(name = "CONSIGNMENT_ID") | ||
| 39 | + private Integer consignmentId; | ||
| 40 | + | ||
| 41 | + /** | ||
| 42 | + * 商品编号CodeTS | ||
| 43 | + */ | ||
| 44 | + @Column(name = "SKU_CODE") | ||
| 45 | + private String skuCode; | ||
| 46 | + | ||
| 47 | + | ||
| 48 | + /** | ||
| 49 | + * 原产国(地区)单价 | ||
| 50 | + */ | ||
| 51 | + @Column(name = "ORI_REGION") | ||
| 52 | + private BigDecimal oriRegion; | ||
| 53 | + | ||
| 54 | + /** | ||
| 55 | + * 总价 | ||
| 56 | + */ | ||
| 57 | + @Column(name = "AMOUNT") | ||
| 58 | + private BigDecimal amount; | ||
| 59 | + | ||
| 60 | + | ||
| 61 | + /** | ||
| 62 | + * 征免ID | ||
| 63 | + */ | ||
| 64 | + @JsonIgnore | ||
| 65 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 66 | + @JoinColumn(name = "LEVY_TYPE_ID") | ||
| 67 | + private DictionaryEntries levyTypeDic; | ||
| 68 | + | ||
| 69 | + /** | ||
| 70 | + * 征免 | ||
| 71 | + */ | ||
| 72 | + @Column(name = "LEVY_TYPE") | ||
| 73 | + private String levyType; | ||
| 74 | + | ||
| 75 | + /** | ||
| 76 | + * 数量及单位(第一(法定)计量单位)ID | ||
| 77 | + * lwz | ||
| 78 | + */ | ||
| 79 | + @JsonIgnore | ||
| 80 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 81 | + @JoinColumn(name = "UNIT_LEGAL_FIRST_ID") | ||
| 82 | + private DictionaryEntries unitLegalFirstId; | ||
| 83 | + /** | ||
| 84 | + * 数量及单位(第一(法定)计量单位) | ||
| 85 | + */ | ||
| 86 | + @Column(name = "UNIT_LEGAL_FIRST") | ||
| 87 | + private String unitLegalFirst; | ||
| 88 | + | ||
| 89 | + | ||
| 90 | + /** | ||
| 91 | + * 数量及单位(第一(法定)数量) | ||
| 92 | + */ | ||
| 93 | + @Column(name = "QTY_LEGAL_FIRST") | ||
| 94 | + private BigDecimal qtyLegalFirst; | ||
| 95 | + | ||
| 96 | + | ||
| 97 | + /** | ||
| 98 | + * 数量及单位(成交数量) | ||
| 99 | + */ | ||
| 100 | + @Column(name = "KNOCKDOWN_NUMBER") | ||
| 101 | + private BigDecimal knockdownNumber; | ||
| 102 | + | ||
| 103 | + /** | ||
| 104 | + * 成交单位ID | ||
| 105 | + */ | ||
| 106 | + @JsonIgnore | ||
| 107 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 108 | + @JoinColumn(name = "KNOCKDOWN_UNIT_ID") | ||
| 109 | + private DictionaryEntries knockdownUnitDic; | ||
| 110 | + | ||
| 111 | + /** | ||
| 112 | + * 数量及单位(成交单位) | ||
| 113 | + */ | ||
| 114 | + @Column(name = "KNOCKDOWN_UNIT") | ||
| 115 | + private String knockdownUnit; | ||
| 116 | + | ||
| 117 | + | ||
| 118 | + /** | ||
| 119 | + * 商品名称及规格型号 | ||
| 120 | + */ | ||
| 121 | + @Column(name = "MODEL") | ||
| 122 | + private String model; | ||
| 123 | + | ||
| 124 | + /** | ||
| 125 | + * 商品名称 | ||
| 126 | + */ | ||
| 127 | + @Column(name = "SKUNAME") | ||
| 128 | + private String skuName; | ||
| 129 | + | ||
| 130 | + | ||
| 131 | + /** | ||
| 132 | + * 原产地ID | ||
| 133 | + */ | ||
| 134 | + @JsonIgnore | ||
| 135 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 136 | + @JoinColumn(name = "HABITAT_ID") | ||
| 137 | + private DictionaryEntries habitatDic; | ||
| 138 | + | ||
| 139 | + /** | ||
| 140 | + * 原产地 | ||
| 141 | + */ | ||
| 142 | + @Column(name = "HABITAT") | ||
| 143 | + private String habitat; | ||
| 144 | + | ||
| 145 | + | ||
| 146 | + /** | ||
| 147 | + * 数量及单位(第二(法定)数量) | ||
| 148 | + */ | ||
| 149 | + @Column(name = "QTY_LEGAL_SECOND") | ||
| 150 | + private BigDecimal qtyLegalSecond; | ||
| 151 | + | ||
| 152 | + /** | ||
| 153 | + * 数量及单位(第二(法定)计量单位)ID | ||
| 154 | + * lwz | ||
| 155 | + */ | ||
| 156 | + @JsonIgnore | ||
| 157 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 158 | + @JoinColumn(name = "UNIT_LEGAL_SECOND_ID") | ||
| 159 | + private DictionaryEntries unitLegalSecondId; | ||
| 160 | + /** | ||
| 161 | + * 数量及单位(第二(法定)计量单位) | ||
| 162 | + */ | ||
| 163 | + @Column(name = "UNIT_LEGAL_SECOND") | ||
| 164 | + private String unitLegalSecond; | ||
| 165 | + | ||
| 166 | + | ||
| 167 | + /** | ||
| 168 | + * 币制ID | ||
| 169 | + */ | ||
| 170 | + @JsonIgnore | ||
| 171 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 172 | + @JoinColumn(name = "CURRENCY_ID") | ||
| 173 | + private DictionaryEntries currencyDic; | ||
| 174 | + | ||
| 175 | + /** | ||
| 176 | + * 币制(货币代码) | ||
| 177 | + */ | ||
| 178 | + @Column(name = "CURRENCY") | ||
| 179 | + private String currency; | ||
| 180 | + | ||
| 181 | + | ||
| 182 | + /** | ||
| 183 | + * 最终目的国(地区)ID | ||
| 184 | + */ | ||
| 185 | + @JsonIgnore | ||
| 186 | + @ManyToOne(targetEntity = DictionaryEntries.class) | ||
| 187 | + @JoinColumn(name = "DESTINATION_COUNTRY_ID") | ||
| 188 | + private DictionaryEntries destinationCountryDic; | ||
| 189 | + | ||
| 190 | + /** | ||
| 191 | + * 最终目的国(地区) | ||
| 192 | + */ | ||
| 193 | + @Column(name = "DESTINATION_COUNTRY") | ||
| 194 | + private String destinationCountry; | ||
| 195 | + | ||
| 196 | + | ||
| 197 | + /** | ||
| 198 | + * 境内货源地ID | ||
| 199 | + */ | ||
| 200 | + @JsonIgnore | ||
| 201 | + @ManyToOne(targetEntity = DomesticDestinationMapping.class) | ||
| 202 | + @JoinColumn(name = "DOMESTIC_DESTINATION_ID") | ||
| 203 | + private DomesticDestinationMapping domesticDestinationMapping; | ||
| 204 | + | ||
| 205 | + /** | ||
| 206 | + * 境内货源地 | ||
| 207 | + */ | ||
| 208 | + @Column(name = "DOMESTIC_DESTINATION") | ||
| 209 | + private String domesticDestination; | ||
| 210 | + | ||
| 211 | + | ||
| 212 | + /** | ||
| 213 | + * 货源地(目的地)ID | ||
| 214 | + */ | ||
| 215 | + @JsonIgnore | ||
| 216 | + @ManyToOne(targetEntity = OrigplacecodeMapping.class) | ||
| 217 | + @JoinColumn(name = "ORIGPLACECODE_ID") | ||
| 218 | + private OrigplacecodeMapping origplacecodeMapping; | ||
| 219 | + | ||
| 220 | + | ||
| 221 | + /** | ||
| 222 | + * 货源地(目的地) | ||
| 223 | + */ | ||
| 224 | + @Column(name = "ORIGPLACECODE") | ||
| 225 | + private String origplacecode; | ||
| 226 | + | ||
| 227 | + | ||
| 228 | + /** | ||
| 229 | + * author : wy on 2021/01/12 新增“英文品名” | ||
| 230 | + */ | ||
| 231 | + @Column(name = "CONTENTDESCRIPTION") | ||
| 232 | + private String contentDescription; | ||
| 233 | + | ||
| 234 | + | ||
| 235 | +//------------------------------------------------------------------------------------ | ||
| 236 | + /** | ||
| 237 | + * 备注 | ||
| 238 | + * */ | ||
| 239 | +// @Column(name = "REMARK") | ||
| 240 | +// private String remark; | ||
| 241 | + /** | ||
| 242 | + * 申报重量 | ||
| 243 | + * */ | ||
| 244 | +// @Column(name = "DECLARED_WEIGHT") | ||
| 245 | +// private BigDecimal declaredWeight; | ||
| 246 | + /** | ||
| 247 | + * 录入品名 | ||
| 248 | + */ | ||
| 249 | +// @Column(name = "INPUT_ITEM") | ||
| 250 | +// private String inputItem; | ||
| 251 | + | ||
| 252 | + | ||
| 253 | + @Override | ||
| 254 | + public String toString() { | ||
| 255 | + return "ChmConsignmentDetail{" + | ||
| 256 | + "id=" + id + | ||
| 257 | + ", consignmentId=" + consignmentId + | ||
| 258 | + ", skuCode='" + skuCode + '\'' + | ||
| 259 | + ", skuName='" + skuName + '\'' + | ||
| 260 | + ", model='" + model + '\'' + | ||
| 261 | + ", knockdownNumber=" + knockdownNumber + | ||
| 262 | + ", knockdownUnitDic=" + knockdownUnitDic + | ||
| 263 | + ", knockdownUnit='" + knockdownUnit + '\'' + | ||
| 264 | + ", qtyLegalFirst=" + qtyLegalFirst + | ||
| 265 | + ", unitLegalFirst='" + unitLegalFirst + '\'' + | ||
| 266 | + ", qtyLegalSecond=" + qtyLegalSecond + | ||
| 267 | + ", unitLegalSecond='" + unitLegalSecond + '\'' + | ||
| 268 | + ", habitatDic=" + habitatDic + | ||
| 269 | + ", habitat='" + habitat + '\'' + | ||
| 270 | + ", oriRegion=" + oriRegion + | ||
| 271 | + ", amount=" + amount + | ||
| 272 | + ", levyTypeDic=" + levyTypeDic + | ||
| 273 | + ", levyType='" + levyType + '\'' + | ||
| 274 | + ", currency='" + currency + '\'' + | ||
| 275 | + ", destinationCountry='" + destinationCountry + '\'' + | ||
| 276 | + ", domesticDestination='" + domesticDestination + '\'' + | ||
| 277 | + ", origplacecodeDic=" + origplacecodeMapping + | ||
| 278 | + ", origplacecode='" + origplacecode + '\'' + | ||
| 279 | + //", remark='" + remark + '\'' + | ||
| 280 | + //", declaredWeight='" + declaredWeight + '\'' + | ||
| 281 | + ", contentDescription='" + contentDescription + '\'' + | ||
| 282 | + '}'; | ||
| 283 | + } | ||
| 284 | +} |
| 1 | +package com.erry.iclear.dateInterface.entity; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonIgnore; | ||
| 4 | +import lombok.Data; | ||
| 5 | + | ||
| 6 | +import javax.persistence.*; | ||
| 7 | +import java.io.Serializable; | ||
| 8 | +import java.math.BigDecimal; | ||
| 9 | +import java.util.ArrayList; | ||
| 10 | +import java.util.List; | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * @author ligang | ||
| 14 | + * @date 2017/3/13 | ||
| 15 | + */ | ||
| 16 | +@Entity | ||
| 17 | +@Table(name = "T_BI_DICTIONARY_ENTRIES") | ||
| 18 | +@Data | ||
| 19 | +public class DictionaryEntries implements Serializable { | ||
| 20 | + | ||
| 21 | + private static final long serialVersionUID = -8423170334642989557L; | ||
| 22 | + @Id | ||
| 23 | + @Column(name = "ID") | ||
| 24 | + private Long id; | ||
| 25 | + | ||
| 26 | + @Column(name = "CODE") | ||
| 27 | + private String code; | ||
| 28 | + | ||
| 29 | + @Column(name = "DICT_CODE") | ||
| 30 | + private String dictCode; | ||
| 31 | + | ||
| 32 | + @Column(name = "CHINESE_NAME") | ||
| 33 | + private String chineseName; | ||
| 34 | + | ||
| 35 | + @Column(name = "ENGLISH_NAME") | ||
| 36 | + private String englishName; | ||
| 37 | + | ||
| 38 | + @Column(name = "DESCRIPTION") | ||
| 39 | + private String description; | ||
| 40 | + | ||
| 41 | + @Column(name = "STATUS") | ||
| 42 | + private Integer status; | ||
| 43 | + | ||
| 44 | + @Column(name = "EXT1") | ||
| 45 | + private Integer ext1; | ||
| 46 | + | ||
| 47 | + @Column(name = "EXT2") | ||
| 48 | + private String ext2; | ||
| 49 | + | ||
| 50 | + @Column(name = "EXT3") | ||
| 51 | + private String ext3; | ||
| 52 | + | ||
| 53 | + @Column(name = "EXT4") | ||
| 54 | + private BigDecimal ext4; | ||
| 55 | + | ||
| 56 | + @Column(name = "EXT5") | ||
| 57 | + private Integer ext5; | ||
| 58 | + | ||
| 59 | + @Column(name = "ORDINAL") | ||
| 60 | + private Integer ordinal; | ||
| 61 | + | ||
| 62 | + @Column(name = "EXT6") | ||
| 63 | + private String ext6; | ||
| 64 | + | ||
| 65 | + | ||
| 66 | +} |
| 1 | +package com.erry.iclear.dateInterface.entity; | ||
| 2 | + | ||
| 3 | +import lombok.Data; | ||
| 4 | + | ||
| 5 | +import javax.persistence.*; | ||
| 6 | +import java.io.Serializable; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * 国内目的地表 | ||
| 10 | + * Created by Erry 2019/6/15. | ||
| 11 | + * @author Administrator | ||
| 12 | + */ | ||
| 13 | +@Entity | ||
| 14 | +@Table(name = "T_DOMESTIC_DESTINATION_MAPPING") | ||
| 15 | +@Data | ||
| 16 | +public class DomesticDestinationMapping implements Serializable { | ||
| 17 | + | ||
| 18 | + | ||
| 19 | + private static final long serialVersionUID = 1183214016253488527L; | ||
| 20 | + /** | ||
| 21 | + * 运单表ID,自动增加 | ||
| 22 | + */ | ||
| 23 | + @Id | ||
| 24 | + @GeneratedValue | ||
| 25 | + @Column(name = "ID") | ||
| 26 | + private Long id; | ||
| 27 | + | ||
| 28 | + | ||
| 29 | + /** | ||
| 30 | + *国内地区代码 | ||
| 31 | + */ | ||
| 32 | + @Column(name = "DISTRICTCODE") | ||
| 33 | + private String districtCode; | ||
| 34 | + | ||
| 35 | + /** | ||
| 36 | + *国内地区名称 | ||
| 37 | + */ | ||
| 38 | + @Column(name = "DISTRICTNAME") | ||
| 39 | + private String districtName; | ||
| 40 | + | ||
| 41 | + | ||
| 42 | +} |
| ... | @@ -14,12 +14,11 @@ import java.util.Date; | ... | @@ -14,12 +14,11 @@ import java.util.Date; |
| 14 | @Data | 14 | @Data |
| 15 | public class IClearApiLog implements Serializable { | 15 | public class IClearApiLog implements Serializable { |
| 16 | 16 | ||
| 17 | - private static final long serialVersionUID = 1L; | 17 | + private static final long serialVersionUID = 8299265671871200609L; |
| 18 | - | ||
| 19 | @Id | 18 | @Id |
| 20 | @GeneratedValue(strategy = GenerationType.IDENTITY) | 19 | @GeneratedValue(strategy = GenerationType.IDENTITY) |
| 21 | @Column(name = "MSGID", insertable = false, nullable = false) | 20 | @Column(name = "MSGID", insertable = false, nullable = false) |
| 22 | - private Integer msgId; | 21 | + private Long msgId; |
| 23 | 22 | ||
| 24 | @Column(name = "MSG_TYPE") | 23 | @Column(name = "MSG_TYPE") |
| 25 | private String msgType; | 24 | private String msgType; | ... | ... |
| 1 | +package com.erry.iclear.dateInterface.entity; | ||
| 2 | + | ||
| 3 | +import lombok.Data; | ||
| 4 | +import javax.persistence.*; | ||
| 5 | +import java.io.Serializable; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * 目的地 | ||
| 9 | + * Created by Erry 2019/6/15. | ||
| 10 | + * | ||
| 11 | + * @author Administrator | ||
| 12 | + */ | ||
| 13 | +@Entity | ||
| 14 | +@Table(name = "T_ORIGPLACECODE_MAPPING") | ||
| 15 | +@Data | ||
| 16 | +public class OrigplacecodeMapping implements Serializable { | ||
| 17 | + | ||
| 18 | + | ||
| 19 | + private static final long serialVersionUID = -1205560923546470604L; | ||
| 20 | + /** | ||
| 21 | + * 运单表ID,自动增加 | ||
| 22 | + */ | ||
| 23 | + @Id | ||
| 24 | + @Column(name = "ID") | ||
| 25 | + private Long id; | ||
| 26 | + | ||
| 27 | + | ||
| 28 | + /** | ||
| 29 | + * 国内口岸代码 | ||
| 30 | + */ | ||
| 31 | + @Column(name = "ORIGPLACECODE") | ||
| 32 | + private String origplaceCode; | ||
| 33 | + | ||
| 34 | + /** | ||
| 35 | + * 国内口岸名称 | ||
| 36 | + */ | ||
| 37 | + @Column(name = "ORIGPLACENAME") | ||
| 38 | + private String origplaceName; | ||
| 39 | + | ||
| 40 | + | ||
| 41 | +} |
| 1 | package com.erry.iclear.dateInterface.init; | 1 | package com.erry.iclear.dateInterface.init; |
| 2 | 2 | ||
| 3 | import com.erry.iclear.dateInterface.common.Constant; | 3 | import com.erry.iclear.dateInterface.common.Constant; |
| 4 | +import com.erry.iclear.dateInterface.entity.AppInfo; | ||
| 5 | +import com.erry.iclear.dateInterface.service.*; | ||
| 4 | import lombok.extern.slf4j.Slf4j; | 6 | import lombok.extern.slf4j.Slf4j; |
| 5 | import org.springframework.beans.BeansException; | 7 | import org.springframework.beans.BeansException; |
| 6 | import org.springframework.beans.factory.InitializingBean; | 8 | import org.springframework.beans.factory.InitializingBean; |
| 9 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 7 | import org.springframework.context.ApplicationContext; | 10 | import org.springframework.context.ApplicationContext; |
| 8 | import org.springframework.context.ApplicationContextAware; | 11 | import org.springframework.context.ApplicationContextAware; |
| 9 | import org.springframework.stereotype.Service; | 12 | import org.springframework.stereotype.Service; |
| 10 | 13 | ||
| 11 | import java.util.HashMap; | 14 | import java.util.HashMap; |
| 15 | +import java.util.List; | ||
| 12 | 16 | ||
| 13 | /** | 17 | /** |
| 14 | * @author Administrator | 18 | * @author Administrator |
| ... | @@ -19,6 +23,22 @@ public class IClearApiSystemInit implements InitializingBean, ApplicationContext | ... | @@ -19,6 +23,22 @@ public class IClearApiSystemInit implements InitializingBean, ApplicationContext |
| 19 | 23 | ||
| 20 | private ApplicationContext applicationContext; | 24 | private ApplicationContext applicationContext; |
| 21 | 25 | ||
| 26 | + @Autowired | ||
| 27 | + private AppInfoService appInfoService; | ||
| 28 | + | ||
| 29 | + @Autowired | ||
| 30 | + private DomesticDestinationMappingService domesticDestinationMappingService; | ||
| 31 | + | ||
| 32 | + @Autowired | ||
| 33 | + private DictionaryEntriesService dictionaryEntriesService; | ||
| 34 | + | ||
| 35 | + @Autowired | ||
| 36 | + private OrigplacecodeMappingService origplacecodeMappingService; | ||
| 37 | + | ||
| 38 | + @Autowired | ||
| 39 | + private ChmCarryPortService chmCarryPortService; | ||
| 40 | + | ||
| 41 | + | ||
| 22 | @Override | 42 | @Override |
| 23 | public void setApplicationContext(ApplicationContext applicationContext)throws BeansException { | 43 | public void setApplicationContext(ApplicationContext applicationContext)throws BeansException { |
| 24 | this.applicationContext = applicationContext; | 44 | this.applicationContext = applicationContext; |
| ... | @@ -28,19 +48,46 @@ public class IClearApiSystemInit implements InitializingBean, ApplicationContext | ... | @@ -28,19 +48,46 @@ public class IClearApiSystemInit implements InitializingBean, ApplicationContext |
| 28 | @Override | 48 | @Override |
| 29 | public void afterPropertiesSet() throws Exception { | 49 | public void afterPropertiesSet() throws Exception { |
| 30 | try{ | 50 | try{ |
| 31 | - log.info("init appIdSecurity start>>>>>>>>>"); | 51 | + log.info("init initAppInfo start>>>>>>>>>"); |
| 32 | - //TODO 需要从数据库中读取,然后加载到map中 | 52 | + appInfoService.initAppInfo(); |
| 33 | - String appId="CTM"; | 53 | + log.info("init initAppInfo end>>>>>>>>>"); |
| 34 | - String appKey="iClearExport"; | 54 | + |
| 35 | - String security="b92131f03f19a348"; | 55 | + log.info("init initDictionaryEntries start>>>>>>>>>"); |
| 36 | - | 56 | + dictionaryEntriesService.initDictionaryEntries(); |
| 37 | - HashMap<String,String> appkeyMap = new HashMap<>(); | 57 | + log.info("init initDictionaryEntries end>>>>>>>>>"); |
| 38 | - appkeyMap.put(appKey,security); | 58 | + |
| 39 | - Constant.appIdSecurity.put(appId,appkeyMap); | 59 | + log.info("init initDomesticDestinationMapping start>>>>>>>>>"); |
| 40 | - log.info("init appIdSecurity end>>>>>>>>>"); | 60 | + domesticDestinationMappingService.initDomesticDestinationMapping(); |
| 61 | + log.info("init initDomesticDestinationMapping end>>>>>>>>>"); | ||
| 62 | + | ||
| 63 | + log.info("init initOrigplacecodeMapping start>>>>>>>>>"); | ||
| 64 | + origplacecodeMappingService.initOrigplacecodeMapping(); | ||
| 65 | + log.info("init initOrigplacecodeMapping end>>>>>>>>>"); | ||
| 66 | + | ||
| 67 | + log.info("init initChmCarryPort start>>>>>>>>>"); | ||
| 68 | + chmCarryPortService.initChmCarryPort(); | ||
| 69 | + log.info("init initChmCarryPort start>>>>>>>>>"); | ||
| 70 | + | ||
| 71 | + | ||
| 41 | }catch (Exception e){ | 72 | }catch (Exception e){ |
| 42 | - log.error("init appIdSecurity error:" + e.getMessage()); | 73 | + log.error("init afterPropertiesSet error:" + e.getMessage()); |
| 43 | } | 74 | } |
| 44 | } | 75 | } |
| 45 | 76 | ||
| 77 | + | ||
| 78 | + | ||
| 79 | + | ||
| 80 | + | ||
| 81 | + | ||
| 82 | + | ||
| 83 | + | ||
| 84 | + | ||
| 85 | + | ||
| 86 | + | ||
| 87 | + | ||
| 88 | + | ||
| 89 | + | ||
| 90 | + | ||
| 91 | + | ||
| 92 | + | ||
| 46 | } | 93 | } | ... | ... |
| 1 | +package com.erry.iclear.dateInterface.repository; | ||
| 2 | + | ||
| 3 | +import com.erry.iclear.dateInterface.entity.AppInfo; | ||
| 4 | +import com.erry.iclear.dateInterface.entity.IClearApiLog; | ||
| 5 | +import org.springframework.data.jpa.repository.JpaRepository; | ||
| 6 | +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; | ||
| 7 | +import org.springframework.data.jpa.repository.Query; | ||
| 8 | +import org.springframework.stereotype.Repository; | ||
| 9 | +import org.springframework.transaction.annotation.Transactional; | ||
| 10 | + | ||
| 11 | +import java.util.List; | ||
| 12 | + | ||
| 13 | +/** | ||
| 14 | + * @author Administrator | ||
| 15 | + */ | ||
| 16 | +@Repository | ||
| 17 | +@Transactional(rollbackFor = Exception.class) | ||
| 18 | +public interface AppInfoRepository extends JpaRepository<AppInfo, Integer>, JpaSpecificationExecutor<AppInfo> { | ||
| 19 | + | ||
| 20 | + /** | ||
| 21 | + * 查找所有有效的appInfo | ||
| 22 | + * @return | ||
| 23 | + */ | ||
| 24 | + @Query(nativeQuery = true, value = "select * from T_ICLEAR_API_APPINFO where IS_ENABLE = '1' ") | ||
| 25 | + public List<AppInfo> getAllEnableAppInfo(); | ||
| 26 | + | ||
| 27 | +} |
| 1 | +package com.erry.iclear.dateInterface.repository; | ||
| 2 | + | ||
| 3 | +import com.erry.iclear.dateInterface.entity.ChmCarryPort; | ||
| 4 | +import org.springframework.data.jpa.repository.JpaRepository; | ||
| 5 | +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; | ||
| 6 | +import org.springframework.data.jpa.repository.Query; | ||
| 7 | +import org.springframework.stereotype.Repository; | ||
| 8 | + | ||
| 9 | +import java.util.List; | ||
| 10 | + | ||
| 11 | +/** | ||
| 12 | + * 港口表 Repository | ||
| 13 | + * Created by Erry 2019/6/15. | ||
| 14 | + * @author Administrator | ||
| 15 | + */ | ||
| 16 | +@Repository | ||
| 17 | +public interface ChmCarryPortRepository extends JpaSpecificationExecutor<ChmCarryPort>, JpaRepository<ChmCarryPort, Long> { | ||
| 18 | + | ||
| 19 | + /** | ||
| 20 | + * 查找所有港口表数据 | ||
| 21 | + * @param | ||
| 22 | + * @return | ||
| 23 | + */ | ||
| 24 | + @Query(nativeQuery = true, value = "SELECT * FROM T_CHM_CARRY_PORT") | ||
| 25 | + public List<ChmCarryPort> findAllChmCarryPort(); | ||
| 26 | + | ||
| 27 | + | ||
| 28 | + /** | ||
| 29 | + * 模糊查询所有港口表数据 | ||
| 30 | + * @param | ||
| 31 | + * @return | ||
| 32 | + */ | ||
| 33 | + @Query(nativeQuery = true, value = "SELECT * FROM T_CHM_CARRY_PORT WHERE PORT_NAME LIKE ?1") | ||
| 34 | + public List<ChmCarryPort> findAllChmCarryPortLikePortName(String portName); | ||
| 35 | + | ||
| 36 | +} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | +package com.erry.iclear.dateInterface.repository; | ||
| 2 | + | ||
| 3 | +import com.erry.iclear.dateInterface.entity.ChmConsignment; | ||
| 4 | +import org.springframework.data.jpa.repository.JpaRepository; | ||
| 5 | +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; | ||
| 6 | +import org.springframework.data.jpa.repository.Query; | ||
| 7 | +import org.springframework.stereotype.Repository; | ||
| 8 | + | ||
| 9 | +import java.util.Date; | ||
| 10 | +import java.util.List; | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * @author Administrator | ||
| 14 | + */ | ||
| 15 | +@Repository | ||
| 16 | +public interface ChmConsignmentRepository extends JpaSpecificationExecutor<ChmConsignment>, JpaRepository<ChmConsignment, Long> { | ||
| 17 | + | ||
| 18 | + /** | ||
| 19 | + * 根据运单号集合+创建时间 运单 | ||
| 20 | + * @return | ||
| 21 | + */ | ||
| 22 | + @Query( nativeQuery = true,value ="select * from T_CHM_CONSIGNMENT where CONSIGNMENT_CODE IN ?1 and CREATE_TIME > ?2 " ) | ||
| 23 | + public List<ChmConsignment> findChmByCodeListAndCreateTime(List chmConCodeList, Date createTime); | ||
| 24 | + | ||
| 25 | +} |
| 1 | +package com.erry.iclear.dateInterface.repository; | ||
| 2 | + | ||
| 3 | +import com.erry.iclear.dateInterface.entity.DictionaryEntries; | ||
| 4 | +import com.erry.iclear.dateInterface.entity.IClearApiLog; | ||
| 5 | +import org.springframework.data.jpa.repository.JpaRepository; | ||
| 6 | +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; | ||
| 7 | +import org.springframework.data.jpa.repository.Query; | ||
| 8 | +import org.springframework.stereotype.Repository; | ||
| 9 | +import org.springframework.transaction.annotation.Transactional; | ||
| 10 | + | ||
| 11 | +import java.util.List; | ||
| 12 | + | ||
| 13 | +/** | ||
| 14 | + * @author Administrator | ||
| 15 | + */ | ||
| 16 | +@Repository | ||
| 17 | +@Transactional(rollbackFor = Exception.class) | ||
| 18 | +public interface DictionaryEntriesRepository extends JpaRepository<IClearApiLog, Integer>, JpaSpecificationExecutor<IClearApiLog> { | ||
| 19 | + | ||
| 20 | + /** | ||
| 21 | + * 根据code查找 | ||
| 22 | + * @param code | ||
| 23 | + * @return | ||
| 24 | + */ | ||
| 25 | + @Query(nativeQuery = true, value = "select * from T_BI_DICTIONARY_ENTRIES where CODE = ?1 AND STATUS=1 order by ORDINAL, ID") | ||
| 26 | + public DictionaryEntries findDictionaryEntriesByCode(String code); | ||
| 27 | + | ||
| 28 | + | ||
| 29 | + /** | ||
| 30 | + * 查找全部DictionaryEntries | ||
| 31 | + * @return | ||
| 32 | + */ | ||
| 33 | + @Query(nativeQuery = true, value = "select * from T_BI_DICTIONARY_ENTRIES where STATUS=1") | ||
| 34 | + public List<DictionaryEntries> findAllDictionaryEntries(); | ||
| 35 | + | ||
| 36 | + | ||
| 37 | + | ||
| 38 | + | ||
| 39 | +} |
src/main/java/com/erry/iclear/dateInterface/repository/DomesticDestinationMappingRepository.java
0 → 100644
| 1 | +package com.erry.iclear.dateInterface.repository; | ||
| 2 | + | ||
| 3 | +import com.erry.iclear.dateInterface.entity.DomesticDestinationMapping; | ||
| 4 | +import org.springframework.data.jpa.repository.JpaRepository; | ||
| 5 | +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; | ||
| 6 | +import org.springframework.data.jpa.repository.Query; | ||
| 7 | +import org.springframework.stereotype.Repository; | ||
| 8 | +import org.springframework.transaction.annotation.Transactional; | ||
| 9 | + | ||
| 10 | +import java.util.List; | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * @author Administrator | ||
| 14 | + */ | ||
| 15 | +@Repository | ||
| 16 | +@Transactional(rollbackFor = Exception.class) | ||
| 17 | +public interface DomesticDestinationMappingRepository extends JpaSpecificationExecutor<DomesticDestinationMapping>, JpaRepository<DomesticDestinationMapping, Long> { | ||
| 18 | + | ||
| 19 | + | ||
| 20 | + /** | ||
| 21 | + * 查找所有国内目的地表数据 | ||
| 22 | + * @param | ||
| 23 | + * @return | ||
| 24 | + */ | ||
| 25 | + @Query(nativeQuery = true, value = "SELECT * FROM T_DOMESTIC_DESTINATION_MAPPING") | ||
| 26 | + public List<DomesticDestinationMapping> findAllDomesticDestinationMapping(); | ||
| 27 | + | ||
| 28 | + /** | ||
| 29 | + * 根据name查找国内目的地 | ||
| 30 | + * @param districtName | ||
| 31 | + * @return | ||
| 32 | + */ | ||
| 33 | + @Query(nativeQuery = true, value = "SELECT * FROM T_DOMESTIC_DESTINATION_MAPPING WHERE DISTRICTNAME =?1") | ||
| 34 | + public DomesticDestinationMapping findDomesticDestinationMappingByName(String districtName); | ||
| 35 | + | ||
| 36 | +} |
| ... | @@ -5,9 +5,14 @@ import org.hibernate.annotations.DynamicInsert; | ... | @@ -5,9 +5,14 @@ import org.hibernate.annotations.DynamicInsert; |
| 5 | import org.hibernate.annotations.DynamicUpdate; | 5 | import org.hibernate.annotations.DynamicUpdate; |
| 6 | import org.springframework.data.jpa.repository.JpaRepository; | 6 | import org.springframework.data.jpa.repository.JpaRepository; |
| 7 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; | 7 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; |
| 8 | +import org.springframework.data.jpa.repository.Modifying; | ||
| 9 | +import org.springframework.data.jpa.repository.Query; | ||
| 10 | +import org.springframework.data.repository.query.Param; | ||
| 8 | import org.springframework.stereotype.Repository; | 11 | import org.springframework.stereotype.Repository; |
| 9 | import org.springframework.transaction.annotation.Transactional; | 12 | import org.springframework.transaction.annotation.Transactional; |
| 10 | 13 | ||
| 14 | +import java.util.Date; | ||
| 15 | + | ||
| 11 | /** | 16 | /** |
| 12 | * @author Administrator | 17 | * @author Administrator |
| 13 | */ | 18 | */ |
| ... | @@ -16,4 +21,11 @@ import org.springframework.transaction.annotation.Transactional; | ... | @@ -16,4 +21,11 @@ import org.springframework.transaction.annotation.Transactional; |
| 16 | @Repository | 21 | @Repository |
| 17 | @Transactional(rollbackFor = Exception.class) | 22 | @Transactional(rollbackFor = Exception.class) |
| 18 | public interface IClearApiLogRepository extends JpaRepository<IClearApiLog, Integer>, JpaSpecificationExecutor<IClearApiLog> { | 23 | public interface IClearApiLogRepository extends JpaRepository<IClearApiLog, Integer>, JpaSpecificationExecutor<IClearApiLog> { |
| 24 | + | ||
| 25 | + //执行更新 | ||
| 26 | + @Modifying(clearAutomatically = false) | ||
| 27 | + @Query("update IClearApiLog u set u.spendTime =:spendTime , u.responseTime =:responseTime , u.receiveResult =:receiveResult where u.msgId =:msgId") | ||
| 28 | + public void updateIClearApiLog(@Param("msgId") Long msgId,@Param("spendTime") Long spendTime, @Param("responseTime") Date responseTime, @Param("receiveResult") String receiveResult); | ||
| 29 | + | ||
| 30 | + | ||
| 19 | } | 31 | } | ... | ... |
src/main/java/com/erry/iclear/dateInterface/repository/OrigplacecodeMappingRepository.java
0 → 100644
| 1 | +package com.erry.iclear.dateInterface.repository; | ||
| 2 | + | ||
| 3 | +import com.erry.iclear.dateInterface.api.request.Mawb; | ||
| 4 | +import com.erry.iclear.dateInterface.entity.OrigplacecodeMapping; | ||
| 5 | +import org.springframework.data.jpa.repository.JpaRepository; | ||
| 6 | +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; | ||
| 7 | +import org.springframework.data.jpa.repository.Query; | ||
| 8 | +import org.springframework.stereotype.Repository; | ||
| 9 | +import org.springframework.transaction.annotation.Transactional; | ||
| 10 | + | ||
| 11 | +import java.util.List; | ||
| 12 | + | ||
| 13 | +/** | ||
| 14 | + * @author Administrator | ||
| 15 | + */ | ||
| 16 | +@Repository | ||
| 17 | +@Transactional(rollbackFor = Exception.class) | ||
| 18 | +public interface OrigplacecodeMappingRepository extends JpaRepository<OrigplacecodeMapping, Integer>, JpaSpecificationExecutor<OrigplacecodeMapping> { | ||
| 19 | + /** | ||
| 20 | + * 查找所有目的地 | ||
| 21 | + * | ||
| 22 | + * @param | ||
| 23 | + * @return | ||
| 24 | + */ | ||
| 25 | + @Query(nativeQuery = true, value = "SELECT * FROM T_ORIGPLACECODE_MAPPING") | ||
| 26 | + public List<OrigplacecodeMapping> findAllOrigplacecodeMappingList(); | ||
| 27 | + | ||
| 28 | + /** | ||
| 29 | + * 根据oriName查找目的地 | ||
| 30 | + * | ||
| 31 | + * @param oriName | ||
| 32 | + * @return | ||
| 33 | + */ | ||
| 34 | + @Query(nativeQuery = true, value = "SELECT * FROM T_ORIGPLACECODE_MAPPING WHERE ORIGPLACENAME =?1") | ||
| 35 | + public OrigplacecodeMapping findOrigplacecodeMappingByOriName(String oriName); | ||
| 36 | +} |
| 1 | +package com.erry.iclear.dateInterface.service; | ||
| 2 | + | ||
| 3 | +import com.erry.iclear.dateInterface.common.Constant; | ||
| 4 | +import com.erry.iclear.dateInterface.entity.AppInfo; | ||
| 5 | +import com.erry.iclear.dateInterface.repository.AppInfoRepository; | ||
| 6 | +import lombok.extern.slf4j.Slf4j; | ||
| 7 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 8 | +import org.springframework.stereotype.Service; | ||
| 9 | + | ||
| 10 | +import java.util.ArrayList; | ||
| 11 | +import java.util.HashMap; | ||
| 12 | +import java.util.List; | ||
| 13 | + | ||
| 14 | +/** | ||
| 15 | + * @author Administrator | ||
| 16 | + */ | ||
| 17 | +@Service | ||
| 18 | +@Slf4j | ||
| 19 | +public class AppInfoService { | ||
| 20 | + | ||
| 21 | + @Autowired | ||
| 22 | + private AppInfoRepository appInfoRepository; | ||
| 23 | + | ||
| 24 | + public List<AppInfo> getAllEnableAppInfo() { | ||
| 25 | + List<AppInfo> result = new ArrayList<AppInfo>(); | ||
| 26 | + try { | ||
| 27 | + result = appInfoRepository.getAllEnableAppInfo(); | ||
| 28 | + } catch (Exception e) { | ||
| 29 | + log.error("getAllEnableAppInfo() error:" + e.getMessage()); | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + return result; | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + /** | ||
| 36 | + * 初始化AppInfo | ||
| 37 | + */ | ||
| 38 | + public void initAppInfo() { | ||
| 39 | + try { | ||
| 40 | + List<AppInfo> appInfoList = this.getAllEnableAppInfo(); | ||
| 41 | + for (AppInfo appInfo : appInfoList) { | ||
| 42 | + HashMap<String, String> appkeyMap = new HashMap<String, String>(); | ||
| 43 | + appkeyMap.put(appInfo.getAppKey(), appInfo.getSecurity()); | ||
| 44 | + Constant.appIdSecurityCache.put(appInfo.getAppId(), appkeyMap); | ||
| 45 | + } | ||
| 46 | + } catch (Exception e) { | ||
| 47 | + log.error("initAppInfo() error" + e.getMessage()); | ||
| 48 | + } | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + | ||
| 52 | +} |
| 1 | +package com.erry.iclear.dateInterface.service; | ||
| 2 | + | ||
| 3 | +import com.erry.iclear.dateInterface.common.Constant; | ||
| 4 | +import com.erry.iclear.dateInterface.entity.AppInfo; | ||
| 5 | +import com.erry.iclear.dateInterface.entity.ChmCarryPort; | ||
| 6 | +import com.erry.iclear.dateInterface.repository.ChmCarryPortRepository; | ||
| 7 | +import lombok.extern.slf4j.Slf4j; | ||
| 8 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 9 | +import org.springframework.stereotype.Service; | ||
| 10 | + | ||
| 11 | +import java.util.ArrayList; | ||
| 12 | +import java.util.HashMap; | ||
| 13 | +import java.util.List; | ||
| 14 | + | ||
| 15 | +@Service | ||
| 16 | +@Slf4j | ||
| 17 | +public class ChmCarryPortService { | ||
| 18 | + | ||
| 19 | + @Autowired | ||
| 20 | + private ChmCarryPortRepository chmCarryPortRepository; | ||
| 21 | + | ||
| 22 | + public List<ChmCarryPort> findAllChmCarryPort(){ | ||
| 23 | + List<ChmCarryPort> result = new ArrayList<>(); | ||
| 24 | + try{ | ||
| 25 | + result=chmCarryPortRepository.findAllChmCarryPort(); | ||
| 26 | + }catch (Exception e){ | ||
| 27 | + log.error("findAllChmCarryPort() error"+e.getMessage()); | ||
| 28 | + } | ||
| 29 | + return result; | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + /** | ||
| 33 | + * 初始化AppInfo | ||
| 34 | + */ | ||
| 35 | + public void initChmCarryPort() { | ||
| 36 | + try { | ||
| 37 | + List<ChmCarryPort> appInfoList = this.findAllChmCarryPort(); | ||
| 38 | + for (ChmCarryPort chmCarryPort : appInfoList) { | ||
| 39 | + | ||
| 40 | + Constant.chmCarryPortCache.put(chmCarryPort.getPcCode(), chmCarryPort); | ||
| 41 | + } | ||
| 42 | + } catch (Exception e) { | ||
| 43 | + log.error("initAppInfo() error" + e.getMessage()); | ||
| 44 | + } | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + | ||
| 48 | +} |
| 1 | +package com.erry.iclear.dateInterface.service; | ||
| 2 | + | ||
| 3 | +import com.erry.iclear.dateInterface.api.request.MawbDetail; | ||
| 4 | +import com.erry.iclear.dateInterface.common.Constant; | ||
| 5 | +import com.erry.iclear.dateInterface.entity.*; | ||
| 6 | +import lombok.extern.slf4j.Slf4j; | ||
| 7 | +import org.springframework.stereotype.Service; | ||
| 8 | + | ||
| 9 | +import java.math.BigDecimal; | ||
| 10 | + | ||
| 11 | +/** | ||
| 12 | + * @author Administrator | ||
| 13 | + */ | ||
| 14 | +@Service | ||
| 15 | +@Slf4j | ||
| 16 | +public class ChmConsignmentDetailService { | ||
| 17 | + | ||
| 18 | + | ||
| 19 | + /** | ||
| 20 | + * 转换运单明细 | ||
| 21 | + * @param mawbDetail | ||
| 22 | + * @return | ||
| 23 | + */ | ||
| 24 | + public ChmConsignmentDetail convertToChmConsignmentDetail(MawbDetail mawbDetail){ | ||
| 25 | + ChmConsignmentDetail result = new ChmConsignmentDetail(); | ||
| 26 | + try{ | ||
| 27 | + //归类标志 | ||
| 28 | + | ||
| 29 | + //商品编号 | ||
| 30 | + result.setSkuCode(mawbDetail.getCodeTS()); | ||
| 31 | + //申报单价 | ||
| 32 | + result.setOriRegion(mawbDetail.getDeclPrice()); | ||
| 33 | + //申报总价 | ||
| 34 | + result.setAmount(mawbDetail.getDeclTotal()); | ||
| 35 | + //征免方式 | ||
| 36 | + DictionaryEntries levyTypeDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.LEVY_TYPE+mawbDetail.getDutyMode()); | ||
| 37 | + result.setLevyTypeDic(levyTypeDictionaryEntries); | ||
| 38 | + result.setLevyType(levyTypeDictionaryEntries.getChineseName()); | ||
| 39 | + //货号 | ||
| 40 | + //版本号 | ||
| 41 | + //第一计量单位(法定单位) | ||
| 42 | + DictionaryEntries firstUnitDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.TRANSACTION_UNIT+ mawbDetail.getFirstUnit()); | ||
| 43 | + result.setUnitLegalFirstId(firstUnitDictionaryEntries); | ||
| 44 | + result.setKnockdownUnit(firstUnitDictionaryEntries.getChineseName()); | ||
| 45 | + | ||
| 46 | + //第一法定数量 | ||
| 47 | + result.setQtyLegalFirst(BigDecimal.valueOf(mawbDetail.getFirstQty().doubleValue())); | ||
| 48 | + //成交计量单位 | ||
| 49 | + DictionaryEntries knockdownUnitEntries = Constant.dictionaryEntriesCache.get(Constant.TRANSACTION_UNIT+ mawbDetail.getFirstUnit()); | ||
| 50 | + result.setKnockdownUnitDic(knockdownUnitEntries); | ||
| 51 | + result.setKnockdownUnit(knockdownUnitEntries.getChineseName()); | ||
| 52 | + //商品规格、型号 | ||
| 53 | + result.setModel(mawbDetail.getGModel()); | ||
| 54 | + //商品名称 | ||
| 55 | + result.setSkuName(mawbDetail.getGName()); | ||
| 56 | + //商品序号 | ||
| 57 | + //成交数量 | ||
| 58 | + result.setKnockdownNumber(BigDecimal.valueOf(mawbDetail.getGQty().doubleValue())); | ||
| 59 | + //原产国 | ||
| 60 | + DictionaryEntries habitatDictonaryEntries = Constant.dictionaryEntriesCache.get(Constant.COUNTRY+ mawbDetail.getOriginCountry()); | ||
| 61 | + result.setHabitatDic(habitatDictonaryEntries); | ||
| 62 | + result.setHabitat(habitatDictonaryEntries.getChineseName()); | ||
| 63 | + | ||
| 64 | + //第二计量单位 | ||
| 65 | + DictionaryEntries secondUnitDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.TRANSACTION_UNIT+ mawbDetail.getSecondUnit()); | ||
| 66 | + result.setUnitLegalSecondId(secondUnitDictionaryEntries); | ||
| 67 | + result.setUnitLegalSecond(secondUnitDictionaryEntries.getChineseName()); | ||
| 68 | + //第二法定数量 | ||
| 69 | + result.setQtyLegalSecond(BigDecimal.valueOf(mawbDetail.getSecondQty().doubleValue())); | ||
| 70 | + //成交币制 | ||
| 71 | + DictionaryEntries currencyDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.CURRENCY_SYSTEM+ mawbDetail.getTradeCurr()); | ||
| 72 | + result.setCurrencyDic(currencyDictionaryEntries); | ||
| 73 | + result.setCurrency(currencyDictionaryEntries.getChineseName()); | ||
| 74 | + | ||
| 75 | + //用途/生产厂家 | ||
| 76 | + //工缴费 | ||
| 77 | + //最终目的国 | ||
| 78 | + DictionaryEntries destinationCountryDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.COUNTRY+ mawbDetail.getDestinationCountry()); | ||
| 79 | + result.setDestinationCountryDic(destinationCountryDictionaryEntries); | ||
| 80 | + result.setDestinationCountry(destinationCountryDictionaryEntries.getChineseName()); | ||
| 81 | + | ||
| 82 | + | ||
| 83 | + //检验检疫编码 | ||
| 84 | + //申报货物英文名称 | ||
| 85 | + result.setContentDescription(mawbDetail.getDeclGoodsEname()); | ||
| 86 | + //目的地代码 | ||
| 87 | + OrigplacecodeMapping origplacecodeMapping = Constant.origplacecodeMappingCache.get(mawbDetail.getDestCode()); | ||
| 88 | + result.setOrigplacecodeMapping(origplacecodeMapping); | ||
| 89 | + result.setOrigplacecode(origplacecodeMapping.getOrigplaceName()); | ||
| 90 | + | ||
| 91 | + | ||
| 92 | + //境内目的地/境内货源地 | ||
| 93 | + DomesticDestinationMapping domesticDestinationDictionaryEntries = Constant.domesticDestinationMappingCache.get(mawbDetail.getDistrictCode()); | ||
| 94 | + result.setDomesticDestinationMapping(domesticDestinationDictionaryEntries); | ||
| 95 | + result.setDomesticDestination(destinationCountryDictionaryEntries.getChineseName()); | ||
| 96 | + | ||
| 97 | + | ||
| 98 | + }catch (Exception e){ | ||
| 99 | + log.error("convertToChmConsignmentDetail() error:"+e.getMessage()); | ||
| 100 | + } | ||
| 101 | + | ||
| 102 | + return result; | ||
| 103 | + } | ||
| 104 | +} |
| 1 | +package com.erry.iclear.dateInterface.service; | ||
| 2 | + | ||
| 3 | +import com.erry.iclear.dateInterface.api.request.Mawb; | ||
| 4 | +import com.erry.iclear.dateInterface.common.Constant; | ||
| 5 | +import com.erry.iclear.dateInterface.entity.ChmCarryPort; | ||
| 6 | +import com.erry.iclear.dateInterface.entity.ChmConsignment; | ||
| 7 | +import com.erry.iclear.dateInterface.entity.DictionaryEntries; | ||
| 8 | +import com.erry.iclear.dateInterface.repository.ChmConsignmentRepository; | ||
| 9 | +import lombok.extern.slf4j.Slf4j; | ||
| 10 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 11 | +import org.springframework.stereotype.Service; | ||
| 12 | + | ||
| 13 | +import java.math.BigDecimal; | ||
| 14 | + | ||
| 15 | +/** | ||
| 16 | + * @author Administrator | ||
| 17 | + */ | ||
| 18 | +@Service | ||
| 19 | +@Slf4j | ||
| 20 | +public class ChmConsignmentService { | ||
| 21 | + | ||
| 22 | + @Autowired | ||
| 23 | + private ChmConsignmentRepository chmConsignmentRepository; | ||
| 24 | + | ||
| 25 | + /** | ||
| 26 | + * 转换主单 | ||
| 27 | + * @return | ||
| 28 | + */ | ||
| 29 | + public ChmConsignment convertToChmConsignment(Mawb mawb){ | ||
| 30 | + ChmConsignment result = new ChmConsignment(); | ||
| 31 | + try{ | ||
| 32 | + //进出口标志:固定值 E | ||
| 33 | + //报关类型:填写固定值EX,但字典表里没有这个值 | ||
| 34 | +// result.setDeclaredDocTypeDic(); | ||
| 35 | +// result.setDeclaredCode(); | ||
| 36 | + //申报单位代码:固定值 1111980005 | ||
| 37 | + result.setDeclaredUnitName(mawb.getAgentName()); | ||
| 38 | + //申报单位名称:固定值 联邦快递(中国)有限公司 | ||
| 39 | + //提单号:有总单号则取值“总单号_运单号”,没有总单号则取值“运单号” | ||
| 40 | + String billNo[]=mawb.getBillNo().split("_"); | ||
| 41 | + result.setConsignmentHeadCode(billNo[0]); | ||
| 42 | + result.setConsignmentCode(billNo[1]); | ||
| 43 | + //合同号 | ||
| 44 | + result.setContractCode(mawb.getContrNo()); | ||
| 45 | + //主管海关(申报地海关) | ||
| 46 | + result.setCustomsNo(mawb.getCustomMaster()); | ||
| 47 | + //征免性质 | ||
| 48 | + DictionaryEntries levyTypeDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.LEVY_TYPE+mawb.getCutMode()); | ||
| 49 | + result.setTaxNatureDic(levyTypeDictionaryEntries); | ||
| 50 | + result.setTaxNature(levyTypeDictionaryEntries.getChineseName()); | ||
| 51 | + //报关/转关关系标志:固定值0 ,但数据字典里没有0 | ||
| 52 | + | ||
| 53 | + //经停港/指运港 | ||
| 54 | + ChmCarryPort chmCarryPort =Constant.chmCarryPortCache.get(mawb.getDistinatePort()); | ||
| 55 | + result.setThroughStopPortDic(chmCarryPort); | ||
| 56 | + result.setThroughStopPort(chmCarryPort.getPortNo()); | ||
| 57 | + | ||
| 58 | + //报关标志 | ||
| 59 | + | ||
| 60 | + //海关编号 | ||
| 61 | + result.setCustomsNo(mawb.getEntryId()); | ||
| 62 | + //运费币制 | ||
| 63 | + DictionaryEntries currencyDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.CURRENCY_SYSTEM+mawb.getFeeCurr()); | ||
| 64 | + result.setTransCurrencyDic(currencyDictionaryEntries); | ||
| 65 | + result.setTransCurrency(currencyDictionaryEntries.getChineseName()); | ||
| 66 | + | ||
| 67 | + //运费标记:固定值 3 | ||
| 68 | + //运费总价 | ||
| 69 | + result.setTransCost(mawb.getFeeRate()); | ||
| 70 | + //毛重 | ||
| 71 | + result.setGrossWeight(BigDecimal.valueOf(mawb.getGrossWet())); | ||
| 72 | + //出入境关闭:固定值 0101 | ||
| 73 | + //录入人名称:固定值 必填项,但填的值是空值 | ||
| 74 | + //保险费币制 | ||
| 75 | + DictionaryEntries insuranceDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.CURRENCY_SYSTEM+mawb.getInsurCurr()); | ||
| 76 | + result.setInsuranceCostCurrencyDic(insuranceDictionaryEntries); | ||
| 77 | + result.setInsuranceCostCurrency(insuranceDictionaryEntries.getChineseName()); | ||
| 78 | + //保险费标记 | ||
| 79 | + //保险费/率 | ||
| 80 | + result.setInsuranceCost(mawb.getInsurRate()); | ||
| 81 | + //备案号 | ||
| 82 | + result.setRecordCode(mawb.getManualNo()); | ||
| 83 | + //净重 | ||
| 84 | + result.setNetWeight(mawb.getNetWt()); | ||
| 85 | + //杂费币制 | ||
| 86 | + DictionaryEntries otherDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.CURRENCY_SYSTEM+mawb.getOtherCurr()); | ||
| 87 | + result.setInsuranceCostCurrencyDic(otherDictionaryEntries); | ||
| 88 | + result.setInsuranceCostCurrency(otherDictionaryEntries.getChineseName()); | ||
| 89 | + //杂费/率 | ||
| 90 | + result.setOtherCost(mawb.getOtherRate()); | ||
| 91 | + //杂费标志 | ||
| 92 | + //消费使用/生产销售单位代码 | ||
| 93 | + | ||
| 94 | + //消费使用/生产销售单位名称 | ||
| 95 | + //件数 | ||
| 96 | + result.setCounts(mawb.getPackNo().longValue()); | ||
| 97 | + //预录入编号 | ||
| 98 | + result.setEnteringNo(mawb.getPreEntryId()); | ||
| 99 | + //启运国/运抵国 | ||
| 100 | + DictionaryEntries fromCountryDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.COUNTRY+mawb.getOtherCurr()); | ||
| 101 | + result.setFromCountryDic(fromCountryDictionaryEntries); | ||
| 102 | + result.setFromCountry(fromCountryDictionaryEntries.getChineseName()); | ||
| 103 | + | ||
| 104 | + | ||
| 105 | + //监管方式 | ||
| 106 | + DictionaryEntries tradeModeDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.COUNTRY+mawb.getOtherCurr()); | ||
| 107 | + result.setTradeModeDic(tradeModeDictionaryEntries); | ||
| 108 | + result.setTradeMode(tradeModeDictionaryEntries.getChineseName()); | ||
| 109 | + | ||
| 110 | + | ||
| 111 | + //境内收发货人编号 | ||
| 112 | + result.setTradeCoSCC(mawb.getTradeCode()); | ||
| 113 | + //运输方式代码 | ||
| 114 | + DictionaryEntries vehicleWayDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.VEHICLE_WAY_CODE+mawb.getTrafMode()); | ||
| 115 | + result.setVehicleWay(vehicleWayDictionaryEntries); | ||
| 116 | + result.setVehicleWayCode(vehicleWayDictionaryEntries.getCode()); | ||
| 117 | + | ||
| 118 | + //境内收发货人名称 | ||
| 119 | + result.setOperateUnitName(mawb.getTradeName()); | ||
| 120 | + //成交方式 | ||
| 121 | + DictionaryEntries dealModeDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.CLINCH_TYPE+mawb.getTransMode()); | ||
| 122 | + result.setDealModeDic(dealModeDictionaryEntries); | ||
| 123 | + result.setDealMode(dealModeDictionaryEntries.getChineseName()); | ||
| 124 | + | ||
| 125 | + //包装种类 | ||
| 126 | + DictionaryEntries packageTypeDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.NEW_PACKAGE_TYPE+mawb.getWrapType()); | ||
| 127 | + result.setPackageTypeDic(packageTypeDictionaryEntries); | ||
| 128 | + result.setPackageType(packageTypeDictionaryEntries.getChineseName()); | ||
| 129 | + | ||
| 130 | + | ||
| 131 | + //生产核销单位统一信用代码---报关形式类型 | ||
| 132 | + //消费使用/生产销售单位单位统一编码 | ||
| 133 | + //贸易国别 | ||
| 134 | + DictionaryEntries tradeAreaCodeDictionaryEntries=Constant.dictionaryEntriesCache.get(Constant.COUNTRY+mawb.getTradeAreaCode()); | ||
| 135 | + result.setTradeAreaCodeDic(tradeAreaCodeDictionaryEntries); | ||
| 136 | + result.setTradeAreaCode(tradeAreaCodeDictionaryEntries.getChineseName()); | ||
| 137 | + | ||
| 138 | + | ||
| 139 | + | ||
| 140 | + //标记及号码 | ||
| 141 | + result.setDeclaredRemark(mawb.getMarkNo()); | ||
| 142 | + //入境口岸代码:固定值 310302 | ||
| 143 | + //存放地点:固定值 空值 | ||
| 144 | + //申报人员姓名---报关员证号 | ||
| 145 | + result.setDeclaredUnitName(mawb.getDeclareName()); | ||
| 146 | + //境外发货人代码 | ||
| 147 | + | ||
| 148 | + //境外收货人编码 | ||
| 149 | + result.setOverseasConsignorCode(mawb.getOverseasConsigneeCode()); | ||
| 150 | + //境外收货人名称(外文) | ||
| 151 | + result.setOverseasConsignorFnCname(mawb.getOverseasConsigneeEname()); | ||
| 152 | + | ||
| 153 | + | ||
| 154 | + }catch (Exception e){ | ||
| 155 | + log.error("convertToChmConsignment() error:"+e.getMessage()); | ||
| 156 | + } | ||
| 157 | + return result; | ||
| 158 | + } | ||
| 159 | + | ||
| 160 | + | ||
| 161 | + /** | ||
| 162 | + * 保存主单 | ||
| 163 | + * @param chmConsignment | ||
| 164 | + * @return | ||
| 165 | + */ | ||
| 166 | + public ChmConsignment saveChmConsignment(ChmConsignment chmConsignment){ | ||
| 167 | + try{ | ||
| 168 | + return chmConsignmentRepository.save(chmConsignment); | ||
| 169 | + }catch (Exception e){ | ||
| 170 | + log.error("saveChmConsignment() error:"+e.getMessage()); | ||
| 171 | + } | ||
| 172 | + return null; | ||
| 173 | + } | ||
| 174 | + | ||
| 175 | + | ||
| 176 | +} |
| 1 | +package com.erry.iclear.dateInterface.service; | ||
| 2 | + | ||
| 3 | +import com.erry.iclear.dateInterface.common.Constant; | ||
| 4 | +import com.erry.iclear.dateInterface.entity.DictionaryEntries; | ||
| 5 | +import com.erry.iclear.dateInterface.repository.DictionaryEntriesRepository; | ||
| 6 | +import lombok.extern.slf4j.Slf4j; | ||
| 7 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 8 | +import org.springframework.stereotype.Service; | ||
| 9 | + | ||
| 10 | +import java.util.ArrayList; | ||
| 11 | +import java.util.HashMap; | ||
| 12 | +import java.util.List; | ||
| 13 | + | ||
| 14 | +/** | ||
| 15 | + * @author Administrator | ||
| 16 | + */ | ||
| 17 | +@Service | ||
| 18 | +@Slf4j | ||
| 19 | +public class DictionaryEntriesService { | ||
| 20 | + | ||
| 21 | + @Autowired | ||
| 22 | + private DictionaryEntriesRepository dictionaryEntriesRepository; | ||
| 23 | + | ||
| 24 | + public List<DictionaryEntries> getAllDictionaryEntries(){ | ||
| 25 | + List<DictionaryEntries> result = new ArrayList<DictionaryEntries>(); | ||
| 26 | + try { | ||
| 27 | + result=dictionaryEntriesRepository.findAllDictionaryEntries(); | ||
| 28 | + }catch (Exception e){ | ||
| 29 | + log.error("getAllDictionaryEntries() error:"+e.getMessage()); | ||
| 30 | + } | ||
| 31 | + return result; | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + | ||
| 35 | + /** | ||
| 36 | + * 初始化AppInfo | ||
| 37 | + */ | ||
| 38 | + public void initDictionaryEntries() { | ||
| 39 | + try { | ||
| 40 | + List<DictionaryEntries> dictionaryEntriesList = this.getAllDictionaryEntries(); | ||
| 41 | + for (DictionaryEntries dictionaryEntries : dictionaryEntriesList) { | ||
| 42 | + Constant.dictionaryEntriesCache.put(dictionaryEntries.getCode(),dictionaryEntries); | ||
| 43 | + } | ||
| 44 | + } catch (Exception e) { | ||
| 45 | + log.error("initAppInfo() error" + e.getMessage()); | ||
| 46 | + } | ||
| 47 | + } | ||
| 48 | + | ||
| 49 | + | ||
| 50 | + | ||
| 51 | +} |
src/main/java/com/erry/iclear/dateInterface/service/DomesticDestinationMappingService.java
0 → 100644
| 1 | +package com.erry.iclear.dateInterface.service; | ||
| 2 | + | ||
| 3 | +import com.erry.iclear.dateInterface.common.Constant; | ||
| 4 | +import com.erry.iclear.dateInterface.entity.AppInfo; | ||
| 5 | +import com.erry.iclear.dateInterface.entity.DomesticDestinationMapping; | ||
| 6 | +import com.erry.iclear.dateInterface.repository.DomesticDestinationMappingRepository; | ||
| 7 | +import lombok.extern.slf4j.Slf4j; | ||
| 8 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 9 | +import org.springframework.stereotype.Service; | ||
| 10 | + | ||
| 11 | +import java.util.ArrayList; | ||
| 12 | +import java.util.HashMap; | ||
| 13 | +import java.util.List; | ||
| 14 | + | ||
| 15 | +/** | ||
| 16 | + * @author Administrator | ||
| 17 | + */ | ||
| 18 | +@Service | ||
| 19 | +@Slf4j | ||
| 20 | +public class DomesticDestinationMappingService { | ||
| 21 | + | ||
| 22 | + @Autowired | ||
| 23 | + private DomesticDestinationMappingRepository domesticDestinationMappingRepository; | ||
| 24 | + | ||
| 25 | + public List<DomesticDestinationMapping> findAllDomesticDestinationMapping(){ | ||
| 26 | + List<DomesticDestinationMapping> result = new ArrayList<>(); | ||
| 27 | + try{ | ||
| 28 | + result=domesticDestinationMappingRepository.findAllDomesticDestinationMapping(); | ||
| 29 | + }catch (Exception e){ | ||
| 30 | + log.error("findAllDomesticDestinationMapping() error:" + e.getMessage()); | ||
| 31 | + } | ||
| 32 | + return result; | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + | ||
| 36 | + /** | ||
| 37 | + * 初始化DomesticDestinationMapping | ||
| 38 | + */ | ||
| 39 | + public void initDomesticDestinationMapping() { | ||
| 40 | + try { | ||
| 41 | + List<DomesticDestinationMapping> domList = this.findAllDomesticDestinationMapping(); | ||
| 42 | + for (DomesticDestinationMapping dom : domList) { | ||
| 43 | + Constant.domesticDestinationMappingCache.put(dom.getDistrictCode(), dom); | ||
| 44 | + } | ||
| 45 | + } catch (Exception e) { | ||
| 46 | + log.error("initDomesticDestinationMapping() error" + e.getMessage()); | ||
| 47 | + } | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + | ||
| 51 | + | ||
| 52 | + | ||
| 53 | + | ||
| 54 | + | ||
| 55 | + | ||
| 56 | +} |
| ... | @@ -59,4 +59,14 @@ public class IClearApiLogService { | ... | @@ -59,4 +59,14 @@ public class IClearApiLogService { |
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | 61 | ||
| 62 | + | ||
| 63 | + public void updateIClearApiLog(IClearApiLog iClearApiLog){ | ||
| 64 | + try{ | ||
| 65 | + iClearApiLogRepository.updateIClearApiLog(iClearApiLog.getMsgId(),iClearApiLog.getSpendTime(),iClearApiLog.getResponseTime(),iClearApiLog.getReceiveResult()); | ||
| 66 | + }catch (Exception e){ | ||
| 67 | + log.error("updateIClearApiLog() error:"+e.getMessage()); | ||
| 68 | + } | ||
| 69 | + } | ||
| 70 | + | ||
| 71 | + | ||
| 62 | } | 72 | } | ... | ... |
| ... | @@ -2,6 +2,7 @@ package com.erry.iclear.dateInterface.service; | ... | @@ -2,6 +2,7 @@ package com.erry.iclear.dateInterface.service; |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | import lombok.extern.slf4j.Slf4j; | 4 | import lombok.extern.slf4j.Slf4j; |
| 5 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 5 | import org.springframework.stereotype.Service; | 6 | import org.springframework.stereotype.Service; |
| 6 | 7 | ||
| 7 | /** | 8 | /** |
| ... | @@ -11,11 +12,14 @@ import org.springframework.stereotype.Service; | ... | @@ -11,11 +12,14 @@ import org.springframework.stereotype.Service; |
| 11 | @Slf4j | 12 | @Slf4j |
| 12 | public class IClearApiSystemService { | 13 | public class IClearApiSystemService { |
| 13 | 14 | ||
| 15 | + @Autowired | ||
| 16 | + private AppInfoService appInfoService; | ||
| 17 | + | ||
| 14 | /** | 18 | /** |
| 15 | - * TODO 刷新缓存 | 19 | + * 刷新缓存 |
| 16 | */ | 20 | */ |
| 17 | - public void refreshCache(){ | 21 | + public void refreshAppInfoCache(){ |
| 18 | - | 22 | + appInfoService.initAppInfo(); |
| 19 | } | 23 | } |
| 20 | 24 | ||
| 21 | 25 | ... | ... |
| ... | @@ -52,9 +52,7 @@ public class MawbService { | ... | @@ -52,9 +52,7 @@ public class MawbService { |
| 52 | 52 | ||
| 53 | 53 | ||
| 54 | //checkResult= | 54 | //checkResult= |
| 55 | - log.info("checkMawb start>>>>>>>>>> mawb:"+gson.toJson(mawb) | 55 | + log.info("checkMawb start>>>>>>>>>> mawb:"+gson.toJson(mawb) +" result :" +checkResult ); |
| 56 | - +" result :" +checkResult | ||
| 57 | - ); | ||
| 58 | 56 | ||
| 59 | return checkResult; | 57 | return checkResult; |
| 60 | 58 | ||
| ... | @@ -64,6 +62,4 @@ public class MawbService { | ... | @@ -64,6 +62,4 @@ public class MawbService { |
| 64 | return Boolean.FALSE; | 62 | return Boolean.FALSE; |
| 65 | } | 63 | } |
| 66 | 64 | ||
| 67 | - | ||
| 68 | - | ||
| 69 | } | 65 | } | ... | ... |
| 1 | +package com.erry.iclear.dateInterface.service; | ||
| 2 | + | ||
| 3 | + | ||
| 4 | +import com.erry.iclear.dateInterface.common.Constant; | ||
| 5 | +import com.erry.iclear.dateInterface.entity.AppInfo; | ||
| 6 | +import com.erry.iclear.dateInterface.entity.DomesticDestinationMapping; | ||
| 7 | +import com.erry.iclear.dateInterface.entity.OrigplacecodeMapping; | ||
| 8 | +import com.erry.iclear.dateInterface.repository.OrigplacecodeMappingRepository; | ||
| 9 | +import lombok.extern.slf4j.Slf4j; | ||
| 10 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 11 | +import org.springframework.stereotype.Service; | ||
| 12 | + | ||
| 13 | +import java.util.ArrayList; | ||
| 14 | +import java.util.HashMap; | ||
| 15 | +import java.util.List; | ||
| 16 | + | ||
| 17 | +/** | ||
| 18 | + * @author Administrator | ||
| 19 | + */ | ||
| 20 | +@Service | ||
| 21 | +@Slf4j | ||
| 22 | +public class OrigplacecodeMappingService { | ||
| 23 | + | ||
| 24 | + @Autowired | ||
| 25 | + private OrigplacecodeMappingRepository origplacecodeMappingRepository; | ||
| 26 | + | ||
| 27 | + public List<OrigplacecodeMapping> findAllOrigplacecodeMapping(){ | ||
| 28 | + List<OrigplacecodeMapping> result = new ArrayList<>(); | ||
| 29 | + try{ | ||
| 30 | + result=origplacecodeMappingRepository.findAllOrigplacecodeMappingList(); | ||
| 31 | + }catch (Exception e){ | ||
| 32 | + log.error("findAllOrigplacecodeMapping() error:"+e.getMessage()); | ||
| 33 | + } | ||
| 34 | + return result; | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + | ||
| 38 | + | ||
| 39 | + /** | ||
| 40 | + * 初始化DomesticDestinationMapping | ||
| 41 | + */ | ||
| 42 | + public void initOrigplacecodeMapping() { | ||
| 43 | + try { | ||
| 44 | + List<OrigplacecodeMapping> domList = this.findAllOrigplacecodeMapping(); | ||
| 45 | + for (OrigplacecodeMapping dom : domList) { | ||
| 46 | + Constant.origplacecodeMappingCache.put(dom.getOrigplaceCode(), dom); | ||
| 47 | + } | ||
| 48 | + } catch (Exception e) { | ||
| 49 | + log.error("initDomesticDestinationMapping() error" + e.getMessage()); | ||
| 50 | + } | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + | ||
| 54 | + | ||
| 55 | + | ||
| 56 | + | ||
| 57 | + | ||
| 58 | + | ||
| 59 | + | ||
| 60 | + | ||
| 61 | +} |
| ... | @@ -12,7 +12,7 @@ import org.springframework.stereotype.Component; | ... | @@ -12,7 +12,7 @@ import org.springframework.stereotype.Component; |
| 12 | public class IClearApiTask { | 12 | public class IClearApiTask { |
| 13 | 13 | ||
| 14 | /** | 14 | /** |
| 15 | - * TODO 定时任务:每分钟推送 | 15 | + * TODO 定时任务:每分钟推送: 报关数据、回执 |
| 16 | */ | 16 | */ |
| 17 | @Scheduled(cron = "${task.pushMawbToIClear}") | 17 | @Scheduled(cron = "${task.pushMawbToIClear}") |
| 18 | public void pushMawbToIClear(){ | 18 | public void pushMawbToIClear(){ | ... | ... |
| 1 | +package com.erry.iclear.dateInterface.util; | ||
| 2 | + | ||
| 3 | +import java.io.UnsupportedEncodingException; | ||
| 4 | +import java.security.MessageDigest; | ||
| 5 | +import java.security.NoSuchAlgorithmException; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * @author Administrator | ||
| 9 | + */ | ||
| 10 | +public class SHA256Util { | ||
| 11 | + | ||
| 12 | + /** | ||
| 13 | + * 用java原生的摘要实现SHA256加密 | ||
| 14 | + * @param str 加密前的报文 | ||
| 15 | + * @return | ||
| 16 | + */ | ||
| 17 | + public static String getSHA256String(String str) { | ||
| 18 | + String encodeStr = ""; | ||
| 19 | + try { | ||
| 20 | + MessageDigest messageDigest = MessageDigest.getInstance("SHA-256"); | ||
| 21 | + messageDigest.update(str.getBytes("UTF-8")); | ||
| 22 | + encodeStr = byte2Hex(messageDigest.digest()); | ||
| 23 | + } catch (NoSuchAlgorithmException e) { | ||
| 24 | + e.printStackTrace(); | ||
| 25 | + } catch (UnsupportedEncodingException e) { | ||
| 26 | + e.printStackTrace(); | ||
| 27 | + throw new RuntimeException("SHA256签名过程中出现错误"); | ||
| 28 | + } | ||
| 29 | + return encodeStr; | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + /** | ||
| 33 | + * byte[]转为16进制 | ||
| 34 | + * | ||
| 35 | + * @param bytes | ||
| 36 | + * @return | ||
| 37 | + */ | ||
| 38 | + private static String byte2Hex(byte[] bytes) { | ||
| 39 | + StringBuffer stringBuffer = new StringBuffer(); | ||
| 40 | + for (int i = 0; i < bytes.length; i++) { | ||
| 41 | + String temp = Integer.toHexString(bytes[i] & 0xFF); | ||
| 42 | + if (temp.length() == 1) { | ||
| 43 | + stringBuffer.append("0"); | ||
| 44 | + } | ||
| 45 | + stringBuffer.append(temp); | ||
| 46 | + } | ||
| 47 | + return stringBuffer.toString(); | ||
| 48 | + } | ||
| 49 | +} |
| ... | @@ -13,7 +13,7 @@ public class ApiTest { | ... | @@ -13,7 +13,7 @@ public class ApiTest { |
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | public static void main(String[] args) { | 15 | public static void main(String[] args) { |
| 16 | - | 16 | + //{"IEFlag":"E","type":"EX","agentCode":"1111980005","agentName":"联邦快递(中国)有限公司","billNo":"202105210784","contrNo":"NO.565733","customMaster":"0101","cutMode":"101","declTrnRel":"0","distinatePort":"ASM000","ediId":"001","entryId":"25512456","feeCurr":"USD","feeMark":"3","feeRate":100.58,"grossWet":500,"IEPort":"0101","inputerName":"","insurCurr":"MOP","insurMark":"3","insurRate":23.44,"manualNo":"备案号","netWt":80,"otherCurr":"001","otherRate":10,"otherMark":"","ownerCode":"Z321654987","ownerName":"上海保险","packNo":1,"preEntryId":"","tradeCountry":"USA","tradeMode":"0200","tradeCode":"Z321654987","trafMode":"1","tradeName":"上海铢怡国际货物运输代理有限公司","transMode":"3","wrapType":"22","tradeCodeScc":"A74125896321456987","ownerCodeScc":"A74125896321456987","tradeAreaCode":"USA","markNo":"N/M","entyPortCode":"310302","goodsPlace":"","declareName":"张安","overseasConsignorCode":"Z785421","overseasConsigneeCode":"Z785421","overseasConsigneeEname":"出口时必填收件人公司名(原)","mawbDetailList":[{"classMark":"","codeTS":"69125472","declPrice":111.123,"declTotal":788,"dutyMode":"1","exgNo":"","exgVersion":"","firstUnit":"","firstQty":11,"GUnit":"007","GModel":"商品规格、型号","GName":"餐桌","GNo":"1","GQty":1,"originCountry":"USA","secondUnit":"007","secondQty":2,"tradeCurr":"USA","useTo":"","ciqCode":"","destinationCountry":"CHN","declGoodsEname":"","destCode":"","districtCode":"4408W"},{"classMark":"","codeTS":"69125472","declPrice":45.72,"declTotal":33,"dutyMode":"1","exgNo":"","exgVersion":"","firstUnit":"","firstQty":11,"GUnit":"007","GModel":"商品规格、型号","GName":"餐桌","GNo":"2","GQty":22,"originCountry":"USA","secondUnit":"007","secondQty":3,"tradeCurr":"USA","useTo":"","ciqCode":"","destinationCountry":"CHN","declGoodsEname":"","destCode":"","districtCode":"4408W"}]} |
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | MawbDetail d1 = new MawbDetail(); | 19 | MawbDetail d1 = new MawbDetail(); |
| ... | @@ -128,7 +128,7 @@ public class ApiTest { | ... | @@ -128,7 +128,7 @@ public class ApiTest { |
| 128 | mawb.setOverseasConsignorCode("Z785421"); | 128 | mawb.setOverseasConsignorCode("Z785421"); |
| 129 | mawb.setOverseasConsigneeCode("Z785421"); | 129 | mawb.setOverseasConsigneeCode("Z785421"); |
| 130 | mawb.setOverseasConsigneeEname("出口时必填收件人公司名(原)"); | 130 | mawb.setOverseasConsigneeEname("出口时必填收件人公司名(原)"); |
| 131 | - //mawb.setMawbDetailList(mawbDetailList); | 131 | + mawb.setMawbDetailList(mawbDetailList); |
| 132 | 132 | ||
| 133 | 133 | ||
| 134 | 134 | ... | ... |
| 1 | +package com.erry.iclear.dateInterface; | ||
| 2 | + | ||
| 3 | +import com.erry.iclear.dateInterface.util.SHA256Util; | ||
| 4 | + | ||
| 5 | +public class SHA256Test { | ||
| 6 | + | ||
| 7 | + public static void main(String[] args) { | ||
| 8 | + long time =System.currentTimeMillis(); | ||
| 9 | + System.out.println(time); | ||
| 10 | + String str = "CTM"+"iClearExport"+"b92131f03f19a348"+time; | ||
| 11 | + | ||
| 12 | + | ||
| 13 | + System.out.println(SHA256Util.getSHA256String(str)); | ||
| 14 | + | ||
| 15 | +// | ||
| 16 | +// 1623920478192 | ||
| 17 | +// eaf279997145f440ab5064e43f1a9cfdac15322886936801d57e022cde29919b | ||
| 18 | + } | ||
| 19 | +} |
-
Please register or login to post a comment