Showing
9 changed files
with
154 additions
and
119 deletions
| 1 | package com.erry.iclear.dateInterface.api; | 1 | package com.erry.iclear.dateInterface.api; |
| 2 | 2 | ||
| 3 | +import com.erry.iclear.dateInterface.api.request.BasfMawb; | ||
| 3 | import com.erry.iclear.dateInterface.api.request.Basfc; | 4 | import com.erry.iclear.dateInterface.api.request.Basfc; |
| 4 | -import com.erry.iclear.dateInterface.api.request.Mawb; | ||
| 5 | import com.erry.iclear.dateInterface.api.response.ResultRS; | 5 | import com.erry.iclear.dateInterface.api.response.ResultRS; |
| 6 | import com.erry.iclear.dateInterface.entity.IClearApiLog; | 6 | import com.erry.iclear.dateInterface.entity.IClearApiLog; |
| 7 | import com.erry.iclear.dateInterface.service.BasfService; | 7 | import com.erry.iclear.dateInterface.service.BasfService; |
| 8 | +import com.erry.iclear.dateInterface.service.ChmConsignmentService; | ||
| 8 | import com.erry.iclear.dateInterface.service.IClearApiLogService; | 9 | import com.erry.iclear.dateInterface.service.IClearApiLogService; |
| 9 | -import com.erry.iclear.dateInterface.service.MawbService; | ||
| 10 | import com.google.gson.Gson; | 10 | import com.google.gson.Gson; |
| 11 | import io.swagger.annotations.ApiOperation; | 11 | import io.swagger.annotations.ApiOperation; |
| 12 | import lombok.extern.slf4j.Slf4j; | 12 | import lombok.extern.slf4j.Slf4j; |
| ... | @@ -29,6 +29,9 @@ public class BasfDataInterface { | ... | @@ -29,6 +29,9 @@ public class BasfDataInterface { |
| 29 | private BasfService basfService; | 29 | private BasfService basfService; |
| 30 | 30 | ||
| 31 | @Autowired | 31 | @Autowired |
| 32 | + private ChmConsignmentService chmConsignmentService; | ||
| 33 | + | ||
| 34 | + @Autowired | ||
| 32 | private IClearApiLogService iClearApiLogService; | 35 | private IClearApiLogService iClearApiLogService; |
| 33 | 36 | ||
| 34 | @ApiOperation(value = "BASF推送运单数据", httpMethod = "POST", notes = "ex: http://192.168.1.75:8080/customs/sendMawbBasf") | 37 | @ApiOperation(value = "BASF推送运单数据", httpMethod = "POST", notes = "ex: http://192.168.1.75:8080/customs/sendMawbBasf") |
| ... | @@ -55,7 +58,7 @@ public class BasfDataInterface { | ... | @@ -55,7 +58,7 @@ public class BasfDataInterface { |
| 55 | IClearApiLog saveIClearApiLogResult = iClearApiLogService.saveIClearApiLog(iClearApiLogService.convertToIClearApiLogC(basfc,appId,appKey,new Date(Long.valueOf(timeStamp)))); | 58 | IClearApiLog saveIClearApiLogResult = iClearApiLogService.saveIClearApiLog(iClearApiLogService.convertToIClearApiLogC(basfc,appId,appKey,new Date(Long.valueOf(timeStamp)))); |
| 56 | 59 | ||
| 57 | basfc.setAppId(appId); | 60 | basfc.setAppId(appId); |
| 58 | - Mawb saveMawbBasfResult = null; | 61 | + BasfMawb saveMawbBasfResult = null; |
| 59 | if(!Objects.equals(saveIClearApiLogResult,null)){ | 62 | if(!Objects.equals(saveIClearApiLogResult,null)){ |
| 60 | log.info("请求保存成功,msgId:"+saveIClearApiLogResult.getMsgId()); | 63 | log.info("请求保存成功,msgId:"+saveIClearApiLogResult.getMsgId()); |
| 61 | basfc.setMsgId(saveIClearApiLogResult.getMsgId()); | 64 | basfc.setMsgId(saveIClearApiLogResult.getMsgId()); |
| ... | @@ -93,7 +96,7 @@ public class BasfDataInterface { | ... | @@ -93,7 +96,7 @@ public class BasfDataInterface { |
| 93 | 96 | ||
| 94 | //4、保存运单到iclear中 | 97 | //4、保存运单到iclear中 |
| 95 | sw.start("processChmConsignment"); | 98 | sw.start("processChmConsignment"); |
| 96 | - result = chmConsignmentService.processChmConsignment(saveMawbBasfResult, timeStamp,appId); | 99 | + result = chmConsignmentService.processChmConsignmentBasf(saveMawbBasfResult, timeStamp,appId); |
| 97 | if(!result.getSuccess()){ | 100 | if(!result.getSuccess()){ |
| 98 | return result; | 101 | return result; |
| 99 | } | 102 | } | ... | ... |
| ... | @@ -42,12 +42,10 @@ public class BasfMawb implements Serializable { | ... | @@ -42,12 +42,10 @@ public class BasfMawb implements Serializable { |
| 42 | 42 | ||
| 43 | 43 | ||
| 44 | @ApiModelProperty(value = "进出口标志", name = "IEFlag", example = "固定值:E") | 44 | @ApiModelProperty(value = "进出口标志", name = "IEFlag", example = "固定值:E") |
| 45 | - @NotBlank(message="参数ieFlag不能为空", groups = {MawbAdd.class}) | ||
| 46 | @Column(name = "IEFLAG") | 45 | @Column(name = "IEFLAG") |
| 47 | private String ieFlag; | 46 | private String ieFlag; |
| 48 | 47 | ||
| 49 | @ApiModelProperty(value = "报关类型", name = "Type", example = "固定值:EX") | 48 | @ApiModelProperty(value = "报关类型", name = "Type", example = "固定值:EX") |
| 50 | - @NotBlank(message="参数type不能为空", groups = {MawbAdd.class}) | ||
| 51 | @Column(name = "TYPE") | 49 | @Column(name = "TYPE") |
| 52 | private String type; | 50 | private String type; |
| 53 | 51 | ||
| ... | @@ -62,7 +60,6 @@ public class BasfMawb implements Serializable { | ... | @@ -62,7 +60,6 @@ public class BasfMawb implements Serializable { |
| 62 | private String agentName; | 60 | private String agentName; |
| 63 | 61 | ||
| 64 | @ApiModelProperty(value = "提单号", name = "billNo", example = "固定值:有总单号则取值‘总单号_运单号‘,没有总单号则取值‘运单号‘") | 62 | @ApiModelProperty(value = "提单号", name = "billNo", example = "固定值:有总单号则取值‘总单号_运单号‘,没有总单号则取值‘运单号‘") |
| 65 | - @NotBlank(message="参数billNo不能为空") | ||
| 66 | @Column(name = "BILLNO") | 63 | @Column(name = "BILLNO") |
| 67 | private String billNo; | 64 | private String billNo; |
| 68 | 65 | ||
| ... | @@ -71,12 +68,10 @@ public class BasfMawb implements Serializable { | ... | @@ -71,12 +68,10 @@ public class BasfMawb implements Serializable { |
| 71 | private String contrNo; | 68 | private String contrNo; |
| 72 | 69 | ||
| 73 | @ApiModelProperty(value = "主管海关(申报地海关)", name = "customMaster", example = "固定值:0101") | 70 | @ApiModelProperty(value = "主管海关(申报地海关)", name = "customMaster", example = "固定值:0101") |
| 74 | - @NotBlank(message="参数customMaster不能为空", groups = {MawbAdd.class}) | ||
| 75 | @Column(name = "CUSTOMMASTER") | 71 | @Column(name = "CUSTOMMASTER") |
| 76 | private String customMaster; | 72 | private String customMaster; |
| 77 | 73 | ||
| 78 | @ApiModelProperty(value = "征免性质", name = "cutMode", example = "101") | 74 | @ApiModelProperty(value = "征免性质", name = "cutMode", example = "101") |
| 79 | - @NotBlank(message="参数cutMode不能为空", groups = {MawbAdd.class}) | ||
| 80 | @Column(name = "CUTMODE") | 75 | @Column(name = "CUTMODE") |
| 81 | private String cutMode; | 76 | private String cutMode; |
| 82 | 77 | ||
| ... | @@ -86,12 +81,10 @@ public class BasfMawb implements Serializable { | ... | @@ -86,12 +81,10 @@ public class BasfMawb implements Serializable { |
| 86 | private String declTrnRel; | 81 | private String declTrnRel; |
| 87 | 82 | ||
| 88 | @ApiModelProperty(value = "经停港/指运港", name = "distinatePort", example = "ASM000") | 83 | @ApiModelProperty(value = "经停港/指运港", name = "distinatePort", example = "ASM000") |
| 89 | - @NotBlank(message="参数distinatePort不能为空", groups = {MawbAdd.class}) | ||
| 90 | @Column(name = "DISTINATEPORT") | 84 | @Column(name = "DISTINATEPORT") |
| 91 | private String distinatePort; | 85 | private String distinatePort; |
| 92 | 86 | ||
| 93 | @ApiModelProperty(value = "报关标志", name = "EdiId", example = "001") | 87 | @ApiModelProperty(value = "报关标志", name = "EdiId", example = "001") |
| 94 | - @NotBlank(message="参数ediId不能为空", groups = {MawbAdd.class}) | ||
| 95 | @Column(name = "EDIID") | 88 | @Column(name = "EDIID") |
| 96 | private String ediId; | 89 | private String ediId; |
| 97 | 90 | ||
| ... | @@ -100,27 +93,22 @@ public class BasfMawb implements Serializable { | ... | @@ -100,27 +93,22 @@ public class BasfMawb implements Serializable { |
| 100 | private String entryId; | 93 | private String entryId; |
| 101 | 94 | ||
| 102 | @ApiModelProperty(value = "运费币制", name = "feeCurr", example = "固定值:3") | 95 | @ApiModelProperty(value = "运费币制", name = "feeCurr", example = "固定值:3") |
| 103 | - @NotBlank(message="参数feeCurr不能为空", groups = {MawbAdd.class}) | ||
| 104 | @Column(name = "FEECURR") | 96 | @Column(name = "FEECURR") |
| 105 | private String feeCurr; | 97 | private String feeCurr; |
| 106 | 98 | ||
| 107 | @ApiModelProperty(value = "运费标记", name = "feeMark", example = "99.22") | 99 | @ApiModelProperty(value = "运费标记", name = "feeMark", example = "99.22") |
| 108 | - @NotBlank(message="参数feeMark不能为空", groups = {MawbAdd.class}) | ||
| 109 | @Column(name = "FEEMARK") | 100 | @Column(name = "FEEMARK") |
| 110 | private String feeMark; | 101 | private String feeMark; |
| 111 | 102 | ||
| 112 | @ApiModelProperty(value = "运费/率", name = "feeRate", example = "43.34358") | 103 | @ApiModelProperty(value = "运费/率", name = "feeRate", example = "43.34358") |
| 113 | - @NotNull(message="参数feeRate不能为空", groups = {MawbAdd.class}) | ||
| 114 | @Column(name = "FEERATE") | 104 | @Column(name = "FEERATE") |
| 115 | private BigDecimal feeRate; | 105 | private BigDecimal feeRate; |
| 116 | 106 | ||
| 117 | @ApiModelProperty(value = "毛重", name = "grossWet", example = "") | 107 | @ApiModelProperty(value = "毛重", name = "grossWet", example = "") |
| 118 | - @NotNull(message="参数grossWet不能为空", groups = {MawbAdd.class}) | ||
| 119 | @Column(name = "CROSSWET") | 108 | @Column(name = "CROSSWET") |
| 120 | private BigDecimal grossWet; | 109 | private BigDecimal grossWet; |
| 121 | 110 | ||
| 122 | @ApiModelProperty(value = "出入境关闭", name = "IEPort", example = "固定值:0101") | 111 | @ApiModelProperty(value = "出入境关闭", name = "IEPort", example = "固定值:0101") |
| 123 | - @NotBlank(message="参数iePort不能为空", groups = {MawbAdd.class}) | ||
| 124 | @Column(name = "IEPORT") | 112 | @Column(name = "IEPORT") |
| 125 | private String iePort; | 113 | private String iePort; |
| 126 | 114 | ||
| ... | @@ -129,7 +117,6 @@ public class BasfMawb implements Serializable { | ... | @@ -129,7 +117,6 @@ public class BasfMawb implements Serializable { |
| 129 | private String inputerName; | 117 | private String inputerName; |
| 130 | 118 | ||
| 131 | @ApiModelProperty(value = "保险费币制", name = "insurCurr", example = "MOP") | 119 | @ApiModelProperty(value = "保险费币制", name = "insurCurr", example = "MOP") |
| 132 | - @NotBlank(message="参数insurCurr不能为空", groups = {MawbAdd.class}) | ||
| 133 | @Column(name = "INSURCURR") | 120 | @Column(name = "INSURCURR") |
| 134 | private String insurCurr; | 121 | private String insurCurr; |
| 135 | 122 | ||
| ... | @@ -138,7 +125,6 @@ public class BasfMawb implements Serializable { | ... | @@ -138,7 +125,6 @@ public class BasfMawb implements Serializable { |
| 138 | private String insurMark; | 125 | private String insurMark; |
| 139 | 126 | ||
| 140 | @ApiModelProperty(value = "保险费/率", name = "insurRate", example = "") | 127 | @ApiModelProperty(value = "保险费/率", name = "insurRate", example = "") |
| 141 | - @NotNull(message="参数insurRate不能为空", groups = {MawbAdd.class}) | ||
| 142 | @Column(name = "INSURRATE") | 128 | @Column(name = "INSURRATE") |
| 143 | private BigDecimal insurRate; | 129 | private BigDecimal insurRate; |
| 144 | 130 | ||
| ... | @@ -147,7 +133,6 @@ public class BasfMawb implements Serializable { | ... | @@ -147,7 +133,6 @@ public class BasfMawb implements Serializable { |
| 147 | private String manualNo; | 133 | private String manualNo; |
| 148 | 134 | ||
| 149 | @ApiModelProperty(value = "净重", name = "netWt", example = "") | 135 | @ApiModelProperty(value = "净重", name = "netWt", example = "") |
| 150 | - @NotNull(message="参数netWt不能为空", groups = {MawbAdd.class}) | ||
| 151 | @Column(name = "NETWT") | 136 | @Column(name = "NETWT") |
| 152 | private BigDecimal netWt; | 137 | private BigDecimal netWt; |
| 153 | 138 | ||
| ... | @@ -164,7 +149,6 @@ public class BasfMawb implements Serializable { | ... | @@ -164,7 +149,6 @@ public class BasfMawb implements Serializable { |
| 164 | private String otherMark; | 149 | private String otherMark; |
| 165 | 150 | ||
| 166 | @ApiModelProperty(value = "消费使用/生产销售单位代码", name = "ownerCode", example = "Z321654987") | 151 | @ApiModelProperty(value = "消费使用/生产销售单位代码", name = "ownerCode", example = "Z321654987") |
| 167 | - @NotBlank(message="参数ownerCode不能为空", groups = {MawbAdd.class}) | ||
| 168 | @Column(name = "OWNERCODE") | 152 | @Column(name = "OWNERCODE") |
| 169 | private String ownerCode; | 153 | private String ownerCode; |
| 170 | 154 | ||
| ... | @@ -174,7 +158,6 @@ public class BasfMawb implements Serializable { | ... | @@ -174,7 +158,6 @@ public class BasfMawb implements Serializable { |
| 174 | private String ownerName; | 158 | private String ownerName; |
| 175 | 159 | ||
| 176 | @ApiModelProperty(value = "件数", name = "packNo", example = "") | 160 | @ApiModelProperty(value = "件数", name = "packNo", example = "") |
| 177 | - @NotNull(message="参数packNo不能为空", groups = {MawbAdd.class}) | ||
| 178 | @Column(name = "PACKNO") | 161 | @Column(name = "PACKNO") |
| 179 | private Integer packNo; | 162 | private Integer packNo; |
| 180 | 163 | ||
| ... | @@ -182,52 +165,42 @@ public class BasfMawb implements Serializable { | ... | @@ -182,52 +165,42 @@ public class BasfMawb implements Serializable { |
| 182 | private String preEntryId; | 165 | private String preEntryId; |
| 183 | 166 | ||
| 184 | @ApiModelProperty(value = "启运国/运抵国", name = "tradeCountry", example = "USA") | 167 | @ApiModelProperty(value = "启运国/运抵国", name = "tradeCountry", example = "USA") |
| 185 | - @NotBlank(message="参数tradeCountry不能为空", groups = {MawbAdd.class}) | ||
| 186 | @Column(name = "TRADECOUNTRY") | 168 | @Column(name = "TRADECOUNTRY") |
| 187 | private String tradeCountry; | 169 | private String tradeCountry; |
| 188 | 170 | ||
| 189 | @ApiModelProperty(value = "监管方式", name = "tradeMode", example = "0200") | 171 | @ApiModelProperty(value = "监管方式", name = "tradeMode", example = "0200") |
| 190 | - @NotBlank(message="参数tradeMode不能为空", groups = {MawbAdd.class}) | ||
| 191 | @Column(name = "TRADEMODE") | 172 | @Column(name = "TRADEMODE") |
| 192 | private String tradeMode; | 173 | private String tradeMode; |
| 193 | 174 | ||
| 194 | @ApiModelProperty(value = "境内收发货人编号", name = "tradeCode", example = "Z321654987") | 175 | @ApiModelProperty(value = "境内收发货人编号", name = "tradeCode", example = "Z321654987") |
| 195 | - @NotBlank(message="参数tradeCode不能为空") | ||
| 196 | @Column(name = "TRADECODE") | 176 | @Column(name = "TRADECODE") |
| 197 | private String tradeCode; | 177 | private String tradeCode; |
| 198 | 178 | ||
| 199 | @ApiModelProperty(value = "运输方式代码", name = "trafMode", example = "1") | 179 | @ApiModelProperty(value = "运输方式代码", name = "trafMode", example = "1") |
| 200 | - @NotBlank(message="参数trafMode不能为空", groups = {MawbAdd.class}) | ||
| 201 | @Column(name = "TRAFMODE") | 180 | @Column(name = "TRAFMODE") |
| 202 | private String trafMode; | 181 | private String trafMode; |
| 203 | 182 | ||
| 204 | @ApiModelProperty(value = "境内收发货人名称", name = "tradeName", example = "上海铢怡国际货物运输代理有限公司") | 183 | @ApiModelProperty(value = "境内收发货人名称", name = "tradeName", example = "上海铢怡国际货物运输代理有限公司") |
| 205 | - @NotBlank(message="参数tradeName不能为空") | ||
| 206 | @Column(name = "TRADENAME") | 184 | @Column(name = "TRADENAME") |
| 207 | private String tradeName; | 185 | private String tradeName; |
| 208 | 186 | ||
| 209 | @ApiModelProperty(value = "成交方式", name = "transMode", example = "2") | 187 | @ApiModelProperty(value = "成交方式", name = "transMode", example = "2") |
| 210 | - @NotBlank(message="参数transMode不能为空", groups = {MawbAdd.class}) | ||
| 211 | @Column(name = "TRANSMODE") | 188 | @Column(name = "TRANSMODE") |
| 212 | private String transMode; | 189 | private String transMode; |
| 213 | 190 | ||
| 214 | @ApiModelProperty(value = "包装种类", name = "wrapType", example = "22") | 191 | @ApiModelProperty(value = "包装种类", name = "wrapType", example = "22") |
| 215 | - @NotBlank(message="参数wrapType不能为空", groups = {MawbAdd.class}) | ||
| 216 | @Column(name = "WRAPTYPE") | 192 | @Column(name = "WRAPTYPE") |
| 217 | private String wrapType; | 193 | private String wrapType; |
| 218 | 194 | ||
| 219 | @ApiModelProperty(value = "生产核销单位统一信用代码---报关形式类型", name = "TradeCodeScc", example = "A74125896321456987") | 195 | @ApiModelProperty(value = "生产核销单位统一信用代码---报关形式类型", name = "TradeCodeScc", example = "A74125896321456987") |
| 220 | - @NotBlank(message="参数tradeCodeScc不能为空") | ||
| 221 | @Column(name = "TRADECODESCC") | 196 | @Column(name = "TRADECODESCC") |
| 222 | private String tradeCodeScc; | 197 | private String tradeCodeScc; |
| 223 | 198 | ||
| 224 | @ApiModelProperty(value = "消费使用/生产销售单位单位统一编码", name = "ownerCodeScc", example = "") | 199 | @ApiModelProperty(value = "消费使用/生产销售单位单位统一编码", name = "ownerCodeScc", example = "") |
| 225 | - @NotBlank(message="参数ownerCodeScc不能为空", groups = {MawbAdd.class}) | ||
| 226 | @Column(name = "OWNERCODESCC") | 200 | @Column(name = "OWNERCODESCC") |
| 227 | private String ownerCodeScc; | 201 | private String ownerCodeScc; |
| 228 | 202 | ||
| 229 | @ApiModelProperty(value = "贸易国别", name = "tradeAreaCode", example = "") | 203 | @ApiModelProperty(value = "贸易国别", name = "tradeAreaCode", example = "") |
| 230 | - @NotBlank(message="参数tradeAreaCode不能为空", groups = {MawbAdd.class}) | ||
| 231 | @Column(name = "TRADEAREACODE") | 204 | @Column(name = "TRADEAREACODE") |
| 232 | private String tradeAreaCode; | 205 | private String tradeAreaCode; |
| 233 | 206 | ||
| ... | @@ -236,7 +209,6 @@ public class BasfMawb implements Serializable { | ... | @@ -236,7 +209,6 @@ public class BasfMawb implements Serializable { |
| 236 | private String markNo; | 209 | private String markNo; |
| 237 | 210 | ||
| 238 | @ApiModelProperty(value = "入境口岸代码", name = "entyPortCode", example = "固定值:310302") | 211 | @ApiModelProperty(value = "入境口岸代码", name = "entyPortCode", example = "固定值:310302") |
| 239 | - @NotBlank(message="参数entyPortCode不能为空", groups = {MawbAdd.class}) | ||
| 240 | @Column(name = "ENTYPORTCODE") | 212 | @Column(name = "ENTYPORTCODE") |
| 241 | private String entyPortCode; | 213 | private String entyPortCode; |
| 242 | 214 | ||
| ... | @@ -256,7 +228,6 @@ public class BasfMawb implements Serializable { | ... | @@ -256,7 +228,6 @@ public class BasfMawb implements Serializable { |
| 256 | private String overseasConsigneeCode; | 228 | private String overseasConsigneeCode; |
| 257 | 229 | ||
| 258 | @ApiModelProperty(value = "境外收货人名称(外文)", name = "overseasConsigneeEname", example = "") | 230 | @ApiModelProperty(value = "境外收货人名称(外文)", name = "overseasConsigneeEname", example = "") |
| 259 | - @NotBlank(message="参数overseasConsigneeEname不能为空", groups = {MawbAdd.class}) | ||
| 260 | @Column(name = "OVERSEASCONSIGNEEENAME") | 231 | @Column(name = "OVERSEASCONSIGNEEENAME") |
| 261 | private String overseasConsigneeEname; | 232 | private String overseasConsigneeEname; |
| 262 | 233 | ... | ... |
| ... | @@ -49,22 +49,18 @@ public class BasfcDetail { | ... | @@ -49,22 +49,18 @@ public class BasfcDetail { |
| 49 | private String model; | 49 | private String model; |
| 50 | 50 | ||
| 51 | @ApiModelProperty(value = "第一计量单位(法定单位)") | 51 | @ApiModelProperty(value = "第一计量单位(法定单位)") |
| 52 | - @NotBlank(message="参数unitLegalFirst不能为空") | ||
| 53 | @Column(name = "UNITLEGALFIRST") | 52 | @Column(name = "UNITLEGALFIRST") |
| 54 | private String unitLegalFirst; | 53 | private String unitLegalFirst; |
| 55 | 54 | ||
| 56 | @ApiModelProperty(value = "第一法定数量") | 55 | @ApiModelProperty(value = "第一法定数量") |
| 57 | - @NotNull(message="参数qtyLegalFirst不能为空") | ||
| 58 | @Column(name = "QTY_LEGALFIRST") | 56 | @Column(name = "QTY_LEGALFIRST") |
| 59 | private BigDecimal qtyLegalFirst; | 57 | private BigDecimal qtyLegalFirst; |
| 60 | 58 | ||
| 61 | @ApiModelProperty(value = "成交计量单位") | 59 | @ApiModelProperty(value = "成交计量单位") |
| 62 | - @NotBlank(message="参数knockdownUnit不能为空") | ||
| 63 | @Column(name = "KNOCKDOWNUNIT") | 60 | @Column(name = "KNOCKDOWNUNIT") |
| 64 | private String knockdownUnit; | 61 | private String knockdownUnit; |
| 65 | 62 | ||
| 66 | @ApiModelProperty(value = "成交数量") | 63 | @ApiModelProperty(value = "成交数量") |
| 67 | - @NotNull(message="参数knockdownNumber不能为空") | ||
| 68 | @Column(name = "KNOCKDOWNNUMBER") | 64 | @Column(name = "KNOCKDOWNNUMBER") |
| 69 | private BigDecimal knockdownNumber; | 65 | private BigDecimal knockdownNumber; |
| 70 | 66 | ||
| ... | @@ -73,22 +69,18 @@ public class BasfcDetail { | ... | @@ -73,22 +69,18 @@ public class BasfcDetail { |
| 73 | private String unitLegalSecond; | 69 | private String unitLegalSecond; |
| 74 | 70 | ||
| 75 | @ApiModelProperty(value = "第二法定数量") | 71 | @ApiModelProperty(value = "第二法定数量") |
| 76 | - @NotNull(message="参数qtyLegalSecond不能为空") | ||
| 77 | @Column(name = "QTYLEGALSECOND") | 72 | @Column(name = "QTYLEGALSECOND") |
| 78 | private BigDecimal qtyLegalSecond; | 73 | private BigDecimal qtyLegalSecond; |
| 79 | 74 | ||
| 80 | @ApiModelProperty(value = "申报金额") | 75 | @ApiModelProperty(value = "申报金额") |
| 81 | - @NotBlank(message = "参数declaredAmount不能为空") | ||
| 82 | @Column(name = "DECLAREDAMOUNT") | 76 | @Column(name = "DECLAREDAMOUNT") |
| 83 | private BigDecimal declaredAmount; | 77 | private BigDecimal declaredAmount; |
| 84 | 78 | ||
| 85 | @ApiModelProperty(value = "币制") | 79 | @ApiModelProperty(value = "币制") |
| 86 | - @NotBlank(message="参数currency不能为空") | ||
| 87 | @Column(name = "CURRENCY") | 80 | @Column(name = "CURRENCY") |
| 88 | private String currency; | 81 | private String currency; |
| 89 | 82 | ||
| 90 | @ApiModelProperty(value = "申报重量") | 83 | @ApiModelProperty(value = "申报重量") |
| 91 | - @NotBlank(message = "参数declaredWeight不能为空") | ||
| 92 | @Column(name = "DECLAREDWEIGHT") | 84 | @Column(name = "DECLAREDWEIGHT") |
| 93 | private BigDecimal declaredWeight; | 85 | private BigDecimal declaredWeight; |
| 94 | } | 86 | } | ... | ... |
| ... | @@ -42,12 +42,12 @@ public class Mawb implements Serializable { | ... | @@ -42,12 +42,12 @@ public class Mawb implements Serializable { |
| 42 | 42 | ||
| 43 | 43 | ||
| 44 | @ApiModelProperty(value = "进出口标志", name = "IEFlag", example = "固定值:E") | 44 | @ApiModelProperty(value = "进出口标志", name = "IEFlag", example = "固定值:E") |
| 45 | - @NotBlank(message="参数ieFlag不能为空", groups = {MawbAdd.class}) | 45 | + @NotBlank(message="参数ieFlag不能为空") |
| 46 | @Column(name = "IEFLAG") | 46 | @Column(name = "IEFLAG") |
| 47 | private String ieFlag; | 47 | private String ieFlag; |
| 48 | 48 | ||
| 49 | @ApiModelProperty(value = "报关类型", name = "Type", example = "固定值:EX") | 49 | @ApiModelProperty(value = "报关类型", name = "Type", example = "固定值:EX") |
| 50 | - @NotBlank(message="参数type不能为空", groups = {MawbAdd.class}) | 50 | + @NotBlank(message="参数type不能为空") |
| 51 | @Column(name = "TYPE") | 51 | @Column(name = "TYPE") |
| 52 | private String type; | 52 | private String type; |
| 53 | 53 | ||
| ... | @@ -71,12 +71,12 @@ public class Mawb implements Serializable { | ... | @@ -71,12 +71,12 @@ public class Mawb implements Serializable { |
| 71 | private String contrNo; | 71 | private String contrNo; |
| 72 | 72 | ||
| 73 | @ApiModelProperty(value = "主管海关(申报地海关)", name = "customMaster", example = "固定值:0101") | 73 | @ApiModelProperty(value = "主管海关(申报地海关)", name = "customMaster", example = "固定值:0101") |
| 74 | - @NotBlank(message="参数customMaster不能为空", groups = {MawbAdd.class}) | 74 | + @NotBlank(message="参数customMaster不能为空") |
| 75 | @Column(name = "CUSTOMMASTER") | 75 | @Column(name = "CUSTOMMASTER") |
| 76 | private String customMaster; | 76 | private String customMaster; |
| 77 | 77 | ||
| 78 | @ApiModelProperty(value = "征免性质", name = "cutMode", example = "101") | 78 | @ApiModelProperty(value = "征免性质", name = "cutMode", example = "101") |
| 79 | - @NotBlank(message="参数cutMode不能为空", groups = {MawbAdd.class}) | 79 | + @NotBlank(message="参数cutMode不能为空") |
| 80 | @Column(name = "CUTMODE") | 80 | @Column(name = "CUTMODE") |
| 81 | private String cutMode; | 81 | private String cutMode; |
| 82 | 82 | ||
| ... | @@ -86,12 +86,12 @@ public class Mawb implements Serializable { | ... | @@ -86,12 +86,12 @@ public class Mawb implements Serializable { |
| 86 | private String declTrnRel; | 86 | private String declTrnRel; |
| 87 | 87 | ||
| 88 | @ApiModelProperty(value = "经停港/指运港", name = "distinatePort", example = "ASM000") | 88 | @ApiModelProperty(value = "经停港/指运港", name = "distinatePort", example = "ASM000") |
| 89 | - @NotBlank(message="参数distinatePort不能为空", groups = {MawbAdd.class}) | 89 | + @NotBlank(message="参数distinatePort不能为空") |
| 90 | @Column(name = "DISTINATEPORT") | 90 | @Column(name = "DISTINATEPORT") |
| 91 | private String distinatePort; | 91 | private String distinatePort; |
| 92 | 92 | ||
| 93 | @ApiModelProperty(value = "报关标志", name = "EdiId", example = "001") | 93 | @ApiModelProperty(value = "报关标志", name = "EdiId", example = "001") |
| 94 | - @NotBlank(message="参数ediId不能为空", groups = {MawbAdd.class}) | 94 | + @NotBlank(message="参数ediId不能为空") |
| 95 | @Column(name = "EDIID") | 95 | @Column(name = "EDIID") |
| 96 | private String ediId; | 96 | private String ediId; |
| 97 | 97 | ||
| ... | @@ -100,27 +100,27 @@ public class Mawb implements Serializable { | ... | @@ -100,27 +100,27 @@ public class Mawb implements Serializable { |
| 100 | private String entryId; | 100 | private String entryId; |
| 101 | 101 | ||
| 102 | @ApiModelProperty(value = "运费币制", name = "feeCurr", example = "固定值:3") | 102 | @ApiModelProperty(value = "运费币制", name = "feeCurr", example = "固定值:3") |
| 103 | - @NotBlank(message="参数feeCurr不能为空", groups = {MawbAdd.class}) | 103 | + @NotBlank(message="参数feeCurr不能为空") |
| 104 | @Column(name = "FEECURR") | 104 | @Column(name = "FEECURR") |
| 105 | private String feeCurr; | 105 | private String feeCurr; |
| 106 | 106 | ||
| 107 | @ApiModelProperty(value = "运费标记", name = "feeMark", example = "99.22") | 107 | @ApiModelProperty(value = "运费标记", name = "feeMark", example = "99.22") |
| 108 | - @NotBlank(message="参数feeMark不能为空", groups = {MawbAdd.class}) | 108 | + @NotBlank(message="参数feeMark不能为空") |
| 109 | @Column(name = "FEEMARK") | 109 | @Column(name = "FEEMARK") |
| 110 | private String feeMark; | 110 | private String feeMark; |
| 111 | 111 | ||
| 112 | @ApiModelProperty(value = "运费/率", name = "feeRate", example = "43.34358") | 112 | @ApiModelProperty(value = "运费/率", name = "feeRate", example = "43.34358") |
| 113 | - @NotNull(message="参数feeRate不能为空", groups = {MawbAdd.class}) | 113 | + @NotNull(message="参数feeRate不能为空") |
| 114 | @Column(name = "FEERATE") | 114 | @Column(name = "FEERATE") |
| 115 | private BigDecimal feeRate; | 115 | private BigDecimal feeRate; |
| 116 | 116 | ||
| 117 | @ApiModelProperty(value = "毛重", name = "grossWet", example = "") | 117 | @ApiModelProperty(value = "毛重", name = "grossWet", example = "") |
| 118 | - @NotNull(message="参数grossWet不能为空", groups = {MawbAdd.class}) | 118 | + @NotNull(message="参数grossWet不能为空") |
| 119 | @Column(name = "CROSSWET") | 119 | @Column(name = "CROSSWET") |
| 120 | private BigDecimal grossWet; | 120 | private BigDecimal grossWet; |
| 121 | 121 | ||
| 122 | @ApiModelProperty(value = "出入境关闭", name = "IEPort", example = "固定值:0101") | 122 | @ApiModelProperty(value = "出入境关闭", name = "IEPort", example = "固定值:0101") |
| 123 | - @NotBlank(message="参数iePort不能为空", groups = {MawbAdd.class}) | 123 | + @NotBlank(message="参数iePort不能为空") |
| 124 | @Column(name = "IEPORT") | 124 | @Column(name = "IEPORT") |
| 125 | private String iePort; | 125 | private String iePort; |
| 126 | 126 | ||
| ... | @@ -129,7 +129,7 @@ public class Mawb implements Serializable { | ... | @@ -129,7 +129,7 @@ public class Mawb implements Serializable { |
| 129 | private String inputerName; | 129 | private String inputerName; |
| 130 | 130 | ||
| 131 | @ApiModelProperty(value = "保险费币制", name = "insurCurr", example = "MOP") | 131 | @ApiModelProperty(value = "保险费币制", name = "insurCurr", example = "MOP") |
| 132 | - @NotBlank(message="参数insurCurr不能为空", groups = {MawbAdd.class}) | 132 | + @NotBlank(message="参数insurCurr不能为空") |
| 133 | @Column(name = "INSURCURR") | 133 | @Column(name = "INSURCURR") |
| 134 | private String insurCurr; | 134 | private String insurCurr; |
| 135 | 135 | ||
| ... | @@ -138,7 +138,7 @@ public class Mawb implements Serializable { | ... | @@ -138,7 +138,7 @@ public class Mawb implements Serializable { |
| 138 | private String insurMark; | 138 | private String insurMark; |
| 139 | 139 | ||
| 140 | @ApiModelProperty(value = "保险费/率", name = "insurRate", example = "") | 140 | @ApiModelProperty(value = "保险费/率", name = "insurRate", example = "") |
| 141 | - @NotNull(message="参数insurRate不能为空", groups = {MawbAdd.class}) | 141 | + @NotNull(message="参数insurRate不能为空") |
| 142 | @Column(name = "INSURRATE") | 142 | @Column(name = "INSURRATE") |
| 143 | private BigDecimal insurRate; | 143 | private BigDecimal insurRate; |
| 144 | 144 | ||
| ... | @@ -147,7 +147,7 @@ public class Mawb implements Serializable { | ... | @@ -147,7 +147,7 @@ public class Mawb implements Serializable { |
| 147 | private String manualNo; | 147 | private String manualNo; |
| 148 | 148 | ||
| 149 | @ApiModelProperty(value = "净重", name = "netWt", example = "") | 149 | @ApiModelProperty(value = "净重", name = "netWt", example = "") |
| 150 | - @NotNull(message="参数netWt不能为空", groups = {MawbAdd.class}) | 150 | + @NotNull(message="参数netWt不能为空") |
| 151 | @Column(name = "NETWT") | 151 | @Column(name = "NETWT") |
| 152 | private BigDecimal netWt; | 152 | private BigDecimal netWt; |
| 153 | 153 | ||
| ... | @@ -164,17 +164,17 @@ public class Mawb implements Serializable { | ... | @@ -164,17 +164,17 @@ public class Mawb implements Serializable { |
| 164 | private String otherMark; | 164 | private String otherMark; |
| 165 | 165 | ||
| 166 | @ApiModelProperty(value = "消费使用/生产销售单位代码", name = "ownerCode", example = "Z321654987") | 166 | @ApiModelProperty(value = "消费使用/生产销售单位代码", name = "ownerCode", example = "Z321654987") |
| 167 | - @NotBlank(message="参数ownerCode不能为空", groups = {MawbAdd.class}) | 167 | + @NotBlank(message="参数ownerCode不能为空") |
| 168 | @Column(name = "OWNERCODE") | 168 | @Column(name = "OWNERCODE") |
| 169 | private String ownerCode; | 169 | private String ownerCode; |
| 170 | 170 | ||
| 171 | @ApiModelProperty(value = "消费使用/生产销售单位名称", name = "ownerName", example = "上海保险") | 171 | @ApiModelProperty(value = "消费使用/生产销售单位名称", name = "ownerName", example = "上海保险") |
| 172 | - @NotBlank(message="参数ownerName不能为空", groups = {MawbAdd.class}) | 172 | + @NotBlank(message="参数ownerName不能为空") |
| 173 | @Column(name = "OWNERNAME") | 173 | @Column(name = "OWNERNAME") |
| 174 | private String ownerName; | 174 | private String ownerName; |
| 175 | 175 | ||
| 176 | @ApiModelProperty(value = "件数", name = "packNo", example = "") | 176 | @ApiModelProperty(value = "件数", name = "packNo", example = "") |
| 177 | - @NotNull(message="参数packNo不能为空", groups = {MawbAdd.class}) | 177 | + @NotNull(message="参数packNo不能为空") |
| 178 | @Column(name = "PACKNO") | 178 | @Column(name = "PACKNO") |
| 179 | private Integer packNo; | 179 | private Integer packNo; |
| 180 | 180 | ||
| ... | @@ -182,12 +182,12 @@ public class Mawb implements Serializable { | ... | @@ -182,12 +182,12 @@ public class Mawb implements Serializable { |
| 182 | private String preEntryId; | 182 | private String preEntryId; |
| 183 | 183 | ||
| 184 | @ApiModelProperty(value = "启运国/运抵国", name = "tradeCountry", example = "USA") | 184 | @ApiModelProperty(value = "启运国/运抵国", name = "tradeCountry", example = "USA") |
| 185 | - @NotBlank(message="参数tradeCountry不能为空", groups = {MawbAdd.class}) | 185 | + @NotBlank(message="参数tradeCountry不能为空") |
| 186 | @Column(name = "TRADECOUNTRY") | 186 | @Column(name = "TRADECOUNTRY") |
| 187 | private String tradeCountry; | 187 | private String tradeCountry; |
| 188 | 188 | ||
| 189 | @ApiModelProperty(value = "监管方式", name = "tradeMode", example = "0200") | 189 | @ApiModelProperty(value = "监管方式", name = "tradeMode", example = "0200") |
| 190 | - @NotBlank(message="参数tradeMode不能为空", groups = {MawbAdd.class}) | 190 | + @NotBlank(message="参数tradeMode不能为空") |
| 191 | @Column(name = "TRADEMODE") | 191 | @Column(name = "TRADEMODE") |
| 192 | private String tradeMode; | 192 | private String tradeMode; |
| 193 | 193 | ||
| ... | @@ -197,7 +197,7 @@ public class Mawb implements Serializable { | ... | @@ -197,7 +197,7 @@ public class Mawb implements Serializable { |
| 197 | private String tradeCode; | 197 | private String tradeCode; |
| 198 | 198 | ||
| 199 | @ApiModelProperty(value = "运输方式代码", name = "trafMode", example = "1") | 199 | @ApiModelProperty(value = "运输方式代码", name = "trafMode", example = "1") |
| 200 | - @NotBlank(message="参数trafMode不能为空", groups = {MawbAdd.class}) | 200 | + @NotBlank(message="参数trafMode不能为空") |
| 201 | @Column(name = "TRAFMODE") | 201 | @Column(name = "TRAFMODE") |
| 202 | private String trafMode; | 202 | private String trafMode; |
| 203 | 203 | ||
| ... | @@ -207,12 +207,12 @@ public class Mawb implements Serializable { | ... | @@ -207,12 +207,12 @@ public class Mawb implements Serializable { |
| 207 | private String tradeName; | 207 | private String tradeName; |
| 208 | 208 | ||
| 209 | @ApiModelProperty(value = "成交方式", name = "transMode", example = "2") | 209 | @ApiModelProperty(value = "成交方式", name = "transMode", example = "2") |
| 210 | - @NotBlank(message="参数transMode不能为空", groups = {MawbAdd.class}) | 210 | + @NotBlank(message="参数transMode不能为空") |
| 211 | @Column(name = "TRANSMODE") | 211 | @Column(name = "TRANSMODE") |
| 212 | private String transMode; | 212 | private String transMode; |
| 213 | 213 | ||
| 214 | @ApiModelProperty(value = "包装种类", name = "wrapType", example = "22") | 214 | @ApiModelProperty(value = "包装种类", name = "wrapType", example = "22") |
| 215 | - @NotBlank(message="参数wrapType不能为空", groups = {MawbAdd.class}) | 215 | + @NotBlank(message="参数wrapType不能为空") |
| 216 | @Column(name = "WRAPTYPE") | 216 | @Column(name = "WRAPTYPE") |
| 217 | private String wrapType; | 217 | private String wrapType; |
| 218 | 218 | ||
| ... | @@ -222,12 +222,12 @@ public class Mawb implements Serializable { | ... | @@ -222,12 +222,12 @@ public class Mawb implements Serializable { |
| 222 | private String tradeCodeScc; | 222 | private String tradeCodeScc; |
| 223 | 223 | ||
| 224 | @ApiModelProperty(value = "消费使用/生产销售单位单位统一编码", name = "ownerCodeScc", example = "") | 224 | @ApiModelProperty(value = "消费使用/生产销售单位单位统一编码", name = "ownerCodeScc", example = "") |
| 225 | - @NotBlank(message="参数ownerCodeScc不能为空", groups = {MawbAdd.class}) | 225 | + @NotBlank(message="参数ownerCodeScc不能为空") |
| 226 | @Column(name = "OWNERCODESCC") | 226 | @Column(name = "OWNERCODESCC") |
| 227 | private String ownerCodeScc; | 227 | private String ownerCodeScc; |
| 228 | 228 | ||
| 229 | @ApiModelProperty(value = "贸易国别", name = "tradeAreaCode", example = "") | 229 | @ApiModelProperty(value = "贸易国别", name = "tradeAreaCode", example = "") |
| 230 | - @NotBlank(message="参数tradeAreaCode不能为空", groups = {MawbAdd.class}) | 230 | + @NotBlank(message="参数tradeAreaCode不能为空") |
| 231 | @Column(name = "TRADEAREACODE") | 231 | @Column(name = "TRADEAREACODE") |
| 232 | private String tradeAreaCode; | 232 | private String tradeAreaCode; |
| 233 | 233 | ||
| ... | @@ -236,7 +236,7 @@ public class Mawb implements Serializable { | ... | @@ -236,7 +236,7 @@ public class Mawb implements Serializable { |
| 236 | private String markNo; | 236 | private String markNo; |
| 237 | 237 | ||
| 238 | @ApiModelProperty(value = "入境口岸代码", name = "entyPortCode", example = "固定值:310302") | 238 | @ApiModelProperty(value = "入境口岸代码", name = "entyPortCode", example = "固定值:310302") |
| 239 | - @NotBlank(message="参数entyPortCode不能为空", groups = {MawbAdd.class}) | 239 | + @NotBlank(message="参数entyPortCode不能为空") |
| 240 | @Column(name = "ENTYPORTCODE") | 240 | @Column(name = "ENTYPORTCODE") |
| 241 | private String entyPortCode; | 241 | private String entyPortCode; |
| 242 | 242 | ||
| ... | @@ -256,7 +256,7 @@ public class Mawb implements Serializable { | ... | @@ -256,7 +256,7 @@ public class Mawb implements Serializable { |
| 256 | private String overseasConsigneeCode; | 256 | private String overseasConsigneeCode; |
| 257 | 257 | ||
| 258 | @ApiModelProperty(value = "境外收货人名称(外文)", name = "overseasConsigneeEname", example = "") | 258 | @ApiModelProperty(value = "境外收货人名称(外文)", name = "overseasConsigneeEname", example = "") |
| 259 | - @NotBlank(message="参数overseasConsigneeEname不能为空", groups = {MawbAdd.class}) | 259 | + @NotBlank(message="参数overseasConsigneeEname不能为空") |
| 260 | @Column(name = "OVERSEASCONSIGNEEENAME") | 260 | @Column(name = "OVERSEASCONSIGNEEENAME") |
| 261 | private String overseasConsigneeEname; | 261 | private String overseasConsigneeEname; |
| 262 | 262 | ... | ... |
| ... | @@ -47,7 +47,7 @@ public class MawbDetail implements Serializable{ | ... | @@ -47,7 +47,7 @@ public class MawbDetail implements Serializable{ |
| 47 | private String codeTS; | 47 | private String codeTS; |
| 48 | 48 | ||
| 49 | @ApiModelProperty(value = "申报单价", example = "空值") | 49 | @ApiModelProperty(value = "申报单价", example = "空值") |
| 50 | - @NotNull(message="参数declPrice不能为空", groups = {MawbAdd.class}) | 50 | + @NotNull(message="参数declPrice不能为空") |
| 51 | @Column(name = "DECLPRICE") | 51 | @Column(name = "DECLPRICE") |
| 52 | private BigDecimal declPrice; | 52 | private BigDecimal declPrice; |
| 53 | 53 | ||
| ... | @@ -57,7 +57,7 @@ public class MawbDetail implements Serializable{ | ... | @@ -57,7 +57,7 @@ public class MawbDetail implements Serializable{ |
| 57 | private BigDecimal declTotal; | 57 | private BigDecimal declTotal; |
| 58 | 58 | ||
| 59 | @ApiModelProperty(value = "征免方式") | 59 | @ApiModelProperty(value = "征免方式") |
| 60 | - @NotBlank(message="参数dutyMode不能为空", groups = {MawbAdd.class}) | 60 | + @NotBlank(message="参数dutyMode不能为空") |
| 61 | @Column(name = "DUTYMODE") | 61 | @Column(name = "DUTYMODE") |
| 62 | private String dutyMode; | 62 | private String dutyMode; |
| 63 | 63 | ||
| ... | @@ -95,7 +95,7 @@ public class MawbDetail implements Serializable{ | ... | @@ -95,7 +95,7 @@ public class MawbDetail implements Serializable{ |
| 95 | private String gname; | 95 | private String gname; |
| 96 | 96 | ||
| 97 | @ApiModelProperty(value = "商品序号") | 97 | @ApiModelProperty(value = "商品序号") |
| 98 | - @NotBlank(message="参数gno不能为空", groups = {MawbAdd.class}) | 98 | + @NotBlank(message="参数gno不能为空") |
| 99 | @Column(name = "GNO") | 99 | @Column(name = "GNO") |
| 100 | private String gno; | 100 | private String gno; |
| 101 | 101 | ||
| ... | @@ -105,7 +105,7 @@ public class MawbDetail implements Serializable{ | ... | @@ -105,7 +105,7 @@ public class MawbDetail implements Serializable{ |
| 105 | private BigDecimal gqty; | 105 | private BigDecimal gqty; |
| 106 | 106 | ||
| 107 | @ApiModelProperty(value = "原产国") | 107 | @ApiModelProperty(value = "原产国") |
| 108 | - @NotBlank(message="参数originCountry不能为空", groups = {MawbAdd.class}) | 108 | + @NotBlank(message="参数originCountry不能为空") |
| 109 | @Column(name = "ORIGINCURRENTY") | 109 | @Column(name = "ORIGINCURRENTY") |
| 110 | private String originCountry; | 110 | private String originCountry; |
| 111 | 111 | ||
| ... | @@ -136,7 +136,7 @@ public class MawbDetail implements Serializable{ | ... | @@ -136,7 +136,7 @@ public class MawbDetail implements Serializable{ |
| 136 | private String ciqCode; | 136 | private String ciqCode; |
| 137 | 137 | ||
| 138 | @ApiModelProperty(value = "最终目的国(地区)") | 138 | @ApiModelProperty(value = "最终目的国(地区)") |
| 139 | - @NotBlank(message="参数destinationCountry不能为空", groups = {MawbAdd.class}) | 139 | + @NotBlank(message="参数destinationCountry不能为空") |
| 140 | @Column(name = "DESTINATIONCOUNTRY") | 140 | @Column(name = "DESTINATIONCOUNTRY") |
| 141 | private String destinationCountry; | 141 | private String destinationCountry; |
| 142 | 142 | ||
| ... | @@ -149,7 +149,7 @@ public class MawbDetail implements Serializable{ | ... | @@ -149,7 +149,7 @@ public class MawbDetail implements Serializable{ |
| 149 | private String destCode; | 149 | private String destCode; |
| 150 | 150 | ||
| 151 | @ApiModelProperty(value = "境内目的地/境内货源地") | 151 | @ApiModelProperty(value = "境内目的地/境内货源地") |
| 152 | - @NotBlank(message="参数districtCode不能为空", groups = {MawbAdd.class}) | 152 | + @NotBlank(message="参数districtCode不能为空") |
| 153 | @Column(name = "DISTRICTCODE") | 153 | @Column(name = "DISTRICTCODE") |
| 154 | private String districtCode; | 154 | private String districtCode; |
| 155 | 155 | ... | ... |
| ... | @@ -23,33 +23,33 @@ public class BasfService { | ... | @@ -23,33 +23,33 @@ public class BasfService { |
| 23 | * 保存主单Request --basfc | 23 | * 保存主单Request --basfc |
| 24 | * @param basfc | 24 | * @param basfc |
| 25 | */ | 25 | */ |
| 26 | - public Mawb saveMawbBasf(Basfc basfc){ | 26 | + public BasfMawb saveMawbBasf(Basfc basfc){ |
| 27 | - Mawb result=null; | 27 | + BasfMawb result=null; |
| 28 | try{ | 28 | try{ |
| 29 | log.info("saveMawb start>>>>>>>>>>>"); | 29 | log.info("saveMawb start>>>>>>>>>>>"); |
| 30 | //运单头部信息 | 30 | //运单头部信息 |
| 31 | - BasfMawb mawb = new BasfMawb(); | 31 | + BasfMawb basfMawb = new BasfMawb(); |
| 32 | - mawb.setAppId(basfc.getAppId()); | 32 | + basfMawb.setAppId(basfc.getAppId()); |
| 33 | - mawb.setMsgId(basfc.getMsgId()); | 33 | + basfMawb.setMsgId(basfc.getMsgId()); |
| 34 | - mawb.setConsignmentCodeId(basfc.getConsignmentId()); | 34 | + basfMawb.setConsignmentCodeId(basfc.getConsignmentId()); |
| 35 | - mawb.setType(basfc.getConsType()); | 35 | + basfMawb.setType(basfc.getConsType()); |
| 36 | //TODO 记录时为同一张表,用 '-->' 记录具体存放字段(方便查看,以免误解) | 36 | //TODO 记录时为同一张表,用 '-->' 记录具体存放字段(方便查看,以免误解) |
| 37 | //运单号-->提单号 | 37 | //运单号-->提单号 |
| 38 | - mawb.setBillNo(basfc.getConsignmentCode()); | 38 | + basfMawb.setBillNo(basfc.getConsignmentCode()); |
| 39 | //经营单位 --> 消费使用/生产销售单位名称 | 39 | //经营单位 --> 消费使用/生产销售单位名称 |
| 40 | - mawb.setOwnerName(basfc.getOperateUnitName()); | 40 | + basfMawb.setOwnerName(basfc.getOperateUnitName()); |
| 41 | //经营单位海关编码 --> 消费使用/生产销售单位代码 | 41 | //经营单位海关编码 --> 消费使用/生产销售单位代码 |
| 42 | - mawb.setOwnerCode(basfc.getOperateUnitCode()); | 42 | + basfMawb.setOwnerCode(basfc.getOperateUnitCode()); |
| 43 | //经营单位社会信用证代码 --> 消费使用/生产销售单位单位统一编码 | 43 | //经营单位社会信用证代码 --> 消费使用/生产销售单位单位统一编码 |
| 44 | - mawb.setOwnerCodeScc(basfc.getOperateSCC()); | 44 | + basfMawb.setOwnerCodeScc(basfc.getOperateSCC()); |
| 45 | //发件人 --> 境内收发货人名称 | 45 | //发件人 --> 境内收发货人名称 |
| 46 | - mawb.setTradeName(basfc.getSender()); | 46 | + basfMawb.setTradeName(basfc.getSender()); |
| 47 | //发件人海关编码 --> 境内收发货人编号 | 47 | //发件人海关编码 --> 境内收发货人编号 |
| 48 | - mawb.setTradeCode(basfc.getShipperCustomsCode()); | 48 | + basfMawb.setTradeCode(basfc.getShipperCustomsCode()); |
| 49 | //发件人社会信用证代码 --> 生产核销单位统一信用代码---报关形式类型 | 49 | //发件人社会信用证代码 --> 生产核销单位统一信用代码---报关形式类型 |
| 50 | - mawb.setTradeCodeScc(basfc.getShipperSCC()); | 50 | + basfMawb.setTradeCodeScc(basfc.getShipperSCC()); |
| 51 | 51 | ||
| 52 | - mawb.setEANNo(basfc.getEANNo()); | 52 | + basfMawb.setEANNo(basfc.getEANNo()); |
| 53 | //明细 | 53 | //明细 |
| 54 | List<MawbDetail> mawbDetailList = new ArrayList<>(); | 54 | List<MawbDetail> mawbDetailList = new ArrayList<>(); |
| 55 | if (basfc.getBasfcDetailList().size()>0){ | 55 | if (basfc.getBasfcDetailList().size()>0){ |
| ... | @@ -71,8 +71,8 @@ public class BasfService { | ... | @@ -71,8 +71,8 @@ public class BasfService { |
| 71 | mawbDetailList.add(mawbDetail); | 71 | mawbDetailList.add(mawbDetail); |
| 72 | } | 72 | } |
| 73 | } | 73 | } |
| 74 | - mawb.setMawbDetailList(mawbDetailList); | 74 | + basfMawb.setMawbDetailList(mawbDetailList); |
| 75 | - result = basfMawbRepository.save(mawb); | 75 | + result = basfMawbRepository.save(basfMawb); |
| 76 | log.info("saveMawb end>>>>>>>>>>>"); | 76 | log.info("saveMawb end>>>>>>>>>>>"); |
| 77 | }catch (Exception e){ | 77 | }catch (Exception e){ |
| 78 | log.error("saveMawb() error:"+e.getMessage()); | 78 | log.error("saveMawb() error:"+e.getMessage()); | ... | ... |
| 1 | package com.erry.iclear.dateInterface.service; | 1 | package com.erry.iclear.dateInterface.service; |
| 2 | 2 | ||
| 3 | //import cn.hutool.core.date.DateUtil; | 3 | //import cn.hutool.core.date.DateUtil; |
| 4 | +import com.erry.iclear.dateInterface.api.request.BasfMawb; | ||
| 4 | import com.erry.iclear.dateInterface.api.request.Mawb; | 5 | import com.erry.iclear.dateInterface.api.request.Mawb; |
| 5 | import com.erry.iclear.dateInterface.api.response.ResultRS; | 6 | import com.erry.iclear.dateInterface.api.response.ResultRS; |
| 6 | import com.erry.iclear.dateInterface.common.Constant; | 7 | import com.erry.iclear.dateInterface.common.Constant; |
| ... | @@ -224,7 +225,7 @@ public class ChmConsignmentService { | ... | @@ -224,7 +225,7 @@ public class ChmConsignmentService { |
| 224 | return result; | 225 | return result; |
| 225 | } | 226 | } |
| 226 | 227 | ||
| 227 | - public ChmConsignment convertToChmConsignmentBasf(Mawb mawb,Date pushTime,String creator){ | 228 | + public ChmConsignment convertToChmConsignmentBasf(BasfMawb mawb,Date pushTime,String creator){ |
| 228 | ChmConsignment result = new ChmConsignment(); | 229 | ChmConsignment result = new ChmConsignment(); |
| 229 | try{ | 230 | try{ |
| 230 | //运单号 | 231 | //运单号 |
| ... | @@ -467,29 +468,16 @@ public class ChmConsignmentService { | ... | @@ -467,29 +468,16 @@ public class ChmConsignmentService { |
| 467 | ResultRS result = new ResultRS(Boolean.FALSE,null,null); | 468 | ResultRS result = new ResultRS(Boolean.FALSE,null,null); |
| 468 | try { | 469 | try { |
| 469 | Date pushTime = DateUtils.timeStampToDate(Long.valueOf(timeStamp)); | 470 | Date pushTime = DateUtils.timeStampToDate(Long.valueOf(timeStamp)); |
| 470 | - ChmConsignment chmConsignment = null; | 471 | + ChmConsignment chmConsignment=this.convertToChmConsignment(mawb,pushTime,creator); |
| 471 | - //1、将请求转换为运单 | ||
| 472 | - if(mawb.getType().equals(Constant.MSG_TYPE_C)){ | ||
| 473 | - chmConsignment=this.convertToChmConsignmentBasf(mawb,pushTime,creator); | ||
| 474 | - }else{ | ||
| 475 | - chmConsignment=this.convertToChmConsignment(mawb,pushTime,creator); | ||
| 476 | - } | ||
| 477 | if(Objects.equals(chmConsignment,null)){ | 472 | if(Objects.equals(chmConsignment,null)){ |
| 478 | result.setCode("30001"); | 473 | result.setCode("30001"); |
| 479 | result.setMsg("数据格式不正确"); | 474 | result.setMsg("数据格式不正确"); |
| 480 | return result; | 475 | return result; |
| 481 | } | 476 | } |
| 482 | List<ChmConsignmentDetail> chmConsignmentDetailList = new ArrayList<>(); | 477 | List<ChmConsignmentDetail> chmConsignmentDetailList = new ArrayList<>(); |
| 483 | - ChmConsignment finalChmConsignment = chmConsignment; | 478 | + mawb.getMawbDetailList().forEach(detail ->{ |
| 484 | - if (mawb.getType().equals(Constant.MSG_TYPE_C)){ | 479 | + chmConsignmentDetailList.add(chmConsignmentDetailService.convertToChmConsignmentDetail(detail, chmConsignment)); |
| 485 | - mawb.getMawbDetailList().forEach(detail ->{ | 480 | + }); |
| 486 | - chmConsignmentDetailList.add(chmConsignmentDetailService.convertToChmConsignmentDetailBasf(detail, finalChmConsignment)); | ||
| 487 | - }); | ||
| 488 | - }else { | ||
| 489 | - mawb.getMawbDetailList().forEach(detail ->{ | ||
| 490 | - chmConsignmentDetailList.add(chmConsignmentDetailService.convertToChmConsignmentDetail(detail, finalChmConsignment)); | ||
| 491 | - }); | ||
| 492 | - } | ||
| 493 | chmConsignment.setChmConsignmentDetailList(chmConsignmentDetailList); | 481 | chmConsignment.setChmConsignmentDetailList(chmConsignmentDetailList); |
| 494 | 482 | ||
| 495 | //2、校验 7天+运单 ,如果有数据并且 还未报关就更新,如果数据就插入 | 483 | //2、校验 7天+运单 ,如果有数据并且 还未报关就更新,如果数据就插入 |
| ... | @@ -548,4 +536,83 @@ public class ChmConsignmentService { | ... | @@ -548,4 +536,83 @@ public class ChmConsignmentService { |
| 548 | result.setSuccess(Boolean.TRUE); | 536 | result.setSuccess(Boolean.TRUE); |
| 549 | return result; | 537 | return result; |
| 550 | } | 538 | } |
| 539 | + | ||
| 540 | + /** | ||
| 541 | + * 保存或更新 iclear中的运单信息 | ||
| 542 | + * @param mawb | ||
| 543 | + * @param timeStamp | ||
| 544 | + */ | ||
| 545 | + public ResultRS processChmConsignmentBasf(BasfMawb basfMawb, String timeStamp, String creator) { | ||
| 546 | + ResultRS result = new ResultRS(Boolean.FALSE,null,null); | ||
| 547 | + try { | ||
| 548 | + Date pushTime = DateUtils.timeStampToDate(Long.valueOf(timeStamp)); | ||
| 549 | + ChmConsignment chmConsignment = this.convertToChmConsignmentBasf(basfMawb,pushTime,creator); | ||
| 550 | + if(Objects.equals(chmConsignment,null)){ | ||
| 551 | + result.setCode("30001"); | ||
| 552 | + result.setMsg("数据格式不正确"); | ||
| 553 | + return result; | ||
| 554 | + } | ||
| 555 | + List<ChmConsignmentDetail> chmConsignmentDetailList = new ArrayList<>(); | ||
| 556 | + | ||
| 557 | + basfMawb.getMawbDetailList().forEach(detail ->{ | ||
| 558 | + chmConsignmentDetailList.add(chmConsignmentDetailService.convertToChmConsignmentDetailBasf(detail, chmConsignment)); | ||
| 559 | + }); | ||
| 560 | + chmConsignment.setChmConsignmentDetailList(chmConsignmentDetailList); | ||
| 561 | + | ||
| 562 | + //2、校验 7天+运单 ,如果有数据并且 还未报关就更新,如果数据就插入 | ||
| 563 | + ChmConsignment chmConsignmentDB=this.findChmConsignmentByConsignmentCode(chmConsignment.getConsignmentCode(), DateUtils.addDate(DateUtils.getCurrentDate(),-7)); | ||
| 564 | + | ||
| 565 | + //3、新增或更新 | ||
| 566 | + //新增:如果没有就插入 | ||
| 567 | + if (Objects.equals(chmConsignmentDB,null)){ | ||
| 568 | + log.info("新增主单"+ basfMawb.getBillNo()); | ||
| 569 | + ChmConsignment chmConsignmentSaveResult = this.saveChmConsignment(chmConsignment); | ||
| 570 | + if(!Objects.equals(chmConsignmentSaveResult,null)){ | ||
| 571 | + log.info("主单"+ basfMawb.getBillNo()+" 保存成功,chmConsignmentId:"+chmConsignmentSaveResult.getId()); | ||
| 572 | + }else{ | ||
| 573 | + log.info("主单"+ basfMawb.getBillNo()+" 保存失败"); | ||
| 574 | + result.setCode("30002"); | ||
| 575 | + result.setMsg("主单"+ basfMawb.getBillNo()+" 保存失败"); | ||
| 576 | + return result; | ||
| 577 | + } | ||
| 578 | + //更新: | ||
| 579 | + //如果有数据并且满足条件后才能更新数据 | ||
| 580 | + //条件1、状态为 待申报海关 | ||
| 581 | + //条件2、本次推送时间 > 上次推送的时间 | ||
| 582 | + }else if(!Objects.equals(chmConsignmentDB,null) | ||
| 583 | + && Objects.equals(chmConsignmentDB.getConsStatusDic().getCode(),"transferWaybillStatus_5") | ||
| 584 | + //TODO 提交时需要打开 | ||
| 585 | + && pushTime.getTime()>chmConsignmentDB.getUpdateTime().getTime() | ||
| 586 | + ){ | ||
| 587 | + //更新数据 | ||
| 588 | + log.info("更新主单"+ basfMawb.getBillNo()); | ||
| 589 | + | ||
| 590 | + for(ChmConsignmentDetail newDetail:chmConsignment.getChmConsignmentDetailList()){ | ||
| 591 | + for(ChmConsignmentDetail oldDetail: chmConsignmentDB.getChmConsignmentDetailList()){ | ||
| 592 | + if(Objects.equals(newDetail.getDetailId(),oldDetail.getDetailId())){ | ||
| 593 | + //newDetail.setChmConsignment(chmConsignmentDB); | ||
| 594 | + newDetail.setId(oldDetail.getId()); | ||
| 595 | + } | ||
| 596 | + } | ||
| 597 | + } | ||
| 598 | + | ||
| 599 | + chmConsignment.setId(chmConsignmentDB.getId()); | ||
| 600 | + chmConsignment.setCreateTime(chmConsignmentDB.getCreateTime()); | ||
| 601 | + chmConsignment.setUpdateTime(pushTime); | ||
| 602 | + ChmConsignment updateResult = this.saveChmConsignment(chmConsignment); | ||
| 603 | + if(!Objects.equals(updateResult,null)){ | ||
| 604 | + log.info("主单"+ basfMawb.getBillNo()+" 更新成功,chmConsignmentId:"+updateResult.getId()); | ||
| 605 | + }else{ | ||
| 606 | + log.info("主单"+ basfMawb.getBillNo()+" 更新失败"); | ||
| 607 | + result.setCode("30003"); | ||
| 608 | + result.setMsg("主单"+ basfMawb.getBillNo()+" 更新失败"); | ||
| 609 | + return result; | ||
| 610 | + } | ||
| 611 | + } | ||
| 612 | + }catch (Exception e){ | ||
| 613 | + log.error(""+e.getMessage()); | ||
| 614 | + } | ||
| 615 | + result.setSuccess(Boolean.TRUE); | ||
| 616 | + return result; | ||
| 617 | + } | ||
| 551 | } | 618 | } | ... | ... |
| 1 | package com.erry.iclear.dateInterface; | 1 | package com.erry.iclear.dateInterface; |
| 2 | 2 | ||
| 3 | import com.erry.iclear.dateInterface.api.CustomsDataInterface; | 3 | import com.erry.iclear.dateInterface.api.CustomsDataInterface; |
| 4 | -import com.erry.iclear.dateInterface.api.request.Basfc; | 4 | +import com.erry.iclear.dateInterface.api.request.*; |
| 5 | -import com.erry.iclear.dateInterface.api.request.BasfcDetail; | ||
| 6 | -import com.erry.iclear.dateInterface.api.request.Mawb; | ||
| 7 | -import com.erry.iclear.dateInterface.api.request.MawbDetail; | ||
| 8 | import com.erry.iclear.dateInterface.api.response.ResultRS; | 5 | import com.erry.iclear.dateInterface.api.response.ResultRS; |
| 9 | import com.erry.iclear.dateInterface.repository.MawbAdd; | 6 | import com.erry.iclear.dateInterface.repository.MawbAdd; |
| 7 | +import com.erry.iclear.dateInterface.service.BasfService; | ||
| 10 | import com.erry.iclear.dateInterface.service.ChmConsignmentService; | 8 | import com.erry.iclear.dateInterface.service.ChmConsignmentService; |
| 11 | import com.erry.iclear.dateInterface.service.MawbService; | 9 | import com.erry.iclear.dateInterface.service.MawbService; |
| 12 | import org.junit.Test; | 10 | import org.junit.Test; |
| ... | @@ -28,10 +26,10 @@ public class ChmConsignmentServiceTest extends IClearApiApplicationTests { | ... | @@ -28,10 +26,10 @@ public class ChmConsignmentServiceTest extends IClearApiApplicationTests { |
| 28 | private CustomsDataInterface customsDataInterface; | 26 | private CustomsDataInterface customsDataInterface; |
| 29 | 27 | ||
| 30 | @Autowired | 28 | @Autowired |
| 31 | - private MawbService mawbService; | 29 | + private BasfService mawbService; |
| 32 | 30 | ||
| 33 | 31 | ||
| 34 | - @Test | 32 | + /*@Test |
| 35 | public void testProcessChmConsignment(){ | 33 | public void testProcessChmConsignment(){ |
| 36 | try{ | 34 | try{ |
| 37 | Mawb mawb = this.createNewMawb(); | 35 | Mawb mawb = this.createNewMawb(); |
| ... | @@ -41,16 +39,16 @@ public class ChmConsignmentServiceTest extends IClearApiApplicationTests { | ... | @@ -41,16 +39,16 @@ public class ChmConsignmentServiceTest extends IClearApiApplicationTests { |
| 41 | }catch (Exception e){ | 39 | }catch (Exception e){ |
| 42 | e.printStackTrace(); | 40 | e.printStackTrace(); |
| 43 | } | 41 | } |
| 44 | - } | 42 | + }*/ |
| 45 | 43 | ||
| 46 | @Test | 44 | @Test |
| 47 | public void testProcessChmConsignment1(){ | 45 | public void testProcessChmConsignment1(){ |
| 48 | try{ | 46 | try{ |
| 49 | Basfc basfc = this.createNewBasf(); | 47 | Basfc basfc = this.createNewBasf(); |
| 50 | - Mawb mawb = mawbService.saveMawbBasf(basfc); | 48 | + BasfMawb mawb = mawbService.saveMawbBasf(basfc); |
| 51 | //Basfc basfc = this.createNewBasf(); | 49 | //Basfc basfc = this.createNewBasf(); |
| 52 | String timeStamp = String.valueOf(new Date().getTime()); | 50 | String timeStamp = String.valueOf(new Date().getTime()); |
| 53 | - ResultRS resultRS = chmConsignmentService.processChmConsignment(mawb, timeStamp, "BASF"); | 51 | + ResultRS resultRS = chmConsignmentService.processChmConsignmentBasf(mawb, timeStamp, "BASF"); |
| 54 | System.out.println(resultRS.toString()); | 52 | System.out.println(resultRS.toString()); |
| 55 | }catch (Exception e){ | 53 | }catch (Exception e){ |
| 56 | e.printStackTrace(); | 54 | e.printStackTrace(); |
| ... | @@ -61,7 +59,7 @@ public class ChmConsignmentServiceTest extends IClearApiApplicationTests { | ... | @@ -61,7 +59,7 @@ public class ChmConsignmentServiceTest extends IClearApiApplicationTests { |
| 61 | List<BasfcDetail> basfcDetailList = new ArrayList<>(); | 59 | List<BasfcDetail> basfcDetailList = new ArrayList<>(); |
| 62 | BasfcDetail basfcDetail = new BasfcDetail(); | 60 | BasfcDetail basfcDetail = new BasfcDetail(); |
| 63 | basfcDetail.setConsignmentDetailId("111"); | 61 | basfcDetail.setConsignmentDetailId("111"); |
| 64 | - basfcDetail.setSkuCode(""); | 62 | + basfcDetail.setSkuCode("123456789"); |
| 65 | basfcDetail.setSkuName("测试"); | 63 | basfcDetail.setSkuName("测试"); |
| 66 | basfcDetail.setModel("0|0|1|||||||||"); | 64 | basfcDetail.setModel("0|0|1|||||||||"); |
| 67 | basfcDetail.setUnitLegalFirst("035"); | 65 | basfcDetail.setUnitLegalFirst("035"); |
| ... | @@ -76,7 +74,7 @@ public class ChmConsignmentServiceTest extends IClearApiApplicationTests { | ... | @@ -76,7 +74,7 @@ public class ChmConsignmentServiceTest extends IClearApiApplicationTests { |
| 76 | basfcDetailList.add(basfcDetail); | 74 | basfcDetailList.add(basfcDetail); |
| 77 | 75 | ||
| 78 | Basfc basfc = new Basfc(); | 76 | Basfc basfc = new Basfc(); |
| 79 | - basfc.setConsignmentCode("211015001"); | 77 | + basfc.setConsignmentCode("211015003"); |
| 80 | basfc.setConsignmentId(1L); | 78 | basfc.setConsignmentId(1L); |
| 81 | basfc.setConsType("C"); | 79 | basfc.setConsType("C"); |
| 82 | basfc.setSender("发件人"); | 80 | basfc.setSender("发件人"); | ... | ... |
-
Please register or login to post a comment