zhangback
8 天以前 90c4fbd121dd18013e333346c99bbc9844cd6fec
tms/src/main/resources/mapper/tms/TmsContractMapper.xml
@@ -41,10 +41,18 @@
        <result property="updateBy"    column="update_by"    />
        <result property="updateTime"    column="update_time"    />
        <result property="remark"    column="remark"    />
        <result property="isTempContract"    column="is_temp_contract"    />
        <result property="cycleType"    column="cycle_type"    />
        <result property="billingCycleLastMonthDay"    column="billing_cycle_last_month_day"    />
        <result property="billingCycleCurrentMonthDay"    column="billing_cycle_current_month_day"    />
        <result property="reconciliationDay"    column="reconciliation_day"    />
        <result property="invoiceDay"    column="invoice_day"    />
        <result property="paymentDay"    column="payment_day"    />
        <result property="totalAccountDay"    column="total_account_day"    />
    </resultMap>
    <sql id="selectTmsContractVo">
        select thisTab.id, thisTab.system_code, thisTab.contract_code, thisTab.contract_name, thisTab.contract_type, thisTab.sign_date, thisTab.contract_start_date, thisTab.contract_end_date, thisTab.contract_status, thisTab.party_a_name, thisTab.party_a_id, thisTab.party_a_contact, thisTab.party_a_contact_info, thisTab.party_b_name, thisTab.party_b_id, thisTab.party_b_contact, thisTab.party_b_contact_info, thisTab.contract_amount, thisTab.payment_method, thisTab.payment_cycle, thisTab.paid_amount, thisTab.unpaid_amount, thisTab.invoice_status, thisTab.fulfillment_status, thisTab.fulfillment_progress, thisTab.acceptance_status, thisTab.attachment_name, thisTab.attachment_path, thisTab.uploaded_by, thisTab.upload_time, thisTab.status, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.remark from tms_contract AS thisTab
        select thisTab.id, thisTab.system_code, thisTab.contract_code, thisTab.contract_name, thisTab.contract_type, thisTab.sign_date, thisTab.contract_start_date, thisTab.contract_end_date, thisTab.contract_status, thisTab.party_a_name, thisTab.party_a_id, thisTab.party_a_contact, thisTab.party_a_contact_info, thisTab.party_b_name, thisTab.party_b_id, thisTab.party_b_contact, thisTab.party_b_contact_info, thisTab.contract_amount, thisTab.payment_method, thisTab.payment_cycle, thisTab.paid_amount, thisTab.unpaid_amount, thisTab.invoice_status, thisTab.fulfillment_status, thisTab.fulfillment_progress, thisTab.acceptance_status, thisTab.attachment_name, thisTab.attachment_path, thisTab.uploaded_by, thisTab.upload_time, thisTab.status, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.remark,thisTab.is_temp_contract,  thisTab.cycle_type, thisTab.billing_cycle_last_month_day, thisTab.billing_cycle_current_month_day, thisTab.reconciliation_day, thisTab.invoice_day, thisTab.payment_day, thisTab.total_account_day  from tms_contract AS thisTab
    </sql>
    <sql id="selectTmsContractVoCount">
        select count(0) from tms_contract as thisTab
@@ -70,6 +78,14 @@
        <if test="fulfillmentStatus != null "> and thisTab.fulfillment_status = #{fulfillmentStatus}</if>
        <if test="acceptanceStatus != null "> and thisTab.acceptance_status = #{acceptanceStatus}</if>
        <if test="status != null "> and thisTab.status = #{status}</if>
        <if test="isTempContract != null "> and thisTab.is_temp_contract = #{isTempContract}</if>
        <if test="cycleType != null "> and thisTab.cycle_type = #{cycleType}</if>
        <if test="billingCycleLastMonthDay != null "> and thisTab.billing_cycle_last_month_day = #{billingCycleLastMonthDay}</if>
        <if test="billingCycleCurrentMonthDay != null "> and thisTab.billing_cycle_current_month_day = #{billingCycleCurrentMonthDay}</if>
        <if test="reconciliationDay != null "> and thisTab.reconciliation_day = #{reconciliationDay}</if>
        <if test="invoiceDay != null "> and thisTab.invoice_day = #{invoiceDay}</if>
        <if test="paymentDay != null "> and thisTab.payment_day = #{paymentDay}</if>
        <if test="totalAccountDay != null "> and thisTab.total_account_day = #{totalAccountDay}</if>
    </sql>
    <!--查询-->
