Merge branch 'dev-nx' of http://192.168.0.56:3000/bonus/devicesmgt into dev-nx
This commit is contained in:
commit
5afda4151a
|
|
@ -139,6 +139,7 @@ public interface TmTaskMapper {
|
|||
int getDeptId(String createBy);
|
||||
|
||||
List<TmTask> getLeaseOutListByjjbz(TmTask task);
|
||||
List<TmTask> getLeaseOutListByts(TmTask task);
|
||||
List<TmTask> getLeaseOutListByAdmin(TmTask task);
|
||||
|
||||
int updateLeaseAuditListByOne(TmTask task);
|
||||
|
|
|
|||
|
|
@ -230,6 +230,7 @@ public class TmTaskServiceImpl implements TmTaskService {
|
|||
|
||||
/**
|
||||
* 领料申请审批逐级发送短信通知相关人员审核方法抽取
|
||||
*
|
||||
* @param record
|
||||
*/
|
||||
private void sendMessageToLeader(TmTask record) {
|
||||
|
|
@ -248,10 +249,10 @@ public class TmTaskServiceImpl implements TmTaskService {
|
|||
urgentProcessingUser.setTaskStatus(TaskStatusEnum.STAY_INTERNAL_AUDIT.getInfo());
|
||||
break;
|
||||
}
|
||||
List<SysUser> userList =remoteUserService.processingUser(urgentProcessingUser).getData();
|
||||
if (userList.size()>0) {
|
||||
List<SysUser> userList = remoteUserService.processingUser(urgentProcessingUser).getData();
|
||||
if (userList.size() > 0) {
|
||||
log.info("查询到待发送短信人员信息为:{}", userList);
|
||||
String message ="尊敬的用户,宁夏智慧仓储管理系统提醒您:您有一个领料单号为:"+ record.getCode() +"的领料申请待处理,请及时查看";
|
||||
String message = "尊敬的用户,宁夏智慧仓储管理系统提醒您:您有一个领料单号为:" + record.getCode() + "的领料申请待处理,请及时查看";
|
||||
if (CollectionUtils.isNotEmpty(userList)) {
|
||||
for (SysUser sysUser : userList) {
|
||||
if (StringUtils.isNotBlank(sysUser.getPhonenumber())) {
|
||||
|
|
@ -332,13 +333,13 @@ public class TmTaskServiceImpl implements TmTaskService {
|
|||
@Override
|
||||
public List<TmTask> getLeaseAuditListByOne(TmTask record) {
|
||||
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);
|
||||
return leaseDetailByParentId;
|
||||
} else {
|
||||
List<TmTask> leaseDetailByParentId = tmTaskMapper.getLeaseDetailByParentId(record);
|
||||
return leaseDetailByParentId;
|
||||
}
|
||||
// } else {
|
||||
// List<TmTask> leaseDetailByParentId = tmTaskMapper.getLeaseDetailByParentId(record);
|
||||
// return leaseDetailByParentId;
|
||||
// }
|
||||
/* for (TmTask tmTask : leaseDetailByParentId) {
|
||||
if ("2".equals(tmTask.getManageType())) {
|
||||
List<TmTask> manageTypeByTypeId = tmTaskMapper.getManageTypeByTypeId(tmTask);
|
||||
|
|
@ -642,11 +643,15 @@ public class TmTaskServiceImpl implements TmTaskService {
|
|||
@Override
|
||||
public List<TmTask> getLeaseOutListByUser(TmTask task) {
|
||||
Set<String> roles = SecurityUtils.getLoginUser().getRoles();
|
||||
if (roles.contains("admin")){
|
||||
Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
||||
if (roles.contains("admin")) {
|
||||
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);
|
||||
} else if (deptId == 102) {
|
||||
//调试分公司可以查看调试设备
|
||||
return tmTaskMapper.getLeaseOutListByts(task);
|
||||
} else {
|
||||
return tmTaskMapper.getLeaseOutListByUser(task);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1087,7 +1087,8 @@
|
|||
mt.type_name as typeModelName,
|
||||
mt.manage_type as manageType,
|
||||
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.type_id as typeId
|
||||
FROM
|
||||
|
|
@ -1270,7 +1271,8 @@
|
|||
mt.type_name as typeModelName,
|
||||
mt.manage_type as manageType,
|
||||
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.type_id as typeId
|
||||
FROM
|
||||
|
|
@ -1334,4 +1336,49 @@
|
|||
GROUP BY lai.id
|
||||
ORDER BY tt.task_status,tt.create_time desc
|
||||
</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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue