Compare commits

..

No commits in common. "1032f6d0a3c4209c771c2544462c8ce2193cc763" and "c28056e68c2af43a2ad33a944c453b6f0113e33e" have entirely different histories.

3 changed files with 13 additions and 66 deletions

View File

@ -139,7 +139,6 @@ 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);

View File

@ -230,7 +230,6 @@ public class TmTaskServiceImpl implements TmTaskService {
/** /**
* 领料申请审批逐级发送短信通知相关人员审核方法抽取 * 领料申请审批逐级发送短信通知相关人员审核方法抽取
*
* @param record * @param record
*/ */
private void sendMessageToLeader(TmTask record) { private void sendMessageToLeader(TmTask record) {
@ -249,10 +248,10 @@ public class TmTaskServiceImpl implements TmTaskService {
urgentProcessingUser.setTaskStatus(TaskStatusEnum.STAY_INTERNAL_AUDIT.getInfo()); urgentProcessingUser.setTaskStatus(TaskStatusEnum.STAY_INTERNAL_AUDIT.getInfo());
break; break;
} }
List<SysUser> userList = remoteUserService.processingUser(urgentProcessingUser).getData(); List<SysUser> userList =remoteUserService.processingUser(urgentProcessingUser).getData();
if (userList.size() > 0) { if (userList.size()>0) {
log.info("查询到待发送短信人员信息为:{}", userList); log.info("查询到待发送短信人员信息为:{}", userList);
String message = "尊敬的用户,宁夏智慧仓储管理系统提醒您:您有一个领料单号为:" + record.getCode() + "的领料申请待处理,请及时查看"; String message ="尊敬的用户,宁夏智慧仓储管理系统提醒您:您有一个领料单号为:"+ record.getCode() +"的领料申请待处理,请及时查看";
if (CollectionUtils.isNotEmpty(userList)) { if (CollectionUtils.isNotEmpty(userList)) {
for (SysUser sysUser : userList) { for (SysUser sysUser : userList) {
if (StringUtils.isNotBlank(sysUser.getPhonenumber())) { if (StringUtils.isNotBlank(sysUser.getPhonenumber())) {
@ -333,13 +332,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);
@ -643,15 +642,11 @@ 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") || deptId == 101) { } else if (roles.contains("jjbz") || roles.contains("fbz")) {
//机具班长副班长机具分公司可以查看机具设备 //机具班长和副班长可以出库机具设备
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);
} }

View File

@ -1087,8 +1087,7 @@
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_id) as userId, GROUP_CONCAT(su.user_name) as userName,
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
@ -1271,8 +1270,7 @@
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.nick_name) as userName, GROUP_CONCAT(su.user_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
@ -1336,49 +1334,4 @@
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>