|
|
@@ -9,10 +9,13 @@
|
|
|
a.subcontractor_id AS "subcontractorId",
|
|
|
a.cp_id AS "cpId",
|
|
|
a.service_rate AS "serviceRate",
|
|
|
+ a.subcontract as "subcontract",
|
|
|
a.create_time AS "createTime",
|
|
|
a.create_by AS "createBy.id",
|
|
|
a.update_time AS "updateTime",
|
|
|
a.update_by AS "updateBy.id",
|
|
|
+ a.start_date as "startDate",
|
|
|
+ a.end_date as "endDate",
|
|
|
hs.name as "hlwSubcontractorName"
|
|
|
</sql>
|
|
|
|
|
|
@@ -28,5 +31,23 @@
|
|
|
order by a.update_time desc,a.id asc
|
|
|
</select>
|
|
|
|
|
|
+ <select id="subtractList" resultType="org.jeecg.modules.hlwcpmanager.entity.HlwCpSubcontractor">
|
|
|
+ SELECT
|
|
|
+ <include refid="hlwCpSubcontractorColumns"/>
|
|
|
+ FROM hlw_cp_subcontractor a
|
|
|
+ <include refid="hlwCpSubcontractorJoins"/>
|
|
|
+ where a.subcontractor_id=#{hlwCpSubcontractor.subcontractorId}
|
|
|
+ order by a.update_time desc,a.id asc
|
|
|
+ </select>
|
|
|
|
|
|
+
|
|
|
+ <select id="findHlwCpSubcontractorList" resultType="org.jeecg.modules.hlwcpmanager.entity.HlwCpSubcontractor">
|
|
|
+ SELECT
|
|
|
+ <include refid="hlwCpSubcontractorColumns"/>
|
|
|
+ FROM hlw_cp_subcontractor a
|
|
|
+ <include refid="hlwCpSubcontractorJoins"/>
|
|
|
+ where a.subcontractor_id=#{hlwCpSubcontractor.subcontractorId}
|
|
|
+ and to_days(a.start_date) <= to_days(#{hlwCpSubcontractor.startDate})
|
|
|
+ and to_days(a.end_date) >= to_days(#{hlwCpSubcontractor.startDate})
|
|
|
+ </select>
|
|
|
</mapper>
|