Merge remote-tracking branch 'origin/master'
# Conflicts: # src/main/java/com/erry/iclear/dateInterface/service/ApiService.java
Showing
35 changed files
with
3649 additions
and
158 deletions
No preview for this file type
| ... | @@ -96,13 +96,13 @@ public class CustomsDataInterface { | ... | @@ -96,13 +96,13 @@ public class CustomsDataInterface { |
| 96 | } | 96 | } |
| 97 | sw.stop(); | 97 | sw.stop(); |
| 98 | 98 | ||
| 99 | - //3、TODO 校验子单 | 99 | +// //3、TODO 校验子单 |
| 100 | - sw.start("checkMawbDetail"); | 100 | +// sw.start("checkMawbDetail"); |
| 101 | - result=mawbDetailServicel.checkMawbDetail(mawb); | 101 | +// result=mawbDetailServicel.checkMawbDetail(mawb); |
| 102 | - if(!result.getSuccess()){ | 102 | +// if(!result.getSuccess()){ |
| 103 | - return result; | 103 | +// return result; |
| 104 | - } | 104 | +// } |
| 105 | - sw.stop(); | 105 | +// sw.stop(); |
| 106 | 106 | ||
| 107 | 107 | ||
| 108 | //4、保存运单到iclear中 | 108 | //4、保存运单到iclear中 | ... | ... |
| ... | @@ -5,7 +5,6 @@ import io.swagger.annotations.ApiModelProperty; | ... | @@ -5,7 +5,6 @@ import io.swagger.annotations.ApiModelProperty; |
| 5 | import lombok.Data; | 5 | import lombok.Data; |
| 6 | import org.hibernate.annotations.DynamicInsert; | 6 | import org.hibernate.annotations.DynamicInsert; |
| 7 | import org.hibernate.annotations.DynamicUpdate; | 7 | import org.hibernate.annotations.DynamicUpdate; |
| 8 | -import org.springframework.validation.annotation.Validated; | ||
| 9 | 8 | ||
| 10 | import javax.persistence.*; | 9 | import javax.persistence.*; |
| 11 | import javax.validation.Valid; | 10 | import javax.validation.Valid; |
| ... | @@ -52,12 +51,12 @@ public class Mawb implements Serializable { | ... | @@ -52,12 +51,12 @@ public class Mawb implements Serializable { |
| 52 | private String type; | 51 | private String type; |
| 53 | 52 | ||
| 54 | @ApiModelProperty(value = "申报单位代码", name = "agentCode", example = "固定值:1111980005") | 53 | @ApiModelProperty(value = "申报单位代码", name = "agentCode", example = "固定值:1111980005") |
| 55 | - @NotBlank(message="参数agentCode不能为空") | 54 | + //@NotBlank(message="参数agentCode不能为空") |
| 56 | @Column(name = "AGENTCODE") | 55 | @Column(name = "AGENTCODE") |
| 57 | private String agentCode; | 56 | private String agentCode; |
| 58 | 57 | ||
| 59 | @ApiModelProperty(value = "申报单位名称", name = "agentName", example = "固定值:联邦快递(中国)有限公司") | 58 | @ApiModelProperty(value = "申报单位名称", name = "agentName", example = "固定值:联邦快递(中国)有限公司") |
| 60 | - @NotBlank(message="参数agentName不能为空") | 59 | + //@NotBlank(message="参数agentName不能为空") |
| 61 | @Column(name = "AGENTNAME") | 60 | @Column(name = "AGENTNAME") |
| 62 | private String agentName; | 61 | private String agentName; |
| 63 | 62 | ||
| ... | @@ -81,7 +80,7 @@ public class Mawb implements Serializable { | ... | @@ -81,7 +80,7 @@ public class Mawb implements Serializable { |
| 81 | private String cutMode; | 80 | private String cutMode; |
| 82 | 81 | ||
| 83 | @ApiModelProperty(value = "报关/转关关系标志", name = "declTrnRel", example = "固定值:0") | 82 | @ApiModelProperty(value = "报关/转关关系标志", name = "declTrnRel", example = "固定值:0") |
| 84 | - @NotBlank(message="参数declTrnRel不能为空") | 83 | + //@NotBlank(message="参数declTrnRel不能为空") |
| 85 | @Column(name = "DECLTRNREL") | 84 | @Column(name = "DECLTRNREL") |
| 86 | private String declTrnRel; | 85 | private String declTrnRel; |
| 87 | 86 | ||
| ... | @@ -117,7 +116,7 @@ public class Mawb implements Serializable { | ... | @@ -117,7 +116,7 @@ public class Mawb implements Serializable { |
| 117 | @ApiModelProperty(value = "毛重", name = "grossWet", example = "") | 116 | @ApiModelProperty(value = "毛重", name = "grossWet", example = "") |
| 118 | @NotNull(message="参数grossWet不能为空") | 117 | @NotNull(message="参数grossWet不能为空") |
| 119 | @Column(name = "CROSSWET") | 118 | @Column(name = "CROSSWET") |
| 120 | - private Integer grossWet; | 119 | + private BigDecimal grossWet; |
| 121 | 120 | ||
| 122 | @ApiModelProperty(value = "出入境关闭", name = "IEPort", example = "固定值:0101") | 121 | @ApiModelProperty(value = "出入境关闭", name = "IEPort", example = "固定值:0101") |
| 123 | @NotBlank(message="参数iePort不能为空") | 122 | @NotBlank(message="参数iePort不能为空") | ... | ... |
| 1 | package com.erry.iclear.dateInterface.api.request; | 1 | package com.erry.iclear.dateInterface.api.request; |
| 2 | 2 | ||
| 3 | -import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | import io.swagger.annotations.ApiModel; | 3 | import io.swagger.annotations.ApiModel; |
| 5 | import io.swagger.annotations.ApiModelProperty; | 4 | import io.swagger.annotations.ApiModelProperty; |
| 6 | import lombok.Data; | 5 | import lombok.Data; |
| 7 | -import org.springframework.validation.annotation.Validated; | ||
| 8 | 6 | ||
| 9 | import javax.persistence.*; | 7 | import javax.persistence.*; |
| 10 | import javax.validation.constraints.NotBlank; | 8 | import javax.validation.constraints.NotBlank; |
| ... | @@ -20,7 +18,7 @@ import java.math.BigDecimal; | ... | @@ -20,7 +18,7 @@ import java.math.BigDecimal; |
| 20 | @Entity | 18 | @Entity |
| 21 | @Table(name = "T_ICLEAR_API_MAWBDETAIL") | 19 | @Table(name = "T_ICLEAR_API_MAWBDETAIL") |
| 22 | @Data | 20 | @Data |
| 23 | -public class MawbDetail implements Serializable { | 21 | +public class MawbDetail implements Serializable{ |
| 24 | 22 | ||
| 25 | private static final long serialVersionUID = -6706944312498119267L; | 23 | private static final long serialVersionUID = -6706944312498119267L; |
| 26 | @Id | 24 | @Id |
| ... | @@ -38,7 +36,7 @@ public class MawbDetail implements Serializable { | ... | @@ -38,7 +36,7 @@ public class MawbDetail implements Serializable { |
| 38 | @NotBlank(message="参数detailId不能为空") | 36 | @NotBlank(message="参数detailId不能为空") |
| 39 | private String detailId; | 37 | private String detailId; |
| 40 | 38 | ||
| 41 | - @ApiModelProperty(value = "商品编号", example = "空值") | 39 | + @ApiModelProperty(value = "归类标志", example = "空值") |
| 42 | @Column(name = "CLASSMARK") | 40 | @Column(name = "CLASSMARK") |
| 43 | private String classMark; | 41 | private String classMark; |
| 44 | 42 | ||
| ... | @@ -66,7 +64,7 @@ public class MawbDetail implements Serializable { | ... | @@ -66,7 +64,7 @@ public class MawbDetail implements Serializable { |
| 66 | @Column(name = "EXGNO") | 64 | @Column(name = "EXGNO") |
| 67 | private String exgNo; | 65 | private String exgNo; |
| 68 | 66 | ||
| 69 | - @ApiModelProperty(value = "货号") | 67 | + @ApiModelProperty(value = "版本号") |
| 70 | @Column(name = "EXGVERSION") | 68 | @Column(name = "EXGVERSION") |
| 71 | private String exgVersion; | 69 | private String exgVersion; |
| 72 | 70 | ... | ... |
| 1 | +package com.erry.iclear.dateInterface.api.response; | ||
| 2 | + | ||
| 3 | +import lombok.AllArgsConstructor; | ||
| 4 | +import lombok.Data; | ||
| 5 | + | ||
| 6 | +import java.io.Serializable; | ||
| 7 | + | ||
| 8 | +@Data | ||
| 9 | +@AllArgsConstructor | ||
| 10 | +public class IClearCheckResponseResult implements Serializable { | ||
| 11 | + //成功标识 | ||
| 12 | + private Boolean success = false; | ||
| 13 | + private String message; | ||
| 14 | +} |
| ... | @@ -88,7 +88,7 @@ public class Constant { | ... | @@ -88,7 +88,7 @@ public class Constant { |
| 88 | 88 | ||
| 89 | public static String DECLARED_DOC_TYPE="declaredDocType_"; | 89 | public static String DECLARED_DOC_TYPE="declaredDocType_"; |
| 90 | 90 | ||
| 91 | - | 91 | + public static String DECLARED_DOC_TYPE_ZERO="declaredDocType_00"; |
| 92 | 92 | ||
| 93 | 93 | ||
| 94 | } | 94 | } | ... | ... |
| ... | @@ -221,6 +221,11 @@ public class ChmConsignment implements Serializable { | ... | @@ -221,6 +221,11 @@ public class ChmConsignment implements Serializable { |
| 221 | @Column(name = "TRADE_CO_SCC") | 221 | @Column(name = "TRADE_CO_SCC") |
| 222 | private String tradeCoSCC; | 222 | private String tradeCoSCC; |
| 223 | 223 | ||
| 224 | + /** | ||
| 225 | + * 境内发货人(经营单位编码) | ||
| 226 | + */ | ||
| 227 | + @Column(name = "OPERATE_UNIT_CODE") | ||
| 228 | + private String operateUnitCode; | ||
| 224 | 229 | ||
| 225 | /** | 230 | /** |
| 226 | * 境内发货人(经营单位名称) | 231 | * 境内发货人(经营单位名称) | ... | ... |
| ... | @@ -33,6 +33,9 @@ public class DictionaryEntries implements Serializable { | ... | @@ -33,6 +33,9 @@ public class DictionaryEntries implements Serializable { |
| 33 | @Column(name = "DICT_CODE") | 33 | @Column(name = "DICT_CODE") |
| 34 | private String dictCode; | 34 | private String dictCode; |
| 35 | 35 | ||
| 36 | + @Column(name = "EXT2") | ||
| 37 | + private String ext2; | ||
| 38 | + | ||
| 36 | @Column(name = "EXT3") | 39 | @Column(name = "EXT3") |
| 37 | private String ext3; | 40 | private String ext3; |
| 38 | 41 | ... | ... |
| 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 | + * @Description | ||
| 11 | + * @Author baodan_Fan | ||
| 12 | + * @Date 2021-08-12 | ||
| 13 | + */ | ||
| 14 | + | ||
| 15 | +@Entity | ||
| 16 | +@Table ( name ="T_ICLEAR_BOND_INVT_ACMP_FORM_DT" ) | ||
| 17 | +@Data | ||
| 18 | +public class TIclearBondInvtAcmpFormDt implements Serializable { | ||
| 19 | + private static final long serialVersionUID = 1660893336343224503L; | ||
| 20 | + @Id | ||
| 21 | + @GeneratedValue | ||
| 22 | + /** | ||
| 23 | + * 主键 | ||
| 24 | + */ | ||
| 25 | + @Column(name = "ID" ) | ||
| 26 | + private Long id; | ||
| 27 | + | ||
| 28 | + /** | ||
| 29 | + * 保税清单编号 | ||
| 30 | + */ | ||
| 31 | + @Column(name = "BOND_INVT_NO" ) | ||
| 32 | + private String bondInvtNo; | ||
| 33 | + | ||
| 34 | + /** | ||
| 35 | + * 变更次数 | ||
| 36 | + */ | ||
| 37 | + @Column(name = "CHG_TMS_CNT" ) | ||
| 38 | + private Long chgTmsCnt; | ||
| 39 | + | ||
| 40 | + /** | ||
| 41 | + * 随附单证序号 | ||
| 42 | + */ | ||
| 43 | + @Column(name = "ACMP_FORM_SEQNO" ) | ||
| 44 | + private Long acmpFormSeqno; | ||
| 45 | + | ||
| 46 | + /** | ||
| 47 | + * 清单商品序号 | ||
| 48 | + */ | ||
| 49 | + @Column(name = "INVT_GDS_SEQNO" ) | ||
| 50 | + private Long invtGdsSeqno; | ||
| 51 | + | ||
| 52 | + /** | ||
| 53 | + * 单证类型代码 | ||
| 54 | + */ | ||
| 55 | + @Column(name = "FORM_TYPECD" ) | ||
| 56 | + private String formTypecd; | ||
| 57 | + | ||
| 58 | + /** | ||
| 59 | + * 单证编号 | ||
| 60 | + */ | ||
| 61 | + @Column(name = "FORM_NO" ) | ||
| 62 | + private String formNo; | ||
| 63 | + | ||
| 64 | + /** | ||
| 65 | + * 固定编号 | ||
| 66 | + */ | ||
| 67 | + @Column(name = "FIXD_NO" ) | ||
| 68 | + private String fixdNo; | ||
| 69 | + | ||
| 70 | + /** | ||
| 71 | + * 随附单证文件名称 | ||
| 72 | + */ | ||
| 73 | + @Column(name = "ACMP_FORM_FILE_NM" ) | ||
| 74 | + private String acmpFormFileNm; | ||
| 75 | + | ||
| 76 | + /** | ||
| 77 | + * 备注 | ||
| 78 | + */ | ||
| 79 | + @Column(name = "RMK" ) | ||
| 80 | + private String rmk; | ||
| 81 | + | ||
| 82 | + /** | ||
| 83 | + * 创建时间 | ||
| 84 | + */ | ||
| 85 | + @Column(name = "CREATE_TIME" ) | ||
| 86 | + private Date createTime; | ||
| 87 | + | ||
| 88 | + /** | ||
| 89 | + * 创建人 | ||
| 90 | + */ | ||
| 91 | + @Column(name = "CREATOR" ) | ||
| 92 | + private String creator; | ||
| 93 | + | ||
| 94 | + /** | ||
| 95 | + * 修改时间 | ||
| 96 | + */ | ||
| 97 | + @Column(name = "UPDATE_TIME" ) | ||
| 98 | + private Date updateTime; | ||
| 99 | + | ||
| 100 | + /** | ||
| 101 | + * 修改人 | ||
| 102 | + */ | ||
| 103 | + @Column(name = "UPDATE_USER" ) | ||
| 104 | + private String updateUser; | ||
| 105 | + | ||
| 106 | +} |
| 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.math.BigDecimal; | ||
| 8 | +import java.util.Date; | ||
| 9 | +import java.util.Date; | ||
| 10 | + | ||
| 11 | +/** | ||
| 12 | + * @Description | ||
| 13 | + * @Author baodan_Fan | ||
| 14 | + * @Date 2021-08-12 | ||
| 15 | + */ | ||
| 16 | + | ||
| 17 | +@Entity | ||
| 18 | +@Table ( name ="T_ICLEAR_BOND_INVT_BSC" ) | ||
| 19 | +@Data | ||
| 20 | +public class TIclearBondInvtBsc implements Serializable { | ||
| 21 | + private static final long serialVersionUID = 4784112777138222040L; | ||
| 22 | + @Id | ||
| 23 | + @GeneratedValue | ||
| 24 | + /** | ||
| 25 | + * 主键 | ||
| 26 | + */ | ||
| 27 | + @Column(name = "ID" ) | ||
| 28 | + private Long id; | ||
| 29 | + | ||
| 30 | + /** | ||
| 31 | + * 保税清单编号 | ||
| 32 | + */ | ||
| 33 | + @Column(name = "BOND_INVT_NO" ) | ||
| 34 | + private String bondInvtNo; | ||
| 35 | + | ||
| 36 | + /** | ||
| 37 | + * 变更次数 | ||
| 38 | + */ | ||
| 39 | + @Column(name = "CHG_TMS_CNT" ) | ||
| 40 | + private Long chgTmsCnt; | ||
| 41 | + | ||
| 42 | + /** | ||
| 43 | + * 清单预录入编号 | ||
| 44 | + */ | ||
| 45 | + @Column(name = "INVT_PREENT_NO" ) | ||
| 46 | + private String invtPreentNo; | ||
| 47 | + | ||
| 48 | + /** | ||
| 49 | + * 备案编号 | ||
| 50 | + */ | ||
| 51 | + @Column(name = "PUTREC_NO" ) | ||
| 52 | + private String putrecNo; | ||
| 53 | + | ||
| 54 | + /** | ||
| 55 | + * 企业内部清单编号 | ||
| 56 | + */ | ||
| 57 | + @Column(name = "ETPS_INNER_INVT_NO" ) | ||
| 58 | + private String etpsInnerInvtNo; | ||
| 59 | + | ||
| 60 | + /** | ||
| 61 | + * 经营企业社会信用代码 | ||
| 62 | + */ | ||
| 63 | + @Column(name = "BIZOP_ETPS_SCCD" ) | ||
| 64 | + private String bizopEtpsSccd; | ||
| 65 | + | ||
| 66 | + /** | ||
| 67 | + * 经营企业编号 | ||
| 68 | + */ | ||
| 69 | + @Column(name = "BIZOP_ETPSNO" ) | ||
| 70 | + private String bizopEtpsno; | ||
| 71 | + | ||
| 72 | + /** | ||
| 73 | + * 经营企业名称 | ||
| 74 | + */ | ||
| 75 | + @Column(name = "BIZOP_ETPS_NM" ) | ||
| 76 | + private String bizopEtpsNm; | ||
| 77 | + | ||
| 78 | + /** | ||
| 79 | + * 收发货企业社会信用代码 | ||
| 80 | + */ | ||
| 81 | + @Column(name = "RVSNGD_ETPS_SCCD" ) | ||
| 82 | + private String rvsngdEtpsSccd; | ||
| 83 | + | ||
| 84 | + /** | ||
| 85 | + * 收货企业编号 | ||
| 86 | + */ | ||
| 87 | + @Column(name = "RCVGD_ETPSNO" ) | ||
| 88 | + private String rcvgdEtpsno; | ||
| 89 | + | ||
| 90 | + /** | ||
| 91 | + * 收货企业名称 | ||
| 92 | + */ | ||
| 93 | + @Column(name = "RCVGD_ETPS_NM" ) | ||
| 94 | + private String rcvgdEtpsNm; | ||
| 95 | + | ||
| 96 | + /** | ||
| 97 | + * 申报企业社会信用代码 | ||
| 98 | + */ | ||
| 99 | + @Column(name = "DCL_ETPS_SCCD" ) | ||
| 100 | + private String dclEtpsSccd; | ||
| 101 | + | ||
| 102 | + /** | ||
| 103 | + * 申报企业编号 | ||
| 104 | + */ | ||
| 105 | + @Column(name = "DCL_ETPSNO" ) | ||
| 106 | + private String dclEtpsno; | ||
| 107 | + | ||
| 108 | + /** | ||
| 109 | + * 申报企业名称 | ||
| 110 | + */ | ||
| 111 | + @Column(name = "DCL_ETPS_NM" ) | ||
| 112 | + private String dclEtpsNm; | ||
| 113 | + | ||
| 114 | + /** | ||
| 115 | + * 清单申报日期 | ||
| 116 | + */ | ||
| 117 | + @Column(name = "INVT_DCL_TIME" ) | ||
| 118 | + private Date invtDclTime; | ||
| 119 | + | ||
| 120 | + /** | ||
| 121 | + * 报关单申报时间 | ||
| 122 | + */ | ||
| 123 | + @Column(name = "ENTRY_DCL_TIME" ) | ||
| 124 | + private Date entryDclTime; | ||
| 125 | + | ||
| 126 | + /** | ||
| 127 | + * 报关单编号 | ||
| 128 | + */ | ||
| 129 | + @Column(name = "ENTRY_NO" ) | ||
| 130 | + private String entryNo; | ||
| 131 | + | ||
| 132 | + /** | ||
| 133 | + * 关联清单编号 | ||
| 134 | + */ | ||
| 135 | + @Column(name = "RLT_INVT_NO" ) | ||
| 136 | + private String rltInvtNo; | ||
| 137 | + | ||
| 138 | + /** | ||
| 139 | + * 关联备案编号 | ||
| 140 | + */ | ||
| 141 | + @Column(name = "RLT_PUTREC_NO" ) | ||
| 142 | + private String rltPutrecNo; | ||
| 143 | + | ||
| 144 | + /** | ||
| 145 | + * 关联报关单编号 | ||
| 146 | + */ | ||
| 147 | + @Column(name = "RLT_ENTRY_NO" ) | ||
| 148 | + private String rltEntryNo; | ||
| 149 | + | ||
| 150 | + /** | ||
| 151 | + * 关联报关单境内收发货人社会信用代码 | ||
| 152 | + */ | ||
| 153 | + @Column(name = "RLT_ENTRY_BIZOP_ETPS_SCCD" ) | ||
| 154 | + private String rltEntryBizopEtpsSccd; | ||
| 155 | + | ||
| 156 | + /** | ||
| 157 | + * 关联报关单境内收发货人编号 | ||
| 158 | + */ | ||
| 159 | + @Column(name = "RLT_ENTRY_BIZOP_ETPSNO" ) | ||
| 160 | + private String rltEntryBizopEtpsno; | ||
| 161 | + | ||
| 162 | + /** | ||
| 163 | + * 关联报关单境内收发货人名称 | ||
| 164 | + */ | ||
| 165 | + @Column(name = "RLT_ENTRY_BIZOP_ETPS_NM" ) | ||
| 166 | + private String rltEntryBizopEtpsNm; | ||
| 167 | + | ||
| 168 | + /** | ||
| 169 | + * 进出境关别 | ||
| 170 | + */ | ||
| 171 | + @Column(name = "IMPEXP_PORTCD" ) | ||
| 172 | + private String impexpPortcd; | ||
| 173 | + | ||
| 174 | + /** | ||
| 175 | + * 申报地关区代码 | ||
| 176 | + */ | ||
| 177 | + @Column(name = "DCL_PLC_CUSCD" ) | ||
| 178 | + private String dclPlcCuscd; | ||
| 179 | + | ||
| 180 | + /** | ||
| 181 | + * 进出口标记代码 | ||
| 182 | + */ | ||
| 183 | + @Column(name = "IMPEXP_MARKCD" ) | ||
| 184 | + private String impexpMarkcd; | ||
| 185 | + | ||
| 186 | + /** | ||
| 187 | + * 料件成品标记代码 | ||
| 188 | + */ | ||
| 189 | + @Column(name = "MTPCK_ENDPRD_MARKCD" ) | ||
| 190 | + private String mtpckEndprdMarkcd; | ||
| 191 | + | ||
| 192 | + /** | ||
| 193 | + * 监管方式代码 | ||
| 194 | + */ | ||
| 195 | + @Column(name = "SUPV_MODECD" ) | ||
| 196 | + private String supvModecd; | ||
| 197 | + | ||
| 198 | + /** | ||
| 199 | + * 运输方式代码 | ||
| 200 | + */ | ||
| 201 | + @Column(name = "TRSP_MODECD" ) | ||
| 202 | + private String trspModecd; | ||
| 203 | + | ||
| 204 | + /** | ||
| 205 | + * 起运/运抵国(地区) | ||
| 206 | + */ | ||
| 207 | + @Column(name = "STSHIP_TRSARV_NATCD" ) | ||
| 208 | + private String stshipTrsarvNatcd; | ||
| 209 | + | ||
| 210 | + /** | ||
| 211 | + * 申请编号 | ||
| 212 | + */ | ||
| 213 | + @Column(name = "APPLY_NO" ) | ||
| 214 | + private String applyNo; | ||
| 215 | + | ||
| 216 | + /** | ||
| 217 | + * 是否报关标志 | ||
| 218 | + */ | ||
| 219 | + @Column(name = "DCLCUS_FLAG" ) | ||
| 220 | + private String dclcusFlag; | ||
| 221 | + | ||
| 222 | + /** | ||
| 223 | + * 报关类型代码 | ||
| 224 | + */ | ||
| 225 | + @Column(name = "DCLCUS_TYPECD" ) | ||
| 226 | + private String dclcusTypecd; | ||
| 227 | + | ||
| 228 | + /** | ||
| 229 | + * 预核扣时间 | ||
| 230 | + */ | ||
| 231 | + @Column(name = "PREVD_TIME" ) | ||
| 232 | + private Date prevdTime; | ||
| 233 | + | ||
| 234 | + /** | ||
| 235 | + * 正式核扣时间 | ||
| 236 | + */ | ||
| 237 | + @Column(name = "FORMAL_VRFDED_TIME" ) | ||
| 238 | + private Date formalVrfdedTime; | ||
| 239 | + | ||
| 240 | + /** | ||
| 241 | + * 清单进出卡口状态代码 | ||
| 242 | + */ | ||
| 243 | + @Column(name = "INVT_IOCHKPT_STUCD" ) | ||
| 244 | + private String invtIochkptStucd; | ||
| 245 | + | ||
| 246 | + /** | ||
| 247 | + * 核扣标记代码 | ||
| 248 | + */ | ||
| 249 | + @Column(name = "VRFDED_MARKCD" ) | ||
| 250 | + private String vrfdedMarkcd; | ||
| 251 | + | ||
| 252 | + /** | ||
| 253 | + * 清单状态代码 | ||
| 254 | + */ | ||
| 255 | + @Column(name = "INVT_STUCD" ) | ||
| 256 | + private String invtStucd; | ||
| 257 | + | ||
| 258 | + /** | ||
| 259 | + * 核扣方式代码 | ||
| 260 | + */ | ||
| 261 | + @Column(name = "VRFDED_MODECD" ) | ||
| 262 | + private String vrfdedModecd; | ||
| 263 | + | ||
| 264 | + /** | ||
| 265 | + * 核算代码 | ||
| 266 | + */ | ||
| 267 | + @Column(name = "DU_CODE" ) | ||
| 268 | + private String duCode; | ||
| 269 | + | ||
| 270 | + /** | ||
| 271 | + * 备注 | ||
| 272 | + */ | ||
| 273 | + @Column(name = "RMK" ) | ||
| 274 | + private String rmk; | ||
| 275 | + | ||
| 276 | + /** | ||
| 277 | + * 清单类型 | ||
| 278 | + */ | ||
| 279 | + @Column(name = "BOND_INVT_TYPECD" ) | ||
| 280 | + private String bondInvtTypecd; | ||
| 281 | + | ||
| 282 | + /** | ||
| 283 | + * 报关状态 | ||
| 284 | + */ | ||
| 285 | + @Column(name = "ENTRY_STUCD" ) | ||
| 286 | + private String entryStucd; | ||
| 287 | + | ||
| 288 | + /** | ||
| 289 | + * 核放单生成标志代码 | ||
| 290 | + */ | ||
| 291 | + @Column(name = "PASSPORT_USED_TYPECD" ) | ||
| 292 | + private String passportUsedTypecd; | ||
| 293 | + | ||
| 294 | + /** | ||
| 295 | + * 备用1 | ||
| 296 | + */ | ||
| 297 | + @Column(name = "PARAM1" ) | ||
| 298 | + private String param1; | ||
| 299 | + | ||
| 300 | + /** | ||
| 301 | + * 备用2 | ||
| 302 | + */ | ||
| 303 | + @Column(name = "PARAM2" ) | ||
| 304 | + private String param2; | ||
| 305 | + | ||
| 306 | + /** | ||
| 307 | + * 备用3 | ||
| 308 | + */ | ||
| 309 | + @Column(name = "PARAM3" ) | ||
| 310 | + private BigDecimal param3; | ||
| 311 | + | ||
| 312 | + /** | ||
| 313 | + * 备用4 | ||
| 314 | + */ | ||
| 315 | + @Column(name = "PARAM4" ) | ||
| 316 | + private Date param4; | ||
| 317 | + | ||
| 318 | + /** | ||
| 319 | + * 报关单同步修改标志 | ||
| 320 | + */ | ||
| 321 | + @Column(name = "NEED_ENTRY_MODIFIED" ) | ||
| 322 | + private String needEntryModified; | ||
| 323 | + | ||
| 324 | + /** | ||
| 325 | + * 计征金额 | ||
| 326 | + */ | ||
| 327 | + @Column(name = "LEVY_BL_AMT" ) | ||
| 328 | + private BigDecimal levyBlAmt; | ||
| 329 | + | ||
| 330 | + /** | ||
| 331 | + * 申报类型 | ||
| 332 | + */ | ||
| 333 | + @Column(name = "DCL_TYPECD" ) | ||
| 334 | + private String dclTypecd; | ||
| 335 | + | ||
| 336 | + /** | ||
| 337 | + * 创建时间 | ||
| 338 | + */ | ||
| 339 | + @Column(name = "CREATE_TIME" ) | ||
| 340 | + private Date createTime; | ||
| 341 | + | ||
| 342 | + /** | ||
| 343 | + * 创建人 | ||
| 344 | + */ | ||
| 345 | + @Column(name = "CREATOR" ) | ||
| 346 | + private String creator; | ||
| 347 | + | ||
| 348 | + /** | ||
| 349 | + * 修改时间 | ||
| 350 | + */ | ||
| 351 | + @Column(name = "UPDATE_TIME" ) | ||
| 352 | + private Date updateTime; | ||
| 353 | + | ||
| 354 | + /** | ||
| 355 | + * 修改人 | ||
| 356 | + */ | ||
| 357 | + @Column(name = "UPDATE_USER" ) | ||
| 358 | + private String updateUser; | ||
| 359 | + | ||
| 360 | +} |
| 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.math.BigDecimal; | ||
| 8 | +import java.util.Date; | ||
| 9 | +import java.util.Date; | ||
| 10 | + | ||
| 11 | +/** | ||
| 12 | + * @Description | ||
| 13 | + * @Author baodan_Fan | ||
| 14 | + * @Date 2021-08-12 | ||
| 15 | + */ | ||
| 16 | + | ||
| 17 | +@Entity | ||
| 18 | +@Table ( name ="T_ICLEAR_BOND_INVT_DT" ) | ||
| 19 | +@Data | ||
| 20 | +public class TIclearBondInvtDt implements Serializable { | ||
| 21 | + private static final long serialVersionUID = 7963662019548366386L; | ||
| 22 | + @Id | ||
| 23 | + @GeneratedValue | ||
| 24 | + @Column(name = "ID" ) | ||
| 25 | + private Long id; | ||
| 26 | + | ||
| 27 | + /** | ||
| 28 | + * 保税清单编号 | ||
| 29 | + */ | ||
| 30 | + @Column(name = "BOND_INVT_NO" ) | ||
| 31 | + private String bondInvtNo; | ||
| 32 | + | ||
| 33 | + /** | ||
| 34 | + * 变更次数 | ||
| 35 | + */ | ||
| 36 | + @Column(name = "CHG_TMS_CNT" ) | ||
| 37 | + private Long chgTmsCnt; | ||
| 38 | + | ||
| 39 | + /** | ||
| 40 | + * 商品序号 | ||
| 41 | + */ | ||
| 42 | + @Column(name = "GDS_SEQNO" ) | ||
| 43 | + private Long gdsSeqno; | ||
| 44 | + | ||
| 45 | + /** | ||
| 46 | + * 备案序号 | ||
| 47 | + */ | ||
| 48 | + @Column(name = "PUTREC_SEQNO" ) | ||
| 49 | + private Long putrecSeqno; | ||
| 50 | + | ||
| 51 | + /** | ||
| 52 | + * 商品料号 | ||
| 53 | + */ | ||
| 54 | + @Column(name = "GDS_MTNO" ) | ||
| 55 | + private String gdsMtno; | ||
| 56 | + | ||
| 57 | + /** | ||
| 58 | + * 商品编码 | ||
| 59 | + */ | ||
| 60 | + @Column(name = "GDECD" ) | ||
| 61 | + private String gdecd; | ||
| 62 | + | ||
| 63 | + /** | ||
| 64 | + * 商品名称 | ||
| 65 | + */ | ||
| 66 | + @Column(name = "GDS_NM" ) | ||
| 67 | + private String gdsNm; | ||
| 68 | + | ||
| 69 | + /** | ||
| 70 | + * 商品规格型号描述 | ||
| 71 | + */ | ||
| 72 | + @Column(name = "GDS_SPCF_MODEL_DESC" ) | ||
| 73 | + private String gdsSpcfModelDesc; | ||
| 74 | + | ||
| 75 | + /** | ||
| 76 | + * 申报计量单位 | ||
| 77 | + */ | ||
| 78 | + @Column(name = "DCL_UNITCD" ) | ||
| 79 | + private String dclUnitcd; | ||
| 80 | + | ||
| 81 | + /** | ||
| 82 | + * 法定计量单位 | ||
| 83 | + */ | ||
| 84 | + @Column(name = "LAWF_UNITCD" ) | ||
| 85 | + private String lawfUnitcd; | ||
| 86 | + | ||
| 87 | + /** | ||
| 88 | + * 法定第二计量 | ||
| 89 | + */ | ||
| 90 | + @Column(name = "SECD_LAWF_UNITCD" ) | ||
| 91 | + private String secdLawfUnitcd; | ||
| 92 | + | ||
| 93 | + /** | ||
| 94 | + * 原产国(地区) | ||
| 95 | + */ | ||
| 96 | + @Column(name = "NATCD" ) | ||
| 97 | + private String natcd; | ||
| 98 | + | ||
| 99 | + /** | ||
| 100 | + * 申报单价金额 | ||
| 101 | + */ | ||
| 102 | + @Column(name = "DCL_UPRC_AMT" ) | ||
| 103 | + private BigDecimal dclUprcAmt; | ||
| 104 | + | ||
| 105 | + /** | ||
| 106 | + * 申报总金额 | ||
| 107 | + */ | ||
| 108 | + @Column(name = "DCL_TOTAL_AMT" ) | ||
| 109 | + private BigDecimal dclTotalAmt; | ||
| 110 | + | ||
| 111 | + /** | ||
| 112 | + * 美元统计总金额 | ||
| 113 | + */ | ||
| 114 | + @Column(name = "USD_STAT_TOTAL_AMT" ) | ||
| 115 | + private BigDecimal usdStatTotalAmt; | ||
| 116 | + | ||
| 117 | + /** | ||
| 118 | + * 申报币制代码 | ||
| 119 | + */ | ||
| 120 | + @Column(name = "DCL_CURRCD" ) | ||
| 121 | + private String dclCurrcd; | ||
| 122 | + | ||
| 123 | + /** | ||
| 124 | + * 法定数量 | ||
| 125 | + */ | ||
| 126 | + @Column(name = "LAWF_QTY" ) | ||
| 127 | + private BigDecimal lawfQty; | ||
| 128 | + | ||
| 129 | + /** | ||
| 130 | + * 第二法定数量 | ||
| 131 | + */ | ||
| 132 | + @Column(name = "SECD_LAWF_QTY" ) | ||
| 133 | + private BigDecimal secdLawfQty; | ||
| 134 | + | ||
| 135 | + /** | ||
| 136 | + * 重量比例因子值 | ||
| 137 | + */ | ||
| 138 | + @Column(name = "WT_SF_VAL" ) | ||
| 139 | + private BigDecimal wtSfVal; | ||
| 140 | + | ||
| 141 | + /** | ||
| 142 | + * 第一比例因子 | ||
| 143 | + */ | ||
| 144 | + @Column(name = "FST_SF_VAL" ) | ||
| 145 | + private BigDecimal fstSfVal; | ||
| 146 | + | ||
| 147 | + /** | ||
| 148 | + * 第二比例因子 | ||
| 149 | + */ | ||
| 150 | + @Column(name = "SECD_SF_VAL" ) | ||
| 151 | + private BigDecimal secdSfVal; | ||
| 152 | + | ||
| 153 | + /** | ||
| 154 | + * 申报数量 | ||
| 155 | + */ | ||
| 156 | + @Column(name = "DCL_QTY" ) | ||
| 157 | + private BigDecimal dclQty; | ||
| 158 | + | ||
| 159 | + /** | ||
| 160 | + * 毛重量 | ||
| 161 | + */ | ||
| 162 | + @Column(name = "GROSS_WT" ) | ||
| 163 | + private BigDecimal grossWt; | ||
| 164 | + | ||
| 165 | + /** | ||
| 166 | + * 净重量 | ||
| 167 | + */ | ||
| 168 | + @Column(name = "NET_WT" ) | ||
| 169 | + private BigDecimal netWt; | ||
| 170 | + | ||
| 171 | + /** | ||
| 172 | + * 征减免方式代码 | ||
| 173 | + */ | ||
| 174 | + @Column(name = "LVYRLF_MODECD" ) | ||
| 175 | + private String lvyrlfModecd; | ||
| 176 | + | ||
| 177 | + /** | ||
| 178 | + * 账册备案单耗明细版本号 | ||
| 179 | + */ | ||
| 180 | + @Column(name = "UCNS_VERNO" ) | ||
| 181 | + private String ucnsVerno; | ||
| 182 | + | ||
| 183 | + /** | ||
| 184 | + * 报关单商品序号 | ||
| 185 | + */ | ||
| 186 | + @Column(name = "ENTRY_GDS_SEQNO" ) | ||
| 187 | + private Long entryGdsSeqno; | ||
| 188 | + | ||
| 189 | + /** | ||
| 190 | + * 申请表序号 | ||
| 191 | + */ | ||
| 192 | + @Column(name = "APPLY_TB_SEQNO" ) | ||
| 193 | + private Long applyTbSeqno; | ||
| 194 | + | ||
| 195 | + /** | ||
| 196 | + * 归类标记代码 | ||
| 197 | + */ | ||
| 198 | + @Column(name = "CLY_MARKCD" ) | ||
| 199 | + private String clyMarkcd; | ||
| 200 | + | ||
| 201 | + /** | ||
| 202 | + * 备注 | ||
| 203 | + */ | ||
| 204 | + @Column(name = "RMK" ) | ||
| 205 | + private String rmk; | ||
| 206 | + | ||
| 207 | + /** | ||
| 208 | + * 实际过卡数量 | ||
| 209 | + */ | ||
| 210 | + @Column(name = "ACTL_PASS_QTY" ) | ||
| 211 | + private BigDecimal actlPassQty; | ||
| 212 | + | ||
| 213 | + /** | ||
| 214 | + * 核放单已用数量 | ||
| 215 | + */ | ||
| 216 | + @Column(name = "PASSPORT_USED_QTY" ) | ||
| 217 | + private BigDecimal passportUsedQty; | ||
| 218 | + | ||
| 219 | + /** | ||
| 220 | + * 备用1 | ||
| 221 | + */ | ||
| 222 | + @Column(name = "PARAM1" ) | ||
| 223 | + private String param1; | ||
| 224 | + | ||
| 225 | + /** | ||
| 226 | + * 备用2 | ||
| 227 | + */ | ||
| 228 | + @Column(name = "PARAM2" ) | ||
| 229 | + private String param2; | ||
| 230 | + | ||
| 231 | + /** | ||
| 232 | + * 备用3 | ||
| 233 | + */ | ||
| 234 | + @Column(name = "PARAM3" ) | ||
| 235 | + private BigDecimal param3; | ||
| 236 | + | ||
| 237 | + /** | ||
| 238 | + * 备用4 | ||
| 239 | + */ | ||
| 240 | + @Column(name = "PARAM4" ) | ||
| 241 | + private Date param4; | ||
| 242 | + | ||
| 243 | + /** | ||
| 244 | + * 最终目的国(地区) | ||
| 245 | + */ | ||
| 246 | + @Column(name = "DESTINATION_NATCD" ) | ||
| 247 | + private String destinationNatcd; | ||
| 248 | + | ||
| 249 | + /** | ||
| 250 | + * 修改标志 | ||
| 251 | + */ | ||
| 252 | + @Column(name = "MODF_MARKCD" ) | ||
| 253 | + private String modfMarkcd; | ||
| 254 | + | ||
| 255 | + | ||
| 256 | + /** | ||
| 257 | + * 创建时间 | ||
| 258 | + */ | ||
| 259 | + @Column(name = "CREATE_TIME" ) | ||
| 260 | + private Date createTime; | ||
| 261 | + | ||
| 262 | + /** | ||
| 263 | + * 创建人 | ||
| 264 | + */ | ||
| 265 | + @Column(name = "CREATOR" ) | ||
| 266 | + private String creator; | ||
| 267 | + | ||
| 268 | + /** | ||
| 269 | + * 修改时间 | ||
| 270 | + */ | ||
| 271 | + @Column(name = "UPDATE_TIME" ) | ||
| 272 | + private Date updateTime; | ||
| 273 | + | ||
| 274 | + /** | ||
| 275 | + * 修改人 | ||
| 276 | + */ | ||
| 277 | + @Column(name = "UPDATE_USER" ) | ||
| 278 | + private String updateUser; | ||
| 279 | + | ||
| 280 | +} |
| 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.math.BigDecimal; | ||
| 8 | +import java.util.Date; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * @Description | ||
| 12 | + * @Author baodan_Fan | ||
| 13 | + * @Date 2021-08-12 | ||
| 14 | + */ | ||
| 15 | + | ||
| 16 | +@Entity | ||
| 17 | +@Table ( name ="T_ICLEAR_BOND_INVT_DT_SIMPLE" ) | ||
| 18 | +@Data | ||
| 19 | +public class TIclearBondInvtDtSimple implements Serializable { | ||
| 20 | + private static final long serialVersionUID = 3330486687407354420L; | ||
| 21 | + @Id | ||
| 22 | + @GeneratedValue | ||
| 23 | + @Column(name = "ID" ) | ||
| 24 | + private Long id; | ||
| 25 | + | ||
| 26 | + /** | ||
| 27 | + * 保税清单编号 | ||
| 28 | + */ | ||
| 29 | + @Column(name = "BOND_INVT_NO" ) | ||
| 30 | + private String bondInvtNo; | ||
| 31 | + | ||
| 32 | + /** | ||
| 33 | + * 商品序号 | ||
| 34 | + */ | ||
| 35 | + @Column(name = "GDS_SEQNO" ) | ||
| 36 | + private Long gdsSeqno; | ||
| 37 | + | ||
| 38 | + /** | ||
| 39 | + * 变更次数 | ||
| 40 | + */ | ||
| 41 | + @Column(name = "CHG_TMS_CNT" ) | ||
| 42 | + private Long chgTmsCnt; | ||
| 43 | + | ||
| 44 | + /** | ||
| 45 | + * 备案序号 | ||
| 46 | + */ | ||
| 47 | + @Column(name = "PUTREC_SEQNO" ) | ||
| 48 | + private Long putrecSeqno; | ||
| 49 | + | ||
| 50 | + /** | ||
| 51 | + * 商品料号 | ||
| 52 | + */ | ||
| 53 | + @Column(name = "GDS_MTNO" ) | ||
| 54 | + private String gdsMtno; | ||
| 55 | + | ||
| 56 | + /** | ||
| 57 | + * 商品编码 | ||
| 58 | + */ | ||
| 59 | + @Column(name = "GDECD" ) | ||
| 60 | + private String gdecd; | ||
| 61 | + | ||
| 62 | + /** | ||
| 63 | + * 商品名称 | ||
| 64 | + */ | ||
| 65 | + @Column(name = "GDS_NM" ) | ||
| 66 | + private String gdsNm; | ||
| 67 | + | ||
| 68 | + /** | ||
| 69 | + * 商品规格型号描述 | ||
| 70 | + */ | ||
| 71 | + @Column(name = "GDS_SPCF_MODEL_DESC" ) | ||
| 72 | + private String gdsSpcfModelDesc; | ||
| 73 | + | ||
| 74 | + /** | ||
| 75 | + * 申报计量单位代码 | ||
| 76 | + */ | ||
| 77 | + @Column(name = "DCL_UNITCD" ) | ||
| 78 | + private String dclUnitcd; | ||
| 79 | + | ||
| 80 | + /** | ||
| 81 | + * 法定计量单位代码 | ||
| 82 | + */ | ||
| 83 | + @Column(name = "LAWF_UNITCD" ) | ||
| 84 | + private String lawfUnitcd; | ||
| 85 | + | ||
| 86 | + /** | ||
| 87 | + * 第二法定计量单位代码 | ||
| 88 | + */ | ||
| 89 | + @Column(name = "SECD_LAWF_UNITCD" ) | ||
| 90 | + private String secdLawfUnitcd; | ||
| 91 | + | ||
| 92 | + /** | ||
| 93 | + * 原产国(地区) | ||
| 94 | + */ | ||
| 95 | + @Column(name = "NATCD" ) | ||
| 96 | + private String natcd; | ||
| 97 | + | ||
| 98 | + /** | ||
| 99 | + * 申报单价金额 | ||
| 100 | + */ | ||
| 101 | + @Column(name = "DCL_UPRC_AMT" ) | ||
| 102 | + private BigDecimal dclUprcAmt; | ||
| 103 | + | ||
| 104 | + /** | ||
| 105 | + * 申报总金额 | ||
| 106 | + */ | ||
| 107 | + @Column(name = "DCL_TOTAL_AMT" ) | ||
| 108 | + private BigDecimal dclTotalAmt; | ||
| 109 | + | ||
| 110 | + /** | ||
| 111 | + * 美元统计总金额 | ||
| 112 | + */ | ||
| 113 | + @Column(name = "USD_STAT_TOTAL_AMT" ) | ||
| 114 | + private BigDecimal usdStatTotalAmt; | ||
| 115 | + | ||
| 116 | + /** | ||
| 117 | + * 申报币制代码 | ||
| 118 | + */ | ||
| 119 | + @Column(name = "DCL_CURRCD" ) | ||
| 120 | + private String dclCurrcd; | ||
| 121 | + | ||
| 122 | + /** | ||
| 123 | + * 法定数量 | ||
| 124 | + */ | ||
| 125 | + @Column(name = "LAWF_QTY" ) | ||
| 126 | + private BigDecimal lawfQty; | ||
| 127 | + | ||
| 128 | + /** | ||
| 129 | + * 第二法定数量 | ||
| 130 | + */ | ||
| 131 | + @Column(name = "SECD_LAWF_QTY" ) | ||
| 132 | + private BigDecimal secdLawfQty; | ||
| 133 | + | ||
| 134 | + /** | ||
| 135 | + * 重量比例因子值 | ||
| 136 | + */ | ||
| 137 | + @Column(name = "WT_SF_VAL" ) | ||
| 138 | + private BigDecimal wtSfVal; | ||
| 139 | + | ||
| 140 | + /** | ||
| 141 | + * 第一比例因子值 | ||
| 142 | + */ | ||
| 143 | + @Column(name = "FST_SF_VAL" ) | ||
| 144 | + private BigDecimal fstSfVal; | ||
| 145 | + | ||
| 146 | + /** | ||
| 147 | + * 第二比例因子值 | ||
| 148 | + */ | ||
| 149 | + @Column(name = "SECD_SF_VAL" ) | ||
| 150 | + private BigDecimal secdSfVal; | ||
| 151 | + | ||
| 152 | + /** | ||
| 153 | + * 申报数量 | ||
| 154 | + */ | ||
| 155 | + @Column(name = "DCL_QTY" ) | ||
| 156 | + private BigDecimal dclQty; | ||
| 157 | + | ||
| 158 | + /** | ||
| 159 | + * 毛重量 | ||
| 160 | + */ | ||
| 161 | + @Column(name = "GROSS_WT" ) | ||
| 162 | + private BigDecimal grossWt; | ||
| 163 | + | ||
| 164 | + /** | ||
| 165 | + * 净重量 | ||
| 166 | + */ | ||
| 167 | + @Column(name = "NET_WT" ) | ||
| 168 | + private BigDecimal netWt; | ||
| 169 | + | ||
| 170 | + /** | ||
| 171 | + * 征减免方式代码 | ||
| 172 | + */ | ||
| 173 | + @Column(name = "LVYRLF_MODECD" ) | ||
| 174 | + private String lvyrlfModecd; | ||
| 175 | + | ||
| 176 | + /** | ||
| 177 | + * 单耗版本号 | ||
| 178 | + */ | ||
| 179 | + @Column(name = "UCNS_VERNO" ) | ||
| 180 | + private String ucnsVerno; | ||
| 181 | + | ||
| 182 | + /** | ||
| 183 | + * 报关单商品序号 | ||
| 184 | + */ | ||
| 185 | + @Column(name = "ENTRY_GDS_SEQNO" ) | ||
| 186 | + private Long entryGdsSeqno; | ||
| 187 | + | ||
| 188 | + /** | ||
| 189 | + * 申请表序号 | ||
| 190 | + */ | ||
| 191 | + @Column(name = "APPLY_TB_SEQNO" ) | ||
| 192 | + private Long applyTbSeqno; | ||
| 193 | + | ||
| 194 | + /** | ||
| 195 | + * 归类标记代码 | ||
| 196 | + */ | ||
| 197 | + @Column(name = "CLY_MARKCD" ) | ||
| 198 | + private String clyMarkcd; | ||
| 199 | + | ||
| 200 | + /** | ||
| 201 | + * 备注 | ||
| 202 | + */ | ||
| 203 | + @Column(name = "RMK" ) | ||
| 204 | + private String rmk; | ||
| 205 | + | ||
| 206 | + /** | ||
| 207 | + * 实际过卡数量 | ||
| 208 | + */ | ||
| 209 | + @Column(name = "VERSION" ) | ||
| 210 | + private Long version; | ||
| 211 | + | ||
| 212 | + /** | ||
| 213 | + * 核放单已用数量 | ||
| 214 | + */ | ||
| 215 | + @Column(name = "PASSPORT_USED_QTY" ) | ||
| 216 | + private BigDecimal passportUsedQty; | ||
| 217 | + | ||
| 218 | + /** | ||
| 219 | + * 最终目的国(地区) | ||
| 220 | + */ | ||
| 221 | + @Column(name = "DESTINATION_NATCD" ) | ||
| 222 | + private String destinationNatcd; | ||
| 223 | + | ||
| 224 | + /** | ||
| 225 | + * 实际过卡数量 | ||
| 226 | + */ | ||
| 227 | + @Column(name = "ACTL_PASS_QTY" ) | ||
| 228 | + private Long actlPassQty; | ||
| 229 | + | ||
| 230 | + /** | ||
| 231 | + * 创建时间 | ||
| 232 | + */ | ||
| 233 | + @Column(name = "CREATE_TIME" ) | ||
| 234 | + private Date createTime; | ||
| 235 | + | ||
| 236 | + /** | ||
| 237 | + * 创建人 | ||
| 238 | + */ | ||
| 239 | + @Column(name = "CREATOR" ) | ||
| 240 | + private String creator; | ||
| 241 | + | ||
| 242 | + /** | ||
| 243 | + * 修改时间 | ||
| 244 | + */ | ||
| 245 | + @Column(name = "UPDATE_TIME" ) | ||
| 246 | + private Date updateTime; | ||
| 247 | + | ||
| 248 | + /** | ||
| 249 | + * 修改人 | ||
| 250 | + */ | ||
| 251 | + @Column(name = "UPDATE_USER" ) | ||
| 252 | + private String updateUser; | ||
| 253 | + | ||
| 254 | +} |
| 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 | + * @Description | ||
| 11 | + * @Author baodan_Fan | ||
| 12 | + * @Date 2021-08-12 | ||
| 13 | + */ | ||
| 14 | + | ||
| 15 | +@Entity | ||
| 16 | +@Table ( name ="T_ICLEAR_CHECK_INFO" ) | ||
| 17 | +@Data | ||
| 18 | +public class TIclearCheckInfo implements Serializable { | ||
| 19 | + private static final long serialVersionUID = 2530033282200543515L; | ||
| 20 | + @Id | ||
| 21 | + @GeneratedValue | ||
| 22 | + @Column(name = "ID" ) | ||
| 23 | + private Long id; | ||
| 24 | + | ||
| 25 | + /** | ||
| 26 | + * 检查信息 | ||
| 27 | + */ | ||
| 28 | + @Column(name = "NOTE" ) | ||
| 29 | + private String note; | ||
| 30 | + | ||
| 31 | + /** | ||
| 32 | + * 创建时间 | ||
| 33 | + */ | ||
| 34 | + @Column(name = "CREATE_TIME" ) | ||
| 35 | + private Date createTime; | ||
| 36 | + | ||
| 37 | + /** | ||
| 38 | + * 创建人 | ||
| 39 | + */ | ||
| 40 | + @Column(name = "CREATOR" ) | ||
| 41 | + private String creator; | ||
| 42 | + | ||
| 43 | + /** | ||
| 44 | + * 修改时间 | ||
| 45 | + */ | ||
| 46 | + @Column(name = "UPDATE_TIME" ) | ||
| 47 | + private Date updateTime; | ||
| 48 | + | ||
| 49 | + /** | ||
| 50 | + * 修改人 | ||
| 51 | + */ | ||
| 52 | + @Column(name = "UPDATE_USER" ) | ||
| 53 | + private String updateUser; | ||
| 54 | + | ||
| 55 | +} |
| 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 | +import java.util.Date; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * @Description | ||
| 12 | + * @Author baodan_Fan | ||
| 13 | + * @Date 2021-08-13 | ||
| 14 | + */ | ||
| 15 | + | ||
| 16 | +@Entity | ||
| 17 | +@Table ( name ="T_ICLEAR_HDE_APPR_RESULT" ) | ||
| 18 | +@Data | ||
| 19 | +public class TIclearHdeApprResult implements Serializable { | ||
| 20 | + private static final long serialVersionUID = 2702443843313574709L; | ||
| 21 | + @Id | ||
| 22 | + @GeneratedValue | ||
| 23 | + @Column(name = "ID" ) | ||
| 24 | + private Long id; | ||
| 25 | + | ||
| 26 | + /** | ||
| 27 | + * 企业预录入编号 | ||
| 28 | + */ | ||
| 29 | + @Column(name = "ETPS_PREENT_NO" ) | ||
| 30 | + private String etpsPreentNo; | ||
| 31 | + | ||
| 32 | + /** | ||
| 33 | + * 业务编号 | ||
| 34 | + */ | ||
| 35 | + @Column(name = "BUSINESS_ID" ) | ||
| 36 | + private String businessId; | ||
| 37 | + | ||
| 38 | + /** | ||
| 39 | + * 变更/报核次数 | ||
| 40 | + */ | ||
| 41 | + @Column(name = "TMS_CNT" ) | ||
| 42 | + private Long tmsCnt; | ||
| 43 | + | ||
| 44 | + /** | ||
| 45 | + * 业务类型 | ||
| 46 | + */ | ||
| 47 | + @Column(name = "TYPECD" ) | ||
| 48 | + private String typecd; | ||
| 49 | + | ||
| 50 | + /** | ||
| 51 | + * 处理结果 | ||
| 52 | + */ | ||
| 53 | + @Column(name = "MANAGE_RESULT" ) | ||
| 54 | + private String manageResult; | ||
| 55 | + | ||
| 56 | + /** | ||
| 57 | + * 处理日期 | ||
| 58 | + */ | ||
| 59 | + @Column(name = "MANAGE_DATE" ) | ||
| 60 | + private Date manageDate; | ||
| 61 | + | ||
| 62 | + /** | ||
| 63 | + * 备注 | ||
| 64 | + */ | ||
| 65 | + @Column(name = "RMK" ) | ||
| 66 | + private String rmk; | ||
| 67 | + | ||
| 68 | + /** | ||
| 69 | + * 创建时间 | ||
| 70 | + */ | ||
| 71 | + @Column(name = "CREATE_TIME" ) | ||
| 72 | + private Date createTime; | ||
| 73 | + | ||
| 74 | + /** | ||
| 75 | + * 创建人 | ||
| 76 | + */ | ||
| 77 | + @Column(name = "CREATOR" ) | ||
| 78 | + private String creator; | ||
| 79 | + | ||
| 80 | + /** | ||
| 81 | + * 修改时间 | ||
| 82 | + */ | ||
| 83 | + @Column(name = "UPDATE_TIME" ) | ||
| 84 | + private Date updateTime; | ||
| 85 | + | ||
| 86 | + /** | ||
| 87 | + * 修改人 | ||
| 88 | + */ | ||
| 89 | + @Column(name = "UPDATE_USER" ) | ||
| 90 | + private String updateUser; | ||
| 91 | + | ||
| 92 | +} |
| 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 | +import java.util.Date; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * @Description | ||
| 12 | + * @Author baodan_Fan | ||
| 13 | + * @Date 2021-08-12 | ||
| 14 | + */ | ||
| 15 | + | ||
| 16 | +@Entity | ||
| 17 | +@Table ( name ="T_ICLEAR_INV_APPR_RESULT" ) | ||
| 18 | +@Data | ||
| 19 | +public class TIclearInvApprResult implements Serializable { | ||
| 20 | + private static final long serialVersionUID = 9096825525774199265L; | ||
| 21 | + @Id | ||
| 22 | + @GeneratedValue | ||
| 23 | + @Column(name = "ID" ) | ||
| 24 | + private Long id; | ||
| 25 | + | ||
| 26 | + /** | ||
| 27 | + * 核注清单数据中心统一编号 | ||
| 28 | + */ | ||
| 29 | + @Column(name = "INV_PREENT_NO" ) | ||
| 30 | + private String invPreentNo; | ||
| 31 | + | ||
| 32 | + /** | ||
| 33 | + * 核注清单编号 | ||
| 34 | + */ | ||
| 35 | + @Column(name = "BUSINESS_ID" ) | ||
| 36 | + private String businessId; | ||
| 37 | + | ||
| 38 | + /** | ||
| 39 | + * 报关单统一编号 | ||
| 40 | + */ | ||
| 41 | + @Column(name = "ENTRY_SEQ_N" ) | ||
| 42 | + private String entrySeqN; | ||
| 43 | + | ||
| 44 | + /** | ||
| 45 | + * 处理结果 | ||
| 46 | + */ | ||
| 47 | + @Column(name = "MANAGE_RESULT" ) | ||
| 48 | + private String manageResult; | ||
| 49 | + | ||
| 50 | + /** | ||
| 51 | + * 生成日期 | ||
| 52 | + */ | ||
| 53 | + @Column(name = "CREATE_DATE" ) | ||
| 54 | + private Date createDate; | ||
| 55 | + | ||
| 56 | + /** | ||
| 57 | + * 生成失败原因 | ||
| 58 | + */ | ||
| 59 | + @Column(name = "REASON" ) | ||
| 60 | + private String reason; | ||
| 61 | + | ||
| 62 | + /** | ||
| 63 | + * 创建时间 | ||
| 64 | + */ | ||
| 65 | + @Column(name = "CREATE_TIME" ) | ||
| 66 | + private Date createTime; | ||
| 67 | + | ||
| 68 | + /** | ||
| 69 | + * 创建人 | ||
| 70 | + */ | ||
| 71 | + @Column(name = "CREATOR" ) | ||
| 72 | + private String creator; | ||
| 73 | + | ||
| 74 | + /** | ||
| 75 | + * 修改时间 | ||
| 76 | + */ | ||
| 77 | + @Column(name = "UPDATE_TIME" ) | ||
| 78 | + private Date updateTime; | ||
| 79 | + | ||
| 80 | + /** | ||
| 81 | + * 修改人 | ||
| 82 | + */ | ||
| 83 | + @Column(name = "UPDATE_USER" ) | ||
| 84 | + private String updateUser; | ||
| 85 | + | ||
| 86 | +} |
| 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.math.BigDecimal; | ||
| 8 | +import java.util.Date; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * @Description | ||
| 12 | + * @Author baodan_Fan | ||
| 13 | + * @Date 2021-08-12 | ||
| 14 | + */ | ||
| 15 | + | ||
| 16 | +@Entity | ||
| 17 | +@Table ( name ="T_ICLEAR_InvtGoodsType" ) | ||
| 18 | +@Data | ||
| 19 | +public class TIclearInvtGoodsType implements Serializable { | ||
| 20 | + private static final long serialVersionUID = 215740354277500390L; | ||
| 21 | + @Id | ||
| 22 | + @GeneratedValue | ||
| 23 | + @Column(name = "ID" ) | ||
| 24 | + private Long id; | ||
| 25 | + | ||
| 26 | + /** | ||
| 27 | + * 中心统一编号 | ||
| 28 | + */ | ||
| 29 | + @Column(name = "SeqNo" ) | ||
| 30 | + private String seqNo; | ||
| 31 | + | ||
| 32 | + /** | ||
| 33 | + * 商品序号 | ||
| 34 | + */ | ||
| 35 | + @Column(name = "GdsSeqno" ) | ||
| 36 | + private Long gdsSeqno; | ||
| 37 | + | ||
| 38 | + /** | ||
| 39 | + * 备案序号(对应底账序号) | ||
| 40 | + */ | ||
| 41 | + @Column(name = "PutrecSeqno" ) | ||
| 42 | + private Long putrecSeqno; | ||
| 43 | + | ||
| 44 | + /** | ||
| 45 | + * 商品料号 | ||
| 46 | + */ | ||
| 47 | + @Column(name = "GdsMtno" ) | ||
| 48 | + private String gdsMtno; | ||
| 49 | + | ||
| 50 | + /** | ||
| 51 | + * 商品编码 | ||
| 52 | + */ | ||
| 53 | + @Column(name = "Gdecd" ) | ||
| 54 | + private String gdecd; | ||
| 55 | + | ||
| 56 | + /** | ||
| 57 | + * 商品名称 | ||
| 58 | + */ | ||
| 59 | + @Column(name = "GdsNm" ) | ||
| 60 | + private String gdsNm; | ||
| 61 | + | ||
| 62 | + /** | ||
| 63 | + * 商品规格型号 | ||
| 64 | + */ | ||
| 65 | + @Column(name = "GdsSpcfModelDesc" ) | ||
| 66 | + private String gdsSpcfModelDesc; | ||
| 67 | + | ||
| 68 | + /** | ||
| 69 | + * 申报计量单位 | ||
| 70 | + */ | ||
| 71 | + @Column(name = "DclUnitcd" ) | ||
| 72 | + private String dclUnitcd; | ||
| 73 | + | ||
| 74 | + /** | ||
| 75 | + * 法定计量单位 | ||
| 76 | + */ | ||
| 77 | + @Column(name = "LawfUnitcd" ) | ||
| 78 | + private String lawfUnitcd; | ||
| 79 | + | ||
| 80 | + /** | ||
| 81 | + * 法定第二计量 | ||
| 82 | + */ | ||
| 83 | + @Column(name = "SecdLawfUnitcd" ) | ||
| 84 | + private String secdLawfUnitcd; | ||
| 85 | + | ||
| 86 | + /** | ||
| 87 | + * 原产国(地区) | ||
| 88 | + */ | ||
| 89 | + @Column(name = "Natcd" ) | ||
| 90 | + private String natcd; | ||
| 91 | + | ||
| 92 | + /** | ||
| 93 | + * 企业申报单价 | ||
| 94 | + */ | ||
| 95 | + @Column(name = "DclUprcAmt" ) | ||
| 96 | + private BigDecimal dclUprcAmt; | ||
| 97 | + | ||
| 98 | + /** | ||
| 99 | + * 企业申报总价 | ||
| 100 | + */ | ||
| 101 | + @Column(name = "DclTotalAmt" ) | ||
| 102 | + private BigDecimal dclTotalAmt; | ||
| 103 | + | ||
| 104 | + /** | ||
| 105 | + * 美元统计总金额 | ||
| 106 | + */ | ||
| 107 | + @Column(name = "UsdStatTotalAmt" ) | ||
| 108 | + private BigDecimal usdStatTotalAmt; | ||
| 109 | + | ||
| 110 | + /** | ||
| 111 | + * 币制 | ||
| 112 | + */ | ||
| 113 | + @Column(name = "DclCurrcd" ) | ||
| 114 | + private String dclCurrcd; | ||
| 115 | + | ||
| 116 | + /** | ||
| 117 | + * 法定数量 | ||
| 118 | + */ | ||
| 119 | + @Column(name = "LawfQty" ) | ||
| 120 | + private BigDecimal lawfQty; | ||
| 121 | + | ||
| 122 | + /** | ||
| 123 | + * 第二法定数量 | ||
| 124 | + */ | ||
| 125 | + @Column(name = "SecdLawfQty" ) | ||
| 126 | + private BigDecimal secdLawfQty; | ||
| 127 | + | ||
| 128 | + /** | ||
| 129 | + * 重量比例因子 | ||
| 130 | + */ | ||
| 131 | + @Column(name = "WtSfVal" ) | ||
| 132 | + private BigDecimal wtSfVal; | ||
| 133 | + | ||
| 134 | + /** | ||
| 135 | + * 第一比例因子 | ||
| 136 | + */ | ||
| 137 | + @Column(name = "FstSfVal" ) | ||
| 138 | + private BigDecimal fstSfVal; | ||
| 139 | + | ||
| 140 | + /** | ||
| 141 | + * 第二比例因子 | ||
| 142 | + */ | ||
| 143 | + @Column(name = "SecdSfVal" ) | ||
| 144 | + private BigDecimal secdSfVal; | ||
| 145 | + | ||
| 146 | + /** | ||
| 147 | + * 申报数量 | ||
| 148 | + */ | ||
| 149 | + @Column(name = "DclQty" ) | ||
| 150 | + private BigDecimal dclQty; | ||
| 151 | + | ||
| 152 | + /** | ||
| 153 | + * 毛重 | ||
| 154 | + */ | ||
| 155 | + @Column(name = "GrossWt" ) | ||
| 156 | + private BigDecimal grossWt; | ||
| 157 | + | ||
| 158 | + /** | ||
| 159 | + * 净重 | ||
| 160 | + */ | ||
| 161 | + @Column(name = "NetWt" ) | ||
| 162 | + private BigDecimal netWt; | ||
| 163 | + | ||
| 164 | + /** | ||
| 165 | + * 用途代码* | ||
| 166 | + */ | ||
| 167 | + @Column(name = "UseCd" ) | ||
| 168 | + private String useCd; | ||
| 169 | + | ||
| 170 | + /** | ||
| 171 | + * 征免方式 | ||
| 172 | + */ | ||
| 173 | + @Column(name = "LvyrlfModecd" ) | ||
| 174 | + private String lvyrlfModecd; | ||
| 175 | + | ||
| 176 | + /** | ||
| 177 | + * 单耗版本号 | ||
| 178 | + */ | ||
| 179 | + @Column(name = "UcnsVerno" ) | ||
| 180 | + private String ucnsVerno; | ||
| 181 | + | ||
| 182 | + /** | ||
| 183 | + * 报关单商品序号 | ||
| 184 | + */ | ||
| 185 | + @Column(name = "EntryGdsSeqno" ) | ||
| 186 | + private Long entryGdsSeqno; | ||
| 187 | + | ||
| 188 | + /** | ||
| 189 | + * 归类标志 | ||
| 190 | + */ | ||
| 191 | + @Column(name = "ClyMarkcd" ) | ||
| 192 | + private String clyMarkcd; | ||
| 193 | + | ||
| 194 | + /** | ||
| 195 | + * 流转申报表序号 | ||
| 196 | + */ | ||
| 197 | + @Column(name = "ApplyTbSeqno" ) | ||
| 198 | + private Long applyTbSeqno; | ||
| 199 | + | ||
| 200 | + /** | ||
| 201 | + * 最终目的国 | ||
| 202 | + */ | ||
| 203 | + @Column(name = "DestinationNatcd" ) | ||
| 204 | + private String destinationNatcd; | ||
| 205 | + | ||
| 206 | + /** | ||
| 207 | + * 修改标志 | ||
| 208 | + */ | ||
| 209 | + @Column(name = "ModfMarkcd" ) | ||
| 210 | + private String modfMarkcd; | ||
| 211 | + | ||
| 212 | + /** | ||
| 213 | + * 备注 | ||
| 214 | + */ | ||
| 215 | + @Column(name = "Rmk" ) | ||
| 216 | + private String rmk; | ||
| 217 | + | ||
| 218 | + /** | ||
| 219 | + * 创建时间 | ||
| 220 | + */ | ||
| 221 | + @Column(name = "CREATE_TIME" ) | ||
| 222 | + private Date createTime; | ||
| 223 | + | ||
| 224 | + /** | ||
| 225 | + * 创建人 | ||
| 226 | + */ | ||
| 227 | + @Column(name = "CREATOR" ) | ||
| 228 | + private String creator; | ||
| 229 | + | ||
| 230 | + /** | ||
| 231 | + * 修改时间 | ||
| 232 | + */ | ||
| 233 | + @Column(name = "UPDATE_TIME" ) | ||
| 234 | + private Date updateTime; | ||
| 235 | + | ||
| 236 | + /** | ||
| 237 | + * 修改人 | ||
| 238 | + */ | ||
| 239 | + @Column(name = "UPDATE_USER" ) | ||
| 240 | + private String updateUser; | ||
| 241 | + | ||
| 242 | +} |
| 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 | +import java.util.Date; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * @Description | ||
| 12 | + * @Author baodan_Fan | ||
| 13 | + * @Date 2021-08-12 | ||
| 14 | + */ | ||
| 15 | + | ||
| 16 | +@Entity | ||
| 17 | +@Table ( name ="T_ICLEAR_InvtHeadType" ) | ||
| 18 | +@Data | ||
| 19 | +public class TIclearInvtHeadType implements Serializable { | ||
| 20 | + private static final long serialVersionUID = 7418187730534038677L; | ||
| 21 | + @Id | ||
| 22 | + @GeneratedValue | ||
| 23 | + @Column(name = "ID" ) | ||
| 24 | + private Long id; | ||
| 25 | + | ||
| 26 | + /** | ||
| 27 | + * 清单编号 | ||
| 28 | + */ | ||
| 29 | + @Column(name = "BondInvtNo" ) | ||
| 30 | + private String bondInvtNo; | ||
| 31 | + | ||
| 32 | + /** | ||
| 33 | + * 清单预录入统一编号 | ||
| 34 | + */ | ||
| 35 | + @Column(name = "SeqNo" ) | ||
| 36 | + private String seqNo; | ||
| 37 | + | ||
| 38 | + /** | ||
| 39 | + * 备案编号 | ||
| 40 | + */ | ||
| 41 | + @Column(name = "PutrecNo" ) | ||
| 42 | + private String putrecNo; | ||
| 43 | + | ||
| 44 | + /** | ||
| 45 | + * 企业内部清单编号 | ||
| 46 | + */ | ||
| 47 | + @Column(name = "EtpsInnerInvtNo" ) | ||
| 48 | + private String etpsInnerInvtNo; | ||
| 49 | + | ||
| 50 | + /** | ||
| 51 | + * 经营企业社会信用代码 | ||
| 52 | + */ | ||
| 53 | + @Column(name = "BizopEtpsSccd" ) | ||
| 54 | + private String bizopEtpsSccd; | ||
| 55 | + | ||
| 56 | + /** | ||
| 57 | + * 经营企业编号 | ||
| 58 | + */ | ||
| 59 | + @Column(name = "BizopEtpsno" ) | ||
| 60 | + private String bizopEtpsno; | ||
| 61 | + | ||
| 62 | + /** | ||
| 63 | + * 经营企业名称 | ||
| 64 | + */ | ||
| 65 | + @Column(name = "BizopEtpsNm" ) | ||
| 66 | + private String bizopEtpsNm; | ||
| 67 | + | ||
| 68 | + /** | ||
| 69 | + * 收货企业编号 | ||
| 70 | + */ | ||
| 71 | + @Column(name = "RcvgdEtpsno" ) | ||
| 72 | + private String rcvgdEtpsno; | ||
| 73 | + | ||
| 74 | + /** | ||
| 75 | + * 收发货企业社会信用代码 | ||
| 76 | + */ | ||
| 77 | + @Column(name = "RvsngdEtpsSccd" ) | ||
| 78 | + private String rvsngdEtpsSccd; | ||
| 79 | + | ||
| 80 | + /** | ||
| 81 | + * 收货企业名称 | ||
| 82 | + */ | ||
| 83 | + @Column(name = "RcvgdEtpsNm" ) | ||
| 84 | + private String rcvgdEtpsNm; | ||
| 85 | + | ||
| 86 | + /** | ||
| 87 | + * 申报企业社会信用代码 | ||
| 88 | + */ | ||
| 89 | + @Column(name = "DclEtpsSccd" ) | ||
| 90 | + private String dclEtpsSccd; | ||
| 91 | + | ||
| 92 | + /** | ||
| 93 | + * 申报企业编号 | ||
| 94 | + */ | ||
| 95 | + @Column(name = "DclEtpsno" ) | ||
| 96 | + private String dclEtpsno; | ||
| 97 | + | ||
| 98 | + /** | ||
| 99 | + * 申报企业名称 | ||
| 100 | + */ | ||
| 101 | + @Column(name = "DclEtpsNm" ) | ||
| 102 | + private String dclEtpsNm; | ||
| 103 | + | ||
| 104 | + /** | ||
| 105 | + * 清单申报时间 | ||
| 106 | + */ | ||
| 107 | + @Column(name = "InvtDclTime" ) | ||
| 108 | + private Date invtDclTime; | ||
| 109 | + | ||
| 110 | + /** | ||
| 111 | + * 报关单申报日期 | ||
| 112 | + */ | ||
| 113 | + @Column(name = "EntryDclTime" ) | ||
| 114 | + private Date entryDclTime; | ||
| 115 | + | ||
| 116 | + /** | ||
| 117 | + * 对应报关单编号 | ||
| 118 | + */ | ||
| 119 | + @Column(name = "EntryNo" ) | ||
| 120 | + private String entryNo; | ||
| 121 | + | ||
| 122 | + /** | ||
| 123 | + * 关联清单编号 | ||
| 124 | + */ | ||
| 125 | + @Column(name = "RltInvtNo" ) | ||
| 126 | + private String rltInvtNo; | ||
| 127 | + | ||
| 128 | + /** | ||
| 129 | + * 关联备案编号 | ||
| 130 | + */ | ||
| 131 | + @Column(name = "RltPutrecNo" ) | ||
| 132 | + private String rltPutrecNo; | ||
| 133 | + | ||
| 134 | + /** | ||
| 135 | + * 关联报关单编号 | ||
| 136 | + */ | ||
| 137 | + @Column(name = "RltEntryNo" ) | ||
| 138 | + private String rltEntryNo; | ||
| 139 | + | ||
| 140 | + /** | ||
| 141 | + * 关联报关单境内收发货人社会信用代码 | ||
| 142 | + */ | ||
| 143 | + @Column(name = "RltEntryBizopEtpsSccd" ) | ||
| 144 | + private String rltEntryBizopEtpsSccd; | ||
| 145 | + | ||
| 146 | + /** | ||
| 147 | + * 关联报关单境内收发货人编号 | ||
| 148 | + */ | ||
| 149 | + @Column(name = "RltEntryBizopEtpsno" ) | ||
| 150 | + private String rltEntryBizopEtpsno; | ||
| 151 | + | ||
| 152 | + /** | ||
| 153 | + * 关联报关单境内收发货人名称 | ||
| 154 | + */ | ||
| 155 | + @Column(name = "RltEntryBizopEtpsNm" ) | ||
| 156 | + private String rltEntryBizopEtpsNm; | ||
| 157 | + | ||
| 158 | + /** | ||
| 159 | + * 关联报关单收发货单位社会统一信用代码 | ||
| 160 | + */ | ||
| 161 | + @Column(name = "RltEntryRvsngdEtpsSccd" ) | ||
| 162 | + private String rltEntryRvsngdEtpsSccd; | ||
| 163 | + | ||
| 164 | + /** | ||
| 165 | + * 关联报关单海关收发货单位编码 | ||
| 166 | + */ | ||
| 167 | + @Column(name = "RltEntryRcvgdEtpsno" ) | ||
| 168 | + private String rltEntryRcvgdEtpsno; | ||
| 169 | + | ||
| 170 | + /** | ||
| 171 | + * 关联报关单收发货单位名称 | ||
| 172 | + */ | ||
| 173 | + @Column(name = "RltEntryRcvgdEtpsNm" ) | ||
| 174 | + private String rltEntryRcvgdEtpsNm; | ||
| 175 | + | ||
| 176 | + /** | ||
| 177 | + * 关联报关单申报单位社会统一信用代码 | ||
| 178 | + */ | ||
| 179 | + @Column(name = "RltEntryDclEtpsSccd" ) | ||
| 180 | + private String rltEntryDclEtpsSccd; | ||
| 181 | + | ||
| 182 | + /** | ||
| 183 | + * 关联报关单海关申报单位编码 | ||
| 184 | + */ | ||
| 185 | + @Column(name = "RltEntryDclEtpsno" ) | ||
| 186 | + private String rltEntryDclEtpsno; | ||
| 187 | + | ||
| 188 | + /** | ||
| 189 | + * 关联报关单申报单位名称 | ||
| 190 | + */ | ||
| 191 | + @Column(name = "RltEntryDclEtpsNm" ) | ||
| 192 | + private String rltEntryDclEtpsNm; | ||
| 193 | + | ||
| 194 | + /** | ||
| 195 | + * 进出境关别 | ||
| 196 | + */ | ||
| 197 | + @Column(name = "ImpexpPortcd" ) | ||
| 198 | + private String impexpPortcd; | ||
| 199 | + | ||
| 200 | + /** | ||
| 201 | + * 申报地关区代码 | ||
| 202 | + */ | ||
| 203 | + @Column(name = "DclPlcCuscd" ) | ||
| 204 | + private String dclPlcCuscd; | ||
| 205 | + | ||
| 206 | + /** | ||
| 207 | + * 进出口标记代码 | ||
| 208 | + */ | ||
| 209 | + @Column(name = "ImpexpMarkcd" ) | ||
| 210 | + private String impexpMarkcd; | ||
| 211 | + | ||
| 212 | + /** | ||
| 213 | + * 料件成品标记代码 | ||
| 214 | + */ | ||
| 215 | + @Column(name = "MtpckEndprdMarkcd" ) | ||
| 216 | + private String mtpckEndprdMarkcd; | ||
| 217 | + | ||
| 218 | + /** | ||
| 219 | + * 监管方式代码 | ||
| 220 | + */ | ||
| 221 | + @Column(name = "SupvModecd" ) | ||
| 222 | + private String supvModecd; | ||
| 223 | + | ||
| 224 | + /** | ||
| 225 | + * 运输方式代码 | ||
| 226 | + */ | ||
| 227 | + @Column(name = "TrspModecd" ) | ||
| 228 | + private String trspModecd; | ||
| 229 | + | ||
| 230 | + /** | ||
| 231 | + * 是否报关标志 | ||
| 232 | + */ | ||
| 233 | + @Column(name = "DclcusFlag" ) | ||
| 234 | + private String dclcusFlag; | ||
| 235 | + | ||
| 236 | + /** | ||
| 237 | + * 报关类型代码 | ||
| 238 | + */ | ||
| 239 | + @Column(name = "DclcusTypecd" ) | ||
| 240 | + private String dclcusTypecd; | ||
| 241 | + | ||
| 242 | + /** | ||
| 243 | + * 核扣标记代码 | ||
| 244 | + */ | ||
| 245 | + @Column(name = "VrfdedMarkcd" ) | ||
| 246 | + private String vrfdedMarkcd; | ||
| 247 | + | ||
| 248 | + /** | ||
| 249 | + * 清单进出卡口状态代码 | ||
| 250 | + */ | ||
| 251 | + @Column(name = "InvtIochkptStucd" ) | ||
| 252 | + private String invtIochkptStucd; | ||
| 253 | + | ||
| 254 | + /** | ||
| 255 | + * 预核扣时间 | ||
| 256 | + */ | ||
| 257 | + @Column(name = "PrevdTime" ) | ||
| 258 | + private Date prevdTime; | ||
| 259 | + | ||
| 260 | + /** | ||
| 261 | + * 正式核扣时间 | ||
| 262 | + */ | ||
| 263 | + @Column(name = "FormalVrfdedTime" ) | ||
| 264 | + private Date formalVrfdedTime; | ||
| 265 | + | ||
| 266 | + /** | ||
| 267 | + * 申请表编号 | ||
| 268 | + */ | ||
| 269 | + @Column(name = "ApplyNo" ) | ||
| 270 | + private String applyNo; | ||
| 271 | + | ||
| 272 | + /** | ||
| 273 | + * 流转类型 | ||
| 274 | + */ | ||
| 275 | + @Column(name = "ListType" ) | ||
| 276 | + private String listType; | ||
| 277 | + | ||
| 278 | + /** | ||
| 279 | + * 录入企业编号 | ||
| 280 | + */ | ||
| 281 | + @Column(name = "InputCode" ) | ||
| 282 | + private String inputCode; | ||
| 283 | + | ||
| 284 | + /** | ||
| 285 | + * 录入企业社会信用代码 | ||
| 286 | + */ | ||
| 287 | + @Column(name = "InputCreditCode" ) | ||
| 288 | + private String inputCreditCode; | ||
| 289 | + | ||
| 290 | + /** | ||
| 291 | + * 录入单位名称 | ||
| 292 | + */ | ||
| 293 | + @Column(name = "InputName" ) | ||
| 294 | + private String inputName; | ||
| 295 | + | ||
| 296 | + /** | ||
| 297 | + * 申报人IC卡号 | ||
| 298 | + */ | ||
| 299 | + @Column(name = "IcCardNo" ) | ||
| 300 | + private String icCardNo; | ||
| 301 | + | ||
| 302 | + /** | ||
| 303 | + * 录入日期 | ||
| 304 | + */ | ||
| 305 | + @Column(name = "InputTime" ) | ||
| 306 | + private Date inputTime; | ||
| 307 | + | ||
| 308 | + /** | ||
| 309 | + * 清单状态 | ||
| 310 | + */ | ||
| 311 | + @Column(name = "ListStat" ) | ||
| 312 | + private String listStat; | ||
| 313 | + | ||
| 314 | + /** | ||
| 315 | + * 对应报关单申报单位社会统一信用代码 | ||
| 316 | + */ | ||
| 317 | + @Column(name = "CorrEntryDclEtpsSccd" ) | ||
| 318 | + private String corrEntryDclEtpsSccd; | ||
| 319 | + | ||
| 320 | + /** | ||
| 321 | + * 对应报关单申报单位代码 | ||
| 322 | + */ | ||
| 323 | + @Column(name = "CorrEntryDclEtpsNo" ) | ||
| 324 | + private String corrEntryDclEtpsNo; | ||
| 325 | + | ||
| 326 | + /** | ||
| 327 | + * 对应报关单申报单位名称 | ||
| 328 | + */ | ||
| 329 | + @Column(name = "CorrEntryDclEtpsNm" ) | ||
| 330 | + private String corrEntryDclEtpsNm; | ||
| 331 | + | ||
| 332 | + /** | ||
| 333 | + * 报关单类型 | ||
| 334 | + */ | ||
| 335 | + @Column(name = "DecType" ) | ||
| 336 | + private String decType; | ||
| 337 | + | ||
| 338 | + /** | ||
| 339 | + * 起运/运抵国(地区) | ||
| 340 | + */ | ||
| 341 | + @Column(name = "StshipTrsarvNatcd" ) | ||
| 342 | + private String stshipTrsarvNatcd; | ||
| 343 | + | ||
| 344 | + /** | ||
| 345 | + * 清单类型 | ||
| 346 | + */ | ||
| 347 | + @Column(name = "InvtType" ) | ||
| 348 | + private String invtType; | ||
| 349 | + | ||
| 350 | + /** | ||
| 351 | + * 报关状态 | ||
| 352 | + */ | ||
| 353 | + @Column(name = "EntryStucd" ) | ||
| 354 | + private String entryStucd; | ||
| 355 | + | ||
| 356 | + /** | ||
| 357 | + * 核放单生成标志代码 | ||
| 358 | + */ | ||
| 359 | + @Column(name = "PassportUsedTypeCd" ) | ||
| 360 | + private String passportUsedTypeCd; | ||
| 361 | + | ||
| 362 | + /** | ||
| 363 | + * 备注 | ||
| 364 | + */ | ||
| 365 | + @Column(name = "Rmk" ) | ||
| 366 | + private String rmk; | ||
| 367 | + | ||
| 368 | + /** | ||
| 369 | + * 申报类型 | ||
| 370 | + */ | ||
| 371 | + @Column(name = "DclTypecd" ) | ||
| 372 | + private String dclTypecd; | ||
| 373 | + | ||
| 374 | + /** | ||
| 375 | + * 报关单同步修改标志 | ||
| 376 | + */ | ||
| 377 | + @Column(name = "NeedEntryModified" ) | ||
| 378 | + private String needEntryModified; | ||
| 379 | + | ||
| 380 | + /** | ||
| 381 | + * 计征金额 | ||
| 382 | + */ | ||
| 383 | + @Column(name = "LevyBlAmt" ) | ||
| 384 | + private String levyBlAmt; | ||
| 385 | + | ||
| 386 | + /** | ||
| 387 | + * 变更次数 | ||
| 388 | + */ | ||
| 389 | + @Column(name = "ChgTmsCnt" ) | ||
| 390 | + private String chgTmsCnt; | ||
| 391 | + | ||
| 392 | + /** | ||
| 393 | + * 是否生成报关单 | ||
| 394 | + */ | ||
| 395 | + @Column(name = "GenDecFlag" ) | ||
| 396 | + private String genDecFlag; | ||
| 397 | + | ||
| 398 | + /** | ||
| 399 | + * 创建时间 | ||
| 400 | + */ | ||
| 401 | + @Column(name = "CREATE_TIME" ) | ||
| 402 | + private Date createTime; | ||
| 403 | + | ||
| 404 | + /** | ||
| 405 | + * 创建人 | ||
| 406 | + */ | ||
| 407 | + @Column(name = "CREATOR" ) | ||
| 408 | + private String creator; | ||
| 409 | + | ||
| 410 | + /** | ||
| 411 | + * 修改时间 | ||
| 412 | + */ | ||
| 413 | + @Column(name = "UPDATE_TIME" ) | ||
| 414 | + private Date updateTime; | ||
| 415 | + | ||
| 416 | + /** | ||
| 417 | + * 修改人 | ||
| 418 | + */ | ||
| 419 | + @Column(name = "UPDATE_USER" ) | ||
| 420 | + private String updateUser; | ||
| 421 | + | ||
| 422 | +} |
| 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.math.BigDecimal; | ||
| 8 | +import java.util.Date; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * @Description | ||
| 12 | + * @Author baodan_Fan | ||
| 13 | + * @Date 2021-08-12 | ||
| 14 | + */ | ||
| 15 | + | ||
| 16 | +@Entity | ||
| 17 | +@Table ( name ="T_ICLEAR_InvtListType" ) | ||
| 18 | +@Data | ||
| 19 | +public class TIclearInvtListType implements Serializable { | ||
| 20 | + private static final long serialVersionUID = 6471840587898431744L; | ||
| 21 | + @Id | ||
| 22 | + @GeneratedValue | ||
| 23 | + @Column(name = "ID" ) | ||
| 24 | + private Long id; | ||
| 25 | + | ||
| 26 | + /** | ||
| 27 | + * 中心统一编号 | ||
| 28 | + */ | ||
| 29 | + @Column(name = "SeqNo" ) | ||
| 30 | + private String seqNo; | ||
| 31 | + | ||
| 32 | + /** | ||
| 33 | + * 商品序号 | ||
| 34 | + */ | ||
| 35 | + @Column(name = "GdsSeqno" ) | ||
| 36 | + private Long gdsSeqno; | ||
| 37 | + | ||
| 38 | + /** | ||
| 39 | + * 备案序号(对应底账序号) | ||
| 40 | + */ | ||
| 41 | + @Column(name = "PutrecSeqno" ) | ||
| 42 | + private Long putrecSeqno; | ||
| 43 | + | ||
| 44 | + /** | ||
| 45 | + * 商品料号 | ||
| 46 | + */ | ||
| 47 | + @Column(name = "GdsMtno" ) | ||
| 48 | + private String gdsMtno; | ||
| 49 | + | ||
| 50 | + /** | ||
| 51 | + * 商品编码 | ||
| 52 | + */ | ||
| 53 | + @Column(name = "Gdecd" ) | ||
| 54 | + private String gdecd; | ||
| 55 | + | ||
| 56 | + /** | ||
| 57 | + * 商品名称 | ||
| 58 | + */ | ||
| 59 | + @Column(name = "GdsNm" ) | ||
| 60 | + private String gdsNm; | ||
| 61 | + | ||
| 62 | + /** | ||
| 63 | + * 商品规格型号 | ||
| 64 | + */ | ||
| 65 | + @Column(name = "GdsSpcfModelDesc" ) | ||
| 66 | + private String gdsSpcfModelDesc; | ||
| 67 | + | ||
| 68 | + /** | ||
| 69 | + * 申报计量单位 | ||
| 70 | + */ | ||
| 71 | + @Column(name = "DclUnitcd" ) | ||
| 72 | + private String dclUnitcd; | ||
| 73 | + | ||
| 74 | + /** | ||
| 75 | + * 法定计量单位 | ||
| 76 | + */ | ||
| 77 | + @Column(name = "LawfUnitcd" ) | ||
| 78 | + private String lawfUnitcd; | ||
| 79 | + | ||
| 80 | + /** | ||
| 81 | + * 法定第二计量 | ||
| 82 | + */ | ||
| 83 | + @Column(name = "SecdLawfUnitcd" ) | ||
| 84 | + private String secdLawfUnitcd; | ||
| 85 | + | ||
| 86 | + /** | ||
| 87 | + * 原产国(地区) | ||
| 88 | + */ | ||
| 89 | + @Column(name = "Natcd" ) | ||
| 90 | + private String natcd; | ||
| 91 | + | ||
| 92 | + /** | ||
| 93 | + * 企业申报单价 | ||
| 94 | + */ | ||
| 95 | + @Column(name = "DclUprcAmt" ) | ||
| 96 | + private BigDecimal dclUprcAmt; | ||
| 97 | + | ||
| 98 | + /** | ||
| 99 | + * 企业申报总价 | ||
| 100 | + */ | ||
| 101 | + @Column(name = "DclTotalAmt" ) | ||
| 102 | + private BigDecimal dclTotalAmt; | ||
| 103 | + | ||
| 104 | + /** | ||
| 105 | + * 美元统计总金额 | ||
| 106 | + */ | ||
| 107 | + @Column(name = "UsdStatTotalAmt" ) | ||
| 108 | + private BigDecimal usdStatTotalAmt; | ||
| 109 | + | ||
| 110 | + /** | ||
| 111 | + * 币制 | ||
| 112 | + */ | ||
| 113 | + @Column(name = "DclCurrcd" ) | ||
| 114 | + private String dclCurrcd; | ||
| 115 | + | ||
| 116 | + /** | ||
| 117 | + * 法定数量 | ||
| 118 | + */ | ||
| 119 | + @Column(name = "LawfQty" ) | ||
| 120 | + private BigDecimal lawfQty; | ||
| 121 | + | ||
| 122 | + /** | ||
| 123 | + * 第二法定数量 | ||
| 124 | + */ | ||
| 125 | + @Column(name = "SecdLawfQty" ) | ||
| 126 | + private BigDecimal secdLawfQty; | ||
| 127 | + | ||
| 128 | + /** | ||
| 129 | + * 重量比例因子 | ||
| 130 | + */ | ||
| 131 | + @Column(name = "WtSfVal" ) | ||
| 132 | + private BigDecimal wtSfVal; | ||
| 133 | + | ||
| 134 | + /** | ||
| 135 | + * 第一比例因子 | ||
| 136 | + */ | ||
| 137 | + @Column(name = "FstSfVal" ) | ||
| 138 | + private BigDecimal fstSfVal; | ||
| 139 | + | ||
| 140 | + /** | ||
| 141 | + * 第二比例因子 | ||
| 142 | + */ | ||
| 143 | + @Column(name = "SecdSfVal" ) | ||
| 144 | + private BigDecimal secdSfVal; | ||
| 145 | + | ||
| 146 | + /** | ||
| 147 | + * 申报数量* | ||
| 148 | + */ | ||
| 149 | + @Column(name = "DclQty" ) | ||
| 150 | + private BigDecimal dclQty; | ||
| 151 | + | ||
| 152 | + /** | ||
| 153 | + * 毛重 | ||
| 154 | + */ | ||
| 155 | + @Column(name = "GrossWt" ) | ||
| 156 | + private BigDecimal grossWt; | ||
| 157 | + | ||
| 158 | + /** | ||
| 159 | + * 净重 | ||
| 160 | + */ | ||
| 161 | + @Column(name = "NetWt" ) | ||
| 162 | + private BigDecimal netWt; | ||
| 163 | + | ||
| 164 | + /** | ||
| 165 | + * 用途代码* | ||
| 166 | + */ | ||
| 167 | + @Column(name = "UseCd" ) | ||
| 168 | + private String useCd; | ||
| 169 | + | ||
| 170 | + /** | ||
| 171 | + * 征免方式 | ||
| 172 | + */ | ||
| 173 | + @Column(name = "LvyrlfModecd" ) | ||
| 174 | + private String lvyrlfModecd; | ||
| 175 | + | ||
| 176 | + /** | ||
| 177 | + * 单耗版本号 | ||
| 178 | + */ | ||
| 179 | + @Column(name = "UcnsVerno" ) | ||
| 180 | + private String ucnsVerno; | ||
| 181 | + | ||
| 182 | + /** | ||
| 183 | + * 报关单商品序号 | ||
| 184 | + */ | ||
| 185 | + @Column(name = "EntryGdsSeqno" ) | ||
| 186 | + private Long entryGdsSeqno; | ||
| 187 | + | ||
| 188 | + /** | ||
| 189 | + * 归类标志 | ||
| 190 | + */ | ||
| 191 | + @Column(name = "ClyMarkcd" ) | ||
| 192 | + private String clyMarkcd; | ||
| 193 | + | ||
| 194 | + /** | ||
| 195 | + * 流转申报表序号 | ||
| 196 | + */ | ||
| 197 | + @Column(name = "ApplyTbSeqno" ) | ||
| 198 | + private Long applyTbSeqno; | ||
| 199 | + | ||
| 200 | + /** | ||
| 201 | + * 最终目的国 | ||
| 202 | + */ | ||
| 203 | + @Column(name = "DestinationNatcd" ) | ||
| 204 | + private String destinationNatcd; | ||
| 205 | + | ||
| 206 | + /** | ||
| 207 | + * 修改标志 | ||
| 208 | + */ | ||
| 209 | + @Column(name = "ModfMarkcd" ) | ||
| 210 | + private String modfMarkcd; | ||
| 211 | + | ||
| 212 | + /** | ||
| 213 | + * 备注 | ||
| 214 | + */ | ||
| 215 | + @Column(name = "Rmk" ) | ||
| 216 | + private String rmk; | ||
| 217 | + | ||
| 218 | + /** | ||
| 219 | + * 创建时间 | ||
| 220 | + */ | ||
| 221 | + @Column(name = "CREATE_TIME" ) | ||
| 222 | + private Date createTime; | ||
| 223 | + | ||
| 224 | + /** | ||
| 225 | + * 创建人 | ||
| 226 | + */ | ||
| 227 | + @Column(name = "CREATOR" ) | ||
| 228 | + private String creator; | ||
| 229 | + | ||
| 230 | + /** | ||
| 231 | + * 修改时间 | ||
| 232 | + */ | ||
| 233 | + @Column(name = "UPDATE_TIME" ) | ||
| 234 | + private Date updateTime; | ||
| 235 | + | ||
| 236 | + /** | ||
| 237 | + * 修改人 | ||
| 238 | + */ | ||
| 239 | + @Column(name = "UPDATE_USER" ) | ||
| 240 | + private String updateUser; | ||
| 241 | + | ||
| 242 | +} |
| 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 | + * @Description | ||
| 11 | + * @Author baodan_Fan | ||
| 12 | + * @Date 2021-08-12 | ||
| 13 | + */ | ||
| 14 | + | ||
| 15 | +@Entity | ||
| 16 | +@Table ( name ="T_ICLEAR_InvtWarehouseType" ) | ||
| 17 | +@Data | ||
| 18 | +public class TIclearInvtWarehouseType implements Serializable { | ||
| 19 | + private static final long serialVersionUID = 5071052537203328698L; | ||
| 20 | + @Id | ||
| 21 | + @GeneratedValue | ||
| 22 | + @Column(name = "ID" ) | ||
| 23 | + private Long id; | ||
| 24 | + | ||
| 25 | + /** | ||
| 26 | + * 中心统一编号 | ||
| 27 | + */ | ||
| 28 | + @Column(name = "SeqNo" ) | ||
| 29 | + private String seqNo; | ||
| 30 | + | ||
| 31 | + /** | ||
| 32 | + * 序号 | ||
| 33 | + */ | ||
| 34 | + @Column(name = "GNo" ) | ||
| 35 | + private Long gNo; | ||
| 36 | + | ||
| 37 | + /** | ||
| 38 | + * 保税清单编号 | ||
| 39 | + */ | ||
| 40 | + @Column(name = "BondInvtNo" ) | ||
| 41 | + private String bondInvtNo; | ||
| 42 | + | ||
| 43 | + /** | ||
| 44 | + * 出入库单编号 | ||
| 45 | + */ | ||
| 46 | + @Column(name = "SasStockNo" ) | ||
| 47 | + private String sasStockNo; | ||
| 48 | + | ||
| 49 | + /** | ||
| 50 | + * 创建时间 | ||
| 51 | + */ | ||
| 52 | + @Column(name = "CREATE_TIME" ) | ||
| 53 | + private Date createTime; | ||
| 54 | + | ||
| 55 | + /** | ||
| 56 | + * 创建人 | ||
| 57 | + */ | ||
| 58 | + @Column(name = "CREATOR" ) | ||
| 59 | + private String creator; | ||
| 60 | + | ||
| 61 | + /** | ||
| 62 | + * 修改时间 | ||
| 63 | + */ | ||
| 64 | + @Column(name = "UPDATE_TIME" ) | ||
| 65 | + private Date updateTime; | ||
| 66 | + | ||
| 67 | + /** | ||
| 68 | + * 修改人 | ||
| 69 | + */ | ||
| 70 | + @Column(name = "UPDATE_USER" ) | ||
| 71 | + private String updateUser; | ||
| 72 | + | ||
| 73 | +} |
| 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 | + * @Description | ||
| 11 | + * @Author baodan_Fan | ||
| 12 | + * @Date 2021-08-12 | ||
| 13 | + */ | ||
| 14 | + | ||
| 15 | +@Entity | ||
| 16 | +@Table ( name ="T_ICLEAR_SAS_CENT_DCL_STOCK" ) | ||
| 17 | +@Data | ||
| 18 | +public class TIclearSasCentDclStock implements Serializable { | ||
| 19 | + private static final long serialVersionUID = 7895067806004507484L; | ||
| 20 | + @Id | ||
| 21 | + @GeneratedValue | ||
| 22 | + @Column(name = "ID" ) | ||
| 23 | + private Long id; | ||
| 24 | + | ||
| 25 | + /** | ||
| 26 | + * 保税清单编号 | ||
| 27 | + */ | ||
| 28 | + @Column(name = "BOND_INVT_NO" ) | ||
| 29 | + private String bondInvtNo; | ||
| 30 | + | ||
| 31 | + /** | ||
| 32 | + * 出入库单编号 | ||
| 33 | + */ | ||
| 34 | + @Column(name = "SAS_STOCK_NO" ) | ||
| 35 | + private String sasStockNo; | ||
| 36 | + | ||
| 37 | + /** | ||
| 38 | + * 创建时间 | ||
| 39 | + */ | ||
| 40 | + @Column(name = "CREATE_TIME" ) | ||
| 41 | + private Date createTime; | ||
| 42 | + | ||
| 43 | + /** | ||
| 44 | + * 创建人 | ||
| 45 | + */ | ||
| 46 | + @Column(name = "CREATOR" ) | ||
| 47 | + private String creator; | ||
| 48 | + | ||
| 49 | + /** | ||
| 50 | + * 修改时间 | ||
| 51 | + */ | ||
| 52 | + @Column(name = "UPDATE_TIME" ) | ||
| 53 | + private Date updateTime; | ||
| 54 | + | ||
| 55 | + /** | ||
| 56 | + * 修改人 | ||
| 57 | + */ | ||
| 58 | + @Column(name = "UPDATE_USER" ) | ||
| 59 | + private String updateUser; | ||
| 60 | + | ||
| 61 | +} |
| ... | @@ -16,6 +16,6 @@ public interface DeclearTaskRepository extends JpaSpecificationExecutor<DeclearT | ... | @@ -16,6 +16,6 @@ public interface DeclearTaskRepository extends JpaSpecificationExecutor<DeclearT |
| 16 | * 根据运单号集合+创建时间 运单 | 16 | * 根据运单号集合+创建时间 运单 |
| 17 | * @return | 17 | * @return |
| 18 | */ | 18 | */ |
| 19 | - @Query( nativeQuery = true,value ="SELECT * FROM T_DECLEAR_TASK WHERE FILE_TYPE = 1 AND PUSH_NUMBER < 3 AND (RESPONSE_RESULTS IS NULL OR RESPONSE_RESULTS <> '0') ORDER BY OPERATION_TIME ASC" ) | 19 | + @Query( nativeQuery = true,value ="SELECT TOP 10 * FROM T_DECLEAR_TASK WHERE FILE_TYPE = 1 AND PUSH_NUMBER < 3 AND (RESPONSE_RESULTS IS NULL OR RESPONSE_RESULTS <> '0') ORDER BY OPERATION_TIME ASC" ) |
| 20 | public List<DeclearTask> findDeclearTask(); | 20 | public List<DeclearTask> findDeclearTask(); |
| 21 | } | 21 | } | ... | ... |
| ... | @@ -30,7 +30,7 @@ public interface DictionaryEntriesRepository extends JpaRepository<DictionaryEn | ... | @@ -30,7 +30,7 @@ public interface DictionaryEntriesRepository extends JpaRepository<DictionaryEn |
| 30 | * 查找全部DictionaryEntries | 30 | * 查找全部DictionaryEntries |
| 31 | * @return | 31 | * @return |
| 32 | */ | 32 | */ |
| 33 | - @Query(nativeQuery = true, value = "select ID,CODE,CHINESE_NAME,DICT_CODE,EXT3,EXT6 from T_BI_DICTIONARY_ENTRIES where STATUS=1") | 33 | + @Query(nativeQuery = true, value = "select ID,CODE,CHINESE_NAME,DICT_CODE,EXT2,EXT3,EXT6 from T_BI_DICTIONARY_ENTRIES where STATUS=1") |
| 34 | public List<DictionaryEntries> findAllDictionaryEntries(); | 34 | public List<DictionaryEntries> findAllDictionaryEntries(); |
| 35 | 35 | ||
| 36 | } | 36 | } | ... | ... |
| ... | @@ -30,8 +30,8 @@ public interface ReceiptMessageRepository extends JpaSpecificationExecutor<Recei | ... | @@ -30,8 +30,8 @@ public interface ReceiptMessageRepository extends JpaSpecificationExecutor<Recei |
| 30 | public List<ReceiptMessage> findReceiptMessageList(); | 30 | public List<ReceiptMessage> findReceiptMessageList(); |
| 31 | 31 | ||
| 32 | @Modifying(clearAutomatically = false) | 32 | @Modifying(clearAutomatically = false) |
| 33 | - @Query(nativeQuery = true,value = "UPDATE T_DECLEAR_TASK SET PUSH_TIME = ?1,PUSH_NUMBER = PUSH_NUMBER + 1,RESPONSE_TIME = ?2,RESPONSE_RESULTS = ?3,RESPONSE_CONTENT = ?4 WHERE FILE_TYPE = 2 AND CHMSIGNMENT_ID = ?5") | 33 | + @Query(nativeQuery = true,value = "UPDATE T_DECLEAR_TASK SET PUSH_TIME = ?1,PUSH_NUMBER = PUSH_NUMBER + 1,RESPONSE_TIME = ?2,RESPONSE_RESULTS = ?3,RESPONSE_CONTENT = ?4 WHERE FILE_TYPE = ?5 AND CHMSIGNMENT_ID = ?6") |
| 34 | - void updateDeclearTaskStatus(Date pushTime, Date responseTime, String responseResults, String responseContent, Long chmsignmentId); | 34 | + void updateDeclearTaskStatus(Date pushTime, Date responseTime, String responseResults, String responseContent, String fileType, Long chmsignmentId); |
| 35 | 35 | ||
| 36 | /** | 36 | /** |
| 37 | * 推送失败回执数据 | 37 | * 推送失败回执数据 | ... | ... |
| ... | @@ -3,13 +3,18 @@ package com.erry.iclear.dateInterface.service; | ... | @@ -3,13 +3,18 @@ package com.erry.iclear.dateInterface.service; |
| 3 | import com.arronlong.httpclientutil.HttpClientUtil; | 3 | import com.arronlong.httpclientutil.HttpClientUtil; |
| 4 | import com.arronlong.httpclientutil.common.HttpConfig; | 4 | import com.arronlong.httpclientutil.common.HttpConfig; |
| 5 | import com.arronlong.httpclientutil.common.HttpHeader; | 5 | import com.arronlong.httpclientutil.common.HttpHeader; |
| 6 | +import com.erry.iclear.dateInterface.api.request.Mawb; | ||
| 7 | +import com.erry.iclear.dateInterface.api.request.MawbDetail; | ||
| 6 | import com.erry.iclear.dateInterface.api.request.ReceiptMessage; | 8 | import com.erry.iclear.dateInterface.api.request.ReceiptMessage; |
| 7 | import com.erry.iclear.dateInterface.api.response.TokenResult; | 9 | import com.erry.iclear.dateInterface.api.response.TokenResult; |
| 8 | import com.erry.iclear.dateInterface.common.Constants; | 10 | import com.erry.iclear.dateInterface.common.Constants; |
| 11 | +import com.erry.iclear.dateInterface.entity.ChmConsignment; | ||
| 12 | +import com.erry.iclear.dateInterface.entity.ChmConsignmentDetail; | ||
| 9 | import com.erry.iclear.dateInterface.entity.DeclearTask; | 13 | import com.erry.iclear.dateInterface.entity.DeclearTask; |
| 10 | import com.erry.iclear.dateInterface.repository.ChmConsignmentRepository; | 14 | import com.erry.iclear.dateInterface.repository.ChmConsignmentRepository; |
| 11 | import com.erry.iclear.dateInterface.repository.DeclearTaskRepository; | 15 | import com.erry.iclear.dateInterface.repository.DeclearTaskRepository; |
| 12 | import com.erry.iclear.dateInterface.repository.ReceiptMessageRepository; | 16 | import com.erry.iclear.dateInterface.repository.ReceiptMessageRepository; |
| 17 | +import com.erry.iclear.dateInterface.util.DateUtils; | ||
| 13 | import com.erry.iclear.dateInterface.util.JsonToJava; | 18 | import com.erry.iclear.dateInterface.util.JsonToJava; |
| 14 | import lombok.extern.slf4j.Slf4j; | 19 | import lombok.extern.slf4j.Slf4j; |
| 15 | import org.apache.http.Header; | 20 | import org.apache.http.Header; |
| ... | @@ -52,6 +57,12 @@ public class ApiService { | ... | @@ -52,6 +57,12 @@ public class ApiService { |
| 52 | @Autowired | 57 | @Autowired |
| 53 | ChmConsignmentRepository consignmentRepository; | 58 | ChmConsignmentRepository consignmentRepository; |
| 54 | 59 | ||
| 60 | + @Autowired | ||
| 61 | + ChmConsignmentService consignmentService; | ||
| 62 | + | ||
| 63 | + @Autowired | ||
| 64 | + ChmConsignmentDetailService consignmentDetailService; | ||
| 65 | + | ||
| 55 | /** | 66 | /** |
| 56 | * 获取token信息 | 67 | * 获取token信息 |
| 57 | * @return | 68 | * @return |
| ... | @@ -62,7 +73,7 @@ public class ApiService { | ... | @@ -62,7 +73,7 @@ public class ApiService { |
| 62 | map.put("username", this.username); | 73 | map.put("username", this.username); |
| 63 | map.put("password", this.password); | 74 | map.put("password", this.password); |
| 64 | HttpConfig config = HttpConfig.custom() | 75 | HttpConfig config = HttpConfig.custom() |
| 65 | - .url(tokenUrl) | 76 | + .url(this.tokenUrl) |
| 66 | .map(map) | 77 | .map(map) |
| 67 | .encoding("utf-8"); | 78 | .encoding("utf-8"); |
| 68 | String tokenJson = HttpClientUtil.post(config); | 79 | String tokenJson = HttpClientUtil.post(config); |
| ... | @@ -79,7 +90,7 @@ public class ApiService { | ... | @@ -79,7 +90,7 @@ public class ApiService { |
| 79 | Map<String,Object> map = new HashMap<String,Object>(); | 90 | Map<String,Object> map = new HashMap<String,Object>(); |
| 80 | map.put("token", token); | 91 | map.put("token", token); |
| 81 | HttpConfig config = HttpConfig.custom() | 92 | HttpConfig config = HttpConfig.custom() |
| 82 | - .url(refreshTokenUrl) | 93 | + .url(this.refreshTokenUrl) |
| 83 | .map(map) | 94 | .map(map) |
| 84 | .encoding("utf-8"); | 95 | .encoding("utf-8"); |
| 85 | HttpClientUtil.post(config); | 96 | HttpClientUtil.post(config); |
| ... | @@ -92,7 +103,14 @@ public class ApiService { | ... | @@ -92,7 +103,14 @@ public class ApiService { |
| 92 | */ | 103 | */ |
| 93 | public void pushCustoms(String token){ | 104 | public void pushCustoms(String token){ |
| 94 | //获取海关回执数据 | 105 | //获取海关回执数据 |
| 95 | - List<ReceiptMessage> receiptMessageList = receiptMessageRepository.findReceiptMessageList(); | 106 | + List<ReceiptMessage> receiptMessageList = this.receiptMessageRepository.findReceiptMessageList(); |
| 107 | + //去除微秒 | ||
| 108 | + for(int i = 0 ; i < receiptMessageList.size() ; i ++){ | ||
| 109 | + ReceiptMessage receiptMessage = receiptMessageList.get(i); | ||
| 110 | + Date noticeDate = DateUtils.string2Date(receiptMessage.getNoticeDate(),null); | ||
| 111 | + String nDate = DateUtils.formatDate(noticeDate,"yyyy-MM-dd HH:mm:ss"); | ||
| 112 | + receiptMessage.setNoticeDate(nDate); | ||
| 113 | + } | ||
| 96 | this.sendCustoms(token,receiptMessageList); | 114 | this.sendCustoms(token,receiptMessageList); |
| 97 | } | 115 | } |
| 98 | 116 | ||
| ... | @@ -118,7 +136,7 @@ public class ApiService { | ... | @@ -118,7 +136,7 @@ public class ApiService { |
| 118 | //推送海关回执数据 | 136 | //推送海关回执数据 |
| 119 | HttpConfig config = HttpConfig.custom() | 137 | HttpConfig config = HttpConfig.custom() |
| 120 | .headers(headers) | 138 | .headers(headers) |
| 121 | - .url(customsUrl) | 139 | + .url(this.customsUrl) |
| 122 | .encoding("utf-8") | 140 | .encoding("utf-8") |
| 123 | .json(objJson); | 141 | .json(objJson); |
| 124 | String json = HttpClientUtil.post(config); | 142 | String json = HttpClientUtil.post(config); |
| ... | @@ -130,7 +148,7 @@ public class ApiService { | ... | @@ -130,7 +148,7 @@ public class ApiService { |
| 130 | declearTask.setResponseResults(tokenResult.getErrorcode()); | 148 | declearTask.setResponseResults(tokenResult.getErrorcode()); |
| 131 | declearTask.setResponseContent(tokenResult.getErrormessage()); | 149 | declearTask.setResponseContent(tokenResult.getErrormessage()); |
| 132 | declearTaskList.add(declearTask); | 150 | declearTaskList.add(declearTask); |
| 133 | - }else if(tokenResult.getErrorcode().equals(Constants.ApiResponseKeys.KEY_10004)){ | 151 | + }else if(tokenResult.getErrorcode().equals(Constants.ApiResponseKeys.KEY_10004) || tokenResult.getErrorcode().equals(Constants.ApiResponseKeys.KEY_10013)){ |
| 134 | //如果凭证失效,则刷新凭证 | 152 | //如果凭证失效,则刷新凭证 |
| 135 | refreshToken(token); | 153 | refreshToken(token); |
| 136 | }else{ | 154 | }else{ |
| ... | @@ -143,7 +161,7 @@ public class ApiService { | ... | @@ -143,7 +161,7 @@ public class ApiService { |
| 143 | }catch(Exception ex){ | 161 | }catch(Exception ex){ |
| 144 | //接口响应时间 | 162 | //接口响应时间 |
| 145 | declearTask.setResponseTime(new Date()); | 163 | declearTask.setResponseTime(new Date()); |
| 146 | - declearTask.setResponseResults("接口调用失败!"); | 164 | + declearTask.setResponseResults("99999"); |
| 147 | declearTask.setResponseContent(ex.getMessage()); | 165 | declearTask.setResponseContent(ex.getMessage()); |
| 148 | declearTaskList.add(declearTask); | 166 | declearTaskList.add(declearTask); |
| 149 | ex.printStackTrace(); | 167 | ex.printStackTrace(); |
| ... | @@ -151,10 +169,11 @@ public class ApiService { | ... | @@ -151,10 +169,11 @@ public class ApiService { |
| 151 | }); | 169 | }); |
| 152 | declearTaskList.forEach(declearTask -> { | 170 | declearTaskList.forEach(declearTask -> { |
| 153 | //将已经推送完成的回执信息状态修改 | 171 | //将已经推送完成的回执信息状态修改 |
| 154 | - receiptMessageRepository.updateDeclearTaskStatus(declearTask.getPushTime(), | 172 | + this.receiptMessageRepository.updateDeclearTaskStatus(declearTask.getPushTime(), |
| 155 | declearTask.getResponseTime(), | 173 | declearTask.getResponseTime(), |
| 156 | declearTask.getResponseResults(), | 174 | declearTask.getResponseResults(), |
| 157 | declearTask.getResponseContent(), | 175 | declearTask.getResponseContent(), |
| 176 | + "2", | ||
| 158 | declearTask.getChmsignmentId().longValue()); | 177 | declearTask.getChmsignmentId().longValue()); |
| 159 | }); | 178 | }); |
| 160 | } | 179 | } |
| ... | @@ -165,21 +184,97 @@ public class ApiService { | ... | @@ -165,21 +184,97 @@ public class ApiService { |
| 165 | * @throws Exception | 184 | * @throws Exception |
| 166 | */ | 185 | */ |
| 167 | public void pushMawb(String token){ | 186 | public void pushMawb(String token){ |
| 168 | - Header[] headers = HttpHeader.custom() | ||
| 169 | - .other("Content-Type", "application/json") | ||
| 170 | - .other("Authorization", token) | ||
| 171 | - .build(); | ||
| 172 | - //获取海关回执数据 | ||
| 173 | try{ | 187 | try{ |
| 174 | - List<DeclearTask> declearTaskList = declearTaskRepository.findDeclearTask(); | 188 | + /****************将Export对象转换成西门子交互实体对象****************/ |
| 189 | + //查询需要推送数据 | ||
| 190 | + List<Mawb> mawbList = new ArrayList<Mawb>(); | ||
| 191 | + List<DeclearTask> declearTaskList = this.declearTaskRepository.findDeclearTask(); | ||
| 175 | declearTaskList.forEach(declearTask -> { | 192 | declearTaskList.forEach(declearTask -> { |
| 176 | Long consignmentId = declearTask.getChmsignmentId().longValue(); | 193 | Long consignmentId = declearTask.getChmsignmentId().longValue(); |
| 177 | - consignmentRepository.findChmConsignmentById(consignmentId); | 194 | + //查询需要推送运单数据,并且转换 |
| 195 | + ChmConsignment consignment = this.consignmentRepository.findChmConsignmentById(consignmentId); | ||
| 196 | + Mawb mawb = this.consignmentService.convertToChmConsignment(consignment); | ||
| 197 | + //获取需要推送运单数据,并且转换 | ||
| 198 | + if(consignment.getChmConsignmentDetailList() != null){ | ||
| 199 | + List<MawbDetail> mawbDetailList = new ArrayList<MawbDetail>(); | ||
| 200 | + for(int i = 0 ; i < consignment.getChmConsignmentDetailList().size() ; i++){ | ||
| 201 | + ChmConsignmentDetail detail = consignment.getChmConsignmentDetailList().get(i); | ||
| 202 | + MawbDetail mawbDetail = this.consignmentDetailService.convertToChmConsignmentDetail(detail, String.valueOf((i + 1))); | ||
| 203 | + mawbDetailList.add(mawbDetail); | ||
| 204 | + } | ||
| 205 | + mawb.setMawbDetailList(mawbDetailList); | ||
| 206 | + } | ||
| 207 | + mawbList.add(mawb); | ||
| 178 | }); | 208 | }); |
| 209 | + this.sendMawb(token,mawbList); | ||
| 179 | }catch(Exception ex){ | 210 | }catch(Exception ex){ |
| 180 | ex.printStackTrace(); | 211 | ex.printStackTrace(); |
| 181 | } | 212 | } |
| 182 | } | 213 | } |
| 214 | + | ||
| 215 | + /** | ||
| 216 | + * 将完整报文发送至西门子 | ||
| 217 | + * @param token | ||
| 218 | + * @param mawbList | ||
| 219 | + */ | ||
| 220 | + public void sendMawb(String token ,List<Mawb> mawbList){ | ||
| 221 | + Header[] headers = HttpHeader.custom() | ||
| 222 | + .other("Content-Type", "application/json") | ||
| 223 | + .other("Authorization", token) | ||
| 224 | + .build(); | ||
| 225 | + List<DeclearTask> declearTaskList = new ArrayList<DeclearTask>(); | ||
| 226 | + mawbList.forEach(d->{ | ||
| 227 | + DeclearTask declearTask = new DeclearTask(); | ||
| 228 | + try { | ||
| 229 | + //设置ID | ||
| 230 | + declearTask.setChmsignmentId(BigDecimal.valueOf(d.getId())); | ||
| 231 | + //推送时间 | ||
| 232 | + declearTask.setPushTime(new Date()); | ||
| 233 | + String objJson = JsonToJava.toJson(d); | ||
| 234 | + //推送海关回执数据 | ||
| 235 | + HttpConfig config = HttpConfig.custom() | ||
| 236 | + .headers(headers) | ||
| 237 | + .url(this.completeMsgUrl) | ||
| 238 | + .encoding("utf-8") | ||
| 239 | + .json(objJson); | ||
| 240 | + String json = HttpClientUtil.post(config); | ||
| 241 | + //接口响应时间 | ||
| 242 | + declearTask.setResponseTime(new Date()); | ||
| 243 | + TokenResult tokenResult = JsonToJava.parseJson(json,TokenResult.class); | ||
| 244 | + if(tokenResult.getErrorcode().equals(Constants.ApiResponseKeys.SUCCESS)){ | ||
| 245 | + //推送成功,记录推送状态 | ||
| 246 | + declearTask.setResponseResults(tokenResult.getErrorcode()); | ||
| 247 | + declearTask.setResponseContent(tokenResult.getErrormessage()); | ||
| 248 | + declearTaskList.add(declearTask); | ||
| 249 | + }else if(tokenResult.getErrorcode().equals(Constants.ApiResponseKeys.KEY_10004) || tokenResult.getErrorcode().equals(Constants.ApiResponseKeys.KEY_10013)){ | ||
| 250 | + //如果凭证失效,则刷新凭证 | ||
| 251 | + refreshToken(token); | ||
| 252 | + }else{ | ||
| 253 | + //推送失败,记录推送状态 | ||
| 254 | + declearTask.setResponseResults(tokenResult.getErrorcode()); | ||
| 255 | + declearTask.setResponseContent(tokenResult.getErrormessage()); | ||
| 256 | + declearTaskList.add(declearTask); | ||
| 257 | + log.info("完整报关单推送失败,推送相应码为:"+tokenResult.getErrorcode() + ",推送ID为:" + d.getId()); | ||
| 258 | + } | ||
| 259 | + }catch(Exception ex){ | ||
| 260 | + //接口响应时间 | ||
| 261 | + declearTask.setResponseTime(new Date()); | ||
| 262 | + declearTask.setResponseResults("99999"); | ||
| 263 | + declearTask.setResponseContent(ex.getMessage()); | ||
| 264 | + declearTaskList.add(declearTask); | ||
| 265 | + ex.printStackTrace(); | ||
| 266 | + } | ||
| 267 | + }); | ||
| 268 | + declearTaskList.forEach(declearTask -> { | ||
| 269 | + //将已经推送完成的报关单状态修改 | ||
| 270 | + this.receiptMessageRepository.updateDeclearTaskStatus(declearTask.getPushTime(), | ||
| 271 | + declearTask.getResponseTime(), | ||
| 272 | + declearTask.getResponseResults(), | ||
| 273 | + declearTask.getResponseContent(), | ||
| 274 | + "1", | ||
| 275 | + declearTask.getChmsignmentId().longValue()); | ||
| 276 | + }); | ||
| 277 | + } | ||
| 183 | /** | 278 | /** |
| 184 | * 传输推送失败回执数据 | 279 | * 传输推送失败回执数据 |
| 185 | * @param token | 280 | * @param token | ... | ... |
| ... | @@ -5,6 +5,7 @@ import com.erry.iclear.dateInterface.common.Constant; | ... | @@ -5,6 +5,7 @@ import com.erry.iclear.dateInterface.common.Constant; |
| 5 | import com.erry.iclear.dateInterface.entity.*; | 5 | import com.erry.iclear.dateInterface.entity.*; |
| 6 | import com.erry.iclear.dateInterface.repository.ChmConsignmentDetailRepository; | 6 | import com.erry.iclear.dateInterface.repository.ChmConsignmentDetailRepository; |
| 7 | import com.erry.iclear.dateInterface.repository.ChmConsignmentRepository; | 7 | import com.erry.iclear.dateInterface.repository.ChmConsignmentRepository; |
| 8 | +import com.erry.iclear.dateInterface.util.NumberUtils; | ||
| 8 | import lombok.extern.slf4j.Slf4j; | 9 | import lombok.extern.slf4j.Slf4j; |
| 9 | import org.apache.commons.lang3.StringUtils; | 10 | import org.apache.commons.lang3.StringUtils; |
| 10 | import org.springframework.beans.factory.annotation.Autowired; | 11 | import org.springframework.beans.factory.annotation.Autowired; |
| ... | @@ -51,7 +52,6 @@ public class ChmConsignmentDetailService { | ... | @@ -51,7 +52,6 @@ public class ChmConsignmentDetailService { |
| 51 | result.setLevyTypeDic(levyTypeDictionaryEntries); | 52 | result.setLevyTypeDic(levyTypeDictionaryEntries); |
| 52 | result.setLevyType(levyTypeDictionaryEntries.getChineseName()); | 53 | result.setLevyType(levyTypeDictionaryEntries.getChineseName()); |
| 53 | } | 54 | } |
| 54 | - | ||
| 55 | //货号 | 55 | //货号 |
| 56 | //版本号 | 56 | //版本号 |
| 57 | //第一计量单位(法定单位) | 57 | //第一计量单位(法定单位) |
| ... | @@ -60,8 +60,6 @@ public class ChmConsignmentDetailService { | ... | @@ -60,8 +60,6 @@ public class ChmConsignmentDetailService { |
| 60 | result.setUnitLegalFirstId(firstUnitDictionaryEntries); | 60 | result.setUnitLegalFirstId(firstUnitDictionaryEntries); |
| 61 | result.setUnitLegalFirst(firstUnitDictionaryEntries.getChineseName()); | 61 | result.setUnitLegalFirst(firstUnitDictionaryEntries.getChineseName()); |
| 62 | } | 62 | } |
| 63 | - | ||
| 64 | - | ||
| 65 | //第一法定数量 | 63 | //第一法定数量 |
| 66 | result.setQtyLegalFirst(BigDecimal.valueOf(mawbDetail.getFirstQty().doubleValue())); | 64 | result.setQtyLegalFirst(BigDecimal.valueOf(mawbDetail.getFirstQty().doubleValue())); |
| 67 | //成交计量单位 | 65 | //成交计量单位 |
| ... | @@ -71,7 +69,6 @@ public class ChmConsignmentDetailService { | ... | @@ -71,7 +69,6 @@ public class ChmConsignmentDetailService { |
| 71 | result.setKnockdownUnitDic(knockdownUnitEntries); | 69 | result.setKnockdownUnitDic(knockdownUnitEntries); |
| 72 | result.setKnockdownUnit(knockdownUnitEntries.getChineseName()); | 70 | result.setKnockdownUnit(knockdownUnitEntries.getChineseName()); |
| 73 | } | 71 | } |
| 74 | - | ||
| 75 | //商品规格、型号 | 72 | //商品规格、型号 |
| 76 | result.setModel(mawbDetail.getGmodel()); | 73 | result.setModel(mawbDetail.getGmodel()); |
| 77 | //商品名称 | 74 | //商品名称 |
| ... | @@ -85,16 +82,12 @@ public class ChmConsignmentDetailService { | ... | @@ -85,16 +82,12 @@ public class ChmConsignmentDetailService { |
| 85 | result.setHabitatDic(habitatDictonaryEntries); | 82 | result.setHabitatDic(habitatDictonaryEntries); |
| 86 | result.setHabitat(habitatDictonaryEntries.getChineseName()); | 83 | result.setHabitat(habitatDictonaryEntries.getChineseName()); |
| 87 | } | 84 | } |
| 88 | - | ||
| 89 | - | ||
| 90 | //第二计量单位 | 85 | //第二计量单位 |
| 91 | DictionaryEntries secondUnitDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.TRANSACTION_UNIT+ mawbDetail.getSecondUnit()); | 86 | DictionaryEntries secondUnitDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.TRANSACTION_UNIT+ mawbDetail.getSecondUnit()); |
| 92 | if(!Objects.equals(secondUnitDictionaryEntries,null)){ | 87 | if(!Objects.equals(secondUnitDictionaryEntries,null)){ |
| 93 | result.setUnitLegalSecondId(secondUnitDictionaryEntries); | 88 | result.setUnitLegalSecondId(secondUnitDictionaryEntries); |
| 94 | result.setUnitLegalSecond(secondUnitDictionaryEntries.getChineseName()); | 89 | result.setUnitLegalSecond(secondUnitDictionaryEntries.getChineseName()); |
| 95 | } | 90 | } |
| 96 | - | ||
| 97 | - | ||
| 98 | //第二法定数量 | 91 | //第二法定数量 |
| 99 | result.setQtyLegalSecond(BigDecimal.valueOf(mawbDetail.getSecondQty().doubleValue())); | 92 | result.setQtyLegalSecond(BigDecimal.valueOf(mawbDetail.getSecondQty().doubleValue())); |
| 100 | //成交币制 | 93 | //成交币制 |
| ... | @@ -104,7 +97,6 @@ public class ChmConsignmentDetailService { | ... | @@ -104,7 +97,6 @@ public class ChmConsignmentDetailService { |
| 104 | result.setCurrency(currencyDictionaryEntries.getChineseName()); | 97 | result.setCurrency(currencyDictionaryEntries.getChineseName()); |
| 105 | } | 98 | } |
| 106 | 99 | ||
| 107 | - | ||
| 108 | //用途/生产厂家 | 100 | //用途/生产厂家 |
| 109 | //工缴费 | 101 | //工缴费 |
| 110 | //最终目的国 | 102 | //最终目的国 |
| ... | @@ -114,8 +106,6 @@ public class ChmConsignmentDetailService { | ... | @@ -114,8 +106,6 @@ public class ChmConsignmentDetailService { |
| 114 | result.setDestinationCountry(destinationCountryDictionaryEntries.getChineseName()); | 106 | result.setDestinationCountry(destinationCountryDictionaryEntries.getChineseName()); |
| 115 | } | 107 | } |
| 116 | 108 | ||
| 117 | - | ||
| 118 | - | ||
| 119 | //检验检疫编码 | 109 | //检验检疫编码 |
| 120 | //申报货物英文名称 | 110 | //申报货物英文名称 |
| 121 | result.setContentDescription(mawbDetail.getDeclGoodsEname()); | 111 | result.setContentDescription(mawbDetail.getDeclGoodsEname()); |
| ... | @@ -126,27 +116,107 @@ public class ChmConsignmentDetailService { | ... | @@ -126,27 +116,107 @@ public class ChmConsignmentDetailService { |
| 126 | result.setOrigplacecode(Objects.equals(origplacecodeMapping,null)?"":origplacecodeMapping.getOrigplaceName()); | 116 | result.setOrigplacecode(Objects.equals(origplacecodeMapping,null)?"":origplacecodeMapping.getOrigplaceName()); |
| 127 | } | 117 | } |
| 128 | 118 | ||
| 129 | - | ||
| 130 | - | ||
| 131 | //境内目的地/境内货源地 | 119 | //境内目的地/境内货源地 |
| 132 | DomesticDestinationMapping domesticDestinationDictionaryEntries = Constant.domesticDestinationMappingCache.get(mawbDetail.getDistrictCode()); | 120 | DomesticDestinationMapping domesticDestinationDictionaryEntries = Constant.domesticDestinationMappingCache.get(mawbDetail.getDistrictCode()); |
| 133 | if(!Objects.equals(domesticDestinationDictionaryEntries,null)){ | 121 | if(!Objects.equals(domesticDestinationDictionaryEntries,null)){ |
| 134 | result.setDomesticDestinationMapping(domesticDestinationDictionaryEntries); | 122 | result.setDomesticDestinationMapping(domesticDestinationDictionaryEntries); |
| 135 | result.setDomesticDestination(Objects.equals(destinationCountryDictionaryEntries,null)?"":destinationCountryDictionaryEntries.getChineseName()); | 123 | result.setDomesticDestination(Objects.equals(destinationCountryDictionaryEntries,null)?"":destinationCountryDictionaryEntries.getChineseName()); |
| 136 | } | 124 | } |
| 137 | - | ||
| 138 | - | ||
| 139 | result.setDetailId(mawbDetail.getDetailId()); | 125 | result.setDetailId(mawbDetail.getDetailId()); |
| 140 | - | ||
| 141 | }catch (Exception e){ | 126 | }catch (Exception e){ |
| 142 | log.error("convertToChmConsignmentDetail() error:"+e.getMessage()); | 127 | log.error("convertToChmConsignmentDetail() error:"+e.getMessage()); |
| 143 | } | 128 | } |
| 144 | - | ||
| 145 | return result; | 129 | return result; |
| 146 | } | 130 | } |
| 147 | 131 | ||
| 132 | + /** | ||
| 133 | + * 转换运单明细 | ||
| 134 | + * @param detail | ||
| 135 | + * @param gno | ||
| 136 | + * @return | ||
| 137 | + */ | ||
| 138 | + public MawbDetail convertToChmConsignmentDetail(ChmConsignmentDetail detail,String gno){ | ||
| 139 | + MawbDetail result = new MawbDetail(); | ||
| 140 | + try{ | ||
| 141 | + //明细ID | ||
| 142 | + result.setDetailId(detail.getId().toString()); | ||
| 143 | + //归类标志 | ||
| 144 | + result.setClassMark(""); | ||
| 145 | + //商品编号 必须是十位,不足的后补 00 | ||
| 146 | + result.setCodeTS(detail.getSkuCode()); | ||
| 147 | + //申报单价 小数点保留4位 | ||
| 148 | + result.setDeclPrice(NumberUtils.bigDecimalFormat(detail.getOriRegion(),4)); | ||
| 149 | + //申报总价 小数点保留2位 | ||
| 150 | + result.setDeclTotal(NumberUtils.bigDecimalFormat(detail.getAmount(),2)); | ||
| 151 | + //征免方式 数字一字码,0~9 | ||
| 152 | + if(!Objects.equals(detail.getLevyTypeDic(),null)){ | ||
| 153 | + result.setDutyMode(detail.getLevyTypeDic().getExt2()); | ||
| 154 | + } | ||
| 155 | + //货号 有值传值,无值填空值 | ||
| 156 | + result.setExgNo(""); | ||
| 157 | + //版本号 有值传值,无值填空值 | ||
| 158 | + result.setExgVersion(""); | ||
| 159 | + //第一计量单位(法定单位) 数字三字码 | ||
| 160 | + if(!Objects.equals(detail.getUnitLegalFirstId(),null)){ | ||
| 161 | + result.setFirstUnit(detail.getUnitLegalFirstId().getExt2()); | ||
| 162 | + } | ||
| 163 | + //第一法定数量 | ||
| 164 | + result.setFirstQty(NumberUtils.bigDecimalToIntger(detail.getQtyLegalFirst())); | ||
| 165 | + //成交计量单位 数字三字码 | ||
| 166 | + if(!Objects.equals(detail.getKnockdownUnitDic(),null)){ | ||
| 167 | + result.setGunit(detail.getKnockdownUnitDic().getExt2()); | ||
| 168 | + } | ||
| 169 | + //商品规格、型号 | ||
| 170 | + result.setGmodel(detail.getModel()); | ||
| 171 | + //商品名称 品名必填且必须包含中文字符 | ||
| 172 | + result.setGname(detail.getSkuName()); | ||
| 173 | + //商品序号 | ||
| 174 | + result.setGno(gno); | ||
| 175 | + //成交数量 | ||
| 176 | + result.setGqty(detail.getKnockdownNumber()); | ||
| 177 | + //原产国 英文三字码 | ||
| 178 | + if(!Objects.equals(detail.getHabitatDic(),null)){ | ||
| 179 | + result.setOriginCountry(detail.getHabitatDic().getExt3()); | ||
| 180 | + } | ||
| 181 | + //第二计量单位 数字三字码 | ||
| 182 | + if(!Objects.equals(detail.getUnitLegalSecondId(),null)){ | ||
| 183 | + result.setSecondUnit(detail.getUnitLegalSecondId().getExt2()); | ||
| 184 | + } | ||
| 185 | + //第二法定数量 | ||
| 186 | + result.setSecondQty(NumberUtils.bigDecimalToIntger(detail.getQtyLegalSecond())); | ||
| 187 | + //成交币制 英文三字码 | ||
| 188 | + if(!Objects.equals(detail.getCurrencyDic(),null)){ | ||
| 189 | + result.setTradeCurr(detail.getCurrencyDic().getExt2()); | ||
| 190 | + } | ||
| 191 | + //用途/生产厂家 | ||
| 192 | + result.setUseTo(""); | ||
| 193 | + //工缴费 | ||
| 194 | + result.setWorkUsd(new BigDecimal(0)); | ||
| 195 | + //最终目的国 英文三字码 | ||
| 196 | + if(!Objects.equals(detail.getDestinationCountryDic(),null)){ | ||
| 197 | + result.setDestinationCountry(detail.getDestinationCountryDic().getExt3()); | ||
| 198 | + } | ||
| 199 | + //检验检疫编码 | ||
| 200 | + result.setCiqCode(""); | ||
| 201 | + //申报货物英文名称 | ||
| 202 | + result.setDeclGoodsEname(detail.getContentDescription()); | ||
| 203 | + //目的地代码 有值传值,无值填空值 | ||
| 204 | + if(!Objects.equals(detail.getOrigplacecodeMapping(),null)){ | ||
| 205 | + result.setDestCode(detail.getOrigplacecodeMapping().getOrigplaceCode()); | ||
| 206 | + }else{ | ||
| 207 | + result.setDestCode(""); | ||
| 208 | + } | ||
| 209 | + //境内目的地/境内货源地 | ||
| 210 | + if(!Objects.equals(detail.getDomesticDestinationMapping(),null)){ | ||
| 211 | + result.setDistrictCode(detail.getDomesticDestinationMapping().getDistrictCode()); | ||
| 212 | + } | ||
| 213 | + result.setDetailId(detail.getDetailId()); | ||
| 214 | + }catch (Exception e){ | ||
| 215 | + log.error("convertToChmConsignmentDetail() error:"+e.getMessage()); | ||
| 216 | + } | ||
| 148 | 217 | ||
| 149 | - | 218 | + return result; |
| 219 | + } | ||
| 150 | 220 | ||
| 151 | public List<ChmConsignmentDetail> findChmConsignmentDetailListByConsignmentCode(Long consignmentId){ | 221 | public List<ChmConsignmentDetail> findChmConsignmentDetailListByConsignmentCode(Long consignmentId){ |
| 152 | List<ChmConsignmentDetail> result = new ArrayList<>(); | 222 | List<ChmConsignmentDetail> result = new ArrayList<>(); |
| ... | @@ -158,28 +228,19 @@ public class ChmConsignmentDetailService { | ... | @@ -158,28 +228,19 @@ public class ChmConsignmentDetailService { |
| 158 | return result; | 228 | return result; |
| 159 | } | 229 | } |
| 160 | 230 | ||
| 161 | - | ||
| 162 | - | ||
| 163 | - | ||
| 164 | - | ||
| 165 | public void saveDetailList(List<ChmConsignmentDetail> chmConsignmentDetailList){ | 231 | public void saveDetailList(List<ChmConsignmentDetail> chmConsignmentDetailList){ |
| 166 | chmConsignmentDetailRepository.saveAll(chmConsignmentDetailList); | 232 | chmConsignmentDetailRepository.saveAll(chmConsignmentDetailList); |
| 167 | } | 233 | } |
| 168 | 234 | ||
| 169 | - | ||
| 170 | public void saveChmConsignmentDetail(ChmConsignmentDetail consignmentDetail){ | 235 | public void saveChmConsignmentDetail(ChmConsignmentDetail consignmentDetail){ |
| 171 | chmConsignmentDetailRepository.save(consignmentDetail); | 236 | chmConsignmentDetailRepository.save(consignmentDetail); |
| 172 | } | 237 | } |
| 173 | 238 | ||
| 174 | - | ||
| 175 | public void deleteChmConsignmentDetail(Long id){ | 239 | public void deleteChmConsignmentDetail(Long id){ |
| 176 | chmConsignmentDetailRepository.deleteById(id); | 240 | chmConsignmentDetailRepository.deleteById(id); |
| 177 | } | 241 | } |
| 178 | 242 | ||
| 179 | - | ||
| 180 | public void deleteChmConsignmentDetailBatch(List<Long> idList){ | 243 | public void deleteChmConsignmentDetailBatch(List<Long> idList){ |
| 181 | chmConsignmentDetailRepository.deleteChmConsignmentDetailByChnConIdList(idList); | 244 | chmConsignmentDetailRepository.deleteChmConsignmentDetailByChnConIdList(idList); |
| 182 | } | 245 | } |
| 183 | - | ||
| 184 | - | ||
| 185 | } | 246 | } | ... | ... |
| ... | @@ -10,7 +10,9 @@ import com.erry.iclear.dateInterface.entity.ChmConsignmentDetail; | ... | @@ -10,7 +10,9 @@ import com.erry.iclear.dateInterface.entity.ChmConsignmentDetail; |
| 10 | import com.erry.iclear.dateInterface.entity.DictionaryEntries; | 10 | import com.erry.iclear.dateInterface.entity.DictionaryEntries; |
| 11 | import com.erry.iclear.dateInterface.repository.ChmConsignmentRepository; | 11 | import com.erry.iclear.dateInterface.repository.ChmConsignmentRepository; |
| 12 | import com.erry.iclear.dateInterface.util.DateUtils; | 12 | import com.erry.iclear.dateInterface.util.DateUtils; |
| 13 | +import com.erry.iclear.dateInterface.util.NumberUtils; | ||
| 13 | import lombok.extern.slf4j.Slf4j; | 14 | import lombok.extern.slf4j.Slf4j; |
| 15 | +import org.apache.commons.lang3.StringUtils; | ||
| 14 | import org.springframework.beans.BeanUtils; | 16 | import org.springframework.beans.BeanUtils; |
| 15 | import org.springframework.beans.factory.annotation.Autowired; | 17 | import org.springframework.beans.factory.annotation.Autowired; |
| 16 | import org.springframework.stereotype.Service; | 18 | import org.springframework.stereotype.Service; |
| ... | @@ -59,7 +61,6 @@ public class ChmConsignmentService { | ... | @@ -59,7 +61,6 @@ public class ChmConsignmentService { |
| 59 | result.setConsignmentHeadCode(billNo[0]); | 61 | result.setConsignmentHeadCode(billNo[0]); |
| 60 | result.setConsignmentCode(billNo[1]); | 62 | result.setConsignmentCode(billNo[1]); |
| 61 | } | 63 | } |
| 62 | - | ||
| 63 | //合同号 | 64 | //合同号 |
| 64 | result.setContractCode(mawb.getContrNo()); | 65 | result.setContractCode(mawb.getContrNo()); |
| 65 | //主管海关(申报地海关) | 66 | //主管海关(申报地海关) |
| ... | @@ -70,26 +71,22 @@ public class ChmConsignmentService { | ... | @@ -70,26 +71,22 @@ public class ChmConsignmentService { |
| 70 | result.setTaxNatureDic(levyTypeDictionaryEntries); | 71 | result.setTaxNatureDic(levyTypeDictionaryEntries); |
| 71 | result.setTaxNature(levyTypeDictionaryEntries.getChineseName()); | 72 | result.setTaxNature(levyTypeDictionaryEntries.getChineseName()); |
| 72 | } | 73 | } |
| 73 | - | ||
| 74 | //报关/转关关系标志:固定值0 ,但数据字典里没有0 | 74 | //报关/转关关系标志:固定值0 ,但数据字典里没有0 |
| 75 | - | ||
| 76 | - | ||
| 77 | //经停港/指运港 | 75 | //经停港/指运港 |
| 78 | ChmCarryPort chmCarryPort =Constant.chmCarryPortCache.get(mawb.getDistinatePort()); | 76 | ChmCarryPort chmCarryPort =Constant.chmCarryPortCache.get(mawb.getDistinatePort()); |
| 79 | if(!Objects.equals(chmCarryPort,null)){ | 77 | if(!Objects.equals(chmCarryPort,null)){ |
| 80 | result.setThroughStopPortDic(chmCarryPort); | 78 | result.setThroughStopPortDic(chmCarryPort); |
| 81 | result.setThroughStopPort(chmCarryPort.getPortNo()); | 79 | result.setThroughStopPort(chmCarryPort.getPortNo()); |
| 82 | } | 80 | } |
| 83 | - | 81 | + //TODO 报关标志【已确认】,IDE传递的是1,Export中是001,需要进行转换,如果是空,则转换成1 |
| 84 | - | 82 | + if(mawb.getEdiId() == null){ |
| 85 | - //TODO 报关标志【待确认】 | 83 | + mawb.setEdiId("1"); |
| 86 | - DictionaryEntries declaredDocTypeDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.DECLARED_DOC_TYPE + mawb.getEdiId()); | 84 | + } |
| 85 | + DictionaryEntries declaredDocTypeDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.DECLARED_DOC_TYPE + Constant.DECLARED_DOC_TYPE_ZERO + mawb.getEdiId()); | ||
| 87 | if(!Objects.equals(declaredDocTypeDictionaryEntries,null)){ | 86 | if(!Objects.equals(declaredDocTypeDictionaryEntries,null)){ |
| 88 | result.setDeclaredDocTypeDic(declaredDocTypeDictionaryEntries); | 87 | result.setDeclaredDocTypeDic(declaredDocTypeDictionaryEntries); |
| 89 | result.setDeclaredDocType(declaredDocTypeDictionaryEntries.getChineseName()); | 88 | result.setDeclaredDocType(declaredDocTypeDictionaryEntries.getChineseName()); |
| 90 | } | 89 | } |
| 91 | - | ||
| 92 | - | ||
| 93 | //海关编号 | 90 | //海关编号 |
| 94 | result.setCustomsNo(mawb.getEntryId()); | 91 | result.setCustomsNo(mawb.getEntryId()); |
| 95 | //运费币制 | 92 | //运费币制 |
| ... | @@ -98,28 +95,20 @@ public class ChmConsignmentService { | ... | @@ -98,28 +95,20 @@ public class ChmConsignmentService { |
| 98 | result.setTransCurrencyDic(currencyDictionaryEntries); | 95 | result.setTransCurrencyDic(currencyDictionaryEntries); |
| 99 | result.setTransCurrency(currencyDictionaryEntries.getChineseName()); | 96 | result.setTransCurrency(currencyDictionaryEntries.getChineseName()); |
| 100 | } | 97 | } |
| 101 | - | ||
| 102 | - | ||
| 103 | //TODO 运费标记:固定值 3 【iclear中, 和成交方式相关,只有成交方式 1、2 时,才能传 3 】 | 98 | //TODO 运费标记:固定值 3 【iclear中, 和成交方式相关,只有成交方式 1、2 时,才能传 3 】 |
| 104 | - | ||
| 105 | - | ||
| 106 | //运费总价 | 99 | //运费总价 |
| 107 | result.setTransCost(mawb.getFeeRate()); | 100 | result.setTransCost(mawb.getFeeRate()); |
| 108 | //毛重 | 101 | //毛重 |
| 109 | - result.setGrossWeight(BigDecimal.valueOf(mawb.getGrossWet())); | 102 | + result.setGrossWeight(mawb.getGrossWet()); |
| 110 | //出入境关闭:固定值 0101 | 103 | //出入境关闭:固定值 0101 |
| 111 | //录入人名称:固定值 必填项,但填的值是空值 | 104 | //录入人名称:固定值 必填项,但填的值是空值 |
| 112 | - | ||
| 113 | //保险费币制 | 105 | //保险费币制 |
| 114 | DictionaryEntries insuranceDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.CURRENCY_SYSTEM+mawb.getInsurCurr()); | 106 | DictionaryEntries insuranceDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.CURRENCY_SYSTEM+mawb.getInsurCurr()); |
| 115 | if(!Objects.equals(insuranceDictionaryEntries,null)){ | 107 | if(!Objects.equals(insuranceDictionaryEntries,null)){ |
| 116 | result.setInsuranceCostCurrencyDic(insuranceDictionaryEntries); | 108 | result.setInsuranceCostCurrencyDic(insuranceDictionaryEntries); |
| 117 | result.setInsuranceCostCurrency(insuranceDictionaryEntries.getChineseName()); | 109 | result.setInsuranceCostCurrency(insuranceDictionaryEntries.getChineseName()); |
| 118 | } | 110 | } |
| 119 | - | ||
| 120 | - | ||
| 121 | //保险费标记 ,根据transMode决定 | 111 | //保险费标记 ,根据transMode决定 |
| 122 | - | ||
| 123 | //保险费/率 | 112 | //保险费/率 |
| 124 | result.setInsuranceCost(mawb.getInsurRate()); | 113 | result.setInsuranceCost(mawb.getInsurRate()); |
| 125 | //备案号 | 114 | //备案号 |
| ... | @@ -132,7 +121,6 @@ public class ChmConsignmentService { | ... | @@ -132,7 +121,6 @@ public class ChmConsignmentService { |
| 132 | result.setOtherCurrencyDic(otherDictionaryEntries); | 121 | result.setOtherCurrencyDic(otherDictionaryEntries); |
| 133 | result.setOtherCurrency(otherDictionaryEntries.getChineseName()); | 122 | result.setOtherCurrency(otherDictionaryEntries.getChineseName()); |
| 134 | } | 123 | } |
| 135 | - | ||
| 136 | //杂费/率 | 124 | //杂费/率 |
| 137 | result.setOtherCost(mawb.getOtherRate()); | 125 | result.setOtherCost(mawb.getOtherRate()); |
| 138 | //杂费标志 | 126 | //杂费标志 |
| ... | @@ -140,8 +128,6 @@ public class ChmConsignmentService { | ... | @@ -140,8 +128,6 @@ public class ChmConsignmentService { |
| 140 | result.setOwnerCode(mawb.getOwnerCode()); | 128 | result.setOwnerCode(mawb.getOwnerCode()); |
| 141 | //TODO 消费使用/生产销售单位名称 | 129 | //TODO 消费使用/生产销售单位名称 |
| 142 | result.setOwnerName(mawb.getOwnerName()); | 130 | result.setOwnerName(mawb.getOwnerName()); |
| 143 | - | ||
| 144 | - | ||
| 145 | //件数 | 131 | //件数 |
| 146 | result.setCounts(mawb.getPackNo().longValue()); | 132 | result.setCounts(mawb.getPackNo().longValue()); |
| 147 | //预录入编号 | 133 | //预录入编号 |
| ... | @@ -152,33 +138,28 @@ public class ChmConsignmentService { | ... | @@ -152,33 +138,28 @@ public class ChmConsignmentService { |
| 152 | result.setFromCountryDic(fromCountryDictionaryEntries); | 138 | result.setFromCountryDic(fromCountryDictionaryEntries); |
| 153 | result.setFromCountry(fromCountryDictionaryEntries.getChineseName()); | 139 | result.setFromCountry(fromCountryDictionaryEntries.getChineseName()); |
| 154 | } | 140 | } |
| 155 | - | ||
| 156 | //运单类型 | 141 | //运单类型 |
| 157 | DictionaryEntries consType = Constant.dictionaryEntriesCache.get(Constant.consType_D); | 142 | DictionaryEntries consType = Constant.dictionaryEntriesCache.get(Constant.consType_D); |
| 158 | if(consType != null){ | 143 | if(consType != null){ |
| 159 | result.setConsTypeId(consType); | 144 | result.setConsTypeId(consType); |
| 160 | result.setConsType(consType.getChineseName()); | 145 | result.setConsType(consType.getChineseName()); |
| 161 | } | 146 | } |
| 162 | - | ||
| 163 | //监管方式 | 147 | //监管方式 |
| 164 | - DictionaryEntries tradeModeDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.SUPERVISION_MODE+mawb.getTradeMode()); | 148 | + DictionaryEntries tradeModeDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.SUPERVISION_MODE+Integer.parseInt(mawb.getTradeMode())); |
| 165 | if(!Objects.equals(tradeModeDictionaryEntries,null)){ | 149 | if(!Objects.equals(tradeModeDictionaryEntries,null)){ |
| 166 | result.setTradeModeDic(tradeModeDictionaryEntries); | 150 | result.setTradeModeDic(tradeModeDictionaryEntries); |
| 167 | result.setTradeMode(tradeModeDictionaryEntries.getChineseName()); | 151 | result.setTradeMode(tradeModeDictionaryEntries.getChineseName()); |
| 168 | } | 152 | } |
| 169 | - | ||
| 170 | - | ||
| 171 | - | ||
| 172 | //境内收发货人编号 | 153 | //境内收发货人编号 |
| 173 | result.setTradeCoSCC(mawb.getTradeCode()); | 154 | result.setTradeCoSCC(mawb.getTradeCode()); |
| 155 | + //境内发货人(经营单位编码) | ||
| 156 | + result.setOperateUnitCode(mawb.getTradeCode()); | ||
| 174 | //运输方式代码 | 157 | //运输方式代码 |
| 175 | DictionaryEntries vehicleWayDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.VEHICLE_WAY_CODE+mawb.getTrafMode()); | 158 | DictionaryEntries vehicleWayDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.VEHICLE_WAY_CODE+mawb.getTrafMode()); |
| 176 | if(!Objects.equals(vehicleWayDictionaryEntries,null)){ | 159 | if(!Objects.equals(vehicleWayDictionaryEntries,null)){ |
| 177 | result.setVehicleWay(vehicleWayDictionaryEntries); | 160 | result.setVehicleWay(vehicleWayDictionaryEntries); |
| 178 | result.setVehicleWayCode(vehicleWayDictionaryEntries.getCode()); | 161 | result.setVehicleWayCode(vehicleWayDictionaryEntries.getCode()); |
| 179 | } | 162 | } |
| 180 | - | ||
| 181 | - | ||
| 182 | //境内收发货人名称 | 163 | //境内收发货人名称 |
| 183 | result.setOperateUnitName(mawb.getTradeName()); | 164 | result.setOperateUnitName(mawb.getTradeName()); |
| 184 | //成交方式 | 165 | //成交方式 |
| ... | @@ -187,69 +168,49 @@ public class ChmConsignmentService { | ... | @@ -187,69 +168,49 @@ public class ChmConsignmentService { |
| 187 | result.setDealModeDic(dealModeDictionaryEntries); | 168 | result.setDealModeDic(dealModeDictionaryEntries); |
| 188 | result.setDealMode(dealModeDictionaryEntries.getChineseName()); | 169 | result.setDealMode(dealModeDictionaryEntries.getChineseName()); |
| 189 | } | 170 | } |
| 190 | - | ||
| 191 | - | ||
| 192 | //包装种类 | 171 | //包装种类 |
| 193 | DictionaryEntries packageTypeDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.NEW_PACKAGE_TYPE+mawb.getWrapType()); | 172 | DictionaryEntries packageTypeDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.NEW_PACKAGE_TYPE+mawb.getWrapType()); |
| 194 | if(!Objects.equals(packageTypeDictionaryEntries,null)){ | 173 | if(!Objects.equals(packageTypeDictionaryEntries,null)){ |
| 195 | result.setPackageTypeDic(packageTypeDictionaryEntries); | 174 | result.setPackageTypeDic(packageTypeDictionaryEntries); |
| 196 | result.setPackageType(packageTypeDictionaryEntries.getChineseName()); | 175 | result.setPackageType(packageTypeDictionaryEntries.getChineseName()); |
| 197 | } | 176 | } |
| 198 | - | ||
| 199 | - | ||
| 200 | - | ||
| 201 | //TODO 生产核销单位统一信用代码---报关形式类型 | 177 | //TODO 生产核销单位统一信用代码---报关形式类型 |
| 202 | result.setTradeCoSCC(mawb.getTradeCodeScc()); | 178 | result.setTradeCoSCC(mawb.getTradeCodeScc()); |
| 203 | - | ||
| 204 | - | ||
| 205 | //TODO 消费使用/生产销售单位单位统一编码 | 179 | //TODO 消费使用/生产销售单位单位统一编码 |
| 206 | result.setOwnerCodeScc(mawb.getOwnerCodeScc()); | 180 | result.setOwnerCodeScc(mawb.getOwnerCodeScc()); |
| 207 | - | ||
| 208 | - | ||
| 209 | //贸易国别 | 181 | //贸易国别 |
| 210 | DictionaryEntries tradeAreaCodeDictionaryEntries=Constant.dictionaryEntriesCache.get(Constant.COUNTRY+mawb.getTradeAreaCode()); | 182 | DictionaryEntries tradeAreaCodeDictionaryEntries=Constant.dictionaryEntriesCache.get(Constant.COUNTRY+mawb.getTradeAreaCode()); |
| 211 | if(!Objects.equals(tradeAreaCodeDictionaryEntries,null)){ | 183 | if(!Objects.equals(tradeAreaCodeDictionaryEntries,null)){ |
| 212 | result.setTradeAreaCodeDic(tradeAreaCodeDictionaryEntries); | 184 | result.setTradeAreaCodeDic(tradeAreaCodeDictionaryEntries); |
| 213 | result.setTradeAreaCode(tradeAreaCodeDictionaryEntries.getChineseName()); | 185 | result.setTradeAreaCode(tradeAreaCodeDictionaryEntries.getChineseName()); |
| 214 | } | 186 | } |
| 215 | - | ||
| 216 | - | ||
| 217 | //标记及号码 | 187 | //标记及号码 |
| 218 | result.setDeclaredRemark(mawb.getMarkNo()); | 188 | result.setDeclaredRemark(mawb.getMarkNo()); |
| 219 | - | ||
| 220 | //入境口岸代码:固定值 310302 | 189 | //入境口岸代码:固定值 310302 |
| 221 | - | ||
| 222 | //存放地点:固定值 空值 | 190 | //存放地点:固定值 空值 |
| 223 | - | ||
| 224 | //申报人员姓名---报关员证号 | 191 | //申报人员姓名---报关员证号 |
| 225 | result.setDeclaredUnitName(mawb.getDeclareName()); | 192 | result.setDeclaredUnitName(mawb.getDeclareName()); |
| 226 | //境外发货人代码 | 193 | //境外发货人代码 |
| 227 | - | ||
| 228 | //境外收货人编码 | 194 | //境外收货人编码 |
| 229 | result.setOverseasConsignorCode(mawb.getOverseasConsigneeCode()); | 195 | result.setOverseasConsignorCode(mawb.getOverseasConsigneeCode()); |
| 230 | //境外收货人名称(外文) | 196 | //境外收货人名称(外文) |
| 231 | result.setOverseasConsignorFnCname(mawb.getOverseasConsigneeEname()); | 197 | result.setOverseasConsignorFnCname(mawb.getOverseasConsigneeEname()); |
| 232 | - | ||
| 233 | - | ||
| 234 | //运单状态: 待申报海关 | 198 | //运单状态: 待申报海关 |
| 235 | DictionaryEntries transferWaybillStatusDictionaryEntries=Constant.dictionaryEntriesCache.get(Constant.TRANSFER_WAY_BILL_STATUS+"5"); | 199 | DictionaryEntries transferWaybillStatusDictionaryEntries=Constant.dictionaryEntriesCache.get(Constant.TRANSFER_WAY_BILL_STATUS+"5"); |
| 236 | if(!Objects.equals(transferWaybillStatusDictionaryEntries,null)){ | 200 | if(!Objects.equals(transferWaybillStatusDictionaryEntries,null)){ |
| 237 | result.setConsStatusDic(transferWaybillStatusDictionaryEntries); | 201 | result.setConsStatusDic(transferWaybillStatusDictionaryEntries); |
| 238 | result.setConsStatus(transferWaybillStatusDictionaryEntries.getChineseName()); | 202 | result.setConsStatus(transferWaybillStatusDictionaryEntries.getChineseName()); |
| 239 | } | 203 | } |
| 240 | - | ||
| 241 | //添加TSN口岸 | 204 | //添加TSN口岸 |
| 242 | DictionaryEntries portTSN = Constant.dictionaryEntriesCache.get(Constant.PORT_TSN); | 205 | DictionaryEntries portTSN = Constant.dictionaryEntriesCache.get(Constant.PORT_TSN); |
| 243 | if (!Objects.equals(portTSN,null)){ | 206 | if (!Objects.equals(portTSN,null)){ |
| 244 | result.setPortId(portTSN); | 207 | result.setPortId(portTSN); |
| 245 | result.setPortName(portTSN.getChineseName()); | 208 | result.setPortName(portTSN.getChineseName()); |
| 246 | } | 209 | } |
| 247 | - | ||
| 248 | //西门子数据都为TSN口岸,可通过口岸查询查看 | 210 | //西门子数据都为TSN口岸,可通过口岸查询查看 |
| 249 | if (creator.equals("IDE")){ | 211 | if (creator.equals("IDE")){ |
| 250 | result.setDeclaredPort("TSN"); | 212 | result.setDeclaredPort("TSN"); |
| 251 | } | 213 | } |
| 252 | - | ||
| 253 | //推送时间作为创建时间,可以用来校验数据的有序性,如果新的推送时间小于已有的创建时间,就不更新数据 | 214 | //推送时间作为创建时间,可以用来校验数据的有序性,如果新的推送时间小于已有的创建时间,就不更新数据 |
| 254 | result.setCreateTime(new Date()); | 215 | result.setCreateTime(new Date()); |
| 255 | result.setUpdateTime(pushTime); | 216 | result.setUpdateTime(pushTime); |
| ... | @@ -263,6 +224,144 @@ public class ChmConsignmentService { | ... | @@ -263,6 +224,144 @@ public class ChmConsignmentService { |
| 263 | return result; | 224 | return result; |
| 264 | } | 225 | } |
| 265 | 226 | ||
| 227 | + /** | ||
| 228 | + * 运单转换主单 | ||
| 229 | + * @return | ||
| 230 | + */ | ||
| 231 | + public Mawb convertToChmConsignment(ChmConsignment consignment){ | ||
| 232 | + Mawb result = new Mawb(); | ||
| 233 | + try{ | ||
| 234 | + //将运单ID赋值,作为排查数据依据 | ||
| 235 | + result.setId(consignment.getId()); | ||
| 236 | + //进出口标志:固定值 E | ||
| 237 | + result.setIeFlag("E"); | ||
| 238 | + //申报类型:固定值 EX | ||
| 239 | + result.setType("EX"); | ||
| 240 | + //申报单位代码:固定值 1111980005 | ||
| 241 | + result.setAgentCode("1111980005"); | ||
| 242 | + //申报单位名称:固定值 联邦快递(中国)有限公司 | ||
| 243 | + result.setAgentName("联邦快递(中国)有限公司"); | ||
| 244 | + //运单号 | ||
| 245 | + result.setBillNo(consignment.getConsignmentCode()); | ||
| 246 | + //合同号 最大长度32 | ||
| 247 | + result.setContrNo(consignment.getContractCode()); | ||
| 248 | + //主管海关(申报地海关) 固定值 0101 | ||
| 249 | + result.setCustomMaster("0101"); | ||
| 250 | + //征免性质 数字三字码 | ||
| 251 | + if(!Objects.equals(consignment.getTaxNatureDic(),null)){ | ||
| 252 | + result.setCutMode(consignment.getTaxNatureDic().getExt2()); | ||
| 253 | + } | ||
| 254 | + //经停港/指运港 固定值:0 | ||
| 255 | + result.setDeclTrnRel("0"); | ||
| 256 | + //经停港/指运港 6位港口代码 ASM000、Mar-51、996102 | ||
| 257 | + if(!Objects.equals(consignment.getThroughStopPortDic(),null)){ | ||
| 258 | + result.setDistinatePort(consignment.getThroughStopPortDic().getPcCode()); | ||
| 259 | + } | ||
| 260 | + | ||
| 261 | + //TODO 报关标志【已确认】,IDE传递的是1,Export中是001,需要进行转换 数字三字码或英文二字码 | ||
| 262 | + if(!Objects.equals(consignment.getDeclaredDocTypeDic(),null)){ | ||
| 263 | + Integer ediid = Integer.parseInt(consignment.getDeclaredDocTypeDic().getExt2()); | ||
| 264 | + result.setEdiId(ediid.toString()); | ||
| 265 | + } | ||
| 266 | + //海关编号 | ||
| 267 | + result.setEntryId(consignment.getCustomsNo()); | ||
| 268 | + //运费币制 英文三字码 | ||
| 269 | + if(!Objects.equals(consignment.getTransCurrencyDic(),null)){ | ||
| 270 | + result.setFeeCurr(consignment.getTransCurrencyDic().getExt2()); | ||
| 271 | + } | ||
| 272 | + //TODO 运费标记:固定值 3 【iclear中, 和成交方式相关,只有成交方式 1、2 时,才能传 3 】 | ||
| 273 | + result.setFeeMark("3"); | ||
| 274 | + //运费总价 保留2位小数 | ||
| 275 | + result.setFeeRate(NumberUtils.bigDecimalFormat(consignment.getTransCost(),2)); | ||
| 276 | + | ||
| 277 | + //毛重 保留5位小数 | ||
| 278 | + result.setGrossWet(NumberUtils.bigDecimalFormat(consignment.getGrossWeight(),5)); | ||
| 279 | + //出入境关闭:固定值 0101 | ||
| 280 | + result.setIePort("0101"); | ||
| 281 | + //录入人名称:固定值 必填项,但填的值是空值 | ||
| 282 | + result.setInputerName(""); | ||
| 283 | + //保险费币制 | ||
| 284 | + if(!Objects.equals(consignment.getInsuranceCostCurrencyDic(),null)){ | ||
| 285 | + result.setInsurCurr(consignment.getInsuranceCostCurrencyDic().getExt2()); | ||
| 286 | + } | ||
| 287 | + //保险费标记 ,根据transMode决定 | ||
| 288 | + result.setInsurMark(""); | ||
| 289 | + //保险费/率 保留2位小数 | ||
| 290 | + result.setInsurRate(NumberUtils.bigDecimalFormat(consignment.getInsuranceCost(),2)); | ||
| 291 | + //备案号 | ||
| 292 | + result.setManualNo(consignment.getRecordCode()); | ||
| 293 | + //净重 保留5位小数 | ||
| 294 | + result.setNetWt(NumberUtils.bigDecimalFormat(consignment.getNetWeight(),5)); | ||
| 295 | + //杂费币制 数字三字码 | ||
| 296 | + if(!Objects.equals(consignment.getOtherCurrencyDic(),null)){ | ||
| 297 | + result.setOtherCurr(consignment.getOtherCurrencyDic().getExt6()); | ||
| 298 | + } | ||
| 299 | + //杂费/率 | ||
| 300 | + result.setOtherRate(NumberUtils.bigDecimalFormat(consignment.getOtherCost(),2)); | ||
| 301 | + //杂费标志 | ||
| 302 | + result.setOtherMark(""); | ||
| 303 | + //TODO 消费使用/生产销售单位代码 | ||
| 304 | + result.setOwnerCode(consignment.getOwnerCode()); | ||
| 305 | + //TODO 消费使用/生产销售单位名称 | ||
| 306 | + result.setOwnerName(consignment.getOwnerName()); | ||
| 307 | + //件数 | ||
| 308 | + result.setPackNo(consignment.getCounts().intValue()); | ||
| 309 | + //预录入编号 | ||
| 310 | + result.setPreEntryId(consignment.getEnteringNo()); | ||
| 311 | + //启运国/运抵国 英文三字码 | ||
| 312 | + if(!Objects.equals(consignment.getFromCountryDic(),null)){ | ||
| 313 | + result.setTradeCountry(consignment.getFromCountryDic().getExt3()); | ||
| 314 | + } | ||
| 315 | + //监管方式 数字四字码 | ||
| 316 | + if(!Objects.equals(consignment.getTradeModeDic(),null)){ | ||
| 317 | + result.setTradeMode(consignment.getTradeModeDic().getExt2()); | ||
| 318 | + } | ||
| 319 | + //境内收发货人编号 | ||
| 320 | + result.setTradeCode(consignment.getTradeCoSCC()); | ||
| 321 | + //运输方式代码 一字码,数字或大写英文字母 | ||
| 322 | + if(!Objects.equals(consignment.getVehicleWay(),null)){ | ||
| 323 | + result.setTrafMode(consignment.getVehicleWay().getExt2()); | ||
| 324 | + } | ||
| 325 | + //境内收发货人名称 | ||
| 326 | + result.setTradeName(consignment.getOperateUnitName()); | ||
| 327 | + //成交方式 数字一字码,从1~4,共4个 | ||
| 328 | + if(!Objects.equals(consignment.getDealModeDic(),null)){ | ||
| 329 | + result.setTransMode(consignment.getDealModeDic().getExt6()); | ||
| 330 | + } | ||
| 331 | + //包装种类 取值范围(0,1,4,6,22,29,32,33,39,92,93,99) | ||
| 332 | + if(!Objects.equals(consignment.getPackageTypeDic(),null)){ | ||
| 333 | + result.setWrapType(consignment.getPackageTypeDic().getExt2()); | ||
| 334 | + } | ||
| 335 | + //TODO 生产核销单位统一信用代码---报关形式类型 | ||
| 336 | + result.setTradeCodeScc(consignment.getTradeCoSCC()); | ||
| 337 | + //TODO 消费使用/生产销售单位单位统一编码 | ||
| 338 | + result.setOwnerCodeScc(consignment.getOwnerCodeScc()); | ||
| 339 | + //贸易国别 英文三字码 | ||
| 340 | + if(!Objects.equals(consignment.getTradeAreaCodeDic(),null)){ | ||
| 341 | + result.setTradeAreaCode(consignment.getTradeAreaCodeDic().getExt3()); | ||
| 342 | + } | ||
| 343 | + //标记及号码 | ||
| 344 | + result.setMarkNo(consignment.getDeclaredRemark()); | ||
| 345 | + //入境口岸代码:固定值 310302 | ||
| 346 | + result.setEntyPortCode("310302"); | ||
| 347 | + //存放地点:固定值 空值 | ||
| 348 | + result.setGoodsPlace(""); | ||
| 349 | + //申报人员姓名---报关员证号 | ||
| 350 | + result.setDeclareName(consignment.getDeclaredUnitName()); | ||
| 351 | + //境外发货人代码 | ||
| 352 | + result.setOverseasConsignorCode(""); | ||
| 353 | + //境外收货人编码 | ||
| 354 | + result.setOverseasConsigneeCode(consignment.getOverseasConsignorCode()); | ||
| 355 | + //境外收货人名称(外文) | ||
| 356 | + result.setOverseasConsigneeEname(consignment.getOverseasConsignorFnCname()); | ||
| 357 | + }catch (Exception e){ | ||
| 358 | + result=null; | ||
| 359 | + e.printStackTrace(); | ||
| 360 | + log.error("convertToChmConsignment() error:"+e.getMessage()); | ||
| 361 | + } | ||
| 362 | + return result; | ||
| 363 | + } | ||
| 364 | + | ||
| 266 | 365 | ||
| 267 | /** | 366 | /** |
| 268 | * 保存主单 | 367 | * 保存主单 |
| ... | @@ -278,7 +377,6 @@ public class ChmConsignmentService { | ... | @@ -278,7 +377,6 @@ public class ChmConsignmentService { |
| 278 | return null; | 377 | return null; |
| 279 | } | 378 | } |
| 280 | 379 | ||
| 281 | - | ||
| 282 | /** | 380 | /** |
| 283 | * 保存主单 | 381 | * 保存主单 |
| 284 | * @param chmConsignment | 382 | * @param chmConsignment |
| ... | @@ -293,14 +391,6 @@ public class ChmConsignmentService { | ... | @@ -293,14 +391,6 @@ public class ChmConsignmentService { |
| 293 | return null; | 391 | return null; |
| 294 | } | 392 | } |
| 295 | 393 | ||
| 296 | - | ||
| 297 | - | ||
| 298 | - | ||
| 299 | - | ||
| 300 | - | ||
| 301 | - | ||
| 302 | - | ||
| 303 | - | ||
| 304 | /** | 394 | /** |
| 305 | * 根据运单号查找数据 | 395 | * 根据运单号查找数据 |
| 306 | * @param consignmentCode | 396 | * @param consignmentCode |
| ... | @@ -315,7 +405,6 @@ public class ChmConsignmentService { | ... | @@ -315,7 +405,6 @@ public class ChmConsignmentService { |
| 315 | return null; | 405 | return null; |
| 316 | } | 406 | } |
| 317 | 407 | ||
| 318 | - | ||
| 319 | /** | 408 | /** |
| 320 | * 保存或更新 iclear中的运单信息 | 409 | * 保存或更新 iclear中的运单信息 |
| 321 | * @param mawb | 410 | * @param mawb |
| ... | @@ -339,11 +428,9 @@ public class ChmConsignmentService { | ... | @@ -339,11 +428,9 @@ public class ChmConsignmentService { |
| 339 | }); | 428 | }); |
| 340 | chmConsignment.setChmConsignmentDetailList(chmConsignmentDetailList); | 429 | chmConsignment.setChmConsignmentDetailList(chmConsignmentDetailList); |
| 341 | 430 | ||
| 342 | - | ||
| 343 | //2、校验 7天+运单 ,如果有数据并且 还未报关就更新,如果数据就插入 | 431 | //2、校验 7天+运单 ,如果有数据并且 还未报关就更新,如果数据就插入 |
| 344 | ChmConsignment chmConsignmentDB=this.findChmConsignmentByConsignmentCode(chmConsignment.getConsignmentCode(), DateUtils.addDate(DateUtils.getCurrentDate(),-7)); | 432 | ChmConsignment chmConsignmentDB=this.findChmConsignmentByConsignmentCode(chmConsignment.getConsignmentCode(), DateUtils.addDate(DateUtils.getCurrentDate(),-7)); |
| 345 | 433 | ||
| 346 | - | ||
| 347 | //3、新增或更新 | 434 | //3、新增或更新 |
| 348 | //新增:如果没有就插入 | 435 | //新增:如果没有就插入 |
| 349 | if (Objects.equals(chmConsignmentDB,null)){ | 436 | if (Objects.equals(chmConsignmentDB,null)){ |
| ... | @@ -369,8 +456,6 @@ public class ChmConsignmentService { | ... | @@ -369,8 +456,6 @@ public class ChmConsignmentService { |
| 369 | //更新数据 | 456 | //更新数据 |
| 370 | log.info("更新主单"+ mawb.getBillNo()); | 457 | log.info("更新主单"+ mawb.getBillNo()); |
| 371 | 458 | ||
| 372 | - | ||
| 373 | - //由于订单明细中,无法确定唯一一条数据,所以无法做到update,只能先删除在插入 | ||
| 374 | for(ChmConsignmentDetail newDetail:chmConsignment.getChmConsignmentDetailList()){ | 459 | for(ChmConsignmentDetail newDetail:chmConsignment.getChmConsignmentDetailList()){ |
| 375 | for(ChmConsignmentDetail oldDetail: chmConsignmentDB.getChmConsignmentDetailList()){ | 460 | for(ChmConsignmentDetail oldDetail: chmConsignmentDB.getChmConsignmentDetailList()){ |
| 376 | if(Objects.equals(newDetail.getDetailId(),oldDetail.getDetailId())){ | 461 | if(Objects.equals(newDetail.getDetailId(),oldDetail.getDetailId())){ |
| ... | @@ -396,26 +481,7 @@ public class ChmConsignmentService { | ... | @@ -396,26 +481,7 @@ public class ChmConsignmentService { |
| 396 | }catch (Exception e){ | 481 | }catch (Exception e){ |
| 397 | log.error(""+e.getMessage()); | 482 | log.error(""+e.getMessage()); |
| 398 | } | 483 | } |
| 399 | - | ||
| 400 | result.setSuccess(Boolean.TRUE); | 484 | result.setSuccess(Boolean.TRUE); |
| 401 | return result; | 485 | return result; |
| 402 | } | 486 | } |
| 403 | - | ||
| 404 | - | ||
| 405 | - | ||
| 406 | - | ||
| 407 | - | ||
| 408 | - | ||
| 409 | - | ||
| 410 | - | ||
| 411 | - | ||
| 412 | - | ||
| 413 | - | ||
| 414 | - | ||
| 415 | - | ||
| 416 | - | ||
| 417 | - | ||
| 418 | - | ||
| 419 | - | ||
| 420 | - | ||
| 421 | } | 487 | } | ... | ... |
| 1 | package com.erry.iclear.dateInterface.service; | 1 | package com.erry.iclear.dateInterface.service; |
| 2 | 2 | ||
| 3 | +import com.arronlong.httpclientutil.HttpClientUtil; | ||
| 4 | +import com.arronlong.httpclientutil.common.HttpConfig; | ||
| 5 | +import com.arronlong.httpclientutil.common.HttpHeader; | ||
| 3 | import com.erry.iclear.dateInterface.api.request.Mawb; | 6 | import com.erry.iclear.dateInterface.api.request.Mawb; |
| 7 | +import com.erry.iclear.dateInterface.api.response.IClearCheckResponseResult; | ||
| 4 | import com.erry.iclear.dateInterface.api.response.ResultRS; | 8 | import com.erry.iclear.dateInterface.api.response.ResultRS; |
| 9 | +import com.erry.iclear.dateInterface.api.response.TokenResult; | ||
| 10 | +import com.erry.iclear.dateInterface.entity.ChmConsignment; | ||
| 11 | +import com.erry.iclear.dateInterface.entity.ChmConsignmentDetail; | ||
| 5 | import com.erry.iclear.dateInterface.repository.MawbRepository; | 12 | import com.erry.iclear.dateInterface.repository.MawbRepository; |
| 13 | +import com.erry.iclear.dateInterface.util.JsonToJava; | ||
| 6 | import com.google.gson.Gson; | 14 | import com.google.gson.Gson; |
| 7 | import lombok.extern.slf4j.Slf4j; | 15 | import lombok.extern.slf4j.Slf4j; |
| 16 | +import org.apache.http.Header; | ||
| 8 | import org.springframework.beans.factory.annotation.Autowired; | 17 | import org.springframework.beans.factory.annotation.Autowired; |
| 18 | +import org.springframework.beans.factory.annotation.Value; | ||
| 9 | import org.springframework.scheduling.annotation.Scheduled; | 19 | import org.springframework.scheduling.annotation.Scheduled; |
| 10 | import org.springframework.stereotype.Service; | 20 | import org.springframework.stereotype.Service; |
| 11 | 21 | ||
| 22 | +import java.util.ArrayList; | ||
| 23 | +import java.util.List; | ||
| 24 | +import java.util.Objects; | ||
| 25 | + | ||
| 12 | /** | 26 | /** |
| 13 | * @author Administrator | 27 | * @author Administrator |
| 14 | */ | 28 | */ |
| ... | @@ -18,9 +32,18 @@ public class MawbService { | ... | @@ -18,9 +32,18 @@ public class MawbService { |
| 18 | 32 | ||
| 19 | private Gson gson = new Gson(); | 33 | private Gson gson = new Gson(); |
| 20 | 34 | ||
| 35 | + @Value("${api.address.iclear-check-url}") | ||
| 36 | + String iclearCheckUrl; | ||
| 37 | + | ||
| 21 | @Autowired | 38 | @Autowired |
| 22 | private MawbRepository mawbRepository; | 39 | private MawbRepository mawbRepository; |
| 23 | 40 | ||
| 41 | + @Autowired | ||
| 42 | + private ChmConsignmentService consignmentService; | ||
| 43 | + | ||
| 44 | + @Autowired | ||
| 45 | + private ChmConsignmentDetailService consignmentDetailService; | ||
| 46 | + | ||
| 24 | /** | 47 | /** |
| 25 | * 保存主单Request | 48 | * 保存主单Request |
| 26 | * @param mawb | 49 | * @param mawb |
| ... | @@ -48,15 +71,39 @@ public class MawbService { | ... | @@ -48,15 +71,39 @@ public class MawbService { |
| 48 | try{ | 71 | try{ |
| 49 | log.info("checkMawb start>>>>>>>>>> mawb:"+gson.toJson(mawb)); | 72 | log.info("checkMawb start>>>>>>>>>> mawb:"+gson.toJson(mawb)); |
| 50 | 73 | ||
| 74 | + //1、将请求转换为运单 | ||
| 75 | + ChmConsignment chmConsignment=consignmentService.convertToChmConsignment(mawb,null,"IDE-ICLEAR-API"); | ||
| 76 | + if(Objects.equals(chmConsignment,null)){ | ||
| 77 | + result.setCode("30001"); | ||
| 78 | + result.setMsg("数据格式不正确"); | ||
| 79 | + return result; | ||
| 80 | + } | ||
| 81 | + List<ChmConsignmentDetail> chmConsignmentDetailList = new ArrayList<>(); | ||
| 82 | + mawb.getMawbDetailList().forEach(detail ->{ | ||
| 83 | + chmConsignmentDetailList.add(consignmentDetailService.convertToChmConsignmentDetail(detail,chmConsignment)); | ||
| 84 | + }); | ||
| 85 | + chmConsignment.setChmConsignmentDetailList(chmConsignmentDetailList); | ||
| 51 | 86 | ||
| 52 | - | 87 | + //调用IClear接口进行运单数据校验 |
| 53 | - | 88 | + String objJson = JsonToJava.toJson(chmConsignment); |
| 54 | - result.setSuccess(Boolean.TRUE); | 89 | + Header[] headers = HttpHeader.custom() |
| 55 | - log.info("checkMawb start>>>>>>>>>> mawb:"+gson.toJson(mawb) +" result :" +result.getSuccess() ); | 90 | + .other("Content-Type", "application/json") |
| 91 | + .build(); | ||
| 92 | + log.info("******************* : " + this.iclearCheckUrl); | ||
| 93 | + //推送海关回执数据 | ||
| 94 | + HttpConfig config = HttpConfig.custom() | ||
| 95 | + .headers(headers) | ||
| 96 | + .url(this.iclearCheckUrl) | ||
| 97 | + .encoding("utf-8") | ||
| 98 | + .json(objJson); | ||
| 99 | + String json = HttpClientUtil.post(config); | ||
| 100 | + IClearCheckResponseResult iclearCheckResponseResult = JsonToJava.parseJson(json, IClearCheckResponseResult.class); | ||
| 101 | + result.setSuccess(iclearCheckResponseResult.getSuccess()); | ||
| 102 | + result.setMsg(iclearCheckResponseResult.getMessage()); | ||
| 103 | + log.info("<<<<<<<< checkMawb start >>>>>>>>>> mawb:"+gson.toJson(mawb) +" result :" +result.getSuccess() +" iclear check response : " + json + " status : " + result.getSuccess()); | ||
| 56 | }catch (Exception e){ | 104 | }catch (Exception e){ |
| 57 | log.error("checkMawb() error:" + e.getMessage()); | 105 | log.error("checkMawb() error:" + e.getMessage()); |
| 58 | } | 106 | } |
| 59 | return result; | 107 | return result; |
| 60 | } | 108 | } |
| 61 | - | ||
| 62 | } | 109 | } | ... | ... |
| 1 | +package com.erry.iclear.dateInterface.util; | ||
| 2 | + | ||
| 3 | +import java.math.BigDecimal; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * 数值处理类 | ||
| 7 | + * mt | ||
| 8 | + * 2021年8月5日16:31:02 | ||
| 9 | + */ | ||
| 10 | +public class NumberUtils { | ||
| 11 | + /** | ||
| 12 | + * 保留两位小数(四舍五入),0.00之后有数字全部保留位0.01 | ||
| 13 | + * @param bdForMat | ||
| 14 | + * @return | ||
| 15 | + */ | ||
| 16 | + public static BigDecimal bigDecimalFormat(BigDecimal bdForMat,int num){ | ||
| 17 | + if(bdForMat != null){ | ||
| 18 | + bdForMat = bdForMat.setScale(num, BigDecimal.ROUND_HALF_UP); | ||
| 19 | + if(bdForMat.compareTo(BigDecimal.ZERO) == 0){ | ||
| 20 | + bdForMat = new BigDecimal(0.01).setScale(num,BigDecimal.ROUND_HALF_UP); | ||
| 21 | + } | ||
| 22 | + return bdForMat; | ||
| 23 | + } | ||
| 24 | + return null; | ||
| 25 | + } | ||
| 26 | + | ||
| 27 | + /** | ||
| 28 | + * 将Bigdecimal转换成Integer | ||
| 29 | + * @param bigDecimal | ||
| 30 | + * @return | ||
| 31 | + */ | ||
| 32 | + public static Integer bigDecimalToIntger(BigDecimal bigDecimal){ | ||
| 33 | + Integer integer = new Integer(0); | ||
| 34 | + if(bigDecimal != null){ | ||
| 35 | + integer = bigDecimal.intValue(); | ||
| 36 | + } | ||
| 37 | + return integer; | ||
| 38 | + } | ||
| 39 | +} |
| 1 | +package com.erry.iclear.dateInterface.util; | ||
| 2 | + | ||
| 3 | +import org.apache.commons.lang3.RandomStringUtils; | ||
| 4 | +import org.apache.commons.lang3.StringUtils; | ||
| 5 | + | ||
| 6 | +import javax.servlet.http.HttpServletRequest; | ||
| 7 | +import java.io.ByteArrayOutputStream; | ||
| 8 | +import java.io.IOException; | ||
| 9 | +import java.io.PrintStream; | ||
| 10 | +import java.io.UnsupportedEncodingException; | ||
| 11 | +import java.math.BigDecimal; | ||
| 12 | +import java.util.ArrayList; | ||
| 13 | +import java.util.List; | ||
| 14 | +import java.util.regex.Matcher; | ||
| 15 | +import java.util.regex.Pattern; | ||
| 16 | + | ||
| 17 | + | ||
| 18 | +public class StringUtil { | ||
| 19 | + | ||
| 20 | + /** | ||
| 21 | + * 正则表达式:验证邮箱 | ||
| 22 | + */ | ||
| 23 | + private static final String REGEX_EMAIL = "^([a-z0-9A-Z_]+[-|\\.]?)+[a-z0-9A-Z_]@([a-z0-9A-Z_]+(-[a-z0-9A-Z_]+)?\\.)+[a-zA-Z_]{2,}$"; | ||
| 24 | + | ||
| 25 | + /** | ||
| 26 | + * 正则表达式:验证数字 | ||
| 27 | + */ | ||
| 28 | + private static final String REGEX_NUBMER = "\\d+\\.\\d+$|-\\d+\\.\\d+$"; | ||
| 29 | + | ||
| 30 | + /** | ||
| 31 | + * 判断字符串是否为空 | ||
| 32 | + * | ||
| 33 | + * @param src | ||
| 34 | + * @return | ||
| 35 | + */ | ||
| 36 | + public static boolean isEmpty(String src) { | ||
| 37 | + return src == null || "".equals(src.trim()); | ||
| 38 | + } | ||
| 39 | + | ||
| 40 | + /** | ||
| 41 | + * 判断字符串不为空 | ||
| 42 | + * | ||
| 43 | + * @param src | ||
| 44 | + * @return | ||
| 45 | + */ | ||
| 46 | + public static boolean isNotEmpty(String src) { | ||
| 47 | + return !isEmpty(src); | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + public static String toStringExcludeNull(Object obj) { | ||
| 51 | + return obj == null ? "" : obj.toString(); | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + /** | ||
| 55 | + * 判断字符串是否为空 | ||
| 56 | + * | ||
| 57 | + * @param src | ||
| 58 | + * @return | ||
| 59 | + */ | ||
| 60 | + public static boolean isEmptyWithTrim(String src) { | ||
| 61 | + return src == null || "".equals(src.trim()); | ||
| 62 | + } | ||
| 63 | + | ||
| 64 | + | ||
| 65 | + /** | ||
| 66 | + * 将字符串前补0到指定长度 | ||
| 67 | + * | ||
| 68 | + * @param value | ||
| 69 | + * @param length | ||
| 70 | + * @return | ||
| 71 | + */ | ||
| 72 | + public static String fillZero(String value, int length) { | ||
| 73 | + if (value == null) { | ||
| 74 | + return null; | ||
| 75 | + } else { | ||
| 76 | + while (value.length() < length) { | ||
| 77 | + value = "0" + value; | ||
| 78 | + } | ||
| 79 | + } | ||
| 80 | + return value; | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + /** | ||
| 84 | + * 截取指定长度的字符串 | ||
| 85 | + * | ||
| 86 | + * @param str | ||
| 87 | + * @param length | ||
| 88 | + * @return | ||
| 89 | + */ | ||
| 90 | + public static String truncate(String str, int length) { | ||
| 91 | + if (!isEmpty(str) && str.length() > length) { | ||
| 92 | + return str.substring(0, length); | ||
| 93 | + } | ||
| 94 | + return str; | ||
| 95 | + } | ||
| 96 | + | ||
| 97 | + /** | ||
| 98 | + * 将首字母大写 | ||
| 99 | + * | ||
| 100 | + * @param str | ||
| 101 | + * @return | ||
| 102 | + */ | ||
| 103 | + public static String upcaseFirstLetter(String str) { | ||
| 104 | + if (str == null) { | ||
| 105 | + return null; | ||
| 106 | + } | ||
| 107 | + String firstChar = str.substring(0, 1); | ||
| 108 | + return firstChar.toUpperCase() + str.substring(1, str.length()); | ||
| 109 | + } | ||
| 110 | + | ||
| 111 | + /** | ||
| 112 | + * 按指定长度format数字long | ||
| 113 | + * | ||
| 114 | + * @param num | ||
| 115 | + * @param length | ||
| 116 | + * @return | ||
| 117 | + */ | ||
| 118 | + public static String formatLong(long num, int length) { | ||
| 119 | + String number = Long.toString(num); | ||
| 120 | + while (number.length() < length) { | ||
| 121 | + number = "0" + number; | ||
| 122 | + } | ||
| 123 | + return number; | ||
| 124 | + } | ||
| 125 | + | ||
| 126 | + /** | ||
| 127 | + * 判断字符串是否为半角英文或数字 | ||
| 128 | + * | ||
| 129 | + * @param str | ||
| 130 | + * @return | ||
| 131 | + */ | ||
| 132 | + public static boolean isAllHalfWidth(String str) { | ||
| 133 | + char[] chars = str.toCharArray(); | ||
| 134 | + for (int i = 0; i < chars.length; i++) { | ||
| 135 | + int ascii = chars[i]; | ||
| 136 | + if ((ascii >= 48 && ascii <= 57) //0-9 | ||
| 137 | + || (ascii >= 65 && ascii <= 90) //A-Z | ||
| 138 | + || (ascii >= 97 && ascii <= 122)) { //a-z | ||
| 139 | + } else { | ||
| 140 | + return false; | ||
| 141 | + } | ||
| 142 | + } | ||
| 143 | + return true; | ||
| 144 | + } | ||
| 145 | + | ||
| 146 | + /** | ||
| 147 | + * 判断字符串是否整数 | ||
| 148 | + * | ||
| 149 | + * @param str | ||
| 150 | + * @return | ||
| 151 | + */ | ||
| 152 | + public static boolean isNum(String str) { | ||
| 153 | + if (StringUtil.isEmptyWithTrim(str)) { | ||
| 154 | + return false; | ||
| 155 | + } | ||
| 156 | + char[] chars = str.toCharArray(); | ||
| 157 | + for (int i = 0; i < chars.length; i++) { | ||
| 158 | + int ascii = chars[i]; | ||
| 159 | + if ((ascii >= 48 && ascii <= 57)) //0-9) | ||
| 160 | + { | ||
| 161 | + } else { | ||
| 162 | + return false; | ||
| 163 | + } | ||
| 164 | + } | ||
| 165 | + return true; | ||
| 166 | + } | ||
| 167 | + | ||
| 168 | + /** | ||
| 169 | + * 判断字符串是否小数 | ||
| 170 | + * | ||
| 171 | + * @param str | ||
| 172 | + * @return | ||
| 173 | + */ | ||
| 174 | + public static boolean isNumeric(String str) { | ||
| 175 | + Pattern pattern = Pattern.compile(REGEX_NUBMER); | ||
| 176 | + Matcher isNum = pattern.matcher(str); | ||
| 177 | + if (!isNum.matches()) { | ||
| 178 | + return false; | ||
| 179 | + } | ||
| 180 | + return true; | ||
| 181 | + } | ||
| 182 | + | ||
| 183 | + public static String toString(String str) { | ||
| 184 | + return str == null ? "" : str; | ||
| 185 | + } | ||
| 186 | + | ||
| 187 | + public static String toString(Object obj) { | ||
| 188 | + return obj == null ? "" : obj.toString(); | ||
| 189 | + } | ||
| 190 | + | ||
| 191 | + /** | ||
| 192 | + * 将字符串数组按指定分隔符转为字符串 | ||
| 193 | + * | ||
| 194 | + * @param arr | ||
| 195 | + * @param seperator | ||
| 196 | + * @return | ||
| 197 | + */ | ||
| 198 | + public static String convertArrayToString(String[] arr, String seperator) { | ||
| 199 | + StringBuffer sb = new StringBuffer(); | ||
| 200 | + for (int i = 0; i < arr.length; i++) { | ||
| 201 | + sb.append(seperator + arr[i]); | ||
| 202 | + } | ||
| 203 | + if (sb.length() > 0) { | ||
| 204 | + sb.deleteCharAt(0); | ||
| 205 | + } | ||
| 206 | + return sb.toString(); | ||
| 207 | + } | ||
| 208 | + | ||
| 209 | + /** | ||
| 210 | + * Return the string of exception | ||
| 211 | + * | ||
| 212 | + * @param t | ||
| 213 | + * @return | ||
| 214 | + * @throws IOException | ||
| 215 | + */ | ||
| 216 | + public static String exceptionToString(Throwable t) throws IOException { | ||
| 217 | + if (t == null) { | ||
| 218 | + return null; | ||
| 219 | + } | ||
| 220 | + ByteArrayOutputStream baos = new ByteArrayOutputStream(); | ||
| 221 | + try { | ||
| 222 | + t.printStackTrace(new PrintStream(baos)); | ||
| 223 | + } finally { | ||
| 224 | + baos.close(); | ||
| 225 | + } | ||
| 226 | + | ||
| 227 | + String sb = baos.toString(); | ||
| 228 | + if (sb.length() > 5000) { | ||
| 229 | + return sb.substring(0, 5000); | ||
| 230 | + } | ||
| 231 | + return sb; | ||
| 232 | + } | ||
| 233 | + | ||
| 234 | + /** | ||
| 235 | + * 将字符串按指定的分隔符分隔成数组 | ||
| 236 | + * | ||
| 237 | + * @param str | ||
| 238 | + * @param separator | ||
| 239 | + * @return | ||
| 240 | + */ | ||
| 241 | + public static String[] split(String str, String separator) { | ||
| 242 | + return StringUtils.split(str, separator); | ||
| 243 | + } | ||
| 244 | + | ||
| 245 | + /** | ||
| 246 | + * 获取字符串被特定字符分割后的最后一个元素 | ||
| 247 | + */ | ||
| 248 | + public static String getLastSperator(String str, String sperator) { | ||
| 249 | + String[] ss = split(str, sperator); | ||
| 250 | + return ss[ss.length - 1]; | ||
| 251 | + } | ||
| 252 | + | ||
| 253 | + /** | ||
| 254 | + * 判断传入的字符串是否可以被解析为数字 | ||
| 255 | + */ | ||
| 256 | + public static boolean isNumberString(String s) { | ||
| 257 | + try { | ||
| 258 | + if (isEmptyWithTrim(s) || s == null || "null".equals(s)) { | ||
| 259 | + return true; | ||
| 260 | + } | ||
| 261 | + Double.valueOf(s); | ||
| 262 | + return true; | ||
| 263 | + } catch (NumberFormatException e) { | ||
| 264 | + return false; | ||
| 265 | + } | ||
| 266 | + } | ||
| 267 | + | ||
| 268 | + public static String cutLastSperator(String s, String sperator) { | ||
| 269 | + return s.substring(0, s.length() - getLastSperator(s, sperator).length() - sperator.length()); | ||
| 270 | + } | ||
| 271 | + | ||
| 272 | + /** | ||
| 273 | + * 截取字符串中以除某个字符串结尾的所有字符 | ||
| 274 | + */ | ||
| 275 | + public static String cutSperatorLast(String s, String sperator) { | ||
| 276 | + if (s == null || s.length() == 0) { | ||
| 277 | + return s; | ||
| 278 | + } | ||
| 279 | + if (s.substring(s.length() - sperator.length()).equals(sperator)) { | ||
| 280 | + return cutSperatorLast(s.substring(0, s.length() - 1), sperator); | ||
| 281 | + } | ||
| 282 | + return s; | ||
| 283 | + } | ||
| 284 | + | ||
| 285 | + public static String toUtf8String(String s) { | ||
| 286 | + StringBuffer sb = new StringBuffer(); | ||
| 287 | + for (int i = 0; i < s.length(); i++) { | ||
| 288 | + char c = s.charAt(i); | ||
| 289 | + if (c >= 0 && c <= 255) { | ||
| 290 | + sb.append(c); | ||
| 291 | + } else { | ||
| 292 | + byte[] b; | ||
| 293 | + try { | ||
| 294 | + b = Character.toString(c).getBytes("utf-8"); | ||
| 295 | + } catch (Exception ex) { | ||
| 296 | + ex.printStackTrace(); | ||
| 297 | + b = new byte[0]; | ||
| 298 | + } | ||
| 299 | + for (int j = 0; j < b.length; j++) { | ||
| 300 | + int k = b[j]; | ||
| 301 | + if (k < 0) { | ||
| 302 | + k += 256; | ||
| 303 | + } | ||
| 304 | + sb.append("%" + Integer.toHexString(k).toUpperCase()); | ||
| 305 | + } | ||
| 306 | + } | ||
| 307 | + } | ||
| 308 | + return sb.toString(); | ||
| 309 | + } | ||
| 310 | + | ||
| 311 | + /** | ||
| 312 | + * 根据不同浏览器将文件名中的汉字转为UTF8编码的串,以便下载时能正确显示另存的文件名. | ||
| 313 | + * | ||
| 314 | + * @param s 原文件名 | ||
| 315 | + * @return 重新编码后的文件名 | ||
| 316 | + */ | ||
| 317 | + public static String toUtf8String(HttpServletRequest request, String s) { | ||
| 318 | + String agent = request.getHeader("User-Agent"); | ||
| 319 | + try { | ||
| 320 | + boolean isFireFox = (agent != null && agent.toLowerCase().indexOf("firefox") != -1); | ||
| 321 | + if (isFireFox) { | ||
| 322 | +// s = new String(s.getBytes("UTF-8"), "ISO8859-1"); | ||
| 323 | + } else { | ||
| 324 | + s = StringUtil.toUtf8String(s); | ||
| 325 | + if ((agent != null && agent.indexOf("MSIE") != -1)) { | ||
| 326 | + if (s.length() > 150) { | ||
| 327 | + // 根据request的locale 得出可能的编码 | ||
| 328 | + s = new String(s.getBytes("UTF-8"), "ISO8859-1"); | ||
| 329 | + } | ||
| 330 | + } | ||
| 331 | + } | ||
| 332 | + } catch (UnsupportedEncodingException e) { | ||
| 333 | + e.printStackTrace(); | ||
| 334 | + } | ||
| 335 | + return s; | ||
| 336 | + } | ||
| 337 | + | ||
| 338 | + /** | ||
| 339 | + * 把Json字符串中属性值为空字符串的值替换成null | ||
| 340 | + * 例如:"bespeakTakeTime": "", 替换成 "bespeakTakeTime": null, | ||
| 341 | + * | ||
| 342 | + * @param sourceString | ||
| 343 | + * @param properties | ||
| 344 | + * @return | ||
| 345 | + */ | ||
| 346 | + public static String replaceByProperties(String sourceString, String properties) { | ||
| 347 | + String targetString = ""; | ||
| 348 | + String[] stringArray = properties.split(","); | ||
| 349 | + for (int i = 0; i < stringArray.length; i++) { | ||
| 350 | + String s = stringArray[i]; | ||
| 351 | + String sourceSubStr = "\"" + s + "\":\"\","; | ||
| 352 | + String targetSubStr = "\"" + s + "\": null,"; | ||
| 353 | + targetString = sourceString.replace(sourceSubStr, targetSubStr); | ||
| 354 | + } | ||
| 355 | + return targetString; | ||
| 356 | + } | ||
| 357 | + | ||
| 358 | + /** | ||
| 359 | + * 把String List转成逗号分隔的String | ||
| 360 | + * | ||
| 361 | + * @param stringList | ||
| 362 | + * @return | ||
| 363 | + */ | ||
| 364 | + public static String listToString(List<String> stringList) { | ||
| 365 | + if (stringList == null) { | ||
| 366 | + return null; | ||
| 367 | + } | ||
| 368 | + StringBuilder result = new StringBuilder(); | ||
| 369 | + boolean flag = false; | ||
| 370 | + for (String string : stringList) { | ||
| 371 | + if (flag) { | ||
| 372 | + result.append(","); | ||
| 373 | + } else { | ||
| 374 | + flag = true; | ||
| 375 | + } | ||
| 376 | + result.append(string); | ||
| 377 | + } | ||
| 378 | + return result.toString(); | ||
| 379 | + } | ||
| 380 | + | ||
| 381 | + /** | ||
| 382 | + * 校验邮箱 | ||
| 383 | + * | ||
| 384 | + * @param email | ||
| 385 | + * @return 校验通过返回true,否则返回false | ||
| 386 | + */ | ||
| 387 | + public static boolean isEmail(String email) { | ||
| 388 | + return Pattern.matches(REGEX_EMAIL, email); | ||
| 389 | + } | ||
| 390 | + | ||
| 391 | + /** | ||
| 392 | + * 校验邮箱 | ||
| 393 | + * | ||
| 394 | + * @param emailMulti | ||
| 395 | + * @return 逗号分隔的多个邮件地址都校验通过返回true,否则返回false | ||
| 396 | + */ | ||
| 397 | + public static boolean isEmailMulti(String emailMulti) { | ||
| 398 | + String[] emailAttr = emailMulti.split(","); | ||
| 399 | + boolean isEmail = true; | ||
| 400 | + for (String email : emailAttr) { | ||
| 401 | + if (!isEmail(email)) { | ||
| 402 | + isEmail = false; | ||
| 403 | + } | ||
| 404 | + } | ||
| 405 | + return isEmail; | ||
| 406 | + } | ||
| 407 | + | ||
| 408 | + /** | ||
| 409 | + * List<Long> 转String 用于sql | ||
| 410 | + * | ||
| 411 | + * @param lists | ||
| 412 | + * @return | ||
| 413 | + */ | ||
| 414 | + public static String listLongToStr(List<Long> lists) { | ||
| 415 | + StringBuffer str = new StringBuffer(""); | ||
| 416 | + for (Long value : lists) { | ||
| 417 | + str.append(value).append(","); | ||
| 418 | + } | ||
| 419 | + return str.toString().substring(0, str.toString().lastIndexOf(",")); | ||
| 420 | + } | ||
| 421 | + | ||
| 422 | + /** | ||
| 423 | + * List<Integer> 转String 用于sql | ||
| 424 | + * | ||
| 425 | + * @param lists | ||
| 426 | + * @return | ||
| 427 | + */ | ||
| 428 | + public String listIntegerToStr(List<Integer> lists) { | ||
| 429 | + StringBuffer str = new StringBuffer(""); | ||
| 430 | + for (Integer value : lists) { | ||
| 431 | + str.append(value).append(","); | ||
| 432 | + } | ||
| 433 | + return str.toString().substring(0, str.toString().lastIndexOf(",")); | ||
| 434 | + } | ||
| 435 | + | ||
| 436 | + /** | ||
| 437 | + * List<String> 转String 用于sql | ||
| 438 | + * | ||
| 439 | + * @param lists | ||
| 440 | + * @return | ||
| 441 | + */ | ||
| 442 | + public String listStringToStr(List<String> lists) { | ||
| 443 | + StringBuffer srt = new StringBuffer(""); | ||
| 444 | + for (String value : lists) { | ||
| 445 | + srt.append("'").append(value).append("'").append(","); | ||
| 446 | + } | ||
| 447 | + return srt.toString().substring(0, srt.toString().lastIndexOf(",")); | ||
| 448 | + } | ||
| 449 | + | ||
| 450 | + public static String getRandomString(int length) { | ||
| 451 | + return RandomStringUtils.randomAlphanumeric(length); | ||
| 452 | + } | ||
| 453 | + | ||
| 454 | + public static String[] splitForList(String str, String regex) { | ||
| 455 | + ArrayList resultStr = new ArrayList(); | ||
| 456 | + if (!isEmptyWithTrim(str)) { | ||
| 457 | + String[] strs = str.split(regex); | ||
| 458 | + for (String s : strs) { | ||
| 459 | + if (!isEmptyWithTrim(s)) { | ||
| 460 | + resultStr.add(s.trim()); | ||
| 461 | + } | ||
| 462 | + } | ||
| 463 | + } | ||
| 464 | + return (String[]) resultStr.toArray(new String[resultStr.size()]); | ||
| 465 | + } | ||
| 466 | + | ||
| 467 | + /** | ||
| 468 | + * 获取固定字节长度字符串 | ||
| 469 | + * @param original | ||
| 470 | + * @param length | ||
| 471 | + * @return | ||
| 472 | + */ | ||
| 473 | + public static String formatStringLength(String original, int length) { | ||
| 474 | + if (original == null) { | ||
| 475 | + original = ""; | ||
| 476 | + } | ||
| 477 | + int newLength = original.getBytes().length; | ||
| 478 | + while (newLength > length) { | ||
| 479 | + original = original.substring(0,original.length() - 1); | ||
| 480 | + newLength = original.getBytes().length; | ||
| 481 | + } | ||
| 482 | + return original; | ||
| 483 | + } | ||
| 484 | + | ||
| 485 | + /** | ||
| 486 | + * 获取固定字节长度字符串 | ||
| 487 | + * @param original | ||
| 488 | + * @param length | ||
| 489 | + * @return | ||
| 490 | + */ | ||
| 491 | + public static String formatStringLength(String original, long length) { | ||
| 492 | + if (original == null) { | ||
| 493 | + original = ""; | ||
| 494 | + } | ||
| 495 | + long newLength = original.getBytes().length; | ||
| 496 | + while (newLength > length) { | ||
| 497 | + original = original.substring(0, original.length() - 1); | ||
| 498 | + newLength = original.getBytes().length; | ||
| 499 | + } | ||
| 500 | + return original; | ||
| 501 | + } | ||
| 502 | + | ||
| 503 | + public static String autoCompletionStringAfterByZero(String _orig, long _length) { | ||
| 504 | + if (_orig == null) { | ||
| 505 | + _orig = ""; | ||
| 506 | + } | ||
| 507 | + while (_orig.length() < _length) { | ||
| 508 | + _orig += "0"; | ||
| 509 | + } | ||
| 510 | + return _orig; | ||
| 511 | + } | ||
| 512 | + | ||
| 513 | + public static String formatInteger(int num, int length) { | ||
| 514 | + String number = (new Integer(num)).toString(); | ||
| 515 | + while (number.length() < length) { | ||
| 516 | + number = "0" + number; | ||
| 517 | + } | ||
| 518 | + return number; | ||
| 519 | + } | ||
| 520 | + | ||
| 521 | + /** | ||
| 522 | + * String List 转 String[] | ||
| 523 | + * | ||
| 524 | + * @param strList | ||
| 525 | + * @return | ||
| 526 | + */ | ||
| 527 | + public static String[] listRotationArray(List<String> strList) { | ||
| 528 | + if (strList == null || strList.size() == 0) { | ||
| 529 | + return new String[]{""}; | ||
| 530 | + } | ||
| 531 | + return (String[]) strList.toArray(new String[strList.size()]); | ||
| 532 | + } | ||
| 533 | + | ||
| 534 | + //如果不足9位置,那么前面补充0 | ||
| 535 | + private String strFormat(int length, String strOrign, boolean isAfter, String str) { | ||
| 536 | + if (strOrign == null) { | ||
| 537 | + strOrign = "000000000"; | ||
| 538 | + } else { | ||
| 539 | + strOrign = strOrign.trim(); | ||
| 540 | + } | ||
| 541 | + while (strOrign.getBytes().length > length) { | ||
| 542 | + strOrign = strOrign.substring(0, strOrign.length() - 1); | ||
| 543 | + } | ||
| 544 | + | ||
| 545 | + //不够9为前面补0 | ||
| 546 | + while (strOrign.getBytes().length < 9) { | ||
| 547 | + strOrign = "0" + strOrign; | ||
| 548 | + } | ||
| 549 | + //9位之后补空格 | ||
| 550 | + while (strOrign.getBytes().length < length) { | ||
| 551 | + strOrign += " "; | ||
| 552 | + } | ||
| 553 | + return strOrign; | ||
| 554 | + } | ||
| 555 | + | ||
| 556 | + /** | ||
| 557 | + * 后补空格 | ||
| 558 | + * | ||
| 559 | + * @param length | ||
| 560 | + * @param strOrign | ||
| 561 | + * @return | ||
| 562 | + */ | ||
| 563 | + public static String strFormat(int length, String strOrign) { | ||
| 564 | + if (strOrign == null) { | ||
| 565 | + strOrign = " "; | ||
| 566 | + } else { | ||
| 567 | + strOrign = strOrign.trim(); | ||
| 568 | + } | ||
| 569 | + while (strOrign.getBytes().length > length) { | ||
| 570 | + strOrign = strOrign.substring(0, strOrign.length() - 1); | ||
| 571 | + } | ||
| 572 | + //9位之后补空格 | ||
| 573 | + while (strOrign.getBytes().length < length) { | ||
| 574 | + strOrign += " "; | ||
| 575 | + } | ||
| 576 | + return strOrign; | ||
| 577 | + } | ||
| 578 | + | ||
| 579 | + /** | ||
| 580 | + * Java实现按字节长度截取字符串 | ||
| 581 | + * @param s | ||
| 582 | + * @param length | ||
| 583 | + * @return | ||
| 584 | + * @throws Exception | ||
| 585 | + */ | ||
| 586 | + public static String bSubstring(String s, int length) throws Exception { | ||
| 587 | + | ||
| 588 | + byte[] bytes = s.getBytes("Unicode"); | ||
| 589 | + int n = 0; // 表示当前的字节数 | ||
| 590 | + int i = 2; // 要截取的字节数,从第3个字节开始 | ||
| 591 | + for (; i < bytes.length && n < length; i++) { | ||
| 592 | + // 奇数位置,如3、5、7等,为UCS2编码中两个字节的第二个字节 | ||
| 593 | + if (i % 2 == 1) { | ||
| 594 | + n++; // 在UCS2第二个字节时n加1 | ||
| 595 | + } else { | ||
| 596 | + // 当UCS2编码的第一个字节不等于0时,该UCS2字符为汉字,一个汉字算两个字节 | ||
| 597 | + if (bytes[i] != 0) { | ||
| 598 | + n++; | ||
| 599 | + } | ||
| 600 | + } | ||
| 601 | + } | ||
| 602 | + // 如果i为奇数时,处理成偶数 | ||
| 603 | + if (i % 2 == 1) { | ||
| 604 | + // 该UCS2字符是汉字时,去掉这个截一半的汉字 | ||
| 605 | + if (bytes[i - 1] != 0) { | ||
| 606 | + i = i - 1; | ||
| 607 | + } else { | ||
| 608 | + // 该UCS2字符是字母或数字,则保留该字符 | ||
| 609 | + i = i + 1; | ||
| 610 | + } | ||
| 611 | + } | ||
| 612 | + return new String(bytes, 0, i, "Unicode"); | ||
| 613 | + } | ||
| 614 | + | ||
| 615 | + /** | ||
| 616 | + * 获取固定字节长度字符串 | ||
| 617 | + * @param length | ||
| 618 | + * @param strOrign | ||
| 619 | + * @param strFix | ||
| 620 | + * @return | ||
| 621 | + */ | ||
| 622 | + public static String strLengthFormatNew(int length, String strOrign, String strFix) { | ||
| 623 | + strOrign = strOrign == null ? strFix : strOrign.trim(); | ||
| 624 | + StringBuffer resultStrBuffer = null; | ||
| 625 | + if (strOrign.getBytes().length > length) { | ||
| 626 | + strOrign = strOrign.substring(0, length); | ||
| 627 | + while (resultStrBuffer.toString().getBytes().length > length) { | ||
| 628 | +// strOrign = strOrign.substring(0, strOrign.length() - 1); | ||
| 629 | + strOrign = strOrign.substring(0, length); | ||
| 630 | + } | ||
| 631 | + resultStrBuffer = new StringBuffer(strOrign); | ||
| 632 | + } else { | ||
| 633 | + resultStrBuffer = new StringBuffer(strOrign); | ||
| 634 | + //9位之后补空格 | ||
| 635 | + while (resultStrBuffer.toString().getBytes().length < length) { | ||
| 636 | + resultStrBuffer.append(strFix); | ||
| 637 | + } | ||
| 638 | + } | ||
| 639 | + return resultStrBuffer.toString(); | ||
| 640 | + } | ||
| 641 | + | ||
| 642 | + | ||
| 643 | + /** | ||
| 644 | + * @param length | ||
| 645 | + * @param strOrign | ||
| 646 | + * @return | ||
| 647 | + */ | ||
| 648 | + @Deprecated | ||
| 649 | + public static String strLengthFormat(int length, String strOrign, String strFix) { | ||
| 650 | + if (strOrign == null) { | ||
| 651 | + strOrign = " "; | ||
| 652 | + } else { | ||
| 653 | + strOrign = strOrign.trim(); | ||
| 654 | + } | ||
| 655 | + while (strOrign.getBytes().length > length) { | ||
| 656 | +// strOrign = strOrign.substring(0, strOrign.length() - 1); | ||
| 657 | + strOrign = strOrign.substring(0, length); | ||
| 658 | + } | ||
| 659 | + //9位之后补空格 | ||
| 660 | + while (strOrign.getBytes().length < length) { | ||
| 661 | + strOrign += strFix; | ||
| 662 | + } | ||
| 663 | + return strOrign; | ||
| 664 | + } | ||
| 665 | + | ||
| 666 | + /** | ||
| 667 | + * 前面补数据 | ||
| 668 | + * | ||
| 669 | + * @param length | ||
| 670 | + * @param strOrign | ||
| 671 | + * @return | ||
| 672 | + */ | ||
| 673 | + public static String strFrontFormat(int length, String strOrign, String strFix) { | ||
| 674 | + if (strOrign == null) { | ||
| 675 | + strOrign = " "; | ||
| 676 | + } else { | ||
| 677 | + strOrign = strOrign.trim(); | ||
| 678 | + } | ||
| 679 | + while (strOrign.getBytes().length > length) { | ||
| 680 | +// strOrign = strOrign.substring(0, strOrign.length() - 1); | ||
| 681 | + strOrign = strOrign.substring(0, length); | ||
| 682 | + } | ||
| 683 | + //前面补零 | ||
| 684 | + while (strOrign.getBytes().length < length) { | ||
| 685 | + strOrign = strFix + strOrign; | ||
| 686 | + } | ||
| 687 | + return strOrign; | ||
| 688 | + } | ||
| 689 | + | ||
| 690 | + /** | ||
| 691 | + * 前面补数据 | ||
| 692 | + * | ||
| 693 | + * @param length | ||
| 694 | + * @param strOrign | ||
| 695 | + * @return | ||
| 696 | + */ | ||
| 697 | + public static String strFrontFormatNew(int length, String strOrign, String strFix) { | ||
| 698 | + strOrign = strOrign == null ? strFix : strOrign.trim(); | ||
| 699 | + if (strOrign == null) { | ||
| 700 | + strOrign = " "; | ||
| 701 | + } else { | ||
| 702 | + strOrign = strOrign.trim(); | ||
| 703 | + } | ||
| 704 | + while (strOrign.getBytes().length > length) { | ||
| 705 | +// strOrign = strOrign.substring(0, strOrign.length() - 1); | ||
| 706 | + strOrign = strOrign.substring(0, length); | ||
| 707 | + } | ||
| 708 | + //前面补零 | ||
| 709 | + while (strOrign.getBytes().length < length) { | ||
| 710 | + strOrign = strFix + strOrign; | ||
| 711 | + } | ||
| 712 | + return strOrign; | ||
| 713 | + } | ||
| 714 | + | ||
| 715 | + /** | ||
| 716 | + * sql in查询条件数量分割 | ||
| 717 | + * | ||
| 718 | + * @param orignList | ||
| 719 | + * @param splitCount | ||
| 720 | + * @return | ||
| 721 | + */ | ||
| 722 | + public static List<List> listSplit(List orignList, int splitCount) { | ||
| 723 | + List<List> resultList = new ArrayList<>(); | ||
| 724 | + if (orignList == null || orignList.isEmpty()) { | ||
| 725 | + resultList = null; | ||
| 726 | + } else { | ||
| 727 | + int orignListSize = orignList.size(); | ||
| 728 | + int cycleTimes = (orignListSize + splitCount - 1) / splitCount; | ||
| 729 | + for (int i = 1; i <= cycleTimes; i++) { | ||
| 730 | + List list = orignList.subList(splitCount * (i - 1), (splitCount * i > orignListSize ? orignListSize : splitCount * i)); | ||
| 731 | + resultList.add(list); | ||
| 732 | + } | ||
| 733 | + } | ||
| 734 | + return resultList; | ||
| 735 | + } | ||
| 736 | + | ||
| 737 | + public static String valueOf(Object obj) { | ||
| 738 | + return (obj == null || obj.toString().trim().equals("")) ? null : obj.toString(); | ||
| 739 | + } | ||
| 740 | + | ||
| 741 | + public static String formatStringLaterSpace(String original, long length) { | ||
| 742 | + String result = ""; | ||
| 743 | + long bytes = 0; | ||
| 744 | + int index = 0; | ||
| 745 | + while (bytes < length) { | ||
| 746 | + String s = " "; | ||
| 747 | + if (index < original.length()) { | ||
| 748 | + s = original.substring(index, index + 1); | ||
| 749 | + } | ||
| 750 | + bytes += s.getBytes().length; | ||
| 751 | + if (bytes > length) { | ||
| 752 | + for (int i = 0; i < bytes - length; i++) { | ||
| 753 | + result += " "; | ||
| 754 | + } | ||
| 755 | + } else { | ||
| 756 | + result += s; | ||
| 757 | + } | ||
| 758 | + index++; | ||
| 759 | + } | ||
| 760 | + return result; | ||
| 761 | + } | ||
| 762 | + | ||
| 763 | + /** | ||
| 764 | + * BigDecimal 格式化 | ||
| 765 | + * @param value | ||
| 766 | + * @param wholeLength --整数位 | ||
| 767 | + * @param decimalLength --小数位 | ||
| 768 | + * @return | ||
| 769 | + */ | ||
| 770 | + public static String formatBigDecimal(BigDecimal value, long wholeLength, long decimalLength){ | ||
| 771 | + String str = "" + value; | ||
| 772 | + if(!str.contains(".")){ | ||
| 773 | + str = str + ".0" ; | ||
| 774 | + if(str.length() == 2){ | ||
| 775 | + str = "0" + str; | ||
| 776 | + } | ||
| 777 | + } | ||
| 778 | + String[]arrays = str.split("\\."); | ||
| 779 | + //整数位格式化 | ||
| 780 | + while (arrays[0].length() < wholeLength) { | ||
| 781 | + arrays[0] = "0" + arrays[0]; | ||
| 782 | + } | ||
| 783 | + //小数位格式化 | ||
| 784 | + while (arrays[1].length() < decimalLength) { | ||
| 785 | + arrays[1] = arrays[1] + "0"; | ||
| 786 | + } | ||
| 787 | + return arrays[0] + "." + arrays[1]; | ||
| 788 | + } | ||
| 789 | + | ||
| 790 | + /** | ||
| 791 | + * BigDecimal 格式化 | ||
| 792 | + * @param value | ||
| 793 | + * @param type --小数位 舍入方式 | ||
| 794 | + * @param wholeLength --整数位 | ||
| 795 | + * @param decimalLength --小数位 | ||
| 796 | + * @return | ||
| 797 | + */ | ||
| 798 | + public static String formatBigDecimalNoPoint(BigDecimal value, int type,int wholeLength, int decimalLength){ | ||
| 799 | + String str = value.setScale(decimalLength,type).toString(); | ||
| 800 | + String[]arrays = str.split("\\."); | ||
| 801 | + //整数位格式化 | ||
| 802 | + while (arrays[0].length() < wholeLength) { | ||
| 803 | + arrays[0] = "0" + arrays[0]; | ||
| 804 | + } | ||
| 805 | + //小数位格式化 | ||
| 806 | + while (arrays[1].length() < decimalLength) { | ||
| 807 | + arrays[1] = arrays[1] + "0"; | ||
| 808 | + } | ||
| 809 | + return arrays[0] + arrays[1]; | ||
| 810 | + } | ||
| 811 | + | ||
| 812 | + /** | ||
| 813 | + * BigDecimal 格式化 | ||
| 814 | + * @param value | ||
| 815 | + * @param decimalLength --小数位 | ||
| 816 | + * @return | ||
| 817 | + */ | ||
| 818 | + public static String formatBigDecimalNew(BigDecimal value, int decimalLength){ | ||
| 819 | + return formatBigDecimalNew(value,BigDecimal.ROUND_HALF_UP,19, decimalLength); | ||
| 820 | + | ||
| 821 | + } | ||
| 822 | + | ||
| 823 | + /** | ||
| 824 | + * BigDecimal 格式化 | ||
| 825 | + * @param value | ||
| 826 | + * @param roundHalfType --小数位 舍入方式 | ||
| 827 | + * @param wholeLength --整数位 | ||
| 828 | + * @param decimalLength --小数位 | ||
| 829 | + * @return | ||
| 830 | + */ | ||
| 831 | + public static String formatBigDecimalNew(BigDecimal value, int roundHalfType,int wholeLength, int decimalLength){ | ||
| 832 | + String result = ""; | ||
| 833 | + if(value != null) { | ||
| 834 | + String valueNewStr = value.setScale(decimalLength,roundHalfType).toString(); | ||
| 835 | + if(valueNewStr.length() > wholeLength){ | ||
| 836 | + String[] valueNewArry = valueNewStr.split("\\."); | ||
| 837 | + if(valueNewArry[0].length() > wholeLength){ | ||
| 838 | + result = valueNewArry[0].substring(wholeLength - 1) + "." + valueNewArry[1]; | ||
| 839 | + } else { | ||
| 840 | + result = valueNewStr; | ||
| 841 | + } | ||
| 842 | + } else { | ||
| 843 | + result = valueNewStr; | ||
| 844 | + } | ||
| 845 | + } | ||
| 846 | + return result; | ||
| 847 | + } | ||
| 848 | + | ||
| 849 | + public static void main(String[] args){ | ||
| 850 | + BigDecimal aa = new BigDecimal("111.9992440000600000"); | ||
| 851 | + String valueNew = StringUtil.formatBigDecimalNew(aa,BigDecimal.ROUND_HALF_UP,3,5); | ||
| 852 | + String valueNew1 = StringUtil.formatBigDecimalNew(null,5); | ||
| 853 | + System.out.println(valueNew); | ||
| 854 | + System.out.println(valueNew1); | ||
| 855 | + } | ||
| 856 | + | ||
| 857 | +} |
| ... | @@ -25,6 +25,8 @@ api: | ... | @@ -25,6 +25,8 @@ api: |
| 25 | #获取token密码 | 25 | #获取token密码 |
| 26 | password: toQu3arch6 | 26 | password: toQu3arch6 |
| 27 | address: | 27 | address: |
| 28 | + #IClear校验运单地址 | ||
| 29 | + iclear-check-url: http://40.73.78.157:8081/chmConsignmentController/checkChmAndDetaliD | ||
| 28 | #获取token地址 | 30 | #获取token地址 |
| 29 | token-url: https://apiuat.iclrccd-fedex.com/login | 31 | token-url: https://apiuat.iclrccd-fedex.com/login |
| 30 | #刷新token地址 | 32 | #刷新token地址 | ... | ... |
| ... | @@ -24,6 +24,8 @@ api: | ... | @@ -24,6 +24,8 @@ api: |
| 24 | #获取token密码 | 24 | #获取token密码 |
| 25 | password: toQu3arch6 | 25 | password: toQu3arch6 |
| 26 | address: | 26 | address: |
| 27 | + #IClear校验运单地址 | ||
| 28 | + iclear-check-url: https://www.iclrccd-fedex.com/chmConsignmentController/checkChmAndDetaliD | ||
| 27 | #获取token地址 | 29 | #获取token地址 |
| 28 | token-url: https://api.iclrccd-fedex.com/export/login | 30 | token-url: https://api.iclrccd-fedex.com/export/login |
| 29 | #刷新token地址 | 31 | #刷新token地址 | ... | ... |
| 1 | spring: | 1 | spring: |
| 2 | datasource: | 2 | datasource: |
| 3 | - url: jdbc:sqlserver://40.73.78.157:1433;DatabaseName=IClearDemo | 3 | + url: jdbc:sqlserver://40.73.78.157:1433;DatabaseName=IClearDev |
| 4 | username: sa | 4 | username: sa |
| 5 | password: Fedex_123 | 5 | password: Fedex_123 |
| 6 | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver | 6 | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| ... | @@ -24,6 +24,8 @@ api: | ... | @@ -24,6 +24,8 @@ api: |
| 24 | #获取token密码 | 24 | #获取token密码 |
| 25 | password: toQu3arch6 | 25 | password: toQu3arch6 |
| 26 | address: | 26 | address: |
| 27 | + #IClear校验运单地址 | ||
| 28 | + iclear-check-url: http://40.73.78.157:8081/chmConsignmentController/checkChmAndDetaliD | ||
| 27 | #获取token地址 | 29 | #获取token地址 |
| 28 | token-url: https://apiuat.iclrccd-fedex.com/login | 30 | token-url: https://apiuat.iclrccd-fedex.com/login |
| 29 | #刷新token地址 | 31 | #刷新token地址 | ... | ... |
| ... | @@ -111,7 +111,7 @@ public class ChmConsignmentServiceTest extends IClearApiApplicationTests { | ... | @@ -111,7 +111,7 @@ public class ChmConsignmentServiceTest extends IClearApiApplicationTests { |
| 111 | mawb.setFeeCurr("USD"); | 111 | mawb.setFeeCurr("USD"); |
| 112 | mawb.setFeeMark("3"); | 112 | mawb.setFeeMark("3"); |
| 113 | mawb.setFeeRate(BigDecimal.valueOf(100.58)); | 113 | mawb.setFeeRate(BigDecimal.valueOf(100.58)); |
| 114 | - mawb.setGrossWet(500); | 114 | + mawb.setGrossWet(BigDecimal.valueOf(500)); |
| 115 | mawb.setIePort("0101"); | 115 | mawb.setIePort("0101"); |
| 116 | mawb.setInputerName(""); | 116 | mawb.setInputerName(""); |
| 117 | mawb.setInsurCurr("MOP"); | 117 | mawb.setInsurCurr("MOP"); | ... | ... |
| ... | @@ -25,7 +25,7 @@ public class HttpClientTest { | ... | @@ -25,7 +25,7 @@ public class HttpClientTest { |
| 25 | 25 | ||
| 26 | 26 | ||
| 27 | 27 | ||
| 28 | - String masbJson ="{\"ieFlag\":\"E\",\"type\":\"EX\",\"agentCode\":\"1111980005\",\"agentName\":\"联邦快递(中国)有限公司\",\"billNo\":\"07127275242_00062210\",\"contrNo\":\"FY2016\",\"customMaster\":\"2233\",\"cutMode\":\"101\",\"declTrnRel\":\"0\",\"distinatePort\":\"ASM000\",\"ediId\":\"001\",\"entryId\":\"25512456\",\"feeCurr\":\"EUR\",\"feeMark\":\"3\",\"feeRate\":3.65,\"grossWet\":4,\"iePort\":\"0101\",\"insurCurr\":\"MOP\",\"insurMark\":\"3\",\"insurRate\":0.02457,\"netWt\":3.857,\"ownerCode\":\"1234567890\",\"ownerName\":\"琥博信息科技有限公司\",\"packNo\":1,\"tradeCountry\":\"US\",\"tradeMode\":\"0110\",\"tradeCode\":\"1234567890\",\"trafMode\":\"5\",\"tradeName\":\"琥博信息科技有限公司\",\"transMode\":\"3\",\"wrapType\":\"22\",\"tradeCodeScc\":\"123456789012345678\",\"ownerCodeScc\":\"123456789012345678\",\"tradeAreaCode\":\"US\",\"entyPortCode\":\"310302\",\"goodsPlace\":\"\",\"declareName\":\"申报人员姓名_50\",\"overseasConsignorCode\":\"AEO Code 50位\",\"overseasConsigneeCode\":\"境外收货人编码_50位\",\"overseasConsigneeEname\":\"境外收货人名称(外文)_400\",\"mawbDetailList\":[{\"detailId\":\"12251\",\"classMark\":\"\",\"codeTS\":\"8538900000\",\"declPrice\":128,\"declTotal\":128,\"dutyMode\":\"1\",\"exgNo\":\"\",\"exgVersion\":\"\",\"firstUnit\":\"035\",\"firstQty\":0,\"gunit\":\"007\",\"gmodel\":\"用于PLC可编程控制器|琥博|6ES7153|无其他1\",\"gname\":\"PLC可编程控制器零件/接口模块\",\"gno\":\"1\",\"gqty\":1,\"originCountry\":\"US\",\"secondQty\":222,\"tradeCurr\":\"USD\",\"useTo\":\"03\",\"ciqCode\":\"001\",\"destinationCountry\":\"CNY\",\"destCode\":\"110102\",\"districtCode\":\"4408W\"},{\"detailId\":\"12252\",\"classMark\":\"\",\"codeTS\":\"8538900000\",\"declPrice\":94.47,\"declTotal\":188.94,\"dutyMode\":\"1\",\"exgNo\":\"\",\"exgVersion\":\"\",\"firstUnit\":\"035\",\"firstQty\":0,\"gunit\":\"007\",\"gmodel\":\"用于PLC可编程控制器|琥博|6ES7331|无其他2\",\"gname\":\"PLC可编程控制器零件/输入模块\",\"gno\":\"2\",\"gqty\":2,\"originCountry\":\"US\",\"secondQty\":222,\"tradeCurr\":\"USD\",\"useTo\":\"03\",\"ciqCode\":\"\",\"destinationCountry\":\"CHN\",\"destCode\":\"\",\"districtCode\":\"4408W\"},{\"detailId\":\"12601\",\"classMark\":\"\",\"codeTS\":\"8538900001\",\"declPrice\":94.47,\"declTotal\":188.94,\"dutyMode\":\"1\",\"exgNo\":\"\",\"exgVersion\":\"\",\"firstUnit\":\"035\",\"firstQty\":0,\"gunit\":\"007\",\"gmodel\":\"用于PLC可编程控制器|琥博|6ES7331|无其他3\",\"gname\":\"PLC可编程控制器零件/输入模块\",\"gno\":\"2\",\"gqty\":2,\"originCountry\":\"US\",\"secondQty\":222,\"tradeCurr\":\"USD\",\"useTo\":\"03\",\"ciqCode\":\"\",\"destinationCountry\":\"CHN\",\"destCode\":\"\",\"districtCode\":\"4408W\"}]}"; | 28 | + String masbJson ="{\"ieFlag\":\"I\",\"type\":\" 0\",\"agentCode\":\"1111980005\",\"agentName\":\"联邦快递\",\"billNo\":\"774597567332\",\"contrNo\":\"3006635555/3006636664\",\"customMaster\":\"0207\",\"cutMode\":\"1\",\"declTrnRel\":\"0\",\"distinatePort\":\"DEU000\",\"ediId\":\"1\",\"feeCurr\":\"EUR\",\"feeMark\":\"3\",\"feeRate\":110.9,\"grossWet\":4.6,\"iePort\":\"0207\",\"insurCurr\":\"EUR\",\"insurMark\":\"\",\"insurRate\":0.74,\"netWt\":32,\"ownerCode\":\"9112011660\",\"ownerName\":\"西门子电气传动有限公司\",\"packNo\":1,\"tradeCountry\":\"USA\",\"tradeMode\":\"0110\",\"tradeCode\":\"9112011660\",\"trafMode\":\"5\",\"tradeName\":\"西门子电气传动有限公司\",\"transMode\":\"1\",\"wrapType\":\"23\",\"tradeCodeScc\":\"91120116600587482L\",\"ownerCodeScc\":\"91120116600587482L\",\"tradeAreaCode\":\"DEU\",\"entyPortCode\":\"110101\",\"goodsPlace\":\"\",\"declareName\":\"Jimmy shen\",\"overseasConsigneeEname\":\"PRYSMIAN KABEL UND SYSTEME GMBH\",\"mawbDetailList\":[{\"detailId\":\"495\",\"classMark\":\"\",\"codeTS\":\"8504409999\",\"declPrice\":3365,\"declTotal\":3365,\"dutyMode\":\"1\",\"exgNo\":\"\",\"exgVersion\":\"\",\"firstUnit\":\"007\",\"firstQty\":1,\"originCountry\":\"CHN\",\"secondUnit\":\"035\",\"secondQty\":1,\"tradeCurr\":\"EUR\",\"useTo\":\"03\",\"destinationCountry\":\"DEU\",\"ciqCode\":\"\",\"destCode\":\"110102\",\"districtCode\":\"11010\",\"gno\":1,\"gname\":\"其他未列名静止式变流器\",\"gmodel\":\"4|0|控制电机用|240KW|西门子/SIEMENS|6RA8081-6GV62-0AA0|||\",\"gqty\":1,\"gunit\":\"007\"},{\"detailId\":\"496\",\"classMark\":\"\",\"codeTS\":\"8504409999\",\"declPrice\":9369,\"declTotal\":9369,\"dutyMode\":\"1\",\"exgNo\":\"\",\"exgVersion\":\"\",\"firstUnit\":\"007\",\"firstQty\":3,\"originCountry\":\"CHN\",\"secondUnit\":\"035\",\"secondQty\":1,\"tradeCurr\":\"EUR\",\"useTo\":\"03\",\"destinationCountry\":\"DEU\",\"ciqCode\":\"\",\"destCode\":\"110102\",\"districtCode\":\"11010\",\"gno\":2,\"gname\":\"其他未列名静止式变流器\",\"gmodel\":\"4|0|控制电机用|36KW|西门子/SIEMENS|6RA8081-6GV62-0BB0|||\",\"gqty\":3,\"gunit\":\"007\"}]}"; |
| 29 | 29 | ||
| 30 | 30 | ||
| 31 | 31 | ||
| ... | @@ -46,14 +46,14 @@ public class HttpClientTest { | ... | @@ -46,14 +46,14 @@ public class HttpClientTest { |
| 46 | .build(); | 46 | .build(); |
| 47 | 47 | ||
| 48 | HCB hcb = HCB.custom() | 48 | HCB hcb = HCB.custom() |
| 49 | - .timeout(3000) | 49 | + .timeout(20000) |
| 50 | .pool(100, 10) | 50 | .pool(100, 10) |
| 51 | .sslpv(SSLs.SSLProtocolVersion.TLSv1_2) | 51 | .sslpv(SSLs.SSLProtocolVersion.TLSv1_2) |
| 52 | .ssl() | 52 | .ssl() |
| 53 | .retry(3); | 53 | .retry(3); |
| 54 | 54 | ||
| 55 | -// String url = "https://40.73.78.157:8780/customs/sendMawb"; | 55 | + //String url = "https://40.73.78.157:8780/customs/sendMawb"; |
| 56 | - String url = "https://192.168.1.75:8780/customs/sendMawb"; | 56 | + String url = "https://127.0.0.1:8780/customs/sendMawb"; |
| 57 | HttpConfig config = HttpConfig.custom() | 57 | HttpConfig config = HttpConfig.custom() |
| 58 | .headers(headers) | 58 | .headers(headers) |
| 59 | .url(url) | 59 | .url(url) |
| ... | @@ -148,7 +148,7 @@ public class HttpClientTest { | ... | @@ -148,7 +148,7 @@ public class HttpClientTest { |
| 148 | mawb.setFeeCurr("USD"); | 148 | mawb.setFeeCurr("USD"); |
| 149 | mawb.setFeeMark("3"); | 149 | mawb.setFeeMark("3"); |
| 150 | mawb.setFeeRate(BigDecimal.valueOf(100.58)); | 150 | mawb.setFeeRate(BigDecimal.valueOf(100.58)); |
| 151 | - mawb.setGrossWet(500); | 151 | + mawb.setGrossWet(BigDecimal.valueOf(500)); |
| 152 | mawb.setIePort("0101"); | 152 | mawb.setIePort("0101"); |
| 153 | mawb.setInputerName(""); | 153 | mawb.setInputerName(""); |
| 154 | mawb.setInsurCurr("MOP"); | 154 | mawb.setInsurCurr("MOP"); | ... | ... |
| 1 | +package com.erry.iclear.dateInterface; | ||
| 2 | + | ||
| 3 | +import com.arronlong.httpclientutil.HttpClientUtil; | ||
| 4 | +import com.arronlong.httpclientutil.common.HttpConfig; | ||
| 5 | +import com.arronlong.httpclientutil.common.HttpHeader; | ||
| 6 | +import com.erry.iclear.dateInterface.util.JsonToJava; | ||
| 7 | +import org.apache.http.Header; | ||
| 8 | + | ||
| 9 | +public class IClearCheckTest { | ||
| 10 | + public static void main(String[] args) throws Exception{ | ||
| 11 | + //调用IClear接口进行运单数据校验 | ||
| 12 | + String objJson = "{\"chmConsignmentDetailList\":[{\"amount\":3365,\"chmConsignment\":{\"$ref\":\"$\"},\"contentDescription\":null,\"currency\":\"欧元\",\"currencyDic\":{\"chineseName\":\"欧元\",\"code\":\"currencySystem_EUR\",\"dictCode\":\"currencySystem\",\"ext2\":\"EUR\",\"ext3\":\"GBR\",\"ext6\":\"300\",\"id\":84605},\"destinationCountry\":\"德意志联邦共和国\",\"destinationCountryDic\":{\"chineseName\":\"德意志联邦共和国\",\"code\":\"Country_DE\",\"dictCode\":\"Country\",\"ext2\":\"DE\",\"ext3\":\"DEU\",\"ext6\":\"304\",\"id\":84415},\"detailId\":\"204\",\"domesticDestination\":null,\"domesticDestinationMapping\":null,\"habitat\":\"中华人民共和国\",\"habitatDic\":{\"chineseName\":\"中华人民共和国\",\"code\":\"Country_CN\",\"dictCode\":\"Country\",\"ext2\":\"CN\",\"ext3\":\"CHN\",\"ext6\":\"142\",\"id\":84355},\"id\":null,\"knockdownNumber\":1.0,\"knockdownUnit\":\"个\",\"knockdownUnitDic\":{\"chineseName\":\"个\",\"code\":\"transactionUnit_007\",\"dictCode\":\"transactionUnit\",\"ext2\":\"007\",\"ext3\":\"GBR\",\"ext6\":\"EA\",\"id\":84139},\"levyType\":\"照章征税\",\"levyTypeDic\":{\"chineseName\":\"照章征税\",\"code\":\"levyType_1\",\"dictCode\":\"levyType\",\"ext2\":\"1\",\"ext3\":\"GBR\",\"ext6\":null,\"id\":84515},\"model\":\"4|0|控制电机用|240KW|西门子/SIEMENS|6RA8081-6GV62-0AA0|||\",\"oriRegion\":3365,\"origplacecode\":\"\",\"origplacecodeMapping\":null,\"qtyLegalFirst\":1.0,\"qtyLegalSecond\":1.0,\"skuCode\":\"8504409999\",\"skuName\":\"变频调速装置\",\"unitLegalFirst\":\"千克\",\"unitLegalFirstId\":{\"chineseName\":\"千克\",\"code\":\"transactionUnit_035\",\"dictCode\":\"transactionUnit\",\"ext2\":\"035\",\"ext3\":\"GBR\",\"ext6\":\"KGS\",\"id\":84148},\"unitLegalSecond\":\"千克\",\"unitLegalSecondId\":{\"$ref\":\"$.chmConsignmentDetailList[0].unitLegalFirstId\"}}],\"consStatus\":\"待申报海关\",\"consStatusDic\":{\"chineseName\":\"待申报海关\",\"code\":\"transferWaybillStatus_5\",\"dictCode\":\"transferWaybillStatus\",\"ext2\":\"5\",\"ext3\":\"GBR\",\"ext6\":null,\"id\":84492},\"consType\":\"D\",\"consTypeId\":{\"chineseName\":\"D\",\"code\":\"consType_D\",\"dictCode\":\"consType\",\"ext2\":\"D\",\"ext3\":\"GBR\",\"ext6\":null,\"id\":84512},\"consignmentCode\":\"774426960555\",\"consignmentHeadCode\":null,\"contractCode\":\"3006622200\",\"counts\":1,\"createTime\":1628681350830,\"creator\":\"IDE-ICLEAR-API\",\"customsNo\":null,\"dealMode\":\"CIF、CIP、DDP、DDU、DAP\",\"dealModeDic\":{\"chineseName\":\"CIF、CIP、DDP、DDU、DAP\",\"code\":\"ClinchType_CIF\",\"dictCode\":\"ClinchType\",\"ext2\":\"CIF\",\"ext3\":\"GBR\",\"ext6\":\"1\",\"id\":83977},\"declaredDocType\":null,\"declaredDocTypeDic\":null,\"declaredPort\":null,\"declaredRemark\":null,\"declaredUnitName\":\"Jimmy shen\",\"enteringNo\":null,\"fromCountry\":\"美国\",\"fromCountryDic\":{\"chineseName\":\"美国\",\"code\":\"Country_US\",\"dictCode\":\"Country\",\"ext2\":\"US\",\"ext3\":\"USA\",\"ext6\":\"502\",\"id\":84653},\"grossWeight\":4.6,\"id\":null,\"insuranceCost\":0.74,\"insuranceCostCurrency\":\"欧元\",\"insuranceCostCurrencyDic\":{\"$ref\":\"$.chmConsignmentDetailList[0].currencyDic\"},\"netWeight\":32,\"operateUnitName\":\"西门子电气传动有限公司\",\"otherCost\":null,\"otherCurrency\":null,\"otherCurrencyDic\":null,\"overseasConsignorCode\":null,\"overseasConsignorFnCname\":\"PRYSMIAN KABEL UND SYSTEME GMBH\",\"ownerCode\":\"91120116600587482L\",\"ownerCodeScc\":\"91120116600587482L\",\"ownerName\":\"西门子电气传动有限公司\",\"packageType\":\"木制或竹藤等植物性材料制盒/箱\",\"packageTypeDic\":{\"chineseName\":\"木制或竹藤等植物性材料制盒/箱\",\"code\":\"NewPackageType_23\",\"dictCode\":\"NewPackageType\",\"ext2\":\"23\",\"ext3\":\"GBR\",\"ext6\":null,\"id\":83934},\"portId\":{\"chineseName\":\"TSN\",\"code\":\"port_tsn\",\"dictCode\":\"port\",\"ext2\":null,\"ext3\":null,\"ext6\":null,\"id\":125028},\"portName\":\"TSN\",\"recordCode\":null,\"taxNature\":\"中外合资\",\"taxNatureDic\":{\"chineseName\":\"中外合资\",\"code\":\"natureExemption_601\",\"dictCode\":\"natureExemption\",\"ext2\":\"601\",\"ext3\":\"GBR\",\"ext6\":null,\"id\":84122},\"throughStopPort\":\"304\",\"throughStopPortDic\":{\"createName\":\"ADMIN\",\"createTime\":\"\",\"id\":5457,\"pcCode\":\"DEU000\",\"portEngName\":\"Germany\",\"portName\":\"德国\",\"portNo\":\"304\"},\"tradeAreaCode\":\"德意志联邦共和国\",\"tradeAreaCodeDic\":{\"$ref\":\"$.chmConsignmentDetailList[0].destinationCountryDic\"},\"tradeCoSCC\":\"91120116600587482L\",\"tradeMode\":\"一般贸易\",\"tradeModeDic\":{\"chineseName\":\"一般贸易\",\"code\":\"supervisionMode_110\",\"dictCode\":\"supervisionMode\",\"ext2\":\"0110\",\"ext3\":\"GBR\",\"ext6\":null,\"id\":84000},\"transCost\":110.9,\"transCurrency\":\"欧元\",\"transCurrencyDic\":{\"$ref\":\"$.chmConsignmentDetailList[0].currencyDic\"},\"updateTime\":null,\"vehicleWay\":{\"chineseName\":\"航空运输\",\"code\":\"VehicleWayCode_5\",\"dictCode\":\"VehicleWayCode\",\"ext2\":\"5\",\"ext3\":\"GBR\",\"ext6\":null,\"id\":83986},\"vehicleWayCode\":\"VehicleWayCode_5\"}"; | ||
| 13 | + | ||
| 14 | + String url = "http://40.73.78.157:8081/chmConsignmentController/checkChmAndDetaliD"; | ||
| 15 | + | ||
| 16 | + Header[] headers = HttpHeader.custom() | ||
| 17 | + .other("Content-Type", "application/json") | ||
| 18 | + .build(); | ||
| 19 | + //推送海关回执数据 | ||
| 20 | + HttpConfig config = HttpConfig.custom() | ||
| 21 | + .headers(headers) | ||
| 22 | + .url(url) | ||
| 23 | + .encoding("utf-8") | ||
| 24 | + .json(objJson); | ||
| 25 | + String json = HttpClientUtil.post(config); | ||
| 26 | + System.out.println(json); | ||
| 27 | + } | ||
| 28 | +} |
-
Please register or login to post a comment