and ${criterion.condition}
                
                
                  and ${criterion.condition} #{criterion.value}
                
                
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                
                
                  and ${criterion.condition}
                  
                    #{listItem}
                  
                
              
            
          
        
      
    
  
  
    
      
        
          
            
              
                
                  and ${criterion.condition}
                
                
                  and ${criterion.condition} #{criterion.value}
                
                
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                
                
                  and ${criterion.condition}
                  
                    #{listItem}
                  
                
              
            
          
        
      
    
  
  
    id, header_id, material_id, material_extend_id, material_unit, sku, oper_number, 
    basic_number, unit_price, purchase_unit_price, tax_unit_price, all_price, remark, 
    depot_id, another_depot_id, tax_rate, tax_money, tax_last_money, material_type, sn_list, 
    batch_number, expiration_date, link_id, tenant_id, delete_flag
  
  
  
  
    delete from jsh_depot_item
    where id = #{id,jdbcType=BIGINT}
  
  
    delete from jsh_depot_item
    
      
    
  
  
    insert into jsh_depot_item (id, header_id, material_id, 
      material_extend_id, material_unit, sku, 
      oper_number, basic_number, unit_price, 
      purchase_unit_price, tax_unit_price, all_price, 
      remark, depot_id, another_depot_id, 
      tax_rate, tax_money, tax_last_money, 
      material_type, sn_list, batch_number, 
      expiration_date, link_id, tenant_id, 
      delete_flag)
    values (#{id,jdbcType=BIGINT}, #{headerId,jdbcType=BIGINT}, #{materialId,jdbcType=BIGINT}, 
      #{materialExtendId,jdbcType=BIGINT}, #{materialUnit,jdbcType=VARCHAR}, #{sku,jdbcType=VARCHAR}, 
      #{operNumber,jdbcType=DECIMAL}, #{basicNumber,jdbcType=DECIMAL}, #{unitPrice,jdbcType=DECIMAL}, 
      #{purchaseUnitPrice,jdbcType=DECIMAL}, #{taxUnitPrice,jdbcType=DECIMAL}, #{allPrice,jdbcType=DECIMAL}, 
      #{remark,jdbcType=VARCHAR}, #{depotId,jdbcType=BIGINT}, #{anotherDepotId,jdbcType=BIGINT}, 
      #{taxRate,jdbcType=DECIMAL}, #{taxMoney,jdbcType=DECIMAL}, #{taxLastMoney,jdbcType=DECIMAL}, 
      #{materialType,jdbcType=VARCHAR}, #{snList,jdbcType=VARCHAR}, #{batchNumber,jdbcType=VARCHAR}, 
      #{expirationDate,jdbcType=TIMESTAMP}, #{linkId,jdbcType=BIGINT}, #{tenantId,jdbcType=BIGINT}, 
      #{deleteFlag,jdbcType=VARCHAR})
  
  
    insert into jsh_depot_item
    
      
        id,
      
      
        header_id,
      
      
        material_id,
      
      
        material_extend_id,
      
      
        material_unit,
      
      
        sku,
      
      
        oper_number,
      
      
        basic_number,
      
      
        unit_price,
      
      
        purchase_unit_price,
      
      
        tax_unit_price,
      
      
        all_price,
      
      
        remark,
      
      
        depot_id,
      
      
        another_depot_id,
      
      
        tax_rate,
      
      
        tax_money,
      
      
        tax_last_money,
      
      
        material_type,
      
      
        sn_list,
      
      
        batch_number,
      
      
        expiration_date,
      
      
        link_id,
      
      
        tenant_id,
      
      
        delete_flag,
      
    
    
      
        #{id,jdbcType=BIGINT},
      
      
        #{headerId,jdbcType=BIGINT},
      
      
        #{materialId,jdbcType=BIGINT},
      
      
        #{materialExtendId,jdbcType=BIGINT},
      
      
        #{materialUnit,jdbcType=VARCHAR},
      
      
        #{sku,jdbcType=VARCHAR},
      
      
        #{operNumber,jdbcType=DECIMAL},
      
      
        #{basicNumber,jdbcType=DECIMAL},
      
      
        #{unitPrice,jdbcType=DECIMAL},
      
      
        #{purchaseUnitPrice,jdbcType=DECIMAL},
      
      
        #{taxUnitPrice,jdbcType=DECIMAL},
      
      
        #{allPrice,jdbcType=DECIMAL},
      
      
        #{remark,jdbcType=VARCHAR},
      
      
        #{depotId,jdbcType=BIGINT},
      
      
        #{anotherDepotId,jdbcType=BIGINT},
      
      
        #{taxRate,jdbcType=DECIMAL},
      
      
        #{taxMoney,jdbcType=DECIMAL},
      
      
        #{taxLastMoney,jdbcType=DECIMAL},
      
      
        #{materialType,jdbcType=VARCHAR},
      
      
        #{snList,jdbcType=VARCHAR},
      
      
        #{batchNumber,jdbcType=VARCHAR},
      
      
        #{expirationDate,jdbcType=TIMESTAMP},
      
      
        #{linkId,jdbcType=BIGINT},
      
      
        #{tenantId,jdbcType=BIGINT},
      
      
        #{deleteFlag,jdbcType=VARCHAR},
      
    
  
  
  
    update jsh_depot_item
    
      
        id = #{record.id,jdbcType=BIGINT},
      
      
        header_id = #{record.headerId,jdbcType=BIGINT},
      
      
        material_id = #{record.materialId,jdbcType=BIGINT},
      
      
        material_extend_id = #{record.materialExtendId,jdbcType=BIGINT},
      
      
        material_unit = #{record.materialUnit,jdbcType=VARCHAR},
      
      
        sku = #{record.sku,jdbcType=VARCHAR},
      
      
        oper_number = #{record.operNumber,jdbcType=DECIMAL},
      
      
        basic_number = #{record.basicNumber,jdbcType=DECIMAL},
      
      
        unit_price = #{record.unitPrice,jdbcType=DECIMAL},
      
      
        purchase_unit_price = #{record.purchaseUnitPrice,jdbcType=DECIMAL},
      
      
        tax_unit_price = #{record.taxUnitPrice,jdbcType=DECIMAL},
      
      
        all_price = #{record.allPrice,jdbcType=DECIMAL},
      
      
        remark = #{record.remark,jdbcType=VARCHAR},
      
      
        depot_id = #{record.depotId,jdbcType=BIGINT},
      
      
        another_depot_id = #{record.anotherDepotId,jdbcType=BIGINT},
      
      
        tax_rate = #{record.taxRate,jdbcType=DECIMAL},
      
      
        tax_money = #{record.taxMoney,jdbcType=DECIMAL},
      
      
        tax_last_money = #{record.taxLastMoney,jdbcType=DECIMAL},
      
      
        material_type = #{record.materialType,jdbcType=VARCHAR},
      
      
        sn_list = #{record.snList,jdbcType=VARCHAR},
      
      
        batch_number = #{record.batchNumber,jdbcType=VARCHAR},
      
      
        expiration_date = #{record.expirationDate,jdbcType=TIMESTAMP},
      
      
        link_id = #{record.linkId,jdbcType=BIGINT},
      
      
        tenant_id = #{record.tenantId,jdbcType=BIGINT},
      
      
        delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
      
    
    
      
    
  
  
    update jsh_depot_item
    set id = #{record.id,jdbcType=BIGINT},
      header_id = #{record.headerId,jdbcType=BIGINT},
      material_id = #{record.materialId,jdbcType=BIGINT},
      material_extend_id = #{record.materialExtendId,jdbcType=BIGINT},
      material_unit = #{record.materialUnit,jdbcType=VARCHAR},
      sku = #{record.sku,jdbcType=VARCHAR},
      oper_number = #{record.operNumber,jdbcType=DECIMAL},
      basic_number = #{record.basicNumber,jdbcType=DECIMAL},
      unit_price = #{record.unitPrice,jdbcType=DECIMAL},
      purchase_unit_price = #{record.purchaseUnitPrice,jdbcType=DECIMAL},
      tax_unit_price = #{record.taxUnitPrice,jdbcType=DECIMAL},
      all_price = #{record.allPrice,jdbcType=DECIMAL},
      remark = #{record.remark,jdbcType=VARCHAR},
      depot_id = #{record.depotId,jdbcType=BIGINT},
      another_depot_id = #{record.anotherDepotId,jdbcType=BIGINT},
      tax_rate = #{record.taxRate,jdbcType=DECIMAL},
      tax_money = #{record.taxMoney,jdbcType=DECIMAL},
      tax_last_money = #{record.taxLastMoney,jdbcType=DECIMAL},
      material_type = #{record.materialType,jdbcType=VARCHAR},
      sn_list = #{record.snList,jdbcType=VARCHAR},
      batch_number = #{record.batchNumber,jdbcType=VARCHAR},
      expiration_date = #{record.expirationDate,jdbcType=TIMESTAMP},
      link_id = #{record.linkId,jdbcType=BIGINT},
      tenant_id = #{record.tenantId,jdbcType=BIGINT},
      delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}
    
      
    
  
  
    update jsh_depot_item
    
      
        header_id = #{headerId,jdbcType=BIGINT},
      
      
        material_id = #{materialId,jdbcType=BIGINT},
      
      
        material_extend_id = #{materialExtendId,jdbcType=BIGINT},
      
      
        material_unit = #{materialUnit,jdbcType=VARCHAR},
      
      
        sku = #{sku,jdbcType=VARCHAR},
      
      
        oper_number = #{operNumber,jdbcType=DECIMAL},
      
      
        basic_number = #{basicNumber,jdbcType=DECIMAL},
      
      
        unit_price = #{unitPrice,jdbcType=DECIMAL},
      
      
        purchase_unit_price = #{purchaseUnitPrice,jdbcType=DECIMAL},
      
      
        tax_unit_price = #{taxUnitPrice,jdbcType=DECIMAL},
      
      
        all_price = #{allPrice,jdbcType=DECIMAL},
      
      
        remark = #{remark,jdbcType=VARCHAR},
      
      
        depot_id = #{depotId,jdbcType=BIGINT},
      
      
        another_depot_id = #{anotherDepotId,jdbcType=BIGINT},
      
      
        tax_rate = #{taxRate,jdbcType=DECIMAL},
      
      
        tax_money = #{taxMoney,jdbcType=DECIMAL},
      
      
        tax_last_money = #{taxLastMoney,jdbcType=DECIMAL},
      
      
        material_type = #{materialType,jdbcType=VARCHAR},
      
      
        sn_list = #{snList,jdbcType=VARCHAR},
      
      
        batch_number = #{batchNumber,jdbcType=VARCHAR},
      
      
        expiration_date = #{expirationDate,jdbcType=TIMESTAMP},
      
      
        link_id = #{linkId,jdbcType=BIGINT},
      
      
        tenant_id = #{tenantId,jdbcType=BIGINT},
      
      
        delete_flag = #{deleteFlag,jdbcType=VARCHAR},
      
    
    where id = #{id,jdbcType=BIGINT}
  
  
    update jsh_depot_item
    set header_id = #{headerId,jdbcType=BIGINT},
      material_id = #{materialId,jdbcType=BIGINT},
      material_extend_id = #{materialExtendId,jdbcType=BIGINT},
      material_unit = #{materialUnit,jdbcType=VARCHAR},
      sku = #{sku,jdbcType=VARCHAR},
      oper_number = #{operNumber,jdbcType=DECIMAL},
      basic_number = #{basicNumber,jdbcType=DECIMAL},
      unit_price = #{unitPrice,jdbcType=DECIMAL},
      purchase_unit_price = #{purchaseUnitPrice,jdbcType=DECIMAL},
      tax_unit_price = #{taxUnitPrice,jdbcType=DECIMAL},
      all_price = #{allPrice,jdbcType=DECIMAL},
      remark = #{remark,jdbcType=VARCHAR},
      depot_id = #{depotId,jdbcType=BIGINT},
      another_depot_id = #{anotherDepotId,jdbcType=BIGINT},
      tax_rate = #{taxRate,jdbcType=DECIMAL},
      tax_money = #{taxMoney,jdbcType=DECIMAL},
      tax_last_money = #{taxLastMoney,jdbcType=DECIMAL},
      material_type = #{materialType,jdbcType=VARCHAR},
      sn_list = #{snList,jdbcType=VARCHAR},
      batch_number = #{batchNumber,jdbcType=VARCHAR},
      expiration_date = #{expirationDate,jdbcType=TIMESTAMP},
      link_id = #{linkId,jdbcType=BIGINT},
      tenant_id = #{tenantId,jdbcType=BIGINT},
      delete_flag = #{deleteFlag,jdbcType=VARCHAR}
    where id = #{id,jdbcType=BIGINT}