@@ -132,6 +148,14 @@
            <if test="updateBy != null">update_by,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="remark != null">remark,</if>
            <if test="isTempContract != null">is_temp_contract,</if>
            <if test="cycleType != null">cycle_type,</if>
            <if test="billingCycleLastMonthDay != null">billing_cycle_last_month_day,</if>
            <if test="billingCycleCurrentMonthDay != null">billing_cycle_current_month_day,</if>
            <if test="reconciliationDay != null">reconciliation_day,</if>
            <if test="invoiceDay != null">invoice_day,</if>
            <if test="paymentDay != null">payment_day,</if>
            <if test="totalAccountDay != null">total_account_day,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="systemCode != null and systemCode != ''">#{systemCode},</if>
@@ -169,17 +193,25 @@
            <if test="updateBy != null">#{updateBy},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="remark != null">#{remark},</if>
            <if test="isTempContract != null">#{isTempContract},</if>
            <if test="cycleType != null">#{cycleType},</if>
            <if test="billingCycleLastMonthDay != null">#{billingCycleLastMonthDay},</if>
            <if test="billingCycleCurrentMonthDay != null">#{billingCycleCurrentMonthDay},</if>
            <if test="reconciliationDay != null">#{reconciliationDay},</if>
            <if test="invoiceDay != null">#{invoiceDay},</if>
            <if test="paymentDay != null">#{paymentDay},</if>
            <if test="totalAccountDay != null">#{totalAccountDay},</if>
        </trim>
    </insert>
    <insert id="insertTmsContractBatch" parameterType="java.util.List"  useGeneratedKeys="true" keyProperty="id">
        insert into tms_contract
        <trim prefix="(" suffix=") values" suffixOverrides=",">
            id,system_code,contract_code,contract_name,contract_type,sign_date,contract_start_date,contract_end_date,contract_status,party_a_name,party_a_id,party_a_contact,party_a_contact_info,party_b_name,party_b_id,party_b_contact,party_b_contact_info,contract_amount,payment_method,payment_cycle,paid_amount,unpaid_amount,invoice_status,fulfillment_status,fulfillment_progress,acceptance_status,attachment_name,attachment_path,uploaded_by,upload_time,status,create_by,create_time,update_by,update_time,remark,
            id,system_code,contract_code,contract_name,contract_type,sign_date,contract_start_date,contract_end_date,contract_status,party_a_name,party_a_id,party_a_contact,party_a_contact_info,party_b_name,party_b_id,party_b_contact,party_b_contact_info,contract_amount,payment_method,payment_cycle,paid_amount,unpaid_amount,invoice_status,fulfillment_status,fulfillment_progress,acceptance_status,attachment_name,attachment_path,uploaded_by,upload_time,status,create_by,create_time,update_by,update_time,remark,is_temp_contract,cycle_type,billing_cycle_last_month_day,billing_cycle_current_month_day,reconciliation_day,invoice_day,payment_day,total_account_day,
        </trim>
        <foreach item="item" index="index" collection="list" separator=",">
            <trim prefix="(" suffix=") " suffixOverrides=",">
                #{item.id},#{item.systemCode},#{item.contractCode},#{item.contractName},#{item.contractType},#{item.signDate},#{item.contractStartDate},#{item.contractEndDate},#{item.contractStatus},#{item.partyAName},#{item.partyAId},#{item.partyAContact},#{item.partyAContactInfo},#{item.partyBName},#{item.partyBId},#{item.partyBContact},#{item.partyBContactInfo},#{item.contractAmount},#{item.paymentMethod},#{item.paymentCycle},#{item.paidAmount},#{item.unpaidAmount},#{item.invoiceStatus},#{item.fulfillmentStatus},#{item.fulfillmentProgress},#{item.acceptanceStatus},#{item.attachmentName},#{item.attachmentPath},#{item.uploadedBy},#{item.uploadTime},#{item.status},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.remark},
                #{item.id},#{item.systemCode},#{item.contractCode},#{item.contractName},#{item.contractType},#{item.signDate},#{item.contractStartDate},#{item.contractEndDate},#{item.contractStatus},#{item.partyAName},#{item.partyAId},#{item.partyAContact},#{item.partyAContactInfo},#{item.partyBName},#{item.partyBId},#{item.partyBContact},#{item.partyBContactInfo},#{item.contractAmount},#{item.paymentMethod},#{item.paymentCycle},#{item.paidAmount},#{item.unpaidAmount},#{item.invoiceStatus},#{item.fulfillmentStatus},#{item.fulfillmentProgress},#{item.acceptanceStatus},#{item.attachmentName},#{item.attachmentPath},#{item.uploadedBy},#{item.uploadTime},#{item.status},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.remark},#{item.isTempContract},#{item.cycleType},#{item.billingCycleLastMonthDay},#{item.billingCycleCurrentMonthDay},#{item.reconciliationDay},#{item.invoiceDay},#{item.paymentDay},#{item.totalAccountDay},
            </trim>
        </foreach>
    </insert>
@@ -223,6 +255,14 @@
            <if test="updateBy != null">update_by = #{updateBy},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="remark != null">remark = #{remark},</if>
            <if test="isTempContract != null">is_temp_contract = #{isTempContract},</if>
            <if test="cycleType != null">cycle_type = #{cycleType},</if>
            <if test="billingCycleLastMonthDay != null">billing_cycle_last_month_day = #{billingCycleLastMonthDay},</if>
            <if test="billingCycleCurrentMonthDay != null">billing_cycle_current_month_day = #{billingCycleCurrentMonthDay},</if>
            <if test="reconciliationDay != null">reconciliation_day = #{reconciliationDay},</if>
            <if test="invoiceDay != null">invoice_day = #{invoiceDay},</if>
            <if test="paymentDay != null">payment_day = #{paymentDay},</if>
            <if test="totalAccountDay != null">total_account_day = #{totalAccountDay},</if>
        </trim>
        where id = #{id}
    </update>
@@ -266,6 +306,14 @@
                <if test="item.updateBy != null">update_by = #{item.updateBy},</if>
                <if test="item.updateTime != null">update_time = #{item.updateTime},</if>
                <if test="item.remark != null">remark = #{item.remark},</if>
                <if test="item.isTempContract != null">is_temp_contract = #{item.isTempContract},</if>
                <if test="item.cycleType != null">cycle_type = #{item.cycleType},</if>
                <if test="item.billingCycleLastMonthDay != null">billing_cycle_last_month_day = #{item.billingCycleLastMonthDay},</if>
                <if test="item.billingCycleCurrentMonthDay != null">billing_cycle_current_month_day = #{item.billingCycleCurrentMonthDay},</if>
                <if test="item.reconciliationDay != null">reconciliation_day = #{item.reconciliationDay},</if>
                <if test="item.invoiceDay != null">invoice_day = #{item.invoiceDay},</if>
                <if test="item.paymentDay != null">payment_day = #{item.paymentDay},</if>
                <if test="item.totalAccountDay != null">total_account_day = #{item.totalAccountDay},</if>
            </trim>
            where id = #{item.id}
        </foreach>