Compare commits
2 Commits
c28056e68c
...
1032f6d0a3
| Author | SHA1 | Date |
|---|---|---|
|
|
1032f6d0a3 | |
|
|
9aaee8611c |
|
|
@ -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> getLeaseOutListByts(TmTask task);
|
||||||
List<TmTask> getLeaseOutListByAdmin(TmTask task);
|
List<TmTask> getLeaseOutListByAdmin(TmTask task);
|
||||||
|
|
||||||
int updateLeaseAuditListByOne(TmTask task);
|
int updateLeaseAuditListByOne(TmTask task);
|
||||||
|
|
|
||||||
|
|
@ -230,6 +230,7 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 领料申请审批逐级发送短信通知相关人员审核方法抽取
|
* 领料申请审批逐级发送短信通知相关人员审核方法抽取
|
||||||
|
*
|
||||||
* @param record
|
* @param record
|
||||||
*/
|
*/
|
||||||
private void sendMessageToLeader(TmTask record) {
|
private void sendMessageToLeader(TmTask record) {
|
||||||
|
|
@ -332,13 +333,13 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
@Override
|
@Override
|
||||||
public List<TmTask> getLeaseAuditListByOne(TmTask record) {
|
public List<TmTask> getLeaseAuditListByOne(TmTask record) {
|
||||||
Set<String> roles = SecurityUtils.getLoginUser().getRoles();
|
Set<String> roles = SecurityUtils.getLoginUser().getRoles();
|
||||||
if (roles.contains("jjbz") || roles.contains("fbz")) {
|
// if (roles.contains("jjbz") || roles.contains("fbz")) {
|
||||||
List<TmTask> leaseDetailByParentId = tmTaskMapper.getLeaseDetailByjjbz(record);
|
List<TmTask> leaseDetailByParentId = tmTaskMapper.getLeaseDetailByjjbz(record);
|
||||||
return leaseDetailByParentId;
|
return leaseDetailByParentId;
|
||||||
} else {
|
// } else {
|
||||||
List<TmTask> leaseDetailByParentId = tmTaskMapper.getLeaseDetailByParentId(record);
|
// List<TmTask> leaseDetailByParentId = tmTaskMapper.getLeaseDetailByParentId(record);
|
||||||
return leaseDetailByParentId;
|
// return leaseDetailByParentId;
|
||||||
}
|
// }
|
||||||
/* for (TmTask tmTask : leaseDetailByParentId) {
|
/* for (TmTask tmTask : leaseDetailByParentId) {
|
||||||
if ("2".equals(tmTask.getManageType())) {
|
if ("2".equals(tmTask.getManageType())) {
|
||||||
List<TmTask> manageTypeByTypeId = tmTaskMapper.getManageTypeByTypeId(tmTask);
|
List<TmTask> manageTypeByTypeId = tmTaskMapper.getManageTypeByTypeId(tmTask);
|
||||||
|
|
@ -642,11 +643,15 @@ 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();
|
||||||
|
Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
||||||
if (roles.contains("admin")) {
|
if (roles.contains("admin")) {
|
||||||
return tmTaskMapper.getLeaseOutListByAdmin(task);
|
return tmTaskMapper.getLeaseOutListByAdmin(task);
|
||||||
} else if (roles.contains("jjbz") || roles.contains("fbz")) {
|
} else if (roles.contains("jjbz") || roles.contains("fbz") || deptId == 101) {
|
||||||
//机具班长和副班长可以出库机具设备
|
//机具班长、副班长、机具分公司可以查看机具设备
|
||||||
return tmTaskMapper.getLeaseOutListByjjbz(task);
|
return tmTaskMapper.getLeaseOutListByjjbz(task);
|
||||||
|
} else if (deptId == 102) {
|
||||||
|
//调试分公司可以查看调试设备
|
||||||
|
return tmTaskMapper.getLeaseOutListByts(task);
|
||||||
} else {
|
} else {
|
||||||
return tmTaskMapper.getLeaseOutListByUser(task);
|
return tmTaskMapper.getLeaseOutListByUser(task);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1087,7 +1087,8 @@
|
||||||
mt.type_name as typeModelName,
|
mt.type_name as typeModelName,
|
||||||
mt.manage_type as manageType,
|
mt.manage_type as manageType,
|
||||||
mt.num as num,
|
mt.num as num,
|
||||||
GROUP_CONCAT(su.user_name) as userName,
|
GROUP_CONCAT(su.user_id) as userId,
|
||||||
|
GROUP_CONCAT(su.nick_name) as userName,
|
||||||
lad.status as status,
|
lad.status as status,
|
||||||
lad.type_id as typeId
|
lad.type_id as typeId
|
||||||
FROM
|
FROM
|
||||||
|
|
@ -1270,7 +1271,8 @@
|
||||||
mt.type_name as typeModelName,
|
mt.type_name as typeModelName,
|
||||||
mt.manage_type as manageType,
|
mt.manage_type as manageType,
|
||||||
mt.num as num,
|
mt.num as num,
|
||||||
GROUP_CONCAT(su.user_name) as userName,
|
GROUP_CONCAT(su.nick_name) as userName,
|
||||||
|
GROUP_CONCAT(su.user_id) as userId,
|
||||||
lad.status as status,
|
lad.status as status,
|
||||||
lad.type_id as typeId
|
lad.type_id as typeId
|
||||||
FROM
|
FROM
|
||||||
|
|
@ -1334,4 +1336,49 @@
|
||||||
GROUP BY lai.id
|
GROUP BY lai.id
|
||||||
ORDER BY tt.task_status,tt.create_time desc
|
ORDER BY tt.task_status,tt.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getLeaseOutListByts" 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>
|
||||||
|
and lai.company_id = 102
|
||||||
|
GROUP BY lai.id
|
||||||
|
ORDER BY tt.task_status,tt.create_time desc
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue