<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!--<mapper namespace="com.mes.order.mapper.OrdersMapper">-->
|
<!-- <resultMap id="baseMap" type="com.mes.order.entity.dto.OrderDTO">-->
|
<!-- <result column="order_id" property="orderId"/>-->
|
<!-- <result column="customer_name" property="customerName"/>-->
|
<!-- <result column="project" property="project"/>-->
|
<!-- <result column="area" property="area"/>-->
|
<!-- <result column="quantity" property="quantity"/>-->
|
<!-- <result column="create_time" property="createTime"/>-->
|
<!-- <result column="percent" property="percent"/>-->
|
<!-- </resultMap>-->
|
<!-- <select id="selectOrderPercent" resultMap="baseMap">-->
|
<!-- SELECT a.order_id,-->
|
<!-- a.customer_name,-->
|
<!-- a.project,-->
|
<!-- a.area,-->
|
<!-- a.quantity,-->
|
<!-- a.create_time,-->
|
<!-- round(ifnull(d.finishNum, 0) / a.quantity * 100) as 'percent'-->
|
<!-- from sd.`order` as a-->
|
<!-- LEFT JOIN (-->
|
<!-- SELECT sum(c.reporting_work_num) as 'finishNum',order_id-->
|
<!-- from sd.order_process_detail as c-->
|
<!-- where c.id in (-->
|
<!-- SELECT max(id) from sd.order_process_detail as b GROUP BY b.process_id, order_number-->
|
<!-- )-->
|
<!-- GROUP BY c.order_id-->
|
<!-- ) as d-->
|
<!-- on a.order_id = d.order_id-->
|
<!-- where a.warehousing != 2-->
|
<!-- </select>-->
|
<!--</mapper>-->
|