同一设备两个库管员admin账号出库数量显示错误修改
This commit is contained in:
parent
e64e333dc9
commit
5571b7d59b
|
|
@ -139,6 +139,7 @@ public interface TmTaskMapper {
|
||||||
int getDeptId(String createBy);
|
int getDeptId(String createBy);
|
||||||
|
|
||||||
List<TmTask> getLeaseOutListByjjbz(TmTask task);
|
List<TmTask> getLeaseOutListByjjbz(TmTask task);
|
||||||
|
List<TmTask> getLeaseOutListByAdmin(TmTask task);
|
||||||
|
|
||||||
int updateLeaseAuditListByOne(TmTask task);
|
int updateLeaseAuditListByOne(TmTask task);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -598,7 +598,9 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
@Override
|
@Override
|
||||||
public List<TmTask> getLeaseOutListByUser(TmTask task) {
|
public List<TmTask> getLeaseOutListByUser(TmTask task) {
|
||||||
Set<String> roles = SecurityUtils.getLoginUser().getRoles();
|
Set<String> roles = SecurityUtils.getLoginUser().getRoles();
|
||||||
if (roles.contains("jjbz") || roles.contains("fbz")) {
|
if (roles.contains("admin")){
|
||||||
|
return tmTaskMapper.getLeaseOutListByAdmin(task);
|
||||||
|
} else if (roles.contains("jjbz") || roles.contains("fbz")) {
|
||||||
//机具班长和副班长可以出库机具设备
|
//机具班长和副班长可以出库机具设备
|
||||||
return tmTaskMapper.getLeaseOutListByjjbz(task);
|
return tmTaskMapper.getLeaseOutListByjjbz(task);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -1059,9 +1059,7 @@
|
||||||
LEFT JOIN lease_apply_details lad on lai.id = lad.parennt_id
|
LEFT JOIN lease_apply_details lad on lai.id = lad.parennt_id
|
||||||
LEFT JOIN ma_type_keeper mtk on lad.type_id = mtk.type_id
|
LEFT JOIN ma_type_keeper mtk on lad.type_id = mtk.type_id
|
||||||
WHERE tt.task_status in(33,34,35)
|
WHERE tt.task_status in(33,34,35)
|
||||||
<if test="userId != 1">
|
and mtk.user_id = #{userId}
|
||||||
and mtk.user_id = #{userId}
|
|
||||||
</if>
|
|
||||||
<if test="code != null and code != ''">
|
<if test="code != null and code != ''">
|
||||||
and tt.code like concat('%', #{code}, '%')
|
and tt.code like concat('%', #{code}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -1292,4 +1290,48 @@
|
||||||
</if>
|
</if>
|
||||||
GROUP BY lad.type_id
|
GROUP BY lad.type_id
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getLeaseOutListByAdmin" resultType="com.bonus.sgzb.app.domain.TmTask">
|
||||||
|
SELECT
|
||||||
|
tt.*,
|
||||||
|
lai.id AS id,
|
||||||
|
bpl.lot_id AS proId,
|
||||||
|
bpl.lot_name AS proName,
|
||||||
|
bui.unit_id AS unitId,
|
||||||
|
bui.unit_name AS unitName,
|
||||||
|
lai.lease_person AS leasePerson,
|
||||||
|
lai.phone AS leasePhone,
|
||||||
|
tt.create_by AS applyFor,
|
||||||
|
d.`name` AS taskName,
|
||||||
|
lai.lease_type AS leaseType,
|
||||||
|
d.id AS examineStatusId,
|
||||||
|
bai.agreement_code AS agreementCode,
|
||||||
|
tt.create_time AS createTimes,
|
||||||
|
IFNULL(sum(lad.pre_num),0) as preCountNum,
|
||||||
|
IFNULL(sum(lad.al_num),0) as alNum,
|
||||||
|
tt.update_time AS updateTimes
|
||||||
|
from
|
||||||
|
lease_apply_info lai
|
||||||
|
LEFT JOIN tm_task tt on lai.task_id = tt.task_id
|
||||||
|
LEFT JOIN sys_dic d ON d.id = tt.task_status
|
||||||
|
LEFT JOIN tm_task_agreement tta ON lai.task_id = tta.task_id
|
||||||
|
LEFT JOIN bm_agreement_info bai ON bai.agreement_id = tta.agreement_id
|
||||||
|
LEFT JOIN bm_project_lot bpl ON bpl.lot_id = bai.project_id
|
||||||
|
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id
|
||||||
|
LEFT JOIN lease_apply_details lad on lai.id = lad.parennt_id
|
||||||
|
WHERE tt.task_status in(33,34,35)
|
||||||
|
<if test="code != null and code != ''">
|
||||||
|
and tt.code like concat('%', #{code}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="unitId != null">
|
||||||
|
and bui.unit_id = #{unitId}
|
||||||
|
</if>
|
||||||
|
<if test="proId != null">
|
||||||
|
and bpl.lot_id = #{proId}
|
||||||
|
</if>
|
||||||
|
<if test="taskStatus != null">
|
||||||
|
and tt.task_status = #{taskStatus}
|
||||||
|
</if>
|
||||||
|
GROUP BY lai.id
|
||||||
|
ORDER BY tt.task_status,tt.create_time desc
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue