| | |
| | | <mapper namespace="com.ycl.platform.mapper.CalculateRecordMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ycl.platform.domain.vo.CalculateRecordVO"> |
| | | <resultMap id="BaseResultMap" type="com.ycl.platform.domain.vo.CalculateReportDetailVO"> |
| | | <result column="id" property="id" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="rule_id" property="ruleId" /> |
| | | <result column="rule_name" property="ruleName" /> |
| | | <result column="deduct_category" property="deductCategory" /> |
| | | <result column="rule_condition" property="ruleCondition" /> |
| | | <result column="rule_desc" property="ruleDesc" /> |
| | | <result column="deduct_category" property="unitName" /> |
| | | <result column="score_condition" property="contractName" /> |
| | | <result column="description" property="calculateTime" /> |
| | | <result column="deduct_money" property="deductMoney" /> |
| | | <result column="score" property="score" /> |
| | | <result column="score" property="deductMoney" /> |
| | | <collection property="recordList" column="contract_id" select="selectByContractId" ofType="com.ycl.platform.domain.vo.CalculateMoneyRuleVO"/> |
| | | </resultMap> |
| | | |
| | | <select id="getByContractId" resultMap="BaseResultMap"> |
| | | SELECT |
| | | tcr.id, |
| | | tcr.create_time, |
| | | tcr.deduct_money, |
| | | tcr.score, |
| | | tcr.rule_id, |
| | | tcru.rule_name, |
| | | tcru.deduct_category, |
| | | tcru.rule_desc, |
| | | tcru.rule_condition |
| | | FROM |
| | | t_calculate_record tcr |
| | | INNER JOIN t_calculate_rule tcru ON tcr.rule_id = tcru.id AND tcr.contract_id = #{contractId} |
| | | WHERE |
| | | tcru.deleted = 0 AND tcr.deleted = 0 |
| | | </select> |
| | | |
| | | |
| | | </mapper> |