|
@@ -47,6 +47,7 @@
|
|
<result property="isMultiple" column="is_multiple" jdbcType="VARCHAR"/>
|
|
<result property="isMultiple" column="is_multiple" jdbcType="VARCHAR"/>
|
|
<result property="billingId" column="billing_id" jdbcType="VARCHAR"/>
|
|
<result property="billingId" column="billing_id" jdbcType="VARCHAR"/>
|
|
<result property="billingId" column="billing_id" jdbcType="VARCHAR"/>
|
|
<result property="billingId" column="billing_id" jdbcType="VARCHAR"/>
|
|
|
|
+ <result property="reportType" column="report_type" jdbcType="VARCHAR"/>
|
|
<association property="financeInvoiceInvalidDTO" column="id" select="getFii" javaType="com.jeeplus.test.cw.invoice.service.dto.CwFinanceInvoiceInvalidDTO"></association>
|
|
<association property="financeInvoiceInvalidDTO" column="id" select="getFii" javaType="com.jeeplus.test.cw.invoice.service.dto.CwFinanceInvoiceInvalidDTO"></association>
|
|
<collection property="financeInvoiceReceivablesDTOList" column="id" select="getFirList" ofType="com.jeeplus.test.cw.invoice.service.dto.CwFinanceInvoiceReceivablesDTO"></collection>
|
|
<collection property="financeInvoiceReceivablesDTOList" column="id" select="getFirList" ofType="com.jeeplus.test.cw.invoice.service.dto.CwFinanceInvoiceReceivablesDTO"></collection>
|
|
<collection property="financeInvoiceBaseDTOList" column="id" select="getBaseList" ofType="com.jeeplus.test.cw.invoice.service.dto.CwFinanceInvoiceBaseDTO"></collection>
|
|
<collection property="financeInvoiceBaseDTOList" column="id" select="getBaseList" ofType="com.jeeplus.test.cw.invoice.service.dto.CwFinanceInvoiceBaseDTO"></collection>
|
|
@@ -151,7 +152,8 @@
|
|
fi.invalid_status,
|
|
fi.invalid_status,
|
|
fi.receivables_date,
|
|
fi.receivables_date,
|
|
fi.is_multiple,
|
|
fi.is_multiple,
|
|
- fi.billing_id
|
|
|
|
|
|
+ fi.billing_id,
|
|
|
|
+ fi.report_type
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<sql id="File_Column_List">
|
|
<sql id="File_Column_List">
|
|
@@ -229,6 +231,7 @@
|
|
|
|
|
|
where fib.del_flag = '0' and fib.invoice_id = ${id}
|
|
where fib.del_flag = '0' and fib.invoice_id = ${id}
|
|
</select>
|
|
</select>
|
|
|
|
+<!--
|
|
<select id="findList" resultMap="BaseResultMap">
|
|
<select id="findList" resultMap="BaseResultMap">
|
|
select
|
|
select
|
|
DISTINCT
|
|
DISTINCT
|
|
@@ -255,8 +258,65 @@
|
|
${ew.customSqlSegment}
|
|
${ew.customSqlSegment}
|
|
ORDER BY
|
|
ORDER BY
|
|
fi.create_date DESC, cfid.number asc
|
|
fi.create_date DESC, cfid.number asc
|
|
|
|
+ </select>-->
|
|
|
|
+ <select id="findList" resultMap="BaseResultMap">
|
|
|
|
+ SELECT
|
|
|
|
+ DISTINCT
|
|
|
|
+ <include refid="Base_Column_List"></include>,
|
|
|
|
+ su.NAME AS operator,
|
|
|
|
+ so.NAME AS operator_office,
|
|
|
|
+ wipr1.program_id,
|
|
|
|
+ (case when (wipr1.program_id IS NULL or wipr1.program_id = '') then
|
|
|
|
+ concat( '其他:', wipr1.program_name ) else (select rpr1.project_name from cw_project_records rpr1 where wipr1.program_id = rpr1.id ) end) as 'programName',
|
|
|
|
+
|
|
|
|
+ cfid.number AS "number",
|
|
|
|
+ cfid.account AS "accountDetail"
|
|
|
|
+ from cw_finance_invoice_base wipr1
|
|
|
|
+ left join cw_finance_invoice fi on fi.id = wipr1.invoice_id
|
|
|
|
+ LEFT JOIN cw_finance_invoice_detail cfid ON cfid.invoice_id = fi.id
|
|
|
|
+ AND cfid.del_flag = '0'
|
|
|
|
+ LEFT JOIN sys_user su ON fi.create_by = su.id
|
|
|
|
+ AND su.del_flag = '0'
|
|
|
|
+ LEFT JOIN sys_user_manage_office sumo ON sumo.office_id = su.office_id
|
|
|
|
+ LEFT JOIN sys_office so ON su.office_id = so.id
|
|
|
|
+ AND so.del_flag = '0'
|
|
|
|
+ ${ew.customSqlSegment}
|
|
|
|
+ ORDER BY
|
|
|
|
+ fi.create_date DESC,
|
|
|
|
+ cfid.number ASC
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+
|
|
|
|
+<!-- <select id="findList" resultMap="BaseResultMap">-->
|
|
|
|
+<!-- select-->
|
|
|
|
+<!-- DISTINCT-->
|
|
|
|
+<!-- <include refid="Base_Column_List"></include>,-->
|
|
|
|
+<!-- su.name AS operator,-->
|
|
|
|
+<!-- so.name AS operator_office,-->
|
|
|
|
+<!-- d.ID_ AS task_id,-->
|
|
|
|
+<!-- rpr1.project_name AS programName,-->
|
|
|
|
+<!-- cfid.number AS "number",-->
|
|
|
|
+<!-- cfid.account AS "accountDetail"-->
|
|
|
|
+<!-- FROM cw_finance_invoice_base wipr1-->
|
|
|
|
+<!-- LEFT JOIN cw_finance_invoice fi ON fi.id = wipr1.invoice_id-->
|
|
|
|
+<!-- LEFT JOIN cw_finance_invoice_detail cfid ON cfid.invoice_id = fi.id AND cfid.del_flag = '0'-->
|
|
|
|
+<!-- LEFT JOIN sys_user su ON fi.create_by = su.id AND su.del_flag = '0'-->
|
|
|
|
+<!-- LEFT JOIN sys_user_manage_office sumo ON sumo.office_id = su.office_id-->
|
|
|
|
+<!-- LEFT JOIN sys_office so ON su.office_id = so.id AND so.del_flag = '0'-->
|
|
|
|
+<!-- LEFT JOIN act_ru_task d ON fi.proc_ins_id = d.PROC_INST_ID_-->
|
|
|
|
+<!-- LEFT JOIN cw_project_records rpr1 ON wipr1.program_id = rpr1.id-->
|
|
|
|
+<!-- WHERE fi.no IN (-->
|
|
|
|
+<!-- SELECT fi2.no-->
|
|
|
|
+<!-- FROM cw_finance_invoice_base wipr2-->
|
|
|
|
+<!-- LEFT JOIN cw_finance_invoice fi2 ON fi2.id = wipr2.invoice_id-->
|
|
|
|
+<!-- LEFT JOIN cw_project_records rpr2 ON wipr2.program_id = rpr2.id-->
|
|
|
|
+<!-- GROUP BY fi2.no-->
|
|
|
|
+<!-- HAVING COUNT(rpr2.project_name) > 1-->
|
|
|
|
+<!-- )-->
|
|
|
|
+<!-- ORDER BY fi.create_date DESC, cfid.number ASC;-->
|
|
|
|
+<!-- </select>-->
|
|
|
|
+
|
|
|
|
+
|
|
<select id="queryById" resultMap="BaseResultMap">
|
|
<select id="queryById" resultMap="BaseResultMap">
|
|
select
|
|
select
|
|
<include refid="Base_Column_List"></include>
|
|
<include refid="Base_Column_List"></include>
|
|
@@ -264,6 +324,7 @@
|
|
where fi.del_flag = '0' and fi.id = #{id}
|
|
where fi.del_flag = '0' and fi.id = #{id}
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+
|
|
<select id="getIdByProjectId" resultType="string">
|
|
<select id="getIdByProjectId" resultType="string">
|
|
select
|
|
select
|
|
invoice_id
|
|
invoice_id
|
|
@@ -304,8 +365,31 @@
|
|
from cw_finance_invoice cw_fi
|
|
from cw_finance_invoice cw_fi
|
|
where cw_fi.del_flag = '0' and cw_fi.billing_workplace_real_id = #{id}
|
|
where cw_fi.del_flag = '0' and cw_fi.billing_workplace_real_id = #{id}
|
|
</select>
|
|
</select>
|
|
|
|
+ <select id="selectProgramName" resultType="com.jeeplus.test.cw.invoice.domain.CwFinanceInvoiceBase">
|
|
|
|
+ select
|
|
|
|
+ id,
|
|
|
|
+ create_by,
|
|
|
|
+ create_date,
|
|
|
|
+ update_by,
|
|
|
|
+ update_date,
|
|
|
|
+ del_flag,
|
|
|
|
+ invoice_id,
|
|
|
|
+ program_id,
|
|
|
|
+ program_name,
|
|
|
|
+ contract_name,
|
|
|
|
+ program_no,
|
|
|
|
+ contract_id,
|
|
|
|
+ account
|
|
|
|
+ from cw_finance_invoice_base where invoice_id = #{invoiceId}
|
|
|
|
+ </select>
|
|
|
|
|
|
<update id="setReceivablesDateNull" parameterType="string">
|
|
<update id="setReceivablesDateNull" parameterType="string">
|
|
update cw_finance_invoice set receivables_date = null where id = #{id}
|
|
update cw_finance_invoice set receivables_date = null where id = #{id}
|
|
</update>
|
|
</update>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
</mapper>
|
|
</mapper>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|