agreement.md 1.32 KB

合同管理

合同状态

操作 status oprations
暂存 100 3
保存(待审核) 500 3
待审核->驳回 900 3
待审核->审核通过 200 4
审核通过->续约 500 2
续约->审核通过 200 2
续约->驳回 900 2
审核通过->解约 500 1
解约->审核通过 200 1(end_agreement:Y)
解约->驳回 900 1

例如,根据品牌id获取jit供应商,筛选有效合同

<select id="selectValidJitSupplierBySupplierId" resultMap="BaseResultMap">
        <bind name="size" value="@com.yohobuy.platform.common.util.SqlUtils@getSize(supplierIds)" />
        select <include refid="Base_Column_List" />
        from agreement
        <where>
        <if test="supplierIds !=null and size!=0">
             supplier_id in
            <foreach collection="supplierIds" item="supplierId" open="(" separator="," close=")">
                #{supplierId}
            </foreach>
        </if>
        and agreement_end_time > FROM_UNIXTIME(UNIX_TIMESTAMP(),'%Y-%m-%d') and
        operations != 3 and `status` in (200,500,900) and end_agreement = 'N' and business_model = 7
        </where>
    </select>