|
|
|
@ -26,10 +26,10 @@ public class PartCatalogDaoImpl implements PartCatalogDao { |
|
|
|
private NamedParameterJdbcTemplate parameterJdbcTemplate; |
|
|
|
|
|
|
|
@Override |
|
|
|
public String getMaxIfsRowVersion() { |
|
|
|
public String getMaxIfsRowVersion(String tableName) { |
|
|
|
StringBuilder sql = new StringBuilder(); |
|
|
|
Map<String, Object> paramMap = new HashMap<String, Object>(); |
|
|
|
sql.append("SELECT MAX(ifs_row_version) ifsRowVersion FROM part_catalog"); |
|
|
|
sql.append("SELECT MAX(ifs_row_version) ifsRowVersion FROM "+tableName); |
|
|
|
//查询结果集 |
|
|
|
List<String> resultList = parameterJdbcTemplate.query(sql.toString(), paramMap, (rs, rowNum) -> rs.getString("ifsRowVersion")); |
|
|
|
//判断结果集 |
|
|
|
@ -78,7 +78,7 @@ public class PartCatalogDaoImpl implements PartCatalogDao { |
|
|
|
sql.append(" VALUES "); |
|
|
|
sql.append(" (:contract, :partNo, :partDesc, :typeCode, :partProductFamily, :partProductCode, :unitMeas, 'Y', :noteText, :primeCommodity, :SecondCommodity, :accountingGroup, :plannerBuyer, "); |
|
|
|
sql.append(" :engAttribute, 'Y', :typeDesignation, :hazardCode, :assetClass, :dimQuality, :abcClass, :frequencyClass, :LifecycleStage, "); |
|
|
|
sql.append(" :countryOfOrigin, :manufLeadtime, :expectedLeadtime, :regionOfOrigin, :durabilityDay, :partStatus, :createDate,"); //添加创建时间字段 |
|
|
|
sql.append(" :countryOfOrigin, :manufLeadtime, :expectedLeadtime, :regionOfOrigin, :durabilityDay, :partStatus, :createdDate,"); //添加创建时间字段 |
|
|
|
sql.append(" '*', :inventoryValuationMethod, :partCostGroupId, :inventoryPartCostLevel, :invoiceConsideration, :zeroCostFlag, 'Y' )"); |
|
|
|
parameterJdbcTemplate.batchUpdate(sql.toString(), SqlParameterSourceUtils.createBatch(ifsInventoryParts.toArray())); |
|
|
|
} |
|
|
|
|