新增亲属资产领域对象与映射
This commit is contained in:
@@ -34,13 +34,14 @@
|
||||
ORDER BY create_time DESC, asset_id DESC
|
||||
</select>
|
||||
|
||||
<select id="selectByPersonId" resultMap="CcdiAssetInfoResultMap">
|
||||
<select id="selectByFamilyIdAndPersonId" resultMap="CcdiAssetInfoResultMap">
|
||||
SELECT
|
||||
asset_id, family_id, person_id, asset_main_type, asset_sub_type, asset_name,
|
||||
ownership_ratio, purchase_eval_date, original_value, current_value,
|
||||
valuation_date, asset_status, remarks, create_by, create_time, update_by, update_time
|
||||
FROM ccdi_asset_info
|
||||
WHERE person_id = #{personId}
|
||||
WHERE family_id = #{familyId}
|
||||
AND person_id = #{personId}
|
||||
ORDER BY create_time DESC, asset_id DESC
|
||||
</select>
|
||||
|
||||
@@ -49,6 +50,12 @@
|
||||
WHERE family_id = #{familyId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByFamilyIdAndPersonId">
|
||||
DELETE FROM ccdi_asset_info
|
||||
WHERE family_id = #{familyId}
|
||||
AND person_id = #{personId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByFamilyIds">
|
||||
DELETE FROM ccdi_asset_info
|
||||
WHERE family_id IN
|
||||
@@ -70,26 +77,15 @@
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<select id="selectOwnerByEmployeeIdCards" resultType="map">
|
||||
SELECT
|
||||
id_card AS personId,
|
||||
id_card AS familyId
|
||||
FROM ccdi_base_staff
|
||||
WHERE id_card IN
|
||||
<foreach collection="personIds" item="personId" open="(" separator="," close=")">
|
||||
#{personId}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="selectOwnerByFamilyRelationIdCards" resultType="map">
|
||||
<select id="selectOwnerCandidatesByRelationCertNos" resultType="map">
|
||||
SELECT
|
||||
relation_cert_no AS personId,
|
||||
person_id AS familyId
|
||||
FROM ccdi_staff_fmy_relation
|
||||
WHERE is_emp_family = 1
|
||||
AND relation_cert_no IN
|
||||
<foreach collection="personIds" item="personId" open="(" separator="," close=")">
|
||||
#{personId}
|
||||
<foreach collection="relationCertNos" item="relationCertNo" open="(" separator="," close=")">
|
||||
#{relationCertNo}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user