|
|
@@ -9,20 +9,19 @@
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectFmsTaskpickList" parameterType="FmsTaskPickListReqVo" resultType="FmsTaskPickListResVo">
|
|
|
- SELECT c.cropName, c.cropType, t.taskNo, t.taskId,r.resUrl as cropPreview, p.planNo, l.landName, b.blockName, p.planArea, i.pickWeight, i.pickNo, t.taskPlanstartdate, t.taskPlanenddate, s.taskrcdHour, t.taskCreateddate, t.taskAudittype, t.taskStatus, t.taskContent, t.taskAuditor,
|
|
|
- su.userName as taskManagername
|
|
|
- FROM
|
|
|
- FmsTask t
|
|
|
- LEFT JOIN FmsCrop c ON t.cropId = c.cropId
|
|
|
- LEFT JOIN FmsLand l ON t.landId = l.landId
|
|
|
- LEFT JOIN FmsBlock b ON t.blockId = b.blockId
|
|
|
- LEFT JOIN FmsPlan p ON t.planId = p.planId
|
|
|
- LEFT JOIN FmsTaskpick i ON t.taskId = i.taskId
|
|
|
- LEFT JOIN FmsTaskrcd s ON t.taskId = s.taskId and s.taskrcdAuditstatus = 2
|
|
|
- LEFT JOIN SysUser su on su.userId = t.taskManager
|
|
|
- LEFT JOIN
|
|
|
- (select * from SysRes where resMediatype = '1' and resBiztype = 'CROP')
|
|
|
- r on r.resBusId = c.cropId
|
|
|
+ SELECT c.cropName, c.cropType, t.taskNo, t.taskId,r.resUrl as cropPreview, p.planNo, l.landName, b.blockName,
|
|
|
+ p.planArea, i.pickWeight, i.pickNo, t.taskPlanstartdate, t.taskPlanenddate, s.taskrcdHour,
|
|
|
+ t.taskCreateddate, t.taskAudittype, t.taskStatus, t.taskContent, t.taskAuditor,
|
|
|
+ su.userName as taskManagername
|
|
|
+ FROM FmsTask t
|
|
|
+ LEFT JOIN FmsCrop c ON t.cropId = c.cropId
|
|
|
+ LEFT JOIN FmsLand l ON t.landId = l.landId
|
|
|
+ LEFT JOIN FmsBlock b ON t.blockId = b.blockId
|
|
|
+ LEFT JOIN FmsPlan p ON t.planId = p.planId
|
|
|
+ LEFT JOIN FmsTaskpick i ON t.taskId = i.taskId
|
|
|
+ LEFT JOIN FmsTaskrcd s ON t.taskId = s.taskId and s.taskrcdAuditstatus = 2
|
|
|
+ LEFT JOIN SysUser su on su.userId = t.taskManager
|
|
|
+ LEFT JOIN (select * from SysRes where resMediatype = '1' and resBiztype = 'CROP') r on r.resBusId = c.cropId
|
|
|
<where>
|
|
|
<if test="cropId != null and cropId != ''">and t.cropId = #{cropId}</if>
|
|
|
<if test="landId != null and landId != ''">and t.landId = #{landId}</if>
|
|
|
@@ -50,15 +49,12 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="selectFmsTaskPickStockList" parameterType="String" resultType="com.yunfeiyun.agmp.fms.domain.resvo.FmsTaskPickStockListResVo">
|
|
|
- SELECT
|
|
|
- t.cropId,c.cropName,c.cropType,sum(tp.pickWeight) as pickWeight
|
|
|
- FROM
|
|
|
- FmsTaskpick tp
|
|
|
- LEFT JOIN FmsTask t on t.taskId = tp.taskId
|
|
|
- LEFT JOIN FmsCrop c on c.cropId = t.cropId
|
|
|
+ SELECT t.cropId,c.cropName,c.cropType,sum(tp.pickWeight) as pickWeight
|
|
|
+ FROM FmsTaskpick tp
|
|
|
+ LEFT JOIN FmsTask t on t.taskId = tp.taskId
|
|
|
+ LEFT JOIN FmsCrop c on c.cropId = t.cropId
|
|
|
<where>
|
|
|
- t.cropId is not null
|
|
|
- and tp.tid = #{tid}
|
|
|
+ t.cropId is not null and tp.tid = #{tid}
|
|
|
<if test="cropName != null and cropName != ''">and c.cropName like CONCAT("%",#{cropName},"%")</if>
|
|
|
<if test="dataFilter == true and blockIds != null and blockIds.size() > 0">
|
|
|
AND t.blockId in
|
|
|
@@ -67,7 +63,7 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
</where>
|
|
|
- GROUP BY t.cropId,c.cropName,c.cropType
|
|
|
+ GROUP BY t.cropId, c.cropName,c.cropType
|
|
|
</select>
|
|
|
|
|
|
<select id="selectFmsTaskPickStockListStat" parameterType="FmsTaskPickListReqVo" resultType="FmsTaskPickStockListResVo">
|
|
|
@@ -177,25 +173,15 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="selectFmsTaskPickStockDetailList" parameterType="FmsTaskPickStockDetailReqVo" resultType="com.yunfeiyun.agmp.fms.domain.resvo.FmsTaskPickStockDetailResVo">
|
|
|
- SELECT
|
|
|
- tp.pickNo,
|
|
|
- p.planNo,
|
|
|
- l.landName,
|
|
|
- b.blockName,
|
|
|
- p.planArea,
|
|
|
- t.taskCompletedate,
|
|
|
- tp.pickWeight
|
|
|
- FROM
|
|
|
- FmsTaskpick tp
|
|
|
- LEFT JOIN FmsTask t on t.taskId = tp.taskId
|
|
|
- LEFT JOIN FmsPlan p on p.planId = t.planId
|
|
|
- LEFT JOIN FmsLand l on l.landId = t.landId
|
|
|
- LEFT JOIN FmsBlock b on b.blockId = t.blockId
|
|
|
- LEFT JOIN FmsTaskrcd r on r.taskId = t.taskId and r.taskrcdAuditstatus = '2'
|
|
|
+ SELECT tp.pickNo, p.planNo, l.landName, b.blockName, p.planArea, t.taskCompletedate, tp.pickWeight
|
|
|
+ FROM FmsTaskpick tp
|
|
|
+ LEFT JOIN FmsTask t on t.taskId = tp.taskId
|
|
|
+ LEFT JOIN FmsPlan p on p.planId = t.planId
|
|
|
+ LEFT JOIN FmsLand l on l.landId = t.landId
|
|
|
+ LEFT JOIN FmsBlock b on b.blockId = t.blockId
|
|
|
+ LEFT JOIN FmsTaskrcd r on r.taskId = t.taskId and r.taskrcdAuditstatus = '2'
|
|
|
<where>
|
|
|
- t.cropId = #{cropId}
|
|
|
- and
|
|
|
- t.tid = #{tid}
|
|
|
+ t.cropId = #{cropId} and t.tid = #{tid}
|
|
|
<if test="landId !=null and landId != ''">and t.landId = #{landId}</if>
|
|
|
<if test="blockId !=null and blockId != ''">and t.blockId = #{blockId}</if>
|
|
|
<if test="planNo !=null and planNo != ''">and p.planNo = #{planNo}</if>
|