|
@@ -52,6 +52,49 @@
|
|
|
<collection property="financeInvoiceDetailDTOList" column="id" select="getFidList" ofType="com.jeeplus.finance.invoice.service.dto.CwFinanceInvoiceDetailDTO"></collection>
|
|
|
<collection property="workAttachmentDtoList" ofType="com.jeeplus.sys.domain.WorkAttachmentInfo" column="id" select="getFileList"></collection>
|
|
|
</resultMap>
|
|
|
+ <resultMap id="BaseExportResultMap" type="com.jeeplus.finance.invoice.service.dto.CwFinanceInvoiceDTO">
|
|
|
+ <id property="id" column="id" jdbcType="VARCHAR"/>
|
|
|
+ <result property="createBy.id" column="create_by_id" jdbcType="VARCHAR"/>
|
|
|
+ <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="updateBy.id" column="update_by_id" jdbcType="VARCHAR"/>
|
|
|
+ <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="delFlag" column="del_flag" jdbcType="INTEGER"/>
|
|
|
+ <result property="remarks" column="remarks" jdbcType="VARCHAR"/>
|
|
|
+ <result property="type" column="type" jdbcType="VARCHAR"/>
|
|
|
+ <result property="no" column="no" jdbcType="VARCHAR"/>
|
|
|
+ <result property="billingType" column="billing_type" jdbcType="VARCHAR"/>
|
|
|
+ <result property="billingWorkplaceReal" column="billing_workplace_real" jdbcType="VARCHAR"/>
|
|
|
+ <result property="taxpayerIdentificationNo" column="taxpayer_identification_no" jdbcType="VARCHAR"/>
|
|
|
+ <result property="address" column="address" jdbcType="VARCHAR"/>
|
|
|
+ <result property="telPhone" column="tel_phone" jdbcType="VARCHAR"/>
|
|
|
+ <result property="openBank" column="open_bank" jdbcType="VARCHAR"/>
|
|
|
+ <result property="bankAccount" column="bank_account" jdbcType="VARCHAR"/>
|
|
|
+ <result property="name" column="name" jdbcType="VARCHAR"/>
|
|
|
+ <result property="receivablesType" column="receivables_type" jdbcType="VARCHAR"/>
|
|
|
+ <result property="billingContent" column="billing_content" jdbcType="VARCHAR"/>
|
|
|
+ <result property="account" column="account" jdbcType="VARCHAR"/>
|
|
|
+ <result property="billingContentTerms" column="billing_content_terms" jdbcType="VARCHAR"/>
|
|
|
+ <result property="billingPeople" column="billing_people" jdbcType="VARCHAR"/>
|
|
|
+ <result property="billingDate" column="billing_date" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="collectDate" column="collect_date" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="billingPeopleReal" column="billing_people_real" jdbcType="VARCHAR"/>
|
|
|
+ <result property="reconciliationPeople" column="reconciliation_people" jdbcType="VARCHAR"/>
|
|
|
+ <result property="reconciliationArea" column="reconciliation_area" jdbcType="VARCHAR"/>
|
|
|
+ <result property="billingWorkplaceRealId" column="billing_workplace_real_id" jdbcType="VARCHAR"/>
|
|
|
+ <result property="billingPeopleId" column="billing_people_id" jdbcType="VARCHAR"/>
|
|
|
+ <result property="status" column="status" jdbcType="VARCHAR"/>
|
|
|
+ <result property="procInsId" column="proc_ins_id" jdbcType="VARCHAR"/>
|
|
|
+ <result property="processDefinitionId" column="process_definition_id" jdbcType="VARCHAR"/>
|
|
|
+ <result property="receivablesStatus" column="receivables_status" jdbcType="VARCHAR"/>
|
|
|
+ <result property="invalidStatus" column="invalid_status" jdbcType="VARCHAR"/>
|
|
|
+ <result property="receivablesDate" column="receivables_date" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="operator" column="operator" jdbcType="VARCHAR"/>
|
|
|
+ <result property="operatorOffice" column="operator_office" jdbcType="VARCHAR"/>
|
|
|
+ <result property="invalidTaskId" column="invalid_task_id" jdbcType="VARCHAR"/>
|
|
|
+ <result property="taskId" column="task_id" jdbcType="VARCHAR"/>
|
|
|
+ <result property="isMultiple" column="is_multiple" jdbcType="VARCHAR"/>
|
|
|
+ <result property="billingId" column="billing_id" jdbcType="VARCHAR"/>
|
|
|
+ </resultMap>
|
|
|
|
|
|
<resultMap id="AttachmentMap" type="com.jeeplus.sys.service.dto.WorkAttachmentInfoDTO">
|
|
|
<id property="id" column="id" jdbcType="VARCHAR"/>
|
|
@@ -267,6 +310,44 @@
|
|
|
fi.create_time DESC, cfid.number asc
|
|
|
</select>
|
|
|
|
|
|
+<select id="findExportList" resultMap="BaseExportResultMap">
|
|
|
+ select DISTINCT a.id as 'baseId',
|
|
|
+ <include refid="Base_Column_List"></include>,
|
|
|
+ su.name as operator,
|
|
|
+ so.name as operator_office,
|
|
|
+ d.ID_ AS task_id,
|
|
|
+ (
|
|
|
+ case
|
|
|
+ when a.type = '0' then (concat('其他:',a.program_name))
|
|
|
+ when a.type = '1' then (select rpr.project_name from cw_project_records rpr where id = a.program_id)
|
|
|
+ when a.type = '2' then (select rpr.project_name from cw_project_records rpr where id = (select project_id from cw_project_report where id = a.program_id))
|
|
|
+ else '' end
|
|
|
+ ) as programName,
|
|
|
+
|
|
|
+ (
|
|
|
+ case
|
|
|
+ when a.type = '0' then (fi.report_type)
|
|
|
+ when a.type = '1' then (select rpr.report_type from cw_project_records rpr where id = a.program_id)
|
|
|
+ when a.type = '2' then (select rpr.report_type from cw_project_records rpr where id = (select project_id from cw_project_report where id = a.program_id))
|
|
|
+ else '' end
|
|
|
+ ) as reportType,
|
|
|
+ cfid.number as "number",
|
|
|
+ cfid.account as "accountDetail",
|
|
|
+ a.program_id,
|
|
|
+ a.type as 'recordType'
|
|
|
+ from cw_finance_invoice_base a
|
|
|
+ left join cw_finance_invoice fi on a.invoice_id = fi.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_id = 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 pr on a.program_id=pr.id
|
|
|
+ ${ew.customSqlSegment}
|
|
|
+ ORDER BY
|
|
|
+ fi.create_time DESC, cfid.number asc
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="queryById" resultMap="BaseResultMap">
|
|
|
select
|
|
|
DISTINCT
|