|
@@ -31,7 +31,7 @@ import java.util.Map;
|
|
|
* 单证PDF数据存放表 服务实现类
|
|
|
* </p>
|
|
|
*
|
|
|
- * @author
|
|
|
+ * @author
|
|
|
* @since 2023-04-26
|
|
|
*/
|
|
|
@Service
|
|
@@ -53,6 +53,7 @@ public class DocumentsPdfServiceImpl extends ServiceImpl<DocumentsPdfMapper, Doc
|
|
|
|
|
|
/**
|
|
|
* 查询详情
|
|
|
+ *
|
|
|
* @param id 单证ID
|
|
|
* @return
|
|
|
*/
|
|
@@ -65,26 +66,27 @@ public class DocumentsPdfServiceImpl extends ServiceImpl<DocumentsPdfMapper, Doc
|
|
|
|
|
|
/**
|
|
|
* 报关委托书详情
|
|
|
+ *
|
|
|
* @param id
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public Map<String,Object> powerDetail(Long id) {
|
|
|
- DocumentsPdf documentsPdf = this.getOne(Wrappers.<DocumentsPdf>query().lambda().eq(DocumentsPdf::getDocumentId,id).eq(DocumentsPdf::getDataType,1));
|
|
|
+ public Map<String, Object> powerDetail(Long id) {
|
|
|
+ DocumentsPdf documentsPdf = this.getOne(Wrappers.<DocumentsPdf>query().lambda().eq(DocumentsPdf::getDocumentId, id).eq(DocumentsPdf::getDataType, 1));
|
|
|
DocumentsPdfVo result = BeanUtil.toBean(documentsPdf, DocumentsPdfVo.class);
|
|
|
- if(ObjectUtil.isEmpty(result)){
|
|
|
- Map<String,Object> map = documentsService.getContractDataById(id);
|
|
|
+ if (ObjectUtil.isEmpty(result)) {
|
|
|
+ Map<String, Object> map = documentsService.getContractDataById(id);
|
|
|
//查询单证数据
|
|
|
DocumentsProduct documentsProduct = documentsProductService.getMaxMoneyData(id);
|
|
|
- if(MapUtils.isEmpty(map)||ObjectUtil.isEmpty(documentsProduct)){
|
|
|
+ if (MapUtils.isEmpty(map) || ObjectUtil.isEmpty(documentsProduct)) {
|
|
|
throw new ServiceException("数据异常,请联系管理员");
|
|
|
}
|
|
|
- map.put("customerCode",documentsProduct.getCustomsCode());
|
|
|
- map.put("productName", StringUtils.equals(documentsProduct.getDescribes(),"无")?documentsProduct.getSubDescribe():documentsProduct.getDescribes());
|
|
|
- map.put("productQuantity",documentsProduct.getQuantity());
|
|
|
+ map.put("customerCode", documentsProduct.getCustomsCode());
|
|
|
+ map.put("productName", StringUtils.equals(documentsProduct.getDescribes(), "无") ? documentsProduct.getSubDescribe() : documentsProduct.getDescribes());
|
|
|
+ map.put("productQuantity", documentsProduct.getQuantity());
|
|
|
return map;
|
|
|
- }else{
|
|
|
- Map<String,Object> map = JSON.parseObject(result.getContent());
|
|
|
+ } else {
|
|
|
+ Map<String, Object> map = JSON.parseObject(result.getContent());
|
|
|
return map;
|
|
|
}
|
|
|
}
|