|
@@ -100,9 +100,6 @@ public class TbImportOrderService extends ServiceImpl<TbImportOrderMapper, TbImp
|
|
|
|
|
|
ImportOrderVo importOrderVo = new ImportOrderVo();
|
|
|
BeanUtils.copyProperties(importOrder, importOrderVo);
|
|
|
-
|
|
|
- importOrderVo.setGoodsNames(peopleOrder.getGoodsNames());
|
|
|
- importOrderVo.setGLimit(peopleOrder.getGLimit());
|
|
|
return importOrderVo;
|
|
|
}
|
|
|
|
|
@@ -118,43 +115,32 @@ public class TbImportOrderService extends ServiceImpl<TbImportOrderMapper, TbImp
|
|
|
* 远程调用 进口申报单同步
|
|
|
*/
|
|
|
public boolean importOrderDto(HtImportOrderDto importOrderDto) {
|
|
|
- TbImportOrder importOrder = tbImportOrderMapper.findByManifestId(importOrderDto.getManifestId());
|
|
|
- if (importOrder == null) {
|
|
|
- importOrder = new TbImportOrder();
|
|
|
- importOrder.setCreateTime(new Date());
|
|
|
- }
|
|
|
- BeanUtils.copyProperties(importOrderDto, importOrder, "id");
|
|
|
- boolean save = saveOrUpdate(importOrder);
|
|
|
- long importOrderId = importOrder.getId();
|
|
|
- if (save) {
|
|
|
- //委托边民额度
|
|
|
- List<HtIeportDeclBillsBpLimitDto> ieportDeclBillsBpLimitDtoList = JSON.parseArray(importOrderDto.getBorderPeopleLimitList(), HtIeportDeclBillsBpLimitDto.class);
|
|
|
- ieportDeclBillsBpLimitDtoList.forEach(ieportDeclBillsBpLimitDto -> {
|
|
|
- LambdaUpdateWrapper<TbOrder> wrapper = new LambdaUpdateWrapper<>();
|
|
|
- wrapper.set(TbOrder::getLimitNo, ieportDeclBillsBpLimitDto.getLimitNo());
|
|
|
- wrapper.set(TbOrder::getGLimit, ieportDeclBillsBpLimitDto.getgLimit());
|
|
|
- wrapper.set(TbOrder::getGNo, ieportDeclBillsBpLimitDto.getgNo());
|
|
|
- wrapper.set(TbOrder::getImportOrderId, importOrderId);
|
|
|
- wrapper.eq(TbOrder::getPreIeportNo, ieportDeclBillsBpLimitDto.getPlatSeqNo());
|
|
|
- boolean update = tbOrderService.update(wrapper);
|
|
|
- });
|
|
|
- //申报单商品信息
|
|
|
- List<HtIeportDeclBillsGoodsDto> ieportDeclBillsGoodsDtoList = JSON.parseArray(importOrderDto.getGoodsList(), HtIeportDeclBillsGoodsDto.class);
|
|
|
- ieportDeclBillsGoodsDtoList.forEach(ieportDeclBillsGoodsDto -> {
|
|
|
- TbImportGoods importGoods = importGoodsMapper.findBySeqPlatNo(ieportDeclBillsGoodsDto.getPlatSeqNo());
|
|
|
- if (importGoods == null) {
|
|
|
- importGoods = new TbImportGoods();
|
|
|
- }
|
|
|
- BeanUtils.copyProperties(ieportDeclBillsGoodsDto, importGoods, "id");
|
|
|
- importGoods.setImportOrderId(importOrderId);
|
|
|
- if (importGoods.getId() != null) {
|
|
|
- importGoodsMapper.updateById(importGoods);
|
|
|
- } else {
|
|
|
- importGoodsMapper.insert(importGoods);
|
|
|
- }
|
|
|
-
|
|
|
- });
|
|
|
- }
|
|
|
- return save;
|
|
|
+ //委托边民额度
|
|
|
+ List<HtIeportDeclBillsBpLimitDto> ieportDeclBillsBpLimitDtoList = JSON.parseArray(importOrderDto.getBorderPeopleLimitList(), HtIeportDeclBillsBpLimitDto.class);
|
|
|
+ ieportDeclBillsBpLimitDtoList.forEach(ieportDeclBillsBpLimitDto -> {
|
|
|
+ String peopleIdCardNo = ieportDeclBillsBpLimitDto.getCiphertextIdno();
|
|
|
+ TbImportOrder importOrder = tbImportOrderMapper.findByManifestId(importOrderDto.getManifestId(), peopleIdCardNo);
|
|
|
+ if (importOrder == null) {
|
|
|
+ importOrder = new TbImportOrder();
|
|
|
+ importOrder.setCreateTime(new Date());
|
|
|
+ }
|
|
|
+ BeanUtils.copyProperties(importOrderDto, importOrder, "id");
|
|
|
+ importOrder.setGoodsNames(ieportDeclBillsBpLimitDto.getgName())
|
|
|
+ .setGLimit(ieportDeclBillsBpLimitDto.getgLimit())
|
|
|
+ .setPeopleIdNo(peopleIdCardNo)
|
|
|
+ .setPeopleName(ieportDeclBillsBpLimitDto.getBorderName())
|
|
|
+ .setGGrossWt(ieportDeclBillsBpLimitDto.getgGrossWt());
|
|
|
+ saveOrUpdate(importOrder);
|
|
|
+ long importOrderId = importOrder.getId();
|
|
|
+ LambdaUpdateWrapper<TbOrder> wrapper = new LambdaUpdateWrapper<>();
|
|
|
+ wrapper.set(TbOrder::getLimitNo, ieportDeclBillsBpLimitDto.getLimitNo());
|
|
|
+ wrapper.set(TbOrder::getGLimit, ieportDeclBillsBpLimitDto.getgLimit());
|
|
|
+ wrapper.set(TbOrder::getGNo, ieportDeclBillsBpLimitDto.getgNo());
|
|
|
+ wrapper.set(TbOrder::getImportOrderId, importOrderId);
|
|
|
+ wrapper.eq(TbOrder::getPreIeportNo, ieportDeclBillsBpLimitDto.getPlatSeqNo());
|
|
|
+ wrapper.eq(TbOrder::getIdno, peopleIdCardNo);
|
|
|
+ tbOrderService.update(wrapper);
|
|
|
+ });
|
|
|
+ return true;
|
|
|
}
|
|
|
}
|