|
@@ -140,8 +140,8 @@ public class GoodsProductServiceImpl implements GoodsProductService {
|
|
// 获取单位代码
|
|
// 获取单位代码
|
|
List<SysCusUnitCodeEntity> cusUnitCodeEntityList = sysCusUnitCodeService.getAll();
|
|
List<SysCusUnitCodeEntity> cusUnitCodeEntityList = sysCusUnitCodeService.getAll();
|
|
boolean flag = false;
|
|
boolean flag = false;
|
|
|
|
+ int count = 1;
|
|
if (Objects.nonNull(goodsProductDtoList) && goodsProductDtoList.size() > 0) {
|
|
if (Objects.nonNull(goodsProductDtoList) && goodsProductDtoList.size() > 0) {
|
|
- int count = 1;
|
|
|
|
for (GoodsProductDto goodsProductDto : goodsProductDtoList) {
|
|
for (GoodsProductDto goodsProductDto : goodsProductDtoList) {
|
|
if (StringUtils.isEmpty(goodsProductDto.getMerchSn())) {
|
|
if (StringUtils.isEmpty(goodsProductDto.getMerchSn())) {
|
|
throw new RRException("第" + count + "行的商户编号为空!");
|
|
throw new RRException("第" + count + "行的商户编号为空!");
|
|
@@ -311,6 +311,7 @@ public class GoodsProductServiceImpl implements GoodsProductService {
|
|
insertList.add(goodsProductEntity);
|
|
insertList.add(goodsProductEntity);
|
|
}
|
|
}
|
|
goodsProductDao.saveBatch(insertList);
|
|
goodsProductDao.saveBatch(insertList);
|
|
|
|
+ count=goodsProductDtoList.size();
|
|
return count;
|
|
return count;
|
|
}
|
|
}
|
|
return 0;
|
|
return 0;
|
|
@@ -498,7 +499,6 @@ public class GoodsProductServiceImpl implements GoodsProductService {
|
|
return result.getMsg();
|
|
return result.getMsg();
|
|
}
|
|
}
|
|
List<GoodsProductEntity> updateList = new ArrayList<>();
|
|
List<GoodsProductEntity> updateList = new ArrayList<>();
|
|
- List<GoodsProductEntity> insertList = new ArrayList<>();
|
|
|
|
List rows = (List) result.getData().getRows().get(0);
|
|
List rows = (List) result.getData().getRows().get(0);
|
|
for(int i = 0 ; i < rows.size() ; i ++) {
|
|
for(int i = 0 ; i < rows.size() ; i ++) {
|
|
LinkedTreeMap<String, Object> treeMap = (LinkedTreeMap<String, Object>) rows.get(i);
|
|
LinkedTreeMap<String, Object> treeMap = (LinkedTreeMap<String, Object>) rows.get(i);
|
|
@@ -509,37 +509,39 @@ public class GoodsProductServiceImpl implements GoodsProductService {
|
|
String netWeight = treeMap.get("netWeight").toString(); //净重,kg
|
|
String netWeight = treeMap.get("netWeight").toString(); //净重,kg
|
|
String grossWeight = treeMap.get("grossWeight").toString(); //毛重,kg
|
|
String grossWeight = treeMap.get("grossWeight").toString(); //毛重,kg
|
|
String ciqMainEle = treeMap.get("ciqMainEle").toString(); //主要成分
|
|
String ciqMainEle = treeMap.get("ciqMainEle").toString(); //主要成分
|
|
- String cusCode = treeMap.get("cusCode").toString(); //
|
|
|
|
- String bondedCode = treeMap.get("bondedCode").toString(); //海关商品编码
|
|
|
|
- String localEmsNo = treeMap.get("localEmsNo").toString(); //园区账册编号
|
|
|
|
- String itemRecordNo = treeMap.get("itemRecordNo").toString(); //园区商品序号
|
|
|
|
- /* String remark = null ;
|
|
|
|
- if (treeMap.get("remark") != null) {
|
|
|
|
- remark = treeMap.get("remark").toString(); //备注
|
|
|
|
- }*/
|
|
|
|
- String legalUnit1Qty = treeMap.get("legalUnit1Qty").toString(); //法1
|
|
|
|
- String legalUnit2Qty = treeMap.get("legalUnit2Qty").toString(); //法2
|
|
|
|
String cusDeclEle = treeMap.get("cusDeclEle").toString(); //申报要素
|
|
String cusDeclEle = treeMap.get("cusDeclEle").toString(); //申报要素
|
|
- /* String modTime = null ;
|
|
|
|
- if (treeMap.get("modTime")!=null) {
|
|
|
|
- modTime = treeMap.get("modTime").toString();
|
|
|
|
- }*/
|
|
|
|
|
|
+ String localEmsNo = null; //园区账册编号
|
|
|
|
+ if (treeMap.get("localEmsNo")!=null) {
|
|
|
|
+ localEmsNo = treeMap.get("localEmsNo").toString();
|
|
|
|
+ }
|
|
|
|
+ String itemRecordNo = null; //园区商品序号
|
|
|
|
+ if (treeMap.get("itemRecordNo")!=null) {
|
|
|
|
+ itemRecordNo = treeMap.get("itemRecordNo").toString();
|
|
|
|
+ }
|
|
|
|
+ String legalUnit1Qty = null ; //法1
|
|
|
|
+ if (treeMap.get("legalUnit1Qty")!=null) {
|
|
|
|
+ legalUnit1Qty = treeMap.get("legalUnit1Qty").toString();
|
|
|
|
+ }
|
|
|
|
+ String legalUnit2Qty = null; //法2
|
|
|
|
+ if (treeMap.get("legalUnit2Qty")!=null) {
|
|
|
|
+ legalUnit2Qty = treeMap.get("legalUnit2Qty").toString();
|
|
|
|
+ }
|
|
|
|
+
|
|
for (GoodsProductEntity goodsProductEntity : goodsProductEntityList) {
|
|
for (GoodsProductEntity goodsProductEntity : goodsProductEntityList) {
|
|
if (merchSn1.equals(goodsProductEntity.getMerchSn()) && sku.equals(goodsProductEntity.getSku()) && prodBarcode.equals(goodsProductEntity.getProdBarcode())) {
|
|
if (merchSn1.equals(goodsProductEntity.getMerchSn()) && sku.equals(goodsProductEntity.getSku()) && prodBarcode.equals(goodsProductEntity.getProdBarcode())) {
|
|
goodsProductEntity.setGrossWeight(new BigDecimal(grossWeight));
|
|
goodsProductEntity.setGrossWeight(new BigDecimal(grossWeight));
|
|
goodsProductEntity.setNetWeight(new BigDecimal(netWeight));
|
|
goodsProductEntity.setNetWeight(new BigDecimal(netWeight));
|
|
- goodsProductEntity.setLegalUnit1Qty(new BigDecimal(legalUnit1Qty));
|
|
|
|
- goodsProductEntity.setLegalUnit2Qty(new BigDecimal(legalUnit2Qty));
|
|
|
|
|
|
+ if (legalUnit1Qty!=null) {
|
|
|
|
+ goodsProductEntity.setLegalUnit1Qty(new BigDecimal(legalUnit1Qty));
|
|
|
|
+ }
|
|
|
|
+ if (legalUnit2Qty!=null) {
|
|
|
|
+ goodsProductEntity.setLegalUnit2Qty(new BigDecimal(legalUnit2Qty));
|
|
|
|
+ }
|
|
goodsProductEntity.setCiqMainEle(ciqMainEle);
|
|
goodsProductEntity.setCiqMainEle(ciqMainEle);
|
|
goodsProductEntity.setCusDeclEle(cusDeclEle);
|
|
goodsProductEntity.setCusDeclEle(cusDeclEle);
|
|
-// goodsProductEntity.setOmsAuditRemark(remark);
|
|
|
|
goodsProductEntity.setItemRecordNo(itemRecordNo);
|
|
goodsProductEntity.setItemRecordNo(itemRecordNo);
|
|
goodsProductEntity.setLocalEmsNo(localEmsNo);
|
|
goodsProductEntity.setLocalEmsNo(localEmsNo);
|
|
goodsProductEntity.setProdBrand(prodBrand);
|
|
goodsProductEntity.setProdBrand(prodBrand);
|
|
-// if (modTime!=null) {
|
|
|
|
-// goodsProductEntity.setOmsAuditTime(DateUtils.strToDate(modTime));
|
|
|
|
-// }
|
|
|
|
-// goodsProductEntity.setOmsAuditStatus("2");
|
|
|
|
goodsProductEntity.setModTime(new Date());
|
|
goodsProductEntity.setModTime(new Date());
|
|
goodsProductEntity.setModerSn(ShiroUtils.getUserId().toString());
|
|
goodsProductEntity.setModerSn(ShiroUtils.getUserId().toString());
|
|
goodsProductEntity.setStatus(Dict.productRecordStatus.item_22.getItem());
|
|
goodsProductEntity.setStatus(Dict.productRecordStatus.item_22.getItem());
|