From 25886a04168712a1bfff6ff399e22511920f1aa8 Mon Sep 17 00:00:00 2001
From: anthonyywj2 <353682448@qq.com>
Date: Wed, 20 Jul 2022 11:53:58 +0800
Subject: [PATCH] =?UTF-8?q?=E6=99=BA=E4=B8=9A=E6=8E=A5=E5=8F=A3=E5=AF=B9?=
=?UTF-8?q?=E6=8E=A5=EF=BC=8C=E7=AC=AC=E4=B8=89=E6=96=B9=E4=BA=A7=E5=93=81?=
=?UTF-8?q?=E4=BF=A1=E6=81=AF=EF=BC=8C=E4=BB=93=E5=BA=93=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../impl/InvWarehouseServiceImpl.java | 31 +++++++++++++------
.../admin/thread/ThrProductsDlService.java | 2 +-
.../thrsys/ThrProductsImportDetailDao.xml | 8 ++---
3 files changed, 26 insertions(+), 15 deletions(-)
diff --git a/api-admin/src/main/java/com/glxp/api/admin/service/inventory/impl/InvWarehouseServiceImpl.java b/api-admin/src/main/java/com/glxp/api/admin/service/inventory/impl/InvWarehouseServiceImpl.java
index 0fdba7ff..2787948f 100644
--- a/api-admin/src/main/java/com/glxp/api/admin/service/inventory/impl/InvWarehouseServiceImpl.java
+++ b/api-admin/src/main/java/com/glxp/api/admin/service/inventory/impl/InvWarehouseServiceImpl.java
@@ -164,8 +164,11 @@ public class InvWarehouseServiceImpl implements InvWarehouseService {
Object thirdId = ReflectUtil.getFieldValue(invWarehouseEntity, sys.getThirdId());
if (null != thirdId) {
ThrInvWarehouseEntity thrInvWarehouseEntity = thrInvWarehouseDao.selectByCode(String.valueOf(thirdId));
- response.setThirdId(thrInvWarehouseEntity.getCode());
- response.setThirdName(thrInvWarehouseEntity.getName());
+ if (thrInvWarehouseEntity != null) {
+ response.setThirdId(thrInvWarehouseEntity.getCode());
+ response.setThirdName(thrInvWarehouseEntity.getName());
+ }
+
}
result.add(response);
} else if (sys.getThirdId().equals("thirdId1")) {
@@ -175,8 +178,10 @@ public class InvWarehouseServiceImpl implements InvWarehouseService {
Object thirdId = ReflectUtil.getFieldValue(invWarehouseEntity, sys.getThirdId());
if (null != thirdId) {
ThrInvWarehouseEntity thrInvWarehouseEntity = thrInvWarehouseDao.selectByCode(String.valueOf(thirdId));
- response.setThirdId(thrInvWarehouseEntity.getCode());
- response.setThirdName(thrInvWarehouseEntity.getName());
+ if (thrInvWarehouseEntity != null) {
+ response.setThirdId(thrInvWarehouseEntity.getCode());
+ response.setThirdName(thrInvWarehouseEntity.getName());
+ }
}
result.add(response);
} else if (sys.getThirdId().equals("thirdId2")) {
@@ -186,8 +191,10 @@ public class InvWarehouseServiceImpl implements InvWarehouseService {
Object thirdId = ReflectUtil.getFieldValue(invWarehouseEntity, sys.getThirdId());
if (null != thirdId) {
ThrInvWarehouseEntity thrInvWarehouseEntity = thrInvWarehouseDao.selectByCode(String.valueOf(thirdId));
- response.setThirdId(thrInvWarehouseEntity.getCode());
- response.setThirdName(thrInvWarehouseEntity.getName());
+ if (thrInvWarehouseEntity != null) {
+ response.setThirdId(thrInvWarehouseEntity.getCode());
+ response.setThirdName(thrInvWarehouseEntity.getName());
+ }
}
result.add(response);
} else if (sys.getThirdId().equals("thirdId3")) {
@@ -197,8 +204,10 @@ public class InvWarehouseServiceImpl implements InvWarehouseService {
Object thirdId = ReflectUtil.getFieldValue(invWarehouseEntity, sys.getThirdId());
if (null != thirdId) {
ThrInvWarehouseEntity thrInvWarehouseEntity = thrInvWarehouseDao.selectByCode(String.valueOf(thirdId));
- response.setThirdId(thrInvWarehouseEntity.getCode());
- response.setThirdName(thrInvWarehouseEntity.getName());
+ if (thrInvWarehouseEntity != null) {
+ response.setThirdId(thrInvWarehouseEntity.getCode());
+ response.setThirdName(thrInvWarehouseEntity.getName());
+ }
}
result.add(response);
} else if (sys.getThirdId().equals("thirdId4")) {
@@ -208,8 +217,10 @@ public class InvWarehouseServiceImpl implements InvWarehouseService {
Object thirdId = ReflectUtil.getFieldValue(invWarehouseEntity, sys.getThirdId());
if (null != thirdId) {
ThrInvWarehouseEntity thrInvWarehouseEntity = thrInvWarehouseDao.selectByCode(String.valueOf(thirdId));
- response.setThirdId(thrInvWarehouseEntity.getCode());
- response.setThirdName(thrInvWarehouseEntity.getName());
+ if (thrInvWarehouseEntity != null) {
+ response.setThirdId(thrInvWarehouseEntity.getCode());
+ response.setThirdName(thrInvWarehouseEntity.getName());
+ }
}
result.add(response);
}
diff --git a/api-admin/src/main/java/com/glxp/api/admin/thread/ThrProductsDlService.java b/api-admin/src/main/java/com/glxp/api/admin/thread/ThrProductsDlService.java
index 795061fb..b803301a 100644
--- a/api-admin/src/main/java/com/glxp/api/admin/thread/ThrProductsDlService.java
+++ b/api-admin/src/main/java/com/glxp/api/admin/thread/ThrProductsDlService.java
@@ -119,7 +119,7 @@ public class ThrProductsDlService {
}
int page = 1;
- int limit = 100;
+ int limit = 50;
while (page != -1) {
FilterErpGoodsRequest filterErpGoodsRequest = new FilterErpGoodsRequest();
BeanUtils.copyProperties(filterThrProductsRequest, filterErpGoodsRequest);
diff --git a/api-admin/src/main/resources/mybatis/mapper/thrsys/ThrProductsImportDetailDao.xml b/api-admin/src/main/resources/mybatis/mapper/thrsys/ThrProductsImportDetailDao.xml
index cee62bdb..7e1078e4 100644
--- a/api-admin/src/main/resources/mybatis/mapper/thrsys/ThrProductsImportDetailDao.xml
+++ b/api-admin/src/main/resources/mybatis/mapper/thrsys/ThrProductsImportDetailDao.xml
@@ -30,7 +30,7 @@
(
code,name,measname,spec,registerNo,manufactory,
cplb,flbm,qxlb,ybbm,sptm,tyshxydm,zczbhhzbapzbh,ylqxzcrbarmc,ylqxzcrbarywmc,cpms,
- thirdSysFk,updateTime ,genKeyFk ,supName )
+ thirdSysFk,updateTime ,genKeyFk ,supName,price )
values
(
#{code},
@@ -41,7 +41,7 @@
#{manufactory},
#{cplb}, #{flbm}, #{qxlb}, #{ybbm},#{sptm},
#{tyshxydm}, #{zczbhhzbapzbh}, #{ylqxzcrbarmc}, #{ylqxzcrbarywmc},#{cpms}
- #{thirdSysFk},#{updateTime},#{genKeyFk},#{supName}
+ #{thirdSysFk},#{updateTime},#{genKeyFk},#{supName},#{price}
)
@@ -50,7 +50,7 @@
(
code,name,measname,spec,registerNo,manufactory,
cplb,flbm,qxlb,ybbm,sptm,tyshxydm,zczbhhzbapzbh,ylqxzcrbarmc,ylqxzcrbarywmc,cpms,
- thirdSysFk ,updateTime ,genKeyFk,supName )
+ thirdSysFk ,updateTime ,genKeyFk,supName,price )
values
@@ -63,7 +63,7 @@
#{item.manufactory},
#{item.cplb}, #{item.flbm}, #{item.qxlb}, #{item.ybbm},#{item.sptm},
#{item.tyshxydm}, #{item.zczbhhzbapzbh}, #{item.ylqxzcrbarmc}, #{item.ylqxzcrbarywmc},#{item.cpms},
- #{item.thirdSysFk} ,#{item.updateTime},#{item.genKeyFk} ,#{item.supName} )
+ #{item.thirdSysFk} ,#{item.updateTime},#{item.genKeyFk} ,#{item.supName} ,{item.price} )