t . id , t.create_time , t.update_time , t.creator , t.delete_type , t.tenant_key , t.tax_declare_record_id , t.tax_declaration_id , t.employee_type , t.employee_id , t.result_value_json INSERT INTO hrsa_tax_declaration_value id, create_time, update_time, creator, delete_type, tenant_key, tax_declare_record_id, tax_declaration_id, employee_type, employee_id, result_value_json, #{id}, #{createTime}, #{updateTime}, #{creator}, #{deleteType}, #{tenantKey}, #{taxDeclareRecordId}, #{taxDeclarationId}, #{employeeType}, #{employeeId}, #{resultValueJson}, INSERT INTO hrsa_tax_declaration_value ( id, create_time, update_time, creator, delete_type, tenant_key, tax_declare_record_id, tax_declaration_id, employee_type, employee_id, result_value_json ) VALUES ( #{item.id}, #{item.createTime}, #{item.updateTime}, #{item.creator}, #{item.deleteType}, #{item.tenantKey}, #{item.taxDeclareRecordId}, #{item.taxDeclarationId}, #{item.employeeType}, #{item.employeeId}, #{item.resultValueJson} ) INSERT INTO hrsa_tax_declaration_value ( id, create_time, update_time, creator, delete_type, tenant_key, tax_declare_record_id, tax_declaration_id, employee_type, employee_id, result_value_json ) select #{item.id,jdbcType=DOUBLE}, #{item.createTime,jdbcType=DATE}, #{item.updateTime,jdbcType=DATE}, #{item.creator,jdbcType=DOUBLE}, #{item.deleteType,jdbcType=INTEGER}, #{item.tenantKey,jdbcType=VARCHAR}, #{item.taxDeclareRecordId,jdbcType=DOUBLE}, #{item.taxDeclarationId,jdbcType=DOUBLE}, #{item.employeeType,jdbcType=INTEGER}, #{item.employeeId,jdbcType=DOUBLE}, #{item.resultValueJson,jdbcType=VARCHAR} from dual INSERT INTO hrsa_tax_declaration_value ( id, create_time, update_time, creator, delete_type, tenant_key, tax_declare_record_id, tax_declaration_id, employee_type, employee_id, result_value_json ) VALUES ( #{item.id}, #{item.createTime}, #{item.updateTime}, #{item.creator}, #{item.deleteType}, #{item.tenantKey}, #{item.taxDeclareRecordId}, #{item.taxDeclarationId}, #{item.employeeType}, #{item.employeeId}, #{item.resultValueJson} ) UPDATE hrsa_tax_declaration_value create_time=#{createTime}, update_time=#{updateTime}, creator=#{creator}, delete_type=#{deleteType}, tenant_key=#{tenantKey}, tax_declare_record_id=#{taxDeclareRecordId}, tax_declaration_id=#{taxDeclarationId}, employee_type=#{employeeType}, employee_id=#{employeeId}, result_value_json=#{resultValueJson}, WHERE id = #{id} AND delete_type = 0 UPDATE hrsa_tax_declaration_value create_time=#{createTime}, update_time=#{updateTime}, creator=#{creator}, delete_type=#{deleteType}, tenant_key=#{tenantKey}, tax_declare_record_id=#{taxDeclareRecordId}, tax_declaration_id=#{taxDeclarationId}, employee_type=#{employeeType}, employee_id=#{employeeId}, result_value_json=#{resultValueJson}, WHERE id = #{id} AND delete_type = 0 UPDATE hrsa_tax_declaration_value SET delete_type=1 WHERE id = #{id} AND delete_type = 0 UPDATE hrsa_tax_declaration_value SET delete_type = 1 WHERE delete_type = 0 AND id IN #{id} UPDATE hrsa_tax_declaration_value SET delete_type = 1 WHERE delete_type = 0 AND tax_declare_record_id IN #{taxDeclareRecordId} employee_id , employee_type SELECT DISTINCT FROM hrsa_tax_declaration_value WHERE delete_type = 0 AND tax_declare_record_id = #{param.taxDeclareRecordId} AND employee_id NOT IN ( SELECT employee_id FROM hrsa_employee_declare hed WHERE hed.delete_type = 0 AND hed.tax_agent_id = #{param.taxAgentId} AND hed.tax_cycle = #{param.taxCycle} AND hed.successfully_declared = 1 AND hed.employment_status = 0 AND hed.declare_status IN (4) ) SELECT FROM hrsa_employee_declare WHERE delete_type = 0 AND tax_agent_id = #{param.taxAgentId} AND tax_cycle = #{param.taxCycle} AND successfully_declared = 1 AND employment_status = 0 AND employee_id NOT IN ( SELECT employee_id FROM hrsa_tax_declaration_value htdv WHERE htdv.delete_type = 0 AND htdv.tax_declare_record_id = #{param.taxDeclareRecordId} )