Showing
3 changed files
with
20 additions
and
11 deletions
| ... | @@ -109,12 +109,12 @@ public class CustomsDataInterface { | ... | @@ -109,12 +109,12 @@ public class CustomsDataInterface { |
| 109 | sw.stop(); | 109 | sw.stop(); |
| 110 | 110 | ||
| 111 | // //3、TODO 校验子单 | 111 | // //3、TODO 校验子单 |
| 112 | -// sw.start("checkMawbDetail"); | 112 | + sw.start("checkMawbDetail"); |
| 113 | -// result=mawbDetailServicel.checkMawbDetail(mawb); | 113 | + result=mawbDetailServicel.checkMawbDetail(mawb); |
| 114 | -// if(!result.getSuccess()){ | 114 | + if(!result.getSuccess()){ |
| 115 | -// return result; | 115 | + return result; |
| 116 | -// } | 116 | + } |
| 117 | -// sw.stop(); | 117 | + sw.stop(); |
| 118 | 118 | ||
| 119 | 119 | ||
| 120 | //4、保存运单到iclear中 | 120 | //4、保存运单到iclear中 | ... | ... |
| ... | @@ -114,7 +114,6 @@ public class MawbDetail implements Serializable{ | ... | @@ -114,7 +114,6 @@ public class MawbDetail implements Serializable{ |
| 114 | private String secondUnit; | 114 | private String secondUnit; |
| 115 | 115 | ||
| 116 | @ApiModelProperty(value = "第二法定数量") | 116 | @ApiModelProperty(value = "第二法定数量") |
| 117 | - @NotNull(message="参数secondQty不能为空") | ||
| 118 | @Column(name = "SECONDQTY") | 117 | @Column(name = "SECONDQTY") |
| 119 | private Integer secondQty; | 118 | private Integer secondQty; |
| 120 | 119 | ... | ... |
| ... | @@ -5,10 +5,12 @@ import com.erry.iclear.dateInterface.api.request.MawbDetail; | ... | @@ -5,10 +5,12 @@ import com.erry.iclear.dateInterface.api.request.MawbDetail; |
| 5 | import com.erry.iclear.dateInterface.api.response.ResultRS; | 5 | import com.erry.iclear.dateInterface.api.response.ResultRS; |
| 6 | import com.erry.iclear.dateInterface.repository.MawbDetailRepository; | 6 | import com.erry.iclear.dateInterface.repository.MawbDetailRepository; |
| 7 | import lombok.extern.slf4j.Slf4j; | 7 | import lombok.extern.slf4j.Slf4j; |
| 8 | +import org.apache.commons.lang3.StringUtils; | ||
| 8 | import org.springframework.beans.factory.annotation.Autowired; | 9 | import org.springframework.beans.factory.annotation.Autowired; |
| 9 | import org.springframework.stereotype.Service; | 10 | import org.springframework.stereotype.Service; |
| 10 | 11 | ||
| 11 | import java.util.List; | 12 | import java.util.List; |
| 13 | +import java.util.Objects; | ||
| 12 | 14 | ||
| 13 | /** | 15 | /** |
| 14 | * @author Administrator | 16 | * @author Administrator |
| ... | @@ -22,7 +24,7 @@ public class MawbDetailService { | ... | @@ -22,7 +24,7 @@ public class MawbDetailService { |
| 22 | 24 | ||
| 23 | public void saveMawbDetail(List<MawbDetail> mawbDetailList){ | 25 | public void saveMawbDetail(List<MawbDetail> mawbDetailList){ |
| 24 | log.info(""); | 26 | log.info(""); |
| 25 | - | 27 | + |
| 26 | log.info(""); | 28 | log.info(""); |
| 27 | 29 | ||
| 28 | } | 30 | } |
| ... | @@ -31,9 +33,17 @@ public class MawbDetailService { | ... | @@ -31,9 +33,17 @@ public class MawbDetailService { |
| 31 | public ResultRS checkMawbDetail(Mawb mawb){ | 33 | public ResultRS checkMawbDetail(Mawb mawb){ |
| 32 | ResultRS result = new ResultRS(Boolean.FALSE,null,null); | 34 | ResultRS result = new ResultRS(Boolean.FALSE,null,null); |
| 33 | try{ | 35 | try{ |
| 34 | - | 36 | + for (MawbDetail detail : mawb.getMawbDetailList()) { |
| 35 | - | 37 | + String secondUnit = detail.getSecondUnit(); |
| 36 | - | 38 | + if (StringUtils.isNotEmpty(secondUnit)) { |
| 39 | + | ||
| 40 | + Integer secondQty = detail.getSecondQty(); | ||
| 41 | + if (Objects.isNull(secondQty)) { | ||
| 42 | + result.setMsg("参数secondQty不能为空"); | ||
| 43 | + return result; | ||
| 44 | + } | ||
| 45 | + } | ||
| 46 | + } | ||
| 37 | result.setSuccess(Boolean.TRUE); | 47 | result.setSuccess(Boolean.TRUE); |
| 38 | }catch (Exception e){ | 48 | }catch (Exception e){ |
| 39 | log.error("checkMawbDetail() error:"+e.getMessage()); | 49 | log.error("checkMawbDetail() error:"+e.getMessage()); | ... | ... |
-
Please register or login to post a comment