导出明细,保有量
This commit is contained in:
parent
d2267cd583
commit
6c48d117d4
|
|
@ -100,7 +100,6 @@ public class LeaseApplyDetailExport extends BaseEntity{
|
|||
@ApiModelProperty(value = "任务状态(定义数据字典)")
|
||||
private Integer taskStatus;
|
||||
|
||||
@Excel(name = "状态",sort=6)
|
||||
@ApiModelProperty(value = "任务状态(定义数据字典)")
|
||||
private String taskStatusName;
|
||||
|
||||
|
|
|
|||
|
|
@ -1262,7 +1262,6 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
|||
|
||||
listOne = listOne.stream()
|
||||
.filter(item -> StringUtils.isBlank(keyWord) || containsKeywordDetail(item, keyWord))
|
||||
.filter(item -> statusSet.isEmpty() || statusSet.contains(item.getTaskStatus()))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
//领用
|
||||
|
|
@ -1278,7 +1277,6 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
|||
|
||||
listTwo = listTwo.stream()
|
||||
.filter(item -> StringUtils.isBlank(keyWord) || containsKeywordDetail(item, keyWord))
|
||||
.filter(item -> statusSet.isEmpty() || statusSet.contains(item.getTaskStatus()))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -825,6 +825,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
and COALESCE(lai.release_time, lai.create_time) BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
|
||||
</if>
|
||||
<if test="leaseUnitId != null ">
|
||||
and bai.unit_id = #{leaseUnitId}
|
||||
</if>
|
||||
<if test="leaseProjectId != null ">
|
||||
and bai.project_id = #{leaseProjectId}
|
||||
</if>
|
||||
GROUP BY lai.id,lod.type_id
|
||||
order by lai.id
|
||||
</select>
|
||||
|
|
@ -835,37 +841,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
mt1.type_name as typeModelName,
|
||||
mt.type_name as typeName,
|
||||
mt.unit_name as unitName,
|
||||
lpd.publish_task as code,
|
||||
lai.code as code,
|
||||
lpd.code as businessCode,
|
||||
lpd.lease_person AS leasePerson,
|
||||
tt.task_status as taskStatus,
|
||||
lpd.create_time AS releaseTime,
|
||||
bu.unit_name as leaseUnit ,
|
||||
bp.pro_name as leaseProject,
|
||||
IFNULL(sum(lod.out_num),0) as alNum,
|
||||
IFNULL(sum(lod.out_num),0) as outNum,
|
||||
sda.dict_label as taskStatusName,
|
||||
lod.out_num as alNum,
|
||||
lod.out_num as outNum,
|
||||
sd.dept_name as impUnitName,
|
||||
CASE
|
||||
WHEN mt.manage_type = 0 THEN '编码出库'
|
||||
ELSE '数量出库'
|
||||
END as manageTypeName
|
||||
END as manageTypeName,
|
||||
mm.ma_code as maCode
|
||||
|
||||
|
||||
from
|
||||
lease_out_details lod
|
||||
left join lease_publish_details lpd on lod.parent_id = lpd.parent_id
|
||||
left join tm_task tt on tt.code = lpd.publish_task and tt.task_type = 19
|
||||
left join lease_apply_info lai on lai.id = lod.parent_id
|
||||
left join lease_publish_details lpd on lod.parent_id = lpd.parent_id and lod.publish_task = lpd.publish_task
|
||||
left join tm_task tt on tt.code = lai.code
|
||||
left join bm_unit bu on bu.unit_id = lpd.unit_id
|
||||
left join bm_project bp on bp.pro_id = lpd.project_id
|
||||
left join sys_dept sd on sd.dept_id = bp.imp_unit
|
||||
left join sys_dict_data sda on tt.task_status = sda.dict_value
|
||||
and sda.dict_type = 'lease_task_status'
|
||||
|
||||
left join ma_type mt on lod.type_id = mt.type_id and mt.del_flag = '0'
|
||||
left join ma_type mt1 on mt.parent_id = mt1.type_id and mt1.del_flag = '0'
|
||||
left join ma_type mt2 ON mt1.parent_id = mt2.type_id and mt2.del_flag = '0'
|
||||
left join ma_type mt3 ON mt2.parent_id = mt3.type_id and mt3.del_flag = '0'
|
||||
|
||||
LEFT JOIN ma_machine mm on mm.ma_id = lod.ma_id
|
||||
<if test="userId != null">
|
||||
JOIN ma_type_keeper mtk ON mtk.type_id = lod.type_id AND mtk.user_id =#{userId}
|
||||
</if>
|
||||
|
|
@ -874,7 +880,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
and DATE_FORMAT( lpd.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
|
||||
</if>
|
||||
GROUP BY lpd.publish_task,lod.type_id
|
||||
<if test="leaseUnitId != null ">
|
||||
and lpd.unit_id = #{leaseUnitId}
|
||||
</if>
|
||||
<if test="leaseProjectId != null ">
|
||||
and lpd.project_id = #{leaseProjectId}
|
||||
</if>
|
||||
GROUP BY lpd.publish_task,lod.type_id,lod.ma_Id
|
||||
order by lpd.id
|
||||
</select>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue