Showing
5 changed files
with
16 additions
and
14 deletions
| ... | @@ -62,7 +62,7 @@ public class BasfDataInterface { | ... | @@ -62,7 +62,7 @@ public class BasfDataInterface { |
| 62 | if(!Objects.equals(saveIClearApiLogResult,null)){ | 62 | if(!Objects.equals(saveIClearApiLogResult,null)){ |
| 63 | log.info("请求保存成功,msgId:"+saveIClearApiLogResult.getMsgId()); | 63 | log.info("请求保存成功,msgId:"+saveIClearApiLogResult.getMsgId()); |
| 64 | basfc.setMsgId(saveIClearApiLogResult.getMsgId()); | 64 | basfc.setMsgId(saveIClearApiLogResult.getMsgId()); |
| 65 | - basfc.getBasfcDetailList().forEach(d->{ | 65 | + basfc.getConsignmentList().forEach(d->{ |
| 66 | d.setMsgId(saveIClearApiLogResult.getMsgId()); | 66 | d.setMsgId(saveIClearApiLogResult.getMsgId()); |
| 67 | }); | 67 | }); |
| 68 | saveMawbBasfResult = basfService.saveMawbBasf(basfc); | 68 | saveMawbBasfResult = basfService.saveMawbBasf(basfc); |
| ... | @@ -78,12 +78,12 @@ public class BasfDataInterface { | ... | @@ -78,12 +78,12 @@ public class BasfDataInterface { |
| 78 | 78 | ||
| 79 | 79 | ||
| 80 | //2、TODO 校验主单 | 80 | //2、TODO 校验主单 |
| 81 | - /*sw.start("checkMawb"); | 81 | + sw.start("checkBasfMawb"); |
| 82 | result=basfService.checkBasfMawb(saveMawbBasfResult); | 82 | result=basfService.checkBasfMawb(saveMawbBasfResult); |
| 83 | if(!result.getSuccess()){ | 83 | if(!result.getSuccess()){ |
| 84 | return result; | 84 | return result; |
| 85 | } | 85 | } |
| 86 | - sw.stop();*/ | 86 | + sw.stop(); |
| 87 | 87 | ||
| 88 | // //3、TODO 校验子单 | 88 | // //3、TODO 校验子单 |
| 89 | // sw.start("checkMawbDetail"); | 89 | // sw.start("checkMawbDetail"); | ... | ... |
| ... | @@ -10,6 +10,7 @@ import org.hibernate.annotations.DynamicUpdate; | ... | @@ -10,6 +10,7 @@ import org.hibernate.annotations.DynamicUpdate; |
| 10 | import javax.persistence.*; | 10 | import javax.persistence.*; |
| 11 | import javax.validation.Valid; | 11 | import javax.validation.Valid; |
| 12 | import javax.validation.constraints.NotBlank; | 12 | import javax.validation.constraints.NotBlank; |
| 13 | +import javax.validation.constraints.NotNull; | ||
| 13 | import java.io.Serializable; | 14 | import java.io.Serializable; |
| 14 | import java.util.List; | 15 | import java.util.List; |
| 15 | 16 | ||
| ... | @@ -50,7 +51,8 @@ public class Basfc implements Serializable { | ... | @@ -50,7 +51,8 @@ public class Basfc implements Serializable { |
| 50 | 51 | ||
| 51 | @ApiModelProperty(value = "运单ID", name = "consignmentId", example = "运单记录的唯一ID") | 52 | @ApiModelProperty(value = "运单ID", name = "consignmentId", example = "运单记录的唯一ID") |
| 52 | @Column(name = "CONSIGNMENTID") | 53 | @Column(name = "CONSIGNMENTID") |
| 53 | - @NotBlank(message="参数consignmentId不能为空!") | 54 | + @NotNull(message="参数consignmentId不能为空!") |
| 55 | +// @NotBlank(message="参数consignmentId不能为空!") | ||
| 54 | private Long consignmentId; | 56 | private Long consignmentId; |
| 55 | 57 | ||
| 56 | @ApiModelProperty(value = "运单类型",name = "consType", example = "A/B/C/D") | 58 | @ApiModelProperty(value = "运单类型",name = "consType", example = "A/B/C/D") |
| ... | @@ -89,8 +91,8 @@ public class Basfc implements Serializable { | ... | @@ -89,8 +91,8 @@ public class Basfc implements Serializable { |
| 89 | private String EANNo; | 91 | private String EANNo; |
| 90 | 92 | ||
| 91 | @Valid | 93 | @Valid |
| 92 | - @ApiModelProperty(value = "运单明细", name = "basfcDetailList", example = "") | 94 | + @ApiModelProperty(value = "运单明细", name = "consignmentList", example = "") |
| 93 | @OneToMany(cascade = CascadeType.PERSIST) | 95 | @OneToMany(cascade = CascadeType.PERSIST) |
| 94 | @JoinColumn(name = "BASFCID") | 96 | @JoinColumn(name = "BASFCID") |
| 95 | - private List<BasfcDetail> basfcDetailList; | 97 | + private List<BasfcDetail> consignmentList; |
| 96 | } | 98 | } | ... | ... |
| ... | @@ -30,8 +30,8 @@ public class BasfcDetail { | ... | @@ -30,8 +30,8 @@ public class BasfcDetail { |
| 30 | private Long basfId; | 30 | private Long basfId; |
| 31 | 31 | ||
| 32 | @Column(name="CONSIGNMENTDETAILID") | 32 | @Column(name="CONSIGNMENTDETAILID") |
| 33 | - @NotBlank(message="参数consignmentDetailId不能为空") | 33 | + @NotNull(message="参数consignmentDetailId不能为空") |
| 34 | - private String consignmentDetailId; | 34 | + private Long consignmentDetailId; |
| 35 | 35 | ||
| 36 | @ApiModelProperty(value = "商品编号") | 36 | @ApiModelProperty(value = "商品编号") |
| 37 | @NotBlank(message="参数skuCode不能为空") | 37 | @NotBlank(message="参数skuCode不能为空") | ... | ... |
| ... | @@ -77,10 +77,10 @@ public class BasfService { | ... | @@ -77,10 +77,10 @@ public class BasfService { |
| 77 | basfMawb.setEANNo(basfc.getEANNo()); | 77 | basfMawb.setEANNo(basfc.getEANNo()); |
| 78 | //明细 | 78 | //明细 |
| 79 | List<BasfMawbDetail> mawbDetailList = new ArrayList<>(); | 79 | List<BasfMawbDetail> mawbDetailList = new ArrayList<>(); |
| 80 | - if (basfc.getBasfcDetailList().size()>0){ | 80 | + if (basfc.getConsignmentList().size()>0){ |
| 81 | - for (BasfcDetail basfcDetail : basfc.getBasfcDetailList()){ | 81 | + for (BasfcDetail basfcDetail : basfc.getConsignmentList()){ |
| 82 | BasfMawbDetail mawbDetail = new BasfMawbDetail(); | 82 | BasfMawbDetail mawbDetail = new BasfMawbDetail(); |
| 83 | - mawbDetail.setDetailId(basfcDetail.getConsignmentDetailId()); | 83 | + mawbDetail.setDetailId(String.valueOf(basfcDetail.getConsignmentDetailId())); |
| 84 | mawbDetail.setGmodel(basfcDetail.getModel()); | 84 | mawbDetail.setGmodel(basfcDetail.getModel()); |
| 85 | mawbDetail.setCodeTS(basfcDetail.getSkuCode()); | 85 | mawbDetail.setCodeTS(basfcDetail.getSkuCode()); |
| 86 | mawbDetail.setGname(basfcDetail.getSkuName()); | 86 | mawbDetail.setGname(basfcDetail.getSkuName()); | ... | ... |
| ... | @@ -240,7 +240,7 @@ public class ChmConsignmentService { | ... | @@ -240,7 +240,7 @@ public class ChmConsignmentService { |
| 240 | //运单号 | 240 | //运单号 |
| 241 | result.setConsignmentCode(mawb.getBillNo()); | 241 | result.setConsignmentCode(mawb.getBillNo()); |
| 242 | //运单类型 | 242 | //运单类型 |
| 243 | - DictionaryEntries consType = Constant.dictionaryEntriesCache.get(Constant.MSG_TYPE_C); | 243 | + DictionaryEntries consType = Constant.dictionaryEntriesCache.get(Constant.consType_C); |
| 244 | if(consType != null){ | 244 | if(consType != null){ |
| 245 | result.setConsTypeId(consType); | 245 | result.setConsTypeId(consType); |
| 246 | result.setConsType(consType.getChineseName()); | 246 | result.setConsType(consType.getChineseName()); |
| ... | @@ -586,10 +586,10 @@ public class ChmConsignmentService { | ... | @@ -586,10 +586,10 @@ public class ChmConsignmentService { |
| 586 | } | 586 | } |
| 587 | //更新: | 587 | //更新: |
| 588 | //如果有数据并且满足条件后才能更新数据 | 588 | //如果有数据并且满足条件后才能更新数据 |
| 589 | - //条件1、状态为 待申报海关 | 589 | + //条件1、状态为 C类待申报 |
| 590 | //条件2、本次推送时间 > 上次推送的时间 | 590 | //条件2、本次推送时间 > 上次推送的时间 |
| 591 | }else if(!Objects.equals(chmConsignmentDB,null) | 591 | }else if(!Objects.equals(chmConsignmentDB,null) |
| 592 | - && Objects.equals(chmConsignmentDB.getConsStatusDic().getCode(),"transferWaybillStatus_5") | 592 | + && Objects.equals(chmConsignmentDB.getConsStatusDic().getCode(),"transferWaybillStatus_16") |
| 593 | //TODO 提交时需要打开 | 593 | //TODO 提交时需要打开 |
| 594 | && pushTime.getTime()>chmConsignmentDB.getUpdateTime().getTime() | 594 | && pushTime.getTime()>chmConsignmentDB.getUpdateTime().getTime() |
| 595 | ){ | 595 | ){ | ... | ... |
-
Please register or login to post a comment