guq 7 лет назад
Родитель
Сommit
f38880f6ad

+ 1 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/DataImportMapper.java

@@ -14,7 +14,7 @@ public interface DataImportMapper {
 
     List<DataImportDetail> selectDataById(Integer id);
 
-    DataImportDetail selectProductBycode(@Param("code") String code, @Param("companyid") Long companyId);
+    DataImportDetail selectProductBycode(@Param("code") String code, @Param("id") int id, @Param("companyid") Long companyId);
 
     void updateDataImport(Integer id);
 

+ 1 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java

@@ -549,7 +549,7 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
                 List<ProductDetail> productDetails = new ArrayList<>();
                 int i = getMapper().validateCodeWhenInsert(code, companyId);
                 List<DataImportDetail> data = datas.get(code);
-                DataImportDetail main = dataImportMapper.selectProductBycode(code, companyId);
+                DataImportDetail main = dataImportMapper.selectProductBycode(code, id, companyId);
                 Product product = JSONObject.parseObject(main.getDd_maindata(), Product.class);
                 Warehouse warehouse = null;
                 //验证仓库

+ 1 - 1
applications/document/document-server/src/main/resources/mapper/DataImportMapper.xml

@@ -93,7 +93,7 @@
 
   <select id="selectProductBycode" resultMap="DetailMap">
     select * from  data_importdetail
-    where dd_codevalue = #{code} and ifnull(dd_toformal,0) = 0 and ifnull(dd_success,0)=0 and dd_maindata is not null and companyid=#{companyid}
+    where dd_codevalue = #{code} and dd_diid=#{id} and ifnull(dd_success,0)=0 and dd_maindata is not null and companyid=#{companyid}
   </select>
 
   <update id="updateDataImport" parameterType="integer